:root {
  --header-green: #2f5f47;
  --body-green: #eef5ee;
  --accent: #00a64f;
  --text: #1f2933;
  --muted: #5b6b78;
  --border: #d9e2dc;
  --bg: #ffffff;
  --bg-alt: #f6faf6;
  --r-color: #E69F00;   /* reasoning - orange */
  --p-color: #56B4E9;   /* perception - blue */
  --max-width: 1100px;
  --narrow-width: 820px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.container.narrow { max-width: var(--narrow-width); }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(180deg, #f6faf6 0%, #ffffff 100%);
  border-bottom: 1px solid var(--border);
  padding: 64px 0 48px;
  text-align: center;
}

.title {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.2;
  font-weight: 800;
  color: var(--header-green);
  margin: 0 0 28px;
  letter-spacing: -0.01em;
}

.authors {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 22px;
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 8px;
}

.author { white-space: nowrap; }

.affiliation {
  color: var(--muted);
  font-size: 16px;
  margin-bottom: 28px;
}

.links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 40px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--header-green);
  color: white;
  text-decoration: none;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  transition: transform .15s ease, background .15s ease;
}

.btn:hover {
  background: #244a38;
  transform: translateY(-1px);
}

.btn-icon { font-size: 16px; }

.tldr {
  max-width: 800px;
  margin: 0 auto;
  padding: 18px 22px;
  background: var(--body-green);
  border-left: 4px solid var(--header-green);
  border-radius: 6px;
  text-align: left;
  font-size: 16px;
  color: #2b3a32;
}

.tldr strong { color: var(--header-green); }

/* ---------- Sections ---------- */
.section {
  padding: 64px 0;
}

.section.alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section h2 {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  color: var(--header-green);
  margin: 0 0 24px;
  letter-spacing: -0.01em;
}

.section h3 {
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 8px;
}

.section p { margin: 0 0 16px; }

em {
  font-style: normal;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.lead {
  font-size: 18px;
  color: var(--muted);
  margin-bottom: 28px;
  max-width: 850px;
}

/* ---------- Teaser ---------- */
.teaser-section { padding: 40px 0 24px; }

.teaser {
  margin: 0;
  text-align: center;
}

.teaser img {
  max-width: 720px;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

figure {
  margin: 24px 0;
  text-align: center;
}

figure img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

figcaption {
  font-size: 14px;
  color: var(--muted);
  margin-top: 12px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

figcaption strong { color: var(--text); }

.r { color: var(--r-color); font-weight: 700; }
.p { color: var(--p-color); font-weight: 700; }

/* ---------- Cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.cards-1-2 {
  grid-template-columns: 1fr 1fr;
}

.cards-1-2 .card-wide {
  grid-column: 1 / -1;
}

.card-figs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 14px 0 6px;
}

.card-figs figure { margin: 0; }

.card-figs img {
  width: 100%;
  height: auto;
  border-radius: 6px;
}

.card-figs figcaption {
  font-size: 13px;
  margin-top: 6px;
}

.card-closing { margin-top: 20px; }
.card-mitigation { margin-top: 22px; }

@media (max-width: 720px) {
  .card-figs { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .cards-1-2 { grid-template-columns: 1fr; }
}

.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  position: relative;
}

.card-num {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--header-green);
  color: white;
  border-radius: 50%;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 14px;
}

.card p { margin: 0; font-size: 15.5px; }

/* ---------- Two-column figures ---------- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 28px 0;
}

.two-col figure { margin: 0; }

@media (max-width: 720px) {
  .two-col { grid-template-columns: 1fr; }
}

/* ---------- Takeaway box ---------- */
.takeaway {
  background: var(--body-green);
  border: 1px solid var(--header-green);
  border-radius: 10px;
  padding: 20px 24px;
  margin-top: 28px;
}

.takeaway-title {
  background: var(--header-green);
  color: white;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 6px;
  display: inline-block;
  margin-bottom: 12px;
  font-size: 14px;
  letter-spacing: 0.02em;
}

.takeaway p { margin: 0; }

.takeaway code {
  background: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
}

/* ---------- Lists ---------- */
.metric-list, .takeaway-list {
  padding-left: 22px;
  margin: 0 0 20px;
}

.metric-list li, .takeaway-list li {
  margin-bottom: 10px;
}

.takeaway-list li { font-size: 16.5px; }

code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.92em;
  background: #f0f4f0;
  padding: 1px 5px;
  border-radius: 3px;
}

/* ---------- BibTeX ---------- */
.bibtex {
  background: #1f2933;
  color: #e8eef2;
  padding: 20px 24px;
  border-radius: 8px;
  overflow-x: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13.5px;
  line-height: 1.55;
}

.bibtex code {
  background: transparent;
  color: inherit;
  padding: 0;
  font-size: inherit;
}

/* ---------- Footer ---------- */
footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 32px 0;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

footer p { margin: 4px 0; }
footer .muted { font-size: 13px; opacity: 0.8; }
