/* =====================================================================
   Reblis.ai — Shared Stylesheet
   Sections (in order): TOKENS · BASE · TYPOGRAPHY · LAYOUT · COMPONENTS · PRINT
   ===================================================================== */

/* ---------- 1. TOKENS — light defaults (flipped back 2026-06-12) ---------- */
:root {
  /* Surfaces */
  --page:    #FAFAF7;
  --paper:   #FFFFFF;
  --paper-2: #F2F1EB;
  --rule:    #D8D2C2;

  /* Ink */
  --ink:    #0B0B0B;
  --ink-2:  #3A3A3A;
  --ink-3:  #7A6F5C;

  /* Brand */
  --pink:   #ED1958;
  --indigo: #3828F4;

  /* Type */
  --display: 'Inter', system-ui, -apple-system, Segoe UI, sans-serif;
  --sans:    'Inter', system-ui, -apple-system, Segoe UI, sans-serif;
  /* JetBrains Mono: weight 400 is intentionally NOT loaded — any rule that omits font-weight
     gets bumped to 500 by the browser's font-matching fallback (closest available weight). */
  --mono:    'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Layout */
  --container: 1400px;
  --gutter-d: 64px;
  --gutter-t: 40px;
  --gutter-m: 24px;
  --section-d: 112px;
  --section-t: 80px;
  --section-m: 64px;

  /* Motion */
  --t-fast: 150ms;
  --t-base: 200ms;

  color-scheme: light;
}

/* ---------- 1b. TOKENS — explicit dark override ---------- */
:root[data-theme="dark"] {
  --page:    #0E0E12;
  --paper:   #161620;
  --paper-2: #1C1C28;
  --rule:    #2A2A35;

  --ink:    #EDEDED;
  --ink-2:  #C3C3D0;
  --ink-3:  #9090A8;

  --pink:   #FF447B;
  --indigo: #7A6CFF;

  color-scheme: dark;
}

/* ---------- 2. BASE / RESET ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background var(--t-base) ease, color var(--t-base) ease;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--pink); }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 2px;
}

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

::selection { background: var(--pink); color: #fff; }

/* ---------- 3. TYPOGRAPHY ---------- */
/* utility classes (.h1/.h2/...) are full equivalents of the elements —
   they must carry weight and tracking too, not just font-size */
h1, h2, h3, h4, .h1, .h2, .h3, .h4 {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.95;
  margin: 0;
  color: var(--ink);
}

.h1, h1 {
  font-size: clamp(40px, 7vw, 80px);
  line-height: 0.92;
}

.h2, h2 {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.0;
  margin-bottom: 16px;
}

.h3, h3 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

p { margin: 0 0 1em; }

.kicker {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--pink);
  margin: 0 0 12px;
}

.meta {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-3);
}

.accent-block {
  color: #fff;
  background: var(--pink);
  padding: 0 0.12em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
/* the accent-block background paints below the 0.92 line box — give hero
   h1s breathing room so following ledes never collide with it */
.hero > h1:not(.hero-title) { margin-bottom: 20px; }

.indigo { color: var(--indigo); }
.subtle { color: var(--ink-3); }

small, .small { font-size: 12px; }

/* Screen-reader-only — used to keep canonical text in the DOM when the visible text is animating */
.vhide {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 4. LAYOUT ---------- */
.page {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter-m);
}
@media (min-width: 760px)  { .page { padding: 0 var(--gutter-t); } }
@media (min-width: 1100px) { .page { padding: 0 var(--gutter-d); } }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--page);  /* fallback for browsers without color-mix */
  background: color-mix(in srgb, var(--page) 92%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.site-header .inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px var(--gutter-m);
  display: flex;
  align-items: center;
  gap: 24px;
}
@media (min-width: 760px)  { .site-header .inner { padding-left: var(--gutter-t); padding-right: var(--gutter-t); } }
@media (min-width: 1100px) { .site-header .inner { padding-left: var(--gutter-d); padding-right: var(--gutter-d); } }

.site-header .wordmark {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.12em;
  color: var(--ink);
}
.site-header .wordmark .r-logo {
  width: 40px;
  height: auto;
  color: #FF447B;
  flex-shrink: 0;
}
.site-header nav {
  margin-left: auto;
  display: flex;
  gap: 24px;
  align-items: center;
}
.site-header nav a {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.site-header nav a.is-current { color: var(--pink); }
.site-header nav a:hover     { color: var(--pink); }

.nav-toggle { display: none; }
.site-header nav .nav-menu { display: contents; }

@media (max-width: 759px) {
  .site-header .inner { position: relative; }
  .site-header nav .nav-menu { display: none; }
  .site-header nav.open .nav-menu {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: 56px;
    right: var(--gutter-m);
    min-width: 200px;
    background: var(--paper);
    border: 1px solid var(--rule);
    padding: 8px 14px;
    z-index: 60;
  }
  .site-header nav.open .nav-menu .nav-link {
    display: block;
    padding: 8px 0;
    border-bottom: 1px solid var(--rule);
  }
  .site-header nav.open .nav-menu .nav-link:last-child { border-bottom: 0; }
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--rule);
  }
}

.site-footer {
  border-top: 1px solid var(--rule);
  margin-top: var(--section-d);
  padding: 32px 0 64px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
}
.site-footer .row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 16px 32px;
}
.site-footer .links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 18px;
}
.site-footer .links a {
  display: inline-flex;
  align-items: center;
  line-height: 0; /* prevents SVG from inheriting line-box height */
}
.site-footer .links a svg { display: block; }
.site-footer .colophon {
  margin-top: 16px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  opacity: 0.7;
}

section { padding: var(--section-m) 0; }
@media (min-width: 760px)  { section { padding: var(--section-t) 0; } }
@media (min-width: 1100px) { section { padding: var(--section-m) 0; } }

.rule { border: 0; border-top: 1px solid var(--rule); margin: 0; }

/* ---------- 5. COMPONENTS ---------- */

/* Hero block on home/work index */
.hero {
  padding: var(--section-m) 0 calc(var(--section-m) * 0.6);
}
@media (min-width: 760px)  { .hero { padding: var(--section-t) 0 calc(var(--section-t) * 0.6); } }
@media (min-width: 1100px) { .hero { padding: var(--section-d) 0 calc(var(--section-d) * 0.6); } }

/* ---------- HERO HEADER BAR (gradient) — matches reblis.ai style guide ----------
   Full-width gradient hero with a pink under-rule. Token-based so it auto-inverts:
   in light theme the bar is dark with light text; in dark theme the gradient flips
   to light with dark text. Sits as a direct child of <body>, right after .site-header. */
.header-bar {
  position: relative;
  padding: 56px 0 64px;
  background: linear-gradient(135deg, var(--ink-2) 0%, var(--ink) 100%);
  color: var(--page);
  overflow: hidden;
}
.header-bar::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 5px;
  background: var(--pink);
}
:root[data-theme="dark"] .header-bar {
  background: linear-gradient(100deg, var(--ink) 0%, var(--ink-2) 100%);
}
.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter-m);
  position: relative;
}
@media (min-width: 760px)  { .header-inner { padding: 0 var(--gutter-t); } }
@media (min-width: 1100px) { .header-inner { padding: 0 var(--gutter-d); } }

/* Restyle the hero title/lede/CTAs to read on the gradient (keeps the animated word) */
.header-bar .hero-title { color: var(--page); margin: 0 0 24px; }
.header-bar .hero-title .word-ai,
.header-bar .hero-title .word-design { color: var(--page); }
/* .word-engineer keeps var(--pink) — reads great on the gradient in both themes */
.header-bar .lede {
  font-size: clamp(16px, 1.7vw, 19px);
  line-height: 1.55;
  color: var(--page);
  opacity: 0.82;
  max-width: 640px;
  margin: 0 0 28px;
}
.header-bar .btn {
  border-color: var(--page);
  color: var(--page);
}
.header-bar .btn:hover {
  background: var(--pink);
  border-color: var(--pink);
  color: #fff;
}
.header-bar .btn-link { color: var(--page); opacity: 0.72; }
.header-bar .btn-link:hover { opacity: 1; color: var(--page); border-bottom-color: var(--page); }

/* ---- Other-page hero variants placed inside the gradient header-bar ----
   Every interior page wraps its existing hero (.hero / .cs-hero / .mvf-hero /
   .identity) inside .header-bar. Neutralize each wrapper's own padding/border
   (the bar supplies them) and flip text to light; pink + accent-block carry over.
   Selectors carry the wrapper class so they out-rank the component rules
   (.hero .lede, .cs-hero .summary, .identity .role, .cs-meta span, ...). */
.header-bar .hero,
.header-bar .cs-hero,
.header-bar .mvf-hero { padding: 0; border-bottom: 0; }
.header-bar h1,
.header-bar h2,
.header-bar .name { color: var(--page); }
/* every header-bar H1 matches the style guide H1 (4.2rem ~= 67px desktop) */
.header-bar h1 { font-size: clamp(2.4rem, 1.4rem + 4vw, 4.2rem); }
/* kicker now sits BELOW the lede — top margin instead of the default bottom margin */
.header-bar .kicker { margin: 18px 0 0; }
/* supporting copy -> light */
.header-bar .hero .lede,
.header-bar .mvf-hero .lede,
.header-bar .cs-hero .summary,
.header-bar .identity .role,
.header-bar .identity .tagline,
.header-bar .sub { color: var(--page); opacity: 0.82; }
/* resume mono contact row */
.header-bar .identity .contact { color: var(--page); opacity: 0.72; }
.header-bar .identity .contact a { color: var(--page); }
.header-bar .identity .contact a:hover { color: var(--pink); }
/* meta line (style-guide style) stays pink */
.header-bar .meta { color: var(--pink); }
/* case-study meta strip on the gradient */
.header-bar .cs-hero .cs-meta { border-top-color: color-mix(in srgb, var(--page) 22%, transparent); }
.header-bar .cs-meta span { color: var(--page); opacity: 0.85; }
.header-bar .cs-meta strong { color: var(--page); opacity: 0.6; }
.header-bar .cs-meta a { color: var(--pink); }

/* Re-introduce top breathing room for the first content block after the gradient hero */
.header-bar + main { padding-top: var(--section-m); }
@media (min-width: 760px)  { .header-bar + main { padding-top: var(--section-t); } }
@media (min-width: 1100px) { .header-bar + main { padding-top: var(--section-d); } }

/* Two-register hero title — Inter "Design" + JetBrains Mono "Engineer" + blinking caret */
.hero-title {
  font-size: clamp(40px, 7vw, 67px);  /* desktop cap matches the style guide H1 (4.2rem) */
  letter-spacing: -0.035em;
  line-height: 0.95;
  margin: 0 0 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 0.18em;
  row-gap: 0.04em;
  color: var(--ink);
}
.hero-title .word-ai,
.hero-title .word-design {
  font-family: var(--display);
  font-weight: 800;
  color: var(--ink);
}
.hero-title .word-engineer {
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: -0.05em;
  font-size: 0.86em;
  white-space: nowrap;
  color: var(--pink);
}
.hero-title .word-engineer__rotate {
  display: inline-block;
}
.hero-title .word-engineer__rotate .char {
  display: inline-block;
}

.hero .lede {
  font-size: clamp(16px, 1.7vw, 19px);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 640px;
  margin: 0 0 36px;
}

/* CTA button */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 12px 18px;
  border: 1px solid var(--ink);
  color: var(--ink);
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.btn:hover {
  background: var(--pink);
  color: #fff;
  border-color: var(--pink);
}

/* Quieter, secondary text-link CTA — used beside .btn in hero */
.btn-link {
  display: inline-flex;
  align-items: center;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 12px 4px;
  border-bottom: 1px solid transparent;
  transition: color var(--t-fast), border-color var(--t-fast);
}
.btn-link:hover {
  color: var(--pink);
  border-bottom-color: var(--pink);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 0;
}

/* Work grid (hero variant — used on home + /work/) */
.grid-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 24px;
}
@media (min-width: 760px)  { .grid-hero { grid-template-columns: 1fr 1fr; gap: 20px; } }
@media (min-width: 1100px) { .grid-hero { grid-template-columns: 1fr 1fr 1fr; gap: 24px; } }

/* Work grid (compact "more work" variant) */
.grid-more {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 24px;
}
@media (min-width: 760px)  { .grid-more { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .grid-more { grid-template-columns: repeat(4, 1fr); } }

/* Work card — hero variant */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--rule);
  overflow: hidden;
  transition: border-color var(--t-fast);
}
.card:hover {
  border-color: var(--pink);
}
.card::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 12px 12px 0;
  border-color: transparent var(--pink) transparent transparent;
  opacity: 0;
  transition: opacity var(--t-fast);
}
.card:hover::before { opacity: 1; }
.card .shot {
  aspect-ratio: 16 / 10;
  background: var(--paper-2);
  background-size: cover;
  background-position: center;
}
.card .body {
  padding: 18px 20px 20px;
}
.card .body .kicker { margin-bottom: 8px; }
.card .body h3 { margin: 0 0 6px; }
.card .body p { color: var(--ink-2); font-size: 14px; line-height: 1.45; margin: 0; }
.card .stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.card .stack .tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 7px;
  border: 1px solid var(--rule);
  color: var(--indigo);
}

/* Work tile — compact "more work" variant */
.tile {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 14px 16px 16px;
  transition: border-color var(--t-fast);
}
.tile:hover { border-color: var(--pink); }
.tile .kicker { margin-bottom: 4px; font-size: 10px; }
.tile h3 { font-size: 16px; margin: 0 0 4px; }
.tile p { font-size: 13px; color: var(--ink-2); margin: 0; }

/* Resume mini-teaser */
.resume-strip {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 24px 0;
  padding: 24px;
  background: var(--paper);
  border: 1px solid var(--rule);
}
.resume-strip .lead { font-family: var(--display); font-weight: 700; font-size: 24px; line-height: 1.2; letter-spacing: -0.02em; }
.resume-strip .sub { color: var(--ink-2); }
.resume-strip a { font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--pink); }

/* Resume page chapter blocks */
.chapter {
  border-top: 1px solid var(--rule);
  padding-top: 32px;
  margin-top: 48px;
}
.chapter .h2 { font-size: clamp(24px, 3.4vw, 36px); }
.chapter .period {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--indigo);
  margin: 0 0 6px;
}
.chapter h3 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 24px 0 10px;
}
.chapter ul {
  margin: 0 0 12px;
  padding-left: 20px;
}
.chapter li {
  margin-bottom: 6px;
  color: var(--ink-2);
  line-height: 1.5;
}

/* Skills/Stack/Education columns */
.three-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 760px) { .three-col { grid-template-columns: 1fr 1fr 1fr; gap: 32px; } }
.three-col h3 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--pink);
  margin: 0 0 12px;
}
.three-col ul { list-style: none; padding: 0; margin: 0; font-family: var(--mono); font-size: 13px; }
.three-col li { padding: 4px 0; color: var(--ink-2); border-bottom: 1px dashed var(--rule); }

/* Identity block on /resume — name inherits the shared h1 scale */
.identity .name {
  margin-bottom: 8px;
}
.identity .role {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 18px;
  color: var(--ink-2);
  margin-bottom: 16px;
}
.identity .contact {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  margin-bottom: 16px;
}
.identity .contact a:hover { color: var(--pink); }
.identity .tagline {
  max-width: 640px;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-2);
}

/* Print button on /resume — sits below the tagline in the identity block */
.print-btn { margin-top: 24px; }
@media (max-width: 759px) { .print-btn { display: none; } }

/* Theme toggle — matches reblis.ai style guide (bordered box, lucide sun/moon, CSS-driven) */
.theme-toggle {
  position: relative;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: var(--paper);
  border: 1px solid var(--rule);
  color: var(--ink);
  margin-left: 8px;
  transition: border-color var(--t-fast), color var(--t-fast);
}
.theme-toggle:hover { border-color: var(--pink); color: var(--pink); }
.theme-toggle svg { width: 17px; height: 17px; }
/* Light theme shows the moon (click → dark); dark theme shows the sun. */
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun  { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }

/* ---------- 6. PRINT ---------- */
@media print {
  :root, :root[data-theme="dark"], :root[data-theme="light"] {
    --page:    #FFFFFF;
    --paper:   #FFFFFF;
    --paper-2: #F5F5F5;
    --rule:    #BBBBBB;
    --ink:    #000000;
    --ink-2:  #333333;
    --ink-3:  #666666;
    --pink:   #ED1958;
    --indigo: #3828F4;
    color-scheme: light;
  }

  body { background: #fff; color: #000; font-size: 11px; line-height: 1.4; }

  .site-header,
  .site-footer,
  .theme-toggle,
  .print-btn,
  .nav-toggle,
  nav { display: none !important; }

  .page { max-width: none; padding: 0; }

  h1 { font-size: 28px; line-height: 1.1; }
  h2 { font-size: 16px; line-height: 1.2; }
  h3 { font-size: 13px; }

  .identity .name { font-size: 28px; }
  .identity .role { font-size: 13px; }
  .identity .contact { font-size: 10px; }
  .identity .tagline { font-size: 12px; }

  .chapter { break-inside: avoid; margin-top: 24px; padding-top: 16px; }
  .chapter ul { margin-bottom: 8px; }
  .chapter li { font-size: 11px; line-height: 1.35; margin-bottom: 3px; }

  .three-col { grid-template-columns: 1fr 1fr 1fr; gap: 24px; }
  .three-col li { padding: 2px 0; font-size: 10px; }

  h2, h3 { break-after: avoid; }

  @page { size: 8.5in 11in; margin: 0.5in; }
}

/* ---------- 7. CASE STUDIES (Phase 2) ---------- */

/* Case-study hero (kicker, big H1, summary) */
.cs-hero {
  padding: var(--section-m) 0 32px;
  border-bottom: 1px solid var(--rule);
}
@media (min-width: 760px)  { .cs-hero { padding: var(--section-t) 0 40px; } }
@media (min-width: 1100px) { .cs-hero { padding: var(--section-d) 0 48px; } }
.cs-hero h1 { max-width: 1000px; }
.cs-hero .summary {
  font-family: var(--sans);
  font-size: clamp(18px, 2vw, 22px);
  color: var(--ink-2);
  margin: 16px 0 0;
  max-width: 720px;
}

/* Meta strip — mono row of LABEL · VALUE pairs */
.cs-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin: 32px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
}
.cs-meta span { color: var(--ink-3); }
.cs-meta strong {
  color: var(--ink);
  font-weight: 600;
  margin-right: 4px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
}
.cs-meta a {
  color: var(--indigo);
  border-bottom: 1px solid currentColor;
}
.cs-meta a:hover { color: var(--pink); }

/* Hero image — full-bleed within container */
.cs-shot {
  margin: 32px 0;
  border: 1px solid var(--rule);
  background: var(--paper-2);
}
.cs-shot img { display: block; width: 100%; height: auto; }
@media (min-width: 760px)  { .cs-shot { margin: 48px 0; } }

/* Case-study body sections (Problem / Approach / Outcome) */
.cs-section {
  padding: 48px 0 10px;
  border-top: 1px solid var(--rule);
}
.cs-section:first-of-type { border-top: 0; padding-top: 0; }
@media (min-width: 760px) { .cs-section { padding: 64px 0 13px; } }
.cs-section .body {
  max-width: 720px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-2);
}
.cs-section .body p { margin: 0 0 1em; }
.cs-section .body p:last-child { margin-bottom: 0; }
.cs-section h2 { margin-bottom: 12px; }

/* Stack list — mono inline tags */
.cs-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 0;
}
.cs-stack .tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 9px;
  border: 1px solid var(--rule);
  color: var(--indigo);
}

/* Screenshot gallery */
.cs-gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 16px;
}
@media (min-width: 760px) { .cs-gallery { grid-template-columns: 1fr 1fr; } }
.cs-gallery figure { margin: 0; }
.cs-gallery img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  background: var(--paper-2);
}
.cs-gallery figcaption {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* Prev / Next navigation */
.cs-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 64px 0 0;
  padding: 32px 0;
  border-top: 1px solid var(--rule);
}
.cs-nav a {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  border: 1px solid var(--rule);
  transition: border-color var(--t-fast);
}
.cs-nav a:hover { border-color: var(--pink); }
.cs-nav .label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.cs-nav .name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.cs-nav .next { text-align: right; }

/* Print: omit gallery, simplify chrome on case studies */
@media print {
  .cs-gallery,
  .cs-nav,
  .cs-shot { display: none !important; }
  .cs-section { padding: 16px 0; border-top: 1px solid #BBBBBB; }
  .cs-meta { font-size: 9px; }
}

/* ---------- 8. LOGO GALLERY (Phase 3) ---------- */
.cs-logo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 24px;
}
@media (min-width: 760px)  { .cs-logo-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .cs-logo-grid { grid-template-columns: repeat(4, 1fr); } }
.cs-logo-grid .logo-card {
  aspect-ratio: 1 / 1;
  background: var(--paper);
  border: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}
.cs-logo-grid .logo-card img { max-width: 100%; max-height: 100%; }
.cs-logo-grid .logo-card .placeholder {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  line-height: 1.4;
}
.cs-logo-empty {
  margin: 32px 0;
  padding: 32px;
  border: 1px dashed var(--rule);
  text-align: center;
  color: var(--ink-3);
}
.cs-logo-empty p { margin: 0; }

/* ---------- 9. MICHAEL-VS-FOOD (Phase 4) ---------- */

.mvf-hero {
  padding: var(--section-m) 0 32px;
}
@media (min-width: 760px)  { .mvf-hero { padding: var(--section-t) 0 40px; } }
@media (min-width: 1100px) { .mvf-hero { padding: var(--section-d) 0 48px; } }
.mvf-hero .lede {
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 720px;
  margin: 16px 0 0;
}

.mvf-chart-container {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 24px 24px 20px;
  margin: 32px 0 64px;
  position: relative;
}

/* Stats grid (two rows of three) */
.mvf-dashboard {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
@media (max-width: 559px) { .mvf-dashboard { grid-template-columns: repeat(2, 1fr); } }
.mvf-stat {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  padding: 12px;
  text-align: center;
}
.mvf-stat-label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-3);
  margin-bottom: 6px;
}
.mvf-stat-value {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--pink);
}

/* Controls row */
.mvf-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.mvf-unit-btns, .mvf-range-btns { display: flex; gap: 4px; flex-wrap: wrap; }
.mvf-btn {
  padding: 6px 12px;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.mvf-btn:hover:not(.active) { border-color: var(--pink); color: var(--pink); }
.mvf-btn.active {
  background: var(--pink);
  border-color: var(--pink);
  color: #fff;
}

/* Chart canvas */
.mvf-chart-wrap { position: relative; height: 380px; }
@media (max-width: 559px) { .mvf-chart-wrap { height: 280px; } }

.mvf-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* Fast-window hover tooltip (overlay above bands) */
.mvf-fast-tooltip {
  position: absolute;
  background: var(--ink);
  color: var(--page);
  padding: 8px 12px;
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.4;
  pointer-events: none;
  display: none;
  z-index: 10;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}
.mvf-fast-tooltip .title {
  color: var(--pink);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.mvf-fast-tooltip .notes {
  color: var(--ink-3);
  font-style: italic;
  margin-top: 4px;
  max-width: 260px;
  white-space: normal;
}
