:root {
  --bg: #ffffff;
  --bg-alt: #f6f8f4;
  --card: #ffffff;
  --line: rgba(20, 40, 25, 0.10);
  --text: #1c2420;
  --muted: #5f6b64;
  --green: #2f8f4e;
  --amber: #d98a12;
  --grad: linear-gradient(100deg, #3aa357 0%, #d9a019 55%, #e8613a 100%);
  --shadow: 0 10px 40px rgba(30, 50, 35, 0.10);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--green); text-decoration: none; }
img { display: block; max-width: 100%; }

.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 2.5rem;
  transition: background 0.3s, padding 0.3s, border-color 0.3s, box-shadow 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.7rem 2.5rem;
  border-bottom-color: var(--line);
  box-shadow: 0 4px 20px rgba(30, 50, 35, 0.06);
}
.nav-brand { font-family: 'Space Grotesk', sans-serif; font-weight: 700; color: var(--text); font-size: 1.15rem; }
.nav-links a { color: var(--muted); margin-left: 1.6rem; font-size: 0.92rem; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--green); }

.hero {
  position: relative; overflow: hidden; text-align: center;
  padding: 8rem 1.5rem 4rem;
  background: linear-gradient(180deg, #f3f8ef 0%, #ffffff 70%);
}
.hero-bg {
  position: absolute; inset: -4% -4% auto -4%; height: 110vh; pointer-events: none;
  background-size: cover; background-position: center top;
  opacity: 0.55; filter: saturate(1.15);
  animation: kenburns 30s ease-in-out infinite alternate;
}
@keyframes kenburns {
  from { transform: scale(1) translate(0, 0); }
  to { transform: scale(1.08) translate(-1.2%, -1%); }
}
.hero-glow {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 55% 45% at 50% 30%, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.55) 60%, rgba(255, 255, 255, 0) 100%),
    radial-gradient(600px 300px at 12% 8%, rgba(58, 163, 87, 0.16), transparent 70%),
    radial-gradient(600px 300px at 88% 12%, rgba(232, 97, 58, 0.12), transparent 70%),
    linear-gradient(180deg, rgba(243, 248, 239, 0.35) 0%, rgba(255, 255, 255, 0.6) 55%, #ffffff 92%);
}
.hero-content { position: relative; z-index: 2; max-width: 960px; margin: 0 auto; animation: rise 0.9s ease-out both; }
@keyframes rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
.venue-pill {
  display: inline-block; padding: 0.35rem 1rem; border-radius: 999px;
  border: 1px solid rgba(47, 143, 78, 0.25); background: rgba(47, 143, 78, 0.07);
  color: var(--green); font-size: 0.85rem; font-weight: 600; letter-spacing: 0.04em;
}
.venue-pill i { color: var(--amber); margin-right: 0.3rem; }
.hero-title {
  font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  font-size: clamp(3rem, 9vw, 6.2rem); line-height: 1.05; margin: 1.2rem 0 0.6rem; letter-spacing: -0.02em;
}
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-subtitle { font-size: clamp(1.1rem, 2.2vw, 1.5rem); font-weight: 500; color: #2b3530; max-width: 760px; margin: 0 auto; }
.authors {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.3rem 1.3rem;
  max-width: 820px; margin: 1.8rem auto 0; font-size: 1.02rem; color: var(--text);
}
.authors span { white-space: nowrap; font-weight: 500; }
.authors sup, .affil sup, .corr sup { font-size: 0.65em; color: var(--amber); font-weight: 600; margin-left: 1px; }
.affil {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.15rem 1.4rem;
  max-width: 900px; margin: 0.9rem auto 0; color: var(--muted); font-size: 0.86rem; line-height: 1.6;
}
.affil span { white-space: nowrap; }
.corr { color: var(--muted); font-size: 0.8rem; margin-top: 0.4rem; }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.8rem; justify-content: center; margin-top: 2.2rem; }
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.4rem; border-radius: 999px;
  background: #1c2420; color: #fff; font-weight: 600; font-size: 0.95rem;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.btn:hover { transform: translateY(-2px); background: var(--green); box-shadow: 0 10px 25px rgba(47, 143, 78, 0.3); }
.btn-ghost { background: #fff; color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { color: #fff; }
.btn.is-disabled { opacity: 0.4; pointer-events: none; }
.btn small { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.75; }

.teaser {
  position: relative; z-index: 2; max-width: 1150px; margin: 3.5rem auto 0;
  animation: rise 1.1s 0.2s ease-out both;
}
.teaser img { width: 100%; border-radius: 20px; box-shadow: 0 25px 70px rgba(30, 50, 35, 0.18); }
.teaser figcaption { color: var(--muted); font-size: 0.92rem; margin-top: 1rem; }
.teaser figcaption b { color: var(--text); }

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  max-width: 1100px; margin: 1rem auto 0; position: relative; z-index: 3;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: var(--shadow);
}
.stat { padding: 1.8rem 1rem; text-align: center; border-right: 1px solid var(--line); }
.stat:last-child { border-right: none; }
.stat-num {
  display: block; font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 2.6rem;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat-label { color: var(--muted); font-size: 0.88rem; }

.section { padding: 6rem 1.5rem; }
.section.alt { background: var(--bg-alt); }
.container { max-width: 1150px; margin: 0 auto; }
.narrow { max-width: 820px; margin-left: auto; margin-right: auto; }
.eyebrow {
  text-align: center; color: var(--green); font-weight: 600; font-size: 0.8rem;
  text-transform: uppercase; letter-spacing: 0.18em; margin-bottom: 0.6rem;
}
.section-title {
  font-family: 'Space Grotesk', sans-serif; font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  text-align: center; line-height: 1.2; margin-bottom: 2rem;
}
.sub-title { font-family: 'Space Grotesk', sans-serif; font-size: 1.35rem; text-align: center; margin: 4rem 0 1.5rem; }
.lead { color: var(--muted); text-align: center; font-size: 1.05rem; margin-bottom: 2.5rem; }
.abstract p { color: #36413b; font-size: 1.06rem; text-align: justify; margin-bottom: 1.1rem; }
.abstract b { color: var(--green); }
.note { text-align: center; color: var(--muted); font-size: 0.85rem; margin-top: 0.8rem; }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  box-shadow: var(--shadow); margin: 0 auto;
}
.card img { width: 100%; }
.card figcaption { background: var(--bg-alt); border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; padding: 1rem 1.4rem; }
.card.wide { margin-top: 3rem; }
.card a { display: block; overflow: hidden; }
.card a img { transition: transform 0.5s; }
.card a:hover img { transform: scale(1.015); }

.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin-top: 2.5rem; }
.chip {
  padding: 0.35rem 0.85rem; border-radius: 999px; font-size: 0.85rem;
  background: #fff; border: 1px solid rgba(47, 143, 78, 0.25); color: #2a5a38;
  transition: background 0.2s, transform 0.2s, color 0.2s;
}
.chip:hover { background: var(--green); color: #fff; transform: translateY(-2px); }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.feature {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 1.8rem;
  box-shadow: 0 4px 18px rgba(30, 50, 35, 0.05);
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.feature:hover { transform: translateY(-4px); border-color: rgba(47, 143, 78, 0.4); box-shadow: var(--shadow); }
.feature-icon {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: var(--grad); color: #fff; font-size: 1.15rem; margin-bottom: 1rem;
}
.feature h3 { font-family: 'Space Grotesk', sans-serif; font-size: 1.3rem; margin-bottom: 0.5rem; }
.feature p { color: var(--muted); font-size: 0.95rem; }

.result-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.result-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 1.8rem;
  display: flex; flex-direction: column; gap: 0.3rem; box-shadow: 0 4px 18px rgba(30, 50, 35, 0.05);
}
.result-name { color: var(--muted); font-weight: 600; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.08em; }
.result-num { font-family: 'Space Grotesk', sans-serif; font-size: 3.2rem; font-weight: 700; line-height: 1.1; }
.result-gain { color: var(--green); font-size: 0.9rem; margin-bottom: 0.8rem; }

.bar { height: 8px; border-radius: 99px; background: rgba(20, 40, 25, 0.08); overflow: hidden; flex: 1; }
.bar span {
  display: block; height: 100%; width: 0; border-radius: 99px; background: var(--grad);
  transition: width 1.4s cubic-bezier(.2, .8, .2, 1);
}
.visible .bar span { width: var(--w); }

.ablation { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 0.9rem; }
.abl-row { display: grid; grid-template-columns: 190px 1fr 60px; align-items: center; gap: 1rem; color: #36413b; font-size: 0.95rem; }
.abl-row b { text-align: right; font-family: 'Space Grotesk', sans-serif; }
.abl-row.best { color: var(--text); font-weight: 600; }
.abl-row.best b { color: var(--amber); }

.bib { position: relative; background: #f7f9f6; border: 1px solid var(--line); border-radius: 14px; }
.bib pre {
  font-family: 'SFMono-Regular', Menlo, Consolas, monospace; font-size: 0.85rem; color: #2b3530;
  padding: 1.6rem; overflow-x: auto; white-space: pre;
}
.copy-btn {
  position: absolute; top: 0.8rem; right: 0.8rem; cursor: pointer;
  background: #fff; color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 0.35rem 0.8rem; font-size: 0.8rem;
}
.copy-btn:hover { background: var(--green); color: #fff; }

.footer { text-align: center; color: var(--muted); font-size: 0.85rem; padding: 2.5rem 1.5rem; border-top: 1px solid var(--line); }

.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-content, .teaser, .hero-bg { animation: none; }
  .bar span { transition: none; }
}
@media (max-width: 860px) {
  .nav { padding: 0.8rem 1.2rem; }
  .nav.scrolled { padding: 0.6rem 1.2rem; }
  .nav-links { display: none; }
  .hero { padding: 6rem 1.2rem 3rem; }
  .affil span { white-space: normal; }
  .teaser { margin-top: 2.5rem; }
  .teaser img { border-radius: 12px; }
  .stats { grid-template-columns: repeat(2, 1fr); margin: 0.5rem 1rem 0; }
  .stat:nth-child(2) { border-right: none; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .feature-grid, .result-grid { grid-template-columns: 1fr; }
  .abl-row { grid-template-columns: 130px 1fr 48px; font-size: 0.85rem; }
  .section { padding: 4.5rem 1.2rem; }
}
