.project-gallery{margin:5.5rem 0 2rem;border-top:1px solid #b9a16c66;padding-top:2rem}
.gallery-heading{display:flex;justify-content:space-between;align-items:end;gap:2rem;margin-bottom:2.8rem}
.gallery-heading .eyebrow{font-size:.625rem;color:#8e7950}
.gallery-heading h2{font-family:var(--serif);font-size:clamp(2.9rem,4.5vw,4.8rem);font-weight:400;line-height:1.06;margin-top:.7rem;letter-spacing:-.025em}
.gallery-heading button{flex-shrink:0;color:#625844;gap:1.5rem;font-size:.75rem;cursor:pointer}
.gallery-grid{display:grid;grid-template-columns:1fr 1fr;gap:4rem 4.5vw;align-items:start}
.gallery-grid figure{margin:0;min-width:0}.gallery-grid figure:nth-child(3n+1){grid-column:1/-1}
.gallery-grid figure:nth-child(3n){margin-top:5rem}
.gallery-open{display:block;position:relative;width:100%;background:#e6e0d5;padding:0;overflow:hidden;cursor:zoom-in;text-align:left}
.gallery-open img{display:block;width:100%;height:auto;aspect-ratio:4/5;object-fit:cover;transition:transform 1.1s cubic-bezier(.2,.65,.25,1)}
.gallery-grid figure:nth-child(3n+1) img{aspect-ratio:16/10;object-position:center}
.gallery-grid figure:nth-child(3n+1).portrait img{aspect-ratio:4/3;object-fit:contain;background:#e9e3d9}
.gallery-grid .landscape:not(:nth-child(3n+1)) img{aspect-ratio:5/4}
.gallery-open:hover img{transform:scale(1.025)}
.gallery-expand{position:absolute;bottom:1rem;right:1rem;display:grid;place-items:center;width:44px;height:44px;border:1px solid #f6efe6aa;color:#fff;background:#14141088;backdrop-filter:blur(8px);border-radius:50%;font-size:1.3rem;transition:background .3s}
.gallery-open:hover .gallery-expand{background:#f3efe6;color:#29261d}
.gallery-grid figcaption{display:flex;gap:1rem;font-size:.8125rem;color:#686459;line-height:1.7;margin-top:1rem}
.gallery-grid figcaption small{color:#9a8152;letter-spacing:.1em;font-size:.6875rem;flex-shrink:0;line-height:2}
.gallery-index{display:inline-block;margin-left:.6rem;font-style:normal;font-size:.625rem;color:#95825b;letter-spacing:.06em}
.project-viewer{position:fixed;inset:0;width:100vw;height:100dvh;max-width:none;max-height:none;margin:0;border:0;background:#0b0c0a;color:#f3efe6;padding:1.5rem 3vw;z-index:300;overflow:hidden}
.project-viewer::backdrop{background:#070806f5}.project-viewer[open]{display:grid;grid-template-rows:auto minmax(0,1fr) auto auto;gap:1rem}
.viewer-top{display:flex;justify-content:space-between;align-items:center;gap:2rem;min-height:45px}.viewer-title{display:flex;align-items:baseline;gap:2rem}.viewer-title .eyebrow{font-size:.625rem}.viewer-title h2{font-family:var(--serif);font-weight:400;font-size:1.9rem;line-height:1.1}
.viewer-close{width:44px;height:44px;border:1px solid #b9a16c66;border-radius:50%;font-size:1.5rem;color:#e3d5b6}
.viewer-stage{min-height:0;position:relative;display:flex;align-items:center;justify-content:center;padding:0 65px;touch-action:pan-y pinch-zoom}
.viewer-image{display:block;max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain}
.viewer-arrow{position:absolute;top:50%;transform:translateY(-50%);width:44px;height:44px;border:1px solid #b9a16c66;border-radius:50%;color:#e3d5b6;font-size:1.2rem;background:#0b0c0a88}
.viewer-arrow.prev{left:0}.viewer-arrow.next{right:0}.viewer-arrow:hover,.viewer-close:hover{background:#d0b579;color:#121310}
.viewer-caption{display:flex;align-items:center;justify-content:space-between;gap:2rem;max-width:1100px;width:100%;margin:auto;font-size:.8125rem;color:#c1beb2;min-height:2rem}
#viewerCount{font-size:.6875rem;color:#c2a978;letter-spacing:.1em;white-space:nowrap}
.viewer-thumbnails{position:relative;display:flex;gap:.55rem;overflow-x:auto;max-width:100%;width:fit-content;margin:auto;padding:.35rem 0;scrollbar-width:thin;scrollbar-color:#8c7850 #11120f}
.viewer-thumbnails button{width:64px;height:47px;flex-shrink:0;opacity:.4;border:1px solid transparent;padding:2px;background:transparent}
.viewer-thumbnails button[aria-current=true]{opacity:1;border-color:#c4aa73}.viewer-thumbnails img{width:100%;height:100%;object-fit:cover}.viewer-thumbnails button:hover{opacity:.9}
body.gallery-opened{overflow:hidden}.project-viewer button:focus-visible,.gallery-open:focus-visible{outline:2px solid #c4aa73;outline-offset:4px}
@media(max-width:650px){.project-gallery{margin-top:3.5rem;padding-top:1.8rem}.gallery-heading{display:block;margin-bottom:2rem}.gallery-heading h2{font-size:3rem}.gallery-heading button{margin-top:1rem;font-size:.6875rem}.gallery-grid{gap:2.5rem 1.3rem;display:block}.gallery-grid figure,.gallery-grid figure:nth-child(3n){margin:0 0 2.5rem}.gallery-grid figure:nth-child(even){width:88%;margin-left:auto}.gallery-grid figure:nth-child(3n){width:93%}.gallery-open img{aspect-ratio:auto!important;max-height:none}.gallery-grid .portrait img{aspect-ratio:4/5!important;object-fit:cover!important}.gallery-grid figcaption{font-size:.75rem;margin-top:.8rem;gap:.65rem}.gallery-expand{width:38px;height:38px;bottom:.8rem;right:.8rem}.project-viewer{padding:1rem 1rem max(1rem,env(safe-area-inset-bottom));gap:.75rem}.viewer-title{display:block}.viewer-title .eyebrow{font-size:.5625rem;margin-bottom:.35rem}.viewer-title h2{font-size:1.5rem}.viewer-stage{padding:0}.viewer-arrow{top:auto;bottom:.4rem;transform:none;width:42px;height:42px;background:#0b0c0acc}.viewer-arrow.prev{left:.4rem}.viewer-arrow.next{right:.4rem}.viewer-caption{font-size:.75rem;gap:1rem;line-height:1.6;min-height:3rem}.viewer-thumbnails button{width:54px;height:42px}.viewer-thumbnails{gap:.4rem}.viewer-close{width:40px;height:40px}}
@media(prefers-reduced-motion:reduce){.gallery-open img{transition:none}.gallery-open:hover img{transform:none}}
.no-motion .gallery-open:hover img{transform:none}

.rgrid .res figcaption{position:relative;padding-bottom:1.2rem}.rgrid .gallery-index{position:absolute;right:0;bottom:-.2rem;margin:0}

.project-viewer[data-single=true] .viewer-arrow,.project-viewer[data-single=true] .viewer-thumbnails{display:none}.project-viewer[data-single=true][open]{grid-template-rows:auto minmax(0,1fr) auto}

/* Native-size presentation for photographs awaiting a larger original. */
.frame.intrinsic-photo,.gallery-open.intrinsic-photo{display:flex;align-items:center;justify-content:center;background:#e8e3d9}
.frame.intrinsic-photo img,.gallery-open.intrinsic-photo img{width:auto;height:auto;max-width:min(100%,var(--photo-width));max-height:var(--photo-height);object-fit:contain;aspect-ratio:auto!important;transform:none!important}
.gallery-grid .source-limited-figure{grid-column:1/-1;margin-top:0}
.source-limited-figure .gallery-open{padding:2.5rem;min-height:340px}
.source-limited-figure figcaption{justify-content:center}
.ihero.source-limited{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);align-items:center;gap:5vw;height:auto;min-height:740px;padding:10rem var(--gutter) 5rem;background:#10110e}
.ihero.source-limited .frame{position:relative;inset:auto;grid-column:2;grid-row:1;background:transparent;overflow:visible;min-width:0}
.ihero.source-limited .veil{display:none}
.ihero.source-limited .inner{position:relative;inset:auto;padding:0;grid-column:1;grid-row:1;display:block;min-width:0}
.ihero.source-limited h1{font-size:clamp(3rem,6vw,6.5rem);max-width:10ch}
.ihero.source-limited .side{text-align:left;margin-top:2.5rem;padding-top:1.5rem;border-top:1px solid #b9a16c55;max-width:22rem}
@media(max-width:650px){.ihero.source-limited{display:flex;flex-direction:column-reverse;align-items:stretch;gap:2.5rem;min-height:0;padding:8rem var(--gutter) 3.5rem}.ihero.source-limited .frame{width:100%}.ihero.source-limited h1{font-size:3.4rem;max-width:12ch}.ihero.source-limited .side{margin-top:1.5rem;padding-top:1rem}.source-limited-figure .gallery-open{padding:1.5rem;min-height:260px}.gallery-grid figure.source-limited-figure{width:100%;margin-left:0}}
