html {
  scroll-behavior: smooth;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

:root {
  /* Layout */
  --page-gutter: clamp(var(--space-4), 4vw, var(--space-6));
  /* 16 → 32px */
  --container-max: 88rem;
  /* 1200px / 16 */
  --impact-callout-max: 48.75rem;
  /* 780px / 16 */
  --hero-max: 52rem;
  /* 640px / 16 */
  --prose: 66ch;
  --prose-tight: 60ch;

  /* Spacing scale (8px base grid) */
  --space-1: 0.25rem;
  /* 4px */
  --space-2: 0.5rem;
  /* 8px */
  --space-3: 0.75rem;
  /* 12px */
  --space-4: 1rem;
  /* 16px */
  --space-5: 1.5rem;
  /* 24px */
  --space-6: 2rem;
  /* 32px */
  --space-7: 3rem;
  /* 48px */
  --space-8: 4rem;
  /* 64px */
  --space-9: 6rem;
  /* 96px */

  /* Macro tier (large desktop hero/section spacing) */
  --space-10: 8rem;
  /* 128px */

  /* Fluid section padding — use instead of bespoke clamps */
  --space-section-sm: clamp(2.5rem, 5vw, 4rem);
  /* 40 → 64px  — compact sections */
  --space-section-md: clamp(4rem, 7vw, 6rem);
  /* 64 → 96px  — default */
  --space-section-lg: clamp(5rem, 10vw, 8rem);
  /* 80 → 128px — hero, anchor sections */

  /* Typography */
  /* ─── Font families ─────────────────────────────────────────────────── */
  --font-sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont,
    "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono",
    Consolas, monospace;

  /* ─── Type scale (modular, IBM Plex Sans-tuned) ─────────────────────── */
  --fs-xs: 12px;
  --fs-sm: 14px;
  --fs-body: 17px;
  --fs-md: 20px;
  --fs-lg: 24px;
  --fs-xl: 30px;
  --fs-2xl: 38px;

  /* Control text — Apple-style 15px for buttons; doesn't fit modular scale */
  --fs-control: 15px;

  /* Fluid display tier — replaces --fs-hero-* clamps AND --fs-metric */
  --fs-display-sm: clamp(1.75rem, 1.4rem + 1.8vw, 2.5rem);
  --fs-display-md: clamp(2.25rem, 1.8rem + 2.4vw, 3.5rem);
  --fs-display-lg: clamp(2.75rem, 2rem + 4vw, 4.5rem);

  /* ─── Line height (per-role, not universal) ─────────────────────────── */
  --lh-2xs: 1.4;
  --lh-xs: 1.45;
  --lh-body: 1.55;
  --lh-md: 1.45;
  --lh-lg: 1.35;
  --lh-xl: 1.25;
  --lh-2xl: 1.2;
  --lh-display: 1.1;

  /* Long-form reading rhythm — unchanged, these are good */
  --lh-prose: 1.7;
  --lh-prose-loose: 1.75;

  /* ─── Tracking (body + display ramp) ────────────────────────────────── */
  --tracking-tightest: -0.04em;
  --tracking-tighter: -0.025em;
  --tracking-tight: -0.015em;
  --tracking-snug: -0.005em;
  --tracking-normal: 0;
  --tracking-loose: 0.01em;
  --tracking-looser: 0.025em;

  /* Caps tracking — renamed from --ls-caps-* for consistency */
  --tracking-caps-tight: 0.06em;
  --tracking-caps: 0.08em;
  --tracking-caps-wide: 0.12em;

  /* ─── Font weight ramp ──────────────────────────────────────────────── */
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;

  /* ─── Application tokens (intent-based — keep) ──────────────────────── */
  --type-overline: var(--fs-xs);
  --type-label: var(--fs-xs);
  --type-body: var(--fs-body);
  --type-heading-3: var(--fs-lg);
  --type-heading-4: var(--fs-md);
  --type-caption: var(--fs-sm);

  /* Radii (single system) */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 999px;

  --focus-outline-offset: 3px;

  /* Motion (elegant + consistent) */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-standard: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur-1: 120ms;
  --dur-2: 180ms;
  --dur-3: 300ms;
  --dur-4: 450ms;

  /* === Cool neutrals === */
  --gray-100: #F7F9FA;
  --gray-200: #F1F4F6;
  --gray-300: #DCE3E8;
  --bg: var(--gray-100);

  /* Surface levels (more distinct steps) */
  --surface-1: rgba(0, 0, 0, 0.06);
  /* hover states */
  --surface-2: rgba(0, 0, 0, 0.09);
  /* active cards */

  /* Card surfaces */
  --card-bg-strong: var(--gray-200);

  /* Elevated surface system — no borders, shadow + tone only */
  --surface-elevated: rgba(15, 23, 42, 0.045);
  /* callouts, asides, meta cards */
  --surface-elevated-strong: rgba(15, 23, 42, 0.075);
  /* impact callout, TLDR card */
  --surface-code: rgba(15, 23, 42, 0.06);
  /* code blocks, pre */

  /* KPI system */
  --kpi-gap: 3.25rem;
  --kpi-label-size: var(--fs-xs);
  --kpi-label-ls: var(--tracking-caps);
  --kpi-label-line-height: var(--lh-2xs);
  --kpi-label-color: var(--text-secondary);
  --kpi-note-color: var(--text-secondary);

  /* Borders (outline tone) */
  --border-subtle: rgb(var(--rgb-outline) / 0.12);
  --border: rgb(var(--rgb-outline) / 0.22);
  --border-strong: rgb(var(--rgb-outline) / 0.35);
  --border-interactive: rgb(var(--rgb-outline) / 0.45);

  --border-w-strong: 2px;

  --dot-size: 14px;
  --line-thickness: 2px;

  /* Backdrop blur tokens */
  --blur-sm: 4px;
  --blur-md: 18px;
  --blur-lg: 24px;

  /* Shadows (10% deeper than default) */
  --shadow-1:
    0 1px 2px rgb(15 23 42 / 0.07),
    0 2px 4px rgb(15 23 42 / 0.11),
    0 0 0 1px var(--border);

  --shadow-2:
    0 2px 4px rgb(15 23 42 / 0.07),
    0 10px 20px rgb(15 23 42 / 0.13),
    0 0 0 1px var(--border);

  --shadow-3:
    0 4px 8px rgb(15 23 42 / 0.09),
    0 20px 40px rgb(15 23 42 / 0.18),
    0 0 0 1px var(--border);

  /* === Neutrals (slate) === */
  --slate-600: #5D6873;
  --slate-900: #1A2128;

  /* Text (APCA intent: keep small text comfortably bright) */
  --text: var(--slate-900);
  --text-secondary: var(--slate-600);

  /* Text on colored backgrounds */
  --text-on-accent: #FFFFFF;

  /* === Brand accent (canonical) — desaturated indigo === */
  --accent: #4F6EF7;
  --accent-hover: #3B5BDB;
  --accent-text: #2D4FC4;
  --accent-text-hover: #1F3A8F;
  --accent-soft: rgb(79 110 247 / 0.12);
  --accent-strong: rgb(79 110 247 / 0.24);

  --color-primary: var(--accent);

  /* === Status colors === */
  --green: #059669;
  --green-soft: rgb(5 150 105 / 0.12);
  --amber: #D97706;
  --amber-soft: rgb(217 119 6 / 0.12);
  --red: #DC2626;
  --red-soft: rgb(220 38 38 / 0.10);

  /* Menu / elevated shadows */
  --shadow-menu: 0 24px 64px rgba(0, 0, 0, 0.24);
  --shadow-menu-hover: 0 28px 72px rgba(0, 0, 0, 0.28);
  --ease-menu: cubic-bezier(.2, .9, .2, 1);

  /* Focus */
  --focus-ring: 0 0 0 3px rgb(var(--rgb-accent-small) / 0.28);
  --focus-outline: 2px solid var(--accent-text-hover);

  /* Glass */
  --glass-border: rgba(255, 255, 255, 0.34);

  /* Article type ramp — opens H2/H3 separation */
  --fs-article-h1: clamp(2.25rem, 1.6rem + 2.6vw, 3.25rem);
  /* ~36 → 52px */
  --fs-article-h2: clamp(1.625rem, 1.35rem + 1.1vw, 2rem);
  /* ~26 → 32px */
  --fs-article-h3: 1.25rem;
  /* 20px */
  --fs-article-lead: clamp(1.125rem, 1.05rem + 0.4vw, 1.3125rem);
  /* ~18 → 21px */

  /* Section rhythm */
  --case-section-gap: clamp(3.5rem, 5vw, 5rem);
  /* between sections */
  --case-h2-to-body: var(--space-5);
  /* 24px */
  --case-h3-to-body: var(--space-3);
  /* 12px */
  --case-h3-top: var(--space-6);
  /* 32px above sub-heading */

  /* Elevation shadows tuned for light steel-gray bg */
  --shadow-card:
    0 1px 2px rgba(15, 23, 42, 0.07),
    0 8px 24px rgba(15, 23, 42, 0.10);
  --shadow-card-strong:
    0 2px 4px rgba(15, 23, 42, 0.08),
    0 16px 40px rgba(15, 23, 42, 0.13);

  /* Nav ink */
  --ink-on-glass: #0f172a;

  /* Body gradient endpoint */
  --bg-gradient-end: var(--gray-200);

  /* Raw channels (lets you keep everything consistent) */
  --rgb-white: 255 255 255;
  --rgb-black: 0 0 0;
  --rgb-blue: 79 110 247;
  --rgb-outline: 26 33 40;
  --rgb-accent-small: 79 110 247;
  --rgb-cool: 79 110 247;

  --img-frame: rgb(var(--rgb-white) / 0.16);
  --img-matte: rgb(var(--rgb-black) / 0.22);

  /* === Dark surfaces (cards on light bg) === */
  --surface-dark: #060C16;
  --surface-dark-edge: #0D1421;
  --surface-dark-glass: rgb(6 12 22 / 0.82);
  --surface-dark-solid: rgb(6 12 22 / 1);
  --surface-dark-border: rgb(255 255 255 / 0.10);

  /* === Hero overlay gradients === */
  --hero-overlay-gradient: linear-gradient(to right,
      rgb(6 12 22 / 0.93) 0%,
      rgb(6 12 22 / 0.72) 42%,
      rgb(6 12 22 / 0.30) 62%,
      transparent 82%);

  --hero-overlay-gradient-mobile: linear-gradient(to right,
      rgb(6 12 22 / 0.96) 0%,
      rgb(6 12 22 / 0.88) 50%,
      rgb(6 12 22 / 0.60) 75%,
      transparent 90%);
}

/* -------------------------------------------------------
   Global
--------------------------------------------------------*/
html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) rgba(0, 0, 0, 0.20);
}

html.lenis,
html.lenis body {
  height: auto;
}

.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis-stopped {
  overflow: hidden;
}

.lenis-scrolling iframe {
  pointer-events: none;
}

/* WebKit scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background-color: rgb(79 110 247 / 0.92);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--accent-hover);
}

/* Global Selection Highlight */
::selection {
  background-color: var(--accent-soft, rgba(79, 110, 247, 0.2));
  color: var(--text-display, var(--ink-on-glass));
}

/* Global Focus State Polish */
:focus-visible {
  outline: 1.5px solid var(--accent);
  outline-offset: 3px;
  box-shadow: 0 0 0 4px var(--accent-soft);
}

/* Fallbacks for experimental `text-wrap` usages: ensure sensible wrapping in
   browsers that don't support `text-wrap: balance|pretty`. This keeps layout
   stable and prevents overflow/poor wrapping on headings and long paragraphs. */
:where(p, h1, h2, h3, h4, .section-title, .leadership-lede, .about-text, .metric-body, .timeline-content) {
  overflow-wrap: anywhere;
}

/* Prevent accidental image dragging/highlighting for a more app-like feel */
img {
  user-select: none;
  -webkit-user-drag: none;
}

body p {
  text-wrap: pretty;
}

body {
  font-family: var(--font-sans);
  font-optical-sizing: auto;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text);
  font-weight: var(--weight-regular);
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-gradient-end) 100%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  overscroll-behavior: none;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
  font-variant-ligatures: contextual common-ligatures;
}

body.is-home {
  min-height: 100vh;
  min-height: 100dvh;
  max-height: none;
  overflow: hidden;
}

/* Non-home page margins */
body:not(.is-home) {
  --page-margin: 6rem;
}

:where(h1, h2, h3, h4, h5, h6) {
  color: var(--text);
  font-kerning: normal;
  font-weight: var(--weight-semibold);
  line-height: var(--lh-lg);
}

h1 {
  font-size: var(--fs-2xl);
  line-height: var(--lh-2xl);
}

h2 {
  font-size: var(--fs-xl);
}

h3 {
  font-size: var(--fs-lg);
}

h4 {
  font-size: var(--fs-md);
}

h5 {
  font-size: var(--fs-body);
}

h6 {
  font-size: var(--fs-sm);
}

strong,
b {
  font-weight: var(--weight-semibold);
}

/* Default link styling */
a {
  color: inherit;
  text-decoration-color: rgba(17, 17, 17, 0.30);
  text-decoration-skip-ink: auto;
  text-decoration-thickness: max(1px, 0.06em);
  text-underline-offset: 0.20em;
  touch-action: manipulation;
}

a:hover {
  text-decoration-color: var(--accent);
}

a,
button,
[role="menuitem"] {
  touch-action: manipulation;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

code,
pre code {
  font-variant-ligatures: none;
  font-feature-settings: "liga" 0, "calt" 0;
}

/* Focus styles */
:where(a, button, [role="button"], .btn, .dh-nav, .dh-dots button):focus-visible {
  outline: var(--focus-outline);
  outline-offset: var(--focus-outline-offset);
  box-shadow: var(--focus-ring);
}

.case-study .tldr-label,
.site-main {
  padding-top: 0;
  padding-bottom: 12px;
  scroll-snap-type: none;
}

/* Site footer landmark — visually hidden, accessible to screen readers */
.site-footer {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 1px, 1px);
  white-space: nowrap;
  border: 0;
}

.is-home .site-main {
  padding-inline: var(--page-gutter);
}

body:not(.is-home) .site-main {
  padding-inline: 0;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-inline: var(--page-gutter);
}

/* Homepage-specific container padding: increase left padding by 25% */
.is-home .container {
  padding: 0 clamp(0.9375rem, 5vw, 1.25rem);
}

/* Scroll anchors */
.hero,
.leadership-section,
.builder-section,
.mentorship-section,
.about-section {
  scroll-margin-top: clamp(var(--space-4), 10vw, 72px);
}

/* Parallax */
[data-parallax] {
  will-change: transform;
  transition: transform 80ms linear;
}


/* Consistent section padding
   (fix: avoid double horizontal padding; containers handle inline padding) */
.leadership-section,
.builder-section,
.mentorship-section,
.about-section {
  padding-block: var(--page-margin, var(--space-section-md));
  padding-inline: 0;
}



/* Research/process blocks should glow cool, not blue */
/* -------------------------------------------------------
   Headings / labels
--------------------------------------------------------*/
.section-title {
  font-size: clamp(var(--fs-xl), 4vw, var(--fs-2xl));
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-tighter);
  line-height: var(--lh-2xl);
  margin-bottom: var(--space-6);
  color: var(--text);
  text-wrap: balance;
}

.leadership-section .section-title,
.builder-section .section-title,
.mentorship-section .section-title,
.about-section .section-title {
  color: var(--text);
}

.label {
  font-size: var(--fs-xs);
  line-height: var(--lh-2xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--text-secondary);
}

/* DELETE — replaced by .home-title__eyebrow (see issue #2/#3) */

/* Meta / eyebrow labels */
.text-meta,
.metric-kicker,
.case-study .tldr-label {
  font-size: var(--fs-xs);
  line-height: var(--lh-2xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-caps-wide);
  text-transform: uppercase;
  color: var(--text-secondary);
}

code {
  font-family: var(--font-mono);
  font-size: var(--fs-body);
  padding: 0.12em 0.35em;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  color: var(--text);
}

/* Duplicate selection rule removed (kept the global one near top). */


@keyframes metric-count-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.metric[data-animate] {
  opacity: 0.55;
  animation: metric-count-in 1.5s var(--ease-out) forwards;
}

.metric.metric--animated {
  opacity: 1;
  transition: opacity var(--dur-2) var(--ease-out);
}

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0;
  overflow: hidden;
  color: var(--text);
}

.hero-media {
  position: fixed;
  inset: 0;
  z-index: -2;
}

.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding: clamp(var(--space-7), 8vh, 4.5rem) 0;
}

/* Homepage-specific: reduce top padding by 25% */
.is-home .hero-overlay {
  padding: clamp(2.25rem, 6vh, 3.375rem) 0;
}

.hero-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--hero-overlay-gradient);
  pointer-events: none;
  z-index: 0;
}

.hero-inner {
  display: block;
  max-width: var(--hero-max);
}

.hero-main {
  position: relative;
  max-width: var(--hero-max);
}

.hero-text {
  text-align: left;
}

.hero-name {
  font-size: var(--fs-display-md);
  line-height: var(--lh-display);
  font-weight: var(--weight-regular);
  letter-spacing: var(--tracking-tighter);
  margin: 0 0 var(--space-2) 0;
  color: var(--text);
}

.text-meta {
  letter-spacing: var(--tracking-caps);
}

.loading-dots {
  display: inline-flex;
  gap: 3px;
  margin-left: 6px;
  vertical-align: middle;
}

.loading-dots span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.4;
  animation: rs-dot-pulse 1.2s infinite ease-in-out;
}

.loading-dots span:nth-child(2) {
  animation-delay: 0.15s;
}

.loading-dots span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes rs-dot-pulse {

  0%,
  80%,
  100% {
    opacity: 0.3;
    transform: scale(0.8);
  }

  40% {
    opacity: 1;
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .loading-dots span {
    animation: none;
    opacity: 0.6;
  }
}

.hero-headline-line {
  font-size: var(--fs-display-lg);
  line-height: var(--lh-display);
  font-weight: var(--weight-regular);
  letter-spacing: var(--tracking-tightest);
  margin-top: var(--space-1);
  margin-bottom: var(--space-3);
  color: var(--text);
  text-wrap: balance;
}

.hero-description {
  font-size: var(--fs-md);
  line-height: var(--lh-md);
  font-weight: var(--weight-regular);
  letter-spacing: var(--tracking-snug);
  color: var(--text);
  margin-bottom: var(--space-5);
  max-width: min(72ch, 100%);
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
  margin-top: var(--space-4);
  margin-bottom: var(--space-4);
}

@media (max-width: 480px) {
  :root {
    --fs-body: 15px;
    --fs-sm: 13px;
    --fs-md: 18px;
    --fs-lg: 22px;
  }

  .hero-cta-row {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-3);
  }

  .section-title {
    font-size: 1.5rem;
  }

  .metric {
    font-size: 20px;
  }
}

.hero-cta-project {
  font-size: var(--fs-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-loose);
  text-transform: none;
  text-align: center;
}

/* Hero metrics container */
.hero-metrics {
  display: flex;
  gap: var(--space-7);
  margin-top: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-lg);
  border: 1px solid var(--surface-dark-border);
  /* Solid bg — no backdrop-filter over a live WebGL canvas (causes per-frame flicker) */
  background: linear-gradient(180deg, var(--surface-dark-edge), var(--surface-dark));
  box-shadow: 0 1px 2px rgb(var(--rgb-outline) / 0.18);
  max-width: min(640px, 100%);
  align-items: flex-start;
  justify-content: space-between;
  margin-left: 0;
  margin-right: 0;
  /* GPU compositing layer — prevents repaint interaction with canvas below */
  will-change: transform;
  transform: translateZ(0);
}

.hero-metric,
.leadership-metric {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 0;
}



/* Big outcome numbers / key metrics */
.metric {
  font-variant-numeric: tabular-nums;
  font-size: var(--fs-display-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-tight);
  line-height: var(--lh-display);
  display: inline-block;
}

.metric-label {
  font-size: var(--fs-sm);
  line-height: var(--lh-xs);
  font-weight: var(--weight-regular);
  color: var(--text);
}

/* Accent usage */
.metric-highlight {
  color: var(--text);
  font-weight: var(--weight-semibold);
}

@media (max-width: 768px) {
  .hero-metrics {
    flex-direction: column;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-4);
    max-width: 100%;
  }
}

/* -------------------------------------------------------
   Leadership & About
--------------------------------------------------------*/
.leadership-section {
  color: var(--text);
}

.builder-section {
  background: var(--gray-200);
  color: var(--text);
}

.about-section {
  background: var(--gray-300);
  color: var(--text);
  padding-bottom: var(--space-section-lg);
}

/* Wrapper behaves like a container */
.leadership-wrapper {
  padding-inline: var(--page-margin, var(--page-gutter));
  display: flex;
  align-items: flex-start;
  gap: var(--space-7);
}

.page-about .about-content {
  max-width: 76rem;
  margin-inline: auto;
}

/* Prose rhythm inside leadership columns */
.leadership-prose {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.leadership-prose aside p {
  font-size: var(--fs-body);
  line-height: var(--lh-prose);
  letter-spacing: var(--tracking-normal);
  color: var(--text);
  max-width: var(--prose);
  margin: 0;
  text-wrap: pretty;
}

/* About page ink-reveal aside line spacing */
.page-about [data-ink-reveal] .ink-reveal-line,
.page-about [data-ink-reveal] .ink-reveal-svg {
  display: block;
  width: 100%;
  margin-bottom: clamp(8px, 0.65rem, 12px);
}

.page-about [data-ink-reveal] p {
  margin: 0;
}

/* About page section layout: intro + metrics above, timeline full-width below */
.page-about .leadership-wrapper {
  flex-wrap: wrap;
  row-gap: var(--space-7);
}

.page-about .leadership-left {
  flex: 1 1 min(58%, 42rem);
}

.page-about .leadership-right {
  flex: 1 1 min(38%, 32rem);
}

/* Timelines become their own full-width row */
.page-about .leadership-timeline,
.page-about .mentorship-timeline {
  flex: 0 0 100%;
  width: 100%;
  margin-top: clamp(var(--space-5), 4vw, var(--space-7));
  position: relative;
}

.page-about .timeline-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: clamp(var(--space-6), 7vw, var(--space-10));
  row-gap: var(--space-6);
  position: relative;
  align-items: flex-start;
  width: 100%;
}

.page-about .timeline-content {
  max-width: 34ch;
}

.page-about .timeline-content strong {
  font-size: clamp(var(--fs-control), 1.35vw, var(--fs-md));
  line-height: var(--lh-md);
}

.page-about .timeline-content p {
  max-width: 30ch;
  font-size: clamp(var(--fs-sm), 1.1vw, var(--fs-body));
  line-height: var(--lh-body);
}

/* Timeline — vertical rail (matches reference layout) */
.timeline-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: row;
  gap: var(--space-8);
  position: relative;
  align-items: flex-start;
}

.timeline-list::before {
  content: '';
  position: absolute;
  top: calc((var(--dot-size) - var(--line-thickness)) / 2);
  left: 0;
  right: 0;
  height: var(--line-thickness);
  background: linear-gradient(90deg,
      var(--surface-2) 0%,
      var(--accent) 50%,
      var(--surface-2) 100%);
  opacity: var(--line-opacity, 0.6);
  z-index: 0;
}

.timeline-item {
  position: relative;
  padding-top: 0;
  padding-left: 0;
  padding-bottom: 0;
  min-width: 0;
}

.timeline-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: var(--dot-size);
  height: var(--dot-size);
  box-sizing: border-box;
  border-radius: 50%;
  background: var(--surface-1);
  border: var(--border-w-strong) solid var(--border);
  z-index: 1;
  animation: dot-pulse 3s ease-in-out infinite;
}

.timeline-item--current::before {
  animation: dot-pulse 2s ease-in-out infinite;
}

@keyframes dot-pulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(79, 110, 247, 0.4);
  }

  50% {
    box-shadow: 0 0 0 6px rgba(79, 110, 247, 0);
  }
}

.timeline-date {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: var(--weight-regular);
  color: var(--text-secondary);
  margin-top: calc(var(--space-6) + var(--dot-size));
  letter-spacing: var(--tracking-loose);
  line-height: var(--lh-2xs);
  text-transform: uppercase;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item.timeline-item--current::before {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.timeline-item.timeline-item--current .timeline-date {
  font-weight: var(--weight-semibold);
}

.timeline-content strong {
  display: block;
  color: var(--text);
  font-size: var(--fs-control);
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-2);
  line-height: var(--lh-xs);
  letter-spacing: var(--tracking-snug);
}

.timeline-content p {
  color: var(--text);
  font-size: var(--fs-sm);
  line-height: var(--lh-xs);
  margin: 0;
}

@media (max-width: 760px) {
  .page-about .timeline-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
    padding-left: var(--space-5);
  }

  .page-about .timeline-list::before {
    top: 0;
    bottom: 0;
    left: 0;
    right: auto;
    width: var(--line-thickness);
    height: auto;
    background: linear-gradient(180deg,
        var(--surface-2) 0%,
        var(--accent) 50%,
        var(--surface-2) 100%);
  }

  .page-about .timeline-item {
    padding-left: var(--space-5);
  }

  .page-about .timeline-item::before {
    left: calc(-1 * var(--space-5));
  }

  .page-about .timeline-date {
    margin-top: 0;
  }

  .page-about .timeline-content,
  .page-about .timeline-content p {
    max-width: none;
  }
}

/* Fix: internal rhythm so text doesn't feel cramped */
.leadership-left,
.leadership-right {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  min-width: 0;
}

.leadership-left {
  flex: 0 0 55%;
  min-width: 0;
}

.leadership-right {
  flex: 0 0 42%;
  min-width: 0;
}

/* Avoid double spacing: gap handles rhythm here */
.leadership-section .section-title,
.builder-section .section-title,
.mentorship-section .section-title {
  margin-bottom: 0;
}

.leadership-lede {
  font-size: var(--fs-body);
  line-height: var(--lh-prose);
  letter-spacing: var(--tracking-normal);
  font-weight: var(--weight-regular);
  margin: 0;
  color: var(--text);
  max-width: var(--prose);
  text-wrap: pretty;
  hyphens: auto;
}

/* About-page metric kicker */
.metric-kicker {
  margin: 0;
  color: var(--text-secondary);
  text-transform: uppercase;
  /* NEW: make it clearly a label */
  letter-spacing: var(--tracking-caps-tight);
  /* NEW: label-y feel */
  font-size: var(--type-label);
}

.metric-highlight--xl {
  font-size: var(--fs-xl);
  line-height: var(--lh-xl);
  letter-spacing: var(--tracking-tight);
  font-weight: var(--weight-semibold);
}

/* Fix: make About stat cards feel intentional + prominent
   (no nested "box in box" container) */
.leadership-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5);
  align-content: start;
}

@media (max-width: 768px) {
  .leadership-metrics {
    grid-template-columns: 1fr;
  }
}

/* Stat cards */
.leadership-metric {
  position: relative;
  max-width: none;
  background: var(--card-bg-strong);
  border: none;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-card);
  transition:
    transform var(--dur-2) var(--ease-out),
    box-shadow var(--dur-2) var(--ease-out),
    border-color var(--dur-1) var(--ease-out);
}

.metric-body {
  font-size: var(--type-body);
  line-height: var(--lh-prose);
  letter-spacing: var(--tracking-normal);
  color: var(--text);
  max-width: 48ch;
  text-wrap: pretty;
}

.metric-text {
  font-size: var(--fs-md);
  font-weight: var(--weight-semibold);
  line-height: var(--lh-md);
  letter-spacing: var(--tracking-snug);
}

.leadership-metric .metric-label {
  margin: 0;
}

.leadership-metric .metric-label strong {
  display: block;
  font-size: var(--fs-sm);
  line-height: var(--lh-xs);
  letter-spacing: var(--tracking-normal);
  font-weight: var(--weight-semibold);
  color: var(--text);
}

.metric.kpis--large {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
}

.metric.kpis--large .metric-highlight,
.metric.kpis--large .metric-text {
  flex-shrink: 0;
}

/* About */
.about-content {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: var(--space-8);
  align-items: center;
}

.about-section .leadership-wrapper {
  display: block;
}

.about-section .about-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-7);
  align-items: start;
  width: 100%;
}


/* Fix: use flex rhythm instead of margins (less cramped) */
.about-text {
  max-width: 42rem;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.metric-kicker {
  letter-spacing: var(--tracking-caps-tight);
}

.about-section .section-title {
  margin: 0;
}

.about-prose {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.about-text p,
.about-lead {
  font-size: var(--fs-body);
  line-height: var(--lh-prose-loose);
  color: var(--text);
  margin: 0;
  max-width: var(--prose);
  text-wrap: pretty;
  hyphens: auto;
}

.about-connections {
  display: grid;
  gap: var(--space-5);
  margin-top: var(--space-6);
}

.about-connection {
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-5);
}

.about-connection .connection-activity {
  display: block;
  font-size: var(--fs-control);
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-3);
  line-height: var(--lh-xs);
}

.about-connection p {
  color: var(--text);
  font-size: var(--fs-sm);
  line-height: var(--lh-body);
  margin: 0;
}

.about-image {
  position: relative;
  display: block;
}

.about-image img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3/4;
  border-radius: var(--radius-lg);
}

@media (max-width: 900px) {
  .leadership-wrapper {
    flex-direction: column;
    gap: var(--space-7);
  }

  .leadership-left,
  .leadership-right {
    width: 100%;
  }
}

@media (max-width: 968px) {
  .about-content {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .about-image {
    order: -1;
  }
}

@media (max-width: 768px) {
  .about-text p {
    font-size: 16px;
  }
}



/* Optimizations for 1440px (important breakpoint) */
@media (min-width: 1440px) and (max-width: 1599px) {
  :root {
    --container-max: 90rem;
    /* 1440px */
    --hero-max: 55rem;
    /* 880px */
    --fs-body: 17px;
    --fs-md: 21px;
    --fs-lg: 25px;
    --fs-xl: 31px;
    --fs-2xl: 40px;
    --space-9: 6.5rem;
  }

  .hero-metrics {
    gap: var(--space-6);
    padding: var(--space-4) var(--space-5);
  }

  .metric {
    font-size: 30px;
  }
}

/* Optimizations for ultra-wide 1920px+ viewports */
@media (min-width: 1920px) {
  :root {
    --container-max: 100rem;
    /* 1600px */
    --hero-max: 56rem;
    /* 896px */
    --fs-body: 18px;
    --fs-md: 23px;
    --fs-lg: 27px;
    --fs-xl: 33px;
    --fs-2xl: 44px;
    --space-9: 7.5rem;
    --kpi-gap: 4rem;
  }

  .hero-metrics {
    gap: var(--space-7);
    padding: var(--space-5) var(--space-7);
    max-width: 700px;
  }

  .metric {
    font-size: 36px;
  }

  .section-title {
    margin-bottom: var(--space-7);
  }
}

/* Large screens (1600px) - enhanced */
@media (min-width: 1600px) {
  :root {
    --fs-body: 18px;
    --fs-md: 22px;
    --fs-lg: 26px;
    --fs-xl: 32px;
    --fs-2xl: 42px;
    --space-9: 7rem;
  }
}



/* -------------------------------------------------------
   Section dividers (case study)
--------------------------------------------------------*/
.section-divider {
  position: relative;
  margin-top: var(--space-7);
  margin-bottom: var(--space-5);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border);
}

.section-divider::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: var(--divider-accent-width);
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.section-divider h2 {
  margin-top: 0;
}

/* Case studies: section-divider stripped to a no-op container */
.case-study .section-divider {
  margin: 0;
  padding: 0;
  border: none;
}

.case-study .section-divider::before {
  display: none;
}

@media (max-width: 768px) {
  .section-divider {
    margin-top: var(--space-6);
    margin-bottom: var(--space-4);
    padding-top: var(--space-4);
  }
}

.research-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-6);
}

.research-grid .research-column ul {
  list-style: none;
  padding-left: 0;
  padding-inline-start: 0;
}

.research-column li {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text);
  margin-bottom: var(--space-3);
}

.research-column li:last-child {
  margin-bottom: 0;
}

.research-column li strong {
  font-weight: var(--weight-semibold);
  color: var(--text);
}

@media (max-width: 768px) {
  .research-grid {
    grid-template-columns: 1fr;
  }
}

/* -------------------------------------------------------
   Case study – base
--------------------------------------------------------*/

/* Mobile: prevent “too big” body type + keep margins efficient */
@media (max-width: 768px) {
  .case-study {
    --fs-body: 16px;
    --fs-md: 18px;
  }
}

.case-study {
  margin: 0 auto;
  padding-top: var(--space-8);
  color: var(--text);
  background: transparent;
  border: none;
  box-shadow: none;
}

/* Alternating section bands — uses ::before for full-bleed background */
.case-study .section--alt {
  position: relative;
  padding-block: var(--space-5);
}

.case-study .section--alt::before {
  content: "";
  position: absolute;
  inset: 0 calc(50% - 50vw);
  background: var(--surface-elevated);
  pointer-events: none;
  z-index: -1;
}

/* Borders (outline tone) */
.case-study section>h2:first-child,
.case-study section>h3:first-child {
  margin-top: var(--space-5);
}

.case-study section>.section-divider {
  margin-top: 0;
}

/* Label-first strong carries hierarchy */
.case-study section li>strong:first-child {
  font-weight: var(--weight-semibold);
}

/* Add breathing room when lists follow text (lists currently have no top margin) */
.case-study section p+ :where(ul, ol) {
  margin-top: var(--space-4);
}

.case-study section :where(ul, ol) {
  padding-left: calc(var(--space-6) + var(--space-1));
}

/* -------------------------------------------------------
   Case study — section lede pattern
--------------------------------------------------------*/
.case-study section>h2+p,
.case-study section>.section-divider+p {
  font-size: var(--fs-body);
  line-height: var(--lh-prose-loose);
  color: var(--text);
  max-width: var(--prose);
}

/* -------------------------------------------------------
   Case study — link treatment
--------------------------------------------------------*/
.case-study a {
  color: var(--accent-text);
  text-decoration-color: rgb(29 78 216 / 0.45);
  text-decoration-thickness: 1px;
}

.case-study a:hover {
  color: var(--accent-text-hover);
  text-decoration-color: var(--accent-text);
}

/* -------------------------------------------------------
   Long-form primitives (case studies)
--------------------------------------------------------*/
.case-study blockquote {
  margin: var(--space-6) 0;
  padding: var(--space-5) var(--space-6);
  background: var(--surface-elevated-strong);
  box-shadow: var(--shadow-card-strong);
  color: var(--text);
  max-width: var(--prose);
}

.case-study blockquote p {
  margin: 0;
  font-size: var(--fs-body);
  line-height: var(--lh-prose-loose);
}

.case-study pre {
  margin: var(--space-6) 0;
  padding: var(--space-5);
  background: var(--surface-code);
  border: none;
  border-radius: 0;
  box-shadow: var(--shadow-card);
  overflow-x: auto;
  max-width: var(--prose);
}

.callout pre {
  background: rgba(15, 23, 42, 0.08);
  box-shadow: none;
  margin-block: var(--space-3);
}

.case-study pre code {
  padding: 0;
  border: 0;
  background: transparent;
  font-size: var(--fs-sm);
  line-height: var(--lh-md);
  color: var(--text);
}

/* Tables (for comparisons, rollout plans, metrics) */
.case-study table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-6) 0;
  font-size: var(--fs-sm);
  line-height: var(--lh-body);
  max-width: var(--prose);
}

.case-study th,
.case-study td {
  padding: var(--space-3) 0.9rem;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: top;
}

.case-study th {
  text-align: left;
  font-weight: var(--weight-semibold);
  color: var(--text);
}

.case-study tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

/* -------------------------------------------------------
   Case study — responsive KPI & impact layout
--------------------------------------------------------*/
@media (max-width: 860px) {
  .tldr-meta {
    grid-template-columns: 1fr;
    row-gap: var(--space-6);
  }

  .kpis--hero {
    flex-wrap: wrap;
    justify-content: flex-start;
    text-align: left;
    gap: var(--space-6);
  }

  .case-study ul.kpis li .metric-label {
    margin-inline: 0;
    max-width: none;
  }
}

@media (max-width: 680px) {
  .case-study .impact-callout {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-5);
    padding: var(--space-5) var(--space-4);
  }

  .case-study .impact-metric {
    text-align: left;
  }
}

/* -------------------------------------------------------
   Premium hover glow (desktop only, subtle)
--------------------------------------------------------*/


@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  [data-parallax] {
    transform: none !important;
  }
}

/* Section spacing */
.case-study section {
  max-width: var(--prose);
  margin-inline: auto;
  margin-top: 0;
  scroll-margin-top: 5rem;
}

.case-study section+section {
  margin-top: var(--case-section-gap);
}

.case-study section:last-of-type {
  margin-bottom: 0;
}

/* Headings */
.case-study section h2 {
  font-size: var(--fs-article-h2);
  font-weight: var(--weight-semibold);
  line-height: 1.2;
  letter-spacing: var(--tracking-tighter);
  margin: 0 0 var(--case-h2-to-body) 0;
  color: var(--text);
  text-wrap: balance;
}

/* Scoped override for the IA challenge heading to avoid awkward balanced wrapping */
#ia-challenge .section-divider h2 {
  text-wrap: pretty;
}

.case-study section h3 {
  font-size: var(--fs-article-h3);
  font-weight: var(--weight-semibold);
  line-height: 1.35;
  letter-spacing: var(--tracking-snug);
  margin: var(--case-h3-top) 0 var(--case-h3-to-body) 0;
  color: var(--text);
}

/* Eyebrow/meta labels */
.case-study .tldr-label {
  font-size: var(--fs-xs);
  line-height: var(--lh-2xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-caps-wide);
  text-transform: uppercase;
  color: var(--text-secondary);
}

/* Body text inside case study (supporting prose) */
.case-study section p,
.case-study .impact-lede,
.case-study dl.meta dd,
.tldr-role p {
  font-size: var(--fs-body);
  line-height: var(--lh-prose);
  font-weight: var(--weight-regular);
  color: var(--text);
  max-width: var(--prose);
  text-wrap: pretty;
  hyphens: auto;
}

.case-study figcaption,
.case-study-media figcaption {
  font-size: var(--type-caption);
  line-height: var(--lh-xs);
  color: var(--text-secondary);
}

.case-study section p+p {
  margin-top: var(--space-4);
}

.case-study section ul,
.case-study section ol {
  padding-left: var(--space-6);
  margin-bottom: var(--space-6);
  max-width: var(--prose);
}

.case-study section li {
  font-size: var(--fs-body);
  font-weight: var(--weight-regular);
  line-height: var(--lh-prose);
  margin-bottom: 0.85rem;
  color: var(--text);
  max-width: var(--prose);
  text-wrap: pretty;
}

.case-study ::marker {
  color: rgb(79 110 247 / 0.88);
  font-weight: var(--weight-semibold);
}

.case-study section li>strong:first-child {
  color: var(--text);
  font-weight: var(--weight-semibold);
}

/* -------------------------------------------------------
   Shared surfaces
--------------------------------------------------------*/
.case-study .callout,
.case-study aside.callout,
.case-study aside {
  margin-block: var(--space-6);
  max-width: var(--prose);
  margin-inline: auto;
  padding: var(--space-5) var(--space-6);
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.case-study .callout h2,
.case-study aside h2,
.case-study .callout h3,
.case-study aside h3 {
  margin-top: 0;
  margin-bottom: var(--space-3);
}

.case-study .callout>*:last-child,
.case-study aside>*:last-child {
  margin-bottom: 0;
}

.callout--accent {
  background: var(--surface-elevated);
  box-shadow: var(--shadow-card-strong);
}


.callout+.callout {
  margin-top: var(--space-8);
}

.case-study .tldr {
  max-width: var(--prose);
  margin-inline: auto;
  margin-top: 0;
  margin-bottom: var(--space-5);
  padding: 0;
}

.case-study .tldr h1 {
  font-size: var(--fs-article-h1);
  font-weight: var(--weight-semibold);
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin-bottom: var(--space-5);
  color: var(--text);
  max-width: 22ch;
  text-wrap: balance;
}

.case-study .tldr .lead {
  font-size: var(--fs-article-lead);
  line-height: 1.55;
  font-weight: var(--weight-regular);
  color: var(--text);
  margin-bottom: var(--space-7);
  max-width: var(--prose);
  text-wrap: pretty;
}

.tldr-meta {
  margin-top: var(--space-7);
  margin-bottom: var(--space-6);
  padding: var(--space-6) var(--space-6);
  background: var(--surface-elevated);
  border: none;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  display: grid;
  grid-template-columns: 1fr;
  row-gap: var(--space-6);
  align-items: start;
  width: 100%;
  margin-inline: 0;
}

@media (max-width: 860px) {
  .tldr-meta {
    margin-inline: 0;
    width: 100%;
    grid-template-columns: 1fr;
    row-gap: var(--space-5);
    padding: var(--space-5);
  }
}

.tldr-role ul {
  padding-left: var(--space-4);
}

.tldr-role p {
  margin: 0;
  font-size: var(--type-body);
  max-width: var(--prose-tight);
}

.case-study ul.kpis {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tldr-kpis {
  text-align: center;
}

.tldr-kpis .tldr-label {
  text-align: left;
}

.kpis--hero {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: var(--kpi-gap);
  padding: 0;
  margin: 0;
}

.kpis--hero>li {
  flex: 0 1 auto;
  min-width: 0;
  text-align: center;
}

.kpis--hero li strong {
  display: block;
  font-size: var(--fs-display-sm);
  line-height: var(--lh-display);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-tight);
  color: var(--text);
  margin-bottom: 6px;
}

.case-study ul.kpis li .metric-label {
  display: block;
  margin: 4px 0 0 0;
  font-size: var(--kpi-label-size);
  line-height: var(--kpi-label-line-height);
  letter-spacing: var(--kpi-label-ls);
  text-transform: uppercase;
  max-width: 32ch;
  color: var(--kpi-label-color);
}

.kpis--hero li .metric:not([data-animate]) {
  font-size: var(--fs-article-h3);
  /* 20px — reads as label, not display */
  letter-spacing: -0.01em;
}

.case-study ul.kpis li small {
  display: block;
  margin-top: var(--space-1);
  font-size: var(--fs-xs);
  color: var(--kpi-note-color);
}



.case-study :where(p, blockquote, figcaption) {
  max-inline-size: var(--prose);
}


.case-study .impact-lede {
  max-width: var(--prose);
  margin-inline: auto;
}

.case-study .impact-callout {
  margin: var(--space-6) auto var(--space-5);
  padding: var(--space-6) var(--space-7);
  display: flex;
  justify-content: center;
  gap: clamp(var(--space-5), 5vw, 3.25rem);
  max-width: var(--impact-callout-max);
  background: var(--surface-elevated-strong);
  border: none;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card-strong);
}

.case-study .impact-metric {
  text-align: center;
  font-size: var(--type-body);
}

.case-study .impact-metric strong {
  display: block;
  font-size: var(--fs-display-sm);
  line-height: var(--lh-display);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-tight);
  color: var(--text);
  margin-bottom: 0.3rem;
}

.case-study .impact-metric span {
  font-size: var(--kpi-label-size);
  letter-spacing: var(--kpi-label-ls);
  line-height: var(--kpi-label-line-height);
  text-transform: uppercase;
  color: var(--kpi-label-color);
  display: block;
  margin-top: 2px;
  max-width: 32ch;
  margin-inline: auto;
}

.case-study dl.meta {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: var(--space-3) var(--space-5);
  margin: var(--space-6) 0;
  padding: var(--space-5) var(--space-6);
  background: var(--surface-elevated);
  border: none;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  max-width: var(--prose);
}


@media (max-width: 640px) {
  .case-study dl.meta {
    grid-template-columns: 1fr;
    gap: var(--space-1) var(--space-4);
    padding: var(--space-4);
  }

  .case-study dl.meta dt {
    margin-top: var(--space-2);
  }
}

.case-study dl.meta dt {
  font-weight: var(--weight-semibold);
  color: var(--text);
}

.case-study dl.meta dd {
  color: var(--text);
}

.case-study figure {
  margin: var(--space-6) 0;
  position: relative;
}

.case-study figure img,
.case-study figure video {
  width: 100%;
  height: auto;
  display: block;
  background: var(--img-matte);
  border-radius: var(--radius-lg);
}

.case-study figure img:not([src]) {
  background: linear-gradient(110deg, var(--surface-elevated) 30%, var(--surface-1) 50%, var(--surface-elevated) 70%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  min-height: 200px;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

.case-study figcaption {
  padding: var(--space-3) 0;
  color: var(--text-secondary);
}

.before-after-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin: var(--space-6) 0;
}

.before-after-grid figure {
  margin: 0;
}

.before-after-grid figure img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-lg);
  background: var(--img-matte);
}

.before-after-grid figcaption {
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  text-align: center;
  padding: var(--space-2) 0 0;
}

@media (max-width: 640px) {
  .before-after-grid {
    grid-template-columns: 1fr;
  }
}





.case-study li {
  font-size: var(--fs-body);
  line-height: var(--lh-md);
  background: transparent;
  border: none;
  box-shadow: none;
}

/* Journey cards — 3-column grid for Problems / How Might We / Solutions */
.case-study--inventory .journey-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-4);
  margin: var(--space-5) 0;
}

.case-study--inventory .journey-card {
  padding: var(--space-5);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

/* Ensure explicit full-width cards span the full grid without changing other card styles */
.case-study--inventory .journey-card.full-width {
  grid-column: 1 / -1;
  width: 100%;
  box-sizing: border-box;
}

/* Ensure the HMW block marked full-width also spans the grid */
.case-study--inventory .journey-hmw.full-width {
  grid-column: 1 / -1;
  width: 100%;
  box-sizing: border-box;
}

/* Make full-width journey cards span the full container when used */
.case-study--inventory .journey-card.full-width {
  width: 100%;
  box-sizing: border-box;
}

.case-study--inventory .journey-card h3 {
  font-size: var(--fs-md);
  font-weight: var(--weight-semibold);
  margin: 0 0 var(--space-3);
}

.case-study--inventory .journey-insights ul,
.case-study--inventory .journey-solutions ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.case-study--inventory .journey-insights li,
.case-study--inventory .journey-solutions li {
  font-size: var(--fs-sm);
  line-height: var(--lh-md);
  margin-bottom: var(--space-2);
}

.case-study--inventory .journey-insights li:last-child,
.case-study--inventory .journey-solutions li:last-child {
  margin-bottom: 0;
}

/* How Might We — pull-quote card */
.case-study--inventory .journey-hmw {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  text-align: center;
  /* Make the HMW sit visually between full-width cards with equal vertical padding */
  padding-block: var(--space-4);
  padding-inline: var(--page-gutter);
  margin-block: var(--space-4);
  max-width: var(--prose);
  margin-left: auto;
  margin-right: auto;
}

.case-study--inventory .journey-hmw p {
  font-size: var(--fs-md);
  font-style: italic;
  color: var(--text-secondary);
  line-height: var(--lh-md);
  margin: 0;
  max-width: none;
}

.case-study--inventory .journey-hmw h3 {
  margin: 0 0 var(--space-2);
  font-size: var(--fs-md);
  font-weight: var(--weight-semibold);
  text-align: center;
}

@media (max-width: 640px) {
  .case-study--inventory .journey-cards {
    grid-template-columns: 1fr;
  }
}

.case-study--inventory section ol {
  padding-left: var(--space-6);
  max-width: var(--prose);
  margin: var(--space-4) 0 var(--space-6);
}

.case-study--inventory section ol li {
  margin-bottom: var(--space-2);
  max-width: var(--prose);
  line-height: var(--lh-prose-loose);
}



.case-study--ai-coding-portfolio {
  font-size: var(--fs-body);
  line-height: var(--lh-prose-loose);
  --section-accent: var(--accent-text);
  --section-accent-soft: var(--accent-cool-soft);
}

/* AI Coding Portfolio: widen System Architecture only */
.case-study--ai-coding-portfolio #system-architecture {
  max-width: min(900px, calc(100vw - (var(--page-gutter) * 2)));
}

/* Keep heading and caption aligned to the normal case-study reading column */
.case-study--ai-coding-portfolio #system-architecture > .section-divider,
.case-study--ai-coding-portfolio #system-architecture > .caption {
  max-width: var(--prose);
  margin-inline: auto;
}

.case-study--ai-coding-portfolio .sa-funnel {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: var(--space-4);
  margin-block: var(--space-5);
}

.case-study--ai-coding-portfolio .sa-step {
  position: relative;
  min-height: 192px;
  overflow: hidden;
  padding: var(--space-3);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.64), rgba(255, 255, 255, 0.44));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.case-study--ai-coding-portfolio .sa-step-title {
  color: var(--text);
  font-size: var(--fs-md);
  line-height: 1.2;
  letter-spacing: var(--tracking-tighter);
  margin: 0;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.case-study--ai-coding-portfolio .sa-step-body {
  margin: 0;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text);
  max-width: 24ch;
}

.case-study--ai-coding-portfolio .sa-chip {
  align-self: flex-start;
  width: fit-content;
  margin-top: auto;
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-sm);
  background: rgb(79 110 247 / 0.10);
  color: var(--accent-text);
  font-size: var(--fs-xs);
  font-weight: var(--weight-semibold);
  line-height: 1.2;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
}

.case-study--ai-coding-portfolio .sa-chip--start {
  background: rgb(79 110 247 / 0.12);
  color: var(--accent-text);
}

.case-study--ai-coding-portfolio .sa-chip--end {
  background: rgb(5 150 105 / 0.12);
  color: var(--green);
}

/* Progression accent — subtle top bar on each card */
.case-study--ai-coding-portfolio .sa-step::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: rgb(79 110 247 / 0.32);
}

.case-study--ai-coding-portfolio .sa-step:nth-child(2)::before {
  background: rgb(79 110 247 / 0.42);
}

.case-study--ai-coding-portfolio .sa-step:nth-child(3)::before {
  background: rgb(79 110 247 / 0.52);
}

.case-study--ai-coding-portfolio .sa-step:nth-child(4)::before {
  background: rgb(5 150 105 / 0.48);
}

@media (max-width: 900px) {
  .case-study--ai-coding-portfolio .sa-funnel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .case-study--ai-coding-portfolio .sa-funnel {
    grid-template-columns: 1fr;
  }

  .case-study--ai-coding-portfolio .sa-step {
    min-height: auto;
  }
}

/* ── Member Portal IA Challenge ── */
.case-study--member-portal .ia-challenge-panel {
  margin-block: var(--space-5);
  padding: var(--space-5);
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  /* use the smaller spacing token so compare blocks match the smaller gap */
  gap: var(--space-3);
}

.case-study--member-portal .ia-challenge-panel__header {
  margin-bottom: 0;
}

.case-study--member-portal .ia-challenge-panel__header h3 {
  margin: 0 0 var(--space-1);
  font-size: var(--fs-body);
  line-height: var(--lh-md);
  font-weight: var(--weight-semibold);
  color: var(--text);
}

.case-study--member-portal .ia-challenge-panel__header > p {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  line-height: var(--lh-md);
  max-width: none;
  text-wrap: normal;
}

.case-study--member-portal .ia-challenge-panel [data-compare] {
  /* remove extra margin; the panel uses flex gap for consistent spacing */
  margin-bottom: 0;
}

.case-study--member-portal .ia-challenge-panel > p {
  margin-top: 0;
}

/* File + chat 2-up pairing — tall screenshot + landscape screenshot side by side */
.case-study--ai-coding-portfolio .file-chat-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 160px;
  align-items: start;
}

.case-study--ai-coding-portfolio .file-chat-pair img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

@media (max-width: 900px) {
  .case-study--ai-coding-portfolio .file-chat-pair {
    grid-template-columns: 1fr;
    column-gap: 0;
    row-gap: var(--space-5);
  }
}

/* ── Semantic status labels ── */
.status-label--done {
  color: var(--green);
}

.status-label--pending {
  color: var(--amber);
}

/* :target highlight for anchor-linked sections */
.case-study section:target {
  animation: targetFlash 2s var(--ease-out);
}

@keyframes targetFlash {
  0% {
    background-color: var(--accent-soft);
  }

  100% {
    background-color: transparent;
  }
}

/* Inline case study media (replaces carousel) */
figure.case-study-media {
  margin-block: var(--space-8);
  width: 960px;
  max-width: calc(100vw - (var(--page-gutter) * 2));
  margin-left: 50%;
  transform: translateX(-50%);
  text-align: center;
}

.case-study-media .image-splitter {
  margin-top: 0;
}

.case-study-media figcaption {
  max-width: 80%;
  margin: var(--space-3) auto var(--space-2);
  padding-inline: var(--page-gutter);
  text-align: center;
}

@media (max-width: 768px) {
  .case-study-media figcaption {
    max-width: 95%;
  }
}

/* Before/after image splitter */
.image-splitter {
  margin-top: var(--space-6);
  user-select: none;
  touch-action: pan-y;
}

.image-splitter.is-dragging {
  cursor: ew-resize;
}

.splitter-viewport {
  touch-action: pan-y;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.splitter-before,
.splitter-after {
  position: absolute;
  inset: 0;
}

.splitter-before img,
.splitter-after img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  -webkit-user-drag: none;
  user-select: none;
}

.splitter-after {
  z-index: 2;
  transition: clip-path var(--dur-2) ease;
}

.image-splitter.is-dragging .splitter-after {
  transition: none;
}

.splitter-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 3;
  width: 3px;
  background: #fff;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
  cursor: ew-resize;
  transform: translateX(-50%);
  left: 50%;
  touch-action: none;
}

.splitter-handle::before {
  content: "";
  position: absolute;
  inset: 0;
  left: -20px;
  right: -20px;
}

.splitter-handle-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  color: var(--ink-on-glass);
}

.splitter-handle-icon svg {
  width: 20px;
  height: 20px;
}

@media (prefers-reduced-motion: reduce) {
  .splitter-after {
    transition: none;
  }
}


@media (max-width: 768px) {

  .leadership-section,
  .builder-section,
  .mentorship-section,
  .about-section {
    padding-block: var(--space-8);
    padding-inline: 0;
  }
}

@media print {

  .site-header,
  .site-footer {
    display: none !important;
  }

  body {
    background: #fff !important;
    color: var(--ink-on-glass) !important;
  }
}






/* ── Interactive System Demo (AI-Coding case study) ── */
.asd-shell {
  position: relative;
  overflow: hidden;
  padding: clamp(1.25rem, 3vw, 2rem);
  margin-top: var(--space-6);
  margin-bottom: var(--space-6);
  background: var(--surface-elevated);
  border: none;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card-strong);
  color: var(--text);
}

.asd-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.045) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-mask-image: linear-gradient(to bottom, black, transparent 82%);
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}

.asd-shell>* {
  position: relative;
  z-index: 1;
}

.asd-header {
  max-width: 720px;
  margin-bottom: var(--space-5);
}

.asd-eyebrow {
  margin: 0 0 var(--space-2);
  color: var(--text-secondary);
  font-size: var(--fs-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
}

.asd-header h2 {
  margin: 0;
  font-size: var(--fs-article-h2);
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.asd-header p {
  margin: var(--space-3) 0 0;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* Prompt bar */
.asd-prompt-bar {
  display: flex;
  gap: var(--space-2);
  align-items: stretch;
  margin-bottom: var(--space-5);
}

.asd-fake-input {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 var(--space-4);
  background: rgba(255, 255, 255, 0.68);
  color: var(--text);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  font: inherit;
  outline: none;
}

.asd-fake-input:focus {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgb(79 110 247 / 0.38);
  box-shadow: var(--shadow-card), 0 0 0 4px var(--accent-soft);
}

.asd-send-btn {
  height: 48px;
  padding: 0 var(--space-4);
  border: 0;
  border-radius: var(--radius-md);
  background: var(--surface-dark-solid);
  color: var(--text-on-accent);
  box-shadow: var(--shadow-card);
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: var(--weight-semibold);
  cursor: pointer;
  transition:
    transform var(--dur-2) var(--ease-out),
    background var(--dur-2) ease,
    box-shadow var(--dur-2) ease;
}

.asd-send-btn:hover,
.asd-send-btn:focus-visible {
  transform: translateY(-1px);
  background: var(--ink-on-glass);
  box-shadow: var(--shadow-card-strong);
}

.asd-send-btn:disabled {
  cursor: wait;
  opacity: 0.65;
  transform: none;
}

.asd-caption {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: baseline;
  margin-top: var(--space-4);
  min-height: 2.5rem;
  color: var(--text-secondary);
  font-size: var(--fs-sm);
}

.asd-caption strong {
  color: var(--text);
}

@media (max-width: 640px) {
  .asd-prompt-bar {
    flex-direction: column;
  }

  .asd-send-btn {
    width: 100%;
  }
}

.asd-peek-btn {
  border: 0;
  cursor: pointer;
  font: inherit;
}

/* Stage + nodes — all use indigo accent only */
.asd-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: var(--space-3) 0;
}

.asd-node {
  position: relative;
  width: 100%;
  padding: var(--space-4);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow-card);
  border: none;
  border-radius: var(--radius-md);
  opacity: 0.65;
  transition: opacity var(--dur-3) ease, box-shadow var(--dur-3) ease;
}

.asd-node.is-active {
  opacity: 1;
  box-shadow: var(--shadow-card-strong);
}

.asd-node h3 {
  margin: 0;
  font-size: var(--fs-control);
  letter-spacing: -0.01em;
}

.asd-node p {
  margin: var(--space-2) 0 0;
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  line-height: 1.45;
}

.asd-node-top {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  align-items: center;
  margin-bottom: var(--space-2);
}

.asd-kicker {
  color: var(--text-secondary);
  font-size: var(--fs-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
}

.asd-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: var(--text-secondary);
  transition: background var(--dur-3) ease, box-shadow var(--dur-3) ease;
}

.asd-node.is-active .asd-dot {
  background: var(--accent);
  box-shadow: 0 0 16px var(--accent);
}

.asd-branch {
  display: flex;
  gap: var(--space-5);
  width: 100%;
  max-width: 600px;
  justify-content: center;
}

.asd-branch .asd-node {
  flex: 1;
  max-width: 280px;
}

.asd-flow-line {
  display: block;
  width: 2px;
  min-height: 32px;
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0.22));
  opacity: 0.6;
  position: relative;
  overflow: hidden;
  transition: opacity 0.35s ease;
}

.asd-flow-line.is-active {
  opacity: 1;
}

.asd-flow-line::after {
  content: "";
  position: absolute;
  inset: -40% 0;
  background: linear-gradient(to bottom, transparent, var(--accent), transparent);
  transform: translateY(-100%);
  transition: transform 0.6s ease;
}

.asd-flow-line.is-active::after {
  transform: translateY(100%);
  animation: asd-flow-pulse 1.2s linear infinite;
}

.asd-flow-line-h {
  width: 100%;
  max-width: 100px;
  height: 2px;
  min-height: 2px;
  background: linear-gradient(to right, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0.22));
  align-self: center;
}

.asd-flow-line-h::after {
  background: linear-gradient(to right, transparent, var(--accent), transparent);
  transform: translateX(-100%);
}

.asd-flow-line-h.is-active::after {
  transform: translateX(100%);
  animation: asd-flow-pulse-h 1.2s linear infinite;
}

@keyframes asd-flow-pulse {
  to {
    transform: translateY(100%);
  }
}

@keyframes asd-flow-pulse-h {
  to {
    transform: translateX(100%);
  }
}

.asd-peek-btn {
  margin-top: var(--space-3);
  padding: 0;
  background: transparent;
  color: var(--accent);
  font-weight: var(--weight-semibold);
  font-size: var(--fs-sm);
}

.asd-internals {
  overflow: hidden;
  margin-top: var(--space-3);
  padding-top: var(--space-3);
}

.asd-internals[hidden] {
  display: none;
}

.asd-internals li {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  padding: var(--space-1) 0;
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  font-weight: var(--weight-medium);
  list-style: none;
  transition: color var(--dur-3) ease;
}

.asd-internals li::before {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 999px;
  background: var(--text-secondary);
  flex-shrink: 0;
  transition: background var(--dur-3) ease, box-shadow var(--dur-3) ease;
}

.asd-internals li.is-active {
  color: var(--text);
}

.asd-internals li.is-active::before {
  background: var(--accent);
  box-shadow: 0 0 14px var(--accent);
}

.asd-answer-card {
  width: 100%;
  max-width: 500px;
  padding: var(--space-4);
  background: transparent;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  border-radius: var(--radius-md);
  opacity: 0.65;
  transform: translateY(8px);
  transition: opacity var(--dur-3) ease, transform var(--dur-3) ease, box-shadow var(--dur-3) ease;
}

.asd-answer-card.is-active {
  opacity: 1;
  transform: translateY(0);
  box-shadow: var(--shadow-card-strong);
}

.asd-answer-head {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  align-items: center;
  margin-bottom: var(--space-2);
  color: var(--text-secondary);
  font-size: var(--fs-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
}

.asd-answer-card p {
  margin: 0;
  color: var(--text);
  line-height: 1.5;
}

.asd-telemetry {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.asd-metric {
  padding: var(--space-3);
  background: rgba(255, 255, 255, 0.5);
  transition: background var(--dur-3) ease, box-shadow var(--dur-3) ease;
}

.asd-metric.is-active {
  background: rgba(255, 255, 255, 0.85);
  box-shadow: var(--shadow-card);
}

.asd-metric strong,
.asd-metric span {
  display: block;
}

.asd-metric strong {
  font-size: var(--fs-control);
  color: var(--text);
}

.asd-metric span {
  margin-top: 2px;
  color: var(--text-secondary);
  font-size: var(--fs-xs);
}

@media (max-width: 640px) {
  .asd-branch {
    flex-direction: column;
    align-items: center;
  }

  .asd-branch .asd-node {
    max-width: 400px;
  }

  .asd-telemetry {
    grid-template-columns: 1fr;
  }

  .asd-flow-line-h {
    width: 2px;
    min-height: 28px;
    height: 28px;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0.22));
  }

  .asd-flow-line-h::after {
    background: linear-gradient(to bottom, transparent, var(--accent), transparent);
    transform: translateY(-100%);
  }

  .asd-flow-line-h.is-active::after {
    transform: translateY(100%);
    animation: asd-flow-pulse 1.2s linear infinite;
  }
}

@media (prefers-reduced-motion: reduce) {

  .asd-flow-line.is-active::after,
  .asd-flow-line-h.is-active::after {
    animation: none;
  }

  .asd-flow-line::after {
    display: none;
  }

  .asd-flow-line.is-active {
    background: var(--accent);
    opacity: 0.4;
  }
}

/* screen-reader only helper */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 1px, 1px);
  white-space: nowrap;
  border: 0;
}

/* ============================================================================
   Feature 2: Hero Word Morph
   ============================================================================ */
.morph-word {
  position: relative;
  display: inline-block;
  perspective: 800px;
}

.morph-item {
  display: block;
  position: absolute;
  left: 0;
  top: 0;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(24px) rotateX(-28deg) scale(0.96);
  transform-origin: 50% 50% -20px;
  filter: blur(12px);
  will-change: transform, opacity, filter;
  transition:
    opacity 0.6s var(--ease-out),
    transform 0.6s var(--ease-out),
    filter 0.6s var(--ease-out);
  pointer-events: none;
}

.morph-item--active {
  opacity: 1;
  transform: translateY(0) rotateX(0deg) scale(1);
  filter: blur(0px);
  position: relative;
  /* takes space when active */
  pointer-events: auto;
}

.morph-item--exit {
  opacity: 0;
  transform: translateY(-24px) rotateX(28deg) scale(1.04);
  filter: blur(12px);
  position: absolute;
}

@media (prefers-reduced-motion: reduce) {
  .morph-item {
    transition: none;
  }
}

/* ============================================================================
   Shared interaction patterns
   ============================================================================ */
[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .45s var(--ease-out), transform .45s var(--ease-out);
  will-change: opacity, transform;
}

[data-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0);
}

.home-title[data-reveal] {
  opacity: 0;
  transform: translateX(-24px);
}

.home-title[data-reveal].is-revealed {
  opacity: 0.82;
  transform: translateX(-6px);
}

[data-progress-story] {
  position: relative;
  padding: var(--space-5) 0 var(--space-3);
  margin-top: var(--space-5);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5) var(--space-6);
}

[data-progress-story]::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--space-5) + 0.25rem);
  /* aligned to dot center */
  height: 1px;
  background: rgba(15, 23, 42, 0.12);
}

[data-progress-story] .progress-story-indicator {
  position: absolute;
  left: 0;
  top: calc(var(--space-5) + 0.25rem);
  height: 1px;
  background: var(--accent);
  width: 0%;
  transition: width .26s var(--ease-standard);
}

[data-progress-story] [data-story-step] {
  position: relative;
  flex: 1 1 200px;
  min-width: 200px;
  padding: var(--space-5) 0 0;
  /* matches rail offset */
}

[data-progress-story] .step-label {
  display: block;
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps-tight);
  font-weight: var(--weight-semibold);
}

[data-progress-story] .step-copy {
  margin-top: var(--space-2);
  color: var(--text);
}

[data-compare] {
  margin-top: var(--space-5);
  margin-bottom: var(--space-5);
}

[data-compare] .compare-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-bottom: var(--space-5);
}

[data-compare] button[data-compare-button] {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--accent);
  border-radius: var(--radius-md);
  color: var(--text);
  padding: var(--space-3) var(--space-4);
  font-weight: var(--weight-semibold);
  cursor: pointer;
  transition: background var(--dur-2) ease, color var(--dur-2) ease, transform var(--dur-2) ease, border-color var(--dur-2) ease;
}

[data-compare] button[data-compare-button]:hover {
  border-color: var(--accent-hover);
}

[data-compare] button[data-compare-button]:active {
  transform: scale(0.97);
}

[data-compare] button[data-compare-button][aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--text-on-accent);
}

/* All panels share one grid cell — they swap in the same space, no gap */
[data-compare] .compare-panels {
  display: grid;
}

[data-compare] .compare-panel {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  padding: 12px;
  padding-left: 24px;
  position: relative;
  transition: opacity var(--dur-3) var(--ease-out), visibility var(--dur-3) var(--ease-out);
}

[data-compare] .compare-panel::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  border-radius: 99px;
  background-color: transparent;
}

[data-compare] .compare-panel.is-active {
  position: relative;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

[data-compare] .compare-panel h3 {
  margin-top: 0;
  font-size: var(--fs-article-h3);
}

/* Make the compare panel body read like an emphasized answer */
[data-compare] .compare-panel p {
  font-weight: var(--weight-semibold);
  text-align: left;
}

[data-compare] .compare-panel[data-tone="bad"]::before {
  background-color: var(--red);
}

[data-compare] .compare-panel[data-tone="good"]::before {
  background-color: var(--green);
}

/* Member Portal: IA challenge — align compare panel padding with card content */
.case-study--member-portal #ia-challenge [data-compare] .compare-panel {
  /* No extra padding — keep text aligned with the card content (no indent) */
  padding: 0 !important;
}

/* Ensure only the active compare-panel contributes to layout height.
   Other panels are taken out of flow so they don't increase the container's height. */
.case-study--member-portal #ia-challenge [data-compare] .compare-panels {
  position: relative;
}

.case-study--member-portal #ia-challenge [data-compare] .compare-panel {
  position: absolute;
  inset: 0 0 auto 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.case-study--member-portal #ia-challenge [data-compare] .compare-panel.is-active {
  position: relative;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Remove the large default tab spacing for IA challenge compare blocks so both
   panels share the same, smaller gap. This prevents an empty .compare-tabs
   from adding extra vertical space. */
.case-study--member-portal #ia-challenge [data-compare] .compare-tabs {
  margin-bottom: var(--space-3) !important;
}

.case-study--member-portal #ia-challenge [data-compare] .compare-panel h3 {
  margin: 0 0 var(--space-2);
  font-size: var(--fs-article-h3);
  line-height: var(--lh-md);
}

.case-study--member-portal #ia-challenge [data-compare] .compare-panel p {
  margin: 0;
  line-height: var(--lh-prose);
}

/* ============================================================================
   Removed: data-spotlight (no longer wired to HTML)
   ============================================================================ */

/* Removed: site copy widgets. Copy actions remain only inside the AI chat assistant. */

[data-section-summary] {
  margin-top: var(--space-5);
  display: inline;
  padding: 0;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: var(--fs-sm);
  font-weight: var(--weight-regular);
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  margin-bottom: var(--space-4);
  cursor: pointer;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height var(--dur-3) ease, opacity var(--dur-3) ease;
}

.ink-reveal-wrapper {
  margin-top: var(--space-6);
}

[data-section-summary].is-open {
  max-height: 12rem;
  opacity: 1;
}

/* ============================================================================
   Feature 12: Live Design Token Playground (Phase 2)
   ============================================================================ */


/* -------------------------------------------------------
   Three.js — Hero Fluid Shader Canvas
--------------------------------------------------------*/
#hero-canvas {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

/* Keep the overlay gradient above the canvas */
.hero-overlay::before {
  z-index: 0;
}

/* -------------------------------------------------------
   Dashboard case study layout
--------------------------------------------------------*/


/* ============================================================================
   Interaction Enhancements (Progress, Reveals, 3D, Parallax)
   ============================================================================ */

/* Circular Scroll Progress */
.circular-progress-wrapper {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  width: 60px;
  height: 60px;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  background: var(--surface-1, rgba(255, 255, 255, 0.06));
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(var(--blur-sm));
  -webkit-backdrop-filter: blur(var(--blur-sm));
  display: flex;
  align-items: center;
  justify-content: center;
}

.circular-progress-wrapper.is-visible {
  opacity: 1;
}

.circular-progress-svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.circular-progress-bg {
  fill: none;
  stroke: var(--border-subtle, rgba(255, 255, 255, 0.1));
  stroke-width: 2.5;
}

.circular-progress-value {
  fill: none;
  stroke: var(--accent, #4F6EF7);
  stroke-width: 2.5;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.1s ease-out;
}

/* =========================================================
   VIEWPORT OPTIMIZATION: 1920px, 1440px, and Mobile
   Optimized for Chrome on desktop and mobile devices
   ========================================================= */

/* =====================================================
   MOBILE OPTIMIZATIONS (< 768px)
   ===================================================== */
@media (max-width: 768px) {
  :root {
    --container-max: 100%;
    --page-gutter: 1rem;
  }

  .hero-overlay {
    padding: clamp(1.5rem, 4vh, 2.5rem) 0;
  }

  .hero-overlay::before {
    background: var(--hero-overlay-gradient-mobile);
  }

  .hero-metrics {
    flex-direction: column;
    gap: var(--space-4);
    padding: var(--space-4) var(--space-5);
    max-width: 100%;
    align-items: flex-start;
  }

  .hero-metric {
    width: 100%;
  }

  .metric {
    font-size: 24px;
  }

  .section-title {
    font-size: clamp(1.5rem, 5vw, 2rem);
    margin-bottom: var(--space-5);
  }

  [data-webgl-hero],
  [data-webgl-models] {
    height: 40vh;
    min-height: 280px;
    margin-bottom: 2rem;
  }

  [data-about-overlay] {
    max-height: 85vh;
    padding: 1.5rem;
  }

  [data-about-overlay] h2 {
    font-size: 1.125rem;
  }

  .hamburger {
    left: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    --hamburger-bottom: 12px;
    z-index: 280;
  }

}

/* =====================================================
   TABLET OPTIMIZATIONS (768px - 1023px)
   ===================================================== */
@media (min-width: 768px) and (max-width: 1023px) {
  :root {
    --container-max: 100%;
    --page-gutter: 1.5rem;
  }

  .hero-metrics {
    gap: var(--space-5);
    padding: var(--space-4) var(--space-5);
    flex-wrap: wrap;
  }

}

/* =====================================================
   1440px OPTIMIZATION (Important Breakpoint)
   ===================================================== */
@media (min-width: 1400px) and (max-width: 1599px) {
  :root {
    --page-gutter: clamp(1rem, 3.5vw, 1.5rem);
  }

  .hero-inner {
    max-width: 740px;
  }

  .hero-metrics {
    gap: var(--space-6);
    padding: var(--space-4) var(--space-5);
  }

  .case-study figure img {
    max-width: 100%;
    height: auto;
  }
}

/* =====================================================
   1920px+ ULTRA-WIDE OPTIMIZATION
   ===================================================== */
@media (min-width: 1920px) {
  :root {
    --page-gutter: clamp(2rem, 4vw, 3rem);
  }

  .hero-inner {
    max-width: 850px;
  }

  .hero-metrics {
    gap: var(--space-7);
    padding: var(--space-5) var(--space-7);
    justify-content: space-between;
    align-items: center;
  }

  .hero-metric {
    flex: 0 1 auto;
  }

  .metric {
    font-size: 36px;
  }

  .section-title {
    font-size: clamp(2.5rem, 4vw, 3rem);
    margin-bottom: var(--space-8);
  }

  .case-study figure img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
  }



  /* Increase spacing for breathing room on wide screens */
  .leadership-section,
  .builder-section,
  .mentorship-section,
  .about-section {
    padding-block: var(--space-section-lg);
  }

  .section-divider {
    margin-top: var(--space-9);
    margin-bottom: var(--space-8);
  }
}



/* Global floating menu + assistant mini chat */
.hamburger {
  position: fixed;
  left: var(--space-5);
  bottom: calc(var(--space-5) + env(safe-area-inset-bottom, 0px));
  z-index: 240;
  width: 56px;
  height: 56px;
  padding: var(--space-1);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--surface-dark-solid);
  border: 1px solid var(--surface-dark-border);
  box-shadow: var(--shadow-menu);
  color: var(--text-on-accent);
  cursor: pointer;
  transition: transform 220ms var(--ease-out), background 180ms ease, box-shadow 180ms ease;
}

.hamburger:hover,
.hamburger:focus-visible {
  transform: translateY(-2px) scale(1.03);
  background: rgba(10, 10, 10, 0.94);
  box-shadow: var(--shadow-menu-hover);
}

.hamburger:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(79, 110, 247, 0.16), var(--shadow-menu-hover);
}

.hamburger-inner {
  position: relative;
  width: 22px;
  height: 2px;
  background: currentColor;
  transition: background 220ms ease;
}

.hamburger-inner::before,
.hamburger-inner::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  transition: transform 280ms ease, opacity 220ms ease;
}

.hamburger-inner::before {
  top: -7px;
}

.hamburger-inner::after {
  top: 7px;
}

.hamburger.open .hamburger-inner {
  background: transparent;
}

.hamburger.open .hamburger-inner::before {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.open .hamburger-inner::after {
  transform: translateY(-7px) rotate(-45deg);
}

.hamburger-menu {
  position: fixed;
  left: var(--space-5);
  bottom: calc(var(--hamburger-bottom, var(--space-5)) + var(--hamburger-size, 56px) + var(--space-2));
  z-index: 220;
  width: min(304px, 80vw);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  background: var(--surface-dark-glass);
  backdrop-filter: blur(var(--blur-md));
  border: 1px solid var(--surface-dark-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.24);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px) scale(0.98);
  transition: opacity 220ms var(--ease-menu), transform 220ms var(--ease-menu);
  will-change: opacity, transform;
}

.hamburger-menu.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.hamburger-menu a {
  display: block;
  color: var(--text-on-accent);
  text-decoration: none;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: var(--tracking-looser);
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity 220ms var(--ease-menu), transform 220ms var(--ease-menu), color 160ms ease, background 160ms ease;
  will-change: opacity, transform;
}

.hamburger-menu.show a {
  opacity: 1;
  transform: translateX(0);
}

.hamburger-menu a:hover {
  background: transparent;
  color: var(--accent);
  transform: translateX(2px);
}

.hamburger-menu a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  background: transparent;
  color: var(--accent);
}

.hamburger-menu a[aria-current="page"]:focus,
.hamburger-menu a[aria-current="page"]:focus-visible {
  text-decoration: none;
}

.hamburger-menu a[aria-current="page"] {
  color: var(--accent);
}

.hamburger-menu a[aria-current="page"]:hover {
  background: transparent;
}

/* Menu group — expandable submenu */
.menu-item-group {
  position: relative;
}

.menu-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  color: var(--text-on-accent);
  text-decoration: none;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: var(--tracking-looser);
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity 220ms var(--ease-menu), transform 220ms var(--ease-menu), color 160ms ease;
  will-change: opacity, transform;
}

.menu-trigger::after {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  opacity: 0.6;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 260ms var(--ease-menu), opacity 160ms ease;
  margin-left: auto;
}

.menu-item-group.is-open .menu-trigger::after {
  transform: translateY(0) rotate(-135deg);
  opacity: 0.8;
}

.hamburger-menu.show .menu-trigger {
  opacity: 1;
  transform: translateX(0);
}

.menu-trigger:hover,
.menu-trigger:focus-visible {
  color: var(--accent);
  transform: translateX(2px);
  outline: none;
}

.menu-submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 260ms var(--ease-menu);
}

.menu-item-group.is-open .menu-submenu {
  max-height: 260px;
}

.menu-submenu a {
  padding-left: calc(var(--space-4) + var(--space-5));
  font-size: 0.85rem;
  display: block;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 200ms ease-out, transform 200ms ease-out;
  letter-spacing: 0;
  line-height: 1.2;
}

.menu-item-group.is-open .menu-submenu a {
  opacity: 1;
  transform: translateY(0);
}

/* .ai-mini wrapper removed - positioning moved to individual elements */
.ai-mini-wrapper {
  position: fixed;
  right: var(--space-5);
  bottom: calc(var(--space-5) + env(safe-area-inset-bottom, 0px));
  z-index: 240;
  display: flex;
  align-items: center;
  gap: 0;
  box-sizing: border-box;
}

.ai-mini-input {
  position: relative;
  z-index: 240;
  height: 56px;
  width: min(420px, calc(100vw - 84px));
  max-width: min(420px, calc(100vw - 84px));
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(6, 12, 22, 1);
  font: inherit;
  font-size: var(--fs-sm, 14px);
  color: var(--text-on-accent);
  outline: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 3.5rem 0 1.25rem;
  transition: border-color 220ms ease, box-shadow 220ms ease, background 220ms ease;
  box-shadow: var(--shadow-menu);
  box-sizing: border-box;
  resize: none;
}

.ai-mini-input:focus {
  border-color: rgba(79, 110, 247, 0.5);
  box-shadow: var(--shadow-menu), 0 0 0 2px rgba(79, 110, 247, 0.12);
  background: rgba(6, 12, 22, 1);
  color: var(--text-on-accent);
}

.ai-mini-input::placeholder {
  color: rgba(255, 255, 255, 0.45);
  font-weight: var(--weight-regular, 400);
}

.ai-mini-send {
  position: absolute;
  right: 8px;
  z-index: 241;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--accent-hover);
  color: var(--text-on-accent);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  transition: transform 220ms ease, background 220ms ease;
}

.ai-mini-send:hover {
  transform: translateY(-1px);
  background: var(--accent-hover);
}

.ai-mini-send:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(79, 110, 247, 0.16);
}

/* Case-study floating suggestion pills above mini input */
.ai-mini-suggestions {
  position: fixed;
  right: var(--space-5);
  bottom: calc(var(--space-5) + env(safe-area-inset-bottom, 0px) + 68px);
  z-index: 239;
  width: min(420px, calc(100vw - 84px));
  max-width: min(420px, calc(100vw - 84px));
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-2);
  pointer-events: none;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 180ms var(--ease-out),
    transform 180ms var(--ease-out);
}

.ai-mini-suggestions.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.ai-mini-suggestion-pill {
  max-width: 100%;
  border: 1px solid var(--surface-dark-border);
  border-radius: var(--radius-pill);
  padding: 0.625rem 1rem;
  background: rgba(6, 12, 22, 0.82);
  color: var(--text-on-accent);
  box-shadow: var(--shadow-menu);
  font-family: inherit;
  font-size: var(--fs-sm);
  font-weight: var(--weight-medium);
  line-height: 1.2;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition:
    transform 160ms var(--ease-out),
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.ai-mini-suggestion-pill:hover,
.ai-mini-suggestion-pill:focus-visible {
  transform: translateY(-1px);
  background: rgba(15, 23, 42, 0.94);
  border-color: rgba(79, 110, 247, 0.42);
  box-shadow: var(--shadow-menu-hover);
}

.ai-mini-suggestion-pill:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(79, 110, 247, 0.16), var(--shadow-menu-hover);
}

@media (max-width: 768px) {
  .ai-mini-suggestions {
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px) + 64px);
    width: min(420px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
    gap: 0.5rem;
  }

  .ai-mini-suggestion-pill {
    max-width: min(360px, calc(100vw - 24px));
    font-size: 13px;
    padding: 0.55rem 0.8rem;
  }

  .ai-mini-suggestion-pill:nth-child(n+3) {
    display: none;
  }
}

/* =====================================================
   PRINT MEDIA OPTIMIZATION
   ===================================================== */
@media print {

  .hero-media,
  [data-webgl-hero],
  [data-webgl-models],
  [data-about-overlay],
  #hamburger,
  .hamburger-menu,
  .ai-mini-wrapper,
  .circular-progress-wrapper,
  .rs-chat-widget {
    display: none !important;
  }

  body {
    background: white;
    color: black;
    font-size: 12pt;
    line-height: 1.6;
  }

  * {
    box-shadow: none !important;
    text-shadow: none !important;
    background-image: none !important;
  }

  .container {
    max-width: 100%;
  }

  .site-main {
    padding: 0 !important;
  }

  .case-study figure {
    break-inside: avoid;
  }

  .case-study figure img,
  .case-study figure video {
    max-width: 100%;
    border: 1px solid #ddd;
  }

  pre, code {
    font-family: "SF Mono", Monaco, "Cascadia Code", monospace;
    font-size: 10pt;
    background: #f5f5f5 !important;
    color: black !important;
    border: 1px solid #ddd;
    border-radius: 4px;
  }

  a:not([href^="#"])::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: var(--text-secondary);
  }

  nav a::after {
    content: none !important;
  }

  .case-study .tldr h1,
  .case-study .tldr .lead {
    max-width: 100%;
  }

  .leadership-section,
  .about-section,
  section[id] {
    page-break-inside: avoid;
  }

  h2, h3 {
    page-break-after: avoid;
  }
}

/* Chat widget highlight class */
.rs-chat-highlight {
  box-shadow: 0 0 0 6px var(--accent-soft);
  background-color: var(--accent-soft);
  border-radius: 4px;
  transition: box-shadow var(--dur-4) ease, background-color var(--dur-4) ease;
}

/* ── Portfolio Visual Fixes Overrides ── */
.research-grid>* {
  text-align: left;
}

.what-i-got-wrong-card {
  background: linear-gradient(135deg, var(--red-soft), var(--surface-elevated) 62%);
}

[aria-label="Design approach & decisions"] [data-story-step]::before,
[aria-label="Discovery & problem framing"] [data-story-step]::before {
  content: none;
  display: none;
}

.case-study--inventory [aria-label="Decisions and trade-offs"] .section-divider:nth-of-type(2) {
  margin-top: 72px;
}
