.photos-page {
  color-scheme: dark;
  overflow-y: auto;
  cursor: auto;
  background: #080808;
}

.photos-page .photos-skip {
  position: fixed;
  top: 1rem;
  left: 1rem;
  padding: .65rem 1rem;
  z-index: 201;
  color: #101010;
  background: #faf8f5;
  transform: translateY(-200%);
}

.photos-page .photos-skip:focus {
  transform: none;
}

.photos-page .photo-main {
  width: min(100% - clamp(2.5rem, 9vw, 9rem), 78rem);
  margin: 0 auto;
  padding: clamp(4rem, 6vw, 5rem) 0 clamp(5rem, 8vw, 7rem);
  color: #f0eeea;
}

.photo-intro {
  padding: clamp(2rem, 4.6vw, 4rem) 0 clamp(1.25rem, 2.6vw, 2.1rem);
  border-bottom: 1px solid #454442;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem 2rem;
  flex-wrap: wrap;
}

.photos-page .photo-intro h1 {
  font: 400 clamp(2.4rem, 5vw, 5rem)/1.06 var(--font);
  letter-spacing: -.045em;
}

.photo-intro nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.3rem;
}

.photo-intro nav a,
.photo-main figcaption,
.photo-viewer button,
.photo-viewer figcaption {
  font: 400 .94rem/1.5 var(--font);
  letter-spacing: normal;
  text-transform: none;
}

.photo-intro nav a {
  display: inline-block;
  padding: .55rem 0;
  color: #d2d0ca;
  text-decoration: underline;
  text-underline-offset: .32em;
  text-decoration-thickness: 1px;
  text-decoration-color: #706f6b;
}

.photo-collection {
  margin-top: clamp(1.65rem, 3.5vw, 3rem);
  scroll-margin-top: 5rem;
}

.photo-collection + .photo-collection {
  margin-top: clamp(3.6rem, 8vw, 7rem);
  border-top: 1px solid #454442;
  padding-top: clamp(2rem, 4vw, 3rem);
}

.photos-page .photo-collection h2 {
  margin-bottom: clamp(1rem, 1.6vw, 1.45rem);
  font-size: clamp(1.15rem, 1.7vw, 1.45rem);
  font-weight: 400;
  line-height: 1.16;
  letter-spacing: -.015em;
}

/* Compact headshot contact sheet. Keep the full composition visible in every tile. */
.headshot-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(.95rem, 1.8vw, 1.6rem) clamp(.65rem, 1.15vw, 1.15rem);
  align-items: start;
}
.headshot-grid .photo-print {
  width: 100%;
  aspect-ratio: 5 / 4;
  background: #171716;
}
.headshot-grid .photo-print img { width: 100%; height: 100%; object-fit: contain; }
.photo-main .headshot-grid figcaption {
  margin-top: .38rem;
  font-size: .82rem;
  line-height: 1.35;
  font-weight: 400;
  color: #d5d3ce;
}
@media (max-width: 67rem) {
  .headshot-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 51rem) {
  .headshot-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 39rem) {
  .headshot-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 28rem) {
  .headshot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.photo-collection .print-row {
  display: grid;
  grid-template-columns: var(--print-columns);
  gap: clamp(.95rem, 2.2vw, 2rem);
}

.print-row + .print-row {
  margin-top: clamp(1.8rem, 3.3vw, 3rem);
}

.photo-main figure,
.photo-viewer figure {
  margin: 0;
}

.photo-print {
  display: block;
  cursor: zoom-in;
}

.photo-print img {
  width: 100%;
  height: auto;
  display: block;
}

.photo-main figcaption {
  margin-top: .55rem;
  color: #cccac6;
}

.photos-page :is(a, button):focus-visible {
  outline: 2px solid #f6f2e9;
  outline-offset: 4px;
}

.photo-intro nav a:hover,
.photo-viewer button:hover {
  color: white;
  text-decoration: underline;
}

body.photos-page:has(.photo-viewer[open]) {
  overflow: hidden;
}

.photo-viewer {
  border: 0;
  padding: 0;
  margin: 0;
  max-width: none;
  max-height: none;
  width: 100%;
  height: 100%;
  color: #f7f5ef;
  background: #111;
}

.photo-viewer::backdrop {
  background: #111;
}

.photo-viewer .viewer-inner {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  padding: clamp(.75rem, 2vw, 1.5rem);
  box-sizing: border-box;
}

.photo-viewer button {
  border: 0;
  padding: .55rem .85rem;
  min-height: 44px;
  background: none;
  color: #dedcd7;
  cursor: pointer;
}

.photo-viewer .viewer-close {
  justify-self: end;
}

.photo-viewer .viewer-print {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: .9rem;
  justify-items: center;
  text-align: center;
}

.photo-viewer .viewer-print img {
  align-self: center;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.photo-viewer .viewer-controls {
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding-top: .4rem;
}

@media (max-width: 39rem) {
  .photo-intro {
    display: block;
  }

  .photo-intro nav {
    margin-top: .75rem;
  }

  .photo-collection .print-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.55rem;
  }

  .print-row + .print-row {
    margin-top: 1.55rem;
  }

  .photo-main figcaption {
    margin-top: .35rem;
  }

  .photo-collection {
    scroll-margin-top: 7rem;
  }
}
