  :root {
    --bg: #0b0b0c;
    --bg-2: #131315;
    --fg: #ededea;
    --muted: #8a8a86;
    --faint: #2a2a2d;
    --accent: #5fe3b0;
    --sans: "Inter Tight", system-ui, -apple-system, sans-serif;
    --mono: "JetBrains Mono", ui-monospace, monospace;
    --ease: cubic-bezier(.2,.8,.2,1);
    --pad: clamp(16px, 5vw, 64px);
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  html { scroll-behavior: smooth; }
  body {
    background: var(--bg); color: var(--fg); font-family: var(--sans);
    font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
  }
  body.has-cursor, body.has-cursor a, body.has-cursor button { cursor: none; }
  a { color: inherit; text-decoration: none; }
  button { font: inherit; color: inherit; background: none; border: 0; }
  ::selection { background: var(--accent); color: var(--bg); }

  /* ---------- background field ---------- */
  #field { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .9; }
  .grain { position: fixed; inset: -50%; z-index: 1; pointer-events: none; opacity: .05;
    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'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    animation: grain 1.2s steps(4) infinite; }
  @keyframes grain { 0%{transform:translate(0,0)} 25%{transform:translate(-3%,2%)} 50%{transform:translate(2%,-3%)} 75%{transform:translate(-2%,-1%)} }

  /* ---------- cursor ---------- */
  .cursor, .cursor-ring { position: fixed; top: 0; left: 0; z-index: 100; pointer-events: none;
    border-radius: 50%; transform: translate3d(-100px,-100px,0); }
  .cursor { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--fg); mix-blend-mode: difference; }
  .cursor-ring { width: 36px; height: 36px; margin: -18px 0 0 -18px; border: 1px solid rgba(237,237,234,.35);
    display: grid; place-items: center; transition: width .35s var(--ease), height .35s var(--ease), margin .35s var(--ease), background .35s var(--ease), border-color .35s var(--ease); }
  .cursor-ring span { font: 500 10px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--bg); opacity: 0; transition: opacity .2s; }
  .cursor-ring.is-link { width: 56px; height: 56px; margin: -28px 0 0 -28px; border-color: var(--accent); background: rgba(95,227,176,.08); }
  .cursor-ring.is-label { width: 84px; height: 84px; margin: -42px 0 0 -42px; background: var(--accent); border-color: var(--accent); }
  .cursor-ring.is-label span { opacity: 1; }
  .cursor-ring.is-down { width: 24px; height: 24px; margin: -12px 0 0 -12px; }
  .cursor-ring.is-text { width: 2px; height: 28px; margin: -14px 0 0 -1px; border-radius: 1px; background: var(--fg); border-color: transparent; }
  body:not(.has-cursor) .cursor, body:not(.has-cursor) .cursor-ring { display: none; }

  /* ---------- nav ---------- */
  header { position: fixed; top: 0; left: 0; right: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between;
    padding: 20px var(--pad); mix-blend-mode: difference; }
  .logo { font: 500 14px/1 var(--mono); letter-spacing: .02em; display: flex; gap: 10px; align-items: center; }
  .logo i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(95,227,176,.6); animation: pulse 2.4s infinite; }
  @keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(95,227,176,0); } 100% { box-shadow: 0 0 0 0 rgba(95,227,176,0); } }
  nav { display: flex; gap: clamp(14px, 3vw, 32px); align-items: center; font: 400 13px/1 var(--mono); text-transform: lowercase; }
  nav a { position: relative; padding: 6px 0; color: var(--muted); transition: color .25s; }
  nav a:hover, nav a.active { color: var(--fg); }
  nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease); }
  nav a:hover::after, nav a.active::after { transform: scaleX(1); transform-origin: left; }
  .sound { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--faint); border-radius: 99px; font: 400 12px/1 var(--mono); color: var(--muted); transition: border-color .25s, color .25s; }
  .sound:hover { border-color: var(--muted); color: var(--fg); }
  .bars { display: flex; gap: 2px; align-items: flex-end; height: 10px; }
  .bars b { width: 2px; height: 3px; background: currentColor; border-radius: 1px; transition: height .3s; }
  .sound.on { color: var(--accent); border-color: rgba(95,227,176,.4); }
  .sound.on .bars b { animation: eq 1s var(--ease) infinite alternate; }
  .sound.on .bars b:nth-child(2) { animation-delay: -.3s; } .sound.on .bars b:nth-child(3) { animation-delay: -.6s; } .sound.on .bars b:nth-child(4) { animation-delay: -.15s; }
  @keyframes eq { 0% { height: 2px; } 100% { height: 10px; } }

  main { position: relative; z-index: 2; }
  section { padding: 0 var(--pad); }
  .wrap { max-width: 1240px; margin: 0 auto; }

  /* ---------- hero ---------- */
  .hero { min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: clamp(40px, 8vh, 96px); }
  .eyebrow { font: 400 12px/1.4 var(--mono); color: var(--muted); letter-spacing: .04em; display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 28px; }
  .eyebrow .dot { color: var(--accent); }
  h1 { font-weight: 400; font-size: clamp(44px, 9.5vw, 148px); line-height: .95; letter-spacing: -.045em; }
  h1 .line { display: block; overflow: hidden; padding-bottom: .06em; }
  h1 .ch { display: inline-block; transform: translateY(110%); transition: transform 1s var(--ease), color .3s, opacity .3s; will-change: transform; }
  .ready h1 .ch { transform: none; }
  h1 .ch:hover { color: var(--accent); transition: transform .4s var(--ease), color 0s; transform: translateY(-.08em) !important; }
  h1 em { font-style: normal; color: var(--muted); }
  .hero-foot { margin-top: clamp(32px, 6vh, 64px); display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: end; }
  .hero-foot p { max-width: 520px; color: var(--muted); font-size: clamp(16px, 1.4vw, 19px); }
  .hero-foot p strong { color: var(--fg); font-weight: 500; }
  .scroll-hint { font: 400 12px/1 var(--mono); color: var(--muted); display: flex; gap: 10px; align-items: center; }
  .scroll-hint i { width: 1px; height: 40px; background: linear-gradient(var(--fg), transparent); animation: drip 2s var(--ease) infinite; transform-origin: top; }
  @keyframes drip { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

  /* ---------- section heads ---------- */
  .sec { padding-top: clamp(96px, 16vh, 180px); }
  .sec-head { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--faint); padding-top: 18px; margin-bottom: clamp(40px, 7vh, 72px); font: 400 12px/1 var(--mono); color: var(--muted); text-transform: lowercase; }
  .sec-head .n { color: var(--accent); }

  /* ---------- about ---------- */
  .about-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: clamp(32px, 6vw, 96px); }
  .lede { font-size: clamp(26px, 3.4vw, 46px); line-height: 1.15; letter-spacing: -.025em; font-weight: 400; }
  .lede .w { opacity: .18; transition: opacity .5s; }
  .lede .w.lit { opacity: 1; }
  .facts { display: grid; gap: 0; align-content: start; }
  .fact { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--faint); font-size: 15px; }
  .fact span:first-child { font: 400 12px/1.8 var(--mono); color: var(--muted); }
  .fact span:last-child { text-align: right; }
  .clock { font-variant-numeric: tabular-nums; }

  /* ---------- work list ---------- */
  .work { list-style: none; }
  .row { position: relative; display: grid; grid-template-columns: 60px 1.4fr 1fr 120px; gap: 24px; align-items: center; padding: 28px 0; border-bottom: 1px solid var(--faint); transition: padding .5s var(--ease); }
  .row::before { content: ""; position: absolute; inset: 0; background: var(--bg-2); transform: scaleY(0); transform-origin: bottom; transition: transform .5s var(--ease); z-index: -1; }
  .row:hover::before { transform: scaleY(1); }
  .row:hover { padding-left: 20px; padding-right: 20px; }
  .row .idx { font: 400 12px/1 var(--mono); color: var(--muted); }
  .row h3 { font-weight: 400; font-size: clamp(22px, 2.6vw, 36px); letter-spacing: -.02em; line-height: 1.1; }
  .row p { color: var(--muted); font-size: 15px; }
  .row .tag { font: 400 12px/1 var(--mono); color: var(--muted); text-align: right; display: flex; gap: 10px; justify-content: flex-end; align-items: center; }
  .row .arrow { display: inline-block; transition: transform .5s var(--ease), color .3s; }
  .row:hover .arrow { transform: rotate(-45deg); color: var(--accent); }
  .preview { position: fixed; top: 0; left: 0; width: 300px; height: 200px; z-index: 40; pointer-events: none; border-radius: 6px; overflow: hidden;
    opacity: 0; transform: translate3d(-50%, -50%, 0) scale(.8); transition: opacity .3s, transform .4s var(--ease); }
  .preview.on { opacity: 1; }
  .preview canvas { width: 100%; height: 100%; display: block; }

  /* ---------- stack ---------- */
  .stack { display: flex; flex-wrap: wrap; gap: 10px; }
  .chip { font: 400 13px/1 var(--mono); padding: 12px 16px; border: 1px solid var(--faint); border-radius: 99px; color: var(--muted);
    transition: color .25s, border-color .25s, background .25s, transform .4s var(--ease); }
  .chip:hover { color: var(--bg); background: var(--accent); border-color: var(--accent); }

  /* ---------- notes ---------- */
  .notes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--faint); border: 1px solid var(--faint); }
  .note { background: var(--bg); padding: 28px; min-height: 180px; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; transition: background .4s; }
  .note:hover { background: var(--bg-2); }
  .note .yr { font: 400 12px/1 var(--mono); color: var(--accent); }
  .note h4 { font-weight: 400; font-size: 20px; letter-spacing: -.01em; line-height: 1.25; }
  .note p { color: var(--muted); font-size: 14px; }

  /* ---------- contact ---------- */
  .contact { padding-bottom: 48px; }
  .big { display: inline-block; font-size: clamp(40px, 10vw, 160px); letter-spacing: -.05em; line-height: .95; font-weight: 400; position: relative; }
  .big .u { position: absolute; left: 0; right: 0; bottom: -.05em; height: 2px; background: var(--fg); transform: scaleX(.15); transform-origin: left; transition: transform .8s var(--ease); }
  .big:hover .u { transform: scaleX(1); background: var(--accent); }
  .contact-sub { margin-top: 28px; color: var(--muted); display: flex; gap: 12px; align-items: center; font: 400 13px/1 var(--mono); }
  .links { margin-top: clamp(64px, 12vh, 140px); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; font: 400 13px/1 var(--mono); color: var(--muted); border-top: 1px solid var(--faint); padding-top: 22px; }
  .links nav { gap: 24px; }
  .magnetic { display: inline-block; will-change: transform; transition: transform .5s var(--ease); }

  /* ---------- toast ---------- */
  .toast { position: fixed; left: 50%; bottom: 28px; z-index: 90; transform: translate(-50%, 200%); opacity: 0; background: var(--fg); color: var(--bg); font: 500 12px/1 var(--mono); padding: 12px 16px; border-radius: 99px; transition: transform .5s var(--ease), opacity .3s; }
  .toast.on { transform: translate(-50%, 0); opacity: 1; }

  /* ---------- reveal ---------- */
  .rv { opacity: 0; transform: translateY(24px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
  .rv.in { opacity: 1; transform: none; }

  @media (max-width: 860px) {
    nav .hide-sm { display: none; }
    .about-grid { grid-template-columns: 1fr; }
    .row { grid-template-columns: 32px 1fr; gap: 6px 14px; }
    .row p { grid-column: 2; }
    .row .tag { grid-column: 2; justify-content: flex-start; }
    .notes { grid-template-columns: 1fr; }
    .hero-foot { grid-template-columns: 1fr; }
    .scroll-hint { display: none; }
  }
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
    h1 .ch, .rv { transform: none; opacity: 1; }
    .lede .w { opacity: 1; }
  }

  /* =================== CASE STUDIES =================== */
  .case-hero { min-height: 88svh; display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: clamp(40px, 7vh, 80px); }
  .case-hero h1 { font-size: clamp(40px, 7.4vw, 112px); }
  .back { display: inline-flex; gap: 10px; align-items: center; font: 400 12px/1 var(--mono); color: var(--muted); margin-bottom: 36px; transition: color .25s; }
  .back:hover { color: var(--fg); }
  .back .arrow { display: inline-block; transition: transform .5s var(--ease); }
  .back:hover .arrow { transform: translateX(-6px); }
  .meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: clamp(36px, 6vh, 64px); border-top: 1px solid var(--faint); padding-top: 20px; }
  .meta div { display: grid; gap: 8px; font-size: 15px; }
  .meta span { font: 400 12px/1 var(--mono); color: var(--muted); }
  .meta a { border-bottom: 1px solid var(--faint); transition: border-color .25s, color .25s; }
  .meta a:hover { border-color: var(--accent); color: var(--accent); }

  .split { display: grid; grid-template-columns: 1fr 1.6fr; gap: clamp(32px, 6vw, 96px); }
  .split h2 { font-weight: 400; font-size: clamp(24px, 2.6vw, 34px); letter-spacing: -.02em; line-height: 1.15; }
  .prose { display: grid; gap: 20px; color: #c9c9c4; font-size: clamp(17px, 1.3vw, 19px); max-width: 680px; }
  .prose strong { color: var(--fg); font-weight: 500; }
  .prose ul { display: grid; gap: 12px; list-style: none; }
  .prose li { position: relative; padding-left: 26px; }
  .prose li::before { content: "→"; position: absolute; left: 0; color: var(--accent); font-family: var(--mono); font-size: 14px; top: 2px; }

  .stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--faint); border: 1px solid var(--faint); }
  .stat { background: var(--bg); padding: clamp(20px, 2.4vw, 32px); display: grid; gap: 12px; transition: background .4s; }
  .stat:hover { background: var(--bg-2); }
  .stat b { font-weight: 400; font-size: clamp(34px, 4.4vw, 64px); letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
  .stat span { font: 400 12px/1.5 var(--mono); color: var(--muted); }

  .chart { display: grid; gap: 14px; }
  .chart-title { font: 400 12px/1 var(--mono); color: var(--muted); margin-bottom: 8px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
  .chart-title i { font-style: normal; display: inline-flex; gap: 14px; }
  .chart-title i span::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; background: var(--muted); vertical-align: 0; }
  .chart-title i span.a::before { background: var(--accent); }
  .hrow { display: grid; grid-template-columns: 180px 1fr 96px; gap: 16px; align-items: center; font-size: 14px; }
  .hrow > span:first-child { color: var(--muted); }
  .hrow > span:last-child { font: 400 13px/1 var(--mono); text-align: right; font-variant-numeric: tabular-nums; }
  .track { position: relative; height: 10px; background: var(--bg-2); border-radius: 2px; overflow: hidden; }
  .fill { position: absolute; inset: 0 auto 0 0; width: calc(var(--v) * 1%); background: var(--accent); border-radius: 2px; transform: scaleX(0); transform-origin: left; transition: transform 1.4s var(--ease); }
  .fill.ghost { background: #3a3a3e; }
  .in .fill { transform: scaleX(1); }
  .hrow:hover .fill:not(.ghost) { filter: brightness(1.15); }

  .callout { border-left: 2px solid var(--accent); padding: 4px 0 4px 22px; font-size: clamp(20px, 2vw, 26px); line-height: 1.35; letter-spacing: -.015em; max-width: 820px; }
  .pipeline { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--faint); border: 1px solid var(--faint); counter-reset: step; }
  .pipeline div { background: var(--bg); padding: 22px; display: grid; gap: 10px; align-content: start; min-height: 150px; transition: background .4s; }
  .pipeline div:hover { background: var(--bg-2); }
  .pipeline div::before { counter-increment: step; content: "0" counter(step); font: 400 12px/1 var(--mono); color: var(--accent); }
  .pipeline b { font-weight: 500; font-size: 16px; }
  .pipeline p { color: var(--muted); font-size: 14px; }

  .next { display: grid; gap: 14px; padding: clamp(40px, 8vh, 80px) 0; border-top: 1px solid var(--faint); }
  .next span { font: 400 12px/1 var(--mono); color: var(--muted); }
  .next h3 { font-weight: 400; font-size: clamp(32px, 6vw, 88px); letter-spacing: -.04em; line-height: 1; transition: color .3s; }
  .next:hover h3 { color: var(--accent); }
  .note-sm { font: 400 12px/1.6 var(--mono); color: var(--muted); max-width: 680px; }

  @media (max-width: 860px) {
    .meta, .stats { grid-template-columns: 1fr 1fr; }
    .split { grid-template-columns: 1fr; }
    .pipeline { grid-template-columns: 1fr; }
    .hrow { grid-template-columns: 110px 1fr 84px; gap: 10px; font-size: 13px; }
  }

  /* =================== CONTACT FORM =================== */
  .contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
  .contact-grid .contact-sub { display: block; font: 400 clamp(16px, 1.3vw, 18px)/1.55 var(--sans); max-width: 380px; }
  .contact-grid .big { font-size: clamp(44px, 7vw, 112px); }
  .cform { position: relative; display: grid; gap: 30px; }
  .field { position: relative; display: block; padding-top: 18px; }
  .field input, .field textarea { width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--faint); color: var(--fg);
    font: 400 clamp(18px, 1.5vw, 21px)/1.4 var(--sans); padding: 8px 0 12px; outline: none; resize: none; transition: border-color .3s; border-radius: 0; }
  body.has-cursor .field input, body.has-cursor .field textarea { cursor: none; }
  .field::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease); }
  .field:focus-within::after { transform: scaleX(1); }
  .field > span { position: absolute; left: 0; top: 28px; color: var(--muted); font-size: clamp(18px, 1.5vw, 21px); pointer-events: none; transform-origin: left top;
    transition: transform .45s var(--ease), color .3s, font-family 0s .1s; }
  .field input:focus + span, .field input:not(:placeholder-shown) + span,
  .field textarea:focus + span, .field textarea:not(:placeholder-shown) + span { transform: translateY(-26px) scale(.62); color: var(--accent); }
  .field .err { position: absolute; right: 0; top: 0; font: 400 11px/1 var(--mono); font-style: normal; color: #ff7a6b; opacity: 0; transform: translateY(4px); transition: opacity .3s, transform .3s var(--ease); }
  .field.bad .err { opacity: 1; transform: none; }
  .field.bad::after { background: #ff7a6b; transform: scaleX(1); }
  .field.shake { animation: shake .4s var(--ease); }
  @keyframes shake { 20% { transform: translateX(-6px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
  .field .count { position: absolute; right: 0; bottom: -20px; font: 400 11px/1 var(--mono); font-style: normal; color: var(--muted); opacity: 0; transition: opacity .3s; }
  .field:focus-within .count { opacity: 1; }
  .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

  .send { justify-self: start; display: inline-flex; align-items: center; gap: 14px; margin-top: 8px; padding: 18px 26px; border-radius: 99px;
    background: var(--fg); color: var(--bg); font: 500 15px/1 var(--sans); position: relative; overflow: hidden; transition: background .3s, color .3s, transform .5s var(--ease); }
  .send::before { content: ""; position: absolute; inset: 0; background: var(--accent); transform: translateY(101%); transition: transform .5s var(--ease); z-index: 0; }
  .send > * { position: relative; z-index: 1; }
  .send:hover::before { transform: none; }
  .send .arrow { transition: transform .5s var(--ease); }
  .send:hover .arrow { transform: translateX(4px) rotate(-45deg); }
  .send.busy { pointer-events: none; }
  .send.busy::before { transform: none; animation: sweep 1.1s var(--ease) infinite; }
  .send.busy .arrow { animation: spin .8s linear infinite; }
  @keyframes sweep { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
  @keyframes spin { to { transform: rotate(360deg); } }

  .sent { position: absolute; inset: 0; z-index: 3; display: grid; align-content: center; gap: 14px; background: transparent;
    opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity .5s var(--ease), transform .6s var(--ease), visibility 0s .5s; }
  .sent b { font-weight: 400; font-size: clamp(30px, 3.4vw, 46px); letter-spacing: -.03em; color: var(--accent); }
  .sent p { color: var(--muted); font-size: 18px; }
  .sent .again { justify-self: start; font: 400 12px/1 var(--mono); color: var(--muted); padding: 8px 0; transition: color .25s; }
  .sent .again:hover { color: var(--fg); }
  .cform.done .sent { position: static; opacity: 1; visibility: visible; transform: none; transition-delay: 0s; padding: 18px 0 8px; }
  .cform.done .field, .cform.done .send { display: none; }
  @media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
