:root {
  --bg: #ffffff;
  --bg-alt: #f7f8fc;
  --text: #1b1f2a;
  --muted: #5b6472;
  --accent: #5b53e8;
  --accent-2: #00b4d8;
  --accent-dark: #322bb0;
  --border: #e6e8ef;
  --code-bg: #0f172a;
  --code-text: #e2e8f0;
  --radius: 14px;
  --max: 1120px;
  --shadow: 0 10px 30px rgba(27, 31, 42, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 860px; }

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

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(1200px 500px at 80% -10%, #e9e7ff 0%, rgba(233,231,255,0) 60%),
    radial-gradient(1000px 500px at 0% 0%, #e0f7fb 0%, rgba(224,247,251,0) 55%),
    linear-gradient(180deg, #fbfbff 0%, #ffffff 100%);
  border-bottom: 1px solid var(--border);
  padding: 56px 0 52px;
  text-align: center;
  overflow: hidden;
}

.venue-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-dark), var(--accent));
  color: #fff;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 22px;
  box-shadow: 0 6px 18px rgba(91, 83, 232, 0.35);
}
.venue-badge .star { font-size: 0.9rem; }

.title {
  font-size: clamp(1.9rem, 4.4vw, 3.1rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin: 0 auto;
  max-width: 960px;
  background: linear-gradient(90deg, #1b1f2a 0%, var(--accent-dark) 60%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  font-weight: 600;
  margin: 16px auto 4px;
  color: var(--muted);
  max-width: 720px;
}

.acronym { color: var(--accent); font-weight: 800; }

.authors {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  justify-content: center;
  font-size: 1.05rem;
  font-weight: 500;
  margin: 26px auto 6px;
  max-width: 760px;
}
.author sup { color: var(--accent); }
.author a {
  color: inherit;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.author a:hover {
  color: var(--accent);
  border-color: var(--accent);
  text-decoration: none;
}
.corresponding { color: var(--muted); }

.affiliations {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 4px;
}
.email {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0 0 26px;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 999px;
  background: var(--text);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.btn svg { width: 18px; height: 18px; }
.btn:hover {
  background: var(--accent);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(91, 83, 232, 0.3);
}
.btn.ghost {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn.ghost:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section.alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  text-align: center;
}
.section-sub {
  text-align: center;
  color: var(--muted);
  max-width: 720px;
  margin: 0 auto 36px;
  font-size: 1rem;
}

h3 { font-size: 1.2rem; font-weight: 700; margin: 28px 0 12px; }

/* ---------- Figures ---------- */
.figure {
  margin: 0 auto;
  text-align: center;
  max-width: 820px;
}
.figure img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: #fff;
}
.figure.plain img { border: none; box-shadow: none; }
.figure figcaption {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.9rem;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
/* Wide, short figures (panels laid out horizontally) */
.figure.wide { max-width: 960px; }
/* Tall / detailed figures kept narrower so they don't dominate */
.figure.tall { max-width: 680px; }
.figure.small { max-width: 480px; }

/* ---------- Abstract ---------- */
.abstract p { font-size: 1.05rem; }
.abstract .lead { color: var(--text); }

/* ---------- Contribution cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 8px;
}
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease;
}
.card:hover { transform: translateY(-4px); }
.card .icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: 1.3rem;
  margin-bottom: 14px;
}
.card h3 { margin: 0 0 8px; font-size: 1.1rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* ---------- Stat strip ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin: 34px 0 8px;
}
.stat {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 16px;
  text-align: center;
  box-shadow: var(--shadow);
}
.stat .num {
  font-size: 1.9rem;
  font-weight: 800;
  background: linear-gradient(90deg, var(--accent-dark), var(--accent));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.stat .label { color: var(--muted); font-size: 0.85rem; margin-top: 4px; }

/* ---------- Variant pills ---------- */
.variants {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 24px;
}
.variant {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  background: #fff;
}
.variant .tag {
  display: inline-block;
  font-weight: 700;
  color: var(--accent-dark);
  background: #eceaff;
  padding: 3px 10px;
  border-radius: 8px;
  font-size: 0.82rem;
  margin-bottom: 8px;
}
.variant p { margin: 0; color: var(--muted); font-size: 0.93rem; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; background: #fff; }
thead th {
  background: var(--text);
  color: #fff;
  text-align: left;
  padding: 12px 14px;
  font-weight: 600;
  white-space: nowrap;
}
tbody td { padding: 10px 14px; border-top: 1px solid var(--border); white-space: nowrap; }
tbody tr:nth-child(even) { background: var(--bg-alt); }
.tbl-center th, .tbl-center td { text-align: center; }
.tbl-center td:nth-child(2), .tbl-center th:nth-child(2) { text-align: left; }
tr.highlight td { background: #eceaff !important; font-weight: 600; }
.up { color: #16a34a; font-weight: 600; font-size: 0.82em; }
.best { color: var(--accent-dark); font-weight: 700; }
.caption { color: var(--muted); font-size: 0.88rem; margin-top: 12px; text-align: center; }

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.88em;
  background: #eceaff;
  color: var(--accent-dark);
  padding: 2px 6px;
  border-radius: 6px;
}

/* ---------- BibTeX ---------- */
.bibtex {
  background: var(--code-bg);
  color: var(--code-text);
  padding: 22px 24px;
  border-radius: var(--radius);
  overflow-x: auto;
  box-shadow: var(--shadow);
}
.bibtex code { background: none; color: var(--code-text); padding: 0; font-size: 0.9rem; line-height: 1.7; }

/* ---------- Footer ---------- */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}
.footer .muted { color: #9aa1aa; margin-top: 6px; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .cards { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .variants { grid-template-columns: 1fr; }
}
