/* Design system: shadcn/ui kit, Nova style (Obra Studio community edition) for components and type.
   Colors: Asana palette. Coral brand accent, warm neutrals, Asana's project colors for tags and charts.
   Buttons are near-black pills like asana.com; coral is for highlights. */
:root {
  --bg: #f6f4f3;            /* Asana warm off-white */
  --surface: #ffffff;
  --muted: #efecea;
  --ink: #1e1f21;           /* Asana text */
  --ink-soft: #3d3e40;
  --ink-faint: #6d6e6f;     /* Asana secondary text */
  --rule: #e8e5e3;          /* Asana warm border */
  --rule-strong: #cfcbcb;
  --accent: #f06a6a;        /* Asana coral */
  --accent-ink: #c2373f;    /* coral dark enough for text on white */
  --on-accent: #ffffff;
  --accent-soft: #fde5e3;
  --btn: #1e1f21; --on-btn: #ffffff;
  --warn: #c2373f;
  --grad: linear-gradient(120deg, #f06a6a 0%, #f88c6c 45%, #f8c9a0 100%);
  --m-green: #5da283; --m-orange: #f1bd6c; --m-red: #f06a6a; --m-purple: #aa62e3; --m-blue: #4573d2;
  --shadow-xs: 0 1px 2px 0 rgba(0,0,0,.05);
  --shadow-sm: 0 1px 3px 0 rgba(0,0,0,.1), 0 1px 2px -1px rgba(0,0,0,.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);
  --ring: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent);

  --font-display: "Geist", -apple-system, "Segoe UI", system-ui, sans-serif;
  --font-body: "Geist", -apple-system, "Segoe UI", system-ui, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --r-sm: 6px; --r-md: 8px; --r-lg: 10px; --r-xl: 14px;
  --step-0: 1rem;
  --step-1: 1.125rem;
  --step-2: 1.375rem;
  --step-3: clamp(1.625rem, 1.3rem + 1.2vw, 2.125rem);
  --step-4: clamp(2.25rem, 1.7rem + 2.2vw, 3.25rem);
  --frame: 1120px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1e1f21; --surface: #2a2b2d; --muted: #313234; --ink: #f5f4f3; --ink-soft: #d6d4d3; --ink-faint: #a2a0a2;
    --rule: #3a3b3d; --rule-strong: #565557; --accent: #f06a6a; --accent-ink: #ff8f8a; --on-accent: #1e1f21; --accent-soft: #4a2a2a; --warn: #ff8f8a;
    --btn: #f5f4f3; --on-btn: #1e1f21;
    --shadow-xs: 0 1px 2px 0 rgba(0,0,0,.4); --shadow-sm: 0 1px 3px 0 rgba(0,0,0,.5); --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1e1f21; --surface: #2a2b2d; --muted: #313234; --ink: #f5f4f3; --ink-soft: #d6d4d3; --ink-faint: #a2a0a2;
  --rule: #3a3b3d; --rule-strong: #565557; --accent: #f06a6a; --accent-ink: #ff8f8a; --on-accent: #1e1f21; --accent-soft: #4a2a2a; --warn: #ff8f8a;
  --btn: #f5f4f3; --on-btn: #1e1f21;
  --shadow-xs: 0 1px 2px 0 rgba(0,0,0,.4); --shadow-sm: 0 1px 3px 0 rgba(0,0,0,.5); --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.6);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 var(--step-0)/1.5 var(--font-body); -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--bg); }
img { max-width: 100%; display: block; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 500; line-height: 1.1; letter-spacing: -.025em; text-wrap: balance; }
h2 span, h1 em { font-style: normal; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--r-md); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

.wrap { width: 100%; max-width: var(--frame); margin-inline: auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.narrow { max-width: 760px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--on-accent); padding: 8px 14px; z-index: 100; border-radius: var(--r-md); }
.skip:focus { left: 16px; }
/* Badge (outline) used as eyebrow */
.eyebrow { display: inline-flex; align-items: center; gap: 6px; width: fit-content; font-size: .75rem; font-weight: 500; line-height: 1; color: var(--ink); padding: 5px 9px; border: 1px solid var(--rule); border-radius: var(--r-md); background: var(--surface); }
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.lede { font-size: var(--step-1); line-height: 1.55; color: var(--ink-faint); max-width: 58ch; }
.muted { color: var(--ink-faint); }
.lede a, .muted a, .gate-card a, .resume aside p a { color: var(--accent-ink); text-underline-offset: 3px; }
[data-hidden="true"] { display: none !important; }

main, .contact { display: block; }
.dots { display: none; }

/* Header: navigation menu */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--rule); }
.site-header .wrap { display: flex; align-items: center; gap: 20px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: .95rem; font-weight: 600; letter-spacing: -.01em; }
.brand-mark { width: 22px; height: 22px; position: relative; display: inline-block; border-radius: var(--r-sm); background: var(--ink); }
.brand-mark i { position: absolute; width: 6px; height: 6px; border-radius: 50%; display: block; background: var(--bg); }
.brand-mark i:nth-child(1) { left: 4px; top: 4px; } .brand-mark i:nth-child(2) { right: 4px; top: 4px; } .brand-mark i:nth-child(3) { left: 8px; bottom: 4px; background: var(--accent); }
.nav { display: flex; gap: 2px; margin-inline: auto; }
.nav a { font-size: .875rem; font-weight: 500; text-decoration: none; color: var(--ink-faint); padding: 7px 12px; border-radius: var(--r-md); transition: background .15s, color .15s; }
.nav a:hover { color: var(--ink); background: var(--muted); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--muted); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 36px; height: 36px; border: 1px solid var(--rule); border-radius: var(--r-md); background: var(--surface); color: var(--ink); display: inline-grid; place-items: center; cursor: pointer; box-shadow: var(--shadow-xs); }
.icon-btn:hover { background: var(--muted); }
.icon-btn svg { width: 16px; height: 16px; }
.menu-btn { display: none; }
@media (max-width: 860px) {
  .menu-btn { display: inline-grid; }
  .header-actions .btn { display: none; }
  .header-actions { margin-left: auto; }
  .nav { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; background: var(--bg); border-bottom: 1px solid var(--rule); padding: 8px max(20px, env(safe-area-inset-right, 0px)) 16px max(20px, env(safe-area-inset-left, 0px)); display: none; box-shadow: var(--shadow-lg); }
  .nav.open { display: flex; }
  .nav a { padding: 12px; font-size: 1rem; }
}

/* Button - Nova */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; text-decoration: none; cursor: pointer; font: 500 .875rem/1 var(--font-body); padding: 0 18px; border-radius: var(--r-md); border: 1px solid transparent; transition: background .15s, border-color .15s; white-space: nowrap; }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow-xs); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }
.btn-ghost { background: var(--surface); border-color: var(--rule); color: var(--ink); box-shadow: var(--shadow-xs); }
.btn-ghost:hover { background: var(--muted); }
.btn-small { height: 36px; padding: 0 14px; font-size: .84rem; }
.copy-btn { background: var(--accent); color: var(--on-accent); }

/* Badges */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: .75rem; font-weight: 500; line-height: 1; padding: 6px 9px; border-radius: var(--r-md); background: var(--muted); color: var(--ink-soft); }
.tag, .status { display: inline-flex; align-items: center; font-size: .75rem; font-weight: 500; line-height: 1; padding: 5px 8px; border-radius: var(--r-sm); background: var(--muted); color: var(--ink-soft); border: 0; }
.status-row { display: flex; flex-wrap: wrap; gap: 6px; }
.status:first-child { background: var(--accent-soft); color: var(--accent-ink); }
.lock-tag { font-size: .75rem; font-weight: 500; color: var(--ink-faint); margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border: 1px solid var(--rule); border-radius: var(--r-sm); }
.lock-tag::before { content: ""; width: 7px; height: 7px; border: 1.5px solid currentColor; border-radius: 2px; }
.outcome { font-size: .8rem; font-weight: 500; color: var(--accent-ink); }
/* Tabs (segmented) */
.filter { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: var(--r-lg); background: var(--muted); }
.filter button { font: 500 .84rem/1 var(--font-body); height: 32px; padding: 0 12px; border-radius: var(--r-md); border: 0; background: transparent; color: var(--ink-faint); cursor: pointer; }
.filter button:hover { color: var(--ink); }
.filter button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }

/* Sections */
.section { padding-block: clamp(56px, 8vw, 96px); }
.section + .section { border-top: 1px solid var(--rule); }
.section-head { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-bottom: clamp(28px, 4vw, 40px); }
.section-head > div { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.section-head h2 { font-size: var(--step-3); max-width: 26ch; }
.section-head h2 span { color: var(--ink-faint); }

/* Hero */
.hero { padding-block: clamp(56px, 8vw, 104px) clamp(40px, 6vw, 72px); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero-copy { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.hero h1 { font-size: var(--step-4); font-weight: 600; letter-spacing: -.035em; }
.hero .lede { margin: 0; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; } }
.stage { position: relative; min-height: 380px; border: 1px solid var(--rule); border-radius: var(--r-xl); overflow: hidden; padding: 40px 28px; display: grid; place-items: center; background: var(--muted); }
.stage .blob { display: none; }
.float-card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-xl); box-shadow: var(--shadow-sm); padding: 16px; }
.float-card.main { width: min(100%, 330px); position: relative; z-index: 2; box-shadow: var(--shadow-lg); }
.float-card.tilt-l, .float-card.tilt-r { position: absolute; width: 180px; padding: 12px; z-index: 3; }
.float-card.tilt-l { left: 14px; bottom: 16px; }
.float-card.tilt-r { right: 14px; top: 16px; }
.float-card.tilt-l .mini-line, .float-card.tilt-r .mini-line { display: none; }
@media (max-width: 560px) { .float-card.tilt-l, .float-card.tilt-r { display: none; } .stage { min-height: 0; } }
.mock-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.mock-title { font-size: .875rem; font-weight: 600; }
.mock-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.kpi { border: 1px solid var(--rule); border-radius: var(--r-md); padding: 8px 10px; }
.kpi b { display: block; font-weight: 600; font-size: 1.1rem; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi span { font-size: .7rem; color: var(--ink-faint); }
.bars { display: flex; align-items: end; gap: 6px; height: 96px; border-bottom: 1px solid var(--rule); }
.bars i { flex: 1; display: block; border-radius: 4px 4px 0 0; background: var(--accent); }
.bars i:nth-child(3n) { background: color-mix(in srgb, var(--accent) 35%, var(--surface)); }
.bars i:nth-child(4n) { background: color-mix(in srgb, var(--accent) 65%, var(--ink)); }
.mock-legend { display: flex; gap: 14px; margin-top: 10px; font-size: .7rem; color: var(--ink-faint); }
.mock-legend span::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 2px; background: var(--accent); }
.mock-legend span:nth-child(2)::before { background: color-mix(in srgb, var(--accent) 35%, var(--surface)); }
.mock-legend span:nth-child(3)::before { background: color-mix(in srgb, var(--accent) 65%, var(--ink)); }
.pill-stat { display: flex; align-items: center; gap: 10px; }
.pill-stat .dot { width: 34px; height: 34px; flex: none; border-radius: var(--r-md); display: grid; place-items: center; font-weight: 600; font-size: 1rem; background: var(--muted); }
.pill-stat .dot.sky { color: color-mix(in srgb, var(--accent) 60%, var(--ink)); background: var(--accent-soft); }
.pill-stat b { display: block; font-size: .84rem; font-weight: 600; line-height: 1.3; }
.pill-stat small { font-size: .74rem; color: var(--ink-faint); }
.mini-line { height: 6px; border-radius: 6px; background: var(--muted); margin-top: 8px; }
.mini-line.w80 { width: 80%; } .mini-line.w60 { width: 60%; } .mini-line.w40 { width: 40%; }
.hero .chips { margin-top: 8px; }

/* Stats: Card - Nova, four up */
.stats-band { padding-bottom: clamp(8px, 2vw, 24px); }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat { padding: 20px; border: 1px solid var(--rule); border-radius: var(--r-xl); background: var(--surface); box-shadow: var(--shadow-xs); display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.stat-head { display: flex; align-items: center; gap: 8px; font-size: .84rem; font-weight: 500; color: var(--ink-faint); }
.stat-icon { color: var(--ink-faint); display: inline-grid; margin-left: auto; order: 2; }
.stat-icon svg { width: 16px; height: 16px; }
.stat b { font-weight: 600; font-size: clamp(1.75rem, 1.5rem + 1vw, 2.25rem); letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat p { font-size: .8rem; color: var(--ink-faint); }
.stat em { font-style: normal; font-weight: 500; color: var(--ink); margin-right: 3px; }
.stat em.warn { color: var(--ink); }
@media (max-width: 860px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 340px) { .stats { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .stat { padding: 16px; } .stat b { font-size: 1.6rem; } }

/* Card - Nova grids */
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.card-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 960px) { .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .card-grid, .card-grid.two { grid-template-columns: 1fr; } }
.card { display: flex; flex-direction: column; text-decoration: none; border: 1px solid var(--rule); border-radius: var(--r-xl); background: var(--surface); box-shadow: var(--shadow-xs); overflow: hidden; min-width: 0; transition: border-color .15s, box-shadow .15s, transform .15s; }
.card:hover { border-color: var(--rule-strong); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.card-body { display: flex; flex-direction: column; gap: 10px; padding: 20px 22px 22px; flex: 1; border-top: 1px solid var(--rule); }
.card-body h2, .card-body h3 { font-size: 1.15rem; font-weight: 600; letter-spacing: -.015em; line-height: 1.3; }
.card-body > p { font-size: .9rem; color: var(--ink-faint); }
.card-foot { margin-top: auto; padding-top: 10px; display: flex; align-items: center; gap: 10px; }
.avatar { display: none; }
.who { display: flex; flex-direction: column; font-size: .84rem; font-weight: 500; line-height: 1.3; }
.who small { font-weight: 400; color: var(--ink-faint); font-size: .78rem; }
@media (min-width: 961px) { #gallery > .card.feature { grid-column: span 2; } #gallery > .card.feature .cover { aspect-ratio: 32 / 9; } }

/* Covers: muted field with a small product mock */
.cover { position: relative; overflow: hidden; aspect-ratio: 16 / 9; max-width: 100%; background: var(--muted); }
.cover .s, .cover .ln { display: none; }
.cover .screen { position: absolute; left: 16%; right: 16%; top: 16%; bottom: -1px; background: var(--surface); border: 1px solid var(--rule); border-bottom: 0; border-radius: var(--r-lg) var(--r-lg) 0 0; box-shadow: var(--shadow-lg);
  padding: 12px; display: grid; grid-template-columns: 22% 1fr; gap: 10px; }
.cover .screen .side { border-radius: var(--r-sm); background: var(--muted); }
.cover .screen .main { display: grid; grid-template-rows: auto 1fr; gap: 8px; }
.cover .screen .row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.cover .screen .row i { height: 26px; display: block; border-radius: var(--r-sm); border: 1px solid var(--rule); }
.cover .screen .chart { position: relative; border-radius: var(--r-sm); border: 1px solid var(--rule); overflow: hidden; }
.cover .screen .chart::after { content: ""; position: absolute; left: 8%; right: 8%; bottom: 12%; height: 55%;
  background: repeating-linear-gradient(90deg, var(--accent) 0 9%, transparent 9% 14%); opacity: .85;
  clip-path: polygon(0 60%, 14% 30%, 28% 50%, 42% 10%, 56% 40%, 70% 0, 84% 35%, 100% 20%, 100% 100%, 0 100%); }
.cover.phone .screen { left: 36%; right: 36%; top: 12%; grid-template-columns: 1fr; border-radius: 16px 16px 0 0; }
.cover.phone .screen .side { height: 28%; }
.cover-note { position: absolute; left: 12px; bottom: 12px; z-index: 2; font-size: .72rem; font-weight: 500; padding: 4px 8px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--rule); color: var(--ink-faint); box-shadow: var(--shadow-xs); }

/* Pillars: Item - Nova (outline) */
.pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.pillar { padding: 22px; border: 1px solid var(--rule); border-radius: var(--r-xl); background: var(--surface); display: flex; flex-direction: column; gap: 10px; }
.pillar .glyph { width: 40px; height: 40px; position: relative; border-radius: var(--r-lg); background: var(--accent-soft); }
.pillar .glyph i { position: absolute; display: block; }
.g-research i:nth-child(1) { width: 14px; height: 14px; border: 1.5px solid var(--accent); border-radius: 50%; left: 10px; top: 10px; }
.g-research i:nth-child(2) { width: 7px; height: 1.5px; background: var(--accent); left: 23px; top: 26px; transform: rotate(45deg); }
.g-systems i:nth-child(1) { width: 12px; height: 12px; border: 1.5px solid var(--accent); border-radius: 3px; left: 8px; top: 8px; }
.g-systems i:nth-child(2) { width: 12px; height: 12px; border: 1.5px solid var(--accent); border-radius: 3px; right: 8px; bottom: 8px; }
.g-lead i:nth-child(1) { width: 18px; height: 9px; border: 1.5px solid var(--accent); border-bottom: 0; border-radius: 9px 9px 0 0; left: 10px; bottom: 9px; }
.g-lead i:nth-child(2) { width: 8px; height: 8px; border: 1.5px solid var(--accent); border-radius: 50%; left: 15px; top: 8px; }
.pillar h3 { font-size: 1.05rem; font-weight: 600; letter-spacing: -.01em; line-height: 1.35; }
.pillar p { font-size: .9rem; color: var(--ink-faint); }
@media (max-width: 860px) { .pillars { grid-template-columns: 1fr; } }

/* Split and portrait */
.split { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 72px); align-items: center; }
.split > * { min-width: 0; }
.split h2 { font-size: var(--step-3); margin: 14px 0 16px; }
.split p + p { margin-top: 12px; }
.split .hero-actions { margin-top: 22px; }
.portrait { position: relative; aspect-ratio: 4 / 5; max-width: 360px; width: 100%; border: 1px solid var(--rule); border-radius: var(--r-xl); overflow: hidden; background: var(--muted); }
.portrait .half, .portrait .sun { display: none; }
.portrait .photo { position: absolute; inset: 0; display: grid; place-items: center; font-size: .84rem; font-weight: 500; color: var(--ink-faint); background-size: cover; background-position: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* To-add placeholders: Alert - Nova */
.todo { border: 1px dashed var(--rule-strong); border-radius: var(--r-lg); padding: 14px 16px; color: var(--ink-soft); background: var(--muted); font-size: .9rem; }
.todo::before { content: "To add"; display: block; font-size: .84rem; font-weight: 600; color: var(--ink); margin-bottom: 2px; }

/* Page heads */
.page-head { padding-block: clamp(56px, 8vw, 96px) clamp(32px, 4vw, 48px); }
.page-head .wrap { display: flex; flex-direction: column; align-items: flex-start; }
.page-head h1 { font-size: var(--step-4); font-weight: 600; letter-spacing: -.035em; margin-top: 16px; max-width: 18ch; }
.page-head .lede { margin-top: 16px; }
.page-head .filter { margin-top: 28px; }
.page-head + .section { padding-top: 0; border-top: 0; }

/* Case study / project pages */
.cs-hero { padding-block: clamp(40px, 6vw, 72px) 0; }
.cs-hero .back { display: inline-flex; align-items: center; height: 32px; padding: 0 10px; margin-left: -10px; border-radius: var(--r-md); font-size: .875rem; font-weight: 500; text-decoration: none; color: var(--ink-faint); }
.cs-hero .back:hover { background: var(--muted); color: var(--ink); }
.cs-hero h1 { font-size: var(--step-4); font-weight: 600; letter-spacing: -.035em; margin-top: 16px; max-width: 20ch; }
.cs-hero .lede { margin-top: 16px; }
.cs-hero .chips, .cs-hero .status-row { margin-top: 18px; }
.cs-hero .cover { margin-top: 36px; aspect-ratio: 21 / 9; border: 1px solid var(--rule); border-radius: var(--r-xl); }
@media (max-width: 640px) { .cs-hero .cover { aspect-ratio: 4 / 3; } }
.facts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 32px 0 0; border: 1px solid var(--rule); border-radius: var(--r-xl); background: var(--surface); overflow: hidden; }
.facts-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.facts div { padding: 16px 18px; min-width: 0; }
.facts div + div { border-left: 1px solid var(--rule); }
.facts dt { font-size: .78rem; font-weight: 500; color: var(--ink-faint); }
.facts dd { margin: 4px 0 0; font-size: .92rem; font-weight: 500; line-height: 1.4; }
@media (max-width: 860px) { .facts, .facts-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .facts div + div { border-left: 0; } .facts div { border-top: 1px solid var(--rule); } .facts div:nth-child(-n+2) { border-top: 0; } .facts div:nth-child(2n) { border-left: 1px solid var(--rule); } }
.cs-body { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 56px; padding-block: 56px 24px; }
.toc { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 84px); align-self: start; display: flex; flex-direction: column; gap: 2px; }
.toc a { font-size: .875rem; text-decoration: none; color: var(--ink-faint); padding: 6px 10px; border-radius: var(--r-md); }
.toc a:hover { color: var(--ink); background: var(--muted); }
@media (max-width: 860px) { .cs-body { grid-template-columns: 1fr; gap: 0; } .toc { display: none; } }
.narrow-body { max-width: 860px; padding-block: 48px 8px; }
.cs-section { padding-bottom: 52px; scroll-margin-top: 84px; }
.cs-section h2 { font-size: var(--step-3); margin-bottom: 16px; }
.cs-section > p { max-width: 66ch; color: var(--ink-soft); }
.cs-section > p + p { margin-top: 12px; }
.bullets { margin: 12px 0 0; padding-left: 1.1em; display: grid; gap: 8px; max-width: 66ch; color: var(--ink-soft); }
.bullets li::marker { color: var(--accent); }
.cs-section .todo { margin-top: 20px; max-width: 66ch; }
.steps { list-style: none; padding: 0; margin: 8px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; counter-reset: step; }
.steps li { padding: 20px; border: 1px solid var(--rule); border-radius: var(--r-xl); background: var(--surface); counter-increment: step; min-width: 0; }
.steps li::before { content: counter(step); display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: var(--r-md); background: var(--accent-soft); color: var(--accent); font-size: .8rem; font-weight: 600; margin-bottom: 12px; }
.steps h3 { font-size: 1rem; font-weight: 600; letter-spacing: -.01em; margin-bottom: 6px; }
.steps p { color: var(--ink-faint); font-size: .9rem; }
@media (max-width: 640px) { .steps { grid-template-columns: 1fr; } }
.shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 8px; }
.shot { aspect-ratio: 4 / 3; max-width: 100%; border: 1px dashed var(--rule-strong); border-radius: var(--r-xl); display: grid; place-items: center; text-align: center; padding: 20px; color: var(--ink-faint); font-size: .875rem; background: var(--muted); }
.shot.wide { grid-column: 1 / -1; aspect-ratio: 16 / 7; }
.shot b { display: block; font-size: .875rem; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.shot small { font-family: var(--font-mono); font-size: .72rem; color: var(--ink-faint); }
.shot-img { margin: 0; grid-column: 1 / -1; border: 1px solid var(--rule); border-radius: var(--r-xl); overflow: hidden; background: var(--surface); }
.shot-img img { width: 100%; height: auto; }
.shot-img figcaption { padding: 10px 14px; font-size: .84rem; color: var(--ink-faint); border-top: 1px solid var(--rule); }
@media (max-width: 640px) { .shots { grid-template-columns: 1fr; } .shot.wide { aspect-ratio: 4 / 3; } }
.outcomes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 8px; }
.outcomes div { padding: 20px; border: 1px solid var(--rule); border-radius: var(--r-xl); background: var(--surface); box-shadow: var(--shadow-xs); min-width: 0; font-size: .9rem; color: var(--ink-faint); }
.outcomes b { display: block; font-weight: 600; font-size: var(--step-3); letter-spacing: -.03em; color: var(--ink); line-height: 1.1; margin-bottom: 8px; }
.outcomes div.pending b { color: var(--ink-faint); }
@media (max-width: 860px) { .outcomes { grid-template-columns: 1fr; } }
.next-study { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: center; text-decoration: none; border: 1px solid var(--rule); border-radius: var(--r-xl); padding: clamp(20px, 3vw, 28px); background: var(--surface); box-shadow: var(--shadow-xs); transition: box-shadow .15s, border-color .15s; }
.next-study:hover { border-color: var(--rule-strong); box-shadow: var(--shadow-lg); }
.next-study .eyebrow { margin-bottom: 4px; }
.next-study h2 { font-size: var(--step-3); margin-top: 10px; }
.next-study .cover { border: 1px solid var(--rule); border-radius: var(--r-lg); }
@media (max-width: 640px) { .next-study { grid-template-columns: 1fr; } }

/* About */
.beliefs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.beliefs div { padding: 22px; border: 1px solid var(--rule); border-radius: var(--r-xl); background: var(--surface); min-width: 0; }
.beliefs h3 { font-size: 1.1rem; font-weight: 600; letter-spacing: -.015em; margin-bottom: 8px; }
.beliefs p { color: var(--ink-faint); font-size: .9rem; }
@media (max-width: 860px) { .beliefs { grid-template-columns: 1fr; } }
.timeline { list-style: none; margin: 0; padding: 0; border: 1px solid var(--rule); border-radius: var(--r-xl); background: var(--surface); overflow: hidden; }
.timeline li { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 4px 24px; padding: 18px 22px; }
.timeline li + li { border-top: 1px solid var(--rule); }
.timeline .when { font-family: var(--font-mono); font-size: .78rem; color: var(--ink-faint); padding-top: 3px; font-variant-numeric: tabular-nums; }
.timeline h3 { font-size: 1.05rem; font-weight: 600; letter-spacing: -.01em; }
.timeline p { color: var(--ink-faint); font-size: .9rem; margin-top: 2px; }
@media (max-width: 640px) { .timeline li { grid-template-columns: 1fr; } }

/* Resume */
.resume { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 56px; padding-block: 8px 80px; }
.resume aside { display: flex; flex-direction: column; gap: 26px; align-self: start; position: sticky; top: calc(env(safe-area-inset-top, 0px) + 84px); }
.resume aside h2, .resume-main h2 { font-size: .84rem; font-weight: 600; letter-spacing: 0; color: var(--ink); margin-bottom: 12px; }
.resume aside ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.resume aside li { font-size: .75rem; font-weight: 500; padding: 5px 8px; border-radius: var(--r-sm); background: var(--muted); color: var(--ink-soft); }
.resume aside p { font-size: .9rem; line-height: 1.7; color: var(--ink-soft); }
.resume aside .downloads { display: grid; gap: 8px; }
.resume aside .downloads .btn { justify-content: center; }
.resume-main { display: flex; flex-direction: column; gap: 40px; min-width: 0; }
.job { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 6px 28px; padding: 22px 0; border-top: 1px solid var(--rule); }
.job .when { font-family: var(--font-mono); font-size: .78rem; color: var(--ink-faint); padding-top: 3px; font-variant-numeric: tabular-nums; }
.job h3 { font-size: 1.1rem; font-weight: 600; letter-spacing: -.015em; }
.job .org { color: var(--ink-faint); margin-top: 2px; font-size: .9rem; }
.job ul { margin: 10px 0 0; padding-left: 1.1em; display: grid; gap: 6px; font-size: .9rem; color: var(--ink-soft); }
@media (max-width: 860px) { .resume { grid-template-columns: 1fr; gap: 40px; } .resume aside { position: static; } .job { grid-template-columns: 1fr; } }

/* Contact */
.contact { border-top: 1px solid var(--rule); background: var(--bg); }
.contact .wave { display: none; }
.contact-inner { margin-block: clamp(48px, 7vw, 80px); padding: clamp(32px, 5vw, 56px) clamp(20px, 4vw, 48px); border: 1px solid var(--rule); border-radius: var(--r-xl); background: var(--muted); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 24px; }
.contact h2 { font-size: var(--step-3); max-width: 20ch; margin-inline: auto; }
.contact-inner p { color: var(--ink-faint); max-width: 48ch; margin: 12px auto 0; }
.email-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; align-items: center; }
.email { font-family: var(--font-mono); font-size: .84rem; text-decoration: none; height: 40px; display: inline-flex; align-items: center; padding: 0 14px; border: 1px solid var(--rule); border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow-xs); user-select: all; word-break: break-all; }
.foot { border-top: 1px solid var(--rule); padding-block: 20px; display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; font-size: .84rem; color: var(--ink-faint); }
.foot nav { display: flex; gap: 18px; flex-wrap: wrap; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--ink); }

/* Password gate: Dialog - Nova */
.gate { position: fixed; inset: 0; z-index: 80; overflow-y: auto; display: grid; place-items: center;
  padding: max(24px, env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-right, 0px)) max(24px, env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-left, 0px));
  background: color-mix(in srgb, var(--muted) 92%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
body.locked { overflow: hidden; }
.gate-card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.gate-card h1 { font-size: 1.125rem; font-weight: 600; letter-spacing: -.01em; }
.gate-card p { font-size: .9rem; color: var(--ink-faint); }
.gate-icon { position: relative; width: 40px; height: 40px; border-radius: var(--r-lg); background: var(--accent-soft); display: block; }
.gate-icon i { position: absolute; display: block; }
.gate-icon i:nth-child(1) { width: 12px; height: 9px; left: 14px; top: 9px; border: 1.5px solid var(--accent); border-bottom: 0; border-radius: 6px 6px 0 0; }
.gate-icon i:nth-child(2) { width: 18px; height: 12px; left: 11px; top: 18px; border-radius: 3px; background: var(--accent); }
.gate-form { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.gate-form label { font-size: .875rem; font-weight: 500; color: var(--ink); }
.gate-row { display: flex; gap: 8px; flex-wrap: wrap; }
.gate-row input { flex: 1 1 180px; min-width: 0; height: 40px; font: 400 .95rem var(--font-body); padding: 0 12px; border-radius: var(--r-md); border: 1px solid var(--rule); background: var(--bg); color: var(--ink); box-shadow: var(--shadow-xs); }
.gate-row input:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.gate-error { color: var(--warn); font-size: .84rem; min-height: 1.4em; }
.gate-card .back { font-size: .84rem; color: var(--ink-faint); text-decoration: none; }
.unlock-page { padding-block: clamp(48px, 8vw, 96px); }
.unlock-page .wrap { display: grid; place-items: center; }

/* monday.com status colors on the lead badge of each card */
.status.st-blue:first-child   { background: color-mix(in srgb, var(--m-blue) 18%, var(--surface));   color: color-mix(in srgb, var(--m-blue) 60%, var(--ink)); }
.status.st-green:first-child  { background: color-mix(in srgb, var(--m-green) 18%, var(--surface));  color: color-mix(in srgb, var(--m-green) 55%, var(--ink)); }
.status.st-orange:first-child { background: color-mix(in srgb, var(--m-orange) 22%, var(--surface)); color: color-mix(in srgb, var(--m-orange) 50%, var(--ink)); }
.status.st-red:first-child    { background: color-mix(in srgb, var(--m-red) 15%, var(--surface));    color: color-mix(in srgb, var(--m-red) 70%, var(--ink)); }
.status.st-purple:first-child { background: color-mix(in srgb, var(--m-purple) 16%, var(--surface)); color: color-mix(in srgb, var(--m-purple) 70%, var(--ink)); }
/* Chart in the hero mock uses monday's status colors */
.bars i:nth-child(3n) { background: var(--m-green); }
.bars i:nth-child(4n) { background: var(--m-purple); }
.mock-legend span:nth-child(2)::before { background: var(--m-green); }
.mock-legend span:nth-child(3)::before { background: var(--m-purple); }
.pill-stat .dot.sky { color: color-mix(in srgb, var(--accent) 60%, var(--ink)); background: var(--accent-soft); }

/* ---- Asana theme: hipper details, tighter rhythm (2026-11-12) ---- */
.btn { border-radius: 999px; height: 42px; padding: 0 20px; }
.btn-small { height: 36px; padding: 0 16px; }
.btn-primary, .copy-btn { background: var(--btn); color: var(--on-btn); }
.btn-primary:hover, .copy-btn:hover { background: color-mix(in srgb, var(--btn) 85%, var(--accent)); }
.btn-ghost { border-radius: 999px; }
.btn-primary::after { content: "\2192"; font-size: 1rem; line-height: 1; transition: transform .15s; }
.btn-primary:hover::after { transform: translateX(3px); }
.header-actions .btn-primary::after { content: none; }
.icon-btn { border-radius: 999px; }
.nav a { border-radius: 999px; }
.eyebrow { border-radius: 999px; padding: 6px 12px; }
.eyebrow::before { background: var(--grad); width: 8px; height: 8px; }
.chip, .tag, .status { border-radius: 999px; padding: 6px 10px; }
.filter { border-radius: 999px; padding: 4px; }
.filter button { border-radius: 999px; padding: 0 14px; }
.card, .stat, .pillar, .facts, .beliefs div, .steps li, .outcomes div, .timeline, .next-study, .stage, .portrait, .shot, .shot-img, .gate-card { border-radius: 20px; }
.hero h1, .page-head h1, .cs-hero h1 { font-weight: 600; letter-spacing: -.045em; }
.hero h1 { font-size: clamp(2.6rem, 1.9rem + 3vw, 4rem); }
.section-head h2 span { background: linear-gradient(110deg, #d93b4b, #e8664f 60%, #e07a3c); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stage { background: radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, #f8c9a0 55%, transparent), transparent 60%),
                     radial-gradient(90% 80% at 0% 100%, color-mix(in srgb, #f06a6a 30%, transparent), transparent 60%), var(--muted); border: 0; background-clip: padding-box; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 6%, transparent); }
.cover { background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 14%, var(--muted)), var(--muted) 60%, color-mix(in srgb, #f8c9a0 35%, var(--muted))); }
.stat b { background: none; }
.stat:hover, .pillar:hover { border-color: var(--rule-strong); }
.pillar .glyph, .steps li::before, .gate-icon { background: var(--accent-soft); }
.g-research i:nth-child(1), .g-systems i, .g-lead i { border-color: var(--accent-ink) !important; }
.g-research i:nth-child(2) { background: var(--accent-ink); }
.steps li::before { color: var(--accent-ink); }
.bars i { background: var(--m-blue); }
.bars i:nth-child(3n) { background: var(--m-green); }
.bars i:nth-child(4n) { background: var(--accent); }
.mock-legend span::before { background: var(--m-blue); }
.mock-legend span:nth-child(2)::before { background: var(--m-green); }
.mock-legend span:nth-child(3)::before { background: var(--accent); }
.cover .screen .chart::after { background: repeating-linear-gradient(90deg, var(--accent) 0 9%, transparent 9% 14%); }
.pill-stat .dot.sky { color: var(--accent-ink); background: var(--accent-soft); }
.brand-mark { border-radius: 999px; background: var(--ink); }
.brand-mark i:nth-child(3) { background: var(--accent); }
.contact-inner { border: 0; background: var(--ink); color: var(--bg); position: relative; overflow: hidden; border-radius: 24px; }
.contact-inner::before { content: ""; position: absolute; inset: auto -10% -60% -10%; height: 90%; background: var(--grad); opacity: .35; filter: blur(60px); pointer-events: none; }
.contact-inner > * { position: relative; }
.contact-inner p { color: color-mix(in srgb, var(--bg) 75%, var(--ink)); }
.contact-inner .copy-btn { background: var(--accent); color: #1e1f21; }
.contact-inner .email, .contact-inner .btn-ghost { background: transparent; color: var(--bg); border-color: color-mix(in srgb, var(--bg) 30%, transparent); box-shadow: none; }

/* Tighter spacing between sections */
.section { padding-block: clamp(36px, 5vw, 60px); }
.hero { padding-block: clamp(40px, 6vw, 72px) clamp(24px, 4vw, 40px); }
.stats-band { padding-bottom: 8px; }
.section-head { margin-bottom: clamp(20px, 3vw, 28px); }
.page-head { padding-block: clamp(40px, 6vw, 64px) clamp(24px, 3vw, 32px); }
.contact-inner { margin-block: clamp(32px, 5vw, 56px); }
.cs-section { padding-bottom: 40px; }

/* ---- Motion: subtle, and off when the visitor prefers reduced motion ---- */
@media (prefers-reduced-motion: no-preference) {
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
  @keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
  @keyframes floaty { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }
  .hero-copy > * { animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
  .hero-copy > :nth-child(2) { animation-delay: .06s; } .hero-copy > :nth-child(3) { animation-delay: .12s; }
  .hero-copy > :nth-child(4) { animation-delay: .18s; } .hero-copy > :nth-child(5) { animation-delay: .24s; }
  .stage { animation: rise .8s .15s cubic-bezier(.2,.7,.2,1) both; }
  .bars i { transform-origin: bottom; animation: grow .7s cubic-bezier(.2,.7,.2,1) both; }
  .bars i:nth-child(1) { animation-delay: .45s; } .bars i:nth-child(2) { animation-delay: .5s; } .bars i:nth-child(3) { animation-delay: .55s; }
  .bars i:nth-child(4) { animation-delay: .6s; } .bars i:nth-child(5) { animation-delay: .65s; } .bars i:nth-child(6) { animation-delay: .7s; }
  .bars i:nth-child(7) { animation-delay: .75s; } .bars i:nth-child(8) { animation-delay: .8s; } .bars i:nth-child(9) { animation-delay: .85s; }
  .float-card.tilt-r { animation: floaty 6s ease-in-out infinite; }
  .float-card.tilt-l { animation: floaty 7s 1s ease-in-out infinite; }
  /* Scroll reveal (only when site.js marks the page, so content never hides without JS) */
  .anim .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s cubic-bezier(.2,.7,.2,1), transform .6s cubic-bezier(.2,.7,.2,1); transition-delay: var(--d, 0s); }
  .anim .reveal.in { opacity: 1; transform: none; }
  .anim .card.reveal, .anim .next-study.reveal { transition: opacity .6s cubic-bezier(.2,.7,.2,1), transform .3s cubic-bezier(.2,.7,.2,1), border-color .2s, box-shadow .25s; }
  .anim .card.reveal.in:hover { transform: translateY(-3px); }
  .card, .next-study { transition: border-color .2s, box-shadow .25s, transform .25s cubic-bezier(.2,.7,.2,1), opacity .6s cubic-bezier(.2,.7,.2,1); }
  .card .cover .screen { transition: transform .4s cubic-bezier(.2,.7,.2,1); }
  .card:hover .cover .screen { transform: translateY(-6px); }
  .btn, .nav a, .filter button { transition: background .2s, color .2s, transform .15s; }
  .btn:active { transform: scale(.97); }
}

/* About intro: portrait left, text right, tops aligned */
.page-head .wrap.about-intro { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); align-items: start; gap: clamp(28px, 5vw, 64px); }
.about-intro .portrait { max-width: 340px; }
.about-intro h1 { margin-top: 16px; }
@media (max-width: 760px) { .page-head .wrap.about-intro { grid-template-columns: 1fr; } .about-intro .portrait { max-width: 280px; } }
.about-story { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--rule); display: grid; gap: 14px; color: var(--ink-soft); max-width: 62ch; }
.page-head.about-head { padding-top: clamp(20px, 3vw, 32px); }
/* Project pages: body text column lines up with the page header's left edge */
.wrap.narrow-body { max-width: var(--frame); }
.wrap.narrow-body > * { max-width: 860px; }
/* Logo: white circle with a bold J in the page background color */
.brand-mark { width: 30px; height: 30px; border-radius: 50%; background: #ffffff; color: var(--bg); display: inline-grid; place-items: center;
  font: 800 1rem/1 var(--font-display); letter-spacing: 0; box-shadow: 0 0 0 1px var(--rule-strong), var(--shadow-xs); }
/* In light mode a white circle vanishes on the near-white page, so the circle flips to ink; the J still matches the background */
:root:not([data-theme="dark"]) .brand-mark { background: var(--ink); box-shadow: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand-mark { background: #ffffff; box-shadow: 0 0 0 1px var(--rule-strong); } }
:root[data-theme="dark"] .brand-mark { background: #ffffff; box-shadow: 0 0 0 1px var(--rule-strong); }
.brand-mark { width: 24px; height: 24px; font-size: .95rem; font-weight: 700; }
/* Real images from Markdown case studies */
.cover.cover-img { background: var(--muted); }
.cover.cover-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cs-insight > p { max-width: 66ch; padding: 16px 20px; border-left: 3px solid var(--accent); background: var(--surface); border-radius: 0 var(--r-lg) var(--r-lg) 0; color: var(--ink-soft); }
.cs-insight > p + p { margin-top: 10px; }
.cs-insight { margin-top: 20px; }
#reflection > p { max-width: 66ch; color: var(--ink-soft); }
#reflection > p + p { margin-top: 12px; }
