/* ===========================================================
   Animation2Code — clean, minimal theme
   Lead colors: #0065D8 (blue) + #C4E0FF (light blue)
   Contrast accent: #FF6A3D (coral), used sparingly.
   =========================================================== */

:root {
  --primary-color: #0065D8;      /* lead blue */
  --primary-hover: #0050AC;      /* darker blue */
  --light-blue: #C4E0FF;         /* lead light blue */
  --light-blue-50: #EAF3FF;      /* tint */
  --accent-color: #0065D8;
  --accent-2: #FF6A3D;           /* coral — contrast pop */
  --ink: #0B2239;                /* deep navy text */

  --text-primary: #0B2239;
  --text-secondary: #51637A;
  --text-light: #93A4B8;
  --border-color: #E3EAF2;

  --background-primary: #ffffff;
  --background-secondary: #F7FAFD;
  --background-accent: #EFF5FC;

  --gradient-primary: linear-gradient(120deg, #0065D8 0%, #3D93FF 100%);
  --gradient-accent: linear-gradient(120deg, #0065D8 0%, #3D93FF 100%);
  --gradient-hero: linear-gradient(180deg, #EAF3FF 0%, #ffffff 100%);

  --shadow-sm: 0 1px 2px 0 rgb(11 34 57 / 0.04);
  --shadow-md: 0 4px 12px -2px rgb(11 34 57 / 0.08);
  --shadow-lg: 0 12px 28px -6px rgb(11 34 57 / 0.12);
  --shadow-xl: 0 24px 48px -12px rgb(11 34 57 / 0.16);

  --border-radius: 10px;
  --border-radius-lg: 14px;
}

body { color: var(--text-primary); }

/* ---------- Hero ---------- */
.hero.publication-header {
  background: var(--gradient-hero);
  position: relative;
  border-bottom: 1px solid var(--border-color);
}
.hero.publication-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 15% 20%, rgba(196, 224, 255, 0.55) 0, transparent 40%),
    radial-gradient(circle at 85% 15%, rgba(0, 101, 216, 0.08) 0, transparent 42%);
  pointer-events: none;
}
.hero.publication-header .hero-body { position: relative; z-index: 1; }

.publication-title {
  font-weight: 800 !important;
  letter-spacing: -0.025em;
  color: var(--ink) !important;
}
.title-favicon {
  height: 0.82em;
  width: auto;
  vertical-align: -0.06em;
  margin-right: 0.32em;
  border-radius: 22%;
}
.publication-title .mono {
  font-family: 'JetBrains Mono', 'SF Mono', 'Cascadia Code', monospace;
  color: var(--primary-color);
}
.publication-subtitle {
  font-size: 1.3rem !important;
  font-weight: 600;
  color: var(--text-secondary);
  margin: -1rem 0 2rem !important;
  line-height: 1.4;
}

.affil-pill {
  display: inline-block;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 1rem;
  margin-top: 0.25rem;
}

/* Compact header spacing */
.publication-header .hero-body { padding: 3.25rem 1.5rem 2.5rem !important; }
.publication-title { margin-bottom: 1rem !important; }
.publication-subtitle { margin: -0.5rem 0 1.25rem !important; }
.publication-header .publication-authors { margin-bottom: 0.75rem; }
.publication-header .publication-links { margin-top: 1.25rem; }

/* ---------- Buttons: live + coming soon ---------- */
.button.is-live {
  background: var(--primary-color) !important;
  color: #fff !important;
  border: 2px solid var(--primary-color) !important;
  box-shadow: var(--shadow-sm);
}
.button.is-live:hover { background: var(--primary-hover) !important; border-color: var(--primary-hover) !important; transform: translateY(-2px); }

.button.is-soon {
  background: #fff !important;
  color: var(--text-light) !important;
  border: 1.5px dashed var(--border-color) !important;
  box-shadow: none !important;
  cursor: not-allowed;
}
.button.is-soon:hover { transform: none; }
.button.is-soon .tag-soon {
  margin-left: 0.45rem;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--light-blue-50);
  color: var(--primary-color);
  padding: 0.12rem 0.4rem;
  border-radius: 5px;
}

/* ---------- Section title underline (minimal) ---------- */
.title.is-3::after {
  background: var(--primary-color);
  width: 44px;
  height: 3px;
}

/* ---------- Stat cards ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1rem;
  margin: 1rem 0 0.5rem;
}
.stat-card {
  background: var(--background-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 1.6rem 1rem;
  text-align: center;
  transition: var(--transition);
}
.stat-card:hover { border-color: var(--light-blue); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.stat-card .stat-num {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--primary-color);
  line-height: 1.1;
}
.stat-card .stat-label {
  margin-top: 0.4rem;
  font-size: 0.92rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ---------- Contribution / highlight cards ---------- */
.highlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
  text-align: left;
}
.highlight-card {
  background: var(--background-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 1.6rem;
  transition: var(--transition);
}
.highlight-card:hover { border-color: var(--light-blue); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.highlight-card .hl-icon {
  width: 44px; height: 44px;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  background: var(--light-blue-50);
  color: var(--primary-color); font-size: 1.15rem;
  border: 1px solid var(--light-blue);
  margin-bottom: 1rem;
}
.highlight-card h3 {
  font-size: 1.08rem; font-weight: 700; color: var(--text-primary);
  margin-bottom: 0.5rem;
}
.highlight-card p { color: var(--text-secondary); font-size: 0.96rem; margin: 0; }

/* ---------- Figure blocks ---------- */
.figure-block { text-align: center; margin: 0 auto; max-width: 1000px; }
.figure-block img {
  width: 100%;
  background: #fff;
}
.figure-caption {
  margin-top: 1rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.figure-caption b { color: var(--text-primary); }

/* ---------- Results table ---------- */
.results-table-wrap { overflow-x: auto; }
table.results {
  width: 100%;
  border-collapse: collapse;
  background: var(--background-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  font-size: 0.95rem;
}
table.results th, table.results td {
  padding: 0.7rem 0.9rem;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}
table.results thead th {
  background: var(--primary-color);
  color: #fff;
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
table.results td.model, table.results th.model { text-align: left; font-weight: 500; }
table.results tr.group-row td {
  background: var(--light-blue-50);
  font-weight: 700;
  color: var(--primary-color);
  text-align: left;
  text-transform: uppercase;
  font-size: 0.76rem;
  letter-spacing: 0.05em;
}
table.results td.best { font-weight: 800; color: var(--accent-2); }
table.results tbody tr:hover td { background: var(--background-accent); }
table.results tbody tr:hover td.best { background: var(--background-accent); }
.results-note { font-size: 0.9rem; color: var(--text-secondary); margin-top: 1rem; }

/* ---------- Dashboard CTA ---------- */
.dashboard-cta {
  background: var(--gradient-primary);
  border-radius: var(--border-radius-lg);
  padding: 2.5rem;
  color: #fff;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.dashboard-cta h2 { color: #fff !important; margin-bottom: 0.75rem; }
.dashboard-cta h2::after { display: none; }
.dashboard-cta p { color: rgba(255,255,255,0.92); font-size: 1.1rem; margin-bottom: 1.5rem; }
.dashboard-cta .button {
  background: #fff !important;
  color: var(--primary-color) !important;
  font-weight: 700 !important;
  border: none !important;
}
.dashboard-cta .button:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.dashboard-cta .dashboard-note {
  margin: 1.25rem auto 0 !important;
  max-width: 620px;
  font-size: 0.78rem !important;
  line-height: 1.5 !important;
  color: rgba(255,255,255,0.78) !important;
}
.dashboard-cta .dashboard-note a { color: #fff; text-decoration: underline; }

/* ---------- Takeaway callout ---------- */
.takeaway {
  background: var(--background-primary);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent-2);
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
  padding: 1rem 1.25rem;
  margin: 1.5rem auto 0;
  max-width: 760px;
  text-align: left;
  color: var(--text-secondary);
}
.takeaway b { color: var(--text-primary); }

/* ---------- Misc minimal tweaks ---------- */
.hero.is-light { background: var(--background-secondary); }
.scroll-to-top, .copy-bibtex-btn { background: var(--primary-color); }
.scroll-to-top:hover, .copy-bibtex-btn:hover { background: var(--primary-hover); }
.button.is-dark:hover { background: var(--primary-color) !important; }

@media screen and (max-width: 768px) {
  .publication-subtitle { font-size: 1.08rem !important; }
  .dashboard-cta { padding: 1.75rem; }
}
