/* ======================================================================
   MathSpatial — Premium Academic Project Site
   ====================================================================== */

/* ---------- Design Tokens ---------- */
:root {
  --primary: #4361ee;
  --primary-light: #4cc9f0;
  --primary-dark: #3a0ca3;
  --accent: #f72585;
  --accent-light: #ff6b9d;
  --success: #06d6a0;
  --warning: #ffd166;
  --bg: #ffffff;
  --bg-alt: #f8f9fc;
  --bg-dark: #0b0e1a;
  --bg-dark-alt: #111627;
  --text: #1a1a2e;
  --text-light: #6c7293;
  --text-muted: #9ca3af;
  --text-white: #e2e8f0;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
  --shadow-glow: 0 0 40px rgba(67,97,238,0.15);
  --radius: 12px;
  --radius-lg: 20px;
  --font: 'Inter', 'Noto Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'Fira Code', 'JetBrains Mono', 'Consolas', monospace;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  overflow-x: hidden;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 900px; margin: 0 auto; padding: 0 24px; }

/* ---------- Animations ---------- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(67,97,238,0.2); }
  50% { box-shadow: 0 0 40px rgba(67,97,238,0.4); }
}
@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes count-up { from { opacity: 0; transform: scale(0.5); } to { opacity: 1; transform: scale(1); } }
@keyframes slide-in-left { from { opacity: 0; transform: translateX(-40px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slide-in-right { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Navbar ---------- */
.navbar {
  position: fixed; top: 0; width: 100%; z-index: 1000;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(226,232,240,0.5);
  transition: all var(--transition);
}
.navbar.scrolled {
  background: rgba(255,255,255,0.95);
  box-shadow: 0 1px 20px rgba(0,0,0,0.08);
}
.navbar .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.navbar-brand {
  font-size: 1.4rem; font-weight: 800; color: var(--text);
  display: flex; align-items: center; gap: 0;
  letter-spacing: -0.5px;
}
.navbar-brand .logo-math { color: var(--primary); }
.navbar-brand .logo-spatial {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.nav-links { display: flex; gap: 4px; list-style: none; align-items: center; }
.nav-links > li { position: relative; }
.nav-links a {
  font-size: 0.85rem; font-weight: 500; color: var(--text-light);
  padding: 6px 12px; border-radius: 8px;
  transition: all var(--transition);
  white-space: nowrap;
  display: flex; align-items: center; gap: 4px;
}
.nav-links a:hover { color: var(--primary); background: rgba(67,97,238,0.06); }

/* Dropdown menu */
.nav-dropdown { display: none; position: absolute; top: 100%; left: 0; min-width: 180px;
  background: rgba(255,255,255,0.98); backdrop-filter: blur(20px);
  border-radius: 10px; box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  padding: 8px 0; z-index: 100; list-style: none;
  border: 1px solid var(--border-light);
}
.nav-dropdown li a {
  display: block; padding: 8px 18px; font-size: 0.82rem; font-weight: 500;
  color: var(--text-light); border-radius: 0; white-space: nowrap;
}
.nav-dropdown li a:hover { color: var(--primary); background: rgba(67,97,238,0.06); }
.nav-links > li:hover > .nav-dropdown { display: block; }
.nav-links > li > a .fa-chevron-down { font-size: 0.6rem; opacity: 0.5; margin-left: 2px; }
.nav-links .nav-cta {
  background: transparent;
  color: var(--primary) !important;
  font-weight: 600; padding: 6px 14px;
  border: 1.5px solid var(--primary);
  border-radius: 8px;
}
.nav-links .nav-cta:hover {
  background: var(--primary);
  color: #fff !important;
  transform: translateY(-1px);
}
.lang-switch {
  display: flex; align-items: center; gap: 2px;
  font-size: 0.82rem; font-weight: 600;
  flex-shrink: 0; margin-left: 4px;
}
.lang-switch a {
  color: var(--text-light); padding: 4px 8px; border-radius: 8px;
  transition: all var(--transition);
}
.lang-switch a:hover { color: var(--primary); background: rgba(67,97,238,0.06); }
.lang-switch .lang-active { color: var(--primary); padding: 4px 8px; }
.lang-switch .lang-sep { color: var(--text-muted); user-select: none; padding: 0 2px; }
body.lang-zh { font-family: 'Noto Sans SC', 'Inter', system-ui, -apple-system, sans-serif; }
.nav-hamburger { display: none; cursor: pointer; font-size: 1.5rem; color: var(--text); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 140px 0 100px;
  text-align: center;
  background: linear-gradient(135deg, #0b0e1a 0%, #1a1a3e 40%, #2d1b69 70%, #0b0e1a 100%);
  background-size: 200% 200%;
  animation: gradient-shift 15s ease infinite;
  overflow: hidden;
  color: #fff;
}
.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(67,97,238,0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(247,37,133,0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(76,201,240,0.08) 0%, transparent 50%);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 2; }
.hero-label {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(10px);
  padding: 8px 20px; border-radius: 30px;
  font-size: 0.85rem; color: rgba(255,255,255,0.8);
  margin-bottom: 24px;
  animation: fadeInUp 0.6s ease-out;
}
.hero-label .label-icon { font-size: 1rem; }
.hero h1 {
  font-size: 4rem; font-weight: 900;
  letter-spacing: -2px; line-height: 1.1;
  margin-bottom: 20px;
  animation: fadeInUp 0.7s ease-out 0.1s both;
}
.hero h1 .gradient-text {
  background: linear-gradient(135deg, #4cc9f0, #4361ee, #f72585);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero .subtitle {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.6);
  max-width: 720px; margin: 0 auto 36px;
  line-height: 1.8;
  animation: fadeInUp 0.7s ease-out 0.25s both;
}
.hero .subtitle strong { color: rgba(255,255,255,0.85); }
.hero-paper-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  max-width: 900px; margin: 0 auto 16px;
  line-height: 1.6;
  animation: fadeInUp 0.7s ease-out 0.15s both;
  font-style: italic;
  white-space: nowrap;
}

/* Hero Badges */
.hero-badges {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
  margin-bottom: 40px;
  animation: fadeInUp 0.7s ease-out 0.3s both;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: 12px;
  font-size: 0.88rem; font-weight: 600;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  color: rgba(255,255,255,0.9);
  transition: all var(--transition);
}
.hero-badge:hover {
  background: rgba(255,255,255,0.12);
  transform: translateY(-2px);
}
.hero-badge i { font-size: 1rem; }
.hero-badge.b-blue i { color: var(--primary-light); }
.hero-badge.b-green i { color: var(--success); }
.hero-badge.b-orange i { color: var(--warning); }
.hero-badge.b-red i { color: var(--accent); }
.hero-badge.b-gray i { color: var(--text-muted); }

/* Hero Buttons */
.hero-buttons {
  display: flex; gap: 16px; justify-content: center; flex-wrap: wrap;
  margin-bottom: 32px;
  animation: fadeInUp 0.7s ease-out 0.4s both;
}
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 28px; border-radius: 12px;
  font-size: 0.95rem; font-weight: 600;
  transition: all var(--transition);
  border: none; cursor: pointer;
  text-decoration: none;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), #7209b7);
  color: #fff;
  box-shadow: 0 4px 20px rgba(67,97,238,0.3);
}
.btn-primary:hover { box-shadow: 0 6px 30px rgba(67,97,238,0.5); color: #fff; }
.btn-github {
  background: #24292e;
  color: #fff;
  border: 1px solid #24292e;
  box-shadow: 0 4px 20px rgba(36,41,46,0.3);
}
.btn-github:hover { background: #1a1a2e; box-shadow: 0 6px 30px rgba(36,41,46,0.5); color: #fff; }
.btn-hf {
  background: linear-gradient(135deg, #ff9d00, #ffb347);
  color: #1a1a2e;
  box-shadow: 0 4px 20px rgba(255,157,0,0.3);
}
.btn-hf:hover { box-shadow: 0 6px 30px rgba(255,157,0,0.5); color: #1a1a2e; }
.btn-outline-light {
  background: linear-gradient(135deg, var(--primary), #7209b7);
  border: none;
  color: #fff;
  box-shadow: 0 4px 20px rgba(67,97,238,0.3);
}
.btn-outline-light:hover { box-shadow: 0 6px 30px rgba(67,97,238,0.5); color: #fff; }
.btn-accent {
  background: linear-gradient(135deg, var(--accent), #ff6b9d);
  color: #fff;
  box-shadow: 0 4px 20px rgba(247,37,133,0.3);
}
.btn-accent:hover { box-shadow: 0 6px 30px rgba(247,37,133,0.5); color: #fff; }

.hero-team {
  font-size: 0.9rem; color: rgba(255,255,255,0.5);
  animation: fadeInUp 0.7s ease-out 0.5s both;
}

/* Particle canvas */
#particles-canvas {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 1;
}

/* ---------- Section Styles ---------- */
.section { padding: 100px 0; position: relative; }
.section-dark {
  background: var(--bg-dark);
  color: var(--text-white);
}
.section-dark .section-desc { color: rgba(255,255,255,0.6); }
.section-alt { background: var(--bg-alt); }
.section-gradient {
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
}
.section-title {
  font-size: 2.5rem; font-weight: 800; text-align: center;
  margin-bottom: 16px; letter-spacing: -0.5px;
}
.section-title .highlight { color: var(--primary); }
.section-desc {
  text-align: center; color: var(--text-light);
  max-width: 780px; margin: 0 auto 56px;
  font-size: 1.05rem; line-height: 1.8;
}

/* ---------- Stats Cards ---------- */
.stats-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  margin-bottom: 64px;
}
.stat-card {
  background: #fff; border: 1px solid var(--border-light);
  border-radius: var(--radius-lg); padding: 36px 24px;
  text-align: center;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  opacity: 0;
  transition: opacity var(--transition);
}
.stat-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.stat-card:hover::before { opacity: 1; }
.stat-icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 16px;
}
.stat-icon.blue { background: rgba(67,97,238,0.1); color: var(--primary); }
.stat-icon.green { background: rgba(6,214,160,0.1); color: var(--success); }
.stat-icon.orange { background: rgba(255,209,102,0.15); color: #e8a317; }
.stat-icon.red { background: rgba(247,37,133,0.1); color: var(--accent); }
.stat-number {
  font-size: 2.6rem; font-weight: 900; color: var(--text);
  letter-spacing: -1px; line-height: 1;
  margin-bottom: 6px;
}
.stat-label { font-size: 0.88rem; color: var(--text-light); font-weight: 500; }

/* ---------- Components Grid ---------- */
.components-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
  margin-top: 48px;
}
.component-card {
  background: #fff; border: 1px solid var(--border-light);
  border-radius: var(--radius-lg); padding: 36px 28px;
  transition: all var(--transition);
  position: relative;
}
.component-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.component-card .card-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.3rem; margin-bottom: 20px;
}
.component-card .card-icon.bench { background: linear-gradient(135deg, #e8f0fe, #d0e1ff); color: var(--primary); }
.component-card .card-icon.corpus { background: linear-gradient(135deg, #e6f9ed, #ccf5d9); color: #059669; }
.component-card .card-icon.srt { background: linear-gradient(135deg, #fef3e8, #fee4cc); color: #d97706; }
.component-card h3 {
  font-size: 1.2rem; font-weight: 700; margin-bottom: 10px;
  color: var(--text);
}
.component-card .card-stat {
  display: inline-block;
  padding: 4px 12px; border-radius: 8px;
  font-size: 0.78rem; font-weight: 700;
  margin-bottom: 14px;
}
.component-card .card-stat.bench { background: #e8f0fe; color: var(--primary); }
.component-card .card-stat.corpus { background: #e6f9ed; color: #059669; }
.component-card .card-stat.srt { background: #fef3e8; color: #d97706; }
.component-card p { font-size: 0.92rem; color: var(--text-light); line-height: 1.7; overflow-wrap: break-word; }

/* ---------- Image Showcase ---------- */
.img-showcase {
  text-align: center; margin: 48px 0;
}
.img-showcase img {
  max-width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: all var(--transition);
}
.img-showcase img:hover {
  box-shadow: var(--shadow-lg);
  transform: scale(1.01);
}
.img-caption {
  margin-top: 16px; font-size: 0.88rem;
  color: var(--text-light); line-height: 1.6;
  overflow-wrap: break-word;
  word-wrap: break-word;
}
.img-caption-lg {
  margin-top: 16px; font-size: 0.95rem;
  color: var(--text-light); line-height: 1.7;
  text-align: center;
}

/* ---------- Two-Column ---------- */
.two-col {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px;
  align-items: start;
}

/* ---------- Leaderboard ---------- */
.leaderboard-controls {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
  margin-bottom: 32px;
}
.lb-filter {
  padding: 8px 20px; border-radius: 10px;
  font-size: 0.85rem; font-weight: 600;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  transition: all var(--transition);
}
.lb-filter:hover, .lb-filter.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.leaderboard-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.leaderboard {
  width: 100%; border-collapse: collapse;
  font-size: 0.9rem;
  background: #fff;
}
.leaderboard thead {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
}
.leaderboard th {
  padding: 16px 18px; font-weight: 600;
  text-align: left; white-space: nowrap;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.leaderboard td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-light);
  transition: background var(--transition);
}
.leaderboard tbody tr { transition: all var(--transition); }
.leaderboard tbody tr:hover { background: #f8f9ff; }
.leaderboard .rank {
  font-weight: 800; text-align: center; width: 52px;
  font-size: 1rem;
}
.leaderboard .rank-1 { color: #ffd700; }
.leaderboard .rank-2 { color: #c0c0c0; }
.leaderboard .rank-3 { color: #cd7f32; }
.leaderboard .model-name { font-weight: 700; }
.leaderboard .type-badge {
  display: inline-block; padding: 3px 10px;
  border-radius: 6px; font-size: 0.75rem; font-weight: 700;
}
.type-closed { background: #e8f0fe; color: var(--primary); }
.type-open { background: #f3e8ff; color: #7c3aed; }
.type-ours { background: #fef3e8; color: #d97706; }
.type-human { background: #e6f9ed; color: #059669; }
.leaderboard .highlight-val {
  color: var(--accent); font-weight: 800; font-size: 1rem;
}
.leaderboard .ours-row {
  background: linear-gradient(90deg, rgba(255,209,102,0.08), rgba(255,209,102,0.04));
}
.leaderboard .ours-row:hover { background: rgba(255,209,102,0.15); }
.leaderboard .human-row {
  background: linear-gradient(90deg, rgba(6,214,160,0.08), rgba(6,214,160,0.04));
}

.section-dark .leaderboard { background: var(--bg-dark-alt); }
.section-dark .leaderboard td { border-bottom-color: rgba(255,255,255,0.06); color: var(--text-white); }
.section-dark .leaderboard tbody tr:hover { background: rgba(67,97,238,0.08); }
.section-dark .leaderboard .ours-row { background: rgba(255,209,102,0.06); }
.section-dark .leaderboard .ours-row:hover { background: rgba(255,209,102,0.12); }
.section-dark .leaderboard .human-row { background: rgba(6,214,160,0.06); }

/* ---------- Key Findings ---------- */
.findings-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
  margin-bottom: 56px;
}
.finding-card {
  background: #fff; border-radius: var(--radius-lg);
  padding: 32px 28px;
  border: 1px solid var(--border-light);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.finding-card::before {
  content: '';
  position: absolute; top: 0; left: 0; bottom: 0;
  width: 4px;
}
.finding-card.f-gap::before { background: linear-gradient(180deg, var(--accent), #ff6b9d); }
.finding-card.f-abstract::before { background: linear-gradient(180deg, var(--primary), var(--primary-light)); }
.finding-card.f-scale::before { background: linear-gradient(180deg, #d97706, #fbbf24); }
.finding-card.f-train::before { background: linear-gradient(180deg, var(--success), #34d399); }
.finding-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.finding-card .finding-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.1rem; margin-bottom: 16px;
}
.finding-card.f-gap .finding-icon { background: rgba(247,37,133,0.1); color: var(--accent); }
.finding-card.f-abstract .finding-icon { background: rgba(67,97,238,0.1); color: var(--primary); }
.finding-card.f-scale .finding-icon { background: rgba(217,119,6,0.1); color: #d97706; }
.finding-card.f-train .finding-icon { background: rgba(6,214,160,0.1); color: var(--success); }
.finding-card h4 {
  font-size: 1rem; font-weight: 700; margin-bottom: 8px;
  color: var(--text);
}
.finding-card p { font-size: 0.9rem; color: var(--text-light); line-height: 1.6; }

/* ---------- Key Insight Callout ---------- */
.key-insight-box {
  background: linear-gradient(135deg, #f0f4ff 0%, #e8f0fe 100%);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 24px 28px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}
.key-insight-header {
  display: flex; align-items: center; gap: 8px;
  font-size: 1rem; font-weight: 700;
  color: var(--primary);
  margin-bottom: 10px;
}
.key-insight-header i { font-size: 1.1rem; color: #d97706; }
.key-insight-box p {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.7;
  margin: 0;
}

/* ---------- SRT Section ---------- */
.srt-ops {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  margin-bottom: 40px;
}
.srt-op {
  background: #fff; border-radius: var(--radius);
  padding: 28px 24px; text-align: center;
  border: 1px solid var(--border-light);
  transition: all var(--transition);
}
.srt-op:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.srt-op .op-symbol {
  width: 48px; height: 48px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.2rem; font-weight: 800; margin-bottom: 14px;
}
.srt-op.correlate .op-symbol { background: rgba(67,97,238,0.1); color: var(--primary); }
.srt-op.constrain .op-symbol { background: rgba(217,119,6,0.1); color: #d97706; }
.srt-op.infer .op-symbol { background: rgba(6,214,160,0.1); color: var(--success); }
.srt-op h4 { font-size: 1rem; font-weight: 700; margin-bottom: 6px; }
.srt-op p { font-size: 0.85rem; color: var(--text-light); }

/* Code Block */
.code-block {
  background: #1e1e2e; color: #cdd6f4; border-radius: var(--radius-lg);
  padding: 28px 32px; overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.84rem; line-height: 1.7;
  box-shadow: var(--shadow-lg);
  position: relative;
}
.code-block .key { color: #89b4fa; }
.code-block .str { color: #a6e3a1; }
.code-block .bracket { color: #f5c2e7; }
.code-block .comment { color: #6c7086; font-style: italic; }

/* ---------- Download / Access Section ---------- */
.access-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px;
  max-width: 700px; margin: 0 auto;
}
.access-card {
  background: #fff; border: 1px solid var(--border-light);
  border-radius: var(--radius-lg); padding: 36px 28px;
  text-align: center;
  transition: all var(--transition);
}
.access-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.access-card .access-icon {
  width: 64px; height: 64px;
  border-radius: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.6rem; margin-bottom: 20px;
}
.access-card .access-icon.github { background: #24292e; color: #fff; }
.access-card .access-icon.hf { background: linear-gradient(135deg, #ff9d00, #ffb347); color: #1a1a2e; }
.access-card .access-icon.paper { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; }
.access-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.access-card p { font-size: 0.88rem; color: var(--text-light); margin-bottom: 20px; line-height: 1.6; }
.access-card .btn-sm {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 24px; border-radius: 10px;
  font-size: 0.88rem; font-weight: 600;
  transition: all var(--transition);
  text-decoration: none;
}
.btn-sm.btn-dark { background: #24292e; color: #fff; }
.btn-sm.btn-dark:hover { background: #1a1a2e; color: #fff; }
.btn-sm.btn-orange { background: #ff9d00; color: #1a1a2e; }
.btn-sm.btn-orange:hover { background: #e68d00; color: #1a1a2e; }
.btn-sm.btn-blue { background: var(--primary); color: #fff; }
.btn-sm.btn-blue:hover { background: var(--primary-dark); color: #fff; }

/* ---------- Comparison Table ---------- */
.comparison-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  background: #fff;
}
.comparison-table {
  width: 100%; border-collapse: collapse; font-size: 0.88rem;
}
.comparison-table thead th {
  background: var(--bg-alt); padding: 14px 16px;
  font-weight: 700; text-align: left; font-size: 0.82rem;
  color: var(--text); border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.comparison-table thead th:nth-child(n+4) { text-align: center; }
.comparison-table tbody td {
  padding: 12px 16px; border-bottom: 1px solid var(--border-light);
  color: var(--text-light); vertical-align: middle;
}
.comparison-table tbody td:nth-child(n+4) { text-align: center; }
.comparison-table tbody tr:hover { background: #f8f9fc; }
.comparison-table .check-yes { color: #22c55e; font-size: 1.1rem; font-weight: 700; }
.comparison-table .check-no { color: #ef4444; font-size: 1.1rem; font-weight: 700; }
.comparison-table .ours-row { background: #f0f4ff; font-weight: 700; }
.comparison-table .ours-row td { color: var(--text); font-weight: 700; }
.comparison-table .ours-row:hover { background: #e8edff; }

/* ---------- Citation ---------- */
.citation-block {
  background: var(--bg-alt); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px 32px;
  font-family: var(--font-mono);
  font-size: 0.82rem; line-height: 1.8;
  position: relative; overflow-x: auto;
  max-width: 800px; margin: 0 auto;
}
.citation-block pre { white-space: pre-wrap; word-break: break-word; overflow-wrap: break-word; }
.copy-btn {
  position: absolute; top: 14px; right: 14px;
  background: var(--primary); color: #fff;
  border: none; border-radius: 8px;
  padding: 8px 16px; font-size: 0.8rem;
  cursor: pointer; transition: all var(--transition);
  font-weight: 600;
}
.copy-btn:hover { background: var(--primary-dark); transform: translateY(-1px); }

/* ---------- License ---------- */
.license-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px;
  max-width: 600px; margin: 0 auto;
}
.license-item {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--border-light);
  font-size: 0.92rem;
}
.license-item .check { color: var(--success); font-weight: bold; }
.license-item .cross { color: var(--accent); font-weight: bold; }

/* ---------- Footer ---------- */
.footer {
  background: var(--bg-dark); color: rgba(255,255,255,0.6);
  padding: 60px 0 40px; text-align: center;
}
.footer-links {
  display: flex; justify-content: center; gap: 40px;
  margin-bottom: 24px; flex-wrap: wrap;
}
.footer-links a {
  color: rgba(255,255,255,0.5);
  font-size: 0.9rem; font-weight: 500;
  transition: color var(--transition);
  display: inline-flex; align-items: center; gap: 8px;
}
.footer-links a:hover { color: #fff; }
.footer p { font-size: 0.85rem; }
.footer .footer-brand {
  font-size: 1.3rem; font-weight: 800; color: #fff;
  margin-bottom: 16px;
}
.footer .footer-brand span { color: var(--primary-light); }

/* ---------- Scroll to Top ---------- */
.scroll-top {
  position: fixed; bottom: 32px; right: 32px;
  width: 48px; height: 48px;
  border-radius: 14px;
  background: var(--primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  opacity: 0; transform: translateY(20px);
  transition: all var(--transition);
  z-index: 999;
  box-shadow: 0 4px 20px rgba(67,97,238,0.3);
  border: none;
}
.scroll-top.visible { opacity: 1; transform: translateY(0); }
.scroll-top:hover { transform: translateY(-3px); box-shadow: 0 6px 30px rgba(67,97,238,0.5); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .components-grid { grid-template-columns: 1fr; max-width: 500px; margin-left: auto; margin-right: auto; margin-top: 48px; }
  .access-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
  .srt-ops { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto 40px; }
}
@media (max-width: 900px) {
  .findings-grid { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2.8rem; }
  .hero .subtitle { font-size: 1.05rem; }
  .section-title { font-size: 2rem; }
  .section { padding: 72px 0; }
}
@media (max-width: 600px) {
  .nav-links { display: none; }
  .nav-links.active {
    display: flex; flex-direction: column;
    position: absolute; top: 68px; left: 0; width: 100%;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(20px);
    padding: 20px 24px; gap: 8px;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  }
  .nav-hamburger { display: block; }
  .stats-row { grid-template-columns: 1fr 1fr; gap: 16px; }
  .hero { padding: 110px 0 60px; }
  .hero h1 { font-size: 2.2rem; letter-spacing: -1px; }
  .hero-buttons { flex-direction: column; align-items: center; }
  .hero-badges { gap: 8px; }
  .hero-badge { padding: 8px 14px; font-size: 0.8rem; }
  .stat-number { font-size: 2rem; }
  .license-grid { grid-template-columns: 1fr; }
  .leaderboard-controls { gap: 8px; }
  .lb-filter { padding: 6px 14px; font-size: 0.8rem; }
}
