.gallery-page .nav {
  position: sticky;
  background: #090909f2;
}

.gallery-shell {
  max-width: 1480px;
  margin-inline: auto;
  padding: clamp(52px, 7vw, 112px) 7vw clamp(56px, 8vw, 120px);
}

.gallery-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  flex-wrap: wrap;
  gap: 20px 40px;
  padding-bottom: clamp(24px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
}

.gallery-heading h1 {
  margin: 0;
  font: 400 clamp(72px, 13vw, 164px)/.82 'Cormorant Garamond', Georgia, serif;
}

.gallery-heading > p {
  margin: 0;
  color: #c8c7c2;
  font: 400 clamp(19px, 2vw, 23px)/1.35 'Cormorant Garamond', Georgia, serif;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(10px, 1.6vw, 24px);
  margin: clamp(24px, 4vw, 56px) 0 0;
  padding: 0;
  list-style: none;
}

.photo-wide { grid-column: span 2; }

.photo-grid a {
  display: block;
  aspect-ratio: 3 / 4;
  background: #151515;
  overflow: hidden;
}

.photo-wide a { aspect-ratio: 16 / 10; }

.photo-grid img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}

.photo-grid a:hover img { transform: scale(1.035); }

.photo-grid a:focus-visible,
.photo-control:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: 3px;
}

.photo-viewer {
  width: min(920px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  padding: clamp(10px, 2vw, 24px);
  background: #101010;
  color: var(--paper);
  border: 1px solid #454545;
}

.photo-viewer::backdrop { background: #090909e8; }

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

.photo-viewer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.photo-position,
.photo-control {
  font: 400 11px/1.3 Inter, Arial, sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.photo-position { margin: 0; }

.photo-control {
  min-height: 44px;
  padding: 8px 13px;
  border: 1px solid #777;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.photo-control:hover {
  background: var(--paper);
  color: var(--black);
}

.photo-full {
  display: block;
  width: 100%;
  height: min(680px, calc(100dvh - 184px));
  object-fit: contain;
  margin-block: 10px;
}

@media (max-width: 760px) {
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .photo-grid img { transition: none; }
  .photo-grid a:hover img { transform: none; }
}
