:root {
  --bg: #f6f8fc;
  --bg-alt: #eef3fb;
  --surface: #ffffff;
  --surface-soft: #f8fbff;
  --text: #142033;
  --muted: #5f6f86;
  --line: #dbe4f0;
  --primary: #2e64ff;
  --primary-dark: #183eaa;
  --accent: #7c4dff;
  --shadow: 0 14px 40px rgba(18, 37, 63, 0.08);
  --radius: 20px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(calc(100% - 2rem), var(--container));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(246, 248, 252, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(219, 228, 240, 0.9);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 1rem;
}

.brand {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  gap: 1.1rem;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--muted);
  font-weight: 600;
}

.nav-links a:hover {
  color: var(--primary);
}

.hero {
  background:
    radial-gradient(circle at top left, rgba(124, 77, 255, 0.15), transparent 32%),
    radial-gradient(circle at top right, rgba(46, 100, 255, 0.14), transparent 28%),
    linear-gradient(180deg, #f9fbff 0%, #f2f6fd 100%);
  padding: 4.5rem 0 2.5rem;
}

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

.eyebrow {
  margin: 0 0 0.5rem;
  color: var(--primary);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
}

h1,
h2,
h3 {
  line-height: 1.15;
  margin: 0;
}

h1 {
  max-width: 980px;
  margin: 0 auto;
  font-size: clamp(2rem, 4vw, 3.6rem);
}

.subtitle {
  max-width: 760px;
  margin: 1rem auto 1.5rem;
  color: var(--muted);
  font-size: 1.1rem;
}

.authors,
.affiliations {
  display: flex;
  justify-content: center;
  gap: 0.8rem 1.4rem;
  flex-wrap: wrap;
}

.authors {
  font-weight: 700;
}

.affiliations {
  margin-top: 0.45rem;
  color: var(--muted);
}

.button-row {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.75rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.75rem 1.15rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(19, 37, 63, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.button:hover {
  transform: translateY(-1px);
  border-color: rgba(46, 100, 255, 0.35);
  box-shadow: 0 14px 30px rgba(19, 37, 63, 0.1);
}

.button-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: #fff;
  border-color: transparent;
}

.button-disabled {
  color: #8996aa;
  background: #f4f6fa;
  border-color: #e5ebf3;
  box-shadow: none;
  cursor: default;
}

.helper-text {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.section {
  padding: 4.5rem 0;
}

.section-tight {
  padding-top: 0.75rem;
  padding-bottom: 1rem;
}

.section-tight .container {
  width: min(calc(100% - 1rem), 1380px);
}

.section-alt {
  background: var(--bg-alt);
}

.section-heading {
  margin-bottom: 1.5rem;
}

.section-heading h2 {
  font-size: clamp(1.7rem, 3vw, 2.5rem);
}

.hero-figure,
.card,
.image-card,
.result-card,
.mini-card,
.stat-card,
.bibtex-card {
  background: var(--surface);
  border: 1px solid rgba(219, 228, 240, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-figure,
.image-card {
  overflow: hidden;
}

.hero-figure {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 1rem;
  text-align: center;
}

.hero-figure img,
.image-card img {
  width: 100%;
  height: auto;
}

.hero-figure img {
  width: 100%;
  max-width: 1260px;
  margin: 0 auto;
}

.card {
  padding: 1.5rem 1.5rem;
}

.prose p,
.prose li {
  color: #33435a;
}

.prose p + p {
  margin-top: 0.85rem;
}

.stats-grid,
.three-column,
.results-cards,
.gallery-grid {
  display: grid;
  gap: 1rem;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 1.25rem;
}

.stat-card,
.mini-card,
.result-card {
  padding: 1.35rem;
}

.stat-card h3,
.result-big {
  color: var(--primary-dark);
}

.stat-card h3 {
  font-size: 1.65rem;
  margin-bottom: 0.3rem;
}

.three-column {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1.25rem;
}

.feature-list {
  padding-left: 1.2rem;
  margin: 1rem 0 0;
}

.label {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.method-copy {
  max-width: 980px;
  margin: 0 auto;
}

.method-figure {
  max-width: 1120px;
  margin: 1.5rem auto 0;
  padding: 1rem;
}

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

.single-figure-grid {
  max-width: 1120px;
  margin: 0 auto;
}

.single-figure-card {
  padding: 1rem;
}

.single-figure-card img {
  margin: 0 auto;
}

.bibtex-card {
  position: relative;
  overflow: hidden;
}

.copy-button {
  position: absolute;
  top: 1rem;
  right: 1rem;
  border: 0;
  background: var(--primary);
  color: #fff;
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  font-weight: 800;
  cursor: pointer;
}

pre {
  margin: 0;
  padding: 1.4rem;
  overflow-x: auto;
  background: linear-gradient(180deg, #111a29 0%, #17253a 100%);
  color: #e7eefb;
  font-size: 0.95rem;
}

.site-footer {
  padding: 1.5rem 0 2.5rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.95rem;
}

@media (max-width: 1000px) {
  .stats-grid,
  .gallery-grid,
  .three-column,
  .single-figure-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .nav {
    flex-direction: column;
    justify-content: center;
    padding: 0.8rem 0;
  }

  .nav-links {
    justify-content: center;
  }

  .section {
    padding: 3.4rem 0;
  }

  .stats-grid,
  .gallery-grid,
  .three-column,
  .single-figure-grid {
    grid-template-columns: 1fr;
  }

  .card,
  .stat-card,
  .mini-card,
  .result-card {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .copy-button {
    position: static;
    margin: 1rem 1rem 0;
  }

  pre {
    padding-top: 0.8rem;
  }
}
