/* ── Reset & Base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Source Sans 3', 'Noto Sans', sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: #222;
  background: #fff;
}

a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout ───────────────────────────────────────────────────── */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 56px 0; border-top: 1px solid #f0f0f0; }

/* ── Hero ─────────────────────────────────────────────────────── */
.hero {
  background: #fff;
  padding: 64px 0 48px;
  text-align: center;
}

.hero h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2.3rem;
  font-weight: 700;
  line-height: 1.25;
  max-width: 760px;
  margin: 0 auto 10px;
  color: #111;
}

.hero .subtitle {
  font-size: 1.1rem;
  color: #555;
  margin-bottom: 24px;
  font-style: italic;
}

/* Authors */
.authors {
  font-size: 1.0rem;
  margin-bottom: 4px;
  color: #333;
}
.authors a { color: #2563eb; }
.affiliations {
  font-size: 0.88rem;
  color: #777;
  margin-bottom: 28px;
  line-height: 1.8;
}

/* Badges */
.badges {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 18px;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  border: 1.5px solid transparent;
  transition: opacity 0.15s;
}
.badge:hover { opacity: 0.8; text-decoration: none; }
.badge-paper  { background: #fef2f2; color: #dc2626; border-color: #fca5a5; }
.badge-code   { background: #f1f5f9; color: #1e293b; border-color: #cbd5e1; }
.badge-hf     { background: #fffbeb; color: #92400e; border-color: #fcd34d; }
.badge-colab  { background: #fff7ed; color: #c2410c; border-color: #fdba74; }

/* Teaser GIF */
.teaser { text-align: center; }
.teaser img {
  max-width: 500px;
  width: 100%;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.teaser-caption {
  margin-top: 12px;
  font-size: 0.88rem;
  color: #666;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  font-style: italic;
}

/* ── Section titles ───────────────────────────────────────────── */
h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.7rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: #111;
}

h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: #111;
}

/* ── Abstract ─────────────────────────────────────────────────── */
.abstract-box {
  border-left: 3px solid #2563eb;
  padding: 20px 24px;
  background: #f8faff;
  border-radius: 0 6px 6px 0;
  font-size: 0.97rem;
  line-height: 1.8;
  color: #333;
}

/* ── Phase diagram overview ───────────────────────────────────── */
.overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
@media (max-width: 640px) { .overview-grid { grid-template-columns: 1fr; } }

.overview-grid img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  border: 1px solid #e5e7eb;
}

.phase-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  margin-top: 16px;
}
.phase-table th {
  background: #1e293b;
  color: #fff;
  padding: 9px 14px;
  text-align: left;
}
.phase-table td { padding: 8px 14px; border-bottom: 1px solid #e5e7eb; }
.phase-table tr:last-child td { border-bottom: none; }
.phase-table tr:nth-child(odd) td { background: #f8f9fb; }

.tick  { color: #16a34a; font-weight: 700; }
.cross { color: #dc2626; font-weight: 700; }

/* ── Figures ──────────────────────────────────────────────────── */
.math-block { margin: 20px 0; overflow-x: auto; }

.fig-block { text-align: center; margin: 24px 0; }
.fig-block img {
  max-width: 100%;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  border: 1px solid #e5e7eb;
}
.fig-caption {
  margin-top: 10px;
  font-size: 0.87rem;
  color: #555;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 24px;
}
@media (max-width: 640px) { .results-grid { grid-template-columns: 1fr; } }

/* ── Astro results table ──────────────────────────────────────── */
.astro-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  line-height: 1.5;
  margin-top: 8px;
}
.astro-table caption {
  font-size: 0.82rem;
  color: #555;
  margin-bottom: 10px;
  text-align: left;
  line-height: 1.6;
}
.astro-table th {
  background: #1e293b;
  color: #fff;
  padding: 9px 12px;
  text-align: center;
  font-weight: 600;
  white-space: nowrap;
}
.astro-table th:first-child { text-align: left; }
.astro-table td {
  padding: 7px 12px;
  border-bottom: 1px solid #e5e7eb;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.astro-table td:first-child { text-align: left; font-weight: 500; }
.astro-table tr:nth-child(even) td { background: #f8f9fb; }
.astro-table tr.section-header td {
  background: #dbeafe;
  color: #1e3a8a;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 6px 12px;
  text-align: left;
  border-bottom: 1px solid #bfdbfe;
}

/* ── BibTeX / Code blocks ─────────────────────────────────────── */
.bibtex-box {
  background: #f8f9fb;
  color: #1e293b;
  border: 1px solid #e2e8f0;
  padding: 20px 24px;
  border-radius: 8px;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.85rem;
  line-height: 1.7;
  overflow-x: auto;
  white-space: pre;
}

/* ── Footer ───────────────────────────────────────────────────── */
footer {
  background: #f8f9fb;
  border-top: 1px solid #e5e7eb;
  color: #888;
  text-align: center;
  padding: 28px 24px;
  font-size: 0.85rem;
}
footer a { color: #2563eb; }
