:root {
  --bg: #f7fbff;
  --bg-soft: #edf5ff;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-strong: #ffffff;
  --ink: #172437;
  --muted: #5d6d82;
  --border: rgba(70, 107, 158, 0.16);
  --accent: #2c6dcb;
  --accent-deep: #174ea6;
  --accent-soft: #e7f0ff;
  --highlight: #cfe0ff;
  --warm: #4d79bb;
  --shadow: 0 24px 80px rgba(58, 92, 138, 0.12);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(44, 109, 203, 0.09), transparent 32%),
    radial-gradient(circle at top right, rgba(132, 180, 255, 0.16), transparent 28%),
    linear-gradient(180deg, #fbfdff 0%, #f4f8ff 44%, #edf4ff 100%);
  font-family: "Manrope", sans-serif;
}

a {
  color: var(--accent-deep);
  transition: color 0.2s ease, transform 0.2s ease;
}

a:hover {
  color: var(--accent);
}

.paper-hero {
  position: relative;
  overflow: hidden;
  padding: 1.5rem 0 1rem;
}

.paper-hero::before,
.paper-hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(14px);
  opacity: 0.7;
  pointer-events: none;
}

.paper-hero::before {
  width: 24rem;
  height: 24rem;
  right: -8rem;
  top: -5rem;
  background: rgba(44, 109, 203, 0.12);
}

.paper-hero::after {
  width: 18rem;
  height: 18rem;
  left: -5rem;
  bottom: 0;
  background: rgba(132, 180, 255, 0.18);
}

.eyebrow,
.section-tag,
.hero-kicker,
.stat-label,
.question-id,
.example-status,
.example-note,
.mono {
  font-family: "IBM Plex Mono", monospace;
}

.eyebrow {
  margin-bottom: 1rem;
  color: var(--warm);
  font-size: 0.85rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.hero-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.85fr);
  align-items: start;
  gap: 2rem;
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: 30px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(242, 247, 255, 0.94));
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.publication-title,
.section-title,
.implication-card h3,
.insight-card h3,
.question-card h3,
.example-card h3 {
  font-family: "Fraunces", serif;
}

.publication-title {
  margin-bottom: 1rem !important;
  color: #16221d;
  font-size: clamp(2.35rem, 6vw, 4.4rem) !important;
  line-height: 1.02 !important;
  letter-spacing: -0.03em;
}

.hero-summary,
.lead-copy p,
.insight-card p,
.question-card p,
.implication-card p,
.result-chip p,
.comparison-row,
.results-table,
.paper-figure figcaption {
  color: var(--muted);
}

.hero-summary {
  max-width: 48rem;
  font-size: 1.05rem;
  line-height: 1.8;
}

.publication-authors,
.publication-affiliations {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.publication-authors {
  margin-top: 1.4rem;
  font-size: 1.04rem;
  font-weight: 700;
}

.publication-affiliations {
  margin-top: 0.55rem;
  color: var(--muted);
  font-size: 0.98rem;
}

.publication-authors a {
  color: var(--ink) !important;
}

.publication-authors a:hover {
  color: var(--accent) !important;
  text-decoration: none;
}

.author-separator {
  color: rgba(30, 42, 38, 0.28);
}

.publication-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.6rem;
}

.link-block a {
  margin: 0;
}

.action-button {
  border: 1px solid rgba(44, 109, 203, 0.18);
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  box-shadow: 0 14px 30px rgba(48, 82, 128, 0.08);
}

.action-button:hover {
  transform: translateY(-1px);
  border-color: rgba(44, 109, 203, 0.4);
}

.action-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff;
  border-color: transparent;
}

.action-primary:hover {
  color: #fff;
}

.hero-panel {
  display: flex;
  justify-content: flex-start;
  align-items: stretch;
  align-self: start;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  width: min(100%, 31rem);
  margin-left: auto;
}

.stat-card,
.insight-card,
.question-card,
.result-chip,
.comparison-list,
.example-card,
.implication-card,
.bibtex-card,
.summary-card,
.framed-figure {
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 20px 50px rgba(33, 42, 37, 0.08);
  backdrop-filter: blur(10px);
}

.stat-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  aspect-ratio: 1 / 1;
  min-height: 0;
  padding: 1.2rem 1.1rem;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(239, 246, 255, 0.92));
}

.stat-value {
  color: var(--accent-deep);
  font-size: clamp(2rem, 3vw, 2.7rem);
  font-weight: 800;
  line-height: 1;
}

.stat-label {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.45;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.section-shell {
  position: relative;
  padding-top: 2.6rem;
  padding-bottom: 2.6rem;
}

.section-tinted {
  background: linear-gradient(180deg, rgba(241, 247, 255, 0.72), rgba(232, 241, 255, 0.44));
}

.section-head {
  margin-bottom: 1.6rem;
}

.section-tag {
  margin-bottom: 0.5rem;
  color: var(--warm);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-title {
  margin-bottom: 0 !important;
  color: #1b2722;
  font-size: clamp(1.8rem, 4vw, 2.8rem) !important;
  line-height: 1.08 !important;
}

.lead-copy p {
  font-size: 1.02rem;
  line-height: 1.9;
}

.insight-stack,
.results-summary {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.insight-card,
.question-card,
.result-chip,
.example-card,
.implication-card,
.bibtex-card,
.summary-card {
  padding: 1.2rem 1.25rem;
  border-radius: 22px;
}

.insight-card h3,
.question-card h3,
.implication-card h3 {
  margin-bottom: 0.6rem;
  color: #17211d;
  font-size: 1.2rem;
}

.insight-card p,
.question-card p,
.implication-card p,
.result-chip p {
  margin: 0;
  line-height: 1.75;
}

.question-grid {
  display: grid;
  gap: 1rem;
}

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

.question-id {
  display: inline-block;
  margin-bottom: 0.7rem;
  color: var(--accent);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.paper-figure {
  margin: 0;
}

.framed-figure {
  padding: 1rem;
  border-radius: 24px;
}

.workflow-figure {
  margin-top: 1.25rem;
  padding: 1.25rem;
}

.workflow-figure img {
  border-radius: 12px;
}

.paper-figure img {
  display: block;
  width: 100%;
  border-radius: 18px;
}

.paper-figure figcaption {
  margin-top: 0.9rem;
  font-size: 0.92rem;
  line-height: 1.7;
}

.wide-figure {
  margin-top: 1.5rem;
}

.section-subhead {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.section-mini-title {
  color: #20314a;
}

.table-wrap {
  overflow-x: visible;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 20px 50px rgba(48, 82, 128, 0.08);
}

.wide-table-wrap {
  width: min(96vw, 1520px);
  margin-left: 50%;
  transform: translateX(-50%);
}

.results-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.7rem;
  line-height: 1.35;
}

.results-table th,
.results-table td {
  padding: 0.48rem 0.34rem;
  border-bottom: 1px solid rgba(70, 107, 158, 0.12);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.results-table th {
  position: sticky;
  top: 0;
  background: #f2f7ff;
  color: #1f3353;
  font-size: 0.58rem;
  line-height: 1.25;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.results-table tbody tr:nth-child(even) {
  background: rgba(239, 246, 255, 0.55);
}

.results-table tbody tr:hover {
  background: rgba(224, 237, 255, 0.72);
}

.best-cell {
  background: rgba(211, 235, 221, 0.9);
  color: #174b2e;
}

.worst-cell {
  background: rgba(255, 227, 214, 0.9);
  color: #8f4526;
}

.comparison-list {
  overflow: hidden;
  border-radius: 24px;
}

.comparison-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}

.comparison-row:last-child {
  border-bottom: 0;
}

.comparison-name {
  color: #1a2520;
}

.comparison-metric {
  color: var(--accent-deep);
  text-align: right;
}

.accent-row {
  background: linear-gradient(90deg, rgba(44, 109, 203, 0.08), rgba(225, 237, 255, 0.6));
}

.warning-row {
  background: linear-gradient(90deg, rgba(108, 145, 201, 0.08), rgba(237, 244, 255, 0.72));
}

.compact-card h3 {
  font-size: 1.05rem;
}

.example-grid,
.implication-grid,
.summary-row {
  display: grid;
  gap: 1rem;
}

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

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

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

.summary-card h3 {
  margin-bottom: 0.6rem;
  color: #17211d;
  font-size: 1.1rem;
  font-family: "Fraunces", serif;
}

.summary-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.example-labels {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.example-status {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(77, 121, 187, 0.12);
  color: var(--warm);
  font-size: 0.76rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.success-status {
  background: rgba(44, 109, 203, 0.12);
  color: var(--accent-deep);
}

.example-note {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.example-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.mini-figure figcaption {
  text-align: center;
}

.bibtex-card pre {
  margin: 0;
  overflow-x: auto;
  white-space: pre;
  background: transparent;
  color: #26332d;
  font-size: 0.92rem;
  line-height: 1.7;
}

.project-footer {
  padding-top: 1.5rem;
  padding-bottom: 3rem;
  background: transparent;
}

.footer-copy {
  padding-top: 1.2rem;
  border-top: 1px solid rgba(32, 50, 44, 0.12);
  color: var(--muted);
  text-align: center;
}

@media screen and (max-width: 1023px) {
  .hero-card {
    grid-template-columns: 1fr;
  }

  .example-grid,
  .implication-grid,
  .summary-row,
  .question-grid-wide {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    width: 100%;
  }
}

@media screen and (max-width: 768px) {
  .paper-hero {
    padding-top: 0.6rem;
  }

  .hero-card {
    padding: 1.35rem;
    border-radius: 24px;
  }

  .publication-title {
    font-size: 2.4rem !important;
  }

  .publication-links {
    flex-direction: column;
    align-items: stretch;
  }

  .publication-links .link-block,
  .publication-links .button {
    width: 100%;
  }

  .stats-grid,
  .example-pair {
    grid-template-columns: 1fr;
  }

  .stat-card {
    aspect-ratio: auto;
    min-height: 8rem;
  }

  .table-wrap {
    overflow-x: auto;
  }

  .results-table {
    min-width: 900px;
    font-size: 0.72rem;
  }

  .comparison-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .comparison-metric {
    text-align: left;
  }

  .section-shell {
    padding-top: 2.1rem;
    padding-bottom: 2.1rem;
  }
}
