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

:root {
  --bg:  #080a0f;
  --bg2: #0d1117;
  --bg3: #131920;
  --amber:     #f59e0b;
  --amber-dim: #7c5108;
  --cyan:      #22d3ee;
  --cyan-dim:  #0e5a66;
  --green:     #10b981;
  --green-dim: #064e3b;
  --red:       #ef4444;
  --text:      #f1f5f9;
  --text-dim:  #64748b;
  --text-mid:  #d1d9e0;
  --border:    rgba(255,255,255,0.07);
  --font-head: 'Syne', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--cyan); text-decoration: none; transition: color 0.2s var(--ease); }
a:hover { color: var(--amber); }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--amber-dim); border-radius: 2px; }

/* ===== NAV ===== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(8, 10, 15, 0.92);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid rgba(245, 158, 11, 0.15);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 1.5rem;
}

.brand {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--amber);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.brand:hover { color: #fff; text-decoration: none; }
.brand-alipay {
  color: #1677ff;
  margin-right: 0.3rem;
}

.nav-links {
  display: flex;
  gap: 0.15rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  padding: 0.35rem 0.6rem;
  border-radius: 3px;
  transition: all 0.2s var(--ease);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--amber);
  background: rgba(245, 158, 11, 0.08);
  text-decoration: none;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0.25rem;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  overflow: hidden;
  text-align: center;
  padding-top: 56px;
}

/* dot grid */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.10) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 50%, black 0%, transparent 70%);
  mask-image: radial-gradient(ellipse 60% 55% at 50% 50%, black 0%, transparent 70%);
  pointer-events: none;
}

#waveform {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding: 3rem 2rem 2rem;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--cyan);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--cyan-dim);
  padding: 0.3rem 0.9rem;
  border-radius: 4px;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-family: var(--font-head);
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 0.75rem;
}

.hero h1 .solid { color: #fff; }

.hero h1 .outline {
  color: transparent;
  -webkit-text-stroke: 2px var(--amber);
}

.hero-authors {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 0.4rem;
  letter-spacing: 0.01em;
}

.hero-institution {
  font-size: 0.75rem;
  color: var(--text);
  margin-bottom: 1.5rem;
  letter-spacing: 0.01em;
}

.hero-actions {
  display: flex;
  gap: 0.7rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-cta {
  display: inline-block;
  background: var(--amber);
  color: var(--bg);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.78rem;
  padding: 0.55rem 1.5rem;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: all 0.2s var(--ease);
}
.btn-cta:hover {
  color: var(--bg);
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.4);
  transform: translateY(-1px);
  text-decoration: none;
}

.btn-ghost {
  display: inline-block;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.55rem 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: all 0.2s var(--ease);
}
.btn-ghost:hover {
  border-color: var(--amber-dim);
  color: var(--amber);
  text-decoration: none;
}

/* ===== STATS BAND ===== */
.stats-band {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 1.5rem;
}

.stats-inner {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.stat {
  text-align: center;
  position: relative;
  padding-top: 0.5rem;
}

.stat-bar {
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 2px;
  background: linear-gradient(90deg, var(--amber), var(--amber-dim));
  border-radius: 1px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s var(--ease);
}

.stat.revealed .stat-bar { transform: scaleX(1); }

.stat-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--amber);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  display: block;
  font-size: 0.65rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 0.25rem;
  font-weight: 500;
}

/* ===== SECTIONS ===== */
.section {
  padding: 4.5rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.section-title {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 1.2rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--amber);
  display: inline-block;
}

.section p {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 0.85rem;
}

/* ===== FINDINGS LIST ===== */
.findings-list {
  list-style: none;
  margin: 0.5rem 0 0.85rem;
  padding: 0;
}

.findings-list li {
  position: relative;
  padding: 0.4rem 0 0.4rem 1.4rem;
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.6;
}

.findings-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.75rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
}

.findings-list li strong {
  color: var(--text);
}

/* ===== NEWS ===== */
.news-list { list-style: none; }

.news-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text);
}

.news-list li:last-child { border-bottom: none; }

.news-date {
  font-weight: 600;
  color: var(--amber);
  margin-right: 0.5rem;
  font-variant-numeric: tabular-nums;
  font-size: 0.78rem;
}

.visitor-badge { margin-bottom: 0.75rem; }
.visitor-badge img { border-radius: 3px; vertical-align: middle; }

/* ===== INFO BOX ===== */
.info-box {
  background: rgba(245, 158, 11, 0.03);
  border: 1px solid rgba(245, 158, 11, 0.08);
  border-left: 3px solid var(--amber);
  border-radius: 2px;
  padding: 0.9rem 1.1rem;
  margin-bottom: 1.2rem;
  font-size: 0.82rem;
  color: var(--text);
  line-height: 1.7;
}

.info-box strong { color: var(--amber); }
.info-box em { color: var(--text); font-style: italic; }

/* ===== FILTER TABS ===== */
.filter-bar {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.filter-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-right: 0.3rem;
}

.filter-btn {
  font-family: var(--font-mono);
  padding: 0.3rem 0.8rem;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
  color: var(--text-dim);
  font-size: 0.68rem;
  font-weight: 500;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  transition: all 0.2s var(--ease);
}

.filter-btn:hover {
  border-color: var(--amber-dim);
  color: var(--amber);
}

.filter-btn.active {
  background: var(--amber);
  color: var(--bg);
  border-color: var(--amber);
  font-weight: 600;
}

/* ===== CONTENT TABS ===== */
.content-tabs {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem 0;
}

.tab-bar {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid rgba(245, 158, 11, 0.15);
}

.tab-btn {
  font-family: var(--font-mono);
  padding: 0.6rem 1.4rem;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--text-dim);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: all 0.2s var(--ease);
}

.tab-btn:hover {
  color: var(--text);
}

.tab-btn.active {
  color: var(--amber);
  border-bottom-color: var(--amber);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* ===== TABLES ===== */
.table-wrap {
  border: 1px solid rgba(245, 158, 11, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin: 1rem 0;
  background: var(--bg2);
}

.table-scroll {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

thead {
  background: rgba(245, 158, 11, 0.06);
  position: sticky;
  top: 0;
  z-index: 2;
}

thead th {
  padding: 0.6rem 0.8rem;
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  text-transform: uppercase;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: var(--amber);
  border-bottom: 1px solid rgba(245, 158, 11, 0.15);
  transition: color 0.2s var(--ease);
}

thead th:hover { color: #fff; }

thead th .sort-icon {
  margin-left: 4px;
  font-size: 0.55rem;
  opacity: 0.3;
  transition: opacity 0.2s var(--ease);
}

thead th.sort-asc .sort-icon,
thead th.sort-desc .sort-icon {
  opacity: 1;
  color: var(--amber);
}

tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.2s var(--ease);
}

tbody tr:hover {
  background: rgba(245, 158, 11, 0.04);
}

tbody td {
  padding: 0.6rem 0.8rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.table-note {
  font-size: 0.68rem;
  color: var(--text-dim);
  margin-top: 0.6rem;
}

/* Rank column */
.rank-col {
  width: 50px;
  text-align: center;
}

.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.68rem;
  transition: transform 0.2s var(--ease);
}

tbody tr:hover .rank-badge { transform: scale(1.1); }

.rank-1 {
  background: var(--amber);
  color: var(--bg);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.35);
}

.rank-2 {
  background: var(--text-mid);
  color: var(--bg);
}

.rank-3 {
  background: #ea580c;
  color: #fff;
}

.rank-other {
  background: var(--bg3);
  color: var(--text-dim);
  border: 1px solid var(--border);
}

/* Model name */
.model-name {
  font-weight: 600;
  color: var(--text);
  min-width: 120px;
}

/* Numeric columns */
.num-col {
  text-align: center;
  min-width: 70px;
}

/* Best value highlights */
.best-rank {
  color: var(--red) !important;
  font-weight: 700;
}

.best-mae {
  color: var(--amber) !important;
  font-weight: 700;
}

/* Nested group header */
.group-header {
  text-align: center;
  border-bottom: 1px solid var(--border);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--amber);
}

/* First-place row highlight */
.row-highlight {
  background: rgba(245, 158, 11, 0.08);
}
.row-highlight td {
  color: var(--amber);
  font-weight: 600;
}

/* ===== BADGES ===== */
.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.badge-dl {
  background: rgba(34, 211, 238, 0.12);
  color: var(--cyan);
}

.badge-fm {
  background: rgba(16, 185, 129, 0.12);
  color: var(--green);
}

.badge-stat {
  background: rgba(245, 158, 11, 0.12);
  color: var(--amber);
}

/* Level badges */
.lvl {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.lvl-high {
  background: rgba(16, 185, 129, 0.12);
  color: var(--green);
}

.lvl-low {
  background: rgba(239, 68, 68, 0.1);
  color: var(--red);
}

/* ===== CITATION ===== */
.bibtex-wrap {
  position: relative;
  margin-top: 1rem;
}

.bibtex {
  background: var(--bg2);
  color: var(--text);
  padding: 1.25rem 1.5rem;
  border-radius: 6px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  line-height: 1.7;
  white-space: pre;
  border: 1px solid var(--border);
}

.copy-btn {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  background: var(--amber);
  color: var(--bg);
  border: none;
  padding: 0.3rem 0.7rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

.copy-btn:hover {
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.3);
}

.copy-btn.copied {
  background: var(--green);
}

/* ===== VISITOR MAP ===== */
.visitor-map-center {
  text-align: center;
}

.visitor-map-center .section-title {
  display: inline-block;
}

.globe-container {
  display: flex;
  justify-content: center;
  margin-top: 0.5rem;
  max-width: 300px;
  max-height: 300px;
  margin-left: auto;
  margin-right: auto;
}

.globe-placeholder { opacity: 0.5; }

/* ===== FOOTER ===== */
.site-footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 2rem 1.5rem;
  font-size: 0.7rem;
  color: var(--text-dim);
}

.site-footer a { color: var(--text); }
.site-footer a:hover { color: var(--amber); }

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .hero h1 { font-size: clamp(2.5rem, 12vw, 4rem); }

  .stats-inner { grid-template-columns: repeat(2, 1fr); }

  .stat-num { font-size: 2rem; }

  .header-inner { height: 48px; }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 48px;
    left: 0; right: 0;
    background: rgba(8, 10, 15, 0.95);
    backdrop-filter: blur(12px);
    padding: 0.5rem 1rem;
    border-bottom: 1px solid var(--border);
  }

  .nav-links.open { display: flex; }

  .menu-toggle { display: block; }

  .section { padding: 3rem 1.25rem; }

  .section-title { font-size: 1.25rem; }

  .model-name { min-width: 100px; }
  .num-col { min-width: 55px; }
}

@media (max-width: 480px) {
  .stats-inner { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
  .stat-num { font-size: 1.7rem; }
  .hero-actions { flex-direction: column; align-items: center; }
}
