/* ============================================================
   Negin Bokaei — Portfolio
   Warm dark mode · 3 directions via html[data-dir] · accent via html[data-accent]
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,300..800&family=Instrument+Sans:wght@400;500;600&family=Newsreader:opsz,wght@6..72,400;6..72,500;6..72,600&family=Space+Grotesk:wght@400;500;600;700&family=Work+Sans:wght@400;500;600&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  /* Direction: Hearth (warm editorial) — default */
  --bg: oklch(0.165 0.012 75);
  --bg-2: oklch(0.195 0.014 75);
  --surface: oklch(0.225 0.016 75);
  --line: oklch(0.30 0.016 75);
  --line-soft: oklch(0.255 0.014 75);
  --text: oklch(0.93 0.014 85);
  --text-2: oklch(0.74 0.018 80);
  --text-3: oklch(0.58 0.018 80);
  --font-display: 'Bricolage Grotesque', sans-serif;
  --font-body: 'Instrument Sans', sans-serif;
  --display-weight: 600;
  --display-tracking: -0.015em;
  --radius: 14px;

  /* Accent: amber — default */
  --accent: oklch(0.79 0.125 80);
  --accent-soft: oklch(0.79 0.125 80 / 0.14);
  --accent-line: oklch(0.79 0.125 80 / 0.35);
  --accent-ink: oklch(0.22 0.04 80);
  --accent-2: oklch(0.75 0.085 200);
  --accent-2-line: oklch(0.75 0.085 200 / 0.4);
}

html[data-dir="slate"] {
  --bg: oklch(0.175 0.010 255);
  --bg-2: oklch(0.205 0.012 255);
  --surface: oklch(0.235 0.013 255);
  --line: oklch(0.31 0.013 255);
  --line-soft: oklch(0.26 0.011 255);
  --text: oklch(0.93 0.008 250);
  --text-2: oklch(0.74 0.012 250);
  --text-3: oklch(0.58 0.012 250);
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Work Sans', sans-serif;
  --display-weight: 500;
  --display-tracking: -0.02em;
  --radius: 8px;
}

html[data-dir="mono"] {
  --bg: oklch(0.145 0.004 80);
  --bg-2: oklch(0.175 0.005 80);
  --surface: oklch(0.205 0.006 80);
  --line: oklch(0.285 0.006 80);
  --line-soft: oklch(0.235 0.005 80);
  --text: oklch(0.94 0.005 85);
  --text-2: oklch(0.73 0.007 85);
  --text-3: oklch(0.56 0.007 85);
  --font-display: 'Manrope', sans-serif;
  --font-body: 'Manrope', sans-serif;
  --display-weight: 700;
  --display-tracking: -0.025em;
  --radius: 10px;
}

html[data-accent="coral"] {
  --accent: oklch(0.74 0.105 30);
  --accent-soft: oklch(0.74 0.105 30 / 0.14);
  --accent-line: oklch(0.74 0.105 30 / 0.35);
  --accent-ink: oklch(0.22 0.04 30);
  --accent-2: oklch(0.75 0.085 160);
  --accent-2-line: oklch(0.75 0.085 160 / 0.4);
}

html[data-accent="sage"] {
  --accent: oklch(0.79 0.105 160);
  --accent-soft: oklch(0.79 0.105 160 / 0.14);
  --accent-line: oklch(0.79 0.105 160 / 0.35);
  --accent-ink: oklch(0.22 0.04 160);
  --accent-2: oklch(0.78 0.10 80);
  --accent-2-line: oklch(0.78 0.10 80 / 0.4);
}

/* ---------- base ---------- */

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
  line-height: 1.12;
  text-wrap: balance;
}

p { text-wrap: pretty; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 100;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 8px 8px;
  padding: 10px 18px;
  transition: top 0.15s;
}

.skip-link:focus { top: 0; }

::selection { background: var(--accent-soft); }

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- nav ---------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}

.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 64px;
}

.nav-name {
  font-family: 'Newsreader', Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: 17px;
  text-decoration: none;
  white-space: nowrap;
  flex: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  font-size: 14.5px;
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.15s;
}

.nav-links a:hover { color: var(--text); }

.nav-links a.nav-cta {
  color: var(--accent);
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  padding: 7px 16px;
  transition: background 0.15s, color 0.15s;
}

.nav-links a.nav-cta:hover {
  background: var(--accent);
  color: var(--accent-ink);
}

/* ---------- hero ---------- */

.hero { padding-top: 110px; padding-bottom: 90px; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  gap: 56px;
  align-items: center;
}
.hero .hero-portrait {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line-soft);
  background: var(--bg-2);
}
.hero .hero-portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero .hero-lead { min-width: 0; }
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; gap: 32px; padding-top: 84px; }
  .hero .hero-portrait { max-width: 320px; }
}

.eyebrow {
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 26px;
}

.hero h1 {
  font-size: clamp(40px, 5.6vw, 64px);
  max-width: 17ch;
}

.hero .hero-sub {
  margin-top: 28px;
  max-width: 58ch;
  font-size: 19px;
  color: var(--text-2);
}

.hero .hero-now {
  margin-top: 22px;
  display: flex;
  align-items: baseline;
  gap: 12px;
  max-width: 62ch;
  font-size: 15.5px;
  color: var(--text-3);
}

.hero .hero-now .now-dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateY(-1px);
}

.hero-actions {
  margin-top: 40px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-body);
  font-size: 15.5px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 999px;
  padding: 13px 26px;
  transition: transform 0.15s, background 0.15s, color 0.15s, border-color 0.15s;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-primary:hover { transform: translateY(-1px); }

.btn-ghost {
  border: 1px solid var(--line);
  color: var(--text-2);
}

.btn-ghost:hover { border-color: var(--text-3); color: var(--text); }

/* ---------- sections ---------- */

.section { padding: 84px 0; border-top: 1px solid var(--line-soft); }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin-bottom: 48px;
}

.section-head h2 {
  font-size: clamp(26px, 3vw, 34px);
}

.section-head .count {
  font-size: 14px;
  color: var(--text-3);
}

/* ---------- work cards ---------- */

.work-list {
  display: grid;
  gap: 28px;
}

.work-card {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 0;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--bg-2);
  text-decoration: none;
  overflow: hidden;
  transition: border-color 0.18s, transform 0.18s;
}

.work-card:hover {
  border-color: var(--accent-line);
  transform: translateY(-2px);
}

.work-card .work-media {
  background: var(--surface);
  min-height: 280px;
  display: grid;
}

.work-card .work-media image-slot {
  width: 100%;
  height: 100%;
  min-height: 280px;
}

.work-card .work-body {
  padding: 36px 38px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-content: center;
}

.work-num {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.work-card h3 {
  font-size: 25px;
}

.work-client {
  font-size: 14px;
  color: var(--text-3);
}

.work-summary {
  font-size: 16px;
  color: var(--text-2);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.tag {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
}

.tag.tag-accent {
  color: var(--accent);
  border-color: var(--accent-line);
  background: var(--accent-soft);
}

.work-go {
  margin-top: 8px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ---------- how I work ---------- */

.method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.method {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--bg-2);
  padding: 26px 28px;
}

.method h3 {
  font-size: 17.5px;
  margin-bottom: 8px;
  color: var(--accent-2);
}

.method p {
  font-size: 15px;
  color: var(--text-2);
}

/* ---------- playground / experiment ---------- */

.experiment-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--bg-2);
  padding: 26px 30px;
  text-decoration: none;
  transition: border-color 0.18s;
}

.experiment-row:hover { border-color: var(--accent-line); }

.experiment-row h3 {
  font-size: 18px;
  margin-bottom: 4px;
}

.experiment-row .exp-desc {
  font-size: 14.5px;
  color: var(--text-2);
}

.experiment-row .work-go { margin-top: 0; white-space: nowrap; }

/* ---------- case study lists ---------- */

.cs-list {
  list-style: none;
  counter-reset: csli;
  display: grid;
  gap: 14px;
  margin-top: 8px;
}

.cs-list li {
  counter-increment: csli;
  position: relative;
  padding-left: 48px;
}

.cs-list li::before {
  content: counter(csli, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 3px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--accent-2);
}

.cs-list li strong { color: var(--text); }

/* ---------- about ---------- */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: 56px;
  align-items: start;
}

.about-grid .lede {
  font-size: 20px;
  line-height: 1.6;
}

.about-grid p + p { margin-top: 18px; }

.about-grid .about-body { color: var(--text-2); }

.about-side {
  display: grid;
  gap: 24px;
}

.fact {
  border-top: 1px solid var(--line-soft);
  padding-top: 16px;
}

.fact .fact-label {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 6px;
}

.fact .fact-value {
  font-size: 15.5px;
  color: var(--text-2);
}

/* ---------- skills ---------- */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}

.skill-group {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 24px 26px;
  background: var(--bg-2);
}

.skill-group h3 {
  font-size: 15px;
  color: var(--accent);
  margin-bottom: 12px;
}

.skill-group ul {
  list-style: none;
  display: grid;
  gap: 7px;
}

.skill-group li {
  font-size: 14.5px;
  color: var(--text-2);
}

/* ---------- experience / education ---------- */

.cv-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}

.cv-col h3 {
  font-size: 15px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 20px;
  font-family: var(--font-body);
  font-weight: 600;
}

.cv-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--line-soft);
}

.cv-item .cv-role {
  font-weight: 600;
  font-size: 16px;
}

.cv-item .cv-org {
  font-size: 14.5px;
  color: var(--text-2);
  margin-top: 2px;
}

.cv-item .cv-period {
  font-size: 13.5px;
  color: var(--text-3);
  white-space: nowrap;
  padding-top: 3px;
}

.lang-row {
  margin-top: 28px;
  font-size: 14.5px;
  color: var(--text-2);
}

.lang-row strong { color: var(--text); font-weight: 600; }

/* ---------- contact ---------- */

.contact {
  padding-top: 110px;
  padding-bottom: 90px;
  text-align: center;
  border-top: 1px solid var(--line-soft);
}

.contact h2 {
  font-size: clamp(34px, 4.4vw, 52px);
  max-width: 24ch;
  margin: 0 auto;
}

.contact p {
  margin: 22px auto 0;
  max-width: 52ch;
  color: var(--text-2);
  font-size: 17.5px;
}

.contact .hero-actions { justify-content: center; }

.site-footer {
  border-top: 1px solid var(--line-soft);
  padding: 28px 0;
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: var(--text-3);
}

.site-footer a { color: var(--text-2); text-decoration: none; }
.site-footer a:hover { color: var(--text); }

/* ---------- case study pages ---------- */

.cs-hero { padding-top: 90px; padding-bottom: 56px; }

.cs-hero .crumb {
  font-size: 14px;
  margin-bottom: 34px;
}

.cs-hero .crumb a {
  color: var(--text-3);
  text-decoration: none;
}

.cs-hero .crumb a:hover { color: var(--text); }

.cs-hero h1 {
  font-size: clamp(34px, 4.6vw, 54px);
  max-width: 20ch;
}

.cs-hero .cs-sub {
  margin-top: 20px;
  font-size: 19px;
  color: var(--text-2);
  max-width: 56ch;
}

/* About hero — lead + at-a-glance card */
.about-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}
.about-hero-lead { min-width: 0; }
.about-hero-grid .about-hero-lead h1 { margin-top: 14px; }
.about-card {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--bg-2);
  overflow: hidden;
  position: sticky;
  top: 92px;
}
.about-card img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}
@media (max-width: 860px) {
  .about-hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .about-card { position: static; }
}

.cs-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1px solid var(--line-soft);
}

.cs-meta .meta-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 5px;
}

.cs-meta .meta-value {
  font-size: 15px;
  color: var(--text-2);
}

.cs-figure { padding-top: 8px; padding-bottom: 24px; }

.cs-figure image-slot {
  width: 100%;
  height: 520px;
}

.cs-figure.cs-figure-inline image-slot { height: 420px; }

.cs-figure figcaption {
  margin-top: 12px;
  font-size: 13.5px;
  color: var(--text-3);
}

.cs-body {
  padding-top: 40px;
  padding-bottom: 80px;
  display: grid;
  gap: 64px;
}

.cs-section {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

.cs-section .cs-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--accent);
  padding-top: 6px;
  position: sticky;
  top: 88px;
}

/* ---- Grantx-style numbered section kicker ---- */
.cs-section .cs-label .sec-num {
  display: block;
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: 30px;
  letter-spacing: var(--display-tracking);
  color: var(--text-3);
  line-height: 1;
  margin-bottom: 12px;
  -webkit-text-stroke: 0;
}
.cs-section .cs-label .sec-kicker { display: block; color: var(--text-3); }
.cs-section .cs-label .sec-name {
  display: block;
  margin-top: 4px;
  color: var(--accent);
}

/* ---- big section headline (Grantx ## look) ---- */
.cs-headline {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.12;
  letter-spacing: var(--display-tracking);
  color: var(--text);
  max-width: 18ch;
  margin-bottom: 22px;
  text-wrap: balance;
}
.cs-headline em { font-style: italic; color: var(--accent); }

/* ---- equation / punch sub-header ---- */
.eq-head {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: 21px;
  line-height: 1.25;
  color: var(--text);
  margin: 34px 0 14px;
  letter-spacing: var(--display-tracking);
}
.eq-head .neq { color: var(--accent); font-style: normal; padding: 0 4px; }
.eq-head em { color: var(--text-3); font-style: italic; }
.eq-head + p { margin-top: 0; }

/* ---- pull-quote card ---- */
.pq {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--bg-2);
  padding: 28px 30px;
  margin: 26px 0;
}
.pq .pq-text {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: 22px;
  line-height: 1.32;
  color: var(--text);
  letter-spacing: var(--display-tracking);
}
.pq .pq-text em { font-style: italic; color: var(--accent); }
.pq .pq-attr {
  margin-top: 16px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
}

/* ---- numbered improvement list ---- */
.improve {
  list-style: none;
  display: grid;
  gap: 2px;
  margin: 8px 0 4px;
  counter-reset: imp;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
}
.improve li {
  counter-increment: imp;
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 16px;
  padding: 20px 24px;
  background: var(--bg-2);
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.5;
}
.improve li:not(:last-child) { border-bottom: 1px solid var(--line-soft); }
.improve li::before {
  content: counter(imp, lower-roman) ".";
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: 17px;
  color: var(--accent);
  line-height: 1.4;
}
.improve li b { color: var(--text); font-weight: 600; display: block; margin-bottom: 3px; }

.cs-section .cs-text {
  font-size: 17.5px;
  color: var(--text-2);
  max-width: 64ch;
}

.cs-section .cs-text p + p { margin-top: 18px; }

.cs-section .cs-text strong { color: var(--text); }

.cs-section .cs-text em { color: var(--text); font-style: italic; }

.cs-stat-row {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  margin-top: 26px;
}

.cs-stat .stat-num {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: 34px;
  color: var(--accent-2);
}

.cs-stat .stat-label {
  font-size: 13.5px;
  color: var(--text-3);
  margin-top: 4px;
  max-width: 22ch;
}

.cs-quote {
  border-left: 2px solid var(--accent-2);
  padding: 4px 0 4px 24px;
  margin-top: 26px;
  font-size: 18px;
  color: var(--text);
  font-style: italic;
}

.cs-shows {
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 30px 34px;
}

.cs-shows .cs-shows-label {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.cs-shows p {
  font-size: 17px;
  color: var(--text);
  max-width: 62ch;
}

.cs-pager {
  border-top: 1px solid var(--line-soft);
  padding: 40px 0 72px;
}

.cs-pager .wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.pager-link {
  text-decoration: none;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 24px 28px;
  display: grid;
  gap: 6px;
  transition: border-color 0.15s;
}

.pager-link:hover { border-color: var(--accent-line); }

.pager-link.pager-next { text-align: right; }

.pager-link .pager-dir {
  font-size: 12.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}

.pager-link .pager-title {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: 18px;
}

/* ---------- visual artifacts ---------- */

.ev-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.ev-card {
  border: 1px solid var(--line-soft);
  background: var(--bg-2);
  border-radius: var(--radius);
  padding: 22px 24px;
  display: grid;
  gap: 8px;
  align-content: start;
}

.ev-card .ev-figure {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: 27px;
  line-height: 1.15;
  color: var(--accent-2);
  letter-spacing: var(--display-tracking);
  overflow-wrap: break-word;
}

.ev-card[data-tone="accent"] .ev-figure { color: var(--accent); }

.ev-card .ev-label {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-2);
}

.flow-v {
  display: grid;
  justify-items: start;
  margin: 18px 0;
}

.flow-node {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 10px;
  padding: 11px 20px;
  font-size: 15px;
  color: var(--text);
}

.flow-node.flow-result {
  border-color: var(--accent-line);
  background: var(--accent-soft);
}

.flow-node .flow-note {
  display: block;
  font-size: 12.5px;
  color: var(--text-3);
  margin-top: 2px;
}

.flow-v .flow-arrow {
  color: var(--accent-2);
  font-size: 17px;
  line-height: 1;
  padding: 7px 0 7px 24px;
}

.flow-h {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 18px 0;
}

.flow-h .flow-arrow {
  color: var(--accent-2);
  font-size: 17px;
}

.loop-map {
  position: relative;
  padding-left: 36px;
  margin: 18px 0;
  display: grid;
  justify-items: start;
}

.loop-map::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 20px;
  bottom: 44px;
  width: 16px;
  border: 1.5px solid var(--accent-2-line);
  border-right: none;
  border-radius: 12px 0 0 12px;
}

.loop-map .loop-badge {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent-2);
  padding: 12px 0 0 0;
  margin-left: -36px;
}

.idv {
  display: grid;
  grid-template-columns: 1fr 22px 1fr 22px 1fr;
  gap: 10px;
  align-items: stretch;
  margin-bottom: 12px;
}

.idv-cell {
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 14px 16px;
  background: var(--bg-2);
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--text-2);
  display: grid;
  gap: 6px;
  align-content: start;
}

.idv-cell .idv-tag {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--accent-2);
}

.idv-cell.idv-outcome { border-color: var(--accent-line); }

.idv-cell.idv-outcome .idv-tag { color: var(--accent); }

.idv-arrow {
  align-self: center;
  justify-self: center;
  color: var(--text-3);
  font-size: 15px;
}

.pr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin: 6px 0;
}

.pr-card {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--bg-2);
  padding: 22px 24px;
  display: grid;
  gap: 8px;
  align-content: start;
}

.pr-card .pr-num {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent-2);
}

.pr-card .pr-title {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: 16.5px;
  color: var(--text);
  line-height: 1.3;
}

.pr-card .pr-desc {
  font-size: 13.5px;
  color: var(--text-3);
  line-height: 1.5;
}

.big-statement {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: clamp(22px, 2.8vw, 32px);
  line-height: 1.3;
  letter-spacing: var(--display-tracking);
  color: var(--text);
  border-left: 3px solid var(--accent);
  padding: 6px 0 6px 26px;
  margin: 6px 0 22px;
  max-width: 30ch;
  text-wrap: balance;
}

.band-stack {
  display: grid;
  justify-items: stretch;
  margin: 18px 0;
}

.band {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--bg-2);
  padding: 20px 24px;
  width: 100%;
  box-sizing: border-box;
}

.band.band-result { border-color: var(--accent-line); background: var(--accent-soft); }

.band .band-label {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 12px;
}

.band.band-result .band-label { color: var(--accent); }

.band-stack .flow-arrow {
  color: var(--accent-2);
  font-size: 17px;
  line-height: 1;
  padding: 7px 0 7px 24px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.chip {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  background: var(--surface);
}

.chip[data-tone="pain"] {
  border-style: dashed;
  color: var(--text-3);
  background: transparent;
}

.chip[data-tone="good"] {
  border-color: var(--accent-line);
  color: var(--accent);
  background: var(--accent-soft);
}

.chip-sep { color: var(--text-3); font-size: 13px; }

.tag-wall {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.tag-big {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: clamp(19px, 2.2vw, 24px);
  letter-spacing: var(--display-tracking);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 16px 30px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.tag-big .tag-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent-2);
  flex: none;
}

.tag-big:nth-child(even) .tag-dot { background: var(--accent); }

@media (max-width: 880px) {
  .idv { grid-template-columns: 1fr; }
  .idv-arrow { transform: rotate(90deg); padding: 2px 0; }
}

/* ---------- responsive ---------- */

@media (max-width: 880px) {
  .work-card { grid-template-columns: 1fr; }
  .work-card .work-media { min-height: 220px; }
  .about-grid, .cv-grid { grid-template-columns: 1fr; gap: 40px; }
  .cs-section { grid-template-columns: 1fr; gap: 14px; }
  .cs-section .cs-label { position: static; }
  .cs-figure image-slot { height: 320px; }
  .cs-figure.cs-figure-inline image-slot { height: 280px; }
  .nav-links { gap: 18px; }
  .nav-links .nav-hide-sm { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ============================================================
   Alarmease case-study components
   ============================================================ */

/* ---- evidence labels ---- */
.ev-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 11px 4px 9px;
  background: var(--surface);
  white-space: nowrap;
}
.ev-tag::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--text-3);
  flex: none;
}
.ev-tag[data-kind="research"] { color: var(--accent-2); border-color: var(--accent-2-line); }
.ev-tag[data-kind="research"]::before { background: var(--accent-2); border-radius: 50%; }
.ev-tag[data-kind="prototype"] { color: var(--text); }
.ev-tag[data-kind="prototype"]::before { background: var(--text-2); border-radius: 0; }
.ev-tag[data-kind="future"] { color: var(--accent); border-color: var(--accent-line); }
.ev-tag[data-kind="future"]::before { background: var(--accent); transform: rotate(45deg); }
.ev-tag[data-kind="ai"]::before { background: transparent; border: 1.5px solid var(--text-3); border-radius: 50%; }
.ev-tag[data-kind="data"]::before { background: repeating-linear-gradient(45deg, var(--text-3) 0 2px, transparent 2px 4px); }

figcaption .ev-tag { margin-bottom: 9px; }

/* ---- at a glance ---- */
.glance {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.glance .g-cell {
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 22px 22px 24px;
  display: grid;
  gap: 12px;
  align-content: start;
}
.glance .g-ico {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  border: 1px solid var(--line);
  color: var(--text-2);
  background: var(--surface);
}
.glance .g-ico svg { width: 20px; height: 20px; }
.glance .g-label {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  margin: 0;
}
.glance .g-value { font-size: 14.5px; color: var(--text); line-height: 1.5; margin: 0; }
.glance .g-value strong { color: var(--accent); font-weight: 600; }

/* design-shift band */
.shift-band {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  gap: 0;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 22px;
}
.shift-band .shift-side {
  padding: 22px 26px;
  display: grid;
  gap: 8px;
  align-content: center;
  background: var(--bg-2);
}
.shift-band .shift-side.shift-to { background: var(--accent-soft); }
.shift-band .shift-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}
.shift-band .shift-to .shift-tag { color: var(--accent); }
.shift-band .shift-headline {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: 18px;
  line-height: 1.25;
  color: var(--text);
}
.shift-band .shift-sub { font-size: 13px; color: var(--text-3); line-height: 1.45; }
.shift-band .shift-arrow {
  display: grid;
  place-items: center;
  padding: 0 8px;
  background: var(--surface);
  border-left: 1px solid var(--line-soft);
  border-right: 1px solid var(--line-soft);
  color: var(--accent);
}
.shift-band .shift-arrow svg { width: 22px; height: 22px; }
@media (max-width: 720px) {
  .shift-band { grid-template-columns: 1fr; }
  .shift-band .shift-arrow {
    border-left: none; border-right: none;
    border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft);
    padding: 8px;
  }
  .shift-band .shift-arrow svg { transform: rotate(90deg); }
}

/* ---- finding / requirement ---- */
.finding {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--bg-2);
  padding: 24px 26px;
}
.finding + .finding { margin-top: 14px; }
.finding .f-num {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent-2);
}
.finding .f-title {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: 19px;
  color: var(--text);
  line-height: 1.25;
}
.finding .f-req {
  font-size: 14.5px;
  color: var(--text-2);
  border-left: 2px solid var(--accent-line);
  padding-left: 14px;
}
.finding .f-req strong { color: var(--accent); }

/* ---- data tables ---- */
.cs-table-wrap {
  margin: 4px 0 8px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow-x: auto;
}
table.cs-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14.5px;
  min-width: 520px;
}
.cs-table th, .cs-table td {
  text-align: left;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
  line-height: 1.45;
}
.cs-table thead th {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  background: var(--bg-2);
}
.cs-table tbody tr:last-child td { border-bottom: none; }
.cs-table td { color: var(--text-2); }
.cs-table td:first-child { color: var(--text); }
.cs-table td.td-decision { color: var(--accent); font-weight: 600; }
.cs-table .scrim { font-size: 12.5px; color: var(--text-3); }

/* ---- status pills (icon + label, never colour-only) ---- */
.st {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  white-space: nowrap;
}
.st .st-ico {
  flex: none;
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  border-radius: 50%;
  border: 1.5px solid currentColor;
}
.st-spec { color: var(--accent-2); }
.st-due { color: var(--accent); }
.st-default { color: var(--text); }
.st-default .st-ico { border-radius: 3px; }
.st-none { color: var(--text-3); }
.st-none .st-ico { border-style: dashed; }
.st-na { color: var(--text-3); }
.st-na .st-ico { border-color: var(--accent); color: var(--accent); }

.st-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}

/* ---- dashboard panel mock ---- */
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
  overflow: hidden;
}
.panel .panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface);
}
.panel .panel-title {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: 17px;
  color: var(--text);
}
.panel .panel-meta { font-size: 12.5px; color: var(--text-3); }
.panel .panel-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14px;
  color: var(--text-2);
}
.panel .panel-summary b {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  color: var(--text);
  font-size: 18px;
  margin-right: 6px;
}
.panel .cs-table-wrap { margin: 0; border: none; border-radius: 0; }
.panel .cs-table { min-width: 460px; }
.panel-attn {
  padding: 16px 22px;
  border-top: 1px solid var(--line-soft);
  background: color-mix(in oklab, var(--accent) 7%, transparent);
}
.panel-attn .attn-label {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.panel-attn ul { list-style: none; display: grid; gap: 5px; }
.panel-attn li { font-size: 14px; color: var(--text); }
.panel-attn li span { color: var(--text-3); }

/* ---- roadmap (3 stages) ---- */
.roadmap {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 4px 0;
  counter-reset: rstage;
}
.road-stage {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--bg-2);
  padding: 22px 22px 24px;
  display: grid;
  gap: 9px;
  align-content: start;
  position: relative;
}
.road-stage:last-child { border-color: var(--accent-line); background: var(--accent-soft); }
.road-stage .road-phase {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
}
.road-stage:last-child .road-phase { color: var(--accent); }
.road-stage .road-title {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: 17px;
  color: var(--text);
  line-height: 1.25;
}
.road-stage .road-desc { font-size: 13.5px; color: var(--text-2); line-height: 1.5; }

/* ---- before / after compare ---- */
.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 4px 0;
}
.compare .cmp-col {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--bg-2);
  padding: 22px 24px;
}
.compare .cmp-col.cmp-after { border-color: var(--accent-line); background: var(--accent-soft); }
.compare .cmp-label {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 12px;
}
.compare .cmp-after .cmp-label { color: var(--accent); }
.compare ul { list-style: none; display: grid; gap: 9px; }
.compare li {
  font-size: 14.5px;
  color: var(--text-2);
  line-height: 1.45;
  padding-left: 18px;
  position: relative;
}
.compare li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--text-3);
}
.compare .cmp-after li::before { content: "→"; color: var(--accent); }

/* ---- disclosure / references ---- */
.disclosure {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--bg-2);
  padding: 4px 26px;
  margin-top: 4px;
}
.disclosure summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 0;
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: 16px;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.disclosure summary::-webkit-details-marker { display: none; }
.disclosure summary::after {
  content: "+";
  font-size: 20px;
  color: var(--accent);
  font-weight: 400;
}
.disclosure[open] summary::after { content: "–"; }
.disclosure .disc-body {
  padding: 0 0 20px;
  font-size: 14.5px;
  color: var(--text-2);
  line-height: 1.6;
}
.disclosure .disc-body p + p { margin-top: 12px; }
.disclosure .disc-body strong { color: var(--text); }

.note-band {
  border-left: 2px solid var(--line);
  padding: 2px 0 2px 20px;
  font-size: 14.5px;
  color: var(--text-3);
  margin-top: 16px;
}

/* ---- clinical involvement strip ---- */
.clin-section { padding-top: 28px; padding-bottom: 8px; }
.clin-section .clin-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 14px;
}
.clin-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.clin-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--bg-2);
  padding: 22px 24px;
}
.clin-ico {
  flex: none;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--accent-2-line);
  border-radius: 11px;
  color: var(--accent-2);
}
.clin-ico svg { width: 21px; height: 21px; }
.clin-body { display: grid; gap: 3px; }
.clin-count {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: 26px;
  color: var(--accent-2);
  line-height: 1.05;
  letter-spacing: var(--display-tracking);
}
.clin-title { font-size: 15px; color: var(--text); font-weight: 600; }
.clin-detail { font-size: 13px; color: var(--text-3); line-height: 1.45; }

@media (max-width: 880px) {
  .roadmap { grid-template-columns: 1fr; }
  .compare { grid-template-columns: 1fr; }
  .clin-strip { grid-template-columns: 1fr; }
}
