:root {
  --bg: #fcfbf8;
  --surface: #ffffff;
  --surface-alt: #f3f6f6;
  --surface-soft: #eef4f3;
  --text: #172126;
  --muted: #58656e;
  --line: #d7e0df;
  --accent: #145b63;
  --accent-soft: #d6ecea;
  --accent-strong: #0f444a;
  --ink-soft: #f6efe3;
  --warn: #8e4b1c;
  --shadow: 0 18px 40px rgba(16, 34, 40, 0.08);
  --radius: 24px;
  --radius-sm: 16px;
  --shell: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(20, 91, 99, 0.08), transparent 28%),
    linear-gradient(180deg, #fffefd 0%, var(--bg) 100%);
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  background: rgba(252, 251, 248, 0.82);
  border-bottom: 1px solid rgba(215, 224, 223, 0.8);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 0;
}

.brand {
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent-strong);
}

.nav-links,
.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.95rem;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.75rem 1rem;
  font-size: 0.92rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-1px);
}


.button-icon {
  gap: 0.55rem;
}

.paper-link {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.65rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--accent-strong);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.paper-link:hover {
  transform: translateY(-1px);
  border-color: rgba(20, 91, 99, 0.35);
  background: #fff;
}

.paper-link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  height: 1.55rem;
  color: currentColor;
  flex: 0 0 auto;
}

.brand-mark {
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
}

.brand-mark-arxiv {
  width: auto;
  min-width: 3.15rem;
  padding: 0 0.42rem;
  height: 1.55rem;
  background: #b31b1b;
  color: #fff;
  font-size: 0.68rem;
  font-family: "Helvetica Neue", Arial, sans-serif;
}

.brand-mark-hf {
  background: #ffd54f;
  color: #2d2416;
  font-size: 0.98rem;
  border: 1px solid rgba(45, 36, 22, 0.12);
}

.paper-link-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.button-primary .paper-link-icon,
.button-primary .paper-link-icon svg {
  color: currentColor;
  stroke: currentColor;
}

.button-ghost {
  background: rgba(255, 255, 255, 0.65);
  border-color: var(--line);
}

.button-primary {
  background: var(--accent);
  color: #fff;
}

.button-placeholder {
  background: #f5f2ea;
  border-color: #e6d7bf;
  color: var(--warn);
}

.hero {
  padding: 5rem 0 2rem;
}

.hero-shell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.hero h1,
.section-heading h2 {
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  margin: 0;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.hero h1 {
  font-size: clamp(2.7rem, 6vw, 4.9rem);
  max-width: 15ch;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.hero h1 span {
  display: block;
}

.hero-copy {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-takeaway {
  margin: 1rem 0 0;
  font-size: clamp(1.1rem, 2vw, 1.42rem);
  line-height: 1.45;
  max-width: 44rem;
  color: #26333a;
  text-align: center;
}

.section-heading p,
.figure-caption,
.footer-note,
.site-footer p {
  color: var(--muted);
  line-height: 1.6;
}

.benchmark-figure-card,
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.4rem;
}

.hero-stat {
  padding: 1.15rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(215, 224, 223, 0.92);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 28px rgba(16, 34, 40, 0.06);
  text-align: center;
}

.hero-stat strong {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent-strong);
}

.hero-stat span {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.92rem;
}

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

.benchmark-card h3,
.memo-card h3,
.perturbation-card h3,
.metric-card h3 {
  margin: 0.45rem 0 0;
  font-size: 1.08rem;
}

.section {
  padding: 1.75rem 0 4rem;
}

.section-tint {
  background:
    linear-gradient(180deg, rgba(214, 236, 234, 0.22), rgba(214, 236, 234, 0.08)),
    transparent;
}

.section-heading {
  max-width: 46rem;
  margin-bottom: 1.2rem;
}

.section-heading h2 {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
}

.benchmark-layout {
  display: block;
}

.benchmark-figure-card {
  padding: 0.8rem;
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(215, 224, 223, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.benchmark-figure-card img {
  width: 100%;
  border-radius: 18px;
  max-height: 420px;
  object-fit: contain;
  object-position: center;
  margin: 0 auto;
}

.figure-caption {
  margin: 0.55rem 0 0;
  font-size: 0.88rem;
  text-align: center;
  width: 100%;
}

.benchmark-cards {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 0.75rem;
}

.why-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.why-pill {
  padding: 0.8rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(215, 224, 223, 0.92);
  background: rgba(255, 255, 255, 0.86);
  color: var(--muted);
  line-height: 1.35;
  box-shadow: 0 10px 28px rgba(16, 34, 40, 0.05);
}

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

.hoi-strip {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(215, 224, 223, 0.92);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 28px rgba(16, 34, 40, 0.05);
}

.hoi-title {
  width: 100%;
  font-weight: 700;
  color: var(--accent-strong);
  margin-bottom: 0.1rem;
}

.hoi-pill {
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.25;
}

.hoi-pill-left {
  background: #e8f0f4;
}

.hoi-pill-right {
  background: #f5e4e1;
}

.metric-card {
  padding: 1.35rem;
  background: var(--surface);
  border: 1px solid rgba(215, 224, 223, 0.95);
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 28px rgba(16, 34, 40, 0.06);
}

.metric-card .metric-badge,
.memo-card .metric-badge,
.benchmark-card .metric-badge,
.robustness-tile .metric-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.8rem;
  font-weight: 700;
}

.metric-pair,
.memo-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.metric-pair div,
.memo-metrics div {
  padding: 0.85rem 0.9rem;
  border-radius: 14px;
  background: var(--surface-soft);
}

.metric-pair strong,
.memo-metrics strong {
  display: block;
  font-size: 1.3rem;
  color: var(--accent-strong);
}

.metric-pair span,
.memo-metrics span {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.benchmark-card,
.robustness-tile,
.memo-card {
  background: var(--surface);
  border: 1px solid rgba(215, 224, 223, 0.95);
  border-radius: var(--radius-sm);
  padding: 1.3rem;
  box-shadow: 0 10px 28px rgba(16, 34, 40, 0.06);
}

.task-footnote {
  margin-top: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.9rem;
}

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

.conclusion-box {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(215, 224, 223, 0.92);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 28px rgba(16, 34, 40, 0.05);
}

.conclusion-box h2 {
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0;
}

.conclusion-box p {
  margin: 0.45rem 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.benchmark-card ul {
  margin: 0.9rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
  line-height: 1.55;
}

.robustness-tile p {
  margin: 0.7rem 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.results-visual {
  display: grid;
  grid-template-columns: repeat(7, auto);
  justify-content: center;
  align-items: center;
  gap: 0.8rem;
  padding: 1.25rem 1rem;
  border-radius: var(--radius);
  border: 1px solid rgba(215, 224, 223, 0.92);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 28px rgba(16, 34, 40, 0.06);
}

.results-step {
  min-width: 116px;
  padding: 0.95rem 0.8rem;
  border-radius: 18px;
  background: var(--surface-soft);
  text-align: center;
}

.results-step-strong {
  background: var(--accent-soft);
}

.results-method,
.results-gain,
.results-base {
  display: block;
}

.results-method {
  color: var(--accent-strong);
  font-weight: 700;
}

.results-gain,
.results-base {
  margin-top: 0.32rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.results-arrow {
  color: var(--accent);
  font-size: 1.35rem;
  font-weight: 700;
}

.results-bullets {
  margin: 0.9rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
  line-height: 1.55;
}

.site-footer {
  border-top: 1px solid rgba(215, 224, 223, 0.9);
  padding: 2rem 0 3rem;
}

.footer-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.85fr);
  gap: 1rem;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1080px) {
  .footer-shell {
    grid-template-columns: 1fr;
  }

  .hero-stats,
  .benchmark-cards,
  .robustness-tiles,
  .memo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .results-visual {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .results-arrow {
    display: none;
  }
}

@media (max-width: 820px) {
  .nav-shell {
    flex-wrap: wrap;
  }

  .nav-links {
    order: 3;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 0.2rem;
  }

  .nav-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .hero {
    padding-top: 4.5rem;
  }

  .hero-stats,
  .benchmark-cards,
  .robustness-tiles,
  .memo-grid {
    grid-template-columns: 1fr;
  }

  .results-visual {
    grid-template-columns: 1fr;
  }

  .hoi-strip {
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  .shell {
    width: min(calc(100% - 1.25rem), var(--shell));
  }

  .section {
    padding: 1.25rem 0 3.5rem;
  }

  .button {
    width: 100%;
  }

  .metric-pair,
  .memo-metrics {
    grid-template-columns: 1fr;
  }
}
