/* URSU v4: asymmetric Selected Works gallery, based on IMG_4930.MOV.
   The existing header, navigation, image order and lightbox are preserved. */
html { scrollbar-gutter: stable; }
.site-header { gap: 24px; }
.site-identity {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
  font-family: var(--font-editorial);
  font-size: 39px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -.035em;
}
.site-identity .wordmark { flex-shrink: 0; font-size: inherit; line-height: inherit; }
.identity-separator { flex-shrink: 0; font-style: normal; font-weight: 400; letter-spacing: -.035em; }
.header-section {
  /* Keep italic descenders inside the clipping box used for ellipsis. */
  padding-block: .2em;
  margin-block: -.2em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: inherit;
  font-weight: 400;
  font-style: italic;
  letter-spacing: -.025em;
}
.header-tools { flex-shrink: 0; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: transparent;
}
#main { position: relative; z-index: 0; }

/* Native vertical scrolling; no cropped photographs or forced scroll effects. */
.scroll-gallery {
  display: flex;
  flex-direction: column;
  width: calc(100% - var(--gutter) * 2);
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 0 104px;
  gap: clamp(72px, 8vw, 118px);
}
.editorial-row {
  display: grid;
  grid-template-columns: repeat(24, minmax(0, 1fr));
  align-items: start;
  width: 100%;
}
.scroll-figure {
  min-width: 0;
  width: 100%;
  margin: 0;
  grid-row: 1;
  scroll-margin-top: calc(var(--header) + 24px);
}
.editorial-row--feature > .scroll-figure:first-child { grid-column: 1 / span 13; }
.editorial-row--feature > .scroll-figure:nth-child(2) {
  grid-column: 18 / span 7;
  margin-top: clamp(35px, 9vw, 130px);
}
.editorial-row--offset > .scroll-figure:first-child { grid-column: 3 / span 10; }
.editorial-row--offset > .scroll-figure:nth-child(2) {
  grid-column: 16 / span 6;
  margin-top: clamp(14px, 2.6vw, 38px);
}
.editorial-row--balanced > .scroll-figure:first-child { grid-column: 1 / span 12; }
.editorial-row--balanced > .scroll-figure:nth-child(2) {
  grid-column: 17 / span 8;
  margin-top: clamp(24px, 4.5vw, 65px);
}
.editorial-row--single > .scroll-figure { grid-column: 7 / span 12; }
.editorial-row--single > .scroll-figure.is-landscape { grid-column: 4 / span 18; }
.scroll-figure .photo-button { display: block; width: 100%; height: auto; position: relative; }
.scroll-figure .hero-photo {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  animation: none;
}
.scroll-figure .image-error { position: static; padding: 45px 15px; margin: auto; }
.scroll-figure .scroll-caption {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-top: 11px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}
.photo-number { font-size: 11px; letter-spacing: .04em; font-style: normal; font-variant-numeric: lining-nums tabular-nums; }
.photo-caption { font-style: italic; text-align: right; }
.scroll-page .site-footer { position: relative; }
.scroll-page #gallery-status { display: none; }
.lightbox { overscroll-behavior: contain; }
.lightbox figure { touch-action: pan-y pinch-zoom; }

@media (max-width: 1000px) {
  .site-identity { font-size: 35px; }
  .header-tools { gap: 20px; }
}
@media (max-width: 760px) {
  .site-header { gap: 14px; }
  .site-identity { font-size: clamp(22px, 4.8vw, 33px); gap: 8px; }
  .scroll-gallery { padding-top: 18px; padding-bottom: 65px; gap: 60px; }
}
@media (max-width: 540px) {
  .site-header { gap: 12px; }
  .site-identity { font-size: clamp(19px, 5.45vw, 28px); gap: 7px; }
  .header-tools { gap: 0; }
  .header-tools #index-toggle { display: none; }
  .header-tools .menu-toggle { gap: 8px; font-size: 15px; }
  .menu-lines { width: 15px; }
  .scroll-gallery { padding-top: 16px; padding-bottom: 54px; gap: 42px; }
  .editorial-row--feature > .scroll-figure:first-child { grid-column: 1 / span 14; }
  .editorial-row--feature > .scroll-figure:nth-child(2) { grid-column: 17 / span 8; margin-top: 40px; }
  .editorial-row--offset > .scroll-figure:first-child { grid-column: 2 / span 12; }
  .editorial-row--offset > .scroll-figure:nth-child(2) { grid-column: 17 / span 7; margin-top: 20px; }
  .editorial-row--balanced > .scroll-figure:first-child { grid-column: 1 / span 13; }
  .editorial-row--balanced > .scroll-figure:nth-child(2) { grid-column: 17 / span 8; margin-top: 30px; }
  .editorial-row--single > .scroll-figure { grid-column: 5 / span 16; }
  .editorial-row--single > .scroll-figure.is-landscape { grid-column: 2 / span 22; }
  .scroll-figure .scroll-caption { margin-top: 8px; gap: 6px; font-size: 11px; }
  .photo-number { font-size: 10px; }
}

/* Homepage reference: larger left image, smaller right image slightly lowered. */
.scroll-gallery { width: 81%; }
.scroll-gallery > .editorial-row {
  grid-template-columns: minmax(0, 4fr) minmax(0, 3fr);
  column-gap: 7.9%;
}
.scroll-gallery > .editorial-row > .scroll-figure {
  width: 100%;
  grid-row: 1;
  justify-self: stretch;
  margin: 0;
}
.scroll-gallery > .editorial-row > .scroll-figure:first-child { grid-column: 1; }
.scroll-gallery > .editorial-row > .scroll-figure:nth-child(2) {
  grid-column: 2;
  margin-top: 9.2%;
}

/* Slightly smaller opening photograph in Selected Works. */
.scroll-gallery > .editorial-row > #photograph-1.scroll-figure {
  width: 90%;
  justify-self: start;
}

/* Selected Works follows the original 1440 x 810 PDF pages. */
.pdf-gallery { width: 100%; margin: 0; padding: 0; }
.pdf-gallery-page { position: relative; width: 100%; aspect-ratio: 1440 / 810; }
.pdf-gallery-page > .project-figure { position: absolute; margin: 0; max-width: none; }
.pdf-gallery-page .photo-button { display: block; width: 100%; height: 100%; }
.pdf-gallery-page .hero-photo { display: block; width: 100%; height: 100%; max-height: none; object-fit: fill; }
.pdf-gallery-page .project-photo-caption { display: none; }

/* Fixed header and softly fading menu, preserving existing typography/layout. */
.menu-dialog {
  background: rgba(255, 255, 255, .64);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  opacity: 0;
  transition: opacity .75s ease;
}
.menu-dialog::backdrop { background: transparent; }
.menu-dialog.is-visible { opacity: 1; }
.menu-dialog .menu-main, .menu-dialog .menu-note {
  opacity: 0;
  transition: opacity .75s ease;
}
.menu-dialog.is-visible .menu-main, .menu-dialog.is-visible .menu-note { opacity: 1; }
.menu-dialog .menu-footer { background: transparent; }
@media (prefers-reduced-motion: reduce) {
  .menu-dialog, .menu-dialog .menu-main, .menu-dialog .menu-note { transition: none; }
}
