/* PXLPSHR — stage black, one typeface (Archivo, using its width axis), the pixel as the only ornament. */

/* Archivo, self-hosted (SIL Open Font License, fonts/OFL.txt): one variable file per subset, weight 400–700, width 75–125%. */
@font-face {
  font-family: "Archivo"; font-style: normal; font-weight: 400 700; font-stretch: 75% 125%; font-display: swap;
  src: url(fonts/archivo-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo"; font-style: normal; font-weight: 400 700; font-stretch: 75% 125%; font-display: swap;
  src: url(fonts/archivo-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --black: #000;
  --ink: #ececec;
  --mid: #9a9a9a;
  --low: #767676; /* 4.6:1 on black: the faintest grey that still passes WCAG AA for small text */
  --line: #1f1f1f;
  /* LED subpixels: used only for the pixel marker */
  --r: #ff3b30;
  --g: #3dff7a;
  --b: #3b6bff;
  --gutter: clamp(16px, 3vw, 40px);
  --row: clamp(150px, 24vw, 380px);
  --gap: 3px;
  --font: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--black);
  scrollbar-gutter: stable;
  scroll-behavior: smooth;
  scroll-padding-top: 56px; /* anchors land below the fixed header */
  -webkit-text-size-adjust: 100%;
}
html:has(dialog[open]) { overflow: hidden; }

body {
  margin: 0;
  background: var(--black);
  color: var(--ink);
  font: 400 17px/1.55 var(--font);
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
}

img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
[hidden] { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

.skip {
  position: fixed; left: var(--gutter); top: 8px; z-index: 50;
  padding: 8px 12px; background: var(--ink); color: var(--black);
  transform: translateY(-160%);
}
.skip:focus { transform: none; }

/* ───────── header ───────── */

.bar {
  position: fixed; inset: 0 0 auto; z-index: 40;
  height: 56px; padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  font-size: 14px;
  background: rgb(0 0 0 / 0.82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  transition: background-color 0.3s ease;
}
/* With the script running, the bar is clear over the hero and turns solid once you scroll. */
.enhanced .bar:not(.is-solid) { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.brand { color: var(--ink); transition: opacity 0.3s ease, visibility 0.3s; }
.brand .wm { width: 82px; fill: currentColor; }
.enhanced .bar:not(.is-past) .brand { opacity: 0; visibility: hidden; }

.nav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 32px); margin-left: auto; }
.nav a { padding: 8px 0; color: var(--mid); text-decoration: none; }
.nav a:hover, .nav a[aria-current] { color: var(--ink); }
.bar-tools { display: flex; align-items: center; gap: 18px; margin-left: clamp(14px, 2.4vw, 32px); }

.motion { display: inline-flex; align-items: center; gap: 8px; padding: 8px 0; color: var(--mid); }
.motion:hover { color: var(--ink); }
.motion-icon { width: 9px; height: 10px; background: linear-gradient(90deg, currentColor 0 34%, transparent 34% 66%, currentColor 66%); }
.no-motion .motion-icon { background: currentColor; clip-path: polygon(0 0, 100% 50%, 0 100%); }

.menu-open { padding: 8px 0; color: var(--ink); }

/* Six sections don't fit a phone's width: below 820px they move into a full-screen menu. */
@media (max-width: 820px) {
  .enhanced .nav { display: none; }
  .enhanced .bar-tools { margin-left: auto; }
  .motion-text { display: none; } /* icon only; the button keeps its aria-label */
  .motion { min-width: 44px; min-height: 44px; justify-content: center; } /* a finger-sized target for the icon */
}
@media (min-width: 821px) {
  .menu-open { display: none; }
}

.menu {
  position: fixed; inset: 0;
  width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 0 var(--gutter) max(28px, env(safe-area-inset-bottom));
  border: 0; background: var(--black); color: var(--ink);
}
.menu[open] { display: flex; flex-direction: column; }
.menu::backdrop { background: var(--black); }
.menu-close { align-self: flex-end; height: 56px; color: var(--mid); font-size: 14px; }
.menu nav { display: grid; gap: 2px; margin: auto 0; }
.menu nav a {
  font-size: clamp(40px, 11vw, 64px); line-height: 1.08;
  font-weight: 600; font-stretch: 125%; letter-spacing: -0.035em;
  text-decoration: none;
}
.menu nav a[aria-current] { color: var(--mid); }

/* ───────── hero ───────── */

/* A 16:9 stage, as wide as the page allows while leaving the next section's title peeking above the fold. */
.hero { padding: 72px var(--gutter) 0; }
.hero-inner { width: min(100%, max(320px, (100svh - 240px) * 16 / 9)); margin: 0 auto; }
.hero-stage { position: relative; aspect-ratio: 16 / 9; container-type: inline-size; }
.hero-media { position: absolute; inset: 0; margin: 0; overflow: hidden; background: #090909; cursor: pointer; }
.hero-media img, .hero-media video {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}
.hero-media video { opacity: 0; transition: opacity 0.5s ease; }
.hero-media video.is-on { opacity: 1; }

.hero-h1 {
  position: absolute; inset: 0; margin: 0;
  display: grid; place-items: center;
  pointer-events: none;
  mix-blend-mode: difference;
}
.wordmark { width: 88cqw; height: auto; overflow: visible; fill: #fff; }
/* Each pixel starts --n cells left of home and is pushed back one cell at a time. */
.wordmark rect {
  animation: push calc(var(--n) * 55ms) steps(var(--n), end) var(--t) both;
}
@keyframes push {
  from { transform: translateX(calc(var(--n) * -1px)); }
}

.hero-foot {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 32px;
  margin-top: 14px;
  font-size: 14px; line-height: 1.4;
}
.hero-now { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; }
.hero-label { text-decoration: none; }
.hero-label:hover .hero-title { text-decoration: underline; }
.hero-next { color: var(--mid); }
.hero-next:hover { color: var(--ink); }
.hero-tagline { margin: 0; max-width: 56ch; color: var(--mid); text-align: right; }

@media (max-width: 640px) {
  .hero-stage { margin: 0 calc(-1 * var(--gutter)); } /* edge to edge on phones */
  .hero-tagline { text-align: left; }
}

/* ───────── sections ───────── */

.experiments, .log, .collect, .lab, .about, .contact { padding-top: clamp(88px, 12vw, 168px); }
.work { padding-top: clamp(48px, 7vw, 104px); }

.sec-head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 32px;
  margin-bottom: clamp(20px, 3vw, 32px);
  padding: 0 var(--gutter);
}
.sec-head h2 {
  margin: 0;
  font-size: clamp(28px, 3.4vw, 42px); line-height: 1;
  font-weight: 500; font-stretch: 116%; letter-spacing: -0.015em;
}
.sec-note { margin: 0; font-size: 14px; color: var(--mid); }
.sec-note a { color: var(--ink); }

/* ───────── work: project tiles ───────── */

.projects {
  list-style: none; margin: 0; padding: 0 var(--gutter);
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 40px 14px;
}
.project-tile { grid-column: span var(--span, 2); } /* the build sets 6, 3 or 2 so rows always fill */
.project-tile a { display: block; color: var(--ink); text-decoration: none; }
.pt-cover {
  position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden;
  background: #0c0c0c var(--lqip, none) center / cover no-repeat; image-rendering: pixelated;
}
.is-lead .pt-cover { aspect-ratio: 21 / 9; }
.pt-cover img, .pt-cover video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; image-rendering: auto;
}
.enhanced .pt-cover img { opacity: 0; transition: opacity 0.6s steps(5, end); }
.enhanced .pt-cover img.is-loaded { opacity: 1; }
.pt-cover video { opacity: 0; transition: opacity 0.4s ease; }
.pt-cover video.is-playing { opacity: 1; }
.pt-title { display: block; margin-top: 14px; font-size: 22px; line-height: 1.2; font-weight: 500; font-stretch: 110%; }
.is-lead .pt-title { font-size: clamp(28px, 4vw, 52px); line-height: 1; font-weight: 600; font-stretch: 125%; letter-spacing: -0.03em; }
.pt-meta { display: block; margin-top: 4px; font-size: 14px; color: var(--mid); }
@media (hover: hover) {
  .projects:has(a:hover) a:not(:hover) .pt-cover { opacity: 0.4; }
  .pt-cover { transition: opacity 0.25s ease; }
  .project-tile a:hover .pt-title { text-decoration: underline; text-decoration-thickness: 1px; }
}
@media (max-width: 560px) {
  .projects { grid-template-columns: 1fr; gap: 32px; }
  .project-tile { grid-column: auto; }
  .is-lead .pt-cover { aspect-ratio: 16 / 9; }
}

/* ───────── project pages ───────── */

.project { padding-top: 96px; }
.p-head { padding: 0 var(--gutter); margin-bottom: clamp(24px, 3vw, 40px); }
.p-back { font-size: 14px; color: var(--mid); }
.p-back:hover { color: var(--ink); }
.p-head h1 {
  margin: 16px 0 0;
  font-size: clamp(44px, 8vw, 120px); line-height: 0.92;
  font-weight: 600; font-stretch: 125%; letter-spacing: -0.04em;
  text-wrap: balance;
}
.p-sub { margin: 14px 0 0; color: var(--mid); font-size: 17px; }

/* One clip at a time, at its own shape, never taller than the screen. */
.stage-wrap { padding: 0 var(--gutter); }
.stage-wrap.has-chapters {
  display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(260px, 1fr);
  align-items: start; gap: 24px clamp(24px, 3vw, 40px);
}
.stage {
  position: relative; margin: 0 auto;
  width: min(100%, (100svh - 160px) * var(--ar, 1.7778));
  aspect-ratio: var(--ar, 16 / 9);
  overflow: hidden; background: #0b0b0b;
}
.stage > *, .stage-start img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: contain; }
.stage-start img { object-fit: cover; transition: opacity 0.25s ease; }
.stage-start:hover img { opacity: 0.8; }
.film-cta {
  position: absolute; left: 0; bottom: 0;
  display: inline-flex; align-items: center; gap: 12px;
  padding: 14px 20px; background: var(--black); color: var(--ink); font-size: 15px;
}
.film-icon { width: 0; height: 0; border-top: 7px solid transparent; border-bottom: 7px solid transparent; border-left: 11px solid currentColor; }
.film-len { color: var(--mid); }
/* The album's running order: a real sequence, so it's numbered. */
.chapters { list-style: none; margin: 0; padding: 0; counter-reset: track; border-top: 1px solid var(--line); font-size: 15px; }
.chapters li { counter-increment: track; border-bottom: 1px solid var(--line); }
.chapters a {
  display: grid; grid-template-columns: 2.4em minmax(0, 1fr) auto; gap: 8px;
  padding: 8px 0; color: var(--ink); text-decoration: none;
}
.chapters a::before { content: counter(track, decimal-leading-zero); color: var(--low); font-variant-numeric: tabular-nums; }
.ch-time { color: var(--mid); font-variant-numeric: tabular-nums; }
.chapters a:hover .ch-name, .chapters a[aria-current] .ch-name { text-decoration: underline; }
.chapters a[aria-current]::before { color: var(--ink); }

.strip {
  list-style: none; margin: 16px 0 0; padding: 0 var(--gutter);
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(180px, 42vw), 1fr)); gap: 16px 10px;
}
.strip-item { display: block; color: var(--mid); text-decoration: none; font-size: 14px; }
.s-thumb { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #0c0c0c; outline: 1px solid transparent; outline-offset: 2px; }
.s-thumb img { width: 100%; height: 100%; object-fit: cover; }
.s-cap { display: block; margin-top: 8px; line-height: 1.3; }
.strip-item:hover, .strip-item[aria-current] { color: var(--ink); }
.strip-item[aria-current] .s-thumb { outline-color: var(--ink); }

.p-body {
  display: grid; grid-template-columns: minmax(0, 680px) minmax(240px, 380px); justify-content: space-between;
  gap: 40px clamp(32px, 6vw, 96px); padding: 0 var(--gutter); margin-top: clamp(40px, 6vw, 72px);
}
.p-text p { max-width: 64ch; margin: 0 0 1em; color: var(--mid); }
.p-text .p-intro { color: var(--ink); font-size: clamp(20px, 2vw, 24px); line-height: 1.4; font-stretch: 104%; }
.p-facts { margin: 0; border-top: 1px solid var(--line); }
.p-facts div { display: grid; grid-template-columns: 7em minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.p-facts dt { color: var(--mid); }
.p-facts dd { margin: 0; }
.p-links { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 8px; font-size: 15px; }

.p-next {
  display: grid; gap: 8px; margin-top: clamp(88px, 12vw, 160px); padding: 32px var(--gutter) 0;
  border-top: 1px solid var(--line);
}
.p-next > span { font-size: 14px; color: var(--mid); }
.p-next a { color: var(--ink); text-decoration: none; }
.pn-title { display: block; font-size: clamp(32px, 6vw, 80px); line-height: 0.95; font-weight: 600; font-stretch: 125%; letter-spacing: -0.035em; }
.pn-meta { display: block; margin-top: 10px; font-size: 15px; color: var(--mid); }
.p-next a:hover .pn-title { text-decoration: underline; text-decoration-thickness: 2px; }

@media (max-width: 900px) {
  .stage-wrap.has-chapters, .p-body { grid-template-columns: 1fr; }
  /* Narrow screens: what the project is comes right after the stage; the strip of clips follows. */
  .project { display: flex; flex-direction: column; }
  .project > .p-body { order: 1; }
  .project > .strip { order: 2; margin-top: 40px; }
  .project > .p-next { order: 3; }
}

/* ───────── experiments ───────── */

.filters { display: flex; flex-wrap: wrap; gap: 4px 24px; font-size: 15px; }
.filter { display: inline-flex; align-items: center; gap: 8px; padding: 6px 0; color: var(--mid); }
.filter:hover { color: var(--ink); }
.filter .count { font-size: 12px; font-stretch: 88%; color: var(--low); font-variant-numeric: tabular-nums; }
.filter[aria-pressed="true"], .log-jump[aria-current] { color: var(--ink); }
.filter[aria-pressed="true"]::before, .log-jump[aria-current]::before {
  content: ""; width: 6px; height: 9px;
  background: linear-gradient(90deg, var(--r) 0 33.4%, var(--g) 0 66.7%, var(--b) 0);
}

/* Justified rows: each tile grows in proportion to its aspect ratio, so a row shares one height. */
.grid {
  list-style: none; margin: 0; padding: 0 var(--gutter);
  display: flex; flex-wrap: wrap; gap: var(--gap);
}
.tile {
  position: relative;
  flex: calc(var(--ar) * 1000) 1 calc(var(--ar) * var(--row));
  aspect-ratio: var(--ar);
}
/* Last item: grows to fill the final row (keeping that row's tiles at natural size), or takes a row of its own. */
.tile-end { flex: 1e9 1 200px; min-height: 120px; }
.tile-end a {
  display: flex; flex-direction: column; justify-content: flex-end; gap: 4px;
  height: 100%; padding: 16px 18px;
  border: 1px solid #262626; color: var(--mid); text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.tile-end a:hover { border-color: var(--ink); color: var(--ink); }
.end-title { color: var(--ink); font-size: 17px; font-stretch: 108%; }
.end-handle { font-size: 14px; }

.tile-link {
  position: absolute; inset: 0; overflow: hidden;
  display: block;
  background: #0c0c0c var(--lqip, none) center / cover no-repeat;
  image-rendering: pixelated;
  color: var(--ink); text-decoration: none;
}
.tile-link:focus-visible { outline: none; }
/* The image would paint over an outline on the link itself, so the focus ring sits on a layer above it. */
.tile-link:focus-visible::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  outline: 2px solid var(--ink); outline-offset: -2px; box-shadow: inset 0 0 0 4px #000;
}
.tile-link img, .tile-link video {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  image-rendering: auto;
}
/* The 16px mosaic resolves into the image in a few hard steps. */
.enhanced .tile-link img { opacity: 0; transition: opacity 0.6s steps(5, end); }
.enhanced .tile-link img.is-loaded { opacity: 1; }
.tile-link video { opacity: 0; transition: opacity 0.4s ease; }
.tile-link video.is-playing { opacity: 1; }

.tile-label {
  position: absolute; left: 0; bottom: 0; max-width: 100%;
  padding: 6px 10px 7px;
  background: var(--black);
  font-size: 13px; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tile-time {
  position: absolute; right: 0; top: 0;
  padding: 3px 7px 4px;
  background: var(--black); color: var(--mid);
  font-size: 12px; font-stretch: 88%; font-variant-numeric: tabular-nums;
}

@media (hover: hover) {
  .tile-link { transition: opacity 0.25s ease; }
  .tile-label { opacity: 0; transition: opacity 0.2s ease; }
  .tile-link:hover .tile-label, .tile-link:focus-visible .tile-label { opacity: 1; }
  .grid:has(.tile-link:hover) .tile-link:not(:hover) { opacity: 0.4; }
}
@media (hover: none) {
  .tile-label { display: none; }
}

/* ───────── log ───────── */

.log-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 24px; font-size: 15px; }
.log-jump { text-decoration: none; }
.log-steps { display: flex; gap: 8px; }
.log-step {
  display: grid; place-items: center;
  width: 36px; height: 36px;
  border: 1px solid #333; border-radius: 50%;
}
.log-step:hover:not([aria-disabled="true"]) { border-color: var(--ink); }
.log-step[aria-disabled="true"] { opacity: 0.3; cursor: default; }
.log-step svg { width: 15px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.log-note { margin: 0 0 18px; padding: 0 var(--gutter); }

/* One strip, newest first. Each year opens with its number set on end, like the spine of a book. */
.log-strip {
  --log-w: clamp(124px, 12vw, 176px);
  position: relative; /* offsetLeft of the year marks is measured from here */
  list-style: none; margin: 0; padding: 0 var(--gutter) 14px;
  display: flex; align-items: flex-start; gap: 10px;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x proximity; scroll-padding-inline: var(--gutter);
  scrollbar-width: thin; scrollbar-color: #333 transparent;
}
.log-tile { flex: none; width: var(--log-w); scroll-snap-align: start; }
.log-tile .tile-link { position: relative; aspect-ratio: 9 / 16; }
.log-cap {
  margin: 8px 0 0; font-size: 13px; line-height: 1.35; color: var(--mid);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
  overflow-wrap: anywhere;
}
.log-cap time { color: var(--ink); }
.log-mark {
  flex: none; height: calc(var(--log-w) * 16 / 9);
  display: flex; align-items: flex-end;
  padding-left: 12px; border-left: 1px solid var(--line);
  scroll-snap-align: start;
}
.log-mark:first-child { padding-left: 0; border-left: 0; }
.log-mark h3 {
  margin: 0; writing-mode: vertical-rl; rotate: 180deg;
  font-size: clamp(32px, 3.4vw, 46px); line-height: 1;
  font-weight: 600; font-stretch: 125%; letter-spacing: -0.02em;
}
@media (hover: hover) {
  .log-strip:has(.tile-link:hover) .tile-link:not(:hover) { opacity: 0.4; }
}

/* ───────── collect ───────── */

.collect-grid {
  list-style: none; margin: 0; padding: 0 var(--gutter);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 12px;
}
.collect-grid a { display: block; color: var(--ink); text-decoration: none; }
.c-art { position: relative; display: block; aspect-ratio: 1; overflow: hidden; background: #0c0c0c; }
/* While an animation loads: one blinking LED pixel in the corner. */
.is-loading .c-art::after {
  content: ""; position: absolute; right: 10px; top: 10px; width: 6px; height: 9px;
  background: linear-gradient(90deg, var(--r) 0 33.4%, var(--g) 0 66.7%, var(--b) 0);
  animation: blink 0.6s steps(2, jump-none) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.c-art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; transition: opacity 0.25s ease; }
.c-title { display: block; margin-top: 10px; font-size: 15px; font-stretch: 108%; letter-spacing: 0.02em; }
.c-count { display: block; font-size: 13px; color: var(--mid); font-variant-numeric: tabular-nums; }
@media (hover: hover) {
  .collect-grid:has(a:hover) a:not(:hover) .c-art img { opacity: 0.4; }
  .collect-grid a:hover .c-title { text-decoration: underline; }
}
@media (max-width: 760px) { .collect-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 8px; } }

/* ───────── lab ───────── */

/* Rows share the list's columns (subgrid) so names, blurbs and links line up down the page. */
.lab-list {
  list-style: none; margin: 0 var(--gutter); padding: 0;
  display: grid; grid-template-columns: minmax(170px, 1fr) minmax(0, 2.2fr) auto auto; column-gap: 32px;
  border-top: 1px solid var(--line);
}
.lab-row {
  position: relative; grid-column: 1 / -1;
  display: grid; grid-template-columns: subgrid;
  align-items: baseline; row-gap: 6px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.lab-thumb { display: none; }
.lab-name { margin: 0; font-size: 22px; line-height: 1.2; font-weight: 500; font-stretch: 110%; }
.lab-name a { text-decoration: none; }
.lab-name a::after { content: ""; position: absolute; inset: 0; } /* whole row opens the repo */
.lab-desc { margin: 0; color: var(--mid); }
.lab-meta { margin: 0; display: flex; gap: 16px; font-size: 13px; color: var(--mid); font-variant-numeric: tabular-nums; }
.lab-links { position: relative; z-index: 1; margin: 0; display: flex; gap: 18px; justify-self: end; font-size: 15px; }
.lab-links a { padding-block: 4px; } /* 24px+ touch targets */
.lab-links a:hover { color: #fff; }
@media (hover: hover) {
  .lab-row:hover .lab-name a { text-decoration: underline; }
}

.lab-float {
  position: fixed; left: 0; top: 0; z-index: 30;
  width: clamp(220px, 22vw, 340px); aspect-ratio: var(--ar, 1);
  overflow: hidden; background: var(--black);
  pointer-events: none; opacity: 0;
  transition: opacity 0.18s ease;
}
.lab-float.is-on { opacity: 1; }
.lab-float img, .lab-float video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 860px), (hover: none) {
  .lab-list { display: block; }
  .lab-row { grid-template-columns: 88px minmax(0, 1fr); align-items: start; gap: 4px 18px; }
  .lab-thumb {
    display: block; grid-row: 1 / span 4;
    width: 88px; height: 88px; object-fit: cover; background: #0c0c0c;
  }
  .lab-name, .lab-desc, .lab-meta, .lab-links { grid-column: 2; }
  .lab-links { justify-self: start; margin-top: 6px; }
  .lab-float { display: none; }
}

/* ───────── about ───────── */

.about-grid {
  display: grid; grid-template-columns: minmax(200px, 340px) minmax(0, 680px);
  align-items: start; gap: 40px clamp(32px, 7vw, 120px);
  padding: 0 var(--gutter);
}
.about-art { margin: 0; aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: #0c0c0c; }
.about-art img { width: 100%; height: 100%; object-fit: cover; scale: 1.1; }
.bio p { max-width: 64ch; margin: 0 0 1em; color: var(--mid); }
.bio p:first-child { color: var(--ink); font-size: clamp(20px, 2vw, 24px); line-height: 1.4; font-stretch: 104%; }
.sub { margin: 44px 0 12px; font-size: 14px; font-weight: 500; color: var(--mid); }
.credits { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.credits li {
  display: grid; grid-template-columns: 5.5em minmax(0, 1fr) auto; gap: 16px; /* 5.5em fits a "2023–2025" */
  padding: 11px 0; border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.cr-year, .cr-role, .cr-client { color: var(--mid); font-variant-numeric: tabular-nums; }
.cr-project a { color: var(--ink); }
.tools { margin: 0; }

@media (max-width: 960px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-art { width: min(64vw, 280px); }
}
@media (max-width: 760px) {
  .credits li { grid-template-columns: 5.5em minmax(0, 1fr); row-gap: 2px; }
  .cr-role { grid-column: 2; font-size: 14px; }
}

/* ───────── contact ───────── */

.contact-head {
  margin: 0 var(--gutter) clamp(32px, 5vw, 64px);
  font-size: clamp(44px, 9.5vw, 148px); line-height: 0.9;
  font-weight: 600; font-stretch: 125%; letter-spacing: -0.04em;
  text-wrap: balance;
}
.contact-head span { font-weight: 400; color: var(--mid); }
.contact-grid {
  display: grid; grid-template-columns: minmax(0, 760px) minmax(200px, 360px);
  justify-content: space-between; gap: 48px;
  padding: 0 var(--gutter);
}

.chips { margin: 0 0 28px; padding: 0; border: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips legend { margin-bottom: 12px; padding: 0; font-size: 14px; color: var(--mid); }
.chip { position: relative; }
.chip input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.chip span { display: block; padding: 9px 16px; border: 1px solid #333; border-radius: 999px; font-size: 14px; color: var(--mid); }
.chip input:hover + span { border-color: var(--mid); color: var(--ink); }
.chip input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--black); }
.chip input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 3px; }

.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 16px; }
.field { display: grid; gap: 8px; }
.field-wide { grid-column: 1 / -1; }
.field > span { font-size: 14px; color: var(--mid); }
.field input, .field textarea {
  width: 100%; padding: 13px 14px;
  font: inherit; color: var(--ink);
  background: #0b0b0b; border: 1px solid #666; border-radius: 4px; /* 3.7:1: the field's edge is visible (WCAG 1.4.11) */
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus-visible, .field textarea:focus-visible { outline: none; border-color: var(--ink); }
.hp { display: none; }
.captcha.is-on { margin-top: 24px; min-height: 78px; } /* room for the hCaptcha box from the moment it starts loading */

.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 24px; }
.send { padding: 14px 24px; border-radius: 4px; background: var(--ink); color: var(--black); font-weight: 600; }
.send:hover { background: #fff; }
.send[aria-disabled="true"] { opacity: 0.5; cursor: progress; }
.form-status { margin: 0; max-width: 52ch; font-size: 14px; color: var(--mid); }
.form-status.is-error { color: #ff8a80; }
.form-status.is-ok { color: var(--ink); }
.form-note { margin: 16px 0 0; font-size: 14px; color: var(--mid); }
.form-note a { color: var(--ink); }

.contact-aside p { max-width: 36ch; margin: 0 0 24px; color: var(--mid); }
.socials { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: clamp(20px, 2vw, 24px); font-stretch: 108%; }
.socials a { text-decoration: none; }
.socials a:hover { text-decoration: underline; }

@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; }
  .contact-aside { order: -1; } /* "this form lands straight in the inbox" reads before the form, not after Send */
}
@media (max-width: 560px) { .fields { grid-template-columns: 1fr; } }

/* ───────── footer ───────── */

.foot {
  display: flex; justify-content: space-between; gap: 16px;
  padding: clamp(88px, 12vw, 168px) var(--gutter) 28px;
  font-size: 14px; color: var(--mid);
}
.foot p { margin: 0; }
.foot-links { display: flex; gap: 24px; }
.foot a { color: var(--mid); }
.foot a:hover { color: var(--ink); }

/* ───────── viewer ───────── */

.viewer {
  position: fixed; inset: 0;
  width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: var(--black); color: var(--ink);
  overflow: hidden;
}
.viewer[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.viewer::backdrop { background: var(--black); }

.v-top {
  display: flex; align-items: center; justify-content: space-between;
  height: 56px; padding: 0 var(--gutter);
  font-size: 14px; color: var(--mid);
}
.v-count { margin: 0; font-variant-numeric: tabular-nums; }
.v-close { padding: 8px 0; color: var(--ink); }

.v-stage { position: relative; min-height: 0; touch-action: pinch-zoom; } /* one finger swipes (handled in app.js), two zoom */
/* Pinned to the stage box: a percentage height inside an auto grid track would fall back to the media's own size. */
.v-stage > img, .v-stage > video {
  position: absolute; inset: 0 var(--gutter);
  width: calc(100% - 2 * var(--gutter)); height: 100%;
  object-fit: contain;
}

.v-foot {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 32px;
  padding: 18px var(--gutter) max(22px, env(safe-area-inset-bottom));
}
.v-label p { margin: 0; }
.v-title { font-size: 17px; }
.v-medium, .v-credit { font-size: 14px; color: var(--mid); }
.v-medium:empty, .v-credit:empty { display: none; }
.v-controls { display: flex; align-items: center; gap: 18px; font-size: 14px; }
.v-play, .v-sound { color: var(--mid); }
.v-play:hover, .v-sound:hover { color: var(--ink); }
.v-prev, .v-next {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border: 1px solid #333; border-radius: 50%;
}
.v-prev:hover, .v-next:hover { border-color: var(--ink); }
.v-prev svg, .v-next svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; }

/* ───────── privacy ───────── */

.legal-text { padding: 0 var(--gutter); }
.legal-text > * { max-width: 64ch; }
.legal-text h2 { margin: 48px 0 14px; font-size: 22px; line-height: 1.2; font-weight: 500; font-stretch: 110%; }
.legal-text p, .legal-text li { color: var(--mid); }
.legal-text p { margin: 0 0 1em; }
.legal-text > p:first-child { color: var(--ink); font-size: clamp(20px, 2vw, 24px); line-height: 1.4; font-stretch: 104%; }
.legal-text ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.legal-text strong { color: var(--ink); font-weight: 500; }
.legal-text a { color: var(--ink); }
.legal-text code { font: inherit; color: var(--ink); }
.legal-text .legal-links { gap: 8px; }

/* ───────── holding page (the domain before launch: the hero alone) ───────── */

.holding main { min-height: 100svh; display: grid; align-content: center; }
.holding .hero { padding: var(--gutter); }
.holding .hero-inner { width: min(100%, max(320px, (100svh - 140px) * 16 / 9)); }
.holding .hero-media { cursor: default; }
.holding .hero-say { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 28px; }
.holding .hero-say .hero-tagline { text-align: left; }
.hero-mail { display: inline-flex; align-items: center; gap: 4px; margin: 0; color: var(--ink); }
/* the envelope is the link: a 32px target around a 16px icon, without making the line any taller */
.hero-mail-link { display: inline-grid; place-items: center; width: 32px; height: 32px; margin: -8px 0; border-radius: 4px; color: var(--ink); transition: background-color .2s ease; }
.hero-mail-link:hover { background: var(--line); }
.hero-mail-icon { width: 16px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }

/* ───────── 404 ───────── */

.lost { display: grid; place-items: center; min-height: 100svh; padding: var(--gutter); text-align: center; }
.lost .wm { width: 164px; margin: 0 auto 36px; fill: var(--ink); }
.lost h1 { margin: 0 0 12px; font-size: clamp(28px, 4vw, 44px); font-weight: 500; font-stretch: 115%; line-height: 1.1; }
.lost p { margin: 0; color: var(--mid); }

/* ───────── reduced motion ───────── */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .wordmark rect { animation: none; }
  .enhanced .tile-link img { transition: none; }
}
