/* Luna Portmann — portfolio concept
   Palette and type follow the artist's own PDF portfolio:
   off-white paper, near-black ink, Avenir Light, the hand-drawn logotype. */

:root {
  --paper: #f1f0ee;
  --paper-2: #e7e6e3;
  --ink: #17181b;
  --mute: #5e5e62;
  --line: rgba(23, 24, 27, .16);
  --pad: clamp(18px, 4.2vw, 64px);
  --rail: clamp(0px, 3vw, 44px);
  --gap: clamp(10px, 1.6vw, 24px);
  --head: 56px;
  --font: "Avenir Next", Avenir, "Jost", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: var(--head); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 300;
  font-size: clamp(16px, 1.14vw, 19px);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-loading { overflow: hidden; height: 100vh; }

/* paper grain (generated support texture) */
body::after {
  content: "";
  position: fixed; inset: 0; z-index: 90;
  background: url(../assets/tex/paper.jpg) 0 0 / 384px;
  mix-blend-mode: multiply;
  opacity: .28;
  filter: grayscale(1) contrast(1.6) brightness(1.08);
  pointer-events: none;
}

img, video { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }
figure { margin: 0; }
h1, h2, h3, p { margin: 0; font-weight: 300; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 1px solid var(--ink); outline-offset: 4px; }
img[data-z] { cursor: zoom-in; }
/* scans from the printed portfolio carry its page colour: let it merge with the site paper */
img.blend, .dev-wall img { mix-blend-mode: multiply; filter: brightness(1.06); }   /* page colour → white, which multiplies away */

.logotype {
  display: block;
  aspect-ratio: 1892 / 778;
  background: currentColor;
  -webkit-mask: url(../assets/img/logotype.png) center / contain no-repeat;
          mask: url(../assets/img/logotype.png) center / contain no-repeat;
}
.pill { display: inline-block; padding: 9px 20px; border: 1px solid var(--ink); border-radius: 99px; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; transition: background .3s, color .3s; white-space: nowrap; }
.pill:hover { background: var(--ink); color: var(--paper); }

/* The six Bound photographs were exposed differently. These factors only even out the
   brightness on screen so the sequence does not flicker; the image files are untouched.
   Remove this block once evenly exposed exports are available. */
.frames img:nth-child(1) { filter: brightness(.86); }
.frames img:nth-child(2) { filter: brightness(.977); }
.frames img:nth-child(3) { filter: brightness(1.02); }
.frames img:nth-child(4) { filter: brightness(.995); }
.frames img:nth-child(5) { filter: brightness(1.03); }
.frames img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; will-change: opacity; }
.frames img:first-child { opacity: 1; }

/* ───────── Loader ───────── */
#loader {
  position: fixed; inset: 0; z-index: 100;
  background: #c4c4c7; overflow: hidden;
  display: grid; place-items: center;
  transition: opacity 1.1s var(--ease), visibility 0s 1.1s;
}
#loader.done { opacity: 0; visibility: hidden; }
.loader-bg, .bound-bg { display: none; }
.loader-stage {
  position: relative;
  height: min(88vh, 132vw); height: min(88svh, 132vw);
  aspect-ratio: 2 / 3;
  -webkit-mask: linear-gradient(90deg, transparent, #000 16%, #000 84%, transparent), linear-gradient(transparent, #000 5%, #000 96%, transparent);
  -webkit-mask-composite: source-in;
          mask: linear-gradient(90deg, transparent, #000 16%, #000 84%, transparent), linear-gradient(transparent, #000 5%, #000 96%, transparent);
          mask-composite: intersect;
}
.loader-meta {
  position: absolute; left: var(--pad); right: var(--pad); bottom: calc(var(--pad) * .8);
  display: flex; justify-content: space-between;
  font-size: 13px; letter-spacing: .14em; text-transform: uppercase;
}
.loader-count b { font-weight: 300; font-variant-numeric: tabular-nums; }

/* ───────── Header ───────── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: var(--head);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 var(--pad);
  transition: background .4s, box-shadow .4s;
}
body.scrolled .site-header { background: var(--paper); box-shadow: 0 1px 0 var(--line); }
.brand, .site-header nav { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }
.brand { opacity: 0; pointer-events: none; transition: opacity .5s; }
body.scrolled .brand { opacity: 1; pointer-events: auto; }
.site-header nav { display: flex; gap: clamp(14px, 2.2vw, 34px); margin-left: auto; }
.site-header nav a, .sound { position: relative; padding: 6px 0; }
.site-header nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease);
}
.site-header nav a:hover::after { transform: scaleX(1); }
.sound { letter-spacing: .14em; text-transform: uppercase; }

/* the thread that runs the length of the page */
.thread-rail {
  position: fixed; z-index: 40; top: var(--head); bottom: 0; left: calc(var(--pad) * .42);
  width: 1px; background: var(--line);
}
#thread-bead { position: absolute; left: -3px; top: 0; width: 7px; height: 46px; background: var(--ink); border-radius: 50%; }

/* ───────── Hero ───────── */
.hero { height: 240vh; position: relative; }
.hero-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.hero-backdrop, #spools, .hero-fallback { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-backdrop { object-fit: cover; opacity: .55; }
.hero-fallback { object-fit: contain; object-position: 80% 60%; }
.hero-title { position: absolute; left: var(--pad); top: clamp(76px, 13vh, 150px); width: min(44vw, 620px); }
.hero-sub {
  position: absolute; left: var(--pad); top: calc(clamp(76px, 13vh, 150px) + min(44vw, 620px) * .411 + 26px);
  width: min(44vw, 620px);
  display: flex; justify-content: space-between;
  font-size: clamp(15px, 1.3vw, 21px);
}
.hero-lines {
  position: absolute; left: var(--pad); bottom: clamp(64px, 12vh, 120px);
  width: min(30em, 40vw);
  font-size: clamp(18px, 1.75vw, 28px); line-height: 1.22;
}
/* one line leaves completely before the next arrives */
.hero-lines p { position: absolute; left: 0; bottom: 0; opacity: 0; transform: translateY(10px); transition: opacity .35s, transform .35s; }
.hero-lines p.on { opacity: 1; transform: none; transition: opacity .7s var(--ease) .4s, transform .7s var(--ease) .4s; }
.hero-hint {
  position: absolute; left: var(--pad); bottom: 24px;
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--mute);
  display: flex; align-items: center; gap: 12px;
}
.hero-hint i { width: 44px; height: 1px; background: currentColor; transform-origin: left; animation: pull 2.4s var(--ease) infinite; }
@keyframes pull { 0% { transform: scaleX(0); } 60%, 100% { transform: scaleX(1); } }

/* ───────── Projects: shared ───────── */
.project, .about { padding: clamp(80px, 11vw, 170px) var(--pad) 0 calc(var(--pad) + var(--rail)); }

.project-head {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline; column-gap: 24px;
  padding-bottom: 18px; margin-bottom: clamp(28px, 4vw, 60px);
  border-bottom: 1px solid var(--line);
}
.project-head h2 { font-size: clamp(34px, 6vw, 98px); line-height: 1; letter-spacing: -.015em; }
.project-head .year { font-size: clamp(18px, 2vw, 32px); font-variant-numeric: tabular-nums; }
.project-head .medium { grid-column: 1 / -1; margin-top: 12px; color: var(--mute); }
.project-head.small { border-bottom: 0; border-top: 1px solid var(--line); padding: 14px 0 0; margin: 16px 0 0; }
.project-head.small h2 { font-size: clamp(24px, 2.6vw, 40px); }
.project-head.small .medium { margin-top: 6px; }

.placeholder, .placeholder-block { color: var(--mute); font-style: italic; }
.placeholder-block { border: 1px dashed var(--line); padding: 18px 20px; max-width: 34em; }

.prose { max-width: 33em; font-size: 1.06em; }
p + p { margin-top: 1em; }

[data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
[data-reveal].in { opacity: 1; transform: none; }

/* image + text side by side; the image never grows taller than the screen */
.split { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(24px, 5vw, 90px); align-items: center; }
.tall img { max-height: calc(100vh - var(--head) - 60px); width: auto; margin: 0 auto; }

/* rows of images: every picture is shown whole, heights aligned per row */
.row { display: grid; gap: var(--gap); margin-top: var(--gap); align-items: center; }
.row.top { align-items: start; }
.row.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.row.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.row.eight { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.row img, .wide img, .bleed img { width: 100%; }
.split + .row, .split + .bleed, .rb-pair + .row { margin-top: clamp(40px, 6vw, 96px); }
.wide { margin-top: clamp(40px, 6vw, 96px); }
/* one photograph edge to edge */
.bleed { margin: clamp(40px, 6vw, 96px) calc(var(--pad) * -1) 0 calc((var(--pad) + var(--rail)) * -1); }

/* Reciprocal Bodies: the two close-ups meet where the thread crosses */
.rb-pair { display: grid; grid-template-columns: 1fr 1fr; margin: clamp(40px, 6vw, 96px) auto 0; max-width: 1100px; overflow: hidden; }
.rb-pair figure { overflow: hidden; aspect-ratio: 2 / 2.948; }   /* each loses 1.72 % so both stay the same height */
.rb-pair img { width: 100%; }
.rb-pair figure:first-child img { transform: translateY(-1.72%); }   /* measured offset of the thread between the two photographs */

/* The Arduino sketch: closed by default, one line that opens into a numbered listing */
.code { margin-top: clamp(40px, 6vw, 96px); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.code-toggle { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px 24px; padding: 20px 0; text-align: left; }
.code-title { font-size: clamp(20px, 2.1vw, 32px); line-height: 1.15; }
.code-meta { color: var(--mute); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }
.code-meta i { font-style: normal; }
.code-toggle:hover .pill { background: var(--ink); color: var(--paper); }
.code-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .8s var(--ease); }
.code.open .code-panel { grid-template-rows: 1fr; }
.code-inner { min-height: 0; overflow: hidden; opacity: 0; transition: opacity .5s; }
.code.open .code-inner { opacity: 1; transition: opacity .8s .25s; }
.code-bar { display: flex; justify-content: space-between; align-items: center; padding: 10px 18px; background: var(--ink); color: var(--paper); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.code-copy { letter-spacing: .14em; text-transform: uppercase; opacity: .75; }
.code-copy:hover { opacity: 1; }
.code pre {
  margin: 0 0 24px; padding: 18px 0; max-height: min(70vh, 720px); overflow: auto;
  background: #1c1d21; color: #d9d8d4;
  font: 400 13px/1.7 var(--mono); tab-size: 2; counter-reset: ln;
}
.code pre .l { display: block; padding: 0 22px 0 0; white-space: pre; }
.code pre .l::before { counter-increment: ln; content: counter(ln); display: inline-block; width: 4.2em; padding-right: 1.4em; text-align: right; color: #6b6c72; user-select: none; }
.code pre .l:hover { background: rgba(255, 255, 255, .05); }
.code pre .c { color: #8b8c92; }                 /* comments */
.code pre .h { color: #f1f0ee; }                 /* section rules, like the thread: a line across */
.code pre .k { color: #9fb4e0; }                 /* keywords and types */
.code pre .n { color: #e3c9a0; }                 /* numbers */
.code pre .s { color: #b9d2b0; }                 /* strings */

/* thread divider (optional generated clip) */
.divider { width: 100%; height: clamp(60px, 9vw, 130px); object-fit: cover; margin-top: clamp(60px, 9vw, 130px); mix-blend-mode: multiply; }
.divider:not([src]), .ambient:not([src]) { display: none; }
/* drawn thread: one line pulled across the page as it scrolls into view (stands in for the clip) */
.thread-line { display: block; width: 100%; height: auto; margin-top: clamp(60px, 9vw, 130px); overflow: visible; }
.thread-line[data-reveal] { opacity: 1; transform: none; }
.thread-line path { fill: none; stroke: var(--ink); stroke-width: 1.2; stroke-linecap: round; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 2.6s cubic-bezier(.45, 0, .15, 1); }
.thread-line.in path { stroke-dashoffset: 0; }
.divider[src] + .thread-line { display: none; }

/* ───────── Bound: a full-bleed stage, scroll inflates ───────── */
.bound { margin-top: clamp(80px, 11vw, 170px); padding-bottom: clamp(40px, 6vw, 90px); }
.bound-sticky {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  padding: calc(var(--head) + 14px) var(--pad) 64px calc(var(--pad) + var(--rail));
  display: flex; flex-direction: column;
  background: #c4c4c7;
}
.bound-track { height: 360vh; }
.bound .project-head { margin-bottom: 0; border-bottom: 0; position: relative; z-index: 2; }
.bound .placeholder { color: var(--ink); opacity: .6; }
.bound-frames {
  position: relative; flex: 1; min-height: 0; margin: 0 auto; aspect-ratio: 2 / 3; max-width: 100%;
  -webkit-mask: linear-gradient(90deg, transparent, #000 16%, #000 84%, transparent), linear-gradient(transparent, #000 5%, #000 96%, transparent);
  -webkit-mask-composite: source-in;
          mask: linear-gradient(90deg, transparent, #000 16%, #000 84%, transparent), linear-gradient(transparent, #000 5%, #000 96%, transparent);
          mask-composite: intersect;
}
.bound-frames img { pointer-events: none; }
.bound-frames img.cur { pointer-events: auto; }
.bound-gauge {
  position: absolute; right: var(--pad); bottom: 24px; left: calc(var(--pad) + var(--rail));
  display: flex; align-items: center; gap: 14px;
  font-size: 13px; letter-spacing: .14em; font-variant-numeric: tabular-nums;
}
.bound-gauge i { flex: 1; height: 1px; background: rgba(23, 24, 27, .25); position: relative; }
.bound-gauge b { position: absolute; inset: 0; background: var(--ink); transform-origin: left; transform: scaleX(0); }
.bound-details { padding: 0 var(--pad) 0 calc(var(--pad) + var(--rail)); margin-top: clamp(40px, 6vw, 90px); max-width: 1300px; margin-inline: auto; }

/* ───────── Chair wardrobe ───────── */
.chair-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(24px, 5vw, 90px); align-items: start; }
.chair-stage { position: sticky; top: calc(var(--head) + 16px); }
#chair-fig { position: relative; aspect-ratio: 2 / 3; height: calc(100vh - var(--head) - 110px); max-width: 100%; margin: 0 auto; overflow: hidden; background: #e9e8e7; cursor: zoom-in; }
#chair-fig img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .8s var(--ease); }
#chair-fig img.on { opacity: 1; }
.chair-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 14px; }
.chair-side { max-width: 33em; font-size: 1.06em; padding-bottom: 8vh; }
.chair-side .label { margin-top: 2em; color: var(--mute); }
/* the wardrobe: three outfits on hangers, to be dragged onto the chair */
.rail-hint { margin-top: 6px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.rail { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(10px, 1.6vw, 22px); margin-top: 22px; border-top: 1px solid var(--ink); }
.hanger { display: grid; justify-items: center; align-content: start; text-align: center; padding-bottom: 6px; touch-action: pan-y; transform-origin: 50% 0; transition: transform .5s var(--ease); }
.hanger svg { width: min(100%, 120px); margin-top: -1px; fill: none; stroke: var(--ink); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.swatch { display: block; width: min(86%, 104px); aspect-ratio: 3 / 4; margin-top: -3px; background-size: 520%; background-repeat: no-repeat; border-radius: 3px 3px 10px 10px; cursor: grab; touch-action: none; transition: opacity .4s, box-shadow .4s; }
.hanger b { font-weight: 300; font-size: clamp(16px, 1.35vw, 21px); line-height: 1.15; margin-top: 12px; }
.hanger .say { font-size: .78em; line-height: 1.4; color: var(--mute); margin-top: 6px; }
.hanger:hover { transform: rotate(-2.5deg); }
.hanger:nth-child(2):hover { transform: rotate(2deg); }
.hanger:hover .swatch { box-shadow: 0 10px 22px rgba(23, 24, 27, .16); }
/* worn or lifted: the hanger hangs empty */
.hanger.worn .swatch, .hanger.lifted .swatch { opacity: .12; box-shadow: none; outline: 1px dashed var(--ink); outline-offset: -1px; }
.hanger.worn b { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.ghost { position: fixed; z-index: 80; left: 0; top: 0; width: 104px; aspect-ratio: 3 / 4; margin: -70px 0 0 -52px; background-size: 520%; background-repeat: no-repeat; border-radius: 3px 3px 10px 10px; box-shadow: 0 18px 40px rgba(23, 24, 27, .28); pointer-events: none; rotate: -5deg; }
.naked-row { display: flex; align-items: center; gap: 16px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); font-size: .94em; }
.naked-row .pill[disabled] { opacity: .35; pointer-events: none; }
.tally { margin: 14px 0 2.2em; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
/* the chair as a drop target */
#chair-fig { outline: 1px dashed transparent; outline-offset: 8px; transition: outline-color .3s, transform .5s var(--ease); }
body.dragging #chair-fig { outline-color: var(--mute); }
body.dragging #chair-fig.target { outline: 1px solid var(--ink); transform: scale(1.012); }
body.dragging { cursor: grabbing; user-select: none; -webkit-user-select: none; }
#chair-fig.settle { animation: settle .7s var(--ease); }
@keyframes settle { 0% { transform: scale(1.02); } 100% { transform: scale(1); } }
.chair-all { margin-top: clamp(40px, 6vw, 96px); }

/* ───────── Feeling Blue-ish: stripes between the two real viewpoints ───────── */
.lenti-wrap { max-width: calc((100vh - var(--head) - 120px) * .75); margin: 0 auto; width: 100%; }
.lenti { position: relative; aspect-ratio: 3 / 4; overflow: hidden; --p: 0; --s: 1.7%; cursor: ew-resize; }
.lenti img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; cursor: inherit; }
.lenti .top {
  -webkit-mask: repeating-linear-gradient(90deg, #000 0, #000 calc(var(--p) * var(--s)), transparent calc(var(--p) * var(--s)), transparent var(--s));
          mask: repeating-linear-gradient(90deg, #000 0, #000 calc(var(--p) * var(--s)), transparent calc(var(--p) * var(--s)), transparent var(--s));
}
.lenti[data-end="right"] .top { -webkit-mask: none; mask: none; }
.lenti[data-end="left"] .top { visibility: hidden; }
.lenti-ctl { display: flex; align-items: center; gap: 14px; margin-top: 14px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.lenti-ctl input { flex: 1; min-width: 60px; appearance: none; -webkit-appearance: none; height: 24px; background: linear-gradient(var(--line), var(--line)) center / 100% 1px no-repeat; }
.lenti-ctl input::-webkit-slider-thumb { -webkit-appearance: none; width: 7px; height: 22px; border-radius: 50%; background: var(--ink); }
.lenti-ctl input::-moz-range-thumb { width: 7px; height: 22px; border: 0; border-radius: 50%; background: var(--ink); }

/* ───────── glitching_stitches ───────── */
.glitchsec .project-head h2 { font-family: var(--mono); font-size: clamp(26px, 4.6vw, 76px); letter-spacing: -.04em; }
.statement { max-width: 33em; margin: clamp(30px, 5vw, 70px) 0 0 auto; font-size: 1.06em; }
.subhead { margin-top: clamp(60px, 9vw, 130px); padding-bottom: 14px; border-bottom: 1px solid var(--line); font-size: clamp(22px, 2.4vw, 36px); }
/* cut-out samples from the printed portfolio, laid out loosely like on her page */
.dev-wall { columns: 4; column-gap: clamp(16px, 3vw, 48px); margin-top: clamp(24px, 4vw, 56px); }
.dev-wall figure { break-inside: avoid; margin-bottom: clamp(16px, 3vw, 48px); }
.dev-wall img { width: 100%; }

/* Cleanse / Clairvoyance */
.pairsec { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(24px, 5vw, 90px); align-items: end; }
.pairsec img { width: 100%; }

/* About / contact */
.about { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); gap: clamp(24px, 6vw, 110px); align-items: center; }
.about figure { max-width: 420px; }
.about h2 { font-size: clamp(34px, 6vw, 98px); line-height: 1; margin-bottom: .5em; }
.contact { position: relative; margin-top: clamp(80px, 11vw, 170px); min-height: 70vh; display: grid; align-items: end; overflow: hidden; background: var(--paper-2); }
.ambient { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .8; }
.ambient-still { opacity: .55; object-position: 100% 0; transform-origin: 85% 15%; animation: drift 46s ease-in-out infinite alternate; }
@keyframes drift { from { transform: scale(1.02); } to { transform: scale(1.12) translate(-1.2%, 1.4%) rotate(-.6deg); } }
.contact-inner { position: relative; padding: var(--pad) var(--pad) 28px calc(var(--pad) + var(--rail)); }
.contact .logotype { width: min(70vw, 760px); margin-bottom: 36px; }
.fine { margin-top: 36px; font-size: 12px; letter-spacing: .1em; color: var(--mute); }

/* ───────── Detail view ───────── */
#lb { border: 0; padding: 0; margin: 0; width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; background: var(--paper); color: var(--ink); }
#lb::backdrop { background: var(--paper); }
#lb[open] { display: grid; grid-template-rows: minmax(0, 1fr) auto; }
.lb-scroll { overflow: auto; display: grid; place-items: center; overscroll-behavior: contain; cursor: zoom-in; }
#lb-img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; grid-area: 1 / 1; }
.lb-scroll:not(.zoomed) #lb-img { max-height: calc(100dvh - 70px); }
.lb-scroll.zoomed { place-items: start; cursor: zoom-out; }
.lb-scroll.zoomed #lb-img { max-width: none; max-height: none; width: var(--zw); }
.lb-bar { display: flex; align-items: center; gap: 10px; padding: 12px var(--pad); border-top: 1px solid var(--line); min-height: 66px; }
#lb-cap { flex: 1; min-width: 0; font-size: 14px; }
#lb-cap b { font-weight: 400; }
#lb-count { font-size: 13px; letter-spacing: .12em; font-variant-numeric: tabular-nums; color: var(--mute); margin-right: 6px; }
.lb-bar .pill { padding: 8px 14px; }

/* ───────── Phones ───────── */
@media (max-width: 760px) {
  :root { --head: 48px; }
  .thread-rail { display: none; }
  .brand, .site-header nav { font-size: 11px; letter-spacing: .1em; }
  .site-header nav { gap: 12px; }
  .site-header nav a:nth-child(2) { display: none; }
  .hero-title, .hero-sub { width: min(78vw, 420px); }
  .hero-title { top: 84px; }
  .hero-sub { top: calc(84px + min(78vw, 420px) * .411 + 16px); }
  .hero-lines { width: calc(100vw - 2 * var(--pad)); bottom: 64px; font-size: 17px; }
  .split, .chair-grid, .about, .pairsec { grid-template-columns: 1fr; }
  .tall img { max-height: none; width: 100%; }
  .row.three { grid-template-columns: 1fr 1fr; }
  .row.three figure:first-child { grid-column: span 2; }
  .row.four { grid-template-columns: 1fr 1fr; }
  .row.eight { grid-template-columns: repeat(4, 1fr); }
  .dev-wall { columns: 2; }
  .bound-sticky { padding-bottom: 56px; }
  .code pre { font-size: 11px; }
  .code pre .l::before { width: 3.2em; padding-right: 1em; }
  .code-toggle { grid-template-columns: minmax(0, 1fr) auto; }
  .code-meta { grid-row: 2; }
  .code-toggle .pill { grid-row: 1 / 3; grid-column: 2; }
  /* the chair stays in view while the outfits scroll beneath it */
  .chair-stage { top: var(--head); z-index: 3; background: var(--paper); padding: 8px 0 10px; box-shadow: 0 1px 0 var(--line); }
  #chair-fig { height: 44vh; height: 44svh; }
  .chair-bar { margin-top: 8px; }
  .chair-bar .pill { padding: 6px 14px; font-size: 11px; }
  .lenti-wrap { max-width: none; }
  #lb-zoom { display: none; }
  .lb-bar { flex-wrap: wrap; }
  #lb-cap { flex-basis: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .hero-hint i { animation: none; }
  .ambient-still { animation: none; }
  .thread-line path { stroke-dashoffset: 0; transition: none; }
}
