:root {
  --bg: #ffffff;
  --bg-alt: #f7f5fb;
  --ink: #26222e;
  --ink-soft: #5f5870;
  --line: #e7e2ef;
  --accent: #7c5fc0;      /* MERT / feature-extraction purple */
  --accent-2: #c94f6d;    /* mixture-of-experts pink */
  --accent-soft: #ede6f7; /* pale purple */
  --pink-soft: #f7dfe0;   /* pale MoE pink */
  --yellow-soft: #f5f0d8; /* transcription-cue cream */
  --gold: #c99a3a;
  --radius: 14px;
  --maxw: 1440px;
  --shadow: 0 1px 2px rgba(40, 30, 60, .05), 0 8px 24px rgba(40, 30, 60, .07);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 92%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(16px, 3vw, 48px);
}
.container.narrow { max-width: 820px; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.mono { font-family: "JetBrains Mono", monospace; }

/* ---------- HERO ---------- */
.hero {
  background:
    radial-gradient(90% 80% at 18% -10%, var(--accent-soft) 0%, transparent 55%),
    radial-gradient(90% 80% at 85% -10%, var(--pink-soft) 0%, transparent 55%),
    linear-gradient(180deg, #fff 0%, var(--bg-alt) 100%);
  border-bottom: 1px solid var(--line);
  padding: 76px 0 60px;
  text-align: center;
}
.venue {
  font-size: 13px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 18px;
}
.title {
  font-family: "Newsreader", Georgia, serif;
  font-weight: 600;
  font-size: clamp(28px, 4.4vw, 46px);
  line-height: 1.18;
  letter-spacing: -0.01em;
  margin: 0 auto 26px;
  max-width: 900px;
}
.authors {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  justify-content: center;
  margin-bottom: 14px;
}
.author { font-size: 17px; color: var(--ink-soft); font-weight: 500; }
.author sup { font-size: 11px; color: var(--accent); font-weight: 600; }
.author:not(:last-child)::after {
  content: "\00B7";
  margin-left: 22px;
  color: var(--line);
}

.affiliations {
  max-width: 720px;
  margin: 0 auto 30px;
}
.affiliations p {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 3px 0;
  line-height: 1.5;
}
.affiliations sup { color: var(--accent); font-weight: 600; }
.affiliations .emails {
  margin-top: 8px;
  font-family: "JetBrains Mono", monospace;
  font-size: 12.5px;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  border: 1px solid var(--ink);
  transition: transform .12s ease, box-shadow .12s ease, opacity .12s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); text-decoration: none; }
.btn .ico { font-size: 15px; }
.btn[aria-disabled="true"] {
  background: #fff;
  color: var(--ink-soft);
  border-color: var(--line);
  cursor: not-allowed;
  pointer-events: none;
  opacity: .7;
}
/* keep the dataset anchor clickable so it can scroll to its section */
.btn[data-link="dataset"] { pointer-events: auto; cursor: pointer; }
.badge {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  padding: 2px 8px;
  margin-left: 2px;
}

/* ---------- SECTIONS ---------- */
.section { padding: 68px 0; border-bottom: 1px solid var(--line); }
.section.alt { background: var(--bg-alt); }
.section h2 {
  font-family: "Newsreader", Georgia, serif;
  font-weight: 600;
  font-size: 30px;
  margin: 0 0 24px;
  letter-spacing: -0.01em;
}
.section.alt h2, .section h2 { text-align: center; }
.container.narrow h2 { text-align: center; }
.section p { color: var(--ink-soft); font-size: 17px; text-align: center; }
.container.narrow > p { text-align: center; }
.section-lead { max-width: 760px; margin-left: auto; margin-right: auto; }

/* ---------- CARDS ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: transform .15s ease;
  text-align: center;
}
.card:hover { transform: translateY(-3px); }
.card-ico { font-size: 26px; margin-bottom: 10px; }
.card h3 { margin: 0 0 8px; font-size: 18px; }
.card p { margin: 0; font-size: 15px; line-height: 1.55; }

/* ---------- TALK VIDEO ---------- */
.video-figure { margin: 0 auto; max-width: 960px; text-align: center; }
.video-figure video {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}
.video-figure figcaption {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 14px auto 0;
  line-height: 1.55;
}

/* ---------- ARCHITECTURE FIGURE ---------- */
.method-body > p { max-width: 60ch; margin-left: auto; margin-right: auto; }
.arch-figure { margin: 34px 0 10px; text-align: center; }
.arch-figure img {
  display: block;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 10px;
  box-shadow: var(--shadow);
}
.arch-figure figcaption {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 14px auto 0;
  max-width: 820px;
  text-align: center;
  line-height: 1.55;
}

.caption {
  font-size: 14px !important;
  color: var(--ink-soft);
  font-style: italic;
  margin-top: 14px;
}

/* ---------- TABLE ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); background:#fff; box-shadow: var(--shadow); }
.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  min-width: 640px;
}
.results-table th, .results-table td {
  padding: 12px 14px;
  text-align: center;
  border-bottom: 1px solid var(--line);
}
.results-table th {
  background: var(--bg-alt);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .02em;
  color: var(--ink-soft);
}
.results-table td:first-child, .results-table th:first-child { text-align: left; font-weight: 500; }
.results-table tbody tr:last-child td { border-bottom: none; }
.results-table tr.ours { background: var(--accent-soft); }
.results-table tr.ours td:first-child { color: var(--accent); font-weight: 700; }
.results-table td.best { font-weight: 700; color: var(--accent-2); }

/* ---------- CHARTS ---------- */
.chart-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 34px;
}
.chart-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  margin: 0;
  min-width: 0;
}
.chart-card.wide { margin-top: 20px; }
.chart-card h3 { margin: 0 0 4px; font-size: 18px; }
.chart-card .caption { margin-top: 4px; margin-bottom: 8px; }
.chart-controls { margin: 10px 0 6px; }
.chart-controls label { font-size: 14px; color: var(--ink-soft); font-weight: 500; }
.chart-controls select {
  font: inherit;
  font-size: 14px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  margin-left: 6px;
}
.canvas-wrap { position: relative; height: 300px; }
.canvas-wrap.tall { height: 380px; }

/* ---------- STATS ---------- */
.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 26px 0;
}
.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 14px;
  text-align: center;
  box-shadow: var(--shadow);
}
.stat .num { display: block; font-size: 28px; font-weight: 700; color: var(--accent); font-family: "Newsreader", serif; }
.stat .lbl { display: block; font-size: 13px; color: var(--ink-soft); margin-top: 4px; }

/* ---------- NOTICE ---------- */
.notice {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--accent-soft);
  border: 1px solid #d9cbef;
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-top: 22px;
}
.notice-ico { font-size: 22px; line-height: 1.4; }
.notice div { font-size: 15px; color: var(--ink); line-height: 1.6; }
.notice strong { color: var(--accent); }

/* ---------- CITATION ---------- */
.bibtex {
  background: #16161a;
  color: #e8e8ef;
  padding: 20px;
  border-radius: var(--radius);
  overflow-x: auto;
  font-family: "JetBrains Mono", monospace;
  font-size: 13.5px;
  line-height: 1.6;
  margin: 14px 0;
}
.copy-btn {
  font: inherit;
  font-weight: 500;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  transition: background .12s ease, color .12s ease;
}
.copy-btn:hover { background: var(--ink); color: #fff; }
.copy-btn.copied { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ---------- FOOTER ---------- */
.footer { padding: 40px 0; text-align: center; }
.footer p { font-size: 14px; color: var(--ink-soft); margin: 4px 0; }
.footer .small { font-size: 12.5px; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 820px) {
  .chart-grid { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .stat-row { grid-template-columns: 1fr 1fr; }
  .cards { grid-template-columns: 1fr; }
  .author:not(:last-child)::after { display: none; }
}
