:root {
  --text: #1f2328;
  --muted: #59636e;
  --accent: #2563eb;
  --venue: #d9480f;
  --border: #e5e7eb;
  --soft: #f6f8fa;
  --highlight: #eef2ff;
  --measure: 880px;
  --wide: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
}

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

img { display: block; max-width: 100%; height: auto; margin: 0 auto; }

.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 20px; }
.wrap--wide { max-width: var(--wide); }

/* Header */
.hero { padding: 64px 0 40px; text-align: center; }
.hero h1 {
  margin: 0 auto 20px;
  max-width: 960px;
  font-size: clamp(1.75rem, 4vw, 2.6rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.authors { margin: 0; font-size: 1.15rem; }
.authors a { font-weight: 500; }
.affil { margin: 4px 0 0; color: var(--muted); }
.venue {
  display: inline-block;
  margin-top: 14px;
  padding: 3px 14px;
  border-radius: 999px;
  background: #fff4e6;
  color: var(--venue);
  font-weight: 700;
  font-size: 0.95rem;
}
.links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 24px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 999px;
  background: #24292f;
  color: #fff;
  font-weight: 500;
  font-size: 0.95rem;
  transition: background 0.15s;
}
.btn:hover { background: #3d444d; text-decoration: none; }
.btn svg { width: 16px; height: 16px; fill: currentColor; }

/* Sections */
section { padding: 40px 0; }
section + section { border-top: 1px solid var(--border); }
h2 { margin: 0 0 16px; font-size: 1.6rem; line-height: 1.3; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.abstract { background: var(--soft); border-top: 0 !important; }
.abstract + section { border-top: 0; }
.abstract p { text-align: justify; }

/* Figures */
figure { margin: 24px 0 0; }
figure + p { margin-top: 20px; }
figcaption { margin-top: 10px; color: var(--muted); font-size: 0.92rem; text-align: center; }
.grid { display: grid; gap: 20px; margin-top: 24px; }
.grid figure { margin: 0; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; }
.split figure { margin: 0; }

/* Tables */
.table-scroll { overflow-x: auto; margin-top: 24px; }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; font-variant-numeric: tabular-nums; }
th, td { padding: 8px 12px; border-bottom: 1px solid var(--border); text-align: right; white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
thead th { border-bottom: 2px solid var(--text); font-weight: 600; }
tr.ours { background: var(--highlight); font-weight: 600; }

/* BibTeX */
.bibtex { position: relative; }
.bibtex pre {
  margin: 0;
  padding: 18px 20px;
  overflow-x: auto;
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.85rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.bibtex pre code { display: block; padding-right: 56px; }
.copy {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
}
.copy:hover { color: var(--text); }

footer { padding: 32px 0 48px; color: var(--muted); font-size: 0.85rem; text-align: center; border-top: 1px solid var(--border); }

@media (max-width: 720px) {
  body { font-size: 16px; }
  .hero { padding: 40px 0 28px; }
  section { padding: 32px 0; }
  h2 { font-size: 1.35rem; }
  .grid-2, .grid-3, .split { grid-template-columns: 1fr; }
  .abstract p { text-align: left; }
}
