:root {
  --bg: #f7f4ee;
  --paper: #fbfaf7;
  --text: #111111;
  --muted: #5e5a54;
  --line: #d8d1c5;
  --accent: #8a7352;
  --sans: "Inter", Arial, sans-serif;
  --serif: "Cormorant Garamond", Georgia, serif;
  --max-width: 1180px;
  --text-width: 760px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.65;
}

img {
  display: block;
  width: 100%;
  height: auto;
}

.site-shell {
  width: min(calc(100% - 40px), var(--max-width));
  margin: 0 auto;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 82vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 72px 0 56px;
}

.hero > *:not(.hero-art) {
  position: relative;
  z-index: 2;
}

.hero-topline,
.kicker,
.mini-kicker,
.authors {
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.hero-topline,
.kicker,
.mini-kicker {
  font-size: 0.76rem;
  color: var(--muted);
}

.hero-art {
  position: absolute;
  top: 25%;
  right: -4%;
  width: min(40vw, 520px);
  opacity: 0.90;
  z-index: 1;
  pointer-events: none;
  mask-image: linear-gradient(to left, rgba(0,0,0,1), rgba(0,0,0,0.35));
  -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,1), rgba(0,0,0,0.35));
}

.hero-art img {
  display: block;
  width: 100%;
  height: auto;
}

.site-title {
  margin: 0.12em 0 0;
  font-family: var(--serif);
  font-size: clamp(3.6rem, 9vw, 7.5rem);
  line-height: 0.9;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.site-subtitle {
  max-width: 760px;
  margin: 20px 0 0;
  font-size: clamp(1.05rem, 2.1vw, 1.42rem);
  color: #222;
}

.authors {
  margin: 24px 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 118px;
  padding: 12px 18px;
  border: 1px solid var(--text);
  color: var(--text);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  background: transparent;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.button:hover,
.button:focus-visible,
.copy-button:hover,
.copy-button:focus-visible {
  background: var(--text);
  color: var(--paper);
}

.button-secondary {
  border-color: var(--line);
}

.section {
  padding: 44px 0 84px;
}

.section-rule {
  height: 1px;
  background: var(--line);
  margin-bottom: 22px;
}

.section-head {
  margin-bottom: 28px;
}

.section-head h2 {
  margin: 8px 0 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 0.95;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.text-column {
  max-width: var(--text-width);
  font-size: 1.04rem;
}

.text-column p {
  margin: 0 0 1.2em;
}

/* .process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 28px;
}

.process-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 24px 22px 26px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.035);
  backdrop-filter: blur(2px);
}

.process-card h3 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: 1.8rem;
  line-height: 1;
  font-weight: 600;
}

.process-card p {
  margin: 0;
  max-width: 30ch;
  color: #2d2b29;
}

.process-figure {
  margin: 28px auto 0;
  height: 230px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.process-figure img {
  height: 100%;
  width: auto;
  max-width: 100%;
  display: block;
  background: transparent;
  border: 0;
  opacity: 0.96;
}

@media (max-width: 900px) {
  .process-grid {
    grid-template-columns: 1fr;
    gap: 34px;
  }
} */

.process-interactive {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 34px;
  align-items: start;
  margin-top: 28px;
}

.process-steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.process-step-card {
  width: 100%;
  text-align: left;
  padding: 18px 18px 16px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--text);
  cursor: pointer;
  transition:
    border-color 0.22s ease,
    background-color 0.22s ease,
    transform 0.22s ease,
    box-shadow 0.22s ease;
}

.process-step-card:hover,
.process-step-card:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(0, 0, 0, 0.16);
}

.process-step-card.is-active {
  border-color: var(--text);
  background: #fffdf8;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.04);
}

.process-step-card .step-number {
  display: block;
  margin-bottom: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--accent);
}

.step-card-title {
  display: block;
  font-family: var(--serif);
  font-size: 1.45rem;
  line-height: 1.05;
  font-weight: 600;
}

.step-card-text {
  display: block;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  margin-top: 0;
  font-size: 0.98rem;
  line-height: 1.6;
  color: #2d2b29;
  transition:
    max-height 0.25s ease,
    opacity 0.22s ease,
    margin-top 0.22s ease;
}

.process-step-card.is-active .step-card-text {
  max-height: 120px;
  opacity: 1;
  margin-top: 12px;
}

.process-display {
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.process-display-media {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 420px;
}

.process-display-media img {
  display: block;
  max-width: 100%;
  max-height: 520px;
  width: auto;
  height: auto;
  background: transparent;
  transition: opacity 0.18s ease;
}

@media (max-width: 900px) {
  .process-interactive {
    grid-template-columns: 1fr;
  }

  .process-display {
    min-height: auto;
  }

  .process-display-media {
    min-height: auto;
  }

  .process-display-media img {
    max-height: none;
    width: 100%;
  }
}

.figure-block {
  margin: 40px 0 0;
}

.figure-block img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 0;
  background: transparent;
}

.figure-block figcaption {
  margin: 12px auto 0;
  max-width: 820px;
  text-align: center;
  font-size: 0.92rem;
  color: var(--muted);
}

.figure-wide {
  margin-top: 40px;
}

.figure-wide img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.figure-actual {
  margin-top: 40px;
  text-align: center;
}

.figure-actual img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.stat-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  padding: 22px 0 8px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stat {
  padding: 10px 0 14px;
}

.stat-value {
  display: block;
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 0.95;
  font-weight: 600;
}

.stat-label {
  display: block;
  margin-top: 10px;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.results-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 26px;
  margin-top: 34px;
}

.results-card {
  padding: 22px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.45);
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  font-size: 0.98rem;
}

.results-table th,
.results-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

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

.highlight-row td {
  font-weight: 700;
}

.spotlight p {
  margin: 10px 0 0;
  font-size: 1.05rem;
}

.bibtex-wrap {
  position: relative;
  max-width: 920px;
}

.bibtex-block {
  margin: 0;
  padding: 22px;
  overflow-x: auto;
  border: 1px solid var(--line);
  background: #fdfcf9;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92rem;
  line-height: 1.6;
}

.copy-button {
  margin-top: 14px;
  padding: 12px 18px;
  border: 1px solid var(--text);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

@media (max-width: 900px) {
  .steps,
  .stat-bar,
  .results-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 56px;
  }
}

@media (max-width: 640px) {
  .site-shell {
    width: min(calc(100% - 28px), var(--max-width));
  }

  .section {
    padding: 30px 0 60px;
  }

  .results-card,
  .bibtex-block {
    padding: 16px;
  }
}

.site-footer {
  position: relative;
  padding: 28px 0 32px;
  min-height: 72px;
}

.footer-credit {
  margin: 0;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.2;
}

.footer-gif {
  position: absolute;
  left: 50%;
  top: 0px;                  /* same vertical zone as the credit text */
  transform: translateX(-50%);
  width: 230px;
  opacity: 0.9;
  pointer-events: none;
}

.footer-gif img {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 700px) {
  .site-footer {
    min-height: auto;
    padding: 28px 0 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }

  .footer-gif {
    position: static;
    transform: none;
    width: 180px;
    order: -1;
  }

  .footer-credit {
    text-align: center;
  }
}

/* Motion base */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hero stagger */
.hero-item:nth-of-type(1) {
  transition-delay: 0.05s;
}

.hero-item:nth-of-type(2) {
  transition-delay: 0.15s;
}

.hero-item:nth-of-type(3) {
  transition-delay: 0.28s;
}

.hero-item:nth-of-type(4) {
  transition-delay: 0.4s;
}

.hero-item:nth-of-type(5) {
  transition-delay: 0.52s;
}

/* Buttons and interactive polish */
.button,
.copy-button {
  transition:
    background-color 0.22s ease,
    color 0.22s ease,
    border-color 0.22s ease,
    transform 0.22s ease;
}

.button:hover,
.button:focus-visible,
.copy-button:hover,
.copy-button:focus-visible {
  transform: translateY(-1px);
}

.button:active,
.copy-button:active {
  transform: translateY(0);
}

/* Figure subtle lift */
.figure-block img {
  transition:
    transform 0.45s ease,
    box-shadow 0.45s ease;
}

.figure-block:hover img {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.06);
}

/* Copy button micro-feedback */
.copy-button.is-copied {
  background: var(--text);
  color: var(--paper);
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal,
  .button,
  .copy-button,
  .figure-block img {
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}

.results-note {
  margin: 8px 0 0;
  font-size: 0.95rem !important;
  line-height: 1.45;
  color: rgba(94, 90, 84, 0.6);
}

.paradigm-intro {
  max-width: 760px;
  margin-bottom: 24px;
  font-size: 1.08rem;
}

.paradigm-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
  gap: 32px;
  align-items: start;
}

.paradigm-takeaways {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.takeaway-block {
  padding: 20px 20px 18px;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid var(--line);
}

.takeaway-block h3 {
  margin: 0 0 8px;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.35;
  font-weight: 700;
}

.takeaway-block p {
  margin: 0;
  color: #2d2b29;
  line-height: 1.65;
}

.paradigm-grid .figure-block {
  margin: 0;
}

@media (max-width: 900px) {
  .paradigm-grid {
    grid-template-columns: 1fr;
  }
}

.roadmap-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(320px, 460px);
  gap: 44px;
  align-items: start;
}

.roadmap {
  position: relative;
  padding-left: 34px;
}

.roadmap-line {
  position: absolute;
  left: 11px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--line);
}

.roadmap-item {
  position: relative;
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 18px;
  margin-bottom: 26px;
}

.roadmap-item:last-child {
  margin-bottom: 0;
}

.roadmap-node {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--text);
  background: var(--paper);
  margin-top: 3px;
  z-index: 2;
}

.roadmap-item:last-child .roadmap-node {
  background: var(--text);
}

.roadmap-content p {
  margin: 0;
}

.roadmap-label {
  margin-bottom: 6px !important;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.roadmap-content p:last-child {
  line-height: 1.7;
}

.roadmap-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding-top: 30px;
}

.roadmap-figure {
  margin: 0;
  width: 100%;
  max-width: 520px;
  padding: 0;
  background: transparent;
  border: 0;
}

.roadmap-figure img {
  display: block;
  width: 100%;
  height: auto;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.roadmap-logo {
  width: 100%;
  max-width: 300px;
}

.roadmap-logo img {
  display: block;
  width: 100%;
  height: auto;
  background: transparent;
}

@media (max-width: 900px) {
  .roadmap-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .roadmap-rail {
    align-items: flex-start;
  }

  .roadmap-figure {
    max-width: 520px;
  }

  .roadmap-logo {
    max-width: 220px;
  }
}

.timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
  margin-top: 18px;
  padding-top: 26px;
}

.timeline-line {
  position: absolute;
  top: 9px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--line);
}

.timeline-item {
  position: relative;
  padding-top: 18px;
}

.timeline-dot {
  position: absolute;
  top: 0;
  left: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--text);
}

.timeline-date {
  margin: 0 0 8px;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.timeline-text {
  margin: 0;
  max-width: 18ch;
  line-height: 1.55;
}

.timeline-item-current .timeline-dot {
  background: var(--text);
}

.history-section .section-head {
  margin-bottom: 20px;
}

.history-section .section-head h2 {
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1;
  letter-spacing: -0.01em;
}

.history-section .kicker {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: rgba(94, 90, 84, 0.82);
}

@media (max-width: 900px) {
  .timeline {
    grid-template-columns: 1fr;
    gap: 22px;
    padding-top: 0;
  }

  .timeline-line {
    display: none;
  }

  .timeline-item {
    padding-top: 0;
    padding-left: 34px;
  }

  .timeline-dot {
    top: 2px;
    left: 0;
  }

  .timeline-text {
    max-width: none;
  }
}