/* Vivek T — portfolio
   Tokens: paper background, ink text, one signal accent.
   Type: Space Grotesk (display), Figtree (body), Instrument Serif (user quotes), JetBrains Mono (receipts, meta). */

:root {
  --paper: #f7f6f3;
  --paper-2: #f0efeb;
  --paper-3: #ebe9e4;
  --card: #ffffff;
  --ink: #121212;
  --ink-2: #5e5d59;
  --ink-3: #6b6a64; /* was #8e8c85 (3.1:1) → 5.0:1 on paper, AA */
  --text-body2: #34332f;
  --line: rgba(0, 0, 0, 0.08);
  --line-strong: rgba(0, 0, 0, 0.16);
  --signal: #ff5533;
  --signal-soft: #ffebe6;
  --signal-ink: #c2361a;
  --signal-text: #c2361a; /* orange for small text: 5.1:1 on paper. Keep --signal for fills and 28px+ */
  --ok: #10b981;
  --ok-soft: #e3f6ee;
  --ok-ink: #047857;
  --tint-sand: #f3ece1;
  --header-bg: rgba(247, 246, 243, 0.88);
  --dot-from: rgba(255, 85, 51, 0.5);
  --dot-to: rgba(255, 150, 110, 0.22);
  --dot-glow: rgba(255, 85, 51, 0.07);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.09);
  --shadow-float: 0 20px 48px -10px rgba(0, 0, 0, 0.14);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  --display: "Space Grotesk", system-ui, sans-serif;
  --body: "Figtree", system-ui, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius: 14px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --paper: #111113;
  --paper-2: #212126;
  --paper-3: #1a1a1e;
  --card: #18181b;
  --ink: #f4f4f5;
  --ink-2: #a1a1aa;
  --ink-3: #9898a2;
  --text-body2: #dcdce0;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.18);
  --signal-soft: rgba(255, 85, 51, 0.16);
  --signal-ink: #ff8a70;
  --signal-text: #ff5533; /* 5.9:1 on dark paper */
  --ok-soft: rgba(16, 185, 129, 0.16);
  --ok-ink: #5fe0b2;
  --tint-sand: #24211c;
  --header-bg: rgba(17, 17, 19, 0.88);
  --dot-from: rgba(255, 110, 78, 0.42);
  --dot-to: rgba(255, 170, 130, 0.16);
  --dot-glow: rgba(255, 110, 78, 0.08);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 14px 36px rgba(0, 0, 0, 0.5);
  --shadow-float: 0 20px 48px -10px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 20;
  background: rgba(247, 246, 243, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
}
.site-head.scrolled { border-bottom-color: var(--line); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { text-decoration: none; display: flex; flex-direction: column; line-height: 1.15; }
.brand b { font: 600 17px var(--display); letter-spacing: 0.02em; }
.brand span { font-size: 13px; color: var(--ink-3); }
.nav { display: flex; gap: 6px; align-items: center; }
.nav a {
  text-decoration: none; font-size: 15px; padding: 8px 12px; border-radius: 999px; color: var(--ink-2);
}
.nav a:hover { color: var(--ink); background: var(--paper-2); }
.nav a.btn-dark { background: var(--ink); color: var(--paper); }
.nav a.btn-dark:hover { background: #000; }
@media (max-width: 640px) {
  .nav a:not(.btn-dark):not(.keep) { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font: 500 16px var(--body); text-decoration: none;
  padding: 13px 22px; border-radius: 999px; border: 1px solid var(--ink);
  transition: background 0.15s, color 0.15s;
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: #000; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }

/* ---------- Section rhythm ---------- */
section { padding: clamp(64px, 9vw, 120px) 0; }
.sec-label {
  font: 500 13px var(--mono); color: var(--ink-3); margin: 0 0 18px;
  display: flex; align-items: center; gap: 10px;
}
.sec-label::before { content: ""; width: 22px; height: 1px; background: var(--ink-3); }
h1, h2, h3 { font-family: var(--display); font-weight: 500; letter-spacing: -0.02em; margin: 0; }
h2 { font-size: clamp(32px, 4.4vw, 52px); line-height: 1.08; max-width: 18ch; }
.sec-intro { color: var(--ink-2); max-width: 60ch; margin: 18px 0 0; font-size: 18px; }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(40px, 7vw, 88px); }
.hero .wrap { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.status {
  display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2);
  background: var(--card); border: 1px solid var(--line); padding: 6px 14px 6px 10px; border-radius: 999px;
}
.status i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
.hero h1 { font-size: clamp(36px, 4.8vw, 60px); line-height: 1.05; margin: 26px 0 24px; max-width: 19ch; text-wrap: balance; }
.hero p.lede { font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-2); max-width: 52ch; margin: 0 0 32px; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Receipt: the one bold element */
.receipt {
  font: 400 14.5px/1.6 var(--mono);
  background: var(--card);
  padding: 32px 30px 40px;
  border-radius: 6px 6px 0 0;
  box-shadow: 0 30px 60px -30px rgba(20, 20, 20, 0.35), 0 1px 0 var(--line);
  position: relative;
  transform: rotate(1.4deg);
  --zig: 10px;
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / calc(2 * var(--zig)) 100%;
          mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / calc(2 * var(--zig)) 100%;
}
.receipt .r-head { text-align: center; margin-bottom: 14px; }
.receipt .r-head b { display: block; font-size: 16px; letter-spacing: 0.08em; }
.receipt .r-head span { color: var(--ink-3); }
.receipt .rule { border: 0; border-top: 1.5px dashed #c9c6bd; margin: 12px 0; }
.receipt .row { display: flex; justify-content: space-between; gap: 16px; }
.receipt .row span:first-child { color: var(--ink-2); }
.receipt .row b { font-weight: 600; white-space: nowrap; }
.receipt .total { font-size: 15px; }
.receipt .total b { color: var(--signal-text); }
.receipt .thanks { text-align: center; color: var(--ink-3); margin-top: 14px; }
.receipt .line { opacity: 1; }
.js .receipt .line { opacity: 0; transform: translateY(-4px); }
.js .receipt.printed .line { animation: print 0.28s ease-out forwards; animation-delay: calc(var(--i) * 90ms); }
@keyframes print { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .js .receipt .line { opacity: 1; transform: none; animation: none !important; }
}

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .receipt { max-width: 380px; transform: rotate(0.8deg); }
}

/* ---------- Work ---------- */
.work-list { display: grid; gap: 28px; margin-top: 48px; }
.work-card {
  display: grid; grid-template-columns: 1fr 1.05fr; gap: 0;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; text-decoration: none; color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.work-card:hover { transform: translateY(-3px); box-shadow: 0 24px 48px -28px rgba(20, 20, 20, 0.35); }
.work-card .w-body { padding: clamp(24px, 3.2vw, 44px); display: flex; flex-direction: column; }
.work-card .w-kicker { font: 500 13px var(--mono); color: var(--ink-3); }
.work-card h3 { font-size: clamp(26px, 2.8vw, 36px); line-height: 1.1; margin: 12px 0 14px; }
.work-card p { color: var(--ink-2); margin: 0 0 22px; max-width: 46ch; }
.result {
  display: inline-flex; align-items: baseline; gap: 10px; align-self: flex-start;
  background: var(--ok-soft); color: var(--ok-ink); border-radius: 10px; padding: 10px 14px; font-size: 15px;
}
.result b { font: 600 20px var(--display); letter-spacing: -0.01em; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 26px; list-style: none; padding-left: 0; }
.tags li { font-size: 13px; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; color: var(--ink-2); }
.w-link { margin-top: 22px; font-weight: 600; font-size: 15px; }
.w-link::after { content: " \2197"; }

.w-visual { background: var(--paper-2); display: flex; align-items: flex-end; justify-content: center; gap: 12px; padding: 36px 24px 0; min-height: 360px; }
.w-visual img { width: 31%; max-width: 190px; filter: drop-shadow(0 14px 22px rgba(20, 20, 20, 0.16)); }
.w-visual img:nth-child(2) { transform: translateY(-22px); }
.w-visual.flat img { border-radius: 16px 16px 0 0; width: 40%; max-width: 220px; }
.w-visual.tint-blue { background: var(--paper-2); }
.w-visual.tint-sand { background: var(--tint-sand); }

@media (max-width: 860px) {
  .work-card { grid-template-columns: 1fr; }
  .w-visual { order: -1; min-height: 0; }
}

/* In-progress cards */
.next-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 28px; }
.next-card {
  border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 22px; background: transparent;
}
.next-card h4 { font: 500 19px var(--display); margin: 0 0 8px; letter-spacing: -0.01em; }
.next-card p { margin: 0; color: var(--ink-2); font-size: 15px; }
.next-card .soon { display: inline-block; font: 500 12px var(--mono); color: var(--ink-3); margin-top: 14px; }

/* ---------- How I work ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 52px; border-top: 1px solid var(--ink); }
.step { padding: 26px 24px 0 0; }
.step + .step { padding-left: 24px; border-left: 1px solid var(--line); }
.step .n { font: 500 13px var(--mono); color: var(--signal-text); }
.step h3 { font-size: 23px; margin: 10px 0 10px; }
.step p { margin: 0; color: var(--ink-2); font-size: 16px; }
@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr 1fr; row-gap: 36px; }
  .step:nth-child(3) { padding-left: 0; border-left: 0; }
}
@media (max-width: 520px) {
  .steps { grid-template-columns: 1fr; }
  .step, .step + .step { padding-left: 0; border-left: 0; }
}

/* ---------- Experience ---------- */
.xp { margin-top: 48px; display: grid; gap: 0; border-top: 1px solid var(--line); }
.xp-row {
  display: grid; grid-template-columns: 220px 1fr auto; gap: 28px; padding: 28px 0; border-bottom: 1px solid var(--line);
  align-items: start;
}
.xp-when { font: 400 14px var(--mono); color: var(--ink-3); padding-top: 4px; }
.xp-row h3 { font-size: 22px; }
.xp-row h3 span { color: var(--ink-3); font-weight: 400; }
.xp-row p { margin: 8px 0 0; color: var(--ink-2); max-width: 62ch; font-size: 16px; }
.chip { font-size: 13px; background: var(--signal-soft); color: var(--signal-ink); padding: 6px 12px; border-radius: 999px; white-space: nowrap; font-weight: 500; }
@media (max-width: 760px) {
  .xp-row { grid-template-columns: 1fr; gap: 8px; }
  .chip { justify-self: start; margin-top: 6px; }
}

/* ---------- Contact ---------- */
.contact { background: var(--ink); color: var(--paper); border-radius: 28px; margin: 0 var(--gutter) 40px; }
.contact .wrap { padding-top: clamp(56px, 8vw, 96px); padding-bottom: clamp(56px, 8vw, 96px); }
.contact h2 { max-width: 20ch; }
.contact p { color: #b9b7b0; max-width: 54ch; font-size: 18px; margin: 20px 0 32px; }
.contact .btn-primary { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.contact .btn-ghost { color: var(--paper); border-color: #55544f; }
.contact .btn-ghost:hover { background: var(--paper); color: var(--ink); }
.foot { padding: 0 0 36px; color: var(--ink-3); font-size: 14px; }
.foot .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* =========================================================
   Case study pages
   ========================================================= */
.cs-hero { padding-top: clamp(40px, 6vw, 72px); padding-bottom: 0; }
.back { font-size: 15px; color: var(--ink-2); text-decoration: none; }
.back:hover { color: var(--ink); }
.cs-hero h1 { font-size: clamp(36px, 5.4vw, 66px); line-height: 1.04; margin: 22px 0 20px; max-width: 18ch; }
.cs-hero .lede { font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-2); max-width: 60ch; margin: 0; }
.meta {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 40px;
  padding: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.meta dt { font: 500 12.5px var(--mono); color: var(--ink-3); margin-bottom: 6px; }
.meta dd { margin: 0; font-size: 15.5px; }
@media (max-width: 760px) { .meta { grid-template-columns: 1fr 1fr; } }

.cs-banner { margin-top: 44px; background: var(--paper-2); border-radius: var(--radius-lg); padding: 44px 24px 0; display: flex; justify-content: center; gap: clamp(8px, 2vw, 24px); overflow: hidden; }
.cs-banner img { width: 22%; max-width: 230px; filter: drop-shadow(0 18px 26px rgba(20, 20, 20, 0.18)); }
.cs-banner img:nth-child(even) { transform: translateY(28px); }
.cs-banner.tint-blue { background: var(--paper-2); }
.cs-banner.flat img { border-radius: 18px 18px 0 0; }
@media (max-width: 640px) { .cs-banner img { width: 30%; } .cs-banner img:nth-child(4) { display: none; } }

/* Short version */
.short { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(24px, 4vw, 48px); margin-top: 20px; }
.short-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 32px; }
.short h3 { font: 500 13px var(--mono); color: var(--ink-3); margin-bottom: 10px; letter-spacing: 0; }
.short p, .short li { color: var(--ink); font-size: 16px; margin: 0; }
.short ul { margin: 0; padding-left: 18px; }
.short li + li { margin-top: 6px; }
.nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--line); }
.nums div b { display: block; font: 500 clamp(28px, 3.4vw, 42px)/1.05 var(--display); letter-spacing: -0.02em; }
.nums div span { font-size: 14px; color: var(--ink-2); }
@media (max-width: 760px) { .short-grid, .nums { grid-template-columns: 1fr; } }

/* Chapters */
.chapter { padding: clamp(56px, 7vw, 96px) 0 0; }
.chapter-head { display: grid; grid-template-columns: 180px 1fr; gap: 28px; }
.chapter-head .sec-label { margin-top: 10px; }
.chapter-head h2 { font-size: clamp(28px, 3.4vw, 42px); max-width: 22ch; }
.prose { max-width: 66ch; margin-left: 208px; margin-top: 22px; }
.prose p { margin: 0 0 16px; color: var(--text-body2); }
.prose ul { padding-left: 20px; margin: 0 0 16px; }
.prose li { margin-bottom: 8px; color: var(--text-body2); }
@media (max-width: 860px) {
  .chapter-head { grid-template-columns: 1fr; gap: 0; }
  .prose { margin-left: 0; }
}

.quote-wall { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 32px 0 0 208px; }
.quote { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin: 0; }
.quote p { font: 400 24px/1.25 var(--serif); margin: 0; }
.quote small { display: block; margin-top: 10px; color: var(--ink-3); font-size: 14px; }
@media (max-width: 860px) { .quote-wall { margin-left: 0; grid-template-columns: 1fr; } }

.insight {
  margin: 32px 0 0 208px; border-left: 3px solid var(--signal); padding: 6px 0 6px 22px; max-width: 62ch;
}
.insight b { font: 500 13px var(--mono); color: var(--signal-text); display: block; margin-bottom: 6px; }
.insight p { font: 500 22px/1.35 var(--display); margin: 0; letter-spacing: -0.01em; }
@media (max-width: 860px) { .insight { margin-left: 0; } }

/* Decisions: tried vs chose */
.decisions { display: grid; gap: 18px; margin: 34px 0 0 208px; }
.decision { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--card); }
.decision > div { padding: 20px 22px; }
.decision .no { background: var(--paper-3); border-right: 1px solid var(--line); }
.decision .tag { font: 500 12.5px var(--mono); display: inline-block; margin-bottom: 8px; }
.decision .no .tag { color: var(--ink-2); }
.decision .yes .tag { color: var(--ok-ink); }
.decision h4 { font: 500 18px var(--display); margin: 0 0 6px; letter-spacing: -0.01em; }
.decision p { margin: 0; font-size: 15.5px; color: var(--ink-2); }
@media (max-width: 860px) { .decisions { margin-left: 0; } }
@media (max-width: 600px) { .decision { grid-template-columns: 1fr; } .decision .no { border-right: 0; border-bottom: 1px solid var(--line); } }

/* Before / after */
.ba { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 34px 0 0 208px; }
.ba figure { margin: 0; background: var(--paper-2); border-radius: var(--radius); padding: 24px 24px 0; display: flex; flex-direction: column; align-items: center; }
.ba figure.after { background: var(--paper-2); }
.ba img { width: 70%; max-width: 250px; }
.ba figcaption { align-self: stretch; font-size: 14.5px; color: var(--ink-2); background: var(--card); margin: 18px -24px 0; padding: 14px 20px; border-top: 1px solid var(--line); }
.ba figcaption b { color: var(--ink); }
@media (max-width: 860px) { .ba { margin-left: 0; } }
@media (max-width: 520px) { .ba { grid-template-columns: 1fr; } }

/* Flow strip */
.flow { margin-top: 36px; display: flex; gap: 20px; overflow-x: auto; padding: 8px var(--gutter) 24px; scroll-snap-type: x mandatory; }
.flow figure { flex: 0 0 auto; width: min(230px, 62vw); margin: 0; scroll-snap-align: start; }
.flow img { width: 100%; }
.flow.flat img { border-radius: 16px; border: 1px solid var(--line); }
.flow figcaption { font-size: 14.5px; color: var(--ink-2); margin-top: 12px; }
.flow figcaption b { display: block; font: 500 12.5px var(--mono); color: var(--signal-text); margin-bottom: 4px; }
.flow-hint { font: 400 13px var(--mono); color: var(--ink-3); margin: 0 0 0 208px; }
@media (max-width: 860px) { .flow-hint { margin-left: 0; } }

/* Results */
.results { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 34px 0 0 208px; }
.res { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.res b { display: block; font: 500 clamp(30px, 3.6vw, 44px)/1 var(--display); letter-spacing: -0.02em; }
.res b.up { color: var(--ok-ink); }
.res span { display: block; margin-top: 10px; font-size: 15px; color: var(--ink-2); }
@media (max-width: 860px) { .results { margin-left: 0; grid-template-columns: 1fr; } }

.next-case { margin-top: clamp(64px, 8vw, 110px); }
.next-case a { display: flex; justify-content: space-between; align-items: center; gap: 20px; text-decoration: none; padding: 34px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); }
.next-case small { font: 500 13px var(--mono); color: var(--ink-3); display: block; margin-bottom: 8px; }
.next-case strong { font: 500 clamp(26px, 3.4vw, 40px) var(--display); letter-spacing: -0.02em; }
.next-case .arrow { font-size: 32px; transition: transform 0.2s; }
.next-case a:hover .arrow { transform: translateX(6px); }

/* Mockups are transparent PNG/WebP with their own shadow: show true colours, no blending. */
.w-visual img, .cs-banner img, .flow:not(.flat) img { filter: none; }
.w-visual.flat img, .cs-banner.flat img, .flow.flat img { box-shadow: 0 18px 30px -18px rgba(20,20,20,.3); }
.flow { padding-left: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter))); scroll-padding-left: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter))); }
.res b, .nums div b { white-space: nowrap; font-size: clamp(28px, 3vw, 40px); }

/* ---------- Onboarding case study: Figma-structured sections ---------- */
.overview { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 34px 0 0 208px; }
.ov { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; }
.ov h4 { font: 500 19px var(--display); margin: 0 0 8px; letter-spacing: -0.01em; }
.ov p { margin: 0; color: var(--ink-2); font-size: 15.5px; }
@media (max-width: 860px) { .overview { margin-left: 0; grid-template-columns: 1fr; } }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; margin: 30px 0 0 208px; }
.two-col h4 { font: 500 18px var(--display); margin: 0 0 10px; }
.two-col ul { margin: 0; padding-left: 20px; color: var(--text-body2); }
.two-col li { margin-bottom: 8px; }
@media (max-width: 860px) { .two-col { margin-left: 0; grid-template-columns: 1fr; gap: 24px; } }

/* Teardown: old screen + what the recordings showed */
.teardown { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin: 34px 0 0 208px; }
.td { display: grid; grid-template-columns: 140px 1fr; gap: 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; align-items: start; }
.td img { width: 100%; border-radius: 8px; border: 1px solid var(--line); }
.td .step-no { font: 500 12.5px var(--mono); color: var(--ink-3); }
.td h4 { font: 500 18px var(--display); margin: 4px 0 8px; letter-spacing: -0.01em; }
.td p { margin: 0; font-size: 15px; color: var(--ink-2); }
.td .loss { display: inline-block; margin-top: 12px; font: 500 13px var(--mono); padding: 4px 10px; border-radius: 999px; background: var(--signal-soft); color: var(--signal-ink); }
.td .loss.none { background: var(--ok-soft); color: var(--ok-ink); }
.td blockquote { margin: 12px 0 0; font: 400 19px/1.25 var(--serif); color: var(--ink); }
@media (max-width: 960px) { .teardown { margin-left: 0; grid-template-columns: 1fr; } }
@media (max-width: 420px) { .td { grid-template-columns: 100px 1fr; gap: 14px; } }

/* Drop-off bars */
.bars { margin: 30px 0 0 208px; max-width: 640px; }
.bars h4 { font: 500 13px var(--mono); color: var(--ink-3); margin: 0 0 14px; }
.bar { display: grid; grid-template-columns: 150px 1fr 32px; gap: 12px; align-items: center; margin-bottom: 10px; font-size: 14.5px; }
.bar i { display: block; height: 14px; border-radius: 4px; background: var(--signal); width: var(--w); min-width: 3px; }
.bar i.zero { background: var(--line); }
.bar b { font: 600 14px var(--mono); text-align: right; }
@media (max-width: 860px) { .bars { margin-left: 0; } }
@media (max-width: 480px) { .bar { grid-template-columns: 110px 1fr 28px; font-size: 13.5px; } }

/* Competitors */
.comp { margin: 30px 0 0 208px; border-top: 1px solid var(--line); }
.comp-row { display: grid; grid-template-columns: 160px 1fr; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.comp-row b { font: 500 17px var(--display); }
.comp-row span { color: var(--ink-2); }
.gb { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 26px 0 0 208px; }
.gb > div { border-radius: var(--radius); padding: 22px 24px; }
.gb .good { background: var(--ok-soft); }
.gb .bad { background: var(--signal-soft); }
.gb h4 { font: 500 13px var(--mono); margin: 0 0 12px; }
.gb .good h4 { color: var(--ok-ink); }
.gb .bad h4 { color: var(--signal-ink); }
.gb ul { margin: 0; padding-left: 18px; }
.gb li { margin-bottom: 6px; }
@media (max-width: 860px) { .comp, .gb { margin-left: 0; } .gb { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .comp-row { grid-template-columns: 1fr; gap: 2px; } }

/* Wireframes */
.wf { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 30px 0 0 208px; }
.wf figure { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.wf img { width: 100%; }
.wf figcaption { font-size: 14px; color: var(--ink-3); margin-top: 8px; }
@media (max-width: 860px) { .wf { margin-left: 0; grid-template-columns: 1fr; } }

/* Final design blocks */
.fd { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: center; padding: clamp(36px, 5vw, 56px) 0; border-top: 1px solid var(--line); }
.fd:first-of-type { border-top: 0; }
.fd-phones { display: flex; gap: 12px; justify-content: center; background: var(--paper-2); border-radius: var(--radius-lg); padding: 28px 16px 0; overflow: hidden; }
.fd-phones img { width: 46%; max-width: 250px; }
.fd .step-no { font: 500 12.5px var(--mono); color: var(--signal-text); }
.fd h3 { font-size: clamp(24px, 2.6vw, 32px); margin: 8px 0 12px; line-height: 1.12; }
.fd .pull { font: 400 22px/1.3 var(--serif); margin: 0 0 14px; }
.fd ul { margin: 0 0 16px; padding-left: 20px; color: var(--text-body2); }
.fd li { margin-bottom: 6px; }
.principles { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0 !important; margin: 0; }
.principles li { font-size: 13px; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 4px 12px; margin: 0; color: var(--ink-2); }
.fd.flip .fd-phones { order: 2; }
@media (max-width: 860px) { .fd { grid-template-columns: 1fr; } .fd.flip .fd-phones { order: 0; } }

.feedback { margin: 26px 0 0 208px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 860px) { .feedback { margin-left: 0; grid-template-columns: 1fr; } }

/* ---------- Bizli ---------- */
.photos { display: grid; grid-template-columns: 0.75fr 1.25fr; gap: 16px; margin: 34px 0 0 208px; }
.photos figure { margin: 0; }
.photos img { width: 100%; height: 100%; max-height: 420px; object-fit: cover; border-radius: var(--radius); }
.photos figcaption { font-size: 14px; color: var(--ink-3); margin-top: 8px; }
@media (max-width: 860px) { .photos { margin-left: 0; grid-template-columns: 1fr; } }

.equation { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: clamp(8px, 2vw, 24px); align-items: center; margin: 34px 0 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(20px, 4vw, 44px); }
.equation figure { margin: 0; text-align: center; }
.equation img { margin: 0 auto; max-height: 260px; width: auto; max-width: 100%; }
.equation .phone img { border-radius: 14px; border: 1px solid var(--line); box-shadow: 0 18px 30px -18px rgba(20,20,20,.3); }
.equation figcaption { font-size: 15px; margin-top: 14px; color: var(--ink-2); }
.equation figcaption b { display: block; color: var(--ink); font: 500 18px var(--display); }
.equation .op { font: 500 clamp(28px, 4vw, 44px) var(--display); color: var(--signal); }
@media (max-width: 700px) { .equation { grid-template-columns: 1fr; } .equation .op { text-align: center; } .equation img { max-height: 200px; } }

.mapping { margin: 26px 0 0 208px; border-top: 1px solid var(--ink); }
.map-row { display: grid; grid-template-columns: 1fr 28px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.map-row.head { font: 500 12.5px var(--mono); color: var(--ink-3); }
.map-row span:nth-child(2) { color: var(--signal-text); text-align: center; }
@media (max-width: 860px) { .mapping { margin-left: 0; } }

.timeline { margin: 30px 0 0 208px; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--ink); }
.timeline div { padding: 18px 18px 0 0; }
.timeline div + div { padding-left: 18px; border-left: 1px solid var(--line); }
.timeline b { font: 500 12.5px var(--mono); color: var(--signal-text); display: block; }
.timeline h4 { font: 500 19px var(--display); margin: 6px 0 6px; }
.timeline p { margin: 0; font-size: 15px; color: var(--ink-2); }
@media (max-width: 860px) { .timeline { margin-left: 0; grid-template-columns: 1fr 1fr; row-gap: 24px; } .timeline div:nth-child(3) { padding-left: 0; border-left: 0; } }
@media (max-width: 480px) { .timeline { grid-template-columns: 1fr; } .timeline div, .timeline div + div { padding-left: 0; border-left: 0; } }
.equation.cover { margin-top: 44px; background: var(--paper-2); border: 0; }
.equation.cover img { max-height: 300px; }
.w-visual.eq-mini { align-items: center; padding: 28px 20px; gap: 8px; background: var(--paper-2); }
.w-visual.eq-mini img { width: 28%; max-width: 170px; transform: none; filter: none; }
.w-visual.eq-mini img.app { width: 24%; border-radius: 10px; border: 1px solid var(--line); box-shadow: 0 14px 24px -14px rgba(20,20,20,.3); }
.w-visual.eq-mini span { font: 500 28px var(--display); color: var(--signal); }

/* ---------- Design system page ---------- */
.cs-cover { margin-top: 44px; border-radius: var(--radius-lg); overflow: hidden; }
.cs-cover img { width: 100%; }
.layers { margin: 30px 0 0 208px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--card); }
.layers div { padding: 18px; position: relative; }
.layers div + div { border-left: 1px solid var(--line); }
.layers b { font: 500 12.5px var(--mono); color: var(--signal-text); display: block; }
.layers h4 { font: 500 18px var(--display); margin: 6px 0; }
.layers code { font: 400 12.5px var(--mono); color: var(--ink-2); display: block; word-break: break-word; }
.layers p { font-size: 14.5px; color: var(--ink-2); margin: 8px 0 0; }
@media (max-width: 860px) { .layers { margin-left: 0; grid-template-columns: 1fr 1fr; } .layers div:nth-child(3) { border-left: 0; } .layers div:nth-child(n+3) { border-top: 1px solid var(--line); } }
@media (max-width: 480px) { .layers { grid-template-columns: 1fr; } .layers div + div { border-left: 0; border-top: 1px solid var(--line); } }

.counts { margin: 26px 0 0 208px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.counts div { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.counts b { font: 500 32px/1 var(--display); display: block; }
.counts span { font-size: 14px; color: var(--ink-2); display: block; margin-top: 8px; }
@media (max-width: 860px) { .counts { margin-left: 0; grid-template-columns: 1fr 1fr; } }

/* live token demo, using the real Zobaze values */
.zd-demo { margin: 30px 0 0 208px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; font-family: "Lato", var(--body); }
.zd-demo h4 { font: 500 13px var(--mono); color: var(--ink-3); margin: 0 0 12px; }
.ramp { display: grid; grid-template-columns: repeat(10, 1fr); border-radius: 8px; overflow: hidden; margin-bottom: 8px; }
.ramp span { height: 40px; position: relative; }
.ramp span.key { outline: 2px solid #212121; outline-offset: -2px; }
.ramp-label { font: 400 12.5px var(--mono); color: var(--ink-3); margin: 0 0 22px; }
.zd-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 14px; }
.zd-btn { font: 700 14px "Lato", var(--body); min-height: 48px; padding: 12px 16px; border-radius: 4px; border: 1px solid transparent; cursor: pointer; }
.zd-btn.primary { background: #4169e1; color: #fff; }
.zd-btn.primary:active { background: #214ed3; }
.zd-btn.secondary { background: #fff; color: #4169e1; border-color: #4169e1; }
.zd-btn.secondary:active { background: #e9eefc; }
.zd-btn.tertiary { background: transparent; color: #4169e1; }
.zd-btn.tertiary:active { background: #e9eefc; }
.zd-btn.success { background: #4caf50; color: #fff; }
.zd-btn.success:active { background: #388e3c; }
.zd-btn.danger { background: #f44336; color: #fff; }
.zd-btn.danger:active { background: #d32f2f; }
.zd-btn:disabled { background: #e0e0e0; color: #9e9e9e; border-color: transparent; cursor: not-allowed; }
.zd-btn.small { min-height: 32px; padding: 4px 12px; font-size: 13px; }
.zd-note { font-size: 13.5px; color: var(--ink-3); margin: 6px 0 0; }
@media (max-width: 860px) { .zd-demo { margin-left: 0; } }

.wide-img { margin: 30px 0 0 208px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.wide-img img { width: 100%; border-radius: 6px; }
.wide-img figcaption { font-size: 14px; color: var(--ink-3); margin: 8px 4px 2px; }
@media (max-width: 860px) { .wide-img { margin-left: 0; } }
.claim { margin: 26px 0 0 208px; background: var(--paper-2); border-radius: var(--radius); padding: 20px 22px; max-width: 66ch; }
.claim b { font: 500 13px var(--mono); display: block; margin-bottom: 6px; }
.claim p { margin: 0; color: var(--text-body2); }
@media (max-width: 860px) { .claim { margin-left: 0; } }

/* ---------- AI workflow page ---------- */
.aiflow { margin: 34px 0 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.aistep { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 18px; position: relative; }
.aistep .n { font: 500 12.5px var(--mono); color: var(--signal-text); }
.aistep h3 { font-size: 21px; margin: 6px 0 4px; }
.aistep .tool { font: 400 12.5px var(--mono); color: var(--ink-3); display: block; margin-bottom: 12px; }
.aistep dl { margin: 0; }
.aistep dt { font: 500 12px var(--mono); color: var(--ink-3); margin-top: 10px; }
.aistep dd { margin: 2px 0 0; font-size: 14.5px; }
.aistep.key { border-color: var(--signal); box-shadow: 0 0 0 3px var(--signal-soft); }
.aistep:not(:last-child)::after { content: "→"; position: absolute; right: -11px; top: 22px; color: var(--signal-text); font-size: 16px; background: var(--paper); line-height: 1; padding: 2px 0; z-index: 1; }
@media (max-width: 1000px) { .aiflow { grid-template-columns: 1fr 1fr; } .aistep::after { display: none; } }
@media (max-width: 560px) { .aiflow { grid-template-columns: 1fr; } }
.loop-note { font: 400 13px var(--mono); color: var(--ink-3); margin: 12px 0 0; }

.ph { border: 1.5px dashed var(--line-strong); border-radius: var(--radius); background: repeating-linear-gradient(135deg, transparent 0 12px, rgba(0,0,0,.025) 12px 24px); display: flex; align-items: center; justify-content: center; text-align: center; color: var(--ink-3); font: 400 14px var(--mono); padding: 24px; min-height: 260px; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 30px 0 0 208px; }
.compare figure { margin: 0; }
.compare figcaption { font-size: 14.5px; color: var(--ink-2); margin-top: 10px; }
.compare figcaption b { color: var(--ink); }
.ph-wide { margin: 30px 0 0 208px; min-height: 200px; }
@media (max-width: 860px) { .compare, .ph-wide { margin-left: 0; } }
@media (max-width: 520px) { .compare { grid-template-columns: 1fr; } }

/* =========================================================
   THEME LAYER v2 — reference-style shell (header, hero, sections,
   cards, experience, CTA, footer, dot field, dark mode, transitions)
   ========================================================= */
body { background: var(--paper); color: var(--ink); transition: background-color .3s var(--ease), color .3s var(--ease); }
.dot-field { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.dot-field canvas { width: 100%; height: 100%; display: block; }
/* Quiet reading column: dots full at the side margins, 30% behind the content column */
.dot-field {
  -webkit-mask-image: linear-gradient(90deg, #000, rgba(0,0,0,.3) calc(50% - 600px), rgba(0,0,0,.3) calc(50% + 600px), #000);
          mask-image: linear-gradient(90deg, #000, rgba(0,0,0,.3) calc(50% - 600px), rgba(0,0,0,.3) calc(50% + 600px), #000);
}
/* People who ask the OS for more contrast get no dots */
@media (prefers-contrast: more), (forced-colors: active) { .dot-field { display: none; } }

/* Page change wipe */
@view-transition { navigation: auto; }
::view-transition-new(root) { animation: page-wipe .5s cubic-bezier(.22, 1, .36, 1) both; }
::view-transition-old(root) { animation: none; }
@keyframes page-wipe { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes pulse-dot { 0% { transform: scale(.9); opacity: .8; } 50% { transform: scale(1.7); opacity: 0; } 100% { transform: scale(.9); opacity: 0; } }
@keyframes orb-pulse { 0%, 100% { transform: scale(.9); box-shadow: 0 0 4px 1px rgba(168,85,247,.5), 0 0 2px rgba(59,130,246,.6); } 50% { transform: scale(1.25); box-shadow: 0 0 9px 2px rgba(168,85,247,.9), 0 0 4px rgba(59,130,246,.9); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-new(root) { animation: none; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Header */
.site-head { position: sticky; top: 0; z-index: 100; background: transparent; backdrop-filter: none; border-bottom: 1px solid transparent; padding: 18px 0; transition: background-color .2s var(--ease), padding .2s var(--ease), border-color .2s var(--ease); }
.site-head.scrolled { background: var(--header-bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom-color: var(--line); padding: 12px 0; }
.site-head .wrap.head-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: auto; }
.brand { display: flex; flex-direction: column; gap: 2px; text-decoration: none; line-height: 1.15; }
.brand b { font: 700 15px var(--display); letter-spacing: .05em; text-transform: uppercase; color: var(--ink); }
.brand span { font: 500 13px var(--body); color: var(--ink-3); }
.nav-pill { display: flex; align-items: center; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 4px 6px; box-shadow: var(--shadow-sm); }
.nav-pill a { position: relative; font: 500 14px var(--display); color: var(--ink-2); text-decoration: none; padding: 8px 18px; border-radius: 999px; transition: color .15s var(--ease), background-color .15s var(--ease); }
.nav-pill a:hover { color: var(--ink); }
.nav-pill a.active { color: var(--ink); font-weight: 600; background: var(--paper-2); }
.nav-pill a.active::after { content: ""; position: absolute; left: 50%; bottom: 5px; transform: translateX(-50%); width: 14px; height: 2px; border-radius: 2px; background: var(--signal); }
.ai-orb { position: absolute; top: 8px; right: 6px; width: 5px; height: 5px; border-radius: 50%; background: linear-gradient(135deg, #a855f7, #3b82f6); animation: orb-pulse 2.4s ease-in-out infinite; }
.head-actions { display: flex; align-items: center; gap: 10px; }
.theme-toggle, .menu-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: transform .2s var(--ease), color .15s, border-color .15s; }
.theme-toggle:hover { color: var(--ink); border-color: var(--line-strong); transform: rotate(20deg); }
.btn-hire { display: inline-flex; align-items: center; gap: 8px; background: var(--ink); color: var(--paper); padding: 10px 22px; border-radius: 999px; font: 600 14px var(--display); text-decoration: none; transition: transform .15s var(--ease), opacity .15s; }
.btn-hire:hover { transform: translateY(-1px); opacity: .92; }
.menu-btn { display: none; }
.mobile-drawer { display: none; }
@media (max-width: 860px) {
  .nav-pill, .btn-hire { display: none; }
  .menu-btn { display: inline-flex; }
  .mobile-drawer.open { display: flex; flex-direction: column; gap: 4px; position: absolute; top: calc(100% + 6px); left: var(--gutter); right: var(--gutter); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 12px; box-shadow: var(--shadow-float); animation: fade-up .25s var(--ease); }
  .mobile-drawer a { padding: 12px 14px; border-radius: 12px; text-decoration: none; font: 500 16px var(--display); color: var(--ink); }
  .mobile-drawer a:hover { background: var(--paper-2); }
  .mobile-drawer a.hire { background: var(--ink); color: var(--paper); text-align: center; margin-top: 6px; }
}

/* Buttons */
.btn { font: 600 15px var(--display); padding: 13px 28px; border-radius: 999px; transition: transform .15s var(--ease), box-shadow .15s var(--ease), background-color .15s, border-color .15s, opacity .15s; }
.btn-primary { background: var(--ink); color: var(--paper); border: 1px solid var(--ink); }
.btn-primary:hover { background: var(--ink); transform: translateY(-2px); box-shadow: var(--shadow-md); opacity: .94; }
.btn-ghost { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--paper-2); color: var(--ink); border-color: var(--line-strong); transform: translateY(-2px); }

/* Hero */
.hero2 { min-height: min(calc(100svh - 84px), 860px); display: flex; align-items: center; padding: 32px 0 48px; }
.hero2 .wrap { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; width: 100%; }
.hero2-left { display: flex; flex-direction: column; gap: 26px; }
.status { box-shadow: var(--shadow-sm); border-color: var(--line); background: var(--card); padding: 6px 14px; gap: 10px; font-size: 13px; width: fit-content; }
.status i { position: relative; box-shadow: none; }
.status i::before { content: ""; position: absolute; inset: -4px; border-radius: 50%; background: rgba(16,185,129,.28); animation: pulse-dot 2.2s ease-in-out infinite; }
.hero2 h1 { font: 500 clamp(2.4rem, 4.4vw, 3.85rem)/1.08 var(--display); letter-spacing: -.04em; margin: 0; max-width: 17ch; text-wrap: balance; }
.hero2 .lede { font-size: 17.5px; line-height: 1.65; color: var(--text-body2); max-width: 540px; margin: 0; }
.hero2 .actions { display: flex; gap: 14px; flex-wrap: wrap; }
.stats-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding-top: 24px; border-top: 1px solid var(--line); margin-top: 6px; }
.stats-strip b { display: block; font: 700 30px/1 var(--display); letter-spacing: -.03em; }
.stats-strip span { display: block; margin-top: 6px; font-size: 12.5px; font-weight: 500; color: var(--ink-3); line-height: 1.3; }
.hero2-right { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.hero2-right .caption { font-size: 13px; font-weight: 500; color: var(--ink-3); }
.receipt { --ink: #121212; --ink-2: #5e5d59; --ink-3: #6b6a64; --signal-text: #c2361a; background: #fff; color: #121212; width: 100%; max-width: 400px; transition: transform .4s var(--ease); }
.receipt:hover { transform: rotate(0deg) translateY(-4px); }
@media (max-width: 1024px) {
  .hero2 { min-height: 0; }
  .hero2 .wrap { grid-template-columns: 1fr; gap: 44px; }
  .hero2-right { align-items: center; }
}
@media (max-width: 560px) { .stats-strip { grid-template-columns: 1fr 1fr; row-gap: 22px; } }

/* Section header */
.sec { padding: 88px 0; }
.sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; margin-bottom: 44px; }
.sec-meta { display: flex; align-items: center; gap: 8px; font: 600 13px var(--mono); color: var(--signal-text); letter-spacing: .08em; text-transform: uppercase; margin: 0 0 12px; }
.sec-meta .sep { color: var(--ink-3); opacity: .5; }
.sec-head h2 { font: 500 clamp(2.1rem, 3.8vw, 3rem)/1.1 var(--display); letter-spacing: -.035em; max-width: 580px; margin: 0; }
.sec-desc { max-width: 440px; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.sec-desc p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--text-body2); }
.sec-link { display: inline-flex; align-items: center; gap: 6px; font: 600 15px var(--display); color: var(--ink); text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer; transition: gap .15s var(--ease), color .15s; }
.sec-link:hover { color: var(--signal-text); gap: 10px; }
@media (max-width: 1024px) { .sec-head { flex-direction: column; align-items: flex-start; gap: 16px; } }

/* Project cards */
.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.project-grid.extra { margin-top: 28px; display: none; }
.project-grid.extra.open { display: grid; animation: fade-up .4s ease forwards; }
.project-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-xl); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-sm); text-decoration: none; color: inherit; transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s; }
.project-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--line-strong); }
.project-media { height: 220px; background: var(--paper-2); display: flex; align-items: flex-end; justify-content: center; gap: 10px; padding: 20px 16px 0; overflow: hidden; }
.project-media > * { transition: transform .5s var(--ease); }
.project-card:hover .project-media > * { transform: scale(1.04); }
.project-media img { width: 30%; max-width: 120px; }
.project-media.eq { align-items: center; padding: 16px; gap: 6px; }
.project-media.eq img { width: 27%; }
.project-media.eq img.app { width: 22%; border-radius: 8px; border: 1px solid var(--line); }
.project-media.eq span { font: 500 22px var(--display); color: var(--signal-text); }
.project-media.cover { padding: 0; }
.project-media.cover img { width: 100%; max-width: none; height: 100%; object-fit: cover; }
.project-media.flat img { border-radius: 10px 10px 0 0; box-shadow: var(--shadow-md); width: 38%; }
.project-body { padding: 26px 24px; display: flex; flex-direction: column; gap: 12px; flex-grow: 1; }
.project-title-row { display: flex; align-items: baseline; gap: 10px; }
.project-index { font: 600 13px var(--mono); color: var(--ink-3); }
.project-title { font: 500 23px var(--display); letter-spacing: -.02em; margin: 0; }
.project-cat { font-size: 13px; font-weight: 600; color: var(--ink-3); }
.project-desc { font-size: 15px; line-height: 1.55; color: var(--text-body2); margin: 0; flex-grow: 1; }
.project-result { font-size: 14px; color: var(--ok-ink); background: var(--ok-soft); border-radius: 10px; padding: 8px 12px; align-self: flex-start; }
.project-result b { font: 600 16px var(--display); }
.tag-pills { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; }
.tag-pills li { font-size: 12px; font-weight: 500; color: var(--ink-2); background: var(--paper-2); border: 1px solid var(--line); padding: 4px 10px; border-radius: 999px; }
.project-action { display: inline-flex; align-items: center; gap: 6px; font: 600 14px var(--display); color: var(--signal-text); margin-top: 4px; transition: gap .15s var(--ease); }
.project-card:hover .project-action { gap: 10px; }
.more-row { display: flex; justify-content: center; margin-top: 36px; }
@media (max-width: 1024px) { .project-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .project-grid { grid-template-columns: 1fr; } }

/* Process */
.process-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.process-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px 24px; display: flex; flex-direction: column; gap: 14px; transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s; }
.process-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.process-top { display: flex; align-items: center; justify-content: space-between; }
.p-icon { width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.p-icon svg { width: 22px; height: 22px; }
.p-arrow { color: var(--ink-3); }
.p-num { font: 600 13px var(--mono); color: var(--ink-3); }
.process-card h3 { font: 500 20px var(--display); margin: 0; }
.process-card p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--text-body2); }
@media (max-width: 1024px) { .process-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .process-grid { grid-template-columns: 1fr; } }

/* Experience */
.exp-list { display: flex; flex-direction: column; gap: 16px; }
.exp-list.extra { display: none; margin-top: 16px; }
.exp-list.extra.open { display: flex; animation: fade-up .35s ease forwards; }
.exp-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-xl); padding: 28px 32px; display: flex; align-items: center; justify-content: space-between; gap: 28px; transition: transform .25s var(--ease), border-color .25s, box-shadow .25s; }
.exp-card:hover { transform: translateX(4px); border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.exp-left { display: flex; align-items: flex-start; gap: 20px; max-width: 700px; }
.logo-badge { flex: 0 0 46px; width: 46px; height: 46px; border-radius: 50%; background: #141416; color: #fff; display: flex; align-items: center; justify-content: center; font: 700 17px var(--display); }
.logo-badge.blue { background: #4169e1; }
.logo-badge.sand { background: #8f6534; }
.exp-title-row { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.exp-title-row h3 { font: 700 18px var(--display); margin: 0; }
.exp-period { font-size: 13px; font-weight: 500; color: var(--ink-3); }
.exp-role { font-size: 14px; font-weight: 600; color: var(--signal-text); margin: 4px 0 6px; }
.exp-desc { font-size: 15px; line-height: 1.55; color: var(--text-body2); margin: 0; }
.exp-tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; max-width: 300px; list-style: none; padding: 0; margin: 0; }
.exp-tags li { font-size: 12px; font-weight: 500; color: var(--ink-2); background: var(--paper-2); border: 1px solid var(--line); padding: 4px 10px; border-radius: 999px; }
.exp-tags li.hot { color: var(--signal-ink); background: var(--signal-soft); border-color: transparent; }
.exp-toggle { margin-top: 28px; }
@media (max-width: 860px) { .exp-card { flex-direction: column; align-items: flex-start; padding: 24px; } .exp-tags { justify-content: flex-start; } }

/* CTA + footer (also restyles the old .contact block on case-study pages) */
.cta-card, .contact { position: relative; overflow: hidden; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-xl); box-shadow: var(--shadow-sm); text-align: center; }
.contact { max-width: var(--wrap); margin: 88px auto 40px; width: calc(100% - 2 * var(--gutter)); }
.cta-card::before, .contact::before { content: ""; position: absolute; top: -120px; left: 50%; transform: translateX(-50%); width: 420px; height: 260px; background: radial-gradient(circle, rgba(255,85,51,.12), rgba(255,85,51,0) 70%); pointer-events: none; }
.cta-card { padding: 72px 48px; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.contact .wrap { padding: 72px 32px; display: flex; flex-direction: column; align-items: center; }
.cta-card h2, .contact h2 { font: 500 clamp(2rem, 3.6vw, 2.9rem)/1.15 var(--display); letter-spacing: -.035em; max-width: 740px; margin: 0 auto; }
.cta-card p, .contact p { font-size: 17px; color: var(--text-body2); max-width: 580px; line-height: 1.6; margin: 0 auto; }
.contact p { margin: 18px auto 28px; }
.cta-card .actions, .contact .actions, .contact .wrap > div { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.contact .btn-primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.contact .btn-ghost { background: var(--card); color: var(--ink); border-color: var(--line); }
.contact .btn-ghost:hover { background: var(--paper-2); color: var(--ink); }
@media (max-width: 560px) { .cta-card { padding: 52px 22px; } .contact .wrap { padding: 52px 20px; } }
.foot2 { padding: 28px 0 40px; border-top: 1px solid var(--line); }
.foot2 .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.foot2 nav { display: flex; gap: 20px; flex-wrap: wrap; }
.foot2 a { font-size: 14px; color: var(--ink-2); text-decoration: none; }
.foot2 a:hover { color: var(--ink); }
.foot2 small { font-size: 13px; color: var(--ink-3); }

/* Case-study pages: cards pick up the new radius/shadow language */
.short, .res, .quote, .ov, .td, .decision, .comp, .next-card, .wide-img, .counts div, .layers { box-shadow: var(--shadow-sm); }
.short { border-radius: var(--radius-xl); }
.cs-banner, .fd-phones, .equation.cover, .cs-cover { border-radius: var(--radius-xl); }
.zd-demo { --ink: #121212; --ink-2: #5e5d59; --ink-3: #6b6a64; color: #121212; }

/* AI workflow: mermaid */
.mermaid-wrap { margin-top: 36px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-xl); box-shadow: var(--shadow-sm); padding: clamp(20px, 4vw, 44px); overflow-x: auto; }
.mermaid-wrap .mermaid { display: flex; justify-content: center; min-width: 640px; opacity: 0; transition: opacity .3s; }
.mermaid-wrap .mermaid[data-processed="true"] { opacity: 1; }
.ai-table { margin-top: 24px; width: 100%; border-collapse: collapse; font-size: 15px; }
.ai-table th { text-align: left; font: 600 12.5px var(--mono); color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; padding: 10px 12px; border-bottom: 1px solid var(--ink); }
.ai-table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--text-body2); }
.ai-table td:first-child { font: 500 16px var(--display); color: var(--ink); white-space: nowrap; }
@media (max-width: 640px) { .ai-table thead { display: none; } .ai-table tr { display: block; border-bottom: 1px solid var(--line); padding: 10px 0; } .ai-table td { display: block; border: 0; padding: 4px 0; } }
.cta-card .sec-meta { color: var(--signal-text); font-size: 13px; margin: 0; }
.mermaid-wrap .mermaid svg { width: 100%; max-width: 100% !important; height: auto; }
.compare img { width: 100%; max-width: 330px; margin: 0 auto; } .compare figcaption { text-align: center; } .compare + .compare { margin-top: 24px; }

/* AI workflow v2: step cards */
.wf-steps { display: flex; flex-direction: column; gap: 16px; margin: 30px 0 0 208px; }
.wf-step { display: grid; grid-template-columns: 56px 1fr; gap: 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-xl); padding: 26px 28px; box-shadow: var(--shadow-sm); transition: transform .25s var(--ease), border-color .25s; }
.wf-step:hover { transform: translateX(4px); border-color: var(--line-strong); }
.wf-n { font: 600 13px var(--mono); color: var(--signal-text); background: var(--signal-soft); width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.wf-step h3 { font: 500 22px var(--display); margin: 6px 0 4px; letter-spacing: -.01em; }
.wf-tools { font: 400 13px var(--mono); color: var(--ink-3); margin: 0 0 14px; }
.wf-step dl { display: grid; grid-template-columns: 90px 1fr; gap: 6px 14px; margin: 0; }
.wf-step dt { font: 600 12px var(--mono); color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; padding-top: 3px; }
.wf-step dd { margin: 0; font-size: 15.5px; color: var(--text-body2); }
.wf-ex { margin: 16px 0 0; padding: 12px 16px; background: var(--paper-2); border-radius: 12px; font-size: 15px; color: var(--text-body2); }
.wf-ex b { color: var(--ink); }
.wf-ph { min-height: 140px; margin-top: 16px; }
.wf-compare { margin: 18px 0 0; }
.wf-compare img { max-width: 240px; border-radius: 14px; border: 1px solid var(--line); }
.wf-compare.single { grid-template-columns: 1fr; }
@media (max-width: 860px) { .wf-steps { margin-left: 0; } }
@media (max-width: 560px) { .wf-step { grid-template-columns: 1fr; padding: 22px; } .wf-step dl { grid-template-columns: 1fr; } .wf-compare img { max-width: 100%; } }
.mermaid-wrap .mermaid { min-width: 0; }
.mermaid-wrap .mermaid .cluster-label, .mermaid-wrap .mermaid .cluster text { font-family: var(--mono) !important; font-weight: 600; }

/* AI workflow: legend + habit cards */
.legend { margin-top: 16px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.lg { display: flex; gap: 12px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px; box-shadow: var(--shadow-sm); }
.lg b { font: 600 15px var(--display); display: block; margin-bottom: 4px; }
.lg p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--text-body2); }
.sw { flex: 0 0 22px; height: 22px; border-radius: 6px; margin-top: 1px; }
.sw-input { background: #f3efe6; border: 1.5px solid #c9bfa9; }
.sw-gate { background: #fff4e6; border: 1.5px solid #ff8a3d; transform: rotate(45deg) scale(.8); }
.sw-ds { background: #e8eefc; border: 1.5px solid #4169e1; border-radius: 50%; }
.sw-loop { border: 2px dashed var(--signal); border-radius: 50%; }
@media (max-width: 1000px) { .legend { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .legend { grid-template-columns: 1fr; } }

.habits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 30px 0 0 208px; }
.habit { border-radius: var(--radius-xl); padding: 26px 24px; border: 1px solid transparent; transition: transform .25s var(--ease); }
.habit:hover { transform: translateY(-4px); }
.habit .h-n { font: 600 13px var(--mono); }
.habit h3 { font: 500 21px var(--display); margin: 10px 0 8px; letter-spacing: -.01em; }
.habit p { margin: 0; font-size: 15.5px; line-height: 1.55; color: var(--text-body2); }
.h-coral { background: var(--signal-soft); border-color: rgba(255,85,51,.25); } .h-coral .h-n { color: var(--signal-ink); }
.h-blue { background: #e8eefc; border-color: rgba(65,105,225,.25); } .h-blue .h-n { color: #2f55c9; }
.h-green { background: var(--ok-soft); border-color: rgba(16,185,129,.25); } .h-green .h-n { color: var(--ok-ink); }
:root[data-theme="dark"] .h-blue { background: rgba(65,105,225,.16); } :root[data-theme="dark"] .h-blue .h-n { color: #9db2ff; }
:root[data-theme="dark"] .sw-input { background: #2a2620; } :root[data-theme="dark"] .sw-gate { background: #3a2616; } :root[data-theme="dark"] .sw-ds { background: #1b2544; }
@media (max-width: 860px) { .habits { margin-left: 0; grid-template-columns: 1fr; } }
/* step numbers match the diagram colours */
.wf-step:nth-child(1) .wf-n { background: #ffe9e3; color: #c2361a; }
.wf-step:nth-child(2) .wf-n { background: #fff3d6; color: #9a5b00; }
.wf-step:nth-child(3) .wf-n { background: #efe8ff; color: #6d28d9; }
.wf-step:nth-child(4) .wf-n { background: #e3ecff; color: #2553c9; }
.wf-step:nth-child(5) .wf-n { background: #d9f7f1; color: #0f766e; }
.wf-step:nth-child(1) { border-left: 4px solid #ff5533; }
.wf-step:nth-child(2) { border-left: 4px solid #f59e0b; }
.wf-step:nth-child(3) { border-left: 4px solid #8b5cf6; }
.wf-step:nth-child(4) { border-left: 4px solid #3b6ff0; }
.wf-step:nth-child(5) { border-left: 4px solid #14b8a6; }
.mermaid-wrap { background: linear-gradient(135deg, rgba(255,85,51,.05), rgba(59,111,240,.05) 50%, rgba(20,184,166,.06)), var(--card); }
/* bolder, more readable diagram labels */
.mermaid-wrap .mermaid .nodeLabel, .mermaid-wrap .mermaid .nodeLabel p { font-weight: 600 !important; color: inherit; }
.mermaid-wrap .mermaid .nodeLabel b { font-weight: 800 !important; font-size: 1.08em; }
.mermaid-wrap .mermaid .edgeLabel, .mermaid-wrap .mermaid .edgeLabel p, .mermaid-wrap .mermaid .edgeLabel span { font-weight: 700 !important; color: var(--ink) !important; }
/* section intro text sits under the heading, not on the right */
.sec-head { flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 16px; }
.sec-head h2 { max-width: 760px; }
.sec-desc { max-width: 640px; }
.sec-head h2 { max-width: 920px; text-wrap: balance; }
/* handwritten note under the receipt */
.hero2-right .caption { font: 600 26px/1.2 "Caveat", cursive; color: var(--ink-2); transform: rotate(-2deg); margin-top: 10px; align-self: center; text-align: center; }
.hero2-right .caption::before { content: "↑ "; color: var(--signal-text); }
.hero2-right .caption { font-size: 29px; max-width: 360px; text-wrap: balance; }

/* =========================================================
   v3 — PM + Designer pass (2026-10-14)
   Clean-up of decorative noise, mobile fixes, shared
   case-study pieces (at-a-glance, 4-step index).
   ========================================================= */

/* Remove decorative noise */
.ai-orb { display: none; }
.status i::before { display: none; }
.cta-card::before, .contact::before { display: none; }
.mermaid-wrap { background: var(--card); }
.wf-step:nth-child(n) { border-left: 1px solid var(--line); }
.wf-step:nth-child(n) .wf-n { background: var(--signal-soft); color: var(--signal-ink); }
.habit.h-coral, .habit.h-blue, .habit.h-green { background: var(--card); border-color: var(--line); box-shadow: var(--shadow-sm); }
.habit .h-n, .h-blue .h-n, .h-green .h-n, .h-coral .h-n { color: var(--signal-ink); }
:root[data-theme="dark"] .habit.h-blue { background: var(--card); }

/* Tap targets */
.theme-toggle, .menu-btn { width: 44px; height: 44px; }
.foot2 a { display: inline-block; padding: 10px 0; }
.sec-link { padding: 10px 0; }

/* Header: resume menu */
.nav-pill .menu { position: relative; }
.nav-pill details > summary { list-style: none; cursor: pointer; font: 500 14px var(--display); color: var(--ink-2); padding: 8px 18px; border-radius: 999px; }
.nav-pill details > summary::-webkit-details-marker { display: none; }
.nav-pill details > summary::after { content: " \25BE"; font-size: 11px; color: var(--ink-3); }
.nav-pill details[open] > summary, .nav-pill details > summary:hover { color: var(--ink); }
.nav-pill details .pop { position: absolute; right: 0; top: calc(100% + 10px); min-width: 230px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 6px; box-shadow: var(--shadow-float); display: flex; flex-direction: column; }
.nav-pill details .pop a { padding: 12px 14px; border-radius: 10px; }
.nav-pill details .pop a:hover { background: var(--paper-2); }
.nav-pill details .pop small { display: block; font: 400 12px var(--mono); color: var(--ink-3); }
.mobile-drawer .drawer-label { font: 600 12px var(--mono); color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; padding: 12px 14px 2px; }

/* Hero: spec line replaces the 4-stat grid */
.spec-line { display: flex; flex-wrap: wrap; gap: 10px 0; list-style: none; margin: 4px 0 0; padding: 18px 0 0; border-top: 1px solid var(--line); font: 500 13.5px var(--mono); color: var(--ink-2); }
.spec-line li { padding-right: 16px; margin-right: 16px; border-right: 1px solid var(--line-strong); }
.spec-line li:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.spec-line b { color: var(--ink); font-weight: 600; }
.hero2 .lede b { color: var(--ink); font-weight: 600; }

/* Mobile hero: receipt right under the headline */
@media (max-width: 1024px) {
  .hero2 .wrap { display: flex; flex-direction: column; align-items: stretch; gap: 22px; }
  .hero2-left { display: contents; }
  .hero2-left .status { order: 1; }
  .hero2-left h1 { order: 2; }
  .hero2-right { order: 3; align-items: center; margin: 8px 0 6px; }
  .hero2-left .lede { order: 4; }
  .hero2-left .actions { order: 5; }
  .hero2-left .spec-line { order: 6; }
}
@media (max-width: 560px) {
  .hero2 { padding-top: 12px; }
  .hero2 h1 { font-size: clamp(1.9rem, 8.2vw, 2.4rem); line-height: 1.1; letter-spacing: -.03em; }
  .receipt { font-size: 13px; padding: 24px 20px 34px; transform: rotate(.6deg); }
  .receipt .row { gap: 10px; }
  .hero2-right .caption { font-size: 22px; }
  .hero2 .actions .btn { flex: 1 1 auto; justify-content: center; }
  .spec-line { font-size: 12.5px; }
  .sec { padding: 64px 0; }
  .project-body { padding: 22px 20px; }
  .tag-pills li { font-size: 12.5px; }
}

/* Project cards: "my part" rows + coming-soon slot */
.my-part { display: grid; gap: 6px; margin: 0; }
.my-part div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.my-part dt { font: 600 11.5px var(--mono); color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; width: 64px; flex: none; }
.my-part dd { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.project-card.soon { border: 1.5px dashed var(--line-strong); background: transparent; box-shadow: none; }
.project-card.soon:hover { transform: none; box-shadow: none; }
.project-card.soon .project-media { background: transparent; align-items: center; font: 500 13px var(--mono); color: var(--ink-3); border-bottom: 1.5px dashed var(--line-strong); }
.project-media.diagram { align-items: center; padding: 18px; }
.project-media.diagram svg { width: 100%; height: 100%; }
.project-media.phones-3 img { width: 30%; }

/* Home: 4-step method (editorial ruled row) */
.steps .step h3 { font-size: 22px; }

/* ---------- Case study shell ---------- */
.glance { margin-top: 36px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.glance > div { padding: 18px 20px; }
.glance > div + div { border-left: 1px solid var(--line); }
.glance dt { font: 600 11.5px var(--mono); color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.glance dd { margin: 0; font-size: 15px; line-height: 1.45; }
.glance dd b { font: 600 19px/1.2 var(--display); letter-spacing: -.01em; display: block; color: var(--ok-ink); }
@media (max-width: 960px) {
  .glance { grid-template-columns: 1fr 1fr; }
  .glance > div + div { border-left: 0; }
  .glance > div { border-top: 1px solid var(--line); }
  .glance > div:nth-child(-n+2) { border-top: 0; }
  .glance > div:nth-child(even) { border-left: 1px solid var(--line); }
  .glance > div.wide { grid-column: 1 / -1; border-left: 0; }
}
@media (max-width: 420px) { .glance { grid-template-columns: 1fr; } .glance > div { border-left: 0 !important; border-top: 1px solid var(--line); } .glance > div:first-child { border-top: 0; } }

.cs-index { position: sticky; top: 64px; z-index: 50; margin-top: 40px; background: var(--header-bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cs-index ol { list-style: none; margin: 0 auto; padding: 0 var(--gutter); max-width: var(--wrap); display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.cs-index ol::-webkit-scrollbar { display: none; }
.cs-index a { display: flex; align-items: center; gap: 8px; padding: 14px 14px; min-height: 48px; text-decoration: none; font: 500 14px var(--display); color: var(--ink-2); white-space: nowrap; border-bottom: 2px solid transparent; }
.cs-index a span { font: 600 12px var(--mono); color: var(--ink-3); }
.cs-index a:hover { color: var(--ink); }
.cs-index a.active { color: var(--ink); border-bottom-color: var(--signal); }
.cs-index a.active span { color: var(--signal-text); }
.phase { scroll-margin-top: 130px; }
.phase-head { display: flex; align-items: baseline; gap: 14px; padding-top: clamp(56px, 7vw, 96px); margin-bottom: 4px; }
.phase-head .pn { font: 600 13px var(--mono); color: var(--signal-text); letter-spacing: .08em; text-transform: uppercase; }
.phase-head .pl { flex: 1; height: 1px; background: var(--line-strong); }
.phase > .chapter:first-of-type { padding-top: 24px; }

/* Short work pages: plain fact list */
.facts { margin: 30px 0 0 208px; border-top: 1px solid var(--ink); max-width: 760px; }
.facts div { display: grid; grid-template-columns: 180px 1fr; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.facts dt { font: 600 12.5px var(--mono); color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; padding-top: 3px; }
.facts dd { margin: 0; color: var(--text-body2); }
@media (max-width: 860px) { .facts { margin-left: 0; } }
@media (max-width: 520px) { .facts div { grid-template-columns: 1fr; gap: 4px; } }

.figure-card { margin: 30px 0 0 208px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-xl); box-shadow: var(--shadow-sm); padding: clamp(18px, 3vw, 36px); }
.figure-card svg { width: 100%; height: auto; display: block; }
.figure-card figcaption { font-size: 14px; color: var(--ink-3); margin-top: 14px; }
@media (max-width: 860px) { .figure-card { margin-left: 0; } }
.recreated { display: inline-block; font: 600 11px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px 9px; margin-top: 8px; }

/* Mobile layout fixes for existing case-study parts */
@media (max-width: 520px) {
  .map-row { grid-template-columns: 1fr; gap: 2px; }
  .map-row.head { display: none; }
  .map-row span:nth-child(2) { text-align: left; transform: rotate(90deg); width: 14px; }
  .meta { grid-template-columns: 1fr; gap: 14px; }
  .equation img { max-height: 150px; }
  .cs-hero h1 { font-size: clamp(1.9rem, 8.4vw, 2.4rem); line-height: 1.08; }
  .cs-banner { padding-top: 28px; }
  .chapter-head h2 { font-size: clamp(1.6rem, 6.6vw, 2rem); }
}
@media (max-width: 560px) {
  .spec-line { flex-direction: column; gap: 6px; }
  .spec-line li { border-right: 0; margin-right: 0; padding-right: 0; }
}
.phase { padding: 0; }

/* Activation: the definition, written like an equation */
.def-card { margin: 30px 0 0 208px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-xl); box-shadow: var(--shadow-sm); padding: clamp(22px, 4vw, 40px); }
.def-card .def-k { font: 600 12px var(--mono); color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em; margin: 0 0 18px; }
.def-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.def-term { border: 1.5px solid var(--ink); border-radius: 14px; padding: 12px 18px; }
.def-term b { display: block; font: 600 clamp(26px, 3.4vw, 38px)/1 var(--display); letter-spacing: -.02em; }
.def-term span { font-size: 14px; color: var(--ink-2); }
.def-op { font: 500 28px var(--display); color: var(--signal); }
.def-when { margin: 18px 0 0; font: 500 15px var(--mono); color: var(--ink); }
.def-when i { font-style: normal; background: var(--signal-soft); color: var(--signal-ink); padding: 2px 8px; border-radius: 6px; }
@media (max-width: 860px) { .def-card { margin-left: 0; } }

/* Zobaze-style phone mockups, recreated in HTML (always light, app colours) */
.zrow { display: flex; gap: clamp(14px, 3vw, 28px); justify-content: center; flex-wrap: wrap; margin: 30px 0 0 208px; background: var(--paper-2); border-radius: var(--radius-xl); padding: 28px 16px; }
@media (max-width: 860px) { .zrow { margin-left: 0; } }
.zfig { margin: 0; width: 236px; display: flex; flex-direction: column; align-items: center; }
.zfig figcaption { font-size: 14px; color: var(--ink-2); margin-top: 12px; text-align: center; max-width: 230px; }
.zfig figcaption b { display: block; color: var(--ink); font: 500 15px var(--display); }
.zfig img { width: 236px; border-radius: 18px; box-shadow: 0 18px 30px -18px rgba(20,20,20,.35); border: 1px solid var(--line); }
.zphone { width: 236px; height: 470px; border-radius: 18px; overflow: hidden; background: #eef0f5; color: #212121; font: 400 12px/1.35 "Lato", "Figtree", sans-serif; box-shadow: 0 18px 30px -18px rgba(20,20,20,.35); border: 1px solid rgba(0,0,0,.08); display: flex; flex-direction: column; position: relative; }
.zphone .zs { height: 18px; background: #3457c9; }
.zphone .zh { background: #4169e1; color: #fff; font-weight: 700; font-size: 14px; padding: 12px 14px; display: flex; align-items: center; gap: 10px; }
.zphone .zh::before { content: "\2190"; font-weight: 400; }
.zphone .zbody { padding: 10px; display: flex; flex-direction: column; gap: 8px; flex: 1; overflow: hidden; }
.zfield { background: #fff; border-radius: 4px; padding: 7px 9px; border: 1px solid #dfe3ec; }
.zfield small { display: block; color: #757575; font-size: 10px; }
.zfield span { font-size: 12px; color: #9e9e9e; }
.zfield.on span { color: #212121; }
.zbtn { margin-top: auto; background: #4169e1; color: #fff; text-align: center; font-weight: 700; padding: 10px; border-radius: 4px; }
.zbtn.green { background: #4caf50; }
.zcard { background: #fff; border-radius: 8px; padding: 14px; box-shadow: 0 2px 6px rgba(0,0,0,.12); }
.zcard .zk { color: #757575; font-size: 10px; }
.zcard h5 { font: 700 15px "Lato", "Figtree", sans-serif; margin: 6px 0 2px; }
.zcard p { margin: 0; color: #616161; }
.zstack { position: relative; height: 210px; margin-top: 6px; }
.zstack .zcard { position: absolute; inset: 0 0 auto 0; height: 180px; }
.zstack .zcard.b2 { transform: translate(6px, 14px) rotate(3deg); opacity: .55; }
.zstack .zcard.b1 { transform: rotate(-6deg) translateX(-14px); }
.zswipe { display: flex; justify-content: space-between; font-weight: 700; font-size: 12px; padding: 0 4px; }
.zswipe .l { color: #f44336; } .zswipe .r { color: #4caf50; }
.zchips { display: flex; flex-wrap: wrap; gap: 5px; }
.zchips span { background: #e9eefc; color: #2f55c9; border-radius: 999px; padding: 3px 8px; font-size: 10.5px; font-weight: 700; }
.zchips span.off { background: #eee; color: #9e9e9e; text-decoration: line-through; font-weight: 400; }
.zring { width: 92px; height: 92px; border-radius: 50%; margin: 6px auto 4px; display: grid; place-items: center; background: conic-gradient(#4caf50 calc(var(--p) * 1%), #e0e0e0 0); }
.zring b { width: 74px; height: 74px; border-radius: 50%; background: #fff; display: grid; place-items: center; font: 700 20px "Lato", sans-serif; color: #388e3c; }
.zgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: #e0e0e0; border-radius: 6px; overflow: hidden; }
.zgrid div { background: #fff; padding: 8px; text-align: center; }
.zgrid b { display: block; font-size: 15px; }
.zgrid small { color: #757575; font-size: 10px; }
.zinput { background: #f1f1f1; border-radius: 4px; padding: 9px 10px; font-weight: 700; display: flex; justify-content: space-between; margin-top: 10px; }
.zlater { color: #4169e1; font-weight: 700; }
.loop { margin: 30px 0 0 208px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.loop span { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; font: 500 14px var(--display); }
.loop i { font-style: normal; color: var(--ink-3); }
.loop .again { background: var(--signal-soft); border-color: transparent; color: var(--signal-ink); }
@media (max-width: 860px) { .loop { margin-left: 0; } }
@media (max-width: 520px) { .zrow { padding: 20px 8px; } }
.figure-card .only-mobile { display: none; }
@media (max-width: 600px) {
  .figure-card .only-desktop { display: none; }
  .figure-card .only-mobile { display: block; max-width: 340px; margin: 0 auto; }
  .figure-card.scroll { overflow-x: auto; }
  .figure-card.scroll svg { min-width: 560px; }
}

/* AI work: support diagram note */
.mermaid-note { font-size: 14px; color: var(--ink-3); margin: 14px 0 0; }
.mermaid-wrap .mermaid[data-src="support-src"] svg { max-width: 640px !important; }
@media (max-width: 560px) { .mermaid-wrap .mermaid[data-src="support-src"] { min-width: 520px; justify-content: flex-start; } }

/* AI work: three-screen example row (design-to-code page) */
.wf-compare.trio { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 640px) { .wf-compare.trio { grid-template-columns: 1fr; } }

/* ---------- Compact case study (.cs-compact) — trial on the 3 AI pages ----------
   One heading per step, heading left (sticky) and content right, so a block is as
   tall as its content, not heading + content stacked. Full-width part for diagrams. */
.cs-compact .glance { grid-template-columns: repeat(3, 1fr); }
.cs-compact .phase.cx {
  display: grid; grid-template-columns: 260px minmax(0, 1fr); column-gap: 48px;
  padding: 48px 0 0; margin-top: 48px; border-top: 1px solid var(--line-strong);
}
.cs-compact .phase.cx:first-of-type { margin-top: 24px; }
.cs-compact .cx-head { align-self: start; }
.cs-compact .cx-head .pn { font: 600 13px var(--mono); color: var(--signal-text); letter-spacing: .08em; text-transform: uppercase; }
.cs-compact .cx-head h2 { font-size: clamp(24px, 2.3vw, 30px); line-height: 1.15; margin: 10px 0 0; }
.cs-compact .cx-body { max-width: 68ch; }
.cs-compact .cx-body > :first-child { margin-top: 0; }
.cs-compact .cx-body .prose,
.cs-compact .cx-body .facts,
.cs-compact .cx-body .results,
.cs-compact .cx-full .habits { margin-left: 0; }
.cs-compact .cx-body .prose { margin-top: 0; }
.cs-compact .cx-body .prose > :last-child { margin-bottom: 0; }
.cs-compact .cx-body .facts { max-width: none; }
.cs-compact .cx-body .facts div { grid-template-columns: 1fr; gap: 2px; padding: 12px 0; }
.cs-compact .cx-body .facts dt { padding-top: 0; }
.cs-compact .cx-body .results { margin-top: 0; }
.cs-compact .cx-full { grid-column: 1 / -1; margin-top: 28px; }
.cs-compact .cx-full > .mermaid-wrap, .cs-compact .cx-full > .figure-card { margin-top: 0; }
.cs-compact .habits.two { grid-template-columns: repeat(2, 1fr); margin-top: 20px; }
.cs-compact .wf-compare { margin-top: 16px; }
.cs-compact .next-case { margin-top: 64px; }
@media (max-width: 860px) {
  .cs-compact .phase.cx { grid-template-columns: minmax(0, 1fr); padding-top: 36px; margin-top: 36px; }
  .cs-compact .cx-head { margin-bottom: 18px; }
  .cs-compact .habits.two { grid-template-columns: 1fr; }
}
@media (max-width: 640px) { .cs-compact .glance { grid-template-columns: 1fr; } }
.cs-compact .cx-body .facts { border-top: 0; }
.cs-compact .cx-body .facts div:first-child { padding-top: 0; }
@media (min-width: 861px) { .cs-compact .mermaid-wrap .mermaid[data-src="support-src"] svg { max-width: 100% !important; } }
@media (min-width: 861px) { .cs-compact .results:has(> .res:nth-child(2):last-child) { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 861px) { .cs-compact .legend { grid-template-columns: repeat(3, 1fr); } }

/* Compact layout on Work case studies: same idea, CSS only.
   Each chapter: heading left (eyebrow + H2), content right. Not sticky, so it never
   slides over wide content. Phase-level wide parts (.fd, .flow) keep full width. */
.cs-compact .phase-head { padding-top: 56px; }
.cs-compact .phase > .chapter:first-of-type { padding-top: 20px; }
.cs-compact .chapter {
  display: grid; grid-template-columns: 260px minmax(0, 1fr); column-gap: 48px;
  padding-top: 48px; align-items: start;
}
.cs-compact .chapter > * { grid-column: 2; margin-left: 0; }
.cs-compact .chapter > :nth-child(2) { margin-top: 0; }
.cs-compact .chapter > .chapter-head { grid-column: 1; grid-row: 1; display: block; }
.cs-compact .chapter-head .sec-label { margin: 0 0 10px; }
.cs-compact .chapter-head h2 { font-size: clamp(24px, 2.3vw, 30px); line-height: 1.15; max-width: none; }
.cs-compact .chapter > .prose { margin-top: 0; }
.cs-compact .chapter > .facts { max-width: none; }
/* Phone-screen rows need the full width, or they wrap onto two lines */
.cs-compact .chapter > .zrow, .cs-compact .chapter > .loop { grid-column: 1 / -1; }
@media (max-width: 860px) {
  .cs-compact .chapter { grid-template-columns: minmax(0, 1fr); padding-top: 36px; }
  .cs-compact .chapter > *, .cs-compact .chapter > .chapter-head { grid-column: 1; grid-row: auto; }
  .cs-compact .chapter > .chapter-head { margin-bottom: 18px; }
  .cs-compact .phase-head { padding-top: 40px; }
}
/* Theme tag above a case study title */
.cs-hero .cs-theme { margin: 22px 0 -8px; }
/* Home Work grid: 4 case studies as a 2×2 */
@media (min-width: 641px) { .project-grid.four { grid-template-columns: repeat(2, 1fr); } }

/* Header: LinkedIn icon + Contact menu (WhatsApp / Call / Email) */
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; text-decoration: none; transition: color .15s, border-color .15s; }
.icon-btn:hover { color: var(--ink); border-color: var(--line-strong); }
.contact-wrap { position: relative; }
button.btn-hire { border: 0; cursor: pointer; }
.contact-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 200px; display: flex; flex-direction: column; gap: 2px; padding: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); z-index: 60; }
.contact-menu[hidden] { display: none; }
.contact-menu a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; text-decoration: none; font: 500 15px var(--display); color: var(--ink); }
.contact-menu a svg { color: var(--ink-2); flex: none; }
.contact-menu a:hover, .contact-menu a:focus-visible { background: var(--paper-2); }
.mobile-drawer a.dc { display: flex; align-items: center; gap: 10px; }
@media (max-width: 860px) { .contact-wrap { display: none; } }

/* AI work tab: sparkle icon + gradient label (dark enough for AA on the pill) */
:root { --ai-a: #7c3aed; --ai-b: #2563eb; }
:root[data-theme="dark"] { --ai-a: #c4b5fd; --ai-b: #93c5fd; }
.nav-ai { display: inline-flex; align-items: center; gap: 6px; }
.nav-ai span { background: linear-gradient(90deg, var(--ai-a), var(--ai-b)); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 600; }
.nav-pill a.nav-ai { background: linear-gradient(90deg, color-mix(in srgb, var(--ai-a) 9%, transparent), color-mix(in srgb, var(--ai-b) 9%, transparent)); }
.nav-pill a.nav-ai.active::after { background: linear-gradient(90deg, var(--ai-a), var(--ai-b)); }
.ai-spark { flex: none; }
@media (forced-colors: active) { .nav-ai span { color: LinkText; background: none; } }
