.gallery-page .site-header { background: var(--dark); }
.gallery-main { padding: 140px var(--gutter) 70px; }
.gallery-heading { display:flex; justify-content:space-between; align-items:end; gap:40px; margin:20px 0 46px; }
.gallery-back { display:inline-block; font-size:16px; padding:12px 0; margin-bottom:18px; }
.gallery-heading h1 { font-size:clamp(42px,5.5vw,84px); }
.gallery-heading>p { max-width:280px; font-size:18px; }
.gallery-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:32px 22px; }
.gallery-shot { margin:0; min-width:0; scroll-margin-top:110px; }
.gallery-wide { grid-column:span 2; }
.gallery-open { display:block; position:relative; height:clamp(260px,33vw,520px); background:#d5d3cb; overflow:hidden; }
.gallery-open img { width:100%; height:100%; object-fit:cover; transition:transform .5s; }
.gallery-open:hover img { transform:scale(1.025); }
.photo-expand { position:absolute; right:12px; bottom:12px; display:grid; place-items:center; width:40px; height:40px; background:var(--paper); color:var(--ink); font-size:24px; }
.gallery-shot figcaption { display:flex; justify-content:space-between; gap:12px; padding-top:10px; font-size:16px; }
.photo-credit { color:#625f5b; font-size:14px; }
.gallery-end { display:flex; justify-content:space-between; gap:24px; margin-top:52px; }
.photo-viewer { width:100%; height:100%; max-width:none; max-height:none; margin:0; padding:16px 24px; border:0; color:var(--paper); background:#191817fa; }
.photo-viewer::backdrop { background:#191817; }
.photo-viewer[open] { display:grid; grid-template-rows:auto minmax(0,1fr) auto; gap:8px; }
body.photo-open { overflow:hidden; }
.viewer-top { display:flex; justify-content:space-between; align-items:center; }
.photo-viewer button { min-width:48px; min-height:48px; border:1px solid #e6e5e180; background:transparent; color:var(--paper); font:inherit; font-size:24px; }
.photo-viewer button:hover { background:var(--paper); color:var(--ink); }
.photo-viewer .viewer-close { border:0; font-size:36px; }
.photo-viewer figure { margin:0; display:flex; flex-direction:column; min-height:0; gap:12px; align-items:center; }
.viewer-image { display:block; width:100%; min-height:0; flex:1; object-fit:contain; }
.viewer-caption { flex-shrink:0; min-height:24px; text-align:center; font-size:14px; }
.viewer-controls { display:flex; justify-content:center; gap:22px; }
@media(max-width:860px) { .gallery-main { padding-top:108px; } .gallery-heading { display:block; } .gallery-heading>p { margin-top:18px; max-width:none; } .gallery-grid { gap:24px 16px; } }
@media(max-width:600px) {
 .gallery-main { padding:96px var(--gutter) 44px; }
 .gallery-heading { margin:0 0 28px; }
 .gallery-heading h1 { font-size:40px; }
 .gallery-back { margin-bottom:10px; }
 .gallery-heading>p { font-size:16px; }
 .gallery-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px 12px; }
 .gallery-open { height:auto; aspect-ratio:4/5; }
 .gallery-wide .gallery-open { aspect-ratio:1.35; }
 .gallery-shot figcaption { flex-wrap:wrap; gap:0; font-size:15px; line-height:1.5; }
 .photo-credit { font-size:14px; flex-basis:100%; }
 .photo-expand { width:32px; height:32px; right:8px; bottom:8px; }
 .gallery-end { flex-direction:column; align-items:start; margin-top:36px; }
 .photo-viewer { padding:10px 14px 20px; height:100dvh; }
}
@media(prefers-reduced-motion:reduce) { .gallery-open img { transition:none; } }
