:root {
  --ink: #17151d;
  --muted: #5d5868;
  --paper: #ffffff;
  --soft: #f7f4fb;
  --line: #ded7e8;
  --purple: #71097d;
  --purple-dark: #4f075f;
  --blue: #28639f;
  --teal: #0f766e;
  --amber: #a15c10;
  --green: #15803d;
  --shadow: 0 18px 42px rgba(42, 29, 58, 0.10);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

a {
  color: var(--purple);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

.container {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
}

.narrow {
  width: min(880px, calc(100% - 36px));
}

.top-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 58px;
  padding: 0 28px;
  border-bottom: 1px solid rgba(222, 215, 232, 0.9);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
}

.nav-brand:hover {
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--purple), #9b4ccc);
  font-family: "Castoro", Georgia, serif;
  line-height: 1;
  box-shadow: 0 10px 22px rgba(113, 9, 125, 0.18);
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 1.12rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 17px;
  font-size: 0.94rem;
  font-weight: 700;
}

.nav-links a {
  color: #312b3a;
}

.hero {
  padding: 58px 0 68px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(247, 244, 251, 0.92), rgba(255, 255, 255, 0.15) 65%),
    radial-gradient(circle at 8% 8%, rgba(40, 99, 159, 0.09), transparent 28%),
    radial-gradient(circle at 92% 4%, rgba(15, 118, 110, 0.10), transparent 30%);
}

.hero-inner {
  text-align: center;
}

.publication-title {
  width: min(1050px, 100%);
  margin: 0 auto 18px;
  font-family: "Castoro", Georgia, serif;
  font-size: clamp(2.2rem, 6.4vw, 4.4rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: 0;
}

.publication-title span {
  font-variant: small-caps;
}

.publication-authors,
.affiliations {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 14px;
  color: #27222f;
  font-size: 1.05rem;
  font-weight: 700;
}

.affiliations {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.98rem;
  font-weight: 600;
}

.correspondence {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.93rem;
}

.publication-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 24px 0 30px;
}

.paper-button,
.release-list a,
.release-list span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 42px;
  padding: 9px 15px;
  border: 1px solid #1f1926;
  border-radius: 7px;
  color: #fff;
  background: #1f1926;
  font-size: 0.94rem;
  font-weight: 800;
  line-height: 1.2;
}

.paper-button:hover,
.release-list a:hover {
  background: var(--purple);
  border-color: var(--purple);
  text-decoration: none;
}

.teaser-card,
.figure-card {
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.teaser-card {
  max-width: 1060px;
  margin: 0 auto;
}

.teaser-card img,
.figure-card img {
  width: 100%;
  border: 1px solid #ece6f1;
  border-radius: 7px;
  background: #fff;
}

.figure-media {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 320px;
  overflow: hidden;
  border: 1px solid #ece6f1;
  border-radius: 7px;
  background: #fff;
}

.figure-media img {
  width: 100%;
  max-height: 100%;
  border: 0;
  object-fit: contain;
}

figcaption,
.table-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.48;
}

.section {
  padding: 68px 0;
}

.section-muted {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--soft);
}

h2 {
  margin: 0 0 18px;
  font-family: "Castoro", Georgia, serif;
  font-size: clamp(1.9rem, 4.6vw, 2.8rem);
  font-weight: 400;
  line-height: 1.12;
  text-align: center;
}

h3 {
  margin: 0 0 8px;
  font-size: 1.08rem;
  line-height: 1.25;
}

.section-heading {
  width: min(860px, 100%);
  margin: 0 auto 30px;
  text-align: center;
}

.section-heading p,
.narrow p {
  margin: 0 0 16px;
  color: #332d3c;
  font-size: 1.04rem;
}

.intro-grid,
.feature-grid,
.stat-grid {
  display: grid;
  gap: 16px;
}

.intro-grid {
  grid-template-columns: repeat(3, 1fr);
}

.intro-grid article,
.feature-card,
.stat-grid article {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 25px rgba(42, 29, 58, 0.05);
}

.intro-grid p,
.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
}

.feature-grid {
  grid-template-columns: repeat(3, 1fr);
  margin-top: 20px;
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 12px;
  border-radius: 8px;
  color: #fff;
  background: var(--purple);
}

.feature-card:nth-child(2) .feature-icon {
  background: var(--teal);
}

.feature-card:nth-child(3) .feature-icon {
  background: var(--amber);
}

.paired-figures {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.figure-card.compact {
  height: 100%;
}

.stat-grid {
  grid-template-columns: repeat(4, 1fr);
  margin-top: 18px;
}

.stat-grid article {
  min-height: 118px;
}

.stat-grid strong {
  display: block;
  color: var(--purple);
  font-size: clamp(1.45rem, 3vw, 2.2rem);
  line-height: 1;
}

.stat-grid article:nth-child(2) strong {
  color: var(--blue);
}

.stat-grid article:nth-child(3) strong {
  color: var(--green);
}

.stat-grid article:nth-child(4) strong {
  color: var(--teal);
}

.stat-grid span {
  display: block;
  margin-top: 9px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.36;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(42, 29, 58, 0.06);
}

.results-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  font-size: 0.9rem;
  line-height: 1.25;
}

.results-table th,
.results-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #eee8f2;
  text-align: center;
  vertical-align: middle;
}

.results-table th:first-child,
.results-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  text-align: left;
  background: inherit;
}

.results-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  color: #fff;
  background: #211a2a;
  font-weight: 800;
}

.results-table thead th:first-child {
  z-index: 3;
  background: #211a2a;
}

.results-table th span {
  color: #d0c2df;
  font-weight: 650;
}

.results-table tbody tr:nth-child(even):not(.panel-row):not(.ours-soft):not(.ours-strong) {
  background: #fbf9fc;
}

.panel-row td {
  color: var(--purple-dark);
  background: #efe8f5;
  font-weight: 850;
  text-transform: uppercase;
}

.ours-soft {
  background: #f2faf8;
}

.ours-strong {
  color: #161119;
  background: #fbf0ff;
  font-weight: 850;
}

.results-table .best {
  color: var(--purple);
  font-weight: 900;
}

.release-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.release-list a,
.release-list span {
  justify-content: flex-start;
}

.release-list span {
  color: #332d3c;
  border-color: #ddd2e7;
  background: #f8f5fb;
}

.bibtex {
  overflow-x: auto;
  margin: 18px 0 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #f8f2ff;
  background: #19151f;
  font-size: 0.92rem;
  line-height: 1.55;
}

.site-footer {
  padding: 28px 0;
  color: var(--muted);
  background: #fff;
  font-size: 0.92rem;
  text-align: center;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 980px) {
  .intro-grid,
  .feature-grid,
  .stat-grid,
  .paired-figures {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 44px;
  }
}

@media (max-width: 720px) {
  .top-nav {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 12px 18px;
  }

  .nav-links {
    flex-wrap: wrap;
    gap: 10px 13px;
  }

  .container,
  .narrow {
    width: min(100% - 28px, 1120px);
  }

  .section {
    padding: 52px 0;
  }

  .publication-title {
    font-size: clamp(2rem, 11.6vw, 3.05rem);
  }

  .publication-links {
    justify-content: flex-start;
  }

  .publication-authors,
  .affiliations,
  .hero-inner {
    text-align: left;
    justify-content: flex-start;
  }

  .teaser-card,
  .figure-card {
    padding: 10px;
  }

  .figure-media {
    height: auto;
    min-height: 0;
  }

  .release-list {
    grid-template-columns: 1fr;
  }

  .results-table {
    min-width: 820px;
  }
}
