/* 3d.css: the DOM layer of the 3D site.
   Dark only. Sections are transparent so the canvas shows; soft scrims keep text readable.
   Ported from the 2D site.css (same tokens, same type, same components) to the 3D page structure.
   Hooks for region owners: .obj, .works-layout / .works-stage, .contact-stage, .hero-stage. */

:root {
  --bg: #070807;
  --bg-2: #0c0e0c;
  --bg-3: #121512;
  --ink: #ece7d8;
  --ink-dim: #9a9586;
  --ink-faint: #8d897b;           /* lifted from the 2D #5e5b52 so small mono text clears 4.5:1 over the lit scene too (4.8:1 at the worst measured background) */
  --accent: #d6ff3c;
  --accent-2: #7ee0c6;
  --danger: #ff5a36;
  --paper: #f3efe2;
  --accent-rgb: 214, 255, 60;
  --accent2-rgb: 126, 224, 198;
  --bg-rgb: 7, 8, 7;
  --ink-rgb: 236, 231, 216;
  --line: rgba(var(--accent-rgb), 0.14);
  --line-strong: rgba(232, 228, 214, 0.12);
  --surface: rgba(15, 18, 15, 0.62);
  --surface-2: rgba(21, 25, 21, 0.74);
  --surface-3: rgba(10, 12, 10, 0.6);
  --on-accent: #11150a;
  --accent-hover: #e7ff75;
  --panel-top: rgba(18, 22, 18, 0.7);
  --panel-bottom: rgba(8, 10, 8, 0.86);
  --chain-bg: rgba(12, 14, 12, 0.66);
  --badge-shadow: rgba(0, 0, 0, 0.45);
  --card-top: rgba(20, 24, 20, 0.58);
  --card-bottom: rgba(9, 11, 9, 0.5);
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  --scrim: 0.4;                    /* default darkening behind section text, region css may change it */
  --radius: 18px;
  --header: 72px;
  --font-sans: "Instrument Sans", "IBM Plex Sans", system-ui, sans-serif;
  --font-serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.77, 0, 0.18, 1);
  color-scheme: dark;
}

/* ------------------------------------------------------------------ base */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html {
  background: var(--bg);
  scrollbar-width: thin;
  scrollbar-color: #2b302a var(--bg);
  -webkit-text-size-adjust: 100%;
}
/* no scroll-behavior:smooth here: chrome.js does the anchor scrolling with GSAP */
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 400;
  letter-spacing: -0.011em;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body::before {                                   /* film grain */
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 80;
  opacity: 0.04;
  background-size: 220px 220px;                    /* the svg has no size of its own: without this it was rasterised at about 900 px and the grain came out coarse */
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
::selection { background: var(--accent); color: var(--on-accent); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

#stage {
  position: fixed;
  left: 0; top: 0;
  width: 100%; height: 100%;
  z-index: 0;
  display: block;
  pointer-events: none;
}
main, .ticker, .site-footer { position: relative; z-index: 1; }

.skip {
  position: absolute;
  left: 12px; top: -48px;
  background: var(--accent); color: #111;
  padding: 8px 12px; z-index: 500;
  border-radius: 6px;
}
.skip:focus { top: 12px; }
main [tabindex="-1"]:focus { outline: none; }          /* scroll targets that chrome.js focuses for keyboard users */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ------------------------------------------------------------------ header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  border-bottom: 1px solid var(--line-strong);
  background: linear-gradient(180deg, rgba(var(--bg-rgb), 0.94), rgba(var(--bg-rgb), 0.88));
  backdrop-filter: blur(10px) saturate(1.1);
  -webkit-backdrop-filter: blur(10px) saturate(1.1);
  transition: background 0.5s var(--ease);
}
.site-header.is-scrolled { background: linear-gradient(180deg, rgba(var(--bg-rgb), 0.96), rgba(var(--bg-rgb), 0.92)); }
html[data-q="low"] .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(var(--bg-rgb), 0.97); }
.header-progress {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, var(--accent), rgba(var(--accent-rgb), 0.15));
  box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.45);
  transform-origin: left center;
  transform: scaleX(var(--p, 0));
  pointer-events: none;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.brand { padding: 12px 10px; margin: -12px -10px; }
.brand b { color: var(--accent); font-weight: 500; transition: letter-spacing 0.5s var(--ease); }
.brand:hover b { letter-spacing: 0.3em; }
.header-tools { display: flex; align-items: center; gap: 12px; }
.nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.nav a { color: var(--ink-dim); position: relative; transition: color 0.3s; }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 1px;
  background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.5s var(--ease);
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.18em;
  color: var(--accent-2);
  border: 1px solid rgba(var(--accent2-rgb), 0.25);
  padding: 6px 10px; border-radius: 999px;
}
.status-pill i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  animation: pulse 2.4s infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.45; transform: scale(0.86); } }

.calm-toggle {
  display: inline-flex; align-items: center; gap: 9px;
  height: 30px; padding: 0 12px 0 10px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-dim);
  transition: color 0.3s, border-color 0.3s, background 0.3s;
}
.calm-dot {
  position: relative; width: 12px; height: 12px; border-radius: 50%;
  border: 1px solid currentColor;
  transition: background 0.35s var(--ease), box-shadow 0.35s, border-color 0.3s;
}
.calm-dot::after {                                /* a tiny wave line inside the dot */
  content: ""; position: absolute; left: 2px; right: 2px; top: 50%; height: 1px; background: currentColor; opacity: 0.7;
}
.calm-toggle:hover { color: var(--ink); border-color: rgba(var(--accent-rgb), 0.5); }
.calm-toggle[aria-pressed="true"] { color: var(--accent); border-color: rgba(var(--accent-rgb), 0.5); background: rgba(var(--accent-rgb), 0.06); }
.calm-toggle[aria-pressed="true"] .calm-dot { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.55); }
.calm-toggle[aria-pressed="true"] .calm-dot::after { background: var(--on-accent); }
.menu-btn { display: none; }

/* ------------------------------------------------------------------ layout */

.wrap { width: min(1180px, calc(100% - 48px)); margin: 0 auto; position: relative; }
.wide { width: min(1360px, calc(100% - 40px)); margin: 0 auto; }

section { padding: 92px 0; scroll-margin-top: calc(var(--header) + 12px); position: relative; }
/* Text scrims live in the canvas (core.js Scrim, drawn between the world and the ui scene) so they never dim the 3D objects.
   Tune per section with custom properties: --scrim (0..1), --scrim-feather (px), --scrim-x0 / --scrim-x1 (fraction of the width
   where the darkening starts and ends fading, left to right). Set --scrim: 0 to switch one off. */
main > section { --scrim: 0.46; --scrim-x0: 0.3; --scrim-x1: 0.85; }
#services { --scrim: 0.22; --scrim-x0: 0.5; --scrim-x1: 1; }
#about { --scrim: 0.34; --scrim-x1: 0.9; }
main > .case { --scrim: 0.34; --scrim-x0: 0.45; --scrim-x1: 1.05; --scrim-feather: 240; }
main > section > * { position: relative; z-index: 1; }

.sec-label {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 14px;
}
.sec-label::before { content: ""; width: 22px; height: 1px; background: var(--accent); flex: none; }
h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(36px, 5vw, 64px);
  letter-spacing: -0.03em;
  line-height: 0.95;
  margin: 0 0 18px;
  text-shadow: 0 0 28px rgba(var(--bg-rgb), 0.85);
}
.lede { max-width: 640px; color: var(--ink-dim); font-size: 17px; text-shadow: 0 0 20px rgba(var(--bg-rgb), 0.9); }
.lede + .lede { margin-top: 12px; }
.prose { max-width: 68ch; color: var(--ink-dim); font-size: 17px; text-shadow: 0 0 20px rgba(var(--bg-rgb), 0.9); }
.prose p { margin: 0 0 16px; }
.prose strong { color: var(--ink); font-weight: 500; }

.split { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 40px; align-items: start; }
.about-layout { align-items: end; }
.about-aside { max-width: 36ch; }
.about-aside p {
  margin: 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--paper);
}
.about-aside .meta {
  margin-top: 16px; max-width: 38ch;
  font-family: var(--font-sans); font-style: normal; font-size: 15px; line-height: 1.5; letter-spacing: -0.011em;
  color: var(--ink-dim);
}

/* ------------------------------------------------------------------ hero */

.hero {
  position: relative;
  min-height: calc(100vh - var(--header));
  min-height: calc(100svh - var(--header));
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: end;
  padding: 40px 0 56px;
}
main > .hero::before { display: none; }
.hero::after {                                    /* a calm pool of darkness behind the headline (full bleed, so it has no hard edge) */
  content: ""; position: absolute; top: 0; bottom: 0; left: calc(50% - 50vw); right: calc(50% - 50vw); z-index: 0; pointer-events: none;
  background: radial-gradient(60% 80% at 18% 78%, rgba(var(--bg-rgb), 0.7), transparent 72%);
}
.hero-copy { position: relative; z-index: 2; padding: 40px 0 20px 28px; }
.kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 22px;
}
.hero h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(64px, 11vw, 148px);
  line-height: 0.82;
  letter-spacing: -0.04em;
  text-shadow: 0 0 40px rgba(var(--bg-rgb), 0.8);
}
.hero h1 em { font-style: italic; color: var(--paper); }
.hero-sub {
  margin-top: 28px;
  max-width: 520px;
  font-size: 18px;
  color: var(--ink-dim);
  text-shadow: 0 0 20px rgba(var(--bg-rgb), 0.9);
}
.hero-sub strong { color: var(--ink); font-weight: 500; }
.hero-actions { display: flex; gap: 14px; margin-top: 36px; flex-wrap: wrap; }
.hero-stage { position: relative; z-index: 1; height: 100%; min-height: 520px; }

/* ------------------------------------------------------------------ buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(var(--bg-rgb), 0.35);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: transform 0.35s var(--ease), background 0.35s var(--ease), border-color 0.35s, box-shadow 0.35s;
}
.btn:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: 0 0 26px rgba(var(--accent-rgb), 0.14); }
.btn-solid {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
  font-weight: 600;
}
.btn-solid:hover { background: var(--accent-hover); box-shadow: 0 0 34px rgba(var(--accent-rgb), 0.35); }

/* ------------------------------------------------------------------ ticker */

.ticker {
  border-block: 1px solid var(--line-strong);
  overflow: hidden;
  background: linear-gradient(90deg, rgba(var(--bg-rgb), 0.78), rgba(12, 14, 12, 0.6) 50%, rgba(var(--bg-rgb), 0.78));
}
.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker 36s linear infinite;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.ticker-track span { padding: 14px 28px; white-space: nowrap; }
.ticker-track b { color: var(--accent); font-weight: 400; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ------------------------------------------------------------------ services */

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 40px; }
.card {
  --obj-h: 220px;
  /* the top (the .obj slot) stays clear so the 3D object behind is not dimmed by a DOM layer; the text part is dark glass */
  background: linear-gradient(180deg, transparent 0, transparent calc(var(--obj-h) + 6px), var(--card-top) calc(var(--obj-h) + 56px), var(--card-bottom) 100%);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 24px;
  min-height: 220px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s, transform 0.4s var(--ease);
}
.card:hover { border-color: rgba(var(--accent-rgb), 0.35); transform: translateY(-4px); }
.card::after {                                    /* a hairline of light along the top edge (the 2D corner glow smudged the clear 3D slot) */
  content: "";
  position: absolute; left: 14%; right: 14%; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--ink-rgb), 0.16), transparent);
  pointer-events: none;
}
.card .obj {                                      /* slot for the service object (ui scene anchor) */
  position: relative;
  height: 220px;
  margin: -6px -8px 10px;
  border-radius: 12px;
}
.idx { font-family: var(--font-mono); font-size: 11px; color: var(--accent); letter-spacing: 0.16em; }
.card h3 { margin: 18px 0 10px; font-size: 22px; font-weight: 500; letter-spacing: -0.03em; }
.card p { margin: 0; color: var(--ink-dim); font-size: 15px; }

/* ------------------------------------------------------------------ works */

.works-layout { margin-top: 48px; }
.work-list { display: flex; flex-direction: column; }
.works-stage { display: none; position: relative; }
@media (min-width: 981px) {
  .works-layout { display: grid; grid-template-columns: minmax(0, 1.16fr) minmax(0, 0.84fr); gap: 56px; align-items: start; }
  .works-stage {
    display: block;
    position: sticky;
    top: calc(var(--header) + 28px);
    height: min(560px, calc(100vh - var(--header) - 56px));
    border-radius: var(--radius);
  }
}
.work-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  grid-template-areas: "yr title meta" "yr desc meta";
  column-gap: 20px;
  row-gap: 6px;
  align-items: center;
  padding: 26px 8px;
  border-top: 1px solid var(--line-strong);
  transition: background 0.3s;
}
.work-row:last-child { border-bottom: 1px solid var(--line-strong); }
.work-row:hover { background: rgba(var(--accent-rgb), 0.03); }
.work-row .yr { grid-area: yr; font-family: var(--font-mono); color: var(--ink-faint); font-size: 12px; }
.work-row h3 { grid-area: title; margin: 0; font-size: 24px; font-weight: 500; letter-spacing: -0.03em; }
.work-row p { grid-area: desc; margin: 0; color: var(--ink-dim); }
.work-row > .tag, .work-row .work-meta { grid-area: meta; }
.work-row .aka {
  display: block; margin-top: 4px;
  font-family: var(--font-sans); font-size: 14px; font-weight: 400; letter-spacing: -0.011em; color: var(--ink-dim);
}
.work-meta { display: flex; align-items: center; gap: 14px; }
.tag {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-right: 6px;
}
.arrow { display: inline-block; transition: transform 0.3s var(--ease); color: var(--accent); font-family: var(--font-mono); }

/* linked rows: always-on "this opens" signals + strong hover */
a.work-row { position: relative; isolation: isolate; cursor: pointer; clip-path: inset(0 -24px 0 0); }   /* keeps the running streak inside the row, lets the arrow ring breathe */
a.work-row::before {                              /* hover fill sweeping in from the left */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.16), rgba(var(--accent-rgb), 0.02) 85%);
  border-left: 2px solid var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.6s var(--ease);
}
a.work-row:hover::before, a.work-row:focus-visible::before, a.work-row.is-hot::before { transform: scaleX(1); }
a.work-row::after {                               /* light streak that keeps running along the row */
  content: ""; position: absolute; left: -25%; bottom: -1px; width: 22%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.6);
  animation: rowscan 3.4s ease-in-out infinite;
}
a.work-row + a.work-row::after { animation-delay: -1.7s; }
@keyframes rowscan { 0% { left: -25%; opacity: 0; } 15%, 85% { opacity: 1; } 100% { left: 103%; opacity: 0; } }

a.work-row .yr, a.work-row h3, a.work-row p { transition: translate 0.5s var(--ease), color 0.3s; }
a.work-row:hover .yr, a.work-row:focus-visible .yr, a.work-row.is-hot .yr { translate: 12px 0; color: var(--accent); }
a.work-row:hover h3, a.work-row:focus-visible h3, a.work-row.is-hot h3 { translate: 12px 0; }
a.work-row:hover p, a.work-row:focus-visible p, a.work-row.is-hot p { translate: 8px 0; color: var(--ink); }
a.work-row h3 {
  justify-self: start;
  background: linear-gradient(var(--accent), var(--accent)) left bottom / 0 2px no-repeat;
  padding-bottom: 3px;
  transition: translate 0.5s var(--ease), color 0.3s, background-size 0.55s var(--ease);
}
a.work-row:hover h3, a.work-row:focus-visible h3, a.work-row.is-hot h3 { background-size: 100% 2px; color: var(--paper); }

a.work-row .arrow {                               /* ringed button, ping ring and nudging glyph never stop */
  position: relative; display: grid; place-items: center;
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(var(--accent-rgb), 0.6);
  font-size: 0; color: var(--accent);
  transition: background 0.35s, color 0.35s, transform 0.5s var(--ease), box-shadow 0.35s;
}
a.work-row .arrow::before {
  content: ""; position: absolute; inset: -1px; border-radius: 50%;
  border: 1px solid var(--accent);
  animation: ping 2.2s cubic-bezier(0.2, 0.6, 0.3, 1) infinite;
}
a.work-row .arrow::after { content: "↗"; font-size: 18px; line-height: 1; animation: nudge 1.8s ease-in-out infinite; }
a.work-row + a.work-row .arrow::before { animation-delay: -1.1s; }
@keyframes ping { 0% { transform: scale(1); opacity: 0.8; } 100% { transform: scale(2); opacity: 0; } }
@keyframes nudge { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(3px, -3px); } }
a.work-row:hover .arrow, a.work-row:focus-visible .arrow, a.work-row.is-hot .arrow {
  background: var(--accent); color: var(--on-accent);
  transform: scale(1.15) rotate(45deg);
  box-shadow: 0 0 26px rgba(var(--accent-rgb), 0.55);
}
a.work-row:hover .arrow::before, a.work-row:focus-visible .arrow::before { animation-duration: 0.9s; }
a.work-row:hover .arrow::after, a.work-row:focus-visible .arrow::after { animation: none; }
a.work-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* ------------------------------------------------------------------ credentials */

.credential-shelf { margin-top: 72px; }
.shelf-rule {
  height: 1px; margin-bottom: 28px;
  transform-origin: left center;
  background: linear-gradient(90deg, var(--accent), rgba(var(--accent-rgb), 0) 78%);
}
.shelf-group + .shelf-group { margin-top: 42px; }
.badge-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-top: 28px; }
.badge-grid--credly { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.badge-grid--elastic { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.shelf-group .badge-grid { margin-top: 0; }
.badge {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 18px 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  /* clear over the plate (coin / image), dark glass under the text */
  background: linear-gradient(180deg, transparent 0, transparent 150px, var(--surface) 196px);
  transition: border-color 0.3s, background 0.3s;
}
.badge:hover, .badge:focus-visible { z-index: 1; border-color: rgba(var(--accent-rgb), 0.45); background: linear-gradient(180deg, transparent 0, transparent 150px, var(--surface-2) 196px); }
.badge-plate { width: 100%; height: 156px; display: grid; place-items: center; }
.badge-float { display: grid; place-items: center; }
.badge img { width: 116px; height: 116px; object-fit: contain; filter: drop-shadow(0 12px 18px var(--badge-shadow)); transition: transform 0.45s var(--ease), opacity 0.4s; }
.badge:hover img, .badge:focus-visible img { transform: scale(1.05); }
.badge h3 { margin: 0; max-width: 22ch; font-size: 14px; font-weight: 500; line-height: 1.3; letter-spacing: -0.02em; text-wrap: balance; }
.badge small { margin-top: auto; color: var(--ink-faint); font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; }
/* when a coin (ui anchor) takes over the plate, the flat image steps aside; it stays in the DOM */
.badge.has-anchor .badge-plate img, .badge-plate.has-anchor img, .badge .has-anchor img { opacity: 0; }
html.gl-lost .badge img, html.no-webgl .badge img { opacity: 1 !important; }

/* ------------------------------------------------------------------ experiments / contact */

#experiments { padding: 72px 0; }
#contact { padding-bottom: 140px; }
.contact-stage { position: relative; z-index: 1; width: min(1180px, calc(100% - 48px)); height: 360px; margin: 0 auto 8px; }
.mail-slot { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.mail-note { color: var(--ink-dim); font-size: 14px; }
.mail-addr {
  padding: 12px 22px; border-radius: 999px;
  border: 1px solid var(--accent);
  background: rgba(var(--bg-rgb), 0.4);
  font-family: var(--font-mono); font-size: 15px; letter-spacing: 0.01em; color: var(--ink);
  transition: background 0.3s, box-shadow 0.3s, transform 0.4s var(--ease);
}
.mail-addr .cap { color: var(--accent); font-weight: 600; }
.mail-addr .at { color: var(--accent-2); }
.mail-addr:hover, .mail-addr:focus-visible { background: rgba(var(--accent-rgb), 0.1); box-shadow: 0 0 24px rgba(var(--accent-rgb), 0.25); transform: translateY(-2px); }
.mail-addr:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ------------------------------------------------------------------ footer */

.site-footer {
  border-top: 1px solid var(--line-strong);
  padding: 28px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: linear-gradient(180deg, rgba(var(--bg-rgb), 0.3), rgba(var(--bg-rgb), 0.82));
}
.site-footer a { display: inline-block; padding: 14px 5px; margin: -14px -5px; transition: color 0.3s; }
.site-footer a:hover { color: var(--accent); }

/* ------------------------------------------------------------------ case pages (works/*.html) */

.case { padding: 54px 0 96px; }
.case-hero { position: relative; }
.case-hero h1 {
  margin: 8px 0 18px;
  max-width: 14ch;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(48px, 7vw, 88px);
  line-height: 0.92;
  letter-spacing: -0.04em;
  text-shadow: 0 0 36px rgba(var(--bg-rgb), 0.85);
}
.back {
  display: inline-block;
  margin-bottom: 28px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.back::before { content: "←"; margin-right: 0.7em; color: var(--accent); display: inline-block; transition: transform 0.4s var(--ease); }
.back:hover { color: var(--ink); }
.back:hover::before { transform: translateX(-4px); }
.page-hero { padding: 72px 0 20px; }
.page-hero h1 { font-family: var(--font-serif); font-size: clamp(48px, 8vw, 96px); line-height: 0.88; margin: 0; letter-spacing: -0.035em; }
.meta-row {
  display: flex; gap: 22px; flex-wrap: wrap; margin-top: 22px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint);
}
.stack { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0; }

.case-read {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
  margin-top: 56px;
}
.chain {
  position: sticky;
  top: calc(var(--header) + 22px);
  margin: 0; padding: 0; list-style: none;
  display: flex; flex-direction: column; gap: 8px;
}
.chain li {
  margin: 0;
  padding: 12px 14px 13px 14px;
  border: 1px solid var(--line-strong);
  border-left: 2px solid transparent;
  border-radius: 14px;
  background: var(--chain-bg);
  color: var(--ink-dim);
  transition: border-color 0.35s var(--ease), color 0.35s var(--ease), background 0.35s var(--ease), box-shadow 0.5s var(--ease);
}
.chain li i { display: block; margin-bottom: 6px; font-family: var(--font-mono); font-style: normal; font-size: 10px; letter-spacing: 0.16em; color: var(--ink-faint); transition: color 0.35s; }
.chain li b { display: block; font-weight: 500; font-size: 15px; letter-spacing: -0.02em; color: inherit; }
.chain li span { display: block; margin-top: 4px; font-size: 13px; line-height: 1.4; }
.chain li.is-on { border-left-color: var(--accent); background: rgba(var(--accent-rgb), 0.05); color: var(--ink); box-shadow: -14px 0 30px -18px rgba(var(--accent-rgb), 0.55); }
.chain li.is-on i { color: var(--accent); }
.read-line { margin: 0 0 28px; max-width: 62ch; font-size: 19px; line-height: 1.5; text-shadow: 0 0 22px rgba(var(--bg-rgb), 0.9); }

.case-shot {
  margin: 8px 0 56px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  overflow: hidden;
  background: var(--bg);
}
.shot-frame { overflow-x: auto; }
.case-shot img { width: 100%; min-width: 1048px; height: auto; }
.case-shot.fit img { min-width: 0; max-width: 100%; }
.case-shot figcaption {
  padding: 14px 18px 16px;
  background: var(--bg-2);
  color: var(--ink-dim);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.45;
  letter-spacing: 0.02em;
}
/* once an image plane draws the screenshot, the figure steps back: the plane carries the frame and border */
.case-shot.is-plane { border-color: transparent; background: transparent; overflow: visible; }
.case-shot.is-plane .shot-frame { overflow-y: visible; }
.case-shot.is-plane figcaption {
  background: transparent; padding: 14px 4px 0; opacity: 0; translate: 0 8px;
  transition: opacity 0.9s var(--ease) 0.2s, translate 1s var(--ease) 0.2s;
}
.case-shot.is-plane.is-in figcaption { opacity: 1; translate: 0 0; }
.case-aside {
  margin-top: 12px; padding-top: 36px;
  scroll-margin-top: calc(var(--header) + 18px);
  border-top: 1px solid var(--line-strong);
}
.case-shot .shot-frame { position: relative; }
.case-shot img { cursor: zoom-in; }
.case-shot img, .case-shot .shot-frame { -webkit-tap-highlight-color: transparent; }
.shot-frame { overscroll-behavior-x: contain; }
.case-shot .shot-frame::after {
  content: "Enlarge";
  position: absolute; right: 12px; top: 12px;
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(var(--bg-rgb), 0.82);
  backdrop-filter: blur(8px);
  color: var(--ink); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  opacity: 0; transform: translateY(-4px);
  transition: opacity 0.3s, transform 0.4s var(--ease);
  pointer-events: none;
}
.case-shot:hover .shot-frame::after, .case-shot:focus-within .shot-frame::after { opacity: 1; transform: none; }
@media (hover: none) { .case-shot .shot-frame::after { opacity: 0.85; transform: none; } }
.case-shot img:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
html.gl-lost .case-shot img { opacity: 1 !important; }

.facts { display: flex; flex-wrap: wrap; gap: 10px 36px; margin: 26px 0 0; padding: 16px 0; border-block: 1px solid var(--line-strong); }
.facts div { display: flex; align-items: baseline; gap: 10px; }
.facts dt { font-family: var(--font-mono); font-weight: 500; font-size: 26px; color: var(--accent); }
.facts dd { margin: 0; color: var(--ink-dim); font-size: 14px; }

.codebox {
  --tk-s: #e6c07b; --tk-f: #7fd0ff; --tk-c: #6c7a72;
  margin: 8px 0 56px; border: 1px solid var(--line-strong); border-radius: 18px; overflow: hidden; background: var(--surface);
}
.codebar {
  display: flex; justify-content: space-between; gap: 12px; padding: 12px 18px;
  background: var(--surface-3); color: var(--ink-faint);
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em;
  border-bottom: 1px solid var(--line-strong);
}
.codebox pre { margin: 0; padding: 20px 22px; overflow-x: auto; font: 14px/1.65 var(--font-mono); color: var(--ink); }
.tk-k { color: var(--accent); } .tk-s { color: var(--tk-s); } .tk-f { color: var(--tk-f); } .tk-c { color: var(--tk-c); }

.gal-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 14px; background: var(--surface-3); border-bottom: 1px solid var(--line-strong); }
.chip {
  padding: 6px 13px; border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-size: 13px; letter-spacing: 0.02em; color: var(--ink-dim);
  transition: color 0.25s, border-color 0.25s, background 0.25s;
}
.chip:hover { color: var(--ink); border-color: var(--accent); }
.chip[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.diagram {
  margin-top: 40px; border: 1px solid var(--line-strong); border-radius: 22px;
  background:
    linear-gradient(180deg, var(--panel-top), var(--panel-bottom)),
    repeating-linear-gradient(0deg, transparent, transparent 31px, rgba(var(--accent-rgb), 0.04) 32px),
    repeating-linear-gradient(90deg, transparent, transparent 31px, rgba(var(--accent-rgb), 0.04) 32px);
  padding: 24px 12px 8px; overflow: auto;
}
.diagram svg { width: 100%; height: auto; min-width: 820px; }
.node rect, .node ellipse { fill: var(--surface-2); stroke: rgba(var(--accent-rgb), 0.45); stroke-width: 1.2; }
.node text { fill: var(--ink); font-family: var(--font-mono); font-size: 11px; }
.node .sub { fill: var(--ink-faint); font-size: 9px; }
.link { fill: none; stroke: rgba(var(--accent2-rgb), 0.45); stroke-width: 1.2; }
.packet { fill: var(--accent); }
.legend { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 16px; color: var(--ink-faint); font-family: var(--font-mono); font-size: 11px; }
.placeholder-note { margin-top: 28px; padding: 18px 20px; border-left: 2px solid var(--accent); background: rgba(var(--accent-rgb), 0.04); color: var(--ink-dim); font-size: 14px; }

/* ------------------------------------------------------------------ lightbox */

html.lb-open { overflow: hidden; }
.lb { position: fixed; inset: 0; z-index: 200; }
.lb[hidden] { display: none; }
.lb-bg { position: absolute; inset: 0; background: rgba(var(--bg-rgb), 0.96); }
.lb-stage { position: absolute; inset: 0; overflow: hidden; display: flex; padding: 28px 32px 76px; }
.lb-stage.is-actual { overflow: auto; touch-action: pan-x pan-y pinch-zoom; overscroll-behavior: contain; }
.lb, .lb * { cursor: zoom-out; }
.lb-card { position: relative; display: block; margin: auto; flex: none; border-radius: 10px; box-shadow: 0 40px 120px rgba(0, 0, 0, 0.5); will-change: transform; }
.lb-img { display: block; width: 100%; height: 100%; max-width: none; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--bg-2); user-select: none; -webkit-user-drag: none; }
.lb-sheen { position: absolute; inset: 0; overflow: hidden; border-radius: 10px; pointer-events: none; }
.lb-sheen i { position: absolute; top: -25%; bottom: -25%; left: 0; width: 34%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.32), transparent); transform: skewX(-18deg); opacity: 0; }
.lb-bar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 14px 32px 18px;
  font-family: var(--font-mono); font-size: 12px; line-height: 1.45; letter-spacing: 0.02em; color: var(--ink-dim);
  background: linear-gradient(0deg, rgba(var(--bg-rgb), 0.95), rgba(var(--bg-rgb), 0));
}
.lb-hint { flex: none; color: var(--ink-faint); letter-spacing: 0.12em; text-transform: uppercase; font-size: 11px; }
.lb-bar { padding-right: 132px; }
.lb-close {
  position: absolute; right: 24px; bottom: 14px; z-index: 3;
  min-width: 44px; min-height: 44px; padding: 0 18px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  background: rgba(var(--bg-rgb), 0.8); color: var(--ink);
  font: 500 11px/1 var(--font-mono); letter-spacing: 0.16em; text-transform: uppercase;
  transition: color 0.3s, border-color 0.3s;
}
.lb-close:hover, .lb-close:focus-visible { color: var(--accent); border-color: var(--accent); }
.lb-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 700px) {
  .lb-stage { padding: 16px 12px 88px; }
  .lb-bar { flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px 130px 16px 16px; }
  .lb-close { right: 12px; bottom: 12px; }
}

/* ------------------------------------------------------------------ cursor ring */

.cursor, .cursor-dot { position: fixed; left: 0; top: 0; z-index: 300; pointer-events: none; opacity: 0; will-change: transform; }
.cursor {
  width: 34px; height: 34px; margin: -17px 0 0 -17px;
  border: 1px solid rgba(var(--ink-rgb), 0.45); border-radius: 50%;
  transition: opacity 0.3s, width 0.4s var(--ease), height 0.4s var(--ease), margin 0.4s var(--ease), border-color 0.3s, background 0.3s, scale 0.3s var(--ease);
}
.cursor-dot { width: 4px; height: 4px; margin: -2px 0 0 -2px; border-radius: 50%; background: var(--accent); transition: opacity 0.3s; }
.cursor.on, .cursor-dot.on { opacity: 1; }
.cursor[data-mode="link"] { width: 58px; height: 58px; margin: -29px 0 0 -29px; border-color: var(--accent); background: transparent; }
.cursor[data-mode="view"] { width: 78px; height: 78px; margin: -39px 0 0 -39px; border-color: var(--accent); background: rgba(var(--accent-rgb), 0.06); }
.cursor[data-mode="view"]::after {
  content: "Enlarge"; position: absolute; inset: 0; display: grid; place-items: center;
  font: 500 10px/1 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent);
}
html.lb-open .cursor, html.lb-open .cursor[data-mode] { width: 64px; height: 64px; margin: -32px 0 0 -32px; border-color: var(--accent); background: transparent; }
html.lb-open .cursor::after {
  content: "Close"; position: absolute; inset: 0; display: grid; place-items: center;
  font: 500 10px/1 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent);
}
.cursor.down { scale: 0.86; }
.has-cursor .lb, .has-cursor .lb * { cursor: none; }

/* ------------------------------------------------------------------ page transition curtain + intro reveal */

html.js-3d::after {
  content: "";
  position: fixed; inset: 0; z-index: 400; pointer-events: none;
  background: linear-gradient(to bottom, var(--bg) calc(100% - 2px), var(--accent) calc(100% - 2px));
  transform: scaleY(1); transform-origin: top;
  transition: transform 0.85s var(--ease-io);
}
html.js-3d.is-ready::after { transform: scaleY(0); }
html.js-3d.is-ready.is-leaving::after {
  background: linear-gradient(to top, var(--bg) calc(100% - 2px), var(--accent) calc(100% - 2px));
  transform: scaleY(1); transform-origin: bottom;
  transition-duration: 0.55s;
}
html.js-3d.reveal-off::after { display: none; }

/* intro: hero / case head arrive after html.is-ready (set by chrome.intro) */
html.js-3d:not(.is-ready):not(.reveal-off) :is(.hero-copy, .case-hero) > * { opacity: 0; translate: 0 22px; }
html.js-3d :is(.hero-copy, .case-hero) > * { transition: opacity 0.9s var(--ease), translate 1.2s var(--ease); }
html.js-3d :is(.hero-copy, .case-hero) > :nth-child(2) { transition-delay: 0.08s; }
html.js-3d :is(.hero-copy, .case-hero) > :nth-child(3) { transition-delay: 0.16s; }
html.js-3d :is(.hero-copy, .case-hero) > :nth-child(4) { transition-delay: 0.24s; }
html.js-3d :is(.hero-copy, .case-hero) > :nth-child(5) { transition-delay: 0.32s; }
html.js-3d :is(.hero-copy, .case-hero) > :nth-child(6) { transition-delay: 0.4s; }
/* the h1 carries its intro in its words (chrome.js splits it): the block itself stays put */
html.js-3d:not(.is-ready):not(.reveal-off) :is(.hero-copy, .case-hero) > h1[data-split] { opacity: 1; translate: none; }
html.js-3d:not(.is-ready):not(.reveal-off) :is(.hero h1, .case-hero h1)[data-split] .wi { translate: 0 120%; }
html.js-3d :is(.hero h1, .case-hero h1)[data-split] .wi { transition: translate 1.3s var(--ease) calc(0.12s + var(--i, 0) * 80ms); }
:is(.hero h1, .case-hero h1) .w { padding: 0.06em 0.1em 0.3em; margin: -0.06em -0.1em -0.3em; }
html.js-3d:not(.is-ready):not(.reveal-off) .chain li { opacity: 0; translate: 0 12px; }
html.js-3d .chain li { transition: opacity 0.7s var(--ease), translate 0.9s var(--ease), border-color 0.35s var(--ease), color 0.35s var(--ease), background 0.35s var(--ease), box-shadow 0.5s var(--ease); }
html.js-3d .chain li:nth-child(1) { transition-delay: 0.3s, 0.3s, 0s, 0s, 0s, 0s; }
html.js-3d .chain li:nth-child(2) { transition-delay: 0.36s, 0.36s, 0s, 0s, 0s, 0s; }
html.js-3d .chain li:nth-child(3) { transition-delay: 0.42s, 0.42s, 0s, 0s, 0s, 0s; }
html.js-3d .chain li:nth-child(4) { transition-delay: 0.48s, 0.48s, 0s, 0s, 0s, 0s; }
html.js-3d .chain li:nth-child(5) { transition-delay: 0.54s, 0.54s, 0s, 0s, 0s, 0s; }
html.js-3d .chain li:nth-child(n+6) { transition-delay: 0.6s, 0.6s, 0s, 0s, 0s, 0s; }

/* reveal on scroll (chrome.js adds .is-in). Keep this selector list in sync with REVEAL_SEL in chrome.js.
   Elements marked data-owned (or inside one) are skipped: a module animates those itself. */
html.js-3d:not(.reveal-off) :is([data-reveal], .sec-label, .prose p, .lede, .read-line, .card, .work-row, .badge, .case-shot, .about-aside, .codebox, .facts, .case-aside, .shelf-group):not(.is-in):not([data-owned]):not([data-owned] *):not(.hero *):not(.case-hero *) {
  opacity: 0; translate: 0 26px;
}
html.js-3d :is([data-reveal], .sec-label, .prose p, .lede, .read-line, .card, .work-row, .badge, .case-shot, .about-aside, .codebox, .facts, .case-aside, .shelf-group).is-in {
  opacity: 1; translate: 0 0;
  transition: opacity 0.9s var(--ease) var(--d, 0s), translate 1.1s var(--ease) var(--d, 0s), border-color 0.3s, transform 0.4s var(--ease), background 0.3s;
}
html.js-3d:not(.reveal-off) :is(section, .case-aside) h2:not([data-split]):not(.is-in) { opacity: 0; }
/* headline words rise out of a mask (chrome.js splits h2 into .w > .wi) */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 0.04em 0.14em; margin: 0 -0.04em -0.14em; }
.wi { display: inline-block; }
html.js-3d:not(.reveal-off) :is(section, .case-aside) h2[data-split]:not(.is-in) .wi { translate: 0 112%; }
html.js-3d :is(section, .case-aside) h2[data-split].is-in .wi { translate: 0 0; transition: translate 1.15s var(--ease) calc(var(--i, 0) * 70ms + var(--d, 0s)); }
html.js-3d:not(.reveal-off) .shelf-rule:not(.is-in) { transform: scaleX(0); }
html.js-3d .shelf-rule.is-in { transform: none; transition: transform 1.3s var(--ease) var(--d, 0s); }

/* ------------------------------------------------------------------ calm / reduced motion */

html[data-calm] .ticker-track { animation-duration: 90s; }
html[data-calm] a.work-row::after,
html[data-calm] a.work-row .arrow::before,
html[data-calm] a.work-row .arrow::after { animation: none; }
html[data-calm] .status-pill i { animation-duration: 6s; }
html[data-calm] :is([data-reveal], .sec-label, .prose p, .lede, .read-line, .card, .work-row, .badge, .case-shot):not(.is-in) { translate: 0 10px !important; }
html[data-calm]::after { transition-duration: 0.35s; }
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation-duration: 90s; }
  a.work-row::after, a.work-row .arrow::before, a.work-row .arrow::after { animation: none; }
  html.js-3d::after { transition-duration: 0.35s; }
}

/* ------------------------------------------------------------------ no WebGL: the page is still complete */

html.no-webgl #stage { display: none; }
html.no-webgl body {
  background:
    radial-gradient(110% 70% at 78% 0%, rgba(var(--accent-rgb), 0.07), transparent 58%),
    radial-gradient(90% 70% at 6% 100%, rgba(var(--accent2-rgb), 0.06), transparent 62%),
    var(--bg);
  background-attachment: fixed;
}
html.no-webgl .card .obj { display: none; }
html.no-webgl .card { background: linear-gradient(180deg, var(--card-top), var(--card-bottom)); }
html.no-webgl .badge { background: var(--surface); }
html.no-webgl .badge:hover, html.no-webgl .badge:focus-visible { background: var(--surface-2); }
html.no-webgl .card { min-height: 0; }
html.no-webgl #contact { padding-top: 0; }
html.no-webgl .works-stage, html.no-webgl .contact-stage { display: none; }
html.no-webgl .site-header { background: rgba(var(--bg-rgb), 0.9); }
html.no-webgl .hero-stage {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 400' fill='none' stroke='%23d6ff3c' stroke-opacity='.28' stroke-width='1'%3E%3Cpath d='M80 300 L150 190 L260 230 L320 110 M150 190 L190 80 L320 110 M260 230 L330 320 L80 300 M190 80 L90 110 L150 190'/%3E%3Cg fill='%23070807'%3E%3Ccircle cx='80' cy='300' r='5'/%3E%3Ccircle cx='150' cy='190' r='7'/%3E%3Ccircle cx='260' cy='230' r='5'/%3E%3Ccircle cx='320' cy='110' r='7'/%3E%3Ccircle cx='190' cy='80' r='5'/%3E%3Ccircle cx='330' cy='320' r='5'/%3E%3Ccircle cx='90' cy='110' r='4'/%3E%3C/g%3E%3Ccircle cx='320' cy='110' r='3' fill='%23d6ff3c' stroke='none'/%3E%3C/svg%3E") center / min(100%, 420px) no-repeat;
  min-height: 380px;
}

/* ------------------------------------------------------------------ responsive */

@media (max-width: 1100px) {
  .badge-grid, .badge-grid--credly, .badge-grid--elastic { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .hero, .split { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .hero { align-items: start; }
  .hero-copy { padding: 28px 20px 0; }
  .hero-stage { order: -1; min-height: min(46vh, 400px); min-height: min(46svh, 400px); height: auto; }
  .about-aside { max-width: none; padding-top: 8px; }
  .nav { display: none; }
  .nav.open {
    display: flex;
    position: fixed; top: var(--header); right: 0; left: 0;
    flex-direction: column; align-items: flex-start; gap: 6px;
    padding: 20px 28px 32px;
    background: rgba(var(--bg-rgb), 0.94);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line-strong);
    font-family: var(--font-serif); font-size: 38px; letter-spacing: -0.02em; text-transform: none;
  }
  .nav.open a { padding: 6px 0; color: var(--ink); }
  .nav.open a::after { bottom: 4px; }
  .menu-btn { display: block; font-family: var(--font-mono); letter-spacing: 0.16em; text-transform: uppercase; font-size: 12px; color: var(--accent); padding: 6px 2px; }
}
@media (max-width: 800px) {
  :root { --header: 64px; }
  .site-header { padding: 0 18px; }
  .site-header .status-pill { display: none; }
  .wrap { width: calc(100% - 40px); }
  .wide { width: calc(100% - 32px); }
  section { padding: 68px 0; }
  .card { --obj-h: 200px; }
  .card .obj { height: 200px; }
  .contact-stage { height: 300px; width: calc(100% - 40px); }
  .work-row { grid-template-columns: 40px minmax(0, 1fr) auto; column-gap: 14px; padding: 22px 0; }
  .work-row h3 { font-size: 21px; }
  .case { padding: 36px 0 72px; }
  .case-read { grid-template-columns: 1fr; gap: 28px; }
  .chain { position: static; }
  .case-shot.fit img { min-width: 980px; }
  .read-line { font-size: 18px; }
  .site-footer { padding: 24px 20px; font-size: 12px; }
  .calm-toggle { height: 40px; min-width: 40px; justify-content: center; }
  .menu-btn { padding: 12px 10px; margin-right: -10px; }
}
@media (max-width: 720px) {
  .badge-grid, .badge-grid--credly, .badge-grid--elastic { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .badge-plate { height: 132px; }
  .badge img { width: 96px; height: 96px; }
}
@media (max-width: 640px) {
  .hero { padding-top: 12px; }
  .hero-stage { min-height: clamp(170px, 30svh, 300px); }
  .hero-copy { padding-top: 12px; }
  html.no-webgl .hero-stage { min-height: 220px; }
  .grid-3 { grid-template-columns: 1fr; }
  .hero h1 { font-size: clamp(60px, 19vw, 104px); }
  .hero-sub { font-size: 17px; }
  .calm-toggle .calm-label { display: none; }
  .calm-toggle { padding: 0 9px; }
  .badge small, .tag { font-size: 11px; }
}
@media (hover: none) {
  .card:hover { transform: none; }
  /* a tap leaves :hover on: do not keep the lift, the fill or the turned arrow */
  .btn:hover { transform: none; box-shadow: none; border-color: var(--line-strong); }
  .btn-solid:hover { background: var(--accent); border-color: var(--accent); }
  a.work-row:hover:not(.is-hot)::before { transform: scaleX(0); }
  a.work-row:hover:not(.is-hot) .arrow { background: none; color: var(--accent); transform: none; box-shadow: none; }
  a.work-row:hover:not(.is-hot) .yr, a.work-row:hover:not(.is-hot) h3, a.work-row:hover:not(.is-hot) p { translate: 0 0; }
}
