@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  --primary: #7c3aed;
  --primary-soft: #9f75f0;
  --primary-10: rgba(124,58,237,0.06);
  --primary-20: rgba(124,58,237,0.12);
  --scan: #2563eb;
  --scan-soft: rgba(37,99,235,0.12);
  --bug: #dc2626;
  --bug-soft: rgba(220,38,38,0.10);
  --pass: #0d9488;
  --pass-soft: rgba(13,148,136,0.10);
  --warn: #d97706;
  --warn-soft: rgba(217,119,6,0.10);
  --gray-50: #f7f6fb;
  --gray-100: #eeecf6;
  --gray-200: #ddd8ea;
  --gray-300: #a49cbc;
  --gray-400: #766e90;
  --gray-500: #554e72;
  --gray-700: #2d2a40;
  --gray-900: #14111f;
  --white: #ffffff;
  --code-bg: #17141f;
  --code-fg: #e6e1f5;
}
[data-theme="dark"] {
  --primary: #c4b5fd;
  --primary-soft: #a78bfa;
  --primary-10: rgba(196,181,253,0.06);
  --primary-20: rgba(196,181,253,0.14);
  --scan: #60a5fa;
  --scan-soft: rgba(96,165,250,0.14);
  --bug: #f87171;
  --bug-soft: rgba(248,113,113,0.12);
  --pass: #34d399;
  --pass-soft: rgba(52,211,153,0.12);
  --warn: #fbbf24;
  --warn-soft: rgba(251,191,36,0.12);
  --gray-50: #16131d;
  --gray-100: #1d1a27;
  --gray-200: #2e2a3d;
  --gray-300: #5b5470;
  --gray-400: #938ba8;
  --gray-500: #968ead;
  --gray-700: #cfc9dc;
  --gray-900: #ece9f4;
  --white: #0b0912;
  --code-bg: #0c0a14;
  --code-fg: #e6e1f5;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Inter', -apple-system, sans-serif;
  color: var(--gray-700); background: var(--white);
  line-height: 1.6; -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== TOP NAV ===== */
.topnav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.6rem 2rem;
  background: rgba(255,255,255,0.82); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-100);
  transition: background 0.3s;
}
[data-theme="dark"] .topnav { background: rgba(11,9,18,0.82); }
.nav-back {
  font-size: 0.82rem; font-weight: 500; color: var(--gray-400);
  text-decoration: none; display: flex; align-items: center; gap: 0.4rem;
}
.nav-back:hover { color: var(--primary); text-decoration: none; }
.nav-title {
  font-size: 0.82rem; font-weight: 700; color: var(--gray-900);
  letter-spacing: -0.2px; display: flex; align-items: center; gap: 0.5rem;
}
.nav-title .pulse-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--primary);
  box-shadow: 0 0 0 0 var(--primary-20); animation: navPulse 2s infinite;
}
@keyframes navPulse {
  0% { box-shadow: 0 0 0 0 rgba(124,58,237,0.4); }
  70% { box-shadow: 0 0 0 8px rgba(124,58,237,0); }
  100% { box-shadow: 0 0 0 0 rgba(124,58,237,0); }
}
.nav-right { display: flex; align-items: center; gap: 1rem; }
.nav-links { display: flex; gap: 0.4rem; }
.nav-link {
  font-size: 0.72rem; font-weight: 500; color: var(--gray-400);
  padding: 0.3rem 0.7rem; border-radius: 6px;
  text-decoration: none; transition: all 0.15s;
}
.nav-link:hover, .nav-link.active { color: var(--primary); background: var(--primary-10); text-decoration: none; }
.theme-btn {
  font-size: 0.75rem; font-weight: 600; color: var(--primary);
  background: var(--primary-10); border: 1.5px solid var(--primary-20);
  padding: 0.3rem 0.8rem; border-radius: 20px; cursor: pointer;
  transition: all 0.3s;
}
.theme-btn:hover { opacity: 0.85; transform: scale(1.05); }

/* ===== HERO ===== */
.hero {
  min-height: 74vh; display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden; margin-top: 46px;
  background: radial-gradient(ellipse at 50% 0%, var(--primary-10) 0%, var(--white) 55%, var(--gray-50) 100%);
}
.hero-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.hero-bg svg { width: 100%; height: 100%; }
.nn-bg-edge { stroke: var(--primary); stroke-width: 1; opacity: 0.10; }
.nn-bg-edge.flow {
  stroke-dasharray: 4 8; animation: edgeFlow 3s linear infinite;
}
@keyframes edgeFlow { to { stroke-dashoffset: -24; } }
.nn-bg-node {
  fill: var(--primary); opacity: 0.25;
  animation: nodePulse 3s ease-in-out infinite;
}
@keyframes nodePulse {
  0%,100% { opacity: 0.15; r: 3; }
  50% { opacity: 0.5; r: 4.5; }
}

.hero-inner { text-align: center; position: relative; z-index: 1; max-width: 720px; padding: 2rem; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--primary); padding: 0.4rem 1rem; border-radius: 20px;
  background: var(--primary-10); border: 1px solid var(--primary-20);
  margin-bottom: 1.5rem;
}
.hero-badge .live-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--pass);
  animation: liveBlink 1.4s ease-in-out infinite;
}
@keyframes liveBlink { 0%,100% { opacity: 1; } 50% { opacity: 0.25; } }
.hero h1 {
  font-size: 3.1rem; font-weight: 900; letter-spacing: -1.5px;
  line-height: 1.1; color: var(--gray-900); margin-bottom: 1rem;
}
.hero h1 .hl {
  background: linear-gradient(135deg, var(--primary), #db2777);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
[data-theme="dark"] .hero h1 .hl {
  background: linear-gradient(135deg, #c4b5fd, #f0abfc);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-sub { font-size: 1.1rem; color: var(--gray-500); max-width: 560px; margin: 0 auto 2rem; line-height: 1.6; }
.hero-stats { display: flex; gap: 2.5rem; justify-content: center; flex-wrap: wrap; }
.hero-stat { max-width: 180px; }
.hero-stat-num { font-size: 2rem; font-weight: 800; color: var(--primary); font-family: 'IBM Plex Mono', monospace; line-height: 1.1; }
.hero-stat-num.sm { font-size: 1rem; line-height: 1.3; margin-top: 0.35rem; }
.hero-stat-label { font-size: 0.72rem; color: var(--gray-400); text-transform: uppercase; letter-spacing: 0.5px; }
.hero-scroll {
  position: absolute; bottom: 1.6rem; left: 50%; transform: translateX(-50%);
  font-size: 0.72rem; color: var(--gray-400); display: flex; flex-direction: column; align-items: center; gap: 0.3rem;
  animation: scrollPulse 2s ease-in-out infinite; z-index: 1;
}
@keyframes scrollPulse { 0%,100%{ opacity: 0.5; transform: translateX(-50%) translateY(0); } 50%{ opacity: 1; transform: translateX(-50%) translateY(4px); } }

/* ===== SHOWCASE SECTION ===== */
.showcase {
  padding: 5rem 2rem; border-bottom: 1px solid var(--gray-100);
  position: relative; overflow: hidden;
}
.showcase.alt { background: var(--gray-50); }
.showcase-inner { max-width: 960px; margin: 0 auto; }

.sc-eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.65rem; font-weight: 600; letter-spacing: 2px;
  text-transform: uppercase; color: var(--primary);
  margin-bottom: 0.5rem; display: flex; align-items: center; gap: 0.5rem;
}
.sc-eyebrow::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%;
  background: var(--primary); box-shadow: 0 0 6px var(--primary);
}
.sc-venue {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem; font-weight: 600; padding: 3px 10px;
  border-radius: 5px; background: var(--primary-10);
  color: var(--primary); display: inline-block; margin-bottom: 0.75rem;
  border: 1px solid var(--primary-20);
}
.sc-title {
  font-size: 1.6rem; font-weight: 800; letter-spacing: -0.5px;
  color: var(--gray-900); line-height: 1.25; margin-bottom: 0.5rem;
}
.sc-authors { font-size: 0.82rem; color: var(--gray-500); margin-bottom: 0.3rem; }
.sc-authors .me { color: var(--primary); font-weight: 700; }
.sc-desc { font-size: 0.88rem; color: var(--gray-500); line-height: 1.6; margin-bottom: 1.5rem; max-width: 640px; }
.sc-links { display: flex; gap: 6px; margin-bottom: 2rem; flex-wrap: wrap; }
.sc-link {
  font-size: 0.72rem; font-weight: 600; padding: 0.35rem 1rem;
  border-radius: 6px; border: 1.5px solid var(--gray-200);
  color: var(--primary); background: var(--white); text-decoration: none;
  transition: all 0.2s;
}
.sc-link:hover { border-color: var(--primary); text-decoration: none; }
[data-theme="dark"] .sc-link { background: var(--gray-100); }

/* ===== Shared: diagnostic console panel ===== */
.diag-panel {
  margin-top: 1.5rem; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--gray-200); background: var(--code-bg);
}
.diag-panel-header {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; background: rgba(255,255,255,0.03);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.5px;
  color: #b9b2cf; text-transform: uppercase;
}
.diag-dots { display: flex; gap: 5px; margin-right: 4px; }
.diag-dots span { width: 9px; height: 9px; border-radius: 50%; }
.diag-dots span:nth-child(1) { background: #f87171; }
.diag-dots span:nth-child(2) { background: #fbbf24; }
.diag-dots span:nth-child(3) { background: #34d399; }
.diag-status {
  margin-left: auto; font-size: 0.62rem; padding: 2px 8px; border-radius: 10px;
  background: rgba(96,165,250,0.15); color: #93c5fd;
}
.diag-status.done { background: rgba(52,211,153,0.15); color: #6ee7b7; }
.diag-log {
  padding: 14px; font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem; line-height: 1.9; color: var(--code-fg); min-height: 120px;
}
.diag-line { display: flex; gap: 8px; opacity: 0; transform: translateX(-6px); transition: all 0.3s; }
.diag-line.show { opacity: 1; transform: translateX(0); }
.diag-line .ts { color: #6b6486; flex-shrink: 0; }
.diag-line .tag { flex-shrink: 0; font-weight: 600; }
.diag-line .tag.scan { color: #93c5fd; }
.diag-line .tag.bug { color: #f87171; }
.diag-line .tag.ok { color: #6ee7b7; }
.diag-line .msg { color: #cfc9dc; }
.diag-progress {
  height: 6px; background: rgba(255,255,255,0.06); position: relative; overflow: hidden;
}
.diag-progress-bar {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--scan), var(--primary));
  transition: width 0.4s ease; border-radius: 0 3px 3px 0;
}

/* ===== VIS 1: DeepFD Neural Network Diagnostic ===== */
.nn-wrap {
  background: var(--gray-50); border: 1px solid var(--gray-200);
  border-radius: 12px; padding: 18px; position: relative;
}
[data-theme="dark"] .nn-wrap { background: var(--gray-100); }
.nn-diag-svg { width: 100%; height: auto; display: block; }
.nn-layer-label {
  font-family: 'IBM Plex Mono', monospace; font-size: 9px;
  fill: var(--gray-400); text-anchor: middle;
}
.nn-edge { stroke: var(--gray-300); stroke-width: 1; opacity: 0.35; transition: all 0.4s; }
.nn-edge.active { stroke: var(--scan); opacity: 0.6; }
.nn-node {
  fill: var(--white); stroke: var(--gray-300); stroke-width: 2;
  transition: fill 0.35s, stroke 0.35s, filter 0.35s;
}
[data-theme="dark"] .nn-node { fill: var(--gray-200); }
.nn-node.scanned { fill: var(--scan); stroke: var(--scan); filter: drop-shadow(0 0 6px var(--scan)); }
.nn-node.buggy {
  fill: var(--bug); stroke: var(--bug);
  animation: bugPulse 1.1s ease-in-out infinite;
}
@keyframes bugPulse {
  0%,100% { filter: drop-shadow(0 0 3px var(--bug)); }
  50% { filter: drop-shadow(0 0 12px var(--bug)); }
}
.nn-scanbar { fill: var(--primary); opacity: 0; }
.nn-scanbar.on { opacity: 0.18; }

/* ===== VIS 2: SemMT Translation Testing ===== */
.semmt-input {
  background: var(--code-bg); border-radius: 10px; padding: 14px 18px;
  font-family: 'IBM Plex Mono', monospace; font-size: 0.9rem; color: var(--code-fg);
  text-align: center; margin-bottom: 6px; border: 1px solid var(--primary-20);
  position: relative;
}
.semmt-input .lbl {
  position: absolute; top: -9px; left: 14px; font-size: 0.58rem; font-weight: 600;
  letter-spacing: 1px; text-transform: uppercase; color: var(--primary);
  background: var(--white); padding: 0 6px;
}
[data-theme="dark"] .semmt-input .lbl { background: var(--gray-50); }
.semmt-input .amb { color: #fbbf24; border-bottom: 2px dotted #fbbf24; padding-bottom: 1px; }
.semmt-fork {
  display: flex; justify-content: center; gap: 10px; margin: 6px 0;
  color: var(--gray-300); font-size: 0.7rem; font-family: 'IBM Plex Mono', monospace;
}
.semmt-paths { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 8px; }
.trans-path {
  border: 1px solid var(--gray-200); border-radius: 12px; overflow: hidden;
  background: var(--white); opacity: 0; transform: translateY(14px);
  transition: all 0.5s cubic-bezier(0.16,1,0.3,1);
}
[data-theme="dark"] .trans-path { background: var(--gray-100); }
.trans-path.show { opacity: 1; transform: translateY(0); }
.trans-path.flagged { border-color: var(--bug); box-shadow: 0 0 0 1px var(--bug), 0 0 24px var(--bug-soft); }
.trans-engine {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-bottom: 1px solid var(--gray-200);
  font-size: 0.78rem; font-weight: 700; color: var(--gray-900);
  background: var(--gray-50);
}
[data-theme="dark"] .trans-engine { background: var(--gray-200); }
.trans-engine .eng-ico {
  width: 22px; height: 22px; border-radius: 6px; display: flex;
  align-items: center; justify-content: center; font-size: 0.7rem; font-weight: 700;
  color: #fff;
}
.trans-body { padding: 12px 14px; }
.trans-round {
  font-family: 'IBM Plex Mono', monospace; font-size: 0.62rem;
  color: var(--gray-400); margin-bottom: 8px; letter-spacing: 0.5px;
}
.trans-line {
  font-size: 0.82rem; color: var(--gray-700); padding: 6px 0;
  display: flex; align-items: baseline; gap: 8px;
}
.trans-line .step { font-family: 'IBM Plex Mono', monospace; font-size: 0.6rem; color: var(--gray-300); flex-shrink: 0; width: 34px; }
.trans-line .txt .diff-ok { color: var(--pass); font-weight: 600; }
.trans-line .txt .diff-bad { color: var(--bug); font-weight: 700; background: var(--bug-soft); border-radius: 3px; padding: 0 3px; }
.sem-meter { margin-top: 10px; }
.sem-meter-top {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.66rem; font-family: 'IBM Plex Mono', monospace; margin-bottom: 4px;
  color: var(--gray-400);
}
.sem-meter-val { font-weight: 700; }
.sem-meter-track { height: 7px; border-radius: 4px; background: var(--gray-200); overflow: hidden; }
.sem-meter-fill { height: 100%; width: 0%; border-radius: 4px; transition: width 0.9s ease; }
.sem-meter-fill.good { background: var(--pass); }
.sem-meter-fill.bad { background: var(--bug); }
.trans-verdict {
  margin-top: 10px; font-size: 0.7rem; font-weight: 700;
  display: flex; align-items: center; gap: 6px; opacity: 0; transition: opacity 0.4s;
}
.trans-verdict.show { opacity: 1; }
.trans-verdict.pass { color: var(--pass); }
.trans-verdict.fail { color: var(--bug); }

/* ===== VIS 3: Coreference (Crest) ===== */
.crest-wrap { position: relative; }
.crest-toolbar {
  display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
  flex-wrap: wrap;
}
.crest-state-badge {
  font-family: 'IBM Plex Mono', monospace; font-size: 0.64rem; font-weight: 600;
  padding: 4px 12px; border-radius: 20px; letter-spacing: 0.5px;
  background: var(--primary-10); color: var(--primary); border: 1px solid var(--primary-20);
  transition: all 0.4s;
}
.crest-state-badge.mr { background: var(--warn-soft); color: var(--warn); border-color: var(--warn); }
.crest-bugcount {
  margin-left: auto; font-family: 'IBM Plex Mono', monospace; font-size: 0.64rem;
  color: var(--gray-400);
}
.crest-bugcount b { color: var(--bug); font-size: 0.9rem; }
.crest-stage {
  position: relative; background: var(--gray-50); border: 1px solid var(--gray-200);
  border-radius: 12px; padding: 44px 24px 28px;
}
[data-theme="dark"] .crest-stage { background: var(--gray-100); }
.crest-links { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.crest-link-path {
  fill: none; stroke: var(--primary); stroke-width: 2;
  stroke-dasharray: 200; stroke-dashoffset: 200;
  transition: stroke-dashoffset 0.7s ease, stroke 0.4s;
}
.crest-link-path.drawn { stroke-dashoffset: 0; }
.crest-link-path.bad { stroke: var(--bug); stroke-dasharray: 5 4; animation: badDash 0.8s linear infinite; }
@keyframes badDash { to { stroke-dashoffset: -18; } }
.crest-passage {
  position: relative; z-index: 1; font-size: 1.02rem; line-height: 2.4;
  color: var(--gray-700); text-align: center; max-width: 620px; margin: 0 auto;
}
.mention {
  display: inline-block; padding: 2px 8px; border-radius: 6px; font-weight: 600;
  position: relative; transition: all 0.4s;
}
.mention.e1 { background: rgba(124,58,237,0.12); color: var(--primary); }
.mention.e2 { background: rgba(13,148,136,0.12); color: var(--pass); }
.mention.pro { background: var(--gray-200); color: var(--gray-700); }
.mention.swapped { animation: swapFlash 0.6s ease; }
.mention.buggy { background: var(--bug-soft); color: var(--bug); box-shadow: 0 0 0 2px var(--bug); }
@keyframes swapFlash { 0% { background: var(--warn-soft); } 100% {} }
.crest-legend {
  display: flex; gap: 16px; justify-content: center; margin-top: 16px;
  font-size: 0.68rem; color: var(--gray-400); flex-wrap: wrap;
}
.crest-legend span { display: flex; align-items: center; gap: 6px; }
.crest-legend .sw { width: 12px; height: 12px; border-radius: 3px; }

/* ===== VIS 4: COMET Coverage Grid ===== */
.comet-grid-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: stretch; }
.comet-panel {
  background: var(--gray-50); border: 1px solid var(--gray-200);
  border-radius: 12px; padding: 18px; display: flex; flex-direction: column;
}
[data-theme="dark"] .comet-panel { background: var(--gray-100); }
.comet-panel-head {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px;
}
.comet-panel-title {
  font-family: 'IBM Plex Mono', monospace; font-size: 0.68rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 1px; color: var(--gray-500);
  display: flex; align-items: center; gap: 6px;
}
.comet-cov-pill {
  font-family: 'IBM Plex Mono', monospace; font-size: 0.72rem; font-weight: 700;
  color: var(--primary); background: var(--primary-10); border: 1px solid var(--primary-20);
  padding: 2px 10px; border-radius: 12px;
}
.cov-grid {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; margin: 0 auto;
  width: 100%; max-width: 300px;
}
.cov-cell {
  aspect-ratio: 1; border-radius: 6px; background: var(--gray-200);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; color: transparent; transform: scale(0.6); opacity: 0;
  transition: all 0.28s cubic-bezier(0.34,1.56,0.64,1);
}
.cov-cell.pass { background: var(--pass); color: #fff; transform: scale(1); opacity: 1; }
.cov-cell.bug {
  background: var(--bug); color: #fff; transform: scale(1); opacity: 1;
  animation: bugCellPulse 1s ease-in-out infinite;
}
@keyframes bugCellPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(220,38,38,0.5); }
  50% { box-shadow: 0 0 0 6px rgba(220,38,38,0); }
}
.cov-legend {
  display: flex; gap: 14px; justify-content: center; margin-top: 14px;
  font-size: 0.66rem; color: var(--gray-400);
}
.cov-legend span { display: flex; align-items: center; gap: 5px; }
.cov-legend .sw { width: 11px; height: 11px; border-radius: 3px; }
.cov-counter-row { display: flex; justify-content: center; gap: 32px; margin-top: 14px; }
.cov-counter-item { text-align: center; }
.cov-counter { font-family: 'IBM Plex Mono', monospace; font-size: 2rem; font-weight: 800; color: var(--pass); line-height: 1; }
.cov-counter.cov-counter-bug { color: var(--bug); }
.cov-counter-label { font-size: 0.66rem; color: var(--gray-400); text-transform: uppercase; letter-spacing: 0.5px; }

/* API bar chart */
.bar-chart { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; flex: 1; justify-content: center; }
.bar-row { display: flex; align-items: center; gap: 10px; }
.bar-label {
  font-family: 'IBM Plex Mono', monospace; font-size: 0.66rem; color: var(--gray-500);
  width: 74px; flex-shrink: 0; text-align: right;
}
.bar-track { flex: 1; height: 16px; border-radius: 8px; background: var(--gray-200); overflow: hidden; position: relative; }
.bar-fill {
  height: 100%; width: 0%; border-radius: 8px;
  background: linear-gradient(90deg, var(--primary-soft), var(--primary));
  transition: width 1.1s cubic-bezier(0.22,1,0.36,1);
}
.bar-val {
  font-family: 'IBM Plex Mono', monospace; font-size: 0.64rem; font-weight: 600;
  color: var(--gray-400); width: 34px; flex-shrink: 0;
}
.bar-note {
  font-family: 'IBM Plex Mono', monospace; font-size: 0.6rem; color: var(--gray-400);
  text-align: center; margin-top: 10px;
}

/* ===== ALL PAPERS SECTION ===== */
.papers-sec { padding: 4rem 2rem; background: var(--gray-50); }
.papers-inner { max-width: 960px; margin: 0 auto; }
.papers-sec-title {
  font-size: 1.1rem; font-weight: 700; color: var(--gray-900);
  margin-bottom: 1rem; display: flex; align-items: center; gap: 0.6rem;
}
.papers-sec-bar { width: 4px; height: 20px; border-radius: 2px; background: var(--primary); }
.mini-card {
  display: flex; gap: 12px; padding: 12px 14px;
  border-radius: 8px; background: var(--white);
  border: 1px solid transparent; margin-bottom: 6px;
  transition: all 0.2s;
}
[data-theme="dark"] .mini-card { background: var(--gray-100); }
.mini-card:hover { border-color: var(--primary-20); transform: translateX(3px); }
.mini-venue {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.62rem; font-weight: 600; color: var(--primary);
  min-width: 58px; flex-shrink: 0; padding-top: 2px;
}
.mini-title { font-size: 0.82rem; font-weight: 600; color: var(--gray-900); line-height: 1.4; }
.mini-authors { font-size: 0.72rem; color: var(--gray-500); }
.mini-authors .me { color: var(--primary); font-weight: 700; }
.mini-links { display: flex; gap: 4px; margin-top: 4px; }
.mini-link {
  font-size: 0.62rem; color: var(--primary); padding: 2px 8px;
  border-radius: 4px; background: var(--gray-50); text-decoration: none;
  border: 1px solid var(--gray-100); transition: all 0.15s;
}
[data-theme="dark"] .mini-link { background: var(--gray-200); }
.mini-link:hover { border-color: var(--primary); text-decoration: none; }

/* ===== FOOTER ===== */
.footer {
  padding: 1.5rem 2rem; border-top: 1px solid var(--gray-100);
  font-size: 0.75rem; color: var(--gray-400); text-align: center;
}

/* ===== GSAP TARGETS ===== */
.gsap-fade { opacity: 0; transform: translateY(20px); }

/* ===== TAKEAWAY + COMPACT ANIMATIONS ===== */
.sc-takeaway {
  margin-top: 1rem; padding: 0.8rem 1.2rem; border-radius: 10px;
  background: linear-gradient(135deg, var(--primary-10), var(--gray-50));
  border-left: 3px solid var(--primary);
  font-size: 0.82rem; color: var(--gray-700); line-height: 1.5;
  display: flex; align-items: flex-start; gap: 0.6rem;
  transition: transform 0.2s, box-shadow 0.2s;
}
.sc-takeaway:hover { transform: translateX(4px); box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.takeaway-icon { font-size: 1.1rem; flex-shrink: 0; }
.compact-anim {
  margin-top: 1.4rem; padding: 1.2rem; border-radius: 12px;
  background: var(--panel, var(--gray-50)); border: 1px solid var(--gray-100);
  min-height: 80px; overflow: hidden;
}
[data-theme="dark"] .compact-anim { background: var(--gray-100); }
.mini-pipe { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.mini-pipe-stage {
  padding: 0.5rem 0.9rem; border-radius: 8px; font-size: 0.74rem; font-weight: 600;
  background: var(--gray-50); border: 1px solid var(--gray-100); color: var(--gray-400);
  opacity: 0; transition: all 0.4s; cursor: default;
}
.mini-pipe-stage.on { opacity: 1; background: var(--primary-10); border-color: var(--primary-20); color: var(--primary); }
.mini-pipe-stage:hover { transform: scale(1.05); }
.mini-pipe-sep { color: var(--gray-300); font-weight: 700; opacity: 0; transition: opacity 0.3s; }
.mini-pipe-sep.on { opacity: 1; }
.mini-stat { margin-top: 0.8rem; font-family: 'IBM Plex Mono', monospace; font-size: 1.2rem; font-weight: 700; color: var(--primary); opacity: 0; transition: opacity 0.5s; }
.mini-stat.on { opacity: 1; }
.mini-badge { display: inline-block; padding: 0.3rem 0.7rem; border-radius: 6px; font-size: 0.7rem; font-weight: 700; opacity: 0; transition: all 0.4s; margin-top: 0.5rem; }
.mini-badge.on { opacity: 1; }
.mini-badge.bug { background: rgba(220,38,38,0.08); color: var(--bug); border: 1px solid rgba(220,38,38,0.2); }
.lib-boxes { display: grid; grid-template-columns: 1fr auto 1fr; gap: 0.8rem; align-items: center; margin-bottom: 1rem; }
.lib-box {
  padding: 0.7rem 1rem; border-radius: 8px; text-align: center; font-size: 0.78rem; font-weight: 700;
  background: var(--gray-50); border: 1px solid var(--gray-100); color: var(--gray-500);
  opacity: 0; transition: all 0.4s; cursor: default;
}
.lib-box.on { opacity: 1; border-color: var(--primary-20); color: var(--primary); }
.lib-box:hover { transform: scale(1.05); }
.lib-arrow { font-size: 1.2rem; color: var(--gray-300); opacity: 0; transition: opacity 0.3s; }
.lib-arrow.on { opacity: 1; color: var(--primary); }
.commit-timeline { display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; }
.commit-dot {
  width: 14px; height: 14px; border-radius: 50%; background: var(--gray-200);
  opacity: 0; transition: all 0.3s; cursor: pointer;
}
.commit-dot.on { opacity: 1; background: var(--pass, #16a34a); }
.commit-dot.bug-commit { background: var(--bug) !important; box-shadow: 0 0 8px var(--bug); transform: scale(1.3); }
.commit-dot:hover { transform: scale(1.4); }

/* ===== INTERACTIVITY ===== */
.nn-node { transition: all 0.3s; cursor: pointer; }
.nn-node:hover { filter: brightness(1.3); transform: scale(1.15); }
.nn-node.scanned:hover { filter: drop-shadow(0 0 8px var(--primary)); }
.nn-node.buggy:hover { filter: drop-shadow(0 0 8px var(--bug)); }

.trans-path { transition: transform 0.2s, box-shadow 0.2s; cursor: default; }
.trans-path:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,0.1); }

.mention { transition: all 0.2s; cursor: pointer; border-radius: 4px; padding: 0 4px; }
.mention:hover { background: var(--primary-20); transform: scale(1.05); }

.cov-cell { transition: all 0.2s; cursor: pointer; }
.cov-cell:hover { transform: scale(1.25); z-index: 5; box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
.cov-cell.pass:hover { background: color-mix(in srgb, var(--pass) 80%, white); }
.cov-cell.bug:hover { background: color-mix(in srgb, var(--bug) 80%, white); }

.bar-row { transition: all 0.2s; border-radius: 6px; padding: 4px 6px; cursor: default; }
.bar-row:hover { background: var(--primary-10); transform: translateX(4px); }

.diag-line { transition: all 0.2s; cursor: default; border-radius: 4px; }
.diag-line:hover { background: rgba(255,255,255,0.05); transform: translateX(3px); }

.sem-meter-track { cursor: pointer; transition: transform 0.2s; }
.sem-meter-track:hover { transform: scaleY(1.3); }

.sc-link { transition: all 0.2s; }
.sc-link:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.1); text-decoration: none; }
.sc-link:active { transform: translateY(0) scale(0.95); }

.crest-toolbar { transition: all 0.2s; }
.crest-state-badge { transition: all 0.25s; cursor: default; }
.crest-state-badge:hover { transform: scale(1.05); }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .hero h1 { font-size: 2rem; }
  .hero-sub { font-size: 0.92rem; }
  .hero-stats { gap: 1.5rem; }
  .hero-stat-num { font-size: 1.5rem; }
  .showcase { padding: 3rem 1.25rem; }
  .sc-title { font-size: 1.2rem; }
  .semmt-paths { grid-template-columns: 1fr; }
  .comet-grid-wrap { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}
@media (max-width: 480px) {
  .hero h1 { font-size: 1.55rem; }
  .hero { min-height: 64vh; }
  .diag-log { font-size: 0.66rem; }
  .crest-passage { font-size: 0.9rem; line-height: 2.2; }
  .topnav { padding: 0.5rem 1rem; }
  .cov-grid { max-width: 240px; }
}
