/* Kevin Veigas — portfolio
   Tokens first; light is the base, dark is selected (not inverted) under both the OS preference and the toggle.
   Palette: a Mediterranean mood (deep green, a touch of red, near-black ink) on a near-white canvas,
   with soft impressionist "dappled light" behind the page. Text and UI pairs meet WCAG AA in both themes. */

:root {
  color-scheme: light;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;

  --bg: #ffffff;
  --bg-elev: #ffffff;
  --bg-tint: #fafaf8;
  --ink: #111311;
  --ink-2: #44473f;
  --ink-3: #626459;
  --line: #e9e7e1;
  --line-strong: #d2cec5;
  --accent: #0b7a3e;
  --accent-ink: #076232;
  --accent-wash: rgba(11, 122, 62, 0.09);
  --on-accent: #ffffff;
  --red: #c8202f;
  --red-ink: #a8182a;
  --red-wash: rgba(200, 32, 47, 0.1);

  /* A soft, painterly hairline (blended, not banded) used at the top of the page. */
  --stroke: linear-gradient(90deg, transparent 0%, var(--accent) 22%, #d6a028 50%, var(--red) 78%, transparent 100%);
  /* Hand-painted brush stroke under the hero's key word (colour baked per theme). */
  --brush: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='40' viewBox='0 0 400 40' preserveAspectRatio='none'%3E%3Cpath fill='%23c8202f' fill-opacity='.32' d='M3 22c48-9 101 3 152-4s97-11 146-6 64 6 96 3l-2 12c-41 5-87-1-131 3s-104 7-154 4-79-1-106 1z'/%3E%3Cpath d='M12 31c60-4 118 1 178-2s120-6 200-1' fill='none' stroke='%23c8202f' stroke-opacity='.22' stroke-width='3'/%3E%3C/svg%3E");

  /* Blended background washes in the flag-inspired colours (decorative, behind all content):
     green and red glows that melt into the white, plus a faint charcoal haze. */
  --wash-green: rgba(11, 122, 62, 0.18);
  --wash-red: rgba(206, 43, 55, 0.14);
  --wash-green-2: rgba(11, 122, 62, 0.12);
  --wash-red-2: rgba(206, 43, 55, 0.1);
  --wash-ink: rgba(17, 19, 17, 0.05);
  --grain-opacity: 0.05;
  --grain-filter: none;

  /* Chart series: green vs. cornflower blue, both ≥ 4.5:1 on --bg and --bg-elev. */
  --series-a: #0b7a3e;
  --series-b: #4f6db8;
  --series-muted: #bdb5a5;
  --warn: #b57600;

  --hover: rgba(17, 19, 17, 0.045);
  --shadow-sm: 0 1px 2px rgba(40, 30, 10, 0.05);
  --shadow: 0 1px 2px rgba(40, 30, 10, 0.04), 0 12px 32px -16px rgba(40, 30, 10, 0.18);
  --radius: 16px;
  --radius-sm: 10px;
  --container: 1160px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 64px;
}

@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --bg: #0e1110;
    --bg-elev: #151a17;
    --bg-tint: #111614;
    --ink: #f3f1ea;
    --ink-2: #cac6ba;
    --ink-3: #9b978b;
    --line: #252b28;
    --line-strong: #3a423e;
    --accent: #2fb46a;
    --accent-ink: #72dba0;
    --accent-wash: rgba(47, 180, 106, 0.13);
    --on-accent: #05140b;
    --red: #ff5d63;
    --red-ink: #ff8d91;
    --red-wash: rgba(255, 93, 99, 0.12);
    --brush: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='40' viewBox='0 0 400 40' preserveAspectRatio='none'%3E%3Cpath fill='%23ff5d63' fill-opacity='.34' d='M3 22c48-9 101 3 152-4s97-11 146-6 64 6 96 3l-2 12c-41 5-87-1-131 3s-104 7-154 4-79-1-106 1z'/%3E%3Cpath d='M12 31c60-4 118 1 178-2s120-6 200-1' fill='none' stroke='%23ff5d63' stroke-opacity='.24' stroke-width='3'/%3E%3C/svg%3E");
    --wash-green: rgba(47, 180, 106, 0.16);
    --wash-red: rgba(255, 93, 99, 0.11);
    --wash-green-2: rgba(47, 180, 106, 0.09);
    --wash-red-2: rgba(255, 93, 99, 0.07);
    --wash-ink: rgba(0, 0, 0, 0.35);
    --grain-opacity: 0.07;
    --grain-filter: invert(1);
    --series-a: #2fb46a;
    --series-b: #8496e2;
    --series-muted: #4b524e;
    --warn: #fab219;
    --hover: rgba(255, 255, 255, 0.05);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 16px 40px -20px rgba(0, 0, 0, 0.7);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e1110;
  --bg-elev: #151a17;
  --bg-tint: #111614;
  --ink: #f3f1ea;
  --ink-2: #cac6ba;
  --ink-3: #9b978b;
  --line: #252b28;
  --line-strong: #3a423e;
  --accent: #2fb46a;
  --accent-ink: #72dba0;
  --accent-wash: rgba(47, 180, 106, 0.13);
  --on-accent: #05140b;
  --red: #ff5d63;
  --red-ink: #ff8d91;
  --red-wash: rgba(255, 93, 99, 0.12);
  --brush: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='40' viewBox='0 0 400 40' preserveAspectRatio='none'%3E%3Cpath fill='%23ff5d63' fill-opacity='.34' d='M3 22c48-9 101 3 152-4s97-11 146-6 64 6 96 3l-2 12c-41 5-87-1-131 3s-104 7-154 4-79-1-106 1z'/%3E%3Cpath d='M12 31c60-4 118 1 178-2s120-6 200-1' fill='none' stroke='%23ff5d63' stroke-opacity='.24' stroke-width='3'/%3E%3C/svg%3E");
  --wash-green: rgba(47, 180, 106, 0.16);
  --wash-red: rgba(255, 93, 99, 0.11);
  --wash-green-2: rgba(47, 180, 106, 0.09);
  --wash-red-2: rgba(255, 93, 99, 0.07);
  --wash-ink: rgba(0, 0, 0, 0.35);
  --grain-opacity: 0.07;
  --grain-filter: invert(1);
  --series-a: #2fb46a;
  --series-b: #8496e2;
  --series-muted: #4b524e;
  --warn: #fab219;
  --hover: rgba(255, 255, 255, 0.05);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 16px 40px -20px rgba(0, 0, 0, 0.7);
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

/* Impressionist canvas: soft patches of light and a faint canvas grain, fixed behind the page.
   Fixed pseudo-elements (not background-attachment) so scrolling stays smooth on phones. */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

body::before {
  background:
    radial-gradient(52vmax 36vmax at 0% 0%, var(--wash-green), transparent 70%),
    radial-gradient(46vmax 34vmax at 100% 4%, var(--wash-red), transparent 70%),
    radial-gradient(44vmax 32vmax at 100% 100%, var(--wash-green-2), transparent 70%),
    radial-gradient(40vmax 30vmax at 0% 100%, var(--wash-red-2), transparent 70%),
    radial-gradient(70vmax 34vmax at 50% 118%, var(--wash-ink), transparent 72%);
}

body::after {
  opacity: var(--grain-opacity);
  filter: var(--grain-filter);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}

[hidden] {
  display: none !important;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1, h2, h3, h4 {
  margin: 0;
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

ul, ol {
  margin: 0;
  padding: 0;
}

a {
  color: var(--accent-ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

::selection {
  background: var(--accent);
  color: var(--on-accent);
}

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
  transition: top 0.15s;
}

.skip-link:focus {
  top: 12px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

/* A small red brush dab before section labels. */
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 4px;
  margin-right: 10px;
  vertical-align: 0.2em;
  border-radius: 3px 1px 3px 1px;
  background: var(--red);
  opacity: 0.85;
}

/* Display serif for headings: an elegant, slightly soft face. */
.hero h1,
.section-head h2,
.project-title,
.dialog-head h2,
.contact h2,
.impact-grid strong {
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 60;
}

/* ---------- Buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 550;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, transform 0.15s;
}

.button:active {
  transform: translateY(1px);
}

.button-primary {
  background: var(--ink);
  color: var(--bg);
}

.button-primary:hover {
  background: var(--accent);
  color: var(--on-accent);
}

.button-ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}

.button-ghost:hover {
  border-color: var(--ink);
  background: var(--hover);
}

.button-lg {
  min-height: 52px;
  padding: 14px 24px;
  font-size: 1rem;
}

.ext {
  font-size: 0.85em;
  opacity: 0.7;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}

.icon-button:hover {
  background: var(--hover);
  border-color: var(--line);
}

.icon-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chip-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink-2);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
}

.chip-button:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}

.chip-button svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chip-button .i-play {
  display: none;
}

.chip-button[aria-pressed="true"] .i-play {
  display: block;
}

.chip-button[aria-pressed="true"] .i-pause {
  display: none;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 0.75rem;
  font-weight: 500;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
}

/* A soft painterly hairline along the top of the page. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: var(--stroke);
  opacity: 0.75;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.site-nav {
  margin-left: auto;
}

.site-nav ul {
  display: flex;
  gap: 4px;
  list-style: none;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s, background-color 0.15s;
}

.site-nav a:hover {
  color: var(--ink);
  background: var(--hover);
}

.site-nav a[aria-current="true"] {
  color: var(--ink);
  background: var(--hover);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

[data-theme-toggle] .icon-moon,
[data-theme-toggle][data-mode="dark"] .icon-sun {
  display: none;
}

[data-theme-toggle][data-mode="dark"] .icon-moon {
  display: block;
}

.menu-button {
  display: none;
}

@media (max-width: 760px) {
  .menu-button {
    display: inline-grid;
  }

  .site-nav {
    margin-left: auto;
  }

  .site-nav ul {
    position: absolute;
    top: calc(var(--header-h) - 4px);
    right: var(--gutter);
    left: var(--gutter);
    flex-direction: column;
    gap: 2px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-elev);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.18s, transform 0.18s, visibility 0.18s;
  }

  .site-nav ul.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .site-nav a {
    width: 100%;
    min-height: 44px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
  }

  .header-actions {
    margin-left: 0;
  }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding-block: clamp(40px, 7vw, 96px) clamp(48px, 7vw, 88px);
  isolation: isolate;
  overflow-x: clip;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -64px 0 0;
  z-index: -1;
  background-image: radial-gradient(circle at 1px 1px, var(--line-strong) 1px, transparent 0);
  background-size: 22px 22px;
  mask-image: radial-gradient(ellipse 70% 60% at 70% 30%, #000 10%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 70% 30%, #000 10%, transparent 75%);
  opacity: 0.55;
}

.hero::after {
  content: "";
  position: absolute;
  top: -10%;
  right: -10%;
  z-index: -1;
  width: 60vw;
  height: 60vw;
  max-width: 820px;
  max-height: 820px;
  background: radial-gradient(closest-side, var(--accent-wash), transparent);
  filter: blur(10px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.hero-copy .eyebrow {
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(2.5rem, 5.6vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  font-weight: 650;
}

.hero h1 em {
  position: relative;
  z-index: 0;
  font-style: normal;
  color: var(--accent-ink);
}

/* A loose, hand-painted red brush stroke under "measured". */
.hero h1 em::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: -3%;
  right: -2%;
  bottom: 0.02em;
  height: 0.36em;
  background: var(--brush) center / 100% 100% no-repeat;
}

.lede {
  margin-top: 24px;
  max-width: 34em;
  font-size: clamp(1.0625rem, 1.4vw, 1.1875rem);
  line-height: 1.6;
  color: var(--ink-2);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.availability {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  color: var(--ink-3);
  font-size: 0.875rem;
}

.pulse {
  position: relative;
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.pulse::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
  from { transform: scale(0.6); opacity: 0.9; }
  to { transform: scale(1.8); opacity: 0; }
}

/* Simulation card */

.sim-card {
  margin: 0;
  padding: 20px 20px 18px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  background: var(--bg-elev);
  box-shadow: var(--shadow);
}

.sim-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.sim-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.sim-kicker::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

[data-paused="true"] .sim-kicker::before {
  background: var(--line-strong);
}

.sim-title {
  margin-top: 4px;
  font-size: 1.125rem;
  letter-spacing: -0.015em;
}

.sim-stage {
  position: relative;
  margin-top: 8px;
}

.sim-stage canvas {
  display: block;
  width: 100%;
  aspect-ratio: 1.42;
  touch-action: pan-y;
}

.sim-tooltip,
.chart-tooltip {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  display: grid;
  gap: 2px;
  max-width: 280px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
  box-shadow: var(--shadow);
  color: var(--ink-2);
  font-size: 0.75rem;
  line-height: 1.45;
  pointer-events: none;
}

.sim-tooltip[hidden],
.chart-tooltip[hidden] {
  display: none;
}

.sim-tooltip strong,
.chart-tooltip strong {
  color: var(--ink);
  font-weight: 600;
}

.sim-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  margin: 12px 0 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--line);
  overflow: hidden;
}

.sim-stats div {
  padding: 8px 10px;
  background: var(--bg-elev);
}

.sim-stats dt {
  color: var(--ink-3);
  font-size: 0.6875rem;
  line-height: 1.3;
}

.sim-stats dd {
  margin: 2px 0 0;
  font-size: 1rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.sim-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 12px;
  list-style: none;
  color: var(--ink-3);
  font-size: 0.75rem;
}

.sim-legend li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lg-dot {
  display: inline-grid;
  place-items: center;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.lg-agree { background: var(--series-a); width: 7px; height: 7px; }
.lg-dissent { border: 1.5px solid var(--ink-3); width: 7px; height: 7px; }
.lg-settled { background: var(--series-a); width: 12px; height: 12px; }
.lg-expert {
  width: 12px;
  height: 12px;
  border: 1.5px solid var(--warn);
  color: var(--warn);
  font-size: 0.5625rem;
  font-weight: 700;
  font-family: var(--font-mono);
}

.sim-card figcaption {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 0.8125rem;
  line-height: 1.55;
}

/* ---------- Impact ---------- */

.impact {
  padding-block: 8px 24px;
}

.impact-grid {
  display: grid;
  /* Equal columns, but never narrower than a figure (figures do not wrap). */
  grid-template-columns: repeat(6, minmax(min-content, 1fr));
  list-style: none;
  border-block: 1px solid var(--line);
}

.impact-grid li {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 24px 20px 24px 0;
}

.impact-grid li + li {
  padding-left: 20px;
  border-left: 1px solid var(--line);
}

.impact-grid strong {
  font-size: clamp(1.375rem, 2vw, 1.875rem);
  white-space: nowrap;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.impact-grid span {
  color: var(--ink-2);
  font-size: 0.8125rem;
  line-height: 1.45;
}

.impact-note {
  margin-top: 12px;
  color: var(--ink-3);
  font-size: 0.8125rem;
}

/* ---------- Sections ---------- */

.section {
  padding-block: clamp(72px, 10vw, 128px);
}

.section-tint {
  /* Translucent so the blended background washes carry through every section. */
  background: color-mix(in srgb, var(--bg-tint) 55%, transparent);
  border-block: 1px solid var(--line);
}

.section-head {
  max-width: 760px;
  margin-bottom: clamp(36px, 5vw, 56px);
}

.section-head h2 {
  margin-top: 12px;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.035em;
}

.section-intro {
  margin-top: 16px;
  max-width: 40em;
  color: var(--ink-2);
  font-size: 1.0625rem;
}

/* ---------- Projects ---------- */

.project {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
  padding-block: clamp(40px, 6vw, 72px);
  border-top: 1px solid var(--line);
}

.project:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.project-index {
  margin-right: 4px;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--red-ink);
}

.project-title {
  margin-top: 18px;
  font-size: clamp(2.25rem, 4vw, 3.25rem);
  letter-spacing: -0.04em;
}

.project-tagline {
  margin-top: 10px;
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--ink);
}

.project-body {
  margin-top: 16px;
  color: var(--ink-2);
}

.project-stats {
  display: grid;
  gap: 14px;
  margin-top: 28px;
  list-style: none;
}

.project-stats li {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: 16px;
  align-items: baseline;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.project-stats strong {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--accent-ink);
}

.project-stats span {
  color: var(--ink-2);
  font-size: 0.875rem;
  line-height: 1.5;
}

.project-stats em {
  font-style: normal;
  color: var(--ink-3);
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.flow {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 20px;
  list-style: none;
  counter-reset: flow;
}

.flow li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-2);
  font-size: 0.8125rem;
  font-weight: 500;
}

.flow li + li::before {
  content: "→";
  color: var(--ink-3);
}

.flow li.is-key {
  color: var(--accent-ink);
}

/* Evidence card */

.evidence-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  background: var(--bg-elev);
  box-shadow: var(--shadow);
}

.evidence-head {
  display: grid;
  gap: 14px;
  padding: 20px 22px 0;
}

.evidence-kicker {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: var(--bg-tint);
  border: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs [role="tab"] {
  flex: 1 0 auto;
  min-height: 36px;
  padding: 6px 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 550;
  white-space: nowrap;
  cursor: pointer;
}

.tabs [role="tab"]:hover {
  color: var(--ink);
}

.tabs [role="tab"][aria-selected="true"] {
  background: var(--bg-elev);
  color: var(--ink);
  box-shadow: var(--shadow-sm), 0 0 0 1px var(--line);
}

.evidence-panel {
  padding: 22px 22px 20px;
}

.panel-title {
  font-size: 1.1875rem;
  letter-spacing: -0.02em;
}

.panel-summary {
  margin-top: 8px;
  color: var(--ink-2);
  font-size: 0.9375rem;
  min-height: 1.6em;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-top: 18px;
}

.segmented {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.segmented legend {
  float: left;
  margin-right: 4px;
  color: var(--ink-3);
  font-size: 0.75rem;
}

.segmented label {
  position: relative;
}

.segmented input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

.segmented span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 0.8125rem;
  font-weight: 500;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.segmented input:checked + span {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--bg);
}

.segmented input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.segmented input:disabled + span {
  opacity: 0.4;
}

.segmented label:has(input:disabled) {
  cursor: not-allowed;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 16px;
  list-style: none;
  color: var(--ink-2);
  font-size: 0.8125rem;
}

.legend li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.key {
  display: inline-block;
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.key-a { background: var(--series-a); }
.key-b { background: var(--series-b); }
.key-muted { background: var(--series-muted); width: 8px; height: 8px; }

.chart-tooltip .key {
  margin-right: 6px;
  vertical-align: -1px;
}

.chart-frame {
  position: relative;
  min-height: 200px;
  margin-top: 12px;
}

.chart-frame svg {
  display: block;
  overflow: visible;
}

.chart-svg {
  font-family: var(--font-sans);
}

.chart-svg .gridline {
  stroke: var(--line);
  stroke-width: 1;
}

.chart-svg .baseline {
  stroke: var(--line-strong);
  stroke-width: 1;
}

.chart-svg .tick {
  fill: var(--ink-3);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.chart-svg .axis-title {
  fill: var(--ink-3);
  font-size: 11px;
}

.chart-svg .row-code {
  fill: var(--ink);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.chart-svg .row-name {
  fill: var(--ink-2);
  font-size: 12.5px;
}

.chart-svg .row-name-sm {
  font-size: 10.5px;
  fill: var(--ink-3);
}

.chart-svg .row-end {
  fill: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.chart-svg .row-hit {
  fill: transparent;
}

.chart-svg .chart-row {
  outline: none;
  cursor: default;
}

.chart-svg .chart-row.is-active .row-hit,
.chart-svg .chart-row:focus-visible .row-hit {
  fill: var(--hover);
}

.chart-svg .chart-row:focus-visible .row-hit {
  stroke: var(--accent);
  stroke-width: 1.5;
}

.chart-svg .link {
  stroke: var(--line-strong);
  stroke-width: 2;
  stroke-linecap: round;
}

.chart-svg .dot {
  stroke: var(--bg-elev);
  stroke-width: 2;
}

.chart-svg .dot-a { fill: var(--series-a); }
.chart-svg .dot-b { fill: var(--series-b); }
.chart-svg .dot-muted { fill: var(--series-muted); stroke-width: 1.5; }

.chart-svg .dot-world {
  fill-opacity: 0.6;
  stroke-width: 1;
}

.chart-svg .dot-mean {
  stroke-width: 2.5;
}

.chart-svg .series-line-b {
  stroke: var(--series-b);
  stroke-width: 2;
  stroke-linecap: round;
}

.chart-svg .annotation line {
  stroke: var(--ink-2);
  stroke-width: 1.25;
}

.chart-svg .arrowhead {
  fill: none;
  stroke: var(--ink-2);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-svg .annotation-text {
  fill: var(--ink-2);
  font-size: 12px;
}

.chart-svg .annotation-text.strong,
.chart-svg .annotation-text .strong {
  fill: var(--ink);
  font-weight: 600;
}

.chart-svg .badge {
  fill: var(--bg-elev);
  stroke: var(--ink-2);
  stroke-width: 1.25;
}

.chart-svg .badge-text {
  fill: var(--ink);
  font-size: 10.5px;
  font-weight: 600;
}

.chart-svg .hit-layer {
  fill: transparent;
}

.chart-svg .focus-ring {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.25;
  pointer-events: none;
}

.chart-note {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-tint);
  color: var(--ink-2);
  font-size: 0.8125rem;
}

.chart-table {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.chart-table summary,
.role details summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  color: var(--ink-2);
  font-size: 0.8125rem;
  font-weight: 550;
  cursor: pointer;
  list-style: none;
}

.chart-table summary::-webkit-details-marker,
.role details summary::-webkit-details-marker {
  display: none;
}

.chart-table summary::before,
.role details summary::before {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1;
}

.chart-table[open] summary::before,
.role details[open] summary::before {
  content: "−";
}

.chart-table summary:hover,
.role details summary:hover {
  color: var(--ink);
}

.chart-table > div {
  margin-top: 8px;
  overflow-x: auto;
}

.chart-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.chart-table th,
.chart-table td {
  padding: 7px 10px 7px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.chart-table thead th {
  color: var(--ink-3);
  font-weight: 500;
}

.chart-table tbody th {
  font-weight: 500;
}

.chart-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.chart-source {
  margin-top: 12px;
  color: var(--ink-3);
  font-size: 0.75rem;
  line-height: 1.5;
}

.chart-source a {
  color: inherit;
}

/* Screenshot */

.shot {
  grid-column: 1 / -1;
  margin: 8px 0 0;
}

.shot-frame {
  position: relative;
  padding: 28px 0 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-tint);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.shot-frame::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 14px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line-strong);
  box-shadow: 14px 0 0 var(--line-strong), 28px 0 0 var(--line-strong);
}

.shot-frame img {
  width: 100%;
  border-top: 1px solid var(--line);
}

.shot figcaption {
  margin-top: 12px;
  color: var(--ink-3);
  font-size: 0.875rem;
}

/* ---------- Approach ---------- */

.principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 32px);
  list-style: none;
}

.principles li {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
}

.principle-num {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--accent-ink);
}

.principles h3 {
  margin-top: 18px;
  font-size: 1.25rem;
}

.principles p {
  margin-top: 10px;
  color: var(--ink-2);
  font-size: 0.9375rem;
}

/* ---------- Experience ---------- */

.timeline {
  list-style: none;
}

.role {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 32px;
  padding-block: 32px;
  border-top: 1px solid var(--line);
}

.role:last-child {
  border-bottom: 1px solid var(--line);
}

.role-when {
  display: grid;
  align-content: start;
  gap: 2px;
  color: var(--ink-3);
  font-size: 0.875rem;
}

.role-when span:first-child {
  color: var(--ink);
  font-weight: 550;
  font-variant-numeric: tabular-nums;
}

.role h3 {
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.role .at {
  color: var(--ink-3);
  font-weight: 500;
}

.role-focus {
  margin-top: 4px;
  color: var(--accent-ink);
  font-size: 0.875rem;
  font-weight: 500;
}

.role-body > ul:not(.role-metrics),
.role details ul {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding-left: 18px;
  color: var(--ink-2);
  max-width: 46em;
}

.role-body > ul:not(.role-metrics) li::marker,
.role details ul li::marker {
  color: var(--line-strong);
}

.role-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  list-style: none;
}

.role-metrics li {
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent-wash);
  color: var(--ink-2);
  font-size: 0.8125rem;
}

.role-metrics strong {
  color: var(--ink);
  font-weight: 600;
}

.role details {
  margin-top: 10px;
}

/* ---------- Skills & education ---------- */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

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

.skill-group h3 {
  font-size: 1rem;
}

.skill-group ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
  list-style: none;
}

.skill-group li {
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 0.8125rem;
}

.edu-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 48px);
  margin-top: clamp(40px, 6vw, 64px);
}

.subhead {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.edu-list,
.cert-list {
  margin-top: 12px;
  list-style: none;
}

.edu-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-block: 14px;
  border-bottom: 1px solid var(--line);
}

.edu-list div {
  display: grid;
  gap: 2px;
}

.edu-list strong {
  font-weight: 600;
}

.edu-list span {
  color: var(--ink-2);
  font-size: 0.875rem;
}

.edu-list em {
  flex: none;
  color: var(--ink-3);
  font-style: normal;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

.cert-list li {
  padding-block: 10px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 0.9375rem;
}

/* ---------- Contact & footer ---------- */

.contact-inner {
  max-width: 880px;
  text-align: center;
}

.contact h2 {
  margin-top: 14px;
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  letter-spacing: -0.04em;
}

.contact .section-intro {
  margin-inline: auto;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 36px;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 28px;
  color: var(--ink-3);
  font-size: 0.875rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
}

.site-footer a {
  color: var(--ink-2);
}

/* ---------- Case-study dialogs ---------- */

dialog.case {
  width: min(960px, calc(100% - 32px));
  max-height: min(92vh, 1100px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  background: var(--bg-elev);
  color: var(--ink);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

dialog.case::backdrop {
  background: rgba(8, 10, 9, 0.55);
  backdrop-filter: blur(4px);
}

dialog.case[open] {
  animation: dialog-in 0.22s ease-out;
}

@keyframes dialog-in {
  from { opacity: 0; transform: translateY(12px) scale(0.99); }
}

html:has(dialog[open]) {
  overflow: hidden;
}

.dialog-shell {
  display: flex;
  flex-direction: column;
  max-height: min(92vh, 1100px);
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 28px 18px;
  border-bottom: 1px solid var(--line);
}

.dialog-head h2 {
  margin-top: 6px;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  letter-spacing: -0.035em;
}

.dialog-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px 28px 28px;
}

.dialog-body section {
  padding-top: 26px;
}

.dialog-body h3 {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 12px;
}

.dialog-body h3:not(:first-child) {
  margin-top: 24px;
}

.dialog-body p {
  color: var(--ink-2);
  max-width: 48em;
}

.cap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
}

.cap-grid > div {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
}

.cap-grid h4 {
  font-size: 0.9375rem;
}

.cap-grid p {
  margin-top: 6px;
  font-size: 0.875rem;
}

.check-list {
  display: grid;
  gap: 10px;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 26px;
  color: var(--ink-2);
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.55em;
  width: 12px;
  height: 7px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

.check-list strong {
  color: var(--ink);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.gallery figure {
  margin: 0;
}

.gallery img {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.gallery figcaption {
  margin-top: 8px;
  color: var(--ink-3);
  font-size: 0.8125rem;
}

.stack {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

.dialog-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px 28px;
  border-top: 1px solid var(--line);
  background: var(--bg-elev);
}

.dialog-foot .button:last-child {
  margin-left: auto;
}

/* ---------- Reveal ---------- */

.can-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.can-reveal [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

.impact-grid li:nth-child(2) { transition-delay: 40ms; }
.impact-grid li:nth-child(3) { transition-delay: 80ms; }
.impact-grid li:nth-child(4) { transition-delay: 120ms; }
.impact-grid li:nth-child(5) { transition-delay: 160ms; }
.impact-grid li:nth-child(6) { transition-delay: 200ms; }

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .impact-grid {
    grid-template-columns: repeat(3, minmax(min-content, 1fr));
  }

  .impact-grid li:nth-child(4) {
    padding-left: 0;
    border-left: 0;
  }

  .impact-grid li:nth-child(n + 4) {
    border-top: 1px solid var(--line);
  }

  .skills-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .hero-grid,
  .project {
    grid-template-columns: minmax(0, 1fr);
  }

  .principles {
    grid-template-columns: minmax(0, 1fr);
  }

  .edu-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .impact-grid {
    grid-template-columns: repeat(2, minmax(min-content, 1fr));
  }

  .impact-grid li,
  .impact-grid li + li {
    padding: 18px 12px 18px 0;
    border-left: 0;
  }

  .impact-grid li:nth-child(even) {
    padding-left: 14px;
    border-left: 1px solid var(--line);
  }

  .impact-grid li:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .sim-card {
    padding: 14px 14px 14px;
  }

  .sim-stage canvas {
    aspect-ratio: 1.12;
  }

  .sim-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .sim-stats div:nth-child(4),
  .sim-stats div:nth-child(5) {
    grid-column: span 1;
  }

  .sim-stats div:last-child {
    grid-column: span 2;
  }

  .evidence-head,
  .evidence-panel {
    padding-inline: 14px;
  }

  .tabs [role="tab"] {
    padding-inline: 10px;
  }

  .project-stats li {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .role {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .role-when {
    grid-auto-flow: column;
    justify-content: start;
    gap: 12px;
  }

  .skills-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .gallery {
    grid-template-columns: minmax(0, 1fr);
  }

  .dialog-head,
  .dialog-body,
  .dialog-foot {
    padding-inline: 18px;
  }

  dialog.case {
    width: calc(100% - 16px);
    max-height: calc(100dvh - 16px);
  }

  .dialog-shell {
    max-height: calc(100dvh - 16px);
  }

  .contact-actions .button {
    width: 100%;
  }

  .edu-list li {
    flex-direction: column;
    gap: 4px;
  }
}

@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;
  }
}

@media (forced-colors: active) {
  .chart-svg .dot,
  .key,
  .lg-dot {
    forced-color-adjust: none;
  }

  .tabs [role="tab"][aria-selected="true"],
  .segmented input:checked + span {
    border: 2px solid CanvasText;
  }
}

/* Display-serif tracking: the serif needs less negative letter-spacing than Inter did. */
.hero h1 { letter-spacing: -0.025em; font-weight: 620; }
.section-head h2,
.project-title,
.contact h2 { letter-spacing: -0.02em; font-weight: 600; }
.dialog-head h2 { letter-spacing: -0.015em; }
.impact-grid strong { letter-spacing: -0.015em; }

@media print {
  body::before,
  body::after,
  .site-header,
  .sim-card,
  .hero-actions,
  .project-links,
  .chart-frame,
  .legend,
  .controls,
  .tabs,
  dialog {
    display: none !important;
  }

  .evidence-panel[hidden] {
    display: block !important;
  }

  .chart-table > div {
    display: block !important;
  }

  body {
    background: #fff;
    color: #000;
  }
}
