/* Project renderings within the existing directory. */
.projectHeroActions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 24px; }
.projectGalleryJump { padding: 11px 13px; border: 1px solid rgba(215, 168, 79, .5); }
.projectGalleryJump:hover { background: rgba(215, 168, 79, .12); }
.directoryGalleryLink {
  display: inline-block;
  margin-top: 10px;
  color: #ddc48d;
  font-size: 12px;
  line-height: 1.5;
  text-underline-offset: 4px;
}
.directoryRowWithGallery { scroll-margin-top: 248px; }
.directoryRowWithGallery > .directoryReference,
.directoryRowWithGallery > .directoryCell { cursor: pointer; }
.directoryGalleryToggle {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-align: left;
  cursor: pointer;
}
.directoryGalleryToggle:hover { color: #ddc48d; }
.directoryGalleryToggle:focus-visible { outline: 2px solid #ddc48d; outline-offset: 5px; }
.directoryGalleryToggleIcon { position: relative; flex: 0 0 12px; width: 12px; height: 12px; color: #ddc48d; }
.directoryGalleryToggleIcon::before,
.directoryGalleryToggleIcon::after { content: ''; position: absolute; top: 5px; left: 0; width: 12px; height: 1px; background: currentColor; }
.directoryGalleryToggleIcon::after { transform: rotate(90deg); }
.directoryGalleryToggle[aria-expanded="true"] .directoryGalleryToggleIcon::after { transform: rotate(0); }
.directoryProjectGallery[hidden] { display: none; }
.directoryProjectGallery {
  grid-column: 1 / -1;
  min-width: 0;
  margin-top: 8px;
  border: 1px solid rgba(215, 168, 79, .28);
  background: #10100d;
}
.projectGalleryHeading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(215, 168, 79, .2);
}
.projectGalleryEyebrow {
  margin: 0;
  color: #ddc48d;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.projectGalleryLayout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 18px;
  padding: 18px;
}
.directoryProjectGallery[data-image-count="1"] .projectGalleryLayout { grid-template-columns: minmax(0, 1fr); }
.projectGalleryThumbnails[hidden], .projectLightbox button[hidden] { display: none; }
.projectGalleryMain { min-width: 0; margin: 0; }
.projectGalleryOpen {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 280px;
  height: clamp(400px, 46vw, 600px);
  background: #080907;
  text-decoration: none;
  overflow: hidden;
}
.projectGalleryOpen > img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
}
.projectGalleryOpen > span {
  position: absolute;
  right: 14px;
  bottom: 14px;
  padding: 11px 14px;
  border: 1px solid rgba(255, 247, 234, .35);
  background: rgba(8, 8, 6, .88);
  color: #fff7ea;
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.projectGalleryCaption {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  min-height: 42px;
  padding: 14px 2px 0;
  color: #d2c8ba;
  font-size: 12px;
  line-height: 1.5;
}
.projectGalleryCaption [data-gallery-count] { color: #ddc48d; white-space: nowrap; }
.projectGalleryThumbnails {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 12px;
  max-height: calc(clamp(400px, 46vw, 600px) + 42px);
  overflow-y: auto;
  scrollbar-color: #b28a46 #181813;
  scrollbar-width: thin;
  padding: 2px;
}
.projectGalleryThumbnail {
  display: block;
  min-width: 0;
  padding: 4px;
  border: 1px solid rgba(255, 247, 234, .2);
  background: #181813;
  text-decoration: none;
  transition: border-color .2s, background .2s;
}
.projectGalleryThumbnail img {
  display: block;
  width: 100%;
  height: clamp(110px, 13vw, 170px);
  object-fit: contain;
  background: #080907;
}
.projectGalleryThumbnail > span {
  display: block;
  padding: 8px 5px 4px;
  color: #ded3c1;
  font-size: 10px;
  line-height: 1.4;
}
.projectGalleryThumbnail[aria-current="true"] {
  border-color: #e3c681;
  background: rgba(215, 168, 79, .2);
  box-shadow: 0 0 0 1px #e3c681;
}
.projectGalleryThumbnail:hover { border-color: #ddc48d; }
.projectGalleryOpen:focus-visible,
.projectGalleryThumbnail:focus-visible,
.projectLightbox button:focus-visible {
  outline: 3px solid #f2d18b;
  outline-offset: 4px;
}
.projectLightbox {
  position: fixed;
  inset: 0;
  width: min(1440px, calc(100% - 48px));
  max-width: none;
  height: min(960px, calc(100dvh - 48px));
  max-height: none;
  margin: auto;
  padding: 0;
  border: 1px solid rgba(215, 168, 79, .45);
  background: #0c0c09;
  color: #fff7ea;
}
.projectLightbox::backdrop { background: rgba(0, 0, 0, .9); }
.projectLightbox[open] { display: flex; flex-direction: column; }
.projectLightboxHeader,
.projectLightboxFooter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 22px;
}
.projectLightboxHeader { border-bottom: 1px solid rgba(215, 168, 79, .25); }
.projectLightboxHeader h2 {
  margin: 0;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 500;
  font-size: 24px;
}
.projectLightbox button {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid rgba(215, 168, 79, .4);
  background: #191810;
  color: #f6e7cc;
  font: inherit;
  font-size: 21px;
  cursor: pointer;
}
.projectLightboxImage {
  flex: 1;
  min-height: 0;
  width: 100%;
  object-fit: contain;
}
.projectLightboxFooter { border-top: 1px solid rgba(215, 168, 79, .25); }
.projectLightboxCaption { flex: 1; margin: 0; color: #ddd3c3; font-size: 13px; line-height: 1.5; }
.projectLightboxCount { color: #ddc48d; font-size: 12px; white-space: nowrap; }
html.projectGalleryModalOpen { overflow: hidden; }
/* Keep the directory controls below the fixed desktop navigation. */
@media (min-width: 901px) { .projectsDesign .projectDirectoryToolbar { top: 86px; } }
@media (max-width: 720px) {
  .directoryRowWithGallery { scroll-margin-top: 270px; }
  .directoryProjectGallery { margin-top: 2px; }
  .projectGalleryHeading { align-items: flex-start; padding: 16px; }
  .projectGalleryLayout { grid-template-columns: minmax(0, 1fr); padding: 10px; gap: 12px; }
  .projectGalleryOpen { min-height: 0; height: 420px; }
  .projectGalleryOpen > span { right: 10px; bottom: 10px; padding: 9px 11px; }
  .projectGalleryThumbnails { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; max-height: 320px; }
  .projectGalleryThumbnail img { height: 78px; }
  .projectGalleryThumbnail > span { font-size: 9px; padding: 6px 3px 3px; }
  .projectGalleryCaption { padding: 12px 2px 0; font-size: 11px; }
  .projectLightbox { width: calc(100% - 16px); height: calc(100dvh - 32px); }
  .projectLightboxHeader, .projectLightboxFooter { padding: 12px; gap: 10px; }
  .projectLightboxHeader h2 { font-size: 21px; }
  .projectLightboxCaption { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { .projectGalleryThumbnail { transition: none; } }
