/* Gallery-only presentation; homepage showcase remains unchanged. */
#work-gallery{width:min(1200px,calc(100% - 48px));max-height:calc(100dvh - 48px);background:var(--pale);border:1px solid var(--line);border-radius:12px;padding:0}
#work-gallery .gallery-header{position:sticky;top:0;z-index:5;display:flex;align-items:center;justify-content:space-between;gap:24px;padding:24px 30px;background:var(--pale);border-bottom:1px solid var(--line)}
#work-gallery .gallery-header h2{font:500 32px/1.15 var(--serif);letter-spacing:-.7px;margin:0 0 6px}
#work-gallery .gallery-header p{font-size:15px;line-height:1.4;margin:0}
#work-gallery .work-gallery-close{position:static;flex-shrink:0;min-height:44px;padding:10px 15px;margin:0;border:1px solid var(--line);border-radius:5px;font-size:15px}
#work-gallery .work-gallery-close span{font-size:21px}
#work-gallery .work-gallery-content{padding:28px 30px 32px;background:transparent}
#work-gallery .results-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:28px}
#work-gallery .result-project{max-width:none;background:var(--white);border:1px solid var(--line);border-radius:8px;padding:18px;min-width:0}
#work-gallery h3{font-family:inherit;font-size:21px;line-height:1.3;font-weight:500;letter-spacing:-.4px;margin:0 0 16px}
#work-gallery .result-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
#work-gallery figure{margin:0;min-width:0}
#work-gallery .result-media{position:relative;display:block;aspect-ratio:1/1;width:100%;background:#e7eee0;border-radius:5px;overflow:hidden}
#work-gallery .result-media img,#work-gallery .result-media video{display:block;width:100%;height:100%;object-fit:cover;object-position:center}
#work-gallery .gallery-photo{display:block;width:100%;height:100%;padding:0;border:0;border-radius:5px;cursor:zoom-in}
#work-gallery .gallery-photo:focus-visible{outline:3px solid var(--ink);outline-offset:-4px}
#work-gallery figcaption{display:flex;justify-content:space-between;align-items:baseline;gap:8px;margin:10px 0 0;font-size:15px;line-height:1.4;font-weight:500;color:var(--ink)}
#work-gallery .result-format{font-size:13px;white-space:nowrap;color:var(--text)}
#work-gallery .gallery-more{margin-top:30px;padding-top:26px;border-top:1px solid var(--line)}
#work-gallery .gallery-extra-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
#work-gallery video:fullscreen{object-fit:contain;background:#000}
#work-photo-viewer{width:min(1200px,calc(100% - 40px));max-width:none;max-height:calc(100dvh - 40px);padding:0;border-radius:10px;background:var(--pale);overflow:auto;overscroll-behavior:contain}
#work-photo-viewer::backdrop{background:rgba(7,26,19,.92)}
#work-photo-viewer .photo-viewer-header{position:sticky;top:0;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:18px 24px;background:var(--pale);z-index:1}
#work-photo-viewer h2{font-family:inherit;font-size:20px;line-height:1.3;letter-spacing:-.3px;margin:0}
#work-photo-viewer .photo-viewer-close{flex-shrink:0;min-height:44px;border:1px solid var(--line);border-radius:5px;padding:8px 12px;font-size:15px}
#work-photo-viewer .photo-viewer-close span{margin-left:10px;font-size:20px}
#work-photo-viewer #work-full-photo{width:100%;height:calc(100dvh - 140px);min-height:180px;object-fit:contain;background:#e7eee0}
@media(max-width:850px){#work-gallery .results-grid{grid-template-columns:1fr;gap:22px}#work-gallery .gallery-extra-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:580px){#work-gallery{width:calc(100% - 20px);max-height:calc(100dvh - 20px);border-radius:9px}#work-gallery .gallery-header{padding:18px 16px;gap:12px}#work-gallery .gallery-header h2{font-size:28px}#work-gallery .gallery-header p{font-size:14px;max-width:185px}#work-gallery .work-gallery-content{padding:18px 14px 24px}#work-gallery .result-project{padding:12px}#work-gallery .result-pair{gap:10px}#work-gallery h3{font-size:20px;margin-bottom:12px}#work-gallery .gallery-extra-grid{gap:16px 12px}#work-gallery figcaption{font-size:14px;gap:4px}#work-gallery .result-format{font-size:12px}#work-photo-viewer{width:calc(100% - 16px);max-height:calc(100dvh - 16px)}#work-photo-viewer .photo-viewer-header{padding:12px;gap:10px}#work-photo-viewer h2{font-size:17px}#work-photo-viewer .photo-viewer-close{font-size:13px;padding-inline:8px}#work-photo-viewer #work-full-photo{height:calc(100dvh - 120px)}}

/* Video tiles open the shared media viewer; controls remain on the enlarged video. */
#work-gallery .gallery-video{position:relative;display:block;width:100%;height:100%;padding:0;border:0;border-radius:5px;cursor:pointer}
#work-gallery .gallery-video:focus-visible{outline:3px solid var(--ink);outline-offset:-4px}
#work-gallery .gallery-play{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:flex;align-items:center;justify-content:center;gap:8px;white-space:nowrap;padding:10px 13px;border-radius:5px;background:var(--ink);color:var(--white);font-size:14px;line-height:1.4}
#work-gallery .gallery-play svg{width:18px;height:18px;fill:currentColor;stroke:none;flex-shrink:0}
#work-photo-viewer #work-full-video{display:block;width:100%;height:calc(100dvh - 140px);min-height:180px;object-fit:contain;background:#071a13}
#work-photo-viewer #work-full-video[hidden]{display:none}
@media(max-width:580px){#work-gallery .gallery-play{padding:8px 9px;font-size:13px;gap:5px}#work-photo-viewer #work-full-video{height:calc(100dvh - 120px)}}

#work-gallery figcaption{min-height:32px;align-items:center}
#work-gallery .gallery-caption-play{flex-shrink:0;min-height:32px;padding:3px 0 3px 6px;border:0;background:transparent;font:inherit;font-size:14px;line-height:1.4;text-decoration:underline;text-underline-offset:3px;white-space:nowrap}
@media(max-width:580px){#work-gallery .gallery-caption-play{font-size:13px;padding-left:3px}}
