/* Reference-style project media only; all other page rules remain unchanged. */
.project-gallery{position:relative;isolation:isolate}
.gallery-heading{display:flex;justify-content:space-between;align-items:center;gap:25px;margin-bottom:50px}
.gallery-heading h2{margin:0}.gallery-photo-label{display:inline-flex;align-items:center;gap:10px;background:var(--wine);color:white;border-radius:30px;padding:12px 28px;font-size:14px}
.gallery-window{position:relative;width:calc(100% + 60px);margin-left:-30px;overflow:hidden;touch-action:pan-y pinch-zoom;cursor:grab;outline-offset:-4px}
.gallery-window.is-dragging{cursor:grabbing}.gallery-window:focus-visible{outline:2px solid var(--red)}
.gallery-track{display:flex;gap:30px;will-change:transform;transition:transform .5s ease}
.gallery-slide{flex:0 0 min(850px,calc(100vw - 100px));aspect-ratio:85/62;padding:0;border:0;border-radius:30px;overflow:hidden;background:var(--ivory);opacity:.2;transition:opacity .2s linear;cursor:inherit;user-select:none;-webkit-user-select:none;position:relative}
.gallery-slide.is-active{opacity:1}.gallery-slide img{width:100%;height:100%;object-fit:cover;display:block;pointer-events:none}.gallery-slide img.is-portrait{object-fit:contain}
.gallery-viewer{position:fixed;inset:0;width:100vw;height:100dvh;max-width:none;max-height:none;margin:0;padding:50px 70px;background:#000d;color:white;border:0;overflow:hidden;z-index:1000}
.gallery-viewer::backdrop{background:#000a}.gallery-viewer[open]{display:grid;grid-template-rows:1fr auto;gap:15px;align-items:center}
.gallery-viewer-image{display:block;width:100%;height:100%;min-height:0;object-fit:contain;user-select:none}.gallery-viewer-caption{font:13px/1.5 "Open Sans",sans-serif;text-align:center;padding:0 35px}
.gallery-viewer button{position:absolute;border:0;background:transparent;color:white;cursor:pointer;min-width:44px;min-height:44px;font-size:30px;line-height:1;border-radius:50%}.gallery-viewer button:hover{background:#ffffff20}.gallery-viewer-close{top:8px;right:14px}.gallery-viewer-prev{top:calc(50% - 22px);left:12px}.gallery-viewer-next{top:calc(50% - 22px);right:12px}.gallery-viewer-count{position:absolute;top:20px;left:20px;font-size:13px}
@media(max-width:850px){.gallery-window{width:calc(100% + 40px);margin-left:-20px}}
@media(max-width:600px){.gallery-heading{margin-bottom:35px}.gallery-photo-label{padding:10px 20px;font-size:12px}.gallery-track{gap:15px}.gallery-slide{flex-basis:calc(100vw - 70px);border-radius:25px}.gallery-viewer{padding:60px 40px 35px}.gallery-viewer-prev{left:0}.gallery-viewer-next{right:0}.gallery-viewer-caption{padding:0;font-size:12px}}
@media(prefers-reduced-motion:reduce){.gallery-track,.gallery-slide{transition:none!important}}
