:root {
  --text: #222;
  --muted: #5d6470;
  --link: #1772d0;
  --line: #dfe3e8;
  --soft: #f6f8fa;
  --accent: #b42318;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--text);
  background: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

main {
  width: min(100% - 40px, 980px);
  margin: 0 auto;
}

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

.paper-header {
  padding: 60px 0 34px;
  text-align: center;
}

h1 {
  max-width: 940px;
  margin: 0 auto 24px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  font-weight: 500;
  line-height: 1.16;
  letter-spacing: -0.02em;
}

h1 span { color: var(--accent); font-weight: 700; }

.authors {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 3px 18px;
  margin-bottom: 9px;
  font-size: 1.08rem;
}

.authors sup, .affiliations sup { font-size: 0.7em; }

.affiliations {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2px 18px;
  color: var(--muted);
  font-size: 0.92rem;
}

.affiliations small { flex-basis: 100%; margin-top: 3px; }

.resource-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 26px;
}

.resource-links a {
  display: grid;
  justify-items: center;
  gap: 5px;
  color: var(--text);
  font-size: 0.86rem;
}

.resource-links a:hover { text-decoration: none; }

.resource-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: #fff;
  background: #333;
  border-radius: 50%;
  font-size: 1.35rem;
  transition: transform 0.15s, background 0.15s;
}

.resource-links a:hover .resource-icon { transform: translateY(-2px); background: var(--link); }
.github-icon { font-family: Georgia, serif; font-weight: 700; }

.teaser { margin: 8px 0 58px; text-align: center; }
.teaser img { width: 100%; height: auto; }

figcaption {
  max-width: 850px;
  margin: 14px auto 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

section { margin: 0 0 56px; scroll-margin-top: 20px; }

h2 {
  margin: 0 0 18px;
  text-align: center;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  font-weight: 500;
}

h3 { margin: 0 0 8px; font-size: 1rem; }
p { margin: 0 0 14px; }

#abstract p, #conclusion p {
  text-align: justify;
}

.three-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.three-columns article {
  padding: 19px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.three-columns p { margin: 0; color: var(--muted); font-size: 0.94rem; }

.result-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 7px; }

table { width: 100%; border-collapse: collapse; font-size: 0.94rem; }
th, td { padding: 13px 15px; text-align: left; border-bottom: 1px solid var(--line); }
th { background: var(--soft); font-weight: 600; }
tbody tr:last-child td { border-bottom: 0; }
td:nth-child(2) { white-space: nowrap; color: var(--accent); }

.note, .citation-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.87rem;
}

.section-intro { max-width: 800px; margin: 0 auto 22px; text-align: center; }
.main-figure { margin: 0; text-align: center; }
.main-figure img { width: 100%; height: auto; border: 1px solid var(--line); }

#citation {
  padding: 24px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 7px;
  text-align: center;
}

#citation h2 { font-size: 1.5rem; margin-bottom: 5px; }
#citation p { margin: 0; }

footer {
  width: min(100% - 40px, 980px);
  margin: 10px auto 0;
  padding: 24px 0 40px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 0.8rem;
}

footer p { margin: 2px; }

@media (max-width: 680px) {
  main, footer { width: min(100% - 28px, 980px); }
  .paper-header { padding-top: 38px; }
  h1 { font-size: 2rem; }
  .authors { font-size: 1rem; }
  .three-columns { grid-template-columns: 1fr; }
  #abstract p, #conclusion p { text-align: left; }
  .teaser { margin-bottom: 44px; overflow-x: auto; }
  .teaser img { min-width: 680px; }
}
