:root {
  --text: #1a1a1a;
  --muted: #555;
  --border: #ddd;
  --bg-code: #f5f5f5;
  --accent: #1a56a0;
  --max-w: 900px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

/* ── Layout ── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Nav ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
  height: 54px;
  overflow: hidden;
}
.nav-inner {
  max-width: 1200px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0;
}
.nav-left {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding-right: 20px;
}
.nav-links {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: nowrap;
  overflow: hidden;
}
.nav-right {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 16px;
  padding-left: 12px;
}
.nav-logo {
  display: flex;
  align-items: center;
  opacity: 0.82;
  transition: opacity 0.15s;
}
.nav-logo:hover { opacity: 1; }
.nav-left .nav-logo img {
  height: 26px;
  width: auto;
  display: block;
}
.nav-right .nav-logo img {
  height: 40px;
  width: auto;
  display: block;
}
nav a:not(.nav-logo) {
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: color 0.15s;
}
nav a:not(.nav-logo):hover { color: var(--accent); }

/* ── Header ── */
header {
  padding: 56px 0 40px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.conference-badge {
  display: inline-block;
  background: #e8f0fe;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 20px;
  text-decoration: none;
  transition: background 0.15s;
}
.conference-badge:hover { background: #d2e3fc; }

h1 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  max-width: 720px;
  margin: 0 auto 24px;
}

.authors {
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 8px;
}
.authors a { color: inherit; text-decoration: none; }
.authors a:hover { color: var(--accent); text-decoration: underline; }

.affiliations {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 28px;
  line-height: 1.8;
}

/* ── Resource buttons ── */
.resources {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s;
  border: 1.5px solid transparent;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover { background: #1547c0; border-color: #1547c0; }
.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-outline:hover { border-color: #999; background: #f9f9f9; }
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ── Sections ── */
section {
  padding: 52px 0;
  border-bottom: 1px solid var(--border);
}
section:last-of-type { border-bottom: none; }

h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}
h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 28px 0 10px;
  color: var(--text);
}

p { margin-bottom: 14px; }
p:last-child { margin-bottom: 0; }

/* ── Abstract ── */
#abstract p {
  font-size: 1rem;
  color: #333;
}

/* ── Contributions ── */
.contributions ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 12px;
}
.contributions li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 0.97rem;
}
.contrib-num {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

/* ── Figures ── */
.figure {
  margin: 28px 0;
  text-align: center;
}
.figure img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}
.figure.wide img {
  width: 100%;
}
.figure figcaption {
  margin-top: 10px;
  font-size: 0.88rem;
  color: var(--muted);
  text-align: center;
}
.figure figcaption strong { color: var(--text); }

/* ── Tables ── */
.table-wrap {
  overflow-x: auto;
  margin: 20px 0;
}
table {
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 360px;
}
th {
  background: #f0f0f0;
  font-weight: 600;
  padding: 9px 16px;
  text-align: left;
  border-bottom: 2px solid var(--border);
}
td {
  padding: 8px 16px;
  border-bottom: 1px solid #eee;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: #fafafa; }
.table-caption {
  font-size: 0.88rem;
  color: var(--muted);
  margin-top: 8px;
}
.table-group { margin-bottom: 36px; }

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

/* ── Transfer section ── */
.transfer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  margin-top: 8px;
}

/* ── BibTeX ── */
.bibtex-wrap { position: relative; }
pre {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px 24px;
  font-size: 0.83rem;
  font-family: "SFMono-Regular", "Consolas", "Liberation Mono", Menlo, monospace;
  line-height: 1.6;
  overflow-x: auto;
  white-space: pre;
  color: #333;
}
.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.15s;
}
.copy-btn:hover { border-color: #999; color: var(--text); }
.copy-btn.copied { color: #2a9e4d; border-color: #2a9e4d; }

/* ── Inline citations ── */
.cite {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.82em;
  vertical-align: super;
  line-height: 0;
  font-weight: 600;
  margin-left: 1px;
}
.cite:hover { text-decoration: underline; }

/* ── References ── */
.ref-list {
  padding-left: 24px;
  display: grid;
  gap: 14px;
}
.ref-list li {
  font-size: 0.92rem;
  color: #333;
  line-height: 1.55;
}
.ref-list a {
  color: var(--accent);
  word-break: break-all;
}

/* ── Footer ── */
footer {
  padding: 28px 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}
footer a { color: var(--muted); }

/* ── Responsive ── */
@media (max-width: 600px) {
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }
  section { padding: 36px 0; }
}
