/* ── Palette ── */
:root {
  --color-bg:           #ffffff;
  --color-surface:      #f4f4f5;
  --color-border:       #e4e4e7;
  --color-text:         #18181b;
  --color-text-muted:   #71717a;
  --color-accent:       #27272a;
  --color-accent-soft:  #f4f4f5;
  --title-gradient:     #18181b, #52525b;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg:           #212121;
    --color-surface:      #2c2c2c;
    --color-border:       #404040;
    --color-text:         #e0e0e0;
    --color-text-muted:   #909090;
    --color-accent:       #c8c8c8;
    --color-accent-soft:  #2c2c2c;
    --title-gradient:     #ececec, #a9a8a8;
  }
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

a { color: inherit; }

img { display: block; max-width: 100%; }

/* ── Base ── */
body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ── Page column ── */
.hero,
.content,
.divider {
  max-width: 55rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.7rem;
  padding-right: 1.7rem;
}

/* ── Hero ── */
.hero {
  padding-top: 4rem;
  padding-bottom: 2.5rem;
  text-align: center;
}

/* ── Title ── */
.title {
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: 1.25rem;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, var(--title-gradient));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Authors ── */
.authors {
  display: flex;
  justify-content: center;
  gap: 1rem;
  font-size: 1.1rem;
  color: var(--color-text);
  margin-bottom: 1rem;
  margin-top: 1.25rem;
}

/* ── Affiliations ── */
.affiliations {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

/* ── Link buttons ── */
.links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1.1rem;
  border: 1.5px solid var(--color-text);
  border-radius: 9999px;
  color: var(--color-text);
  background: transparent;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.link-btn i {
  font-size: 0.85rem;
}

.link-btn:hover {
  background: var(--color-text);
  color: var(--color-bg);
}

/* ── Divider ── */
.divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin-bottom: 2.5rem;
}

/* ── Main content ── */
.content {
  padding-bottom: 4rem;
}

.content section {
  margin-bottom: 2.5rem;
}

.content p {
  text-align: justify;
  color: var(--color-text);
  font-size: 1.1rem;
  font-weight: 300;
  line-height: 1.75;
}

.content p + p {
  margin-top: 1rem;
}

/* ── Architecture figure ── */
.architecture-figure {
  margin: 1.25rem auto 1.75rem;
}

.architecture-figure img {
  width: 100%;
  border-radius: 0.75rem;
}

@media (prefers-color-scheme: dark) {
  .architecture-figure img {
    background: #fafafa;
  }
}

.architecture-figure figcaption {
  margin-top: 0.75rem;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
  text-align: center;
}


/* ── Section title ── */
.section-title {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 1rem;
  color: var(--color-text);
}

/* ── Results ── */
.result-title {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0.45rem;
  color: var(--color-text);
}

.results-table {
  width: 100%;
  margin: 1.25rem 0 1.75rem;
  border-collapse: collapse;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  font-size: 0.95rem;
  line-height: 1.5;
}

.results-table caption {
  margin-bottom: 0.45rem;
  color: var(--color-text-muted);
  font-size: 0.82rem;
  line-height: 1.45;
  text-align: left;
}

.results-table th,
.results-table td {
  padding: 0.75rem 0.8rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.results-table th {
  color: var(--color-text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.results-table tbody tr:last-child td {
  border-bottom: 0;
}

.results-table td:not(:first-child),
.results-table th:not(:first-child) {
  text-align: right;
}

.results-table + .result-title {
  margin-top: 2rem;
}

.content p + .result-title {
  margin-top: 1.75rem;
}

.result-figures {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.25rem 0 1.75rem;
}

.result-figure {
  margin: 1.25rem 0 1.75rem;
}

.result-figures .result-figure {
  margin: 0;
}

.result-figure img {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
}

.result-figure figcaption {
  margin-top: 0.55rem;
  color: var(--color-text-muted);
  font-size: 0.82rem;
  line-height: 1.45;
  text-align: center;
}

.result-figure-wide {
  max-width: 35rem;
  margin-left: auto;
  margin-right: auto;
}

.result-title:not(:first-of-type) {
  margin-top: 1.75rem;
}

/* ── BibTeX ── */
.bibtex {
  background: var(--color-surface);
  border-radius: 0.5rem;
  padding: 1.25rem;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.82rem;
  line-height: 1.6;
  /* color: #f1f5f9; */
  overflow-x: auto;
}

/* ── Accessibility ── */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 560px) {
  .result-figures {
    grid-template-columns: 1fr;
  }

  .results-table {
    font-size: 0.86rem;
  }

  .results-table th,
  .results-table td {
    padding: 0.65rem 0.45rem;
  }
}
