/* ==========================================================================
   HIGH-CONTRAST MONOCHROME THEME VARIABLES
   ========================================================================== */
:root[data-theme="dark"] {
  --bg: #040404;
  --bg-subtle: #0a0a0a;
  --bg-card: #0c0c0c;
  --bg-card-hover: #121212;
  --fg: #f5f5f5;
  --fg-muted: #8e8e8e;
  --fg-subtle: #444444;
  --border: #222222;
  --border-bright: #444444;
  --accent: #ffffff;
  --accent-inverse: #000000;
  --code-bg: #080808;
  --tag-bg: #141414;
  --chart-axis: #333333;
  --chart-grid: #181818;
  --chart-line-main: #ffffff;
  --chart-line-muted: #666666;
  --chart-line-accent: #aaaaaa;
}

:root[data-theme="light"] {
  --bg: #ffffff;
  --bg-subtle: #f8f8f8;
  --bg-card: #f4f4f4;
  --bg-card-hover: #eaeaea;
  --fg: #000000;
  --fg-muted: #666666;
  --fg-subtle: #aaaaaa;
  --border: #dcdcdc;
  --border-bright: #999999;
  --accent: #000000;
  --accent-inverse: #ffffff;
  --code-bg: #f0f0f0;
  --tag-bg: #e5e5e5;
  --chart-axis: #cccccc;
  --chart-grid: #eeeeee;
  --chart-line-main: #000000;
  --chart-line-muted: #999999;
  --chart-line-accent: #555555;
}

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

html {
  scroll-behavior: smooth;
  font-size: 15px;
}

body {
  background-color: var(--bg);
  color: var(--fg);
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  -webkit-font-smoothing: antialiased;
}

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

code, pre, .mono {
  font-family: 'JetBrains Mono', monospace;
}

a {
  color: inherit;
  text-decoration: none;
}

#canvas-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  opacity: 0.45;
}

.app-container {
  position: relative;
  z-index: 2;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 4.5rem 0;
  border-bottom: 1px solid var(--border);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-bright);
  padding-bottom: 0.75rem;
}

.section-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--fg-muted);
  letter-spacing: 0.1em;
}

.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

/* ==========================================================================
   TOP NAVIGATION
   ========================================================================== */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 0;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.brand {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  flex-wrap: wrap;
}

.nav-link {
  color: var(--fg-muted);
  transition: color 0.15s;
}
.nav-link:hover {
  color: var(--fg);
}

.theme-toggle-btn {
  background: var(--bg-card);
  color: var(--fg);
  border: 1px solid var(--border-bright);
  padding: 0.35rem 0.75rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
  background: var(--fg);
  color: var(--accent-inverse);
  border-color: var(--fg);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
  padding-top: 4.5rem;
  padding-bottom: 3.5rem;
}

.hero-pretitle {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 1rem;
}

.hero-name {
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin-bottom: 1.25rem;
  text-transform: uppercase;
}

.hero-manifesto {
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  color: var(--fg);
  max-width: 820px;
  font-weight: 400;
  line-height: 1.5;
  margin-bottom: 2rem;
}

.hero-manifesto span {
  color: var(--fg-muted);
}

.metrics-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin-bottom: 2rem;
}

.metric-cell {
  background: var(--bg);
  padding: 1.1rem;
}

.metric-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.35rem;
}

.metric-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 1.15rem;
  border: 1px solid var(--border-bright);
  font-weight: 600;
  transition: all 0.18s ease;
  cursor: pointer;
}

.btn-primary {
  background: var(--fg);
  color: var(--accent-inverse);
  border-color: var(--fg);
}

.btn-primary:hover {
  background: transparent;
  color: var(--fg);
  border-color: var(--fg);
}

.btn-secondary {
  background: transparent;
  color: var(--fg);
  border-color: var(--border-bright);
}

.btn-secondary:hover {
  border-color: var(--fg);
  background: var(--bg-card-hover);
}

/* ==========================================================================
   RESEARCH & PUBLICATIONS
   ========================================================================== */
.research-card {
  border: 1px solid var(--border);
  background: var(--bg-card);
  padding: 1.85rem;
  margin-bottom: 1.75rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.research-card:hover {
  border-color: var(--fg);
  transform: translateY(-2px);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.pub-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  padding: 0.2rem 0.55rem;
  background: var(--tag-bg);
  border: 1px solid var(--border-bright);
  text-transform: uppercase;
  font-weight: 600;
}

.pub-title {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 0.5rem;
  line-height: 1.3;
}

.card-links {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.pub-desc {
  color: var(--fg-muted);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.findings-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
  font-size: 0.88rem;
}

.findings-list li {
  position: relative;
  padding-left: 1.4rem;
}

.findings-list li::before {
  content: "↳";
  position: absolute;
  left: 0;
  color: var(--fg-muted);
  font-family: 'JetBrains Mono', monospace;
}

.findings-list strong {
  color: var(--fg);
  font-weight: 600;
}

.tag-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tech-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--fg-muted);
  border: 1px solid var(--border);
  padding: 0.2rem 0.5rem;
  background: var(--bg);
}

/* ==========================================================================
   BALANCED 2X2 SYSTEMS GRID
   ========================================================================== */
.systems-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.system-card {
  border: 1px solid var(--border);
  background: var(--bg-card);
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 260px;
  transition: all 0.2s ease;
}

.system-card:hover {
  border-color: var(--fg);
  transform: translateY(-2px);
}

.sys-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.75rem;
  gap: 0.5rem;
}

.sys-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.sys-type {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--fg-muted);
  white-space: nowrap;
}

.sys-body {
  font-size: 0.88rem;
  color: var(--fg-muted);
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.sys-body strong {
  color: var(--fg);
  font-weight: 600;
}

.sys-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
  padding-top: 0.9rem;
  margin-top: auto;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.link-icon-btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--fg);
  font-weight: 600;
  border-bottom: 1px dashed var(--fg-muted);
  padding-bottom: 1px;
  transition: border 0.15s;
}

.link-icon-btn:hover {
  border-bottom-style: solid;
}

/* ==========================================================================
   EXPERIENCE TIMELINE
   ========================================================================== */
.timeline-item {
  border-left: 2px solid var(--border-bright);
  padding-left: 1.5rem;
  position: relative;
  margin-bottom: 2rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 6px;
  width: 8px;
  height: 8px;
  background: var(--fg);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
  gap: 0.5rem;
}

.role-title {
  font-size: 1.15rem;
  font-weight: 700;
}

.company-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  color: var(--fg-muted);
  margin-bottom: 0.85rem;
}

/* ==========================================================================
   INTERACTIVE TELEMETRY & GRAPH VISUALIZATION
   ========================================================================== */
.telemetry-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 1.6rem;
  overflow: visible;
}

.telemetry-tabs-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 1.5rem;
  padding: 2px 0 10px 0;
  border-bottom: 1px solid var(--border);
}

.telemetry-tabs {
  display: flex;
  gap: 0.6rem;
  min-width: max-content;
}

.tel-tab {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--fg-muted);
  padding: 0.5rem 0.95rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.tel-tab.active {
  background: var(--fg);
  color: var(--accent-inverse);
  border-color: var(--fg);
  font-weight: 700;
}

.graph-card {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 1.35rem;
}

.graph-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  font-family: 'JetBrains Mono', monospace;
}

.graph-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--fg);
}

.graph-caption {
  font-size: 0.72rem;
  color: var(--fg-muted);
}

.svg-container {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 7;
  min-height: 220px;
}

.chart-svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.chart-grid {
  stroke: var(--chart-grid);
  stroke-width: 1;
  stroke-dasharray: 2 3;
}

.chart-axis {
  stroke: var(--chart-axis);
  stroke-width: 1.2;
}

.chart-label {
  fill: var(--fg-muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
}

.stat-row-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
  margin-bottom: 1rem;
}

.stat-item {
  border: 1px solid var(--border);
  background: var(--bg);
  padding: 0.85rem;
  font-family: 'JetBrains Mono', monospace;
}

.stat-item-label {
  font-size: 0.7rem;
  color: var(--fg-muted);
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.stat-item-val {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--fg);
}

.stat-item-sub {
  font-size: 0.72rem;
  color: var(--fg-muted);
}

.log-terminal {
  background: var(--code-bg);
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  line-height: 1.55;
  color: var(--fg);
  overflow-x: auto;
}

/* ==========================================================================
   TECHNICAL STACK TABLE
   ========================================================================== */
.skills-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.skills-table {
  width: 100%;
  min-width: 500px;
  border-collapse: collapse;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
}

.skills-table tr {
  border-bottom: 1px solid var(--border);
}

.skills-table td {
  padding: 1.1rem 0.5rem;
  vertical-align: top;
}

.skills-category {
  font-weight: 700;
  color: var(--fg);
  width: 25%;
  text-transform: uppercase;
}

.skills-items {
  color: var(--fg-muted);
  width: 75%;
  line-height: 1.6;
}

.skills-items strong {
  color: var(--fg);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer {
  padding: 3.5rem 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.social-links {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.social-links a {
  color: var(--fg-muted);
  transition: color 0.15s;
}
.social-links a:hover {
  color: var(--fg);
}

/* ==========================================================================
   MODAL
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.modal-overlay.open {
  display: flex;
}

.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  width: 100%;
  max-width: 650px;
  padding: 1.75rem;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  color: var(--fg);
  cursor: pointer;
  font-size: 1.3rem;
}

.modal-pre {
  background: var(--code-bg);
  padding: 1rem;
  border: 1px solid var(--border);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--fg);
  overflow-x: auto;
  margin: 1rem 0;
  line-height: 1.5;
}

/* ==========================================================================
   MOBILE RESPONSIVE
   ========================================================================== */
@media (max-width: 768px) {
  html {
    font-size: 14px;
  }
  .app-container {
    padding: 0 1rem;
  }
  section {
    padding: 3.5rem 0;
  }
  .hero {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }
  .research-card {
    padding: 1.25rem;
  }
  .systems-grid {
    grid-template-columns: 1fr;
  }
  .system-card {
    min-height: auto;
    padding: 1.3rem;
  }
  .svg-container {
    aspect-ratio: 16 / 9;
    min-height: 240px;
  }
  .nav-links {
    gap: 0.75rem;
  }
}

/* ==========================================================================
   REACTBITS-INSPIRED EFFECTS (vanilla ports — reactbits.dev)
   ========================================================================== */

/* SpotlightCard: radial glow that follows the cursor */
.spotlight {
  position: relative;
  overflow: hidden;
  --mx: 50%;
  --my: 50%;
  --spot: rgba(255, 255, 255, 0.07);
}
:root[data-theme="light"] .spotlight { --spot: rgba(0, 0, 0, 0.06); }
.spotlight::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(420px circle at var(--mx) var(--my), var(--spot), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.spotlight:hover::before { opacity: 1; }
.spotlight > * { position: relative; }

/* ScrollReveal / AnimatedContent: fade + rise on enter */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  filter: blur(4px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1), filter 0.7s ease;
}
.reveal.in { opacity: 1; transform: none; filter: none; }

/* DecryptedText: scrambling glyphs */
.decrypt .enc { color: var(--fg-subtle); }

/* ShinyText: sweeping highlight on the pretitle */
.shiny {
  background: linear-gradient(110deg, var(--fg-muted) 40%, var(--fg) 50%, var(--fg-muted) 60%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shine 4s linear infinite;
}
@keyframes shine { from { background-position: 100% 0; } to { background-position: -150% 0; } }

/* Status dot */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--fg-muted);
  border: 1px solid var(--border);
  padding: 0.25rem 0.65rem;
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--fg);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

/* Featured (full-width) system card */
.system-card.featured { grid-column: 1 / -1; min-height: auto; }
.sys-points { list-style: none; margin-bottom: 1.25rem; font-size: 0.88rem; color: var(--fg-muted); display: flex; flex-direction: column; gap: 0.45rem; }
.sys-points li { padding-left: 1.4rem; position: relative; }
.sys-points li::before { content: "↳"; position: absolute; left: 0; color: var(--fg-subtle); }
.sys-points strong { color: var(--fg); font-weight: 600; }

.timeline-item + .timeline-item { margin-top: 2rem; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; filter: none; transition: none; }
  .shiny, .status-dot { animation: none; }
}
@media (max-width: 768px) {
  .system-card.featured { grid-column: auto; }
}

/* ==========================================================================
   ANIMATIONS, ROUND 2
   ========================================================================== */

/* Scroll progress bar */
#scrollProgress {
  position: fixed; top: 0; left: 0; height: 2px; width: 100%;
  background: var(--fg); transform-origin: 0 50%; transform: scaleX(0);
  z-index: 200; pointer-events: none;
}

/* Nav link underline sweep */
.nav-link { position: relative; }
.nav-link::after {
  content: ""; position: absolute; left: 0; bottom: -3px; height: 1px; width: 100%;
  background: var(--fg); transform: scaleX(0); transform-origin: right;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); transform-origin: left; }
.nav-link.active { color: var(--fg); }

/* Hero entrance */
.hero > * { animation: heroIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) both; }
.hero > *:nth-child(1) { animation-delay: 0.05s; }
.hero > *:nth-child(2) { animation-delay: 0.15s; }
.hero > *:nth-child(3) { animation-delay: 0.25s; }
.hero > *:nth-child(4) { animation-delay: 0.4s; }
.hero > *:nth-child(5) { animation-delay: 0.55s; }
.hero > *:nth-child(6) { animation-delay: 0.7s; }
@keyframes heroIn { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* RotatingText */
.rotator { display: inline-block; color: var(--fg); border-bottom: 1px solid var(--fg); }
.rotator .caret { display: inline-block; width: 0.5ch; animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Magnet buttons */
.btn { will-change: transform; transition: all 0.18s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1); }

/* Metric cells hover fill */
.metric-cell { position: relative; overflow: hidden; transition: color 0.3s; }
.metric-cell::after {
  content: ""; position: absolute; inset: 0; background: var(--fg);
  transform: translateY(101%); transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); z-index: 0;
}
.metric-cell > * { position: relative; z-index: 1; transition: color 0.3s; }
.metric-cell:hover::after { transform: none; }
.metric-cell:hover > * { color: var(--accent-inverse); }

/* Staggered list items inside revealed cards */
.reveal li { opacity: 0; transform: translateX(-10px); transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.in li { opacity: 1; transform: none; }
.reveal.in li:nth-child(1) { transition-delay: 0.15s; }
.reveal.in li:nth-child(2) { transition-delay: 0.25s; }
.reveal.in li:nth-child(3) { transition-delay: 0.35s; }
.reveal.in li:nth-child(4) { transition-delay: 0.45s; }

/* Tech tags pop */
.tech-tag { transition: background 0.2s, color 0.2s, transform 0.2s; }
.tech-tag:hover { background: var(--fg); color: var(--accent-inverse); transform: translateY(-2px); }

/* Section header line draw */
.section-header { position: relative; border-bottom-color: transparent; }
.section-header::after {
  content: ""; position: absolute; left: 0; bottom: -1px; height: 1px; width: 100%;
  background: var(--border-bright); transform: scaleX(0); transform-origin: left;
  transition: transform 1.1s cubic-bezier(0.16, 1, 0.3, 1);
}
.section-header.in::after { transform: scaleX(1); }

/* Chart line drawing + bar growth */
.chart-svg path[stroke]:not([stroke-dasharray]) { stroke-dasharray: var(--len) var(--len); stroke-dashoffset: var(--len); animation: draw 1.4s cubic-bezier(0.65, 0, 0.35, 1) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.chart-svg rect { transform-box: fill-box; transform-origin: bottom; animation: grow 0.9s cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes grow { from { transform: scaleY(0); } }
.chart-svg text { animation: fadeIn 0.6s ease 0.6s both; }
@keyframes fadeIn { from { opacity: 0; } }
#chart-panel .graph-card { animation: heroIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both; }

/* LogoLoop / marquee */
.marquee {
  overflow: hidden; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding: 0.9rem 0; margin-top: 2.5rem;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track { display: flex; gap: 2.5rem; width: max-content; animation: marquee 38s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span { font-family: 'JetBrains Mono', monospace; font-size: 0.8rem; color: var(--fg-muted); text-transform: uppercase; letter-spacing: 0.08em; white-space: nowrap; }
.marquee-track span::before { content: "◆"; margin-right: 2.5rem; color: var(--fg-subtle); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ClickSpark */
.spark { position: fixed; width: 2px; height: 10px; background: var(--fg); pointer-events: none; z-index: 300; transform-origin: center bottom; animation: spark 0.45s ease-out forwards; }
@keyframes spark { from { opacity: 1; translate: 0 0; } to { opacity: 0; translate: var(--dx) var(--dy); } }

@media (prefers-reduced-motion: reduce) {
  .hero > *, .marquee-track, .chart-svg path, .chart-svg rect, .chart-svg text, #chart-panel .graph-card { animation: none !important; stroke-dashoffset: 0 !important; }
  .reveal li { opacity: 1; transform: none; }
  .section-header::after { transform: scaleX(1); }
}

/* Benchmarks context */
.section-intro { color: var(--fg-muted); max-width: 820px; margin: -0.75rem 0 1.75rem; font-size: 0.95rem; }
.section-intro strong { color: var(--fg); }
.chart-context { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); margin-bottom: 1.25rem; }
.chart-context > div { background: var(--bg-card); padding: 0.9rem 1rem; }
.chart-context p { font-size: 0.85rem; color: var(--fg-muted); line-height: 1.55; margin-top: 0.35rem; }
.chart-context strong, .chart-context em { color: var(--fg); }
.ctx-label { font-family: 'JetBrains Mono', monospace; font-size: 0.68rem; letter-spacing: 0.1em; color: var(--fg); font-weight: 700; }
@media (max-width: 768px) { .chart-context { grid-template-columns: 1fr; } }
