/* Sketchbot Studios — design system
   Dark studio canvas, glass panels, Sketchbot orange + Eye-Pilot blue.
   No build step. Modern CSS: layers, container queries, scroll-driven animation,
   view transitions, light-dark(), :has(), @starting-style. */

@layer reset, tokens, base, layout, components, utilities;

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  * { margin: 0; }
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
  img, picture, video, canvas, svg, model { display: block; max-width: 100%; }
  img { height: auto; }
  [hidden] { display: none !important; }
  input, button, textarea, select { font: inherit; color: inherit; }
  button { background: none; border: 0; cursor: pointer; }
  a { color: inherit; }
  ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  }
}

@layer tokens {
  :root {
    color-scheme: dark light;
    --orange: #f5921f;
    --orange-hi: #ffb457;
    --orange-lo: #c96d08;
    --blue: #0184ff;
    --blue-hi: #4aa7ff;
    --blue-lo: #0a5fd6;
    --pink: #ff4fa3;
    --cyan: #34e5ff;

    --bg: #0b0b0e;
    --bg-2: #121217;
    --bg-3: #1a1a21;
    --fg: #f4f1ec;
    --fg-2: #b9b5ad;
    --fg-3: #7d7a74;
    --line: rgba(255,255,255,.10);
    --line-2: rgba(255,255,255,.18);
    --glass: rgba(255,255,255,.05);
    --glass-2: rgba(255,255,255,.09);
    --shadow: 0 30px 80px rgba(0,0,0,.55), 0 2px 6px rgba(0,0,0,.4);
    --glow-o: 0 0 0 1px rgba(245,146,31,.35), 0 12px 48px rgba(245,146,31,.22);
    --glow-b: 0 0 0 1px rgba(1,132,255,.35), 0 12px 48px rgba(1,132,255,.25);

    --font: "Manrope", "SF Pro Display", ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    --mono: "SF Mono", ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;

    --r-s: 10px; --r: 18px; --r-l: 28px; --r-xl: 40px;
    --gutter: clamp(16px, 4vw, 48px);
    --wide: 1320px; --narrow: 760px;
    --ease: cubic-bezier(.2,.8,.2,1);
    --t: .35s var(--ease);
  }
  @media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) {
      --bg: #f6f3ee; --bg-2: #ffffff; --bg-3: #ece8e1;
      --fg: #15141a; --fg-2: #4d4a55; --fg-3: #8a8791;
      --line: rgba(0,0,0,.10); --line-2: rgba(0,0,0,.18);
      --glass: rgba(255,255,255,.55); --glass-2: rgba(255,255,255,.8);
      --shadow: 0 30px 80px rgba(20,10,0,.14), 0 2px 6px rgba(0,0,0,.06);
    }
  }
  :root[data-theme="light"] {
    --bg: #f6f3ee; --bg-2: #ffffff; --bg-3: #ece8e1;
    --fg: #15141a; --fg-2: #4d4a55; --fg-3: #8a8791;
    --line: rgba(0,0,0,.10); --line-2: rgba(0,0,0,.18);
    --glass: rgba(255,255,255,.55); --glass-2: rgba(255,255,255,.8);
    --shadow: 0 30px 80px rgba(20,10,0,.14), 0 2px 6px rgba(0,0,0,.06);
  }
}

@layer base {
  html { background: var(--bg); }
  body {
    font-family: var(--font);
    font-size: clamp(16px, 1.05vw + 12px, 18px);
    line-height: 1.55;
    color: var(--fg);
    background:
      radial-gradient(900px 600px at 85% -10%, color-mix(in oklab, var(--orange) 12%, transparent), transparent 60%),
      radial-gradient(800px 600px at -10% 20%, color-mix(in oklab, var(--orange-lo) 10%, transparent), transparent 60%),
      var(--bg);
    background-attachment: fixed;
    min-height: 100dvh;
    overflow-x: clip;
  }
  body::before { /* film grain */
    content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .045; mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  }
  h1, h2, h3, h4 { font-weight: 800; letter-spacing: -.02em; line-height: 1.05; text-wrap: balance; }
  h1 { font-size: clamp(2.6rem, 6.5vw, 5.4rem); }
  h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); }
  h3 { font-size: clamp(1.25rem, 1.8vw, 1.6rem); }
  p { text-wrap: pretty; max-width: 68ch; }
  a { text-decoration: none; }
  p a, li a { text-decoration: underline; text-decoration-color: color-mix(in oklab, var(--orange) 60%, transparent); text-underline-offset: .18em; transition: text-decoration-color var(--t); }
  p a:hover, li a:hover { text-decoration-color: var(--orange); }
  :focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 4px; }
  ::selection { background: color-mix(in oklab, var(--orange) 70%, transparent); color: #000; }
  code, kbd { font-family: var(--mono); font-size: .88em; background: var(--glass-2); border: 1px solid var(--line); padding: .1em .4em; border-radius: 6px; }
  pre { font-family: var(--mono); font-size: .85rem; line-height: 1.5; background: #0a0a0c; color: #e8e6e1; border: 1px solid var(--line); border-radius: var(--r); padding: 1.1rem 1.25rem; overflow-x: auto; }
  pre code { background: none; border: 0; padding: 0; }
  hr { border: 0; border-top: 1px solid var(--line); margin: 3rem 0; }
  blockquote { border-left: 3px solid var(--orange); padding-left: 1.2rem; color: var(--fg-2); font-size: 1.1em; }

  /* cross-document view transitions */
  @view-transition { navigation: auto; }
  ::view-transition-old(root) { animation: vt-out .28s var(--ease) both; }
  ::view-transition-new(root) { animation: vt-in .38s var(--ease) both; }
  @keyframes vt-out { to { opacity: 0; transform: translateY(-6px); } }
  @keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }
  .hero-media { view-transition-name: hero-media; }
}

@layer layout {
  .wrap { width: min(100% - 2 * var(--gutter), var(--wide)); margin-inline: auto; }
  .wrap--narrow { width: min(100% - 2 * var(--gutter), var(--narrow)); margin-inline: auto; }
  .section { padding-block: clamp(3.5rem, 8vw, 7.5rem); position: relative; z-index: 1; }
  .section--tight { padding-block: clamp(2rem, 5vw, 4rem); }
  .grid { display: grid; gap: clamp(1rem, 2vw, 1.75rem); }
  .grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
  .grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
  .grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
  .split { display: grid; gap: clamp(1.5rem, 4vw, 4rem); align-items: center; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
  .stack > * + * { margin-top: var(--stack, 1rem); }
  .cluster { display: flex; flex-wrap: wrap; gap: .6rem .8rem; align-items: center; }
  main { position: relative; z-index: 1; }
}

@layer components {
  /* ---------- header ---------- */
  .skip { position: absolute; left: 1rem; top: -4rem; padding: .6rem 1rem; background: var(--orange); color: #000; border-radius: 999px; z-index: 100; font-weight: 700; }
  .skip:focus { top: 1rem; }
  .site-header { position: sticky; top: 0; z-index: 50; padding-block: .75rem; }
  .site-header .bar {
    position: relative; isolation: isolate;
    display: flex; align-items: center; gap: 1rem; justify-content: space-between;
    padding: .55rem .75rem .55rem 1rem; border-radius: 999px;
    border: 1px solid var(--line); box-shadow: 0 10px 40px rgba(0,0,0,.25);
  }
  /* The blur lives on a pseudo-element: putting backdrop-filter on the sticky bar itself makes Safari
     paint child backgrounds (the nav hover pill) at a stale scroll offset. */
  .site-header .bar::before {
    content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
    background: color-mix(in oklab, var(--bg) 72%, transparent);
    -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%);
  }
  .nav a, .theme-toggle, .nav-toggle { transform: translateZ(0); }
  .brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 800; letter-spacing: -.01em; font-size: 1.05rem; }
  .brand img { width: 30px; height: 30px; border-radius: 50%; }
  .brand small { font-weight: 600; color: var(--fg-3); font-size: .8rem; margin-left: .2rem; }
  .nav { display: flex; gap: .15rem; align-items: center; }
  .nav a { padding: .5rem .85rem; border-radius: 999px; font-weight: 600; font-size: .95rem; color: var(--fg-2); transition: background var(--t), color var(--t); }
  .nav a:hover, .nav a[aria-current="page"] { background: var(--glass-2); color: var(--fg); }
  .nav-toggle { display: none; width: 42px; height: 42px; border-radius: 50%; background: var(--glass-2); place-items: center; }
  .nav-toggle svg { width: 20px; height: 20px; }
  .theme-toggle { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--fg-2); background: transparent; transition: background var(--t); }
  .theme-toggle:hover { background: var(--glass-2); }
  .theme-toggle svg { width: 18px; height: 18px; }
  @media (max-width: 900px) {
    .nav-toggle { display: grid; }
    .nav { display: none; position: absolute; left: var(--gutter); right: var(--gutter); top: calc(100% + .25rem); flex-direction: column; align-items: stretch; padding: .5rem;
      background: color-mix(in oklab, var(--bg) 92%, transparent); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--shadow); }
    .site-header:has(.nav-toggle[aria-expanded="true"]) .nav { display: flex; }
    .nav a { padding: .85rem 1rem; }
  }

  /* ---------- buttons / chips ---------- */
  .btn { display: inline-flex; align-items: center; gap: .55rem; padding: .85rem 1.35rem; border-radius: 999px; font-weight: 700; font-size: .98rem; line-height: 1;
    background: var(--fg); color: var(--bg); border: 1px solid transparent; transition: transform var(--t), box-shadow var(--t), background var(--t); will-change: transform; }
  .btn:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0,0,0,.35); }
  .btn:active { transform: translateY(0); }
  .btn--orange { background: linear-gradient(135deg, var(--orange-hi), var(--orange)); color: #1a0d00; }
  .btn--orange:hover { box-shadow: var(--glow-o); }
  .btn--blue { background: linear-gradient(135deg, var(--blue-hi), var(--blue)); color: #fff; }
  .btn--blue:hover { box-shadow: var(--glow-b); }
  .btn--ghost { background: var(--glass); color: var(--fg); border-color: var(--line-2); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
  .btn--ghost:hover { background: var(--glass-2); }
  .btn svg { width: 18px; height: 18px; }
  .chip { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .7rem; border-radius: 999px; font-size: .78rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase;
    background: var(--glass); border: 1px solid var(--line); color: var(--fg-2); }
  .chip--orange { color: var(--orange-hi); border-color: color-mix(in oklab, var(--orange) 45%, transparent); background: rgba(12, 10, 8, .82); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
  .chip--blue { color: var(--blue-hi); border-color: color-mix(in oklab, var(--blue) 45%, transparent); background: rgba(8, 10, 14, .82); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
  /* chips sitting on photography (hero, immersive panels, work cards) get a solid dark ground and a soft shadow */
  .hero .chip, .immersive .chip, .work-card .badge { background: rgba(8, 8, 10, .88); color: #fff; border-color: rgba(255, 255, 255, .22); box-shadow: 0 4px 18px rgba(0, 0, 0, .45); }
  .hero .chip--orange, .immersive .chip--orange, .work-card .badge.chip--orange { color: var(--orange-hi); }
  .hero .chip--blue, .immersive .chip--blue, .work-card .badge.chip--blue { color: var(--blue-hi); }
  .chip .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 2.2s infinite; }
  @keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in oklab, currentColor 60%, transparent); } 70% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
  .eyebrow { font-family: var(--mono); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-3); }
  .eyebrow--orange { color: var(--orange); } .eyebrow--blue { color: var(--blue-hi); }

  /* ---------- glass card ---------- */
  .card { position: relative; border-radius: var(--r-l); background: var(--glass); border: 1px solid var(--line); overflow: clip;
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); transition: transform var(--t), border-color var(--t), box-shadow var(--t); container-type: inline-size; }
  .card:hover { transform: translateY(-4px); border-color: var(--line-2); box-shadow: var(--shadow); }
  .card--pad { padding: clamp(1.25rem, 3cqi, 2rem); }
  .card--orange:hover { box-shadow: var(--glow-o); }
  .card--blue:hover { box-shadow: var(--glow-b); }
  .card h3 { margin-bottom: .5rem; }
  .card p { color: var(--fg-2); }
  .card .icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 1rem; background: color-mix(in oklab, var(--orange) 20%, transparent); color: var(--orange-hi); }
  .card--blue .icon, .accent-blue .card .icon { background: color-mix(in oklab, var(--blue) 20%, transparent); color: var(--blue-hi); }
  .card .icon svg { width: 24px; height: 24px; }

  /* ---------- hero ---------- */
  .hero { position: relative; min-height: min(92dvh, 980px); display: grid; align-items: end; padding-block: clamp(2rem, 6vw, 5rem) clamp(2.5rem, 6vw, 4rem); isolation: isolate; }
  .hero-media { position: absolute; inset: 0; z-index: -1; overflow: clip; border-radius: 0 0 var(--r-xl) var(--r-xl); }
  .hero-media img, .hero-media video { width: 100%; height: 100%; object-fit: cover; object-position: center; animation: hero-zoom 14s var(--ease) both; }
  @keyframes hero-zoom { from { transform: scale(1.08); } to { transform: scale(1); } }
  .hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, var(--bg) 0%, color-mix(in oklab, var(--bg) 70%, transparent) 35%, transparent 70%), linear-gradient(to right, color-mix(in oklab, var(--bg) 55%, transparent), transparent 60%); }
  .hero h1 { max-width: 14ch; }
  .hero .lede { font-size: clamp(1.1rem, 1.6vw, 1.35rem); color: var(--fg-2); max-width: 52ch; }
  .hero-inner { display: grid; gap: 1.4rem; justify-items: start; }
  .hero-inner > p, .hero-inner > h1 { justify-self: stretch; }
  /* cover variant: subject sits on the left of the banner, so the copy moves to the right on wide screens */
  @media (min-width: 900px) {
    .hero--cover .hero-media img { object-position: 20% 55%; }
    .hero--cover .hero-media::after { background: linear-gradient(to top, var(--bg) 0%, color-mix(in oklab, var(--bg) 70%, transparent) 35%, transparent 70%), linear-gradient(to left, color-mix(in oklab, var(--bg) 70%, transparent), color-mix(in oklab, var(--bg) 25%, transparent) 45%, transparent 65%); }
    .hero--cover .hero-inner { margin-left: auto; margin-right: max(var(--gutter), calc((100% - var(--wide)) / 2)); width: min(100% - 2 * var(--gutter), 640px); text-align: right; justify-items: end; }
    .hero--cover .hero-inner > p, .hero--cover .hero-inner > h1 { justify-self: end; }
    .hero--cover .hero-inner .lede { margin-left: auto; }
    .hero--cover .hero-inner .cluster { justify-content: flex-end; }
  }
  .ladder { display: flex; flex-wrap: wrap; gap: .35rem .9rem; font-weight: 800; font-size: clamp(1rem, 1.4vw, 1.2rem); letter-spacing: -.01em; color: var(--fg-2); }
  .ladder span { animation: ladder .8s var(--ease) both; animation-delay: calc(var(--i) * 120ms + 300ms); }
  .ladder span:last-child { color: var(--orange); }
  @keyframes ladder { from { opacity: 0; transform: translateY(8px); } }

  /* ---------- the five beats (from the original cover page) ---------- */
  .beats { display: grid; gap: .75rem; grid-template-columns: repeat(5, minmax(0, 1fr)); }
  @media (max-width: 900px) { .beats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
  @media (max-width: 560px) { .beats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .beats li:last-child { grid-column: span 2; } .beats li:last-child .beat { aspect-ratio: 16 / 9; } }
  .beat { display: block; position: relative; aspect-ratio: 4 / 5; border-radius: var(--r-l); overflow: clip; background: var(--bg-3); border: 1px solid var(--line); isolation: isolate; transition: transform var(--t), box-shadow var(--t), border-color var(--t); }
  .beat img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
  .beat::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.82) 0%, rgba(0,0,0,.25) 45%, transparent 70%); }
  .beat-text { position: absolute; left: .9rem; right: .9rem; bottom: .9rem; z-index: 1; color: #fff; display: grid; gap: .25rem; }
  .beat-text strong { font-size: clamp(1.15rem, 1.6vw, 1.5rem); font-weight: 800; letter-spacing: -.02em; line-height: 1; }
  .beat-text span { font-size: .72rem; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: rgba(255,255,255,.78); opacity: 0; transform: translateY(6px); transition: opacity var(--t), transform var(--t); }
  .beat:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-2); }
  .beat:hover img { transform: scale(1.06); }
  .beat:hover .beat-text span, .beat:focus-visible .beat-text span { opacity: 1; transform: none; }
  .beat--o .beat-text strong { color: var(--orange-hi); }
  @media (hover: none) { .beat-text span { opacity: 1; transform: none; } }

  /* ---------- reveal on scroll (scroll-driven, with JS fallback class) ---------- */
  .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
  .reveal.in { opacity: 1; transform: none; }
  @supports (animation-timeline: view()) {
    .reveal { opacity: 1; transform: none; transition: none; animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 35%; }
    @keyframes reveal { from { opacity: 0; transform: translateY(18px); } }
  }

  /* ---------- work grid ---------- */
  .work-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); grid-auto-flow: dense; }
  .work-card { display: block; position: relative; border-radius: var(--r-l); overflow: clip; aspect-ratio: 4/3; background: var(--bg-3); border: 1px solid var(--line); transition: transform var(--t), box-shadow var(--t); }
  .work-card--wide { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
  .work-grid.is-filtered .work-card--wide { grid-column: auto; grid-row: auto; aspect-ratio: 4/3; }
  @media (max-width: 700px) { .work-card--wide { grid-column: span 1; grid-row: span 1; aspect-ratio: 4/3; } }
  .work-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
  .work-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
  .work-card:hover img { transform: scale(1.05); }
  .work-card .meta { position: absolute; inset: auto 0 0 0; padding: 1.1rem 1.2rem; background: linear-gradient(to top, rgba(0,0,0,.78), transparent); color: #fff; display: grid; gap: .2rem; }
  .work-card .meta strong { font-size: 1.1rem; letter-spacing: -.01em; }
  .work-card .meta span { font-size: .8rem; opacity: .8; }
  .work-card .badge { position: absolute; top: .9rem; left: .9rem; }
  .filters { display: flex; flex-wrap: wrap; gap: .5rem; }
  .filters button { padding: .5rem .9rem; border-radius: 999px; border: 1px solid var(--line); background: var(--glass); color: var(--fg-2); font-weight: 600; font-size: .9rem; transition: background var(--t), color var(--t); }
  .filters button[aria-pressed="true"], .filters button:hover { background: var(--fg); color: var(--bg); }

  /* ---------- gallery / lightbox ---------- */
  .gallery { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); grid-auto-flow: dense; }
  .gallery figure { margin: 0; border-radius: var(--r); overflow: clip; background: var(--bg-3); border: 1px solid var(--line); cursor: zoom-in; position: relative; }
  .gallery figure.landscape { grid-column: span 2; }
  @media (max-width: 600px) { .gallery figure.landscape { grid-column: span 1; } }
  .gallery img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: var(--ar, 4/3); transition: transform 1s var(--ease); }
  .gallery figure:hover img { transform: scale(1.03); }
  .gallery figcaption { position: absolute; inset: auto 0 0 0; padding: .7rem .9rem; font-size: .82rem; background: linear-gradient(to top, rgba(0,0,0,.7), transparent); color: #fff; opacity: 0; transition: opacity var(--t); }
  .gallery figure:hover figcaption { opacity: 1; }
  dialog.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100dvh; width: 100vw; height: 100dvh; margin: 0; }
  dialog.lightbox::backdrop { background: rgba(5,5,8,.92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
  dialog.lightbox .frame { position: fixed; inset: 0; display: grid; place-items: center; padding: clamp(1rem, 4vw, 3rem); }
  dialog.lightbox img { width: auto; height: auto; max-width: min(100%, 94vw); max-height: 86dvh; object-fit: contain; border-radius: var(--r); box-shadow: var(--shadow); }
  dialog.lightbox .cap { position: fixed; left: 50%; bottom: 1.2rem; transform: translateX(-50%); color: #fff; font-size: .9rem; background: rgba(0,0,0,.5); padding: .5rem 1rem; border-radius: 999px; max-width: 90vw; }
  dialog.lightbox .x, dialog.lightbox .prev, dialog.lightbox .next { position: fixed; width: 48px; height: 48px; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; display: grid; place-items: center; font-size: 1.4rem; }
  dialog.lightbox .x { top: 1rem; right: 1rem; } dialog.lightbox .prev { left: 1rem; top: 50%; translate: 0 -50%; } dialog.lightbox .next { right: 1rem; top: 50%; translate: 0 -50%; }
  dialog[open].lightbox { animation: lb-in .25s var(--ease); }
  @keyframes lb-in { from { opacity: 0; scale: .98; } }

  /* ---------- project page ---------- */
  .project-hero { display: grid; gap: 1.25rem; padding-block: 0 1rem; }
  .project-hero .crumbs { margin-bottom: .25rem; }
  .project-hero .media { border-radius: var(--r-xl); overflow: clip; aspect-ratio: 16/9; background: var(--bg-3); border: 1px solid var(--line); box-shadow: var(--shadow); }
  .project-hero .media img { width: 100%; height: 100%; object-fit: cover; }
  .facts { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); padding: 1.5rem; border-radius: var(--r-l); background: var(--glass); border: 1px solid var(--line); }
  .facts dt { font-family: var(--mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-3); margin-bottom: .35rem; }
  .facts dd { font-weight: 600; font-size: .95rem; }
  .pager { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
  .pager a { flex: 1 1 260px; }
  .video { aspect-ratio: 16/9; border-radius: var(--r-l); overflow: clip; border: 1px solid var(--line); background: #000; }
  .video iframe { width: 100%; height: 100%; border: 0; }

  /* ---------- spatial / model viewer ---------- */
  .stage { position: relative; border-radius: var(--r-xl); overflow: clip; aspect-ratio: 4/3; background:
      radial-gradient(60% 50% at 50% 60%, rgba(255,255,255,.08), transparent 70%),
      linear-gradient(180deg, #0f1117, #07080c);
    border: 1px solid var(--line); box-shadow: var(--shadow); container-type: inline-size; }
  .stage--grid { background-image:
      linear-gradient(color-mix(in oklab, var(--cyan) 22%, transparent) 1px, transparent 1px),
      linear-gradient(90deg, color-mix(in oklab, var(--cyan) 22%, transparent) 1px, transparent 1px),
      radial-gradient(60% 50% at 50% 60%, rgba(52,229,255,.18), transparent 70%), linear-gradient(#050608, #050608);
    background-size: 44px 44px, 44px 44px, 100% 100%, 100% 100%; }
  .stage > model, .stage > canvas, .stage > img.poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
  .stage > img.poster { object-fit: cover; }
  .stage model { background: transparent; }
  .stage .hud { position: absolute; left: 1rem; right: 1rem; bottom: 1rem; display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; justify-content: space-between; pointer-events: none; }
  .stage .hud > * { pointer-events: auto; }
  .stage .status { font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-2); background: rgba(0,0,0,.45); padding: .4rem .7rem; border-radius: 999px; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
  .stage .status[data-tier="native"] { color: var(--orange-hi); }
  .stage .status[data-tier="three"] { color: var(--orange-hi); }
  .stage.is-loading::before { content: ""; position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--orange); animation: spin 1s linear infinite; }
  @keyframes spin { to { transform: rotate(360deg); } }
  .stage--tall { aspect-ratio: 16/10; }

  /* immersive environment banner */
  .immersive { position: relative; border-radius: var(--r-xl); overflow: clip; min-height: 420px; display: grid; align-items: end; padding: clamp(1.25rem, 4vw, 2.5rem); isolation: isolate; border: 1px solid var(--line); }
  .immersive img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
  .immersive::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(0,0,0,.85), rgba(0,0,0,.15)); }
  /* the environment <model> stays in the DOM so Safari can enter it, but the poster is what you see until you do */
  .immersive model { position: absolute; left: 0; top: 0; width: 2px; height: 2px; opacity: 0; pointer-events: none; z-index: -3; }
  .immersive .panel { max-width: 640px; color: #fff; display: grid; gap: .8rem; justify-items: start; }
  .immersive .panel > h2, .immersive .panel > p { justify-self: stretch; }
  .immersive .panel p { color: rgba(255,255,255,.8); }

  /* layered app icon (from quads.vision) */
  .app-icon { width: clamp(140px, 24vw, 220px); aspect-ratio: 1; perspective: 700px; margin-inline: auto; }
  .app-icon .coin { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .25s ease-out; filter: drop-shadow(0 26px 40px rgba(1,60,140,.45)); animation: float 6s ease-in-out infinite; }
  .app-icon .layer { position: absolute; inset: 0; border-radius: 22.5%; background-size: cover; backface-visibility: hidden; }
  .app-icon .layer.back { background-image: url("../quads/icon-back.png"); transform: translateZ(-12px); }
  .app-icon .layer.front { background-image: url("../quads/icon-front.png"); transform: translateZ(16px); }
  .app-icon .glare { position: absolute; inset: 0; border-radius: 22.5%; transform: translateZ(20px); mix-blend-mode: screen; pointer-events: none;
    background: radial-gradient(220px 220px at var(--gx, 32%) var(--gy, 24%), rgba(255,255,255,.45), transparent 55%); }
  @keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }

  /* feature list */
  .feature { display: grid; grid-template-columns: 44px 1fr; gap: 1rem; align-items: start; }
  .feature .icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in oklab, var(--orange) 18%, transparent); color: var(--orange-hi); }
  .accent-blue .feature .icon { background: color-mix(in oklab, var(--blue) 18%, transparent); color: var(--blue-hi); }
  .accent-blue :focus-visible { outline-color: var(--blue-hi); }
  .feature .icon svg { width: 22px; height: 22px; }
  .feature h3 { font-size: 1.1rem; margin-bottom: .25rem; }
  .feature p { color: var(--fg-2); font-size: .95rem; }

  /* steps / process */
  .steps { counter-reset: step; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
  .steps > li { counter-increment: step; padding: 1.4rem; border-radius: var(--r-l); background: var(--glass); border: 1px solid var(--line); }
  .steps > li::before { content: counter(step, decimal-leading-zero); font-family: var(--mono); color: var(--orange); font-size: .85rem; letter-spacing: .1em; display: block; margin-bottom: .6rem; }
  .steps h3 { font-size: 1.05rem; margin-bottom: .35rem; }
  .steps p { color: var(--fg-2); font-size: .95rem; }

  /* clients: stats + three counter-scrolling credit lanes */
  .clients { display: grid; gap: clamp(1.5rem, 4vw, 3.5rem); grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; padding: clamp(1.5rem, 4vw, 3rem); border-radius: var(--r-xl); border: 1px solid var(--line); background: linear-gradient(135deg, color-mix(in oklab, var(--orange) 10%, var(--glass)), var(--glass) 60%); }
  @media (max-width: 900px) { .clients { grid-template-columns: 1fr; } }
  .clients-intro h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); margin-top: .5rem; }
  .stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.5rem; margin-top: 1.5rem; }
  .stats dt { font-family: var(--mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-3); margin-bottom: .2rem; }
  .stats dd { font-size: clamp(1.8rem, 3.2vw, 2.6rem); font-weight: 800; letter-spacing: -.03em; line-height: 1; color: var(--fg); }
  .stats dd span { color: var(--orange); font-size: .6em; vertical-align: top; margin-left: .05em; }
  .stats dd .small-note { display: block; font-size: .72rem; font-weight: 600; color: var(--fg-3); letter-spacing: 0; margin-top: .3rem; vertical-align: baseline; margin-left: 0; }
  .lanes { display: grid; gap: .9rem; min-width: 0; }
  .lane { display: grid; gap: .35rem; }
  .lane-label { font-family: var(--mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--orange); }
  .marquee { overflow: hidden; mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
  .marquee ul { display: flex; gap: .5rem; width: max-content; animation: marquee 70s linear infinite; padding-block: .15rem; }
  .lane--rev .marquee ul { animation-direction: reverse; animation-duration: 85s; }
  .marquee li { font-weight: 700; font-size: .92rem; letter-spacing: -.005em; color: var(--fg-2); white-space: nowrap; padding: .45rem .9rem; border-radius: 999px; border: 1px solid var(--line); background: color-mix(in oklab, var(--bg) 55%, transparent); }
  .marquee:hover ul { animation-play-state: paused; }
  @keyframes marquee { to { transform: translateX(-50%); } }
  @media (prefers-reduced-motion: reduce) { .marquee ul { animation: none; flex-wrap: wrap; width: auto; } .marquee { mask: none; -webkit-mask: none; } }

  /* news */
  .post-list { display: grid; gap: .5rem; }
  .post-row { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; padding: 1rem 1.1rem; border-radius: var(--r); border: 1px solid transparent; transition: background var(--t), border-color var(--t); align-items: baseline; }
  .post-row:hover { background: var(--glass); border-color: var(--line); }
  .post-row time { font-family: var(--mono); font-size: .78rem; color: var(--fg-3); }
  .post-row strong { font-size: 1.05rem; letter-spacing: -.01em; }
  .post-row p { color: var(--fg-2); font-size: .92rem; margin-top: .2rem; }
  @media (max-width: 560px) { .post-row { grid-template-columns: 1fr; gap: .2rem; } }
  .prose { font-size: 1.05rem; }
  .prose > * + * { margin-top: 1.1em; }
  .prose img { border-radius: var(--r); border: 1px solid var(--line); margin-block: 1.5em; }
  .prose h2, .prose h3 { margin-top: 1.8em; }
  .prose ul, .prose ol { padding-left: 1.3em; }
  .year-nav { display: flex; flex-wrap: wrap; gap: .4rem; }
  .year-nav a { padding: .4rem .8rem; border-radius: 999px; border: 1px solid var(--line); background: var(--glass); font-weight: 700; font-size: .85rem; color: var(--fg-2); }
  .year-nav a:hover { color: var(--fg); }

  /* contact */
  .contact-card { display: grid; gap: 1.2rem; padding: clamp(1.5rem, 4vw, 3rem); border-radius: var(--r-xl); background: linear-gradient(135deg, color-mix(in oklab, var(--orange) 20%, var(--glass)), color-mix(in oklab, var(--orange-lo) 8%, var(--glass))); border: 1px solid var(--line-2); }
  .contact-card h2 { font-size: clamp(2rem, 4.5vw, 3.6rem); }
  .socials { display: flex; flex-wrap: wrap; gap: .5rem; }
  .socials a { display: inline-flex; align-items: center; gap: .5rem; padding: .55rem .9rem; border-radius: 999px; border: 1px solid var(--line); background: var(--glass); font-weight: 600; font-size: .9rem; color: var(--fg-2); transition: color var(--t), border-color var(--t); }
  .socials a:hover { color: var(--fg); border-color: var(--line-2); }
  .socials svg { width: 16px; height: 16px; }

  /* contact collage */
  .collage { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(90px, 1fr); gap: .75rem; aspect-ratio: 1 / 1.05; }
  .collage figure { margin: 0; border-radius: var(--r); overflow: clip; border: 1px solid var(--line); background: var(--bg-3); box-shadow: 0 10px 30px rgba(0,0,0,.25); }
  .collage img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
  .collage figure:hover img { transform: scale(1.04); }
  .collage .c-a { grid-column: 1 / 3; grid-row: 1 / 3; }
  .collage .c-b { grid-column: 3 / 5; grid-row: 1 / 2; }
  .collage .c-c { grid-column: 3 / 5; grid-row: 2 / 4; }
  .collage .c-e { grid-column: 1 / 3; grid-row: 3 / 4; }
  .collage .c-c img { object-position: 42% 50%; }
  @media (max-width: 700px) { .collage { aspect-ratio: auto; grid-auto-rows: 120px; } }

  /* footer */
  .site-footer { padding-block: 3rem 2rem; border-top: 1px solid var(--line); margin-top: 3rem; color: var(--fg-3); font-size: .9rem; position: relative; z-index: 1; }
  .site-footer .cols { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); margin-bottom: 2rem; }
  .site-footer h4 { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-2); margin-bottom: .7rem; }
  .site-footer li { margin-bottom: .35rem; }
  .site-footer a:hover { color: var(--fg); }
  .site-footer .legal { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 1.2rem; }

  /* spatial hint bar */
  .spatial-hint { display: none; gap: .6rem; align-items: center; padding: .6rem .9rem; border-radius: var(--r); background: color-mix(in oklab, var(--orange) 12%, transparent); border: 1px solid color-mix(in oklab, var(--orange) 35%, transparent); font-size: .85rem; color: var(--fg-2); max-width: 70ch; }
  .spatial-hint.show { display: flex; }
  .spatial-hint svg { width: 18px; height: 18px; flex: none; color: var(--orange); }

  /* big statement */
  .statement { font-size: clamp(1.5rem, 3.2vw, 2.6rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.15; max-width: 26ch; text-wrap: balance; }
  .statement em { font-style: normal; color: var(--orange); }
  .statement .o { color: var(--orange); }

  /* table */
  .table-wrap { overflow-x: auto; border-radius: var(--r); border: 1px solid var(--line); }
  table { border-collapse: collapse; width: 100%; font-size: .92rem; }
  th, td { text-align: left; padding: .7rem .9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
  th { font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-3); background: var(--glass); }
  tr:last-child td { border-bottom: 0; }

  /* breadcrumbs */
  .crumbs { display: flex; flex-wrap: wrap; gap: .4rem; font-size: .85rem; color: var(--fg-3); margin-bottom: 1rem; }
  .crumbs a { color: var(--fg-2); } .crumbs a:hover { color: var(--fg); }
  .crumbs li + li::before { content: "/"; margin-right: .4rem; opacity: .5; }

  /* page header */
  .page-head { padding-block: .25rem clamp(1.5rem, 3vw, 2.5rem); display: grid; gap: 1rem; }
  .page-head p { font-size: 1.15rem; color: var(--fg-2); max-width: 60ch; }
}

@layer utilities {
  .muted { color: var(--fg-2); } .dim { color: var(--fg-3); }
  .o { color: var(--orange); } .b { color: var(--blue-hi); }
  .center { text-align: center; } .center p { margin-inline: auto; }
  .mt-1 { margin-top: 1rem; } .mt-2 { margin-top: 2rem; } .mt-3 { margin-top: 3rem; } .mb-1 { margin-bottom: 1rem; } .mb-2 { margin-bottom: 2rem; }
  .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .hide { display: none !important; }
  .ratio-16-9 { aspect-ratio: 16/9; } .rounded { border-radius: var(--r-l); overflow: clip; }
  .max-60 { max-width: 60ch; }
  .small { font-size: .9rem; }
}
