/* ═══════════════════════════════════════════════════
   WiFi Sensing — Claude-inspired dark design system
   ═══════════════════════════════════════════════════ */

:root {
  --bg:        #0C0D11;
  --surface0:  #12131A;
  --surface1:  #1A1B25;
  --surface2:  #22243A;
  --border:    rgba(255,255,255,0.07);
  --border-hi: rgba(255,255,255,0.14);

  --text:      #E8E5DC;
  --text-mid:  #A0A1AB;
  --text-dim:  #5A5B66;

  --orange:    #E8703A;
  --orange-lo: rgba(232,112,58,0.12);
  --orange-md: rgba(232,112,58,0.28);
  --violet:    #9B8AFB;
  --violet-lo: rgba(155,138,251,0.12);
  --green:     #3FD68F;
  --green-lo:  rgba(63,214,143,0.12);
  --blue:      #4B9EFF;
  --blue-lo:   rgba(75,158,255,0.12);

  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 20px;

  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;

  --spring: cubic-bezier(0.34,1.56,0.64,1);
  --out:    cubic-bezier(0.16,1,0.3,1);
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
img, video { max-width: 100%; display: block; }
button { font-family: var(--font); cursor: pointer; }
a { color: inherit; }

body {
  font-family: var(--font);
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  background-image: 
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(232,112,58,0.08) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(155,138,251,0.06) 0%, transparent 40%),
    radial-gradient(ellipse 50% 30% at 0% 100%, rgba(75,158,255,0.05) 0%, transparent 40%);
  background-attachment: fixed;
  overflow-x: hidden;
}

/* ── HTML class compatibility aliases ─────────────────────── */
/* The HTML uses legacy class names; this maps them to new design tokens */
.paper-container { position: relative; z-index: 1; max-width: 1080px; margin: 0 auto; padding: 0 28px 100px; }
.paper-header    { 
  min-height: 55vh; 
  display: flex; 
  flex-direction: column; 
  justify-content: center; 
  align-items: center; 
  text-align: center; 
  padding: 80px 0 50px; 
  position: relative;
  border-bottom: 1px solid var(--border);
}
.paper-header::before {
  content: '';
  position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(232,112,58,0.15) 0%, transparent 70%);
  filter: blur(60px);
  pointer-events: none;
  z-index: -1;
}
.paper-title     { 
  font-size: clamp(22px,4vw,40px); 
  font-weight: 700; 
  line-height: 1.2; 
  letter-spacing: -0.025em; 
  color: var(--text); 
  max-width: 800px; 
  margin-bottom: 24px;
  background: linear-gradient(135deg, var(--text) 0%, var(--text-mid) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.authors         { font-size: 13px; color: var(--text-mid); margin-bottom: 8px; }
.author          { color: var(--text); font-weight: 500; }
.affiliations    { font-size: 11px; color: var(--text-dim); line-height: 1.8; }

/* Section aliases */
.abstract,
.contributions,
.figure-section,
.equation-section,
.tables-section,
.results-section,
.charts-section,
.figures-section,
.architecture-section,
.resources-section,
.ablation-section,
.dashboard-section,
.paper-figures-section {
  position: relative; 
  padding: 64px 0; 
  overflow: hidden;
  border-top: 1px solid var(--border);
}

/* Section headings */
.abstract h2,
.contributions h2,
.figure-section h2,
.equation-section h2,
.tables-section h2,
.results-section h2,
.charts-section h2,
.paper-figures-section h2 {
  font-size: clamp(18px, 2.5vw, 26px);
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text);
  position: relative;
  display: inline-block;
}
.abstract h2::after,
.contributions h2::after,
.figure-section h2::after,
.tables-section h2::after,
.results-section h2::after,
.charts-section h2::after,
.paper-figures-section h2::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 40px;
  height: 3px;
  background: linear-gradient(90deg, var(--orange), var(--violet));
  border-radius: 2px;
}

/* Abstract styling */
.abstract p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-mid);
  max-width: 900px;
}
.abstract .highlight {
  color: var(--orange);
  font-weight: 600;
}

/* ── Layout helpers ─────────────────────────────────────────── */
.two-column {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 24px 0;
}
@media (max-width: 720px) { .two-column { grid-template-columns: 1fr; } }

.two-tables {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}
@media (max-width: 720px) { .two-tables { grid-template-columns: 1fr; } }

.section-title { font-size: clamp(17px,2.2vw,24px); font-weight: 700; margin-bottom: 24px; color: var(--text); }
.section-desc  { font-size: 12px; color: var(--text-dim); margin-bottom: 20px; line-height: 1.7; }

/* ── Card ───────────────────────────────────────────────────── */
.card {
  background: linear-gradient(145deg, var(--surface1) 0%, var(--surface0) 100%);
  border: 1px solid var(--border);
  border-radius: var(--r-md); 
  padding: 24px;
  transition: transform 0.35s var(--spring), border-color 0.3s, box-shadow 0.3s;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--orange), var(--violet));
  opacity: 0;
  transition: opacity 0.3s;
}
.card:hover::before { opacity: 1; }
.card:hover { 
  transform: translateY(-4px); 
  border-color: var(--border-hi); 
  box-shadow: 0 20px 50px rgba(0,0,0,0.35); 
}
.card-icon { 
  font-size: 28px; 
  margin-bottom: 14px;
  display: inline-block;
  padding: 10px;
  background: var(--orange-lo);
  border-radius: var(--r-sm);
}
.card h3   { font-size: 14px; font-weight: 600; margin-bottom: 8px; color: var(--text); }
.card p    { font-size: 12px; color: var(--text-mid); line-height: 1.7; }
.contribution-cards { display: grid; grid-template-columns: 1fr; gap: 16px; }

/* ── Conclusion / findings ──────────────────────────────────── */
.conclusion { padding: 64px 0; border-top: 1px solid var(--border); }
.conclusion h2 { margin-bottom: 24px; }
.key-findings { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 24px; }
@media (max-width: 600px) { .key-findings { grid-template-columns: 1fr; } }
.finding {
  background: var(--surface1); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 16px; display: flex; align-items: flex-start; gap: 12px;
  transition: transform 0.35s var(--spring), border-color 0.3s;
}
.finding:hover { transform: translateY(-2px); border-color: var(--border-hi); }
.finding-icon  { font-size: 18px; line-height: 1; flex-shrink: 0; }
.finding p     { font-size: 12px; color: var(--text-mid); line-height: 1.6; }
.finding strong { color: var(--orange); }
.future-work { font-size: 12px; color: var(--text-dim); border-top: 1px solid var(--border); padding-top: 20px; }

/* ── Table containers ────────────────────────────────────────── */
.table-container {
  background: var(--surface1); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 20px; margin-bottom: 20px; overflow: hidden;
}
.table-container h3 { font-size: 12px; font-weight: 600; color: var(--orange); margin-bottom: 14px; }
.table-scroll { overflow-x: auto; }
.table-note { font-size: 10px; color: var(--text-dim); margin-top: 10px; }
.table-note strong { color: var(--green); }

/* ── Data tables ─────────────────────────────────────────────── */
.data-table {
  width: 100%; border-collapse: collapse; font-size: 11px;
  font-family: var(--mono); white-space: nowrap;
}
.data-table th {
  padding: 8px 12px; text-align: left; font-size: 10px; font-weight: 700;
  color: var(--text-mid); border-bottom: 1px solid var(--border-hi);
  letter-spacing: 0.04em; text-transform: uppercase;
}
.data-table td {
  padding: 7px 12px; border-bottom: 1px solid var(--border); color: var(--text);
  transition: background 0.2s;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: var(--surface2); }
.number { text-align: right; font-variant-numeric: tabular-nums; }
.number.best { color: var(--green); font-weight: 700; }
.number.worst { color: #e05252; }
.number.negative { color: #e05252; }
.highlight-row td { background: var(--orange-lo); }
.highlight-row:hover td { background: rgba(232,112,58,0.18) !important; }
.dim-row td { opacity: 0.6; }
.reference td { color: var(--text-dim); }
.reference-header { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); padding-top: 12px; }
.w-cell { color: var(--violet); font-weight: 700; font-size: 13px; }
.spacer { width: 14px; background: var(--bg) !important; }
.fast td { border-left: 2px solid var(--green); }
.slow td { border-left: 2px solid #e05252; }
.difficulty-hard td { border-left: 2px solid #e05252; }
.difficulty-medium td { border-left: 2px solid #FFD060; }
.difficulty-easy td { border-left: 2px solid var(--green); }
.subheader th { font-size: 9px; color: var(--text-dim); }
.full-width { max-width: 100%; }

/* ── Bar charts (legacy visual bars) ────────────────────────── */
.charts-section h2 { margin-bottom: 20px; }
.chart-container {
  background: var(--surface1); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 20px; margin-bottom: 20px;
}
.chart-container h3 { font-size: 12px; font-weight: 600; color: var(--text-mid); margin-bottom: 14px; }
.bar-chart { display: flex; flex-direction: column; gap: 12px; }
.chart-row { display: flex; align-items: center; gap: 10px; }
.chart-label { font-size: 10px; color: var(--text-dim); min-width: 80px; text-align: right; }
.bars { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.bar {
  height: 8px; border-radius: 4px;
  width: 0; transition: width 1s var(--out);
}
.bar.visible, .bar.animate-bar.visible { width: var(--width); }
.bar.roll-var  { background: var(--orange); }
.bar.amp-san   { background: var(--violet); }
.bar.amplitude { background: var(--blue); }
.bar.ml-best   { background: var(--green); }
.bar.dl-w20    { background: var(--orange); }
.chart-legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 10px; font-size: 10px; color: var(--text-dim); }
.legend-item { display: flex; align-items: center; gap: 5px; }
.legend-color { width: 10px; height: 10px; border-radius: 2px; }
.legend-color.roll-var  { background: var(--orange); }
.legend-color.amp-san   { background: var(--violet); }
.legend-color.amplitude { background: var(--blue); }
.legend-color.ml-best   { background: var(--green); }
.legend-color.dl-w20    { background: var(--orange); }

/* ── PCA figure grid ─────────────────────────────────────────── */
.figure-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
@media (max-width: 700px) { .figure-grid { grid-template-columns: repeat(2, 1fr); } }
.figure-item { background: var(--surface1); border: 1px solid var(--border); border-radius: var(--r-sm); overflow: hidden; cursor: zoom-in; }
.figure-item img { width: 100%; transition: transform 0.4s var(--spring); }
.figure-item:hover img { transform: scale(1.04); }
.fig-caption { font-size: 9.5px; color: var(--text-dim); padding: 6px 10px; text-align: center; }
.figure-full { margin-top: 16px; text-align: center; }
.figure-full img { max-width: 100%; border-radius: var(--r-sm); border: 1px solid var(--border); }
.figure-caption { font-size: 11px; color: var(--text-dim); margin-top: 10px; line-height: 1.6; }

/* ── Dashboard grid ──────────────────────────────────────────── */
.dashboard-section h2 { margin-bottom: 8px; }
.dashboard-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 700px) { .dashboard-row { grid-template-columns: 1fr; } }
.chart-wrap-scatter { height: 220px; position: relative; z-index: 1; }

/* ── Paper figures section ───────────────────────────────────── */
.paper-fig-full { margin-bottom: 32px; }
.paper-fig-full img { width: 100%; border-radius: var(--r-sm); border: 1px solid var(--border); }
.paper-fig-label {
  display: inline-block; font-size: 9px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--orange); background: var(--orange-lo);
  border-radius: 4px; padding: 2px 7px; margin-bottom: 8px;
}
.paper-fig-subsec { margin-bottom: 32px; }
.paper-fig-subsec h3 { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.paper-fig-grid-2x2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 600px) { .paper-fig-grid-2x2 { grid-template-columns: 1fr; } }
.paper-fig-item { background: var(--surface1); border: 1px solid var(--border); border-radius: var(--r-sm); overflow: hidden; }
.paper-fig-item img { width: 100%; transition: transform 0.4s var(--spring); }
.paper-fig-item:hover img { transform: scale(1.03); }
.paper-fig-badge {
  font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--blue); background: var(--blue-lo); padding: 3px 8px;
  border-bottom: 1px solid var(--border);
}
.paper-fig-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
@media (max-width: 600px) { .paper-fig-grid-3 { grid-template-columns: 1fr; } }

/* ── Classifier tab buttons ──────────────────────────────────── */
.classifier-fig-tabs { margin-top: 20px; }
.clf-tab-buttons { display: flex; gap: 2px; margin-bottom: 14px; }
.clf-tab {
  padding: 6px 16px; font-size: 11px; font-weight: 600; border-radius: var(--r-sm);
  background: var(--surface2); border: 1px solid var(--border); color: var(--text-dim);
  cursor: pointer; transition: all 0.2s;
}
.clf-tab.active, .clf-tab:hover { background: var(--orange-lo); border-color: var(--orange-md); color: var(--orange); }
.clf-tab-content { display: none; }
.clf-tab-content.active { display: block; }

/* ── Equation section ────────────────────────────────────────── */
.equation-section h2 { margin-bottom: 20px; }
.equation-box {
  background: var(--surface1); border: 1px solid var(--border-hi); border-radius: var(--r-md);
  padding: 28px 20px; text-align: center; margin-bottom: 18px;
  overflow-x: auto;
}
.equation-desc { font-size: 12px; color: var(--text-mid); line-height: 1.7; }
.highlight { color: var(--orange); font-weight: 600; }
.katex { color: var(--text); }
.katex-display { color: var(--text); }

/* ── System diagram ─────────────────────────────────────────── */
.system-diagram { padding: 20px 0; }
.diagram-row { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.diagram-block {
  background: var(--surface2); border: 1px solid var(--border-hi); border-radius: var(--r-sm);
  padding: 12px 16px; text-align: center; font-size: 11px;
}
.diagram-block.tx, .diagram-block.rx { border-color: rgba(75,158,255,0.35); color: var(--blue); }
.diagram-block.env { flex: 1; max-width: 320px; border-color: rgba(155,138,251,0.3); }
.block-icon { font-size: 18px; margin-bottom: 4px; }
.block-label { font-size: 10px; color: var(--text-mid); line-height: 1.4; }
.path-equations { font-size: 9.5px; color: var(--text-dim); margin: 6px 0; font-family: var(--mono); }
.path { margin: 2px 0; }
.human-icon { font-size: 18px; }
.signal-arrow {
  font-size: 11px; color: var(--text-dim); font-family: var(--mono);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  animation: signalMov 2s ease-in-out infinite alternate;
}

/* ── Branches ───────────────────────────────────────────────── */
.branches { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.branch {
  background: var(--surface2); border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: 10px 16px; flex: 1; min-width: 120px; text-align: center;
}
.highlight-branch { border-color: var(--orange-md); background: var(--orange-lo); }
.branch-header { font-size: 11px; font-weight: 600; margin-bottom: 4px; color: var(--text); }
.branch-desc   { font-size: 10px; color: var(--text-dim); }

/* ── Aurora canvas (full-page ambient layer) ───────────────── */
#aurora {
  position: fixed;
  inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 1;
}

/* ── Hero CSI ambient waveform canvas ─────────────────────── */
.paper-header { position: relative; }
.hero-csi-canvas {
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 120px;
  pointer-events: none;
  opacity: 0.18;
  z-index: 0;
}
.paper-header > *:not(.hero-csi-canvas) { position: relative; z-index: 1; }

/* ── Scroll progress bar ───────────────────────────────────── */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: var(--orange);
  box-shadow: 0 0 10px var(--orange);
  z-index: 1000;
  transition: width 0.1s linear;
}

/* ── Custom cursor ─────────────────────────────────────────── */
.cursor-dot {
  position: fixed;
  width: 6px; height: 6px;
  background: var(--orange);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%,-50%);
  mix-blend-mode: screen;
  transition: transform 0.1s, width 0.2s, height 0.2s;
}
.cursor-ring {
  position: fixed;
  width: 30px; height: 30px;
  border: 1.5px solid rgba(232,112,58,0.45);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9997;
  transform: translate(-50%,-50%);
  transition: width 0.35s var(--out), height 0.35s var(--out),
              border-color 0.3s, left 0.08s linear, top 0.08s linear;
}
.cursor-ring.on-link { width: 50px; height: 50px; border-color: rgba(232,112,58,0.25); }

/* ── Site wrapper ──────────────────────────────────────────── */
.site-wrap {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 28px 100px;
}

/* ── Typography ────────────────────────────────────────────── */
h1 { font-size: clamp(22px,3.5vw,38px); font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; }
h2 { font-size: clamp(17px,2.2vw,24px); font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: 14px; font-weight: 600; }
h4 { font-size: 12px; font-weight: 600; color: var(--text-mid); }

.eyebrow {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 10px;
}

/* ── Section base ──────────────────────────────────────────── */
.section {
  position: relative;
  padding: 72px 0;
  overflow: hidden;
}
.section + .section {
  border-top: 1px solid var(--border);
}
.section-inner { position: relative; z-index: 1; }

/* ═══════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════ */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 100px 0 60px;
  position: relative;
}

.hero-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 13px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: all 0.22s;
}
.badge-conf {
  background: var(--orange-lo);
  color: var(--orange);
  border: 1px solid rgba(232,112,58,0.28);
}
.badge-hf {
  background: rgba(255,213,0,0.08);
  color: #FFD500;
  border: 1px solid rgba(255,213,0,0.22);
}
.badge-hf:hover {
  background: rgba(255,213,0,0.16);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(255,213,0,0.15);
}
.badge-arxiv {
  background: var(--violet-lo);
  color: var(--violet);
  border: 1px solid rgba(155,138,251,0.25);
}

.hero-title {
  max-width: 800px;
  margin-bottom: 20px;
}
.hero-title .hl { color: var(--orange); }

.hero-meta {
  margin-bottom: 36px;
}
.hero-authors {
  font-size: 13px;
  color: var(--text-mid);
  margin-bottom: 6px;
  line-height: 1.8;
}
.hero-authors .au { color: var(--text); font-weight: 500; }
.hero-affils {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.8;
  max-width: 600px;
}

/* Hero stats strip */
.hero-stats {
  display: flex;
  align-items: stretch;
  background: var(--surface1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  width: fit-content;
  max-width: 100%;
  overflow: hidden;
  flex-wrap: wrap;
}
.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 30px;
  position: relative;
  min-width: 120px;
}
.hero-stat + .hero-stat::before {
  content: '';
  position: absolute;
  left: 0; top: 15%; bottom: 15%;
  width: 1px;
  background: var(--border-hi);
}
.s-num {
  font-size: 26px;
  font-weight: 800;
  font-family: var(--mono);
  color: var(--orange);
  line-height: 1;
  letter-spacing: -0.03em;
}
.s-unit { font-size: 17px; font-weight: 700; color: var(--orange); }
.s-lbl {
  font-size: 9.5px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-top: 5px;
  text-align: center;
  max-width: 90px;
}

/* ═══════════════════════════════════════════════════
   ABSTRACT
   ═══════════════════════════════════════════════════ */
.abstract-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  align-items: start;
}
@media (max-width: 800px) { .abstract-layout { grid-template-columns: 1fr; } }

.abstract-body { font-size: 13.5px; color: var(--text-mid); line-height: 1.85; }
.abstract-body strong { color: var(--text); }
.abstract-body em { color: var(--orange); font-style: normal; }

.phase-cards { display: flex; flex-direction: column; gap: 12px; }
.phase-card {
  background: var(--surface1);
  border: 1px solid var(--border);
  border-left: 3px solid var(--orange);
  border-radius: var(--r-md);
  padding: 16px 18px;
  transition: transform 0.3s var(--spring), border-color 0.3s, box-shadow 0.3s;
}
.phase-card:hover {
  transform: translateX(5px);
  border-color: rgba(232,112,58,0.4);
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}
.phase-num { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--orange); margin-bottom: 3px; }
.phase-title { font-size: 12.5px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.phase-card p { font-size: 11px; color: var(--text-dim); }

/* Dataset HF link card */
.dataset-card {
  background: var(--surface1);
  border: 1px solid rgba(255,213,0,0.15);
  border-radius: var(--r-md);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  transition: all 0.25s;
  margin-top: 12px;
}
.dataset-card:hover {
  border-color: rgba(255,213,0,0.35);
  background: rgba(255,213,0,0.05);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.dataset-card-icon { font-size: 22px; }
.dataset-card-text .dct { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: #FFD500; }
.dataset-card-text .dcn { font-size: 12px; color: var(--text); font-weight: 600; margin-top: 1px; }
.dataset-card-arrow { margin-left: auto; color: var(--text-dim); font-size: 16px; }

/* ═══════════════════════════════════════════════════
   CONTRIBUTIONS
   ═══════════════════════════════════════════════════ */
.contrib-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 14px;
}
@media (max-width: 680px) { .contrib-grid { grid-template-columns: 1fr; } }

.contrib-card {
  background: var(--surface1);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 22px;
  position: relative;
  overflow: hidden;
  transition: transform 0.4s var(--spring), border-color 0.3s, box-shadow 0.3s;
}
.contrib-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% -20%, var(--orange-lo) 0%, transparent 65%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.contrib-card:hover {
  transform: translateY(-5px);
  border-color: rgba(232,112,58,0.25);
  box-shadow: 0 24px 48px rgba(0,0,0,0.35);
}
.contrib-card:hover::after { opacity: 1; }
.contrib-icon { font-size: 22px; margin-bottom: 12px; display: block; }
.contrib-card h3 { color: var(--text); margin-bottom: 7px; }
.contrib-card p { font-size: 11.5px; color: var(--text-dim); line-height: 1.6; }

/* ═══════════════════════════════════════════════════
   SYSTEM DIAGRAM  (preserved structure, new colors)
   ═══════════════════════════════════════════════════ */
.system-diagram {
  background: var(--surface1);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 28px;
  overflow: hidden;
  position: relative;
}
.diagram-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.diagram-block {
  display: flex; flex-direction: column; align-items: center;
  padding: 14px; background: var(--surface2);
  border: 1px solid var(--border); border-radius: 10px;
  min-width: 76px; text-align: center; gap: 5px;
}
.diagram-block.tx { border-color: rgba(232,112,58,0.35); }
.diagram-block.rx { border-color: rgba(75,158,255,0.35); }
.diagram-block.env { flex: 1; min-width: 180px; }
.block-icon { font-size: 18px; }
.block-label { font-size: 8.5px; color: var(--text-dim); font-weight: 600; line-height: 1.3; }
.path-equations { font-size: 8.5px; color: var(--text-dim); font-family: var(--mono); }
.path { padding: 1px 0; }
.human-icon { font-size: 18px; }
.signal-arrow {
  display: flex; flex-direction: column; align-items: center;
  font-size: 10px; color: var(--orange); font-family: var(--mono);
}
.pipeline-section { margin-top: 18px; }
.pipeline-section h3 { font-size: 10.5px; color: var(--text-mid); margin-bottom: 10px; }
.pipeline { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pipeline-step {
  display: flex; flex-direction: column; align-items: center;
  padding: 7px 10px; background: var(--surface2);
  border: 1px solid var(--border); border-radius: 7px;
  font-size: 8.5px; color: var(--text-dim); text-align: center;
  gap: 3px; transition: all 0.3s;
}
.step-icon { font-size: 13px; }
.pipeline-step.active-step {
  background: var(--orange-lo);
  border-color: rgba(232,112,58,0.4);
  color: var(--orange);
}
.pipeline-arrow { color: var(--text-dim); font-size: 12px; }
.feature-branches { margin-top: 18px; }
.feature-branches h3 { font-size: 10.5px; color: var(--text-mid); margin-bottom: 10px; }
.branches { display: flex; gap: 10px; flex-wrap: wrap; }
.branch {
  flex: 1; min-width: 110px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 12px; text-align: center;
  transition: all 0.3s; cursor: default;
}
.branch-header { font-size: 9.5px; font-weight: 700; color: var(--text-mid); margin-bottom: 3px; }
.branch-desc { font-size: 8.5px; color: var(--text-dim); }
.branch.rolling-var { border-color: rgba(232,112,58,0.4); }
.branch.rolling-var .branch-header { color: var(--orange); }
.highlight-branch { border-color: rgba(232,112,58,0.5) !important; }

/* ═══════════════════════════════════════════════════
   EQUATION
   ═══════════════════════════════════════════════════ */
.eq-outer {
  background: var(--surface1);
  border: 1px solid var(--border);
  border-left: 3px solid var(--orange);
  border-radius: var(--r-md);
  padding: 32px 36px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.eq-outer::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--orange-lo) 0%, transparent 55%);
  pointer-events: none;
}
.eq-outer canvas {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 70px;
  opacity: 0.07;
  pointer-events: none;
}
.equation-desc {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 16px;
  line-height: 1.7;
  position: relative;
}
.equation-desc .highlight { color: var(--orange); }

/* ═══════════════════════════════════════════════════
   TABLES
   ═══════════════════════════════════════════════════ */

/* Ghost bars layer (section background) */
.ghost-bars {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 65%;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  padding: 0 6%;
  pointer-events: none;
  z-index: 0;
}
.g-bar {
  flex: 1;
  border-radius: 3px 3px 0 0;
  opacity: 0.038;
  transition: opacity 0.5s;
}
.section:hover .g-bar { opacity: 0.06; }

.table-card {
  background: var(--surface1);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: border-color 0.3s;
  position: relative;
  z-index: 1;
}
.table-card:hover { border-color: var(--border-hi); }

.table-card-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface2);
}
.table-card-head h3 { font-size: 11px; font-weight: 600; color: var(--text); }
.tbl-tag {
  font-size: 9px; font-weight: 700; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--text-dim);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
}
.data-table th {
  background: var(--surface2);
  color: var(--text-dim);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table td {
  padding: 9px 14px;
  color: var(--text-mid);
  border-bottom: 1px solid rgba(255,255,255,0.03);
  vertical-align: middle;
  transition: background 0.15s;
}
.data-table tbody tr {
  opacity: 0;
  filter: blur(3px);
  transform: translateY(5px);
  transition: opacity 0.5s var(--out), filter 0.5s, transform 0.5s var(--out);
  transition-delay: var(--row-delay, 0s);
}
.data-table tbody tr.row-in {
  opacity: 1; filter: blur(0); transform: none;
}
.data-table tbody tr:hover td { background: rgba(255,255,255,0.025); }
.data-table .subheader th { font-size: 8.5px; }

/* Number cells */
.data-table td.number {
  font-family: var(--mono);
  font-size: 11px;
  text-align: center;
  color: var(--text);
}
.data-table td.number.best {
  color: var(--green);
  font-weight: 700;
  background: var(--green-lo) !important;
}
.highlight-col { background: var(--orange-lo) !important; color: var(--orange) !important; }
.pipeline-highlight { color: var(--orange); font-weight: 600; }
.arch-highlight { color: var(--violet); font-weight: 600; }
.highlight-row td { background: rgba(232,112,58,0.04); }
.dim-row { opacity: 0.55; }
.w-cell { font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--orange); text-align: center; }
.spacer { width: 10px !important; background: var(--surface2) !important; border: none !important; }
.table-scroll { overflow-x: auto; }

/* ═══════════════════════════════════════════════════
   RESULTS BAR CHARTS (existing section, updated)
   ═══════════════════════════════════════════════════ */
.results-charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 700px) { .results-charts-grid { grid-template-columns: 1fr; } }

.bar-chart-card {
  background: var(--surface1);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.bar-chart-card h4 { margin-bottom: 14px; }
.bar-item { margin-bottom: 10px; }
.bar-meta {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-dim);
  margin-bottom: 4px;
}
.bar-track {
  height: 5px;
  background: var(--surface2);
  border-radius: 3px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  border-radius: 3px;
  width: 0;
  transition: width 1.4s var(--out);
}
.bar-fill.is-rv    { background: var(--green); }
.bar-fill.is-amp   { background: var(--blue); }
.bar-fill.is-sharp { background: var(--orange); }
.bar-fill.is-dl    { background: var(--violet); }

.chart-legend {
  display: flex; gap: 14px; flex-wrap: wrap;
  margin-top: 14px; padding-top: 12px;
  border-top: 1px solid var(--border);
}
.legend-item { display: flex; align-items: center; gap: 5px; font-size: 9.5px; color: var(--text-dim); }
.legend-dot { width: 8px; height: 8px; border-radius: 2px; }
.legend-dot.rv    { background: var(--green); }
.legend-dot.amp   { background: var(--blue); }
.legend-dot.sharp { background: var(--orange); }
.legend-dot.dl-w20  { background: var(--violet); }
.legend-dot.dl-w200 { background: var(--blue); }
.legend-dot.dl-w2k  { background: var(--text-dim); }
/* Legacy compat */
.legend-color { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.legend-color.rv { background: var(--green); }
.legend-color.amp { background: var(--blue); }
.legend-color.sharp { background: var(--orange); }
.legend-color.dl-w20 { background: var(--violet); }
.legend-color.dl-w200 { background: var(--blue); }
.legend-color.dl-w2000 { background: var(--text-dim); }

/* chart-container compat */
.chart-container { margin-bottom: 12px; }
.bars-chart { display: flex; flex-direction: column; gap: 8px; }

/* ═══════════════════════════════════════════════════
   DASHBOARD  (Chart.js 6-panel grid)
   ═══════════════════════════════════════════════════ */
.dashboard-intro { margin-bottom: 28px; }
.dashboard-intro p { font-size: 12px; color: var(--text-dim); margin-top: 6px; }

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.dashboard-grid .chart-card.span2 { grid-column: span 2; }
@media (max-width: 800px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-grid .chart-card.span2 { grid-column: span 1; }
}

.chart-card {
  background: var(--surface1);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: transform 0.4s var(--spring), border-color 0.3s, box-shadow 0.3s;
}
.chart-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-hi);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}
/* Ghost bars inside each chart card */
.card-ghost {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 55%;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  padding: 0 16px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.045;
}
.card-ghost .gb {
  flex: 1;
  border-radius: 2px 2px 0 0;
}
.chart-card-header { position: relative; z-index: 1; margin-bottom: 12px; }
.chart-tag {
  display: inline-block;
  font-size: 9px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--orange); background: var(--orange-lo);
  border-radius: 4px; padding: 2px 7px; margin-bottom: 6px;
}
.chart-card h3 { font-size: 13px; color: var(--text); margin-bottom: 3px; }
.chart-desc { font-size: 10px; color: var(--text-dim); line-height: 1.5; }
.chart-wrap { position: relative; z-index: 1; height: 200px; }
.chart-wrap-lg { height: 230px; }
.highlight-text { color: var(--orange); font-weight: 700; }

/* ═══════════════════════════════════════════════════
   DATASET VISUALIZATION  (editorial mosaic)
   ═══════════════════════════════════════════════════ */
.viz-mosaic {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 14px;
  margin-bottom: 28px;
}
.viz-mosaic .mosaic-hero { grid-row: span 2; }
@media (max-width: 700px) {
  .viz-mosaic { grid-template-columns: 1fr; }
  .viz-mosaic .mosaic-hero { grid-row: span 1; }
}

.fig-card {
  background: var(--surface1);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  position: relative;
  transition: transform 0.45s var(--spring), border-color 0.3s, box-shadow 0.4s;
}
.fig-card:hover {
  transform: translateY(-5px) scale(1.01);
  border-color: var(--border-hi);
  box-shadow: 0 28px 56px rgba(0,0,0,0.45);
}
.fig-card img { width: 100%; cursor: zoom-in; transition: filter 0.3s; }
.fig-card:hover img { filter: brightness(1.1) saturate(1.1); }
.fig-caption-bar {
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.fcb-name { font-size: 11px; color: var(--text-dim); }
.fcb-sil {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--orange);
  background: var(--orange-lo);
  padding: 2px 7px;
  border-radius: 4px;
}

.fig-full {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: 12px;
  transition: transform 0.4s var(--spring);
}
.fig-full:hover { transform: scale(1.005); }
.fig-full img { width: 100%; cursor: zoom-in; }

.fig-caption-text {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.65;
  font-style: italic;
  padding: 8px 0;
}
.fig-caption-text strong { color: var(--text-mid); font-style: normal; }

/* ═══════════════════════════════════════════════════
   CNN ARCHITECTURE
   ═══════════════════════════════════════════════════ */
.arch-wrap {
  background: var(--surface1);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 28px;
}
.cnn-diagram { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.layer { width: 100%; }
.layer-box {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text-mid);
  font-size: 10px;
  font-family: var(--mono);
  padding: 8px 14px;
  border-radius: var(--r-sm);
  text-align: center;
  transition: all 0.3s;
}
.layer-box:hover, .layer-box.lit {
  border-color: var(--blue);
  color: var(--blue);
  box-shadow: 0 0 20px var(--blue-lo);
}
.layer-box.conv { border-color: rgba(155,138,251,0.3); color: var(--violet); }
.layer-box.conv:hover { box-shadow: 0 0 20px var(--violet-lo); }
.layer-box.fc { border-color: rgba(75,158,255,0.25); }
.layer-box.output { border-color: rgba(63,214,143,0.3); color: var(--green); }
.input-layer .layer-box { border-color: rgba(63,214,143,0.35); color: var(--green); }
.arrow { text-align: center; color: var(--text-dim); font-size: 13px; line-height: 1; }
.conv-blocks { width: 100%; position: relative; }
.conv-block { width: 100%; margin-bottom: 4px; }
.block-label {
  font-size: 8.5px; color: var(--text-dim); text-align: center; margin-top: 3px;
  position: absolute; right: -86px; top: 50%; transform: translateY(-50%);
  writing-mode: vertical-lr;
}
.conv-blocks .block-label { position: static; writing-mode: horizontal-tb; }
.gap-layer .layer-box { border-color: rgba(75,158,255,0.3); color: var(--blue); }
.classifier-head { width: 100%; }

/* ═══════════════════════════════════════════════════
   RESOURCES
   ═══════════════════════════════════════════════════ */
.two-tables {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
@media (max-width: 700px) { .two-tables { grid-template-columns: 1fr; } }

/* ═══════════════════════════════════════════════════
   PAPER FIGURES  (cinematic layouts)
   ═══════════════════════════════════════════════════ */
.pf-label {
  display: inline-block;
  font-size: 9px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--orange); background: var(--orange-lo);
  border-radius: 4px; padding: 2px 8px; margin-bottom: 12px;
}

/* Full-width cinematic figure */
.cinema-fig {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: 36px;
  cursor: zoom-in;
}
.cinema-fig img { width: 100%; display: block; transition: transform 0.5s var(--out); }
.cinema-fig:hover img { transform: scale(1.02); }
.cinema-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 28px 24px 20px;
  background: linear-gradient(to top, rgba(12,13,17,0.96) 0%, transparent 100%);
  pointer-events: none;
}
.cinema-caption strong { font-size: 12px; color: var(--text); }
.cinema-caption p { font-size: 11px; color: var(--text-dim); margin-top: 4px; line-height: 1.5; }

/* Film strip (horizontal scroll) */
.film-subsec { margin-bottom: 36px; }
.film-subsec h3 { margin-bottom: 6px; }
.film-subsec > p { font-size: 11px; color: var(--text-dim); margin-bottom: 16px; }

.film-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 10px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-hi) transparent;
  cursor: grab;
}
.film-strip:active { cursor: grabbing; }
.film-strip::-webkit-scrollbar { height: 3px; }
.film-strip::-webkit-scrollbar-thumb { background: var(--border-hi); border-radius: 2px; }

.film-frame {
  flex: 0 0 200px;
  background: var(--surface1);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: transform 0.4s var(--spring), border-color 0.3s;
}
.film-frame:hover { transform: translateY(-5px); border-color: var(--border-hi); }
.film-frame img { width: 100%; cursor: zoom-in; }
.film-frame-cap { padding: 8px 12px; }
.film-frame-cap .fb { font-size: 9px; font-weight: 700; color: var(--orange); text-transform: uppercase; letter-spacing: 0.08em; }
.film-frame-cap .fd { font-size: 10px; color: var(--text-dim); margin-top: 2px; }

/* Classifier tabs */
.clf-tab-header { display: flex; gap: 8px; margin-bottom: 16px; }
.clf-tab-btn {
  padding: 6px 20px;
  font-size: 11.5px; font-weight: 600;
  border: 1px solid var(--border); border-radius: 100px;
  background: transparent; color: var(--text-dim);
  transition: all 0.2s;
}
.clf-tab-btn:hover { color: var(--text); border-color: var(--border-hi); }
.clf-tab-btn.active { background: var(--orange); color: white; border-color: var(--orange); }

.clf-panels > div { display: none; }
.clf-panels > div.active { display: block; }

.clf-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 12px;
}
@media (max-width: 700px) { .clf-grid { grid-template-columns: 1fr; } }

.clf-item {
  background: var(--surface1);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: transform 0.35s var(--spring), border-color 0.3s;
}
.clf-item:hover { transform: translateY(-4px); border-color: var(--border-hi); }
.clf-item img { width: 100%; cursor: zoom-in; }
.clf-item-cap { padding: 8px 12px; font-size: 10px; color: var(--text-dim); }

/* Conference figure */
.conf-fig {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 28px; background: var(--surface1);
  border: 1px solid var(--border); border-radius: var(--r-md);
  text-align: center; margin-top: 32px;
}
.conf-fig img { max-height: 220px; object-fit: contain; cursor: zoom-in; }
.conf-fig p { font-size: 11px; color: var(--text-dim); max-width: 500px; }

/* ═══════════════════════════════════════════════════
   CONCLUSION
   ═══════════════════════════════════════════════════ */
.findings-grid {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 12px;
  margin-bottom: 24px;
}
@media (max-width: 680px) { .findings-grid { grid-template-columns: 1fr; } }

.finding-card {
  background: var(--surface1);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 18px;
  display: flex; gap: 12px; align-items: flex-start;
  transition: border-color 0.3s, transform 0.3s var(--spring);
}
.finding-card:hover { border-color: rgba(232,112,58,0.3); transform: translateX(4px); }
.finding-icon { font-size: 18px; flex-shrink: 0; line-height: 1; margin-top: 2px; }
.finding-card p { font-size: 12px; color: var(--text-mid); line-height: 1.6; }
.finding-card strong { color: var(--orange); }

.future-box {
  background: var(--surface1);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px 20px;
  font-size: 12px; color: var(--text-dim); line-height: 1.7;
}
.future-box strong { color: var(--text-mid); }

/* ═══════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════ */
.site-footer {
  padding: 40px 0 28px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}
.footer-left { font-size: 11.5px; color: var(--text-dim); }
.footer-left a { color: var(--text-dim); text-decoration: none; transition: color 0.2s; }
.footer-left a:hover { color: var(--orange); }
.footer-hf {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 18px;
  background: var(--orange-lo); border: 1px solid rgba(232,112,58,0.28);
  border-radius: 100px; color: var(--orange);
  font-size: 12px; font-weight: 600;
  text-decoration: none; transition: all 0.22s;
}
.footer-hf:hover { background: var(--orange-md); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(232,112,58,0.2); }

/* ═══════════════════════════════════════════════════
   LIGHTBOX / MODAL
   ═══════════════════════════════════════════════════ */
#imageModal, .modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.88);
  z-index: 9999;
  display: none;
  align-items: center; justify-content: center;
  flex-direction: column; gap: 14px;
  padding: 40px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
#imageModal .modal-content {
  max-width: 88vw; max-height: 82vh;
  object-fit: contain;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
}
.close {
  position: absolute; top: 18px; right: 22px;
  background: var(--surface1); border: 1px solid var(--border);
  border-radius: 50%; width: 34px; height: 34px;
  color: var(--text); font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.close:hover { background: var(--orange); border-color: var(--orange); }
#caption { font-size: 11px; color: var(--text-dim); text-align: center; max-width: 560px; }

/* ═══════════════════════════════════════════════════
   SCROLL REVEAL ANIMATIONS
   ═══════════════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  filter: blur(4px);
  transition: opacity 0.7s var(--out), transform 0.7s var(--out), filter 0.65s;
}
.reveal.in { opacity: 1; transform: none; filter: none; }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }
.reveal.d4 { transition-delay: 0.32s; }

/* Legacy animate-on-scroll compat */
.animate-on-scroll {
  opacity: 0; transform: translateY(14px); filter: blur(3px);
  transition: opacity 0.65s var(--out), transform 0.65s var(--out), filter 0.55s;
}
.animate-on-scroll.visible { opacity: 1; transform: none; filter: none; }

/* ═══════════════════════════════════════════════════
   KEYFRAME ANIMATIONS
   ═══════════════════════════════════════════════════ */
@keyframes slideUp   { from { opacity:0; transform:translateY(28px); } to { opacity:1; transform:none; } }
@keyframes fadeIn    { from { opacity:0; } to { opacity:1; } }
@keyframes glowPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(232,112,58,0); } 50% { box-shadow: 0 0 0 10px rgba(232,112,58,0.12); } }
@keyframes breathe   { 0%,100% { transform:scale(1); } 50% { transform:scale(1.02); } }
@keyframes walk      { 0%,100% { transform:translateX(0); } 50% { transform:translateX(8px); } }
@keyframes signalMov { from { opacity:0; transform:translateX(-8px); } to { opacity:1; transform:translateX(8px); } }
@keyframes fadeSeq   { from { opacity:0; } to { opacity:1; } }
@keyframes pop       { 0% { transform:scale(0); opacity:0; } 80% { transform:scale(1.1); } 100% { transform:scale(1); opacity:1; } }
@keyframes countGlow { 0% { color:var(--text); text-shadow:none; } 60% { color:var(--orange); text-shadow:0 0 30px rgba(232,112,58,0.65); } 100% { color:var(--orange); text-shadow:0 0 12px rgba(232,112,58,0.3); } }
@keyframes rippleOut { to { transform:scale(2.5); opacity:0; } }
@keyframes shimmer   { 0%,100% { background-position:-200% center; } 50% { background-position:200% center; } }

.animate-slide-up         { animation: slideUp 0.75s var(--out) both; }
.animate-fade-in-delay    { animation: fadeIn 0.9s 0.5s var(--out) both; }
.animate-fade-in-delay-2  { animation: fadeIn 0.9s 0.9s var(--out) both; }
.animate-pulse-glow       { animation: glowPulse 3s ease-in-out infinite; }
.animate-breathe          { animation: breathe 4s ease-in-out infinite; }
.animate-walk             { animation: walk 2s ease-in-out infinite; }
.animate-signal           { animation: signalMov 2s ease-in-out infinite alternate; }
.animate-fade-sequence    { animation: fadeSeq 0.5s calc(var(--seq,1) * 0.3s) var(--out) both; }
.animate-pop              { animation: pop 0.5s calc(var(--delay,0s)) var(--spring) both; }
.animate-glow             { animation: glowPulse 3s ease-in-out infinite; }
.stat-counting            { animation: countGlow 1.4s var(--out) forwards; }
.ripple {
  position: absolute; border-radius: 50%; pointer-events: none;
  background: rgba(232,112,58,0.25);
  width: 20px; height: 20px; margin: -10px 0 0 -10px;
  animation: rippleOut 0.65s linear forwards;
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════ */
@media (max-width: 600px) {
  .hero-stats { flex-wrap: wrap; }
  .hero-stat { padding: 14px 18px; min-width: 100px; }
  .s-num { font-size: 21px; }
  .section { padding: 48px 0; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-grid .chart-card.span2 { grid-column: span 1; }
  .findings-grid { grid-template-columns: 1fr; }
  .two-tables { grid-template-columns: 1fr; }
  .viz-mosaic { grid-template-columns: 1fr; }
  .viz-mosaic .mosaic-hero { grid-row: span 1; }
  .clf-grid { grid-template-columns: 1fr; }
  .contrib-grid { grid-template-columns: 1fr; }
  .abstract-layout { grid-template-columns: 1fr; }
}

/* badge-venue alias (used in hero) */
.badge-venue {
  display: inline-flex; align-items: center;
  padding: 5px 13px; border-radius: 100px;
  background: var(--orange-lo); border: 1px solid rgba(232,112,58,0.28);
  color: var(--orange); font-size: 11px; font-weight: 600; letter-spacing: 0.04em;
}

/* ═══════════════════════════════════════════════════
   DATASET CARD (HuggingFace link)
   ═══════════════════════════════════════════════════ */
.dataset-card {
  display: flex; align-items: center; gap: 14px;
  margin-top: 18px; padding: 14px 18px;
  border: 1px solid rgba(255,196,0,0.2); border-radius: var(--r-md);
  background: rgba(255,196,0,0.05); text-decoration: none;
  transition: background 0.2s, border-color 0.2s, transform 0.25s var(--spring);
}
.dataset-card:hover {
  background: rgba(255,196,0,0.10); border-color: rgba(255,196,0,0.4);
  transform: translateY(-2px);
}
.dataset-card-icon { font-size: 20px; line-height: 1; }
.dataset-card-text { display: flex; flex-direction: column; gap: 2px; }
.dataset-card-title { font-size: 12px; font-weight: 600; color: #FFD060; }
.dataset-card-sub   { font-size: 10px; color: var(--text-dim); }
.dataset-card-arrow { margin-left: auto; color: var(--text-dim); font-size: 16px; }

/* ═══════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════ */
.paper-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0 40px; text-align: center;
}
.footer-links {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; flex-wrap: wrap; margin-bottom: 10px;
}
.footer-hf {
  color: #FFD060; font-size: 12px; font-weight: 600;
  text-decoration: none; transition: opacity 0.2s;
}
.footer-hf:hover { opacity: 0.75; }
.footer-email { color: var(--orange); font-size: 12px; text-decoration: none; }
.footer-email:hover { opacity: 0.75; }
.footer-sep { color: var(--text-dim); }
.footer-venue { color: var(--text-dim); font-size: 12px; }
.footer-copy { font-size: 10px; color: var(--text-dim); }

/* ═══════════════════════════════════════════════════
   LIGHTBOX
   ═══════════════════════════════════════════════════ */
.lightbox {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,0.92); backdrop-filter: blur(8px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img {
  max-width: 90vw; max-height: 80vh;
  border-radius: var(--r-sm); border: 1px solid var(--border-hi);
  transform: scale(0.92);
  transition: transform 0.4s var(--spring);
}
.lightbox.open img { transform: scale(1); }
.lightbox #lb-cap { color: var(--text-mid); font-size: 11px; margin-top: 12px; }
.lb-close {
  position: fixed; top: 20px; right: 24px;
  background: var(--surface1); border: 1px solid var(--border-hi);
  color: var(--text); width: 36px; height: 36px; border-radius: 50%;
  font-size: 16px; cursor: pointer; transition: background 0.2s;
}
.lb-close:hover { background: var(--surface2); }

/* ═══════════════════════════════════════════════════
   CURSOR DOT + RING  (supplement to base definition)
   ═══════════════════════════════════════════════════ */
.cursor-dot {
  position: fixed; width: 6px; height: 6px;
  background: var(--orange); border-radius: 50%;
  pointer-events: none; z-index: 9999; transition: transform 0.1s;
}
.cursor-ring {
  position: fixed; width: 32px; height: 32px;
  border: 1.5px solid var(--orange); border-radius: 50%;
  pointer-events: none; z-index: 9998;
  transition: width 0.2s, height 0.2s, border-color 0.2s, opacity 0.2s;
}
.cursor-dot.hover, .cursor-ring.hover {
  width: 8px; height: 8px;
}
.cursor-ring.hover {
  width: 44px; height: 44px; opacity: 0.5;
}

/* ═══════════════════════════════════════════════════
   REVEAL  (scroll-triggered blur-materialize)
   ═══════════════════════════════════════════════════ */
.reveal {
  opacity: 0;
  filter: blur(4px);
  transform: translateY(18px);
  transition: opacity 0.7s var(--out), filter 0.7s var(--out), transform 0.7s var(--out);
}
.reveal.in {
  opacity: 1; filter: blur(0px); transform: translateY(0);
}
/* override for table rows: horizontal slide */
.data-table tbody tr.reveal {
  transform: translateX(-12px);
}
.data-table tbody tr.reveal.in {
  transform: translateX(0);
}

/* ═══════════════════════════════════════════════════
   NEW COMPONENTS — Badges, Dataset Cards, Collapsible Tables, Interactive Diagrams
   ═══════════════════════════════════════════════════ */

/* Hero badges container */
.hero-badges {
  display: flex;
  gap: 10px;
  margin-bottom: 28px;
  flex-wrap: wrap;
  justify-content: center;
}
.hero-badges .badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 100px;
  text-decoration: none;
  transition: all 0.3s var(--spring);
}

/* Badge styles */
.badge-paper {
  background: linear-gradient(135deg, var(--surface2) 0%, var(--surface1) 100%);
  color: var(--text);
  border: 1px solid var(--border-hi);
  text-decoration: none;
}
.badge-paper:hover {
  background: var(--orange-lo);
  border-color: var(--orange);
  color: var(--orange);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(232,112,58,0.2);
}
.badge-hf {
  background: linear-gradient(135deg, rgba(255,216,77,0.15) 0%, rgba(255,216,77,0.08) 100%);
  color: #FFD84D;
  border: 1px solid rgba(255,216,77,0.3);
}
.badge-hf:hover {
  background: rgba(255,216,77,0.2);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255,216,77,0.15);
}
.badge-github {
  background: linear-gradient(135deg, var(--violet-lo) 0%, rgba(155,138,251,0.08) 100%);
  color: var(--violet);
  border: 1px solid rgba(155,138,251,0.3);
  text-decoration: none;
}
.badge-github:hover {
  background: rgba(155,138,251,0.2);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(155,138,251,0.15);
}

/* Dataset cards grid */
.dataset-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 28px;
}
@media (max-width: 600px) {
  .dataset-cards-grid { grid-template-columns: 1fr; }
}
.dataset-cards-grid .dataset-card {
  margin-top: 0;
  background: linear-gradient(145deg, var(--surface1) 0%, var(--surface0) 100%);
  border: 1px solid var(--border);
  padding: 16px 20px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  transition: all 0.3s var(--spring);
  position: relative;
  overflow: hidden;
}
.dataset-cards-grid .dataset-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,216,77,0.05) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s;
}
.dataset-cards-grid .dataset-card:hover::before { opacity: 1; }
.dataset-cards-grid .dataset-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255,216,77,0.3);
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}
.dataset-card-icon {
  font-size: 24px;
  flex-shrink: 0;
}
.dataset-card-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dataset-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.dataset-card-sub {
  font-size: 11px;
  color: var(--text-dim);
}
.dataset-card-arrow {
  font-size: 16px;
  color: var(--text-dim);
  transition: transform 0.3s, color 0.3s;
}
.dataset-cards-grid .dataset-card:hover .dataset-card-arrow {
  transform: translateX(4px);
  color: #FFD84D;
}

/* Collapsible tables */
.table-collapse {
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface1);
}
.table-collapse-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: var(--surface2);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  border: none;
  transition: background 0.2s;
  list-style: none;
}
.table-collapse-header::-webkit-details-marker { display: none; }
.table-collapse-header:hover {
  background: rgba(232,112,58,0.08);
}
.collapse-icon {
  font-size: 10px;
  color: var(--orange);
  transition: transform 0.3s var(--spring);
}
.table-collapse[open] .collapse-icon {
  transform: rotate(0deg);
}
.table-collapse:not([open]) .collapse-icon {
  transform: rotate(-90deg);
}
.table-collapse .table-container {
  margin: 0;
  border: none;
  border-radius: 0;
  background: transparent;
}

/* Interactive pipeline visualization */
.pipeline-interactive {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.pipeline-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}
.pipeline-step {
  cursor: pointer;
  transition: all 0.3s var(--spring);
}
.pipeline-step:hover,
.pipeline-step.active {
  background: var(--orange-lo);
  border-color: var(--orange);
  color: var(--orange);
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(232,112,58,0.2);
}
.process-viz-panel {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px;
  min-height: 180px;
  position: relative;
  overflow: hidden;
}
.process-viz-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 12px;
  transition: opacity 0.3s;
}
.process-viz-panel.active .process-viz-placeholder {
  opacity: 0;
  pointer-events: none;
}
.process-viz-panel canvas {
  width: 100%;
  height: 150px;
  display: none;
}
.process-viz-panel.active canvas,
.process-viz-panel canvas[style*="display: block"],
.process-viz-panel canvas[style*="display:block"] {
  opacity: 1;
}

/* Interactive feature branches */
.branches-interactive {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.branches-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.branches-row .branch {
  cursor: pointer;
  transition: all 0.3s var(--spring);
  flex: 1;
  min-width: 120px;
}
.branches-row .branch:hover,
.branches-row .branch.active {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}
.branches-row .branch[data-feature="sharp"]:hover,
.branches-row .branch[data-feature="sharp"].active {
  border-color: var(--violet);
  background: var(--violet-lo);
}
.branches-row .branch[data-feature="sharp"]:hover .branch-header,
.branches-row .branch[data-feature="sharp"].active .branch-header {
  color: var(--violet);
}
.branches-row .branch[data-feature="rollvar"]:hover,
.branches-row .branch[data-feature="rollvar"].active {
  border-color: var(--orange);
  background: var(--orange-lo);
}
.branches-row .branch[data-feature="rollvar"]:hover .branch-header,
.branches-row .branch[data-feature="rollvar"].active .branch-header {
  color: var(--orange);
}
.branches-row .branch[data-feature="rawamp"]:hover,
.branches-row .branch[data-feature="rawamp"].active {
  border-color: var(--blue);
  background: var(--blue-lo);
}
.branches-row .branch[data-feature="rawamp"]:hover .branch-header,
.branches-row .branch[data-feature="rawamp"].active .branch-header {
  color: var(--blue);
}

/* Footer link styles */
.footer-link {
  color: var(--text-mid);
  text-decoration: none;
  font-size: 12px;
  transition: color 0.2s;
}
.footer-link:hover {
  color: var(--orange);
}

/* Bar chart animations */
.bar-chart .bar {
  width: 0;
  transition: width 0.8s var(--out);
}
.bar-chart .bar.visible {
  width: var(--width);
}
.animate-bar {
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left;
  transition: opacity 0.4s, transform 0.6s var(--spring);
}
.animate-bar.visible {
  opacity: 1;
  transform: scaleX(1);
}

/* ═══════════════════════════════════════════════════
   CONTRIBUTIONS — Full-width redesign
   ═══════════════════════════════════════════════════ */
.contributions-full {
  padding: 72px 0 64px;
}
.contributions-full h2 {
  text-align: center;
  display: block;
  margin-bottom: 12px;
}
.contributions-full h2::after {
  left: 50%;
  transform: translateX(-50%);
}

/* 4-column card grid */
.contribution-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 32px;
}
@media (max-width: 900px) {
  .contribution-cards-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .contribution-cards-grid { grid-template-columns: 1fr; }
}

/* Numbered contribution cards */
.contribution-numbered {
  position: relative;
  padding: 28px 24px 24px;
  background: var(--surface1);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: transform 0.4s var(--spring), border-color 0.35s, box-shadow 0.35s;
}

/* Gradient top accent bar */
.contribution-numbered::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--orange), var(--violet), var(--blue));
  opacity: 0.5;
  transition: opacity 0.35s;
}
.contribution-numbered:hover::before {
  opacity: 1;
}

/* Subtle glow on hover */
.contribution-numbered::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% -30%, var(--orange-lo) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
  z-index: 0;
}
.contribution-numbered:hover::after {
  opacity: 1;
}
.contribution-numbered:hover {
  transform: translateY(-6px);
  border-color: rgba(232,112,58,0.25);
  box-shadow:
    0 20px 60px rgba(0,0,0,0.35),
    0 0 40px rgba(232,112,58,0.06);
}

/* Card number watermark */
.card-number {
  position: absolute;
  top: 12px;
  right: 16px;
  font-family: var(--mono);
  font-size: 42px;
  font-weight: 800;
  color: var(--text);
  opacity: 0.04;
  line-height: 1;
  pointer-events: none;
  z-index: 0;
}
.contribution-numbered:hover .card-number {
  opacity: 0.08;
}

/* Card content z-index */
.contribution-numbered .card-icon,
.contribution-numbered h3,
.contribution-numbered p {
  position: relative;
  z-index: 1;
}

/* Alternate icon backgrounds */
.contribution-numbered:nth-child(1) .card-icon { background: var(--orange-lo); }
.contribution-numbered:nth-child(2) .card-icon { background: var(--green-lo); }
.contribution-numbered:nth-child(3) .card-icon { background: var(--violet-lo); }
.contribution-numbered:nth-child(4) .card-icon { background: var(--blue-lo); }

.contribution-numbered h3 {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.contribution-numbered p {
  font-size: 12.5px;
  color: var(--text-mid);
  line-height: 1.75;
}
.contribution-numbered p strong {
  color: var(--orange);
  font-weight: 600;
}

/* ── Hero stats strip ─────────────────────────────── */
.hero-stats-strip {
  display: flex;
  align-items: stretch;
  justify-content: center;
  background: var(--surface1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  margin-top: 36px;
  overflow: hidden;
  flex-wrap: wrap;
}
.hero-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 32px;
  position: relative;
  min-width: 110px;
}
.hero-stat-item + .hero-stat-item::before {
  content: '';
  position: absolute;
  left: 0; top: 18%; bottom: 18%;
  width: 1px;
  background: var(--border-hi);
}
.stat-value {
  font-size: 24px;
  font-weight: 800;
  font-family: var(--mono);
  color: var(--orange);
  line-height: 1;
  letter-spacing: -0.03em;
}
.stat-label {
  font-size: 9px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 5px;
  text-align: center;
}
@media (max-width: 600px) {
  .hero-stat-item { padding: 14px 20px; min-width: 90px; }
  .stat-value { font-size: 20px; }
}

/* ── Paper badge download styling ─────────────────── */
.badge-paper {
  background: var(--orange-lo);
  color: var(--orange);
  border: 1px solid rgba(232,112,58,0.28);
}
.badge-paper:hover {
  background: rgba(232,112,58,0.22);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(232,112,58,0.2);
}
.badge-github {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border-hi);
}
.badge-github:hover {
  background: var(--surface1);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(255,255,255,0.08);
}

/* ── Table collapse styling ───────────────────────── */
.table-collapse {
  margin-bottom: 16px;
}
.table-collapse-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  background: var(--surface1);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  transition: background 0.2s, border-color 0.2s;
  list-style: none;
}
.table-collapse-header::-webkit-details-marker { display: none; }
.table-collapse-header:hover {
  background: var(--surface2);
  border-color: var(--border-hi);
}
.table-collapse[open] > .table-collapse-header {
  border-radius: var(--r-md) var(--r-md) 0 0;
  border-bottom-color: var(--border);
}
.collapse-icon {
  font-size: 10px;
  color: var(--text-dim);
  transition: transform 0.3s;
}
.table-collapse[open] > .table-collapse-header .collapse-icon {
  transform: rotate(0deg);
}
.table-collapse:not([open]) > .table-collapse-header .collapse-icon {
  transform: rotate(-90deg);
}

/* ── Dataset cards grid ───────────────────────────── */
.dataset-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 24px;
}
@media (max-width: 600px) {
  .dataset-cards-grid { grid-template-columns: 1fr; }
}
.dataset-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  display: block;
}
.dataset-card-sub {
  font-size: 11px;
  color: var(--text-dim);
  display: block;
  margin-top: 2px;
}

/* ── Pipeline interactive ─────────────────────────── */
.pipeline-interactive { position: relative; }
.pipeline-steps {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.process-viz-panel {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 12px;
  min-height: 100px;
  position: relative;
  overflow: hidden;
}
.process-viz-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 80px;
}
.process-viz-placeholder span {
  font-size: 11px;
  color: var(--text-dim);
  font-style: italic;
}
#pipelineCanvas, #featureCanvas {
  display: none;
  width: 100%;
  height: 150px;
}
.branches-interactive { position: relative; }
.branches-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

/* ── Architecture section ─────────────────────────── */
.architecture-section {
  padding: 64px 0;
  border-top: 1px solid var(--border);
}
.architecture-section h2 {
  font-size: clamp(18px, 2.5vw, 26px);
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--text);
  position: relative;
  display: inline-block;
}
.cnn-diagram {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 24px;
  background: var(--surface1);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.layer { width: 100%; max-width: 400px; }
.layer-box {
  padding: 10px 16px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  text-align: center;
  font-size: 11px;
  font-family: var(--mono);
  color: var(--text-mid);
  transition: all 0.3s;
}
.layer-box.conv { border-color: rgba(232,112,58,0.3); color: var(--orange); }
.layer-box.fc { border-color: rgba(155,138,251,0.3); color: var(--violet); }
.layer-box.output { border-color: rgba(63,214,143,0.3); color: var(--green); font-weight: 700; }
.conv-blocks, .classifier-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  position: relative;
  width: 100%;
  max-width: 400px;
}
.block-label {
  position: absolute;
  right: -90px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 9px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  white-space: nowrap;
}
@media (max-width: 600px) { .block-label { display: none; } }
.arrow {
  color: var(--text-dim);
  font-size: 14px;
  text-align: center;
}

/* ── Resources section ────────────────────────────── */
.resources-section {
  padding: 64px 0;
  border-top: 1px solid var(--border);
}
.resources-section h2 {
  font-size: clamp(18px, 2.5vw, 26px);
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--text);
}

/* ── Ablation section ─────────────────────────────── */
.ablation-section {
  padding: 64px 0;
  border-top: 1px solid var(--border);
}
.ablation-section h2 {
  font-size: clamp(18px, 2.5vw, 26px);
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--text);
}

/* ── Chart card ───────────────────────────────────── */
.chart-card {
  background: var(--surface1);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.chart-card:hover {
  border-color: var(--border-hi);
  box-shadow: 0 12px 36px rgba(0,0,0,0.2);
}
.chart-card-header {
  padding: 18px 20px 12px;
}
.chart-card-header h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.chart-card-header p {
  font-size: 11.5px;
  color: var(--text-dim);
  line-height: 1.6;
}
.chart-tag {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--orange);
  background: var(--orange-lo);
  border-radius: 4px;
  padding: 2px 8px;
  margin-bottom: 6px;
}
.highlight-text { color: var(--orange); font-weight: 600; }
.chart-wrap {
  padding: 10px 16px 16px;
  height: 260px;
  position: relative;
}
.chart-desc { line-height: 1.6; }

/* ── Footer ───────────────────────────────────────── */
.paper-footer {
  padding: 40px 0 20px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.footer-sep { color: var(--text-dim); font-size: 10px; }
.footer-hf { color: #FFD500; text-decoration: none; font-size: 12px; transition: opacity 0.2s; }
.footer-hf:hover { opacity: 0.8; }
.footer-email { color: var(--text-dim); text-decoration: none; font-size: 12px; }
.footer-email:hover { color: var(--orange); }
.footer-copy { font-size: 10px; color: var(--text-dim); }

/* ── Lightbox ─────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  padding: 40px;
}
.lightbox.active { display: flex; flex-direction: column; }
.lb-close {
  position: absolute;
  top: 16px; right: 20px;
  font-size: 24px;
  color: var(--text);
  background: none;
  border: none;
  cursor: pointer;
}
#lb-img { max-width: 90%; max-height: 80vh; border-radius: var(--r-sm); }
#lb-cap { font-size: 12px; color: var(--text-dim); margin-top: 12px; text-align: center; }
