.gallery-body { background: #111216; }
.gallery-hero { display: grid; min-height: 790px; grid-template-columns: 1.15fr .85fr; align-items: center; gap: clamp(50px,8vw,120px); padding-top: 135px; padding-bottom: 90px; }
.gallery-hero h1 { margin: 18px 0 30px; font-size: clamp(4.2rem,7.5vw,8rem); line-height: .86; letter-spacing: -.08em; }
.gallery-hero h1 em { color: var(--coral); font-style: normal; }
.gallery-hero-copy > p:last-child { max-width: 710px; color: var(--muted); font-size: clamp(1rem,1.4vw,1.22rem); }
.gallery-proof-key { display: grid; gap: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 30px; background: #18191f; box-shadow: 0 35px 80px rgba(0,0,0,.28); }
.gallery-proof-key div { display: flex; align-items: baseline; justify-content: space-between; padding: 28px 32px; border-bottom: 1px solid var(--line); }
.gallery-proof-key strong { color: var(--paper); font-size: clamp(3.5rem,5vw,5.4rem); line-height: 1; letter-spacing: -.07em; }
.gallery-proof-key span { color: var(--muted); font-family: var(--mono); font-size: .65rem; text-transform: uppercase; }
.gallery-proof-key small { padding: 24px 32px; color: var(--mint); font-family: var(--mono); font-size: .62rem; letter-spacing: .06em; }

.gallery-method { padding-block: 105px; color: var(--ink); background: var(--paper); }
.gallery-method-grid { display: grid; grid-template-columns: 180px 1fr 1fr; gap: 45px; align-items: start; }
.gallery-method h2 { margin: 0; font-size: clamp(3rem,5vw,5.3rem); line-height: .9; letter-spacing: -.07em; }
.gallery-method-grid > p:last-child { margin: 10px 0 0; color: rgba(25,26,32,.66); font-size: 1.02rem; }

.gallery-studies { padding-block: 135px 20px; }
.gallery-studies .gallery-browser-head > p { max-width: 520px; justify-self: end; margin: 0 0 5px; color: var(--muted); }
.study-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; margin-top: 50px; }
.study-card { position: relative; display: flex; min-height: 410px; flex-direction: column; justify-content: end; padding: 36px; overflow: hidden; border: 1px solid var(--line); border-radius: 28px; background: #1a1b22; text-decoration: none; transition: transform .25s,border-color .25s; }
.study-card::before { position: absolute; top: -130px; right: -90px; width: 360px; height: 360px; border: 80px solid rgba(255,255,255,.08); border-radius: 42%; content: ""; transform: rotate(18deg); }
.study-card:hover,.study-card:focus-visible { border-color: var(--coral); transform: translateY(-4px); outline: 0; }
.study-card > * { position: relative; }
.study-card span,.study-card b { font-family: var(--mono); font-size: .64rem; letter-spacing: .05em; text-transform: uppercase; }
.study-card span { color: var(--coral); }.study-card strong { margin: 15px 0 12px; font-size: clamp(3rem,5vw,5.2rem); line-height: .88; letter-spacing: -.07em; }.study-card p { max-width: 560px; margin: 0 0 25px; color: var(--muted); }.study-card b { color: var(--paper); }
.study-signals { background: #24202a; }.study-emoji { background: #17252a; }

.gallery-browser { padding-block: 135px; }
.gallery-browser-head { display: grid; grid-template-columns: 1fr .5fr; align-items: end; gap: 60px; }
.gallery-browser-head h2 { margin: 10px 0 0; font-size: clamp(3.4rem,6vw,6.4rem); line-height: .88; letter-spacing: -.075em; }
.gallery-browser-head h2 span { color: rgba(255,244,232,.28); }
#gallery-status { color: var(--muted); font-family: var(--mono); font-size: .7rem; text-align: right; text-transform: uppercase; }
.gallery-controls { position: sticky; z-index: 20; top: 92px; display: grid; grid-template-columns: 290px 1fr; gap: 16px; margin: 55px 0 30px; padding: 12px; border: 1px solid var(--line); border-radius: 17px; background: rgba(25,26,32,.9); backdrop-filter: blur(16px); }
.gallery-controls label { display: grid; gap: 5px; }
.gallery-controls label span { padding-left: 4px; color: var(--muted); font-family: var(--mono); font-size: .58rem; text-transform: uppercase; }
.gallery-controls input { width: 100%; min-height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--paper); background: #111216; outline: 0; }
.gallery-controls input:focus { border-color: var(--coral); }
.filter-scroll { display: flex; align-items: center; gap: 7px; overflow-x: auto; scrollbar-width: thin; }
.filter-scroll button { flex: 0 0 auto; padding: 9px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: transparent; font-family: var(--mono); font-size: .63rem; cursor: pointer; }
.filter-scroll button[aria-pressed="true"] { color: var(--ink); border-color: var(--paper); background: var(--paper); }

.gallery-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; }
.gallery-card { min-width: 0; }
.gallery-open { position: relative; display: flex; width: 100%; min-height: 430px; flex-direction: column; align-items: stretch; padding: 20px; border: 1px solid var(--line); border-radius: 22px; color: var(--paper); background: #191a20; text-align: left; cursor: pointer; transition: border-color .2s,transform .2s,background .2s; }
.gallery-open:hover,.gallery-open:focus-visible { border-color: rgba(255,90,79,.7); background: #1d1e25; transform: translateY(-3px); outline: 0; }
.gallery-number { position: absolute; top: 16px; left: 16px; color: rgba(255,244,232,.35); font-family: var(--mono); font-size: .59rem; }
.gallery-art { display: grid; min-height: 170px; place-items: center; margin-bottom: 20px; border-radius: 15px; background: var(--paper); }
.gallery-art img { width: 112px; height: 112px; object-fit: contain; }
.gallery-native { position: absolute; top: 147px; right: 28px; display: flex; align-items: center; gap: 7px; color: rgba(255,244,232,.48); font-family: var(--mono); font-size: .55rem; }
.gallery-native img { width: 16px; height: 16px; max-width: none; object-fit: none; background: #fff; }
.gallery-coordinate { color: var(--coral); font-family: var(--mono); font-size: .58rem; letter-spacing: .04em; text-transform: uppercase; }
.gallery-open strong { margin: 9px 0 6px; font-size: 1.55rem; line-height: 1; letter-spacing: -.04em; }
.gallery-job { color: var(--muted); font-size: .76rem; }
.gallery-device { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line); color: rgba(255,244,232,.58); font-family: var(--mono); font-size: .59rem; }
.gallery-error,.gallery-noscript { grid-column: 1 / -1; padding: 30px; border: 1px solid var(--line); color: var(--muted); }

.case-dialog { width: min(1050px,calc(100% - 30px)); max-height: calc(100vh - 30px); padding: 0; overflow: auto; border: 1px solid rgba(255,244,232,.2); border-radius: 28px; color: var(--paper); background: #18191f; box-shadow: 0 30px 120px rgba(0,0,0,.65); }
.case-dialog::backdrop { background: rgba(8,9,12,.82); backdrop-filter: blur(8px); }
.case-dialog > form { position: sticky; z-index: 2; top: 0; height: 0; text-align: right; }
.dialog-close { margin: 18px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--paper); background: #22232b; cursor: pointer; }
.case-detail { display: grid; grid-template-columns: .95fr 1.05fr; min-height: 690px; }
.case-detail-art { display: grid; grid-template-columns: 1fr 1fr; align-content: center; justify-items: center; gap: 20px; padding: 55px; color: var(--ink); background: var(--paper); }
.case-detail-art > p { grid-column: 1 / -1; color: #0c6d65; font-family: var(--mono); font-size: .62rem; text-transform: uppercase; }
.case-vector { grid-column: 1 / -1; width: 256px; height: 256px; object-fit: contain; }
.case-pixel-proof { display: grid; justify-items: center; gap: 16px; }
.case-pixel-proof span,.case-detail-art figcaption { color: rgba(25,26,32,.62); font-family: var(--mono); font-size: .58rem; }
.case-pixel-proof img { width: 16px; height: 16px; max-width: none; object-fit: none; background: #fff; }
.case-detail-art figure { margin: 0; text-align: center; }.case-detail-art figure img { width: 128px; height: 128px; }.case-detail-art figcaption { margin-top: 8px; }
.case-detail-copy { display: flex; flex-direction: column; justify-content: center; padding: 60px; }
.case-detail-copy h2 { margin: 0; font-size: clamp(3.4rem,6vw,6.4rem); line-height: .86; letter-spacing: -.07em; }
.case-detail-job { margin: 28px 0; color: var(--muted); font-size: 1rem; }
.case-detail-copy dl { margin: 0; border-top: 1px solid var(--line); }
.case-detail-copy dl div { display: grid; grid-template-columns: 90px 1fr; gap: 15px; padding-block: 11px; border-bottom: 1px solid var(--line); }
.case-detail-copy dt { color: var(--coral); font-family: var(--mono); font-size: .6rem; text-transform: uppercase; }.case-detail-copy dd { margin: 0; color: rgba(255,244,232,.72); font-size: .78rem; }
.case-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }.case-links a { padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; font-family: var(--mono); font-size: .62rem; text-decoration: none; }.case-links a:hover { border-color: var(--coral); }

@media (max-width: 1050px) { .gallery-hero { grid-template-columns: 1fr; }.gallery-proof-key { grid-template-columns: repeat(4,1fr); }.gallery-proof-key div { align-items: flex-start; flex-direction: column; }.gallery-proof-key small { grid-column: 1 / -1; }.gallery-grid { grid-template-columns: repeat(3,1fr); } }
@media (max-width: 760px) { .gallery-hero { min-height: auto; padding-top: 135px; }.gallery-hero h1 { font-size: clamp(3.8rem,16vw,6.3rem); }.gallery-proof-key { grid-template-columns: 1fr; }.gallery-proof-key small { grid-column: auto; }.gallery-method-grid,.gallery-browser-head { grid-template-columns: 1fr; }.gallery-method-grid { gap: 24px; }.gallery-browser-head { gap: 20px; }.gallery-browser-head #gallery-status { text-align: left; }.gallery-studies .gallery-browser-head > p { justify-self: start; }.study-grid { grid-template-columns: 1fr; }.study-card { min-height: 350px; padding: 28px; }.gallery-controls { position: static; grid-template-columns: 1fr; }.gallery-grid { grid-template-columns: repeat(2,1fr); }.gallery-open { min-height: 390px; padding: 15px; }.gallery-art img { width: 96px; height: 96px; }.gallery-native { top: 144px; right: 20px; }.case-detail { grid-template-columns: 1fr; }.case-detail-art { padding: 42px 24px; }.case-detail-copy { padding: 45px 24px; } }
@media (max-width: 470px) { .gallery-grid { grid-template-columns: 1fr; }.gallery-open { min-height: 370px; }.gallery-art { min-height: 150px; }.gallery-native { top: 125px; }.case-detail-art { grid-template-columns: 1fr; }.case-vector,.case-detail-art > p { grid-column: auto; }.case-detail-copy h2 { font-size: 3.5rem; } }
@media (prefers-reduced-motion: reduce) { .gallery-open { transition: none; } }
