.project-gallery{border-top:1px solid var(--line)}
.gallery-heading{display:grid;grid-template-columns:1fr 3fr;gap:3rem;margin-bottom:2rem}
.gallery-heading h2{margin:0}
.gallery-single{max-width:960px;margin-inline:auto!important}
.gallery-single.gallery-portrait{max-width:520px}
.gallery-details{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1.5rem;margin-top:2.5rem}
.gallery-card{margin:0;min-width:0}
.gallery-card>a{display:block;position:relative;background:#e4e6e1;overflow:hidden}
.gallery-card img{display:block;width:100%;height:auto;object-fit:contain;object-position:center}
.gallery-details img{aspect-ratio:3/4}
.gallery-expand{position:absolute;right:.75rem;bottom:.75rem;display:flex;align-items:center;gap:.65rem;background:var(--ink);color:white;padding:.65rem .8rem;font-size:.875rem;line-height:1.25}
.gallery-expand svg{width:1rem;height:1rem;flex:none}
.gallery-card>a:hover .gallery-expand,.gallery-card>a:focus-visible .gallery-expand{background:var(--orange)}
.gallery-card figcaption{padding-top:1rem}
.gallery-card figcaption>span{font-size:.75rem;letter-spacing:.06em;color:var(--muted)}
.gallery-card h3{font-size:1rem;line-height:1.5;margin:.35rem 0 0}
.gallery-single h3{font-size:1.3rem}
.photo-viewer{width:min(1400px,96vw);max-width:96vw;max-height:96vh;max-height:96dvh;padding:0;border:1px solid #62695f;background:var(--ink);color:white;overflow:auto}
.photo-viewer::backdrop{background:rgba(0,0,0,.88)}
.photo-viewer[open]{display:flex;flex-direction:column}
.photo-viewer-header,.photo-viewer-footer{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.75rem 1rem;flex:none}
.photo-viewer-header h2{font-family:var(--body);font-size:1rem;font-weight:500;text-transform:none;letter-spacing:0;line-height:1.5;margin:0}
.photo-viewer button{display:inline-flex;justify-content:center;align-items:center;gap:.5rem;min-width:44px;min-height:44px;border:1px solid #7c8476;padding:.5rem .85rem;background:transparent;color:white;cursor:pointer}
.photo-viewer button:hover{background:#3b4437}.photo-viewer svg{width:1.1rem;height:1.1rem}
.photo-viewer button[hidden]{display:none}
.photo-viewer-footer{justify-content:center}.photo-viewer-count{flex:1}
/* The viewer's <picture> (WebP sized for the device, EVE2-WEB-14, 2026-09-23) adds no box: the image lays out as before. */
.photo-viewer picture{display:contents}
.photo-viewer-image{display:block;width:100%;min-height:0;height:calc(96vh - 150px);height:calc(96dvh - 150px);object-fit:contain;object-position:center;background:#151815}
.photo-viewer-count{font-size:.875rem;color:#d7dbd4;text-align:center}
body.photo-viewer-open{overflow:hidden}
@media(max-width:1100px){.gallery-details{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:900px){.gallery-heading{grid-template-columns:1fr;gap:1.5rem}.gallery-details{gap:1.25rem}}
@media(max-width:600px){.gallery-details{grid-template-columns:repeat(2,minmax(0,1fr));gap:1.75rem 1rem;margin-top:2rem}.gallery-expand{right:.5rem;bottom:.5rem;padding:.55rem .65rem}.gallery-details .gallery-expand{font-size:.8125rem;gap:.4rem}.gallery-card figcaption>span{font-size:.75rem;letter-spacing:0}.photo-viewer{width:100vw;max-width:100vw;max-height:100vh;max-height:100dvh}.photo-viewer-header,.photo-viewer-footer{padding:.5rem .75rem;gap:.5rem}.photo-viewer-image{height:calc(100vh - 148px);height:calc(100dvh - 148px)}.photo-viewer-header h2{max-width:65%}}
