/* Ocean Depths Palette — ICLR 2026: Agentic Context Engineering */
:root {
  --primary: #0D3B66;
  --secondary: #1B6B93;
  --accent: #14919B;
  --bg: #EDF2F7;
  --surface: #FFFFFF;
  --text: #0A1628;
  --muted: #6B8299;
  --line: #C8D6E0;
  --highlight-bg: #E8F4F8;
  --code-bg: #F0F4F8;
  --hero-bg: #0D3B66;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: Georgia, 'Times New Roman', serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 17px;
}

/* ── Hero ── */
.hero {
  background: var(--hero-bg);
  background-image: url('./assets/bg_hero_neural.png');
  background-size: cover;
  background-position: center;
  color: #FFFFFF;
  padding: 64px 24px 56px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(13, 59, 102, 0.82);
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin: 0 auto;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: #fff;
  font-family: system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
  color: #FFFFFF;
}
.hero-meta {
  font-family: system-ui, sans-serif;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.78);
  margin-bottom: 8px;
}
.hero-meta strong { color: rgba(255,255,255,0.95); }
.hero-affiliations {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.55);
  margin-bottom: 28px;
}
.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 6px;
  font-family: system-ui, sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.15s;
}
.btn:hover { opacity: 0.85; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-outline { background: transparent; color: rgba(255,255,255,0.9); border: 1.5px solid rgba(255,255,255,0.4); }

/* ── Container ── */
.container {
  max-width: 820px;
  margin: 0 auto;
  padding: 48px 24px;
}
.container + .container { padding-top: 0; }

/* ── Section headings ── */
section { margin-bottom: 56px; }
h2 {
  font-size: 1.45rem;
  color: var(--primary);
  border-left: 4px solid var(--accent);
  padding-left: 14px;
  margin-bottom: 20px;
  font-family: system-ui, sans-serif;
  font-weight: 700;
}
h3 {
  font-size: 1.1rem;
  color: var(--secondary);
  margin-top: 24px;
  margin-bottom: 10px;
  font-family: system-ui, sans-serif;
  font-weight: 600;
}

/* ── Abstract ── */
.abstract-block {
  background: var(--highlight-bg);
  border-left: 4px solid var(--accent);
  border-radius: 0 8px 8px 0;
  padding: 24px 28px;
  margin-bottom: 8px;
}
.abstract-block p { line-height: 1.8; }

/* ── Figures ── */
.figure-wrap {
  text-align: center;
  margin: 32px 0;
}
.figure-wrap img {
  max-width: 100%;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(13,59,102,0.12);
  display: inline-block;
}
.figure-wrap img.fig-narrow { max-width: 620px; }
.figure-wrap img.fig-medium { max-width: 720px; }
figcaption {
  margin-top: 10px;
  font-size: 0.88rem;
  color: var(--muted);
  font-style: italic;
  line-height: 1.5;
}
figcaption strong { font-style: normal; color: var(--text); }

/* ── Tables ── */
.table-wrap {
  overflow-x: auto;
  margin: 28px 0;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(13,59,102,0.08);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-family: system-ui, sans-serif;
  font-size: 0.9rem;
  background: var(--surface);
}
thead tr { background: var(--primary); color: #fff; }
thead th {
  padding: 10px 14px;
  text-align: center;
  font-weight: 600;
  white-space: nowrap;
}
tbody tr:nth-child(even) { background: #F5F8FB; }
tbody tr:hover { background: var(--highlight-bg); }
tbody td {
  padding: 9px 14px;
  text-align: center;
  border-bottom: 1px solid var(--line);
}
td.method-cell { text-align: left; font-weight: 500; }
.section-row td {
  background: #E8EDF3;
  font-style: italic;
  color: var(--muted);
  font-size: 0.85rem;
}
.best { font-weight: 700; color: var(--accent); }
.baseline-row td { color: var(--muted); }
.table-caption {
  font-size: 0.88rem;
  color: var(--muted);
  font-style: italic;
  margin-top: 10px;
  padding: 0 4px;
}

/* ── Key Findings Grid ── */
.findings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 24px;
}
@media (max-width: 600px) { .findings-grid { grid-template-columns: 1fr; } }
.finding-card {
  background: var(--surface);
  border-radius: 10px;
  padding: 22px 20px;
  border-top: 3px solid var(--accent);
  box-shadow: 0 2px 8px rgba(13,59,102,0.08);
}
.finding-stat {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  font-family: system-ui, sans-serif;
  line-height: 1;
  margin-bottom: 6px;
}
.finding-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--primary);
  font-family: system-ui, sans-serif;
  margin-bottom: 6px;
}
.finding-desc { font-size: 0.9rem; color: var(--muted); line-height: 1.55; }

/* ── Alert Box ── */
.alert-box {
  background: #FFF8F0;
  border-left: 4px solid #C8522A;
  border-radius: 0 8px 8px 0;
  padding: 16px 20px;
  margin: 20px 0;
  font-size: 0.93rem;
}
.alert-box strong { color: #C8522A; }

/* ── Architecture cards ── */
.arch-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 24px 0;
}
@media (max-width: 640px) { .arch-cards { grid-template-columns: 1fr; } }
.arch-card {
  background: var(--surface);
  border-radius: 8px;
  padding: 18px 16px;
  border-top: 3px solid var(--primary);
  box-shadow: 0 2px 6px rgba(13,59,102,0.07);
  text-align: center;
}
.arch-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  font-family: system-ui, sans-serif;
  margin-bottom: 6px;
}
.arch-card-desc { font-size: 0.85rem; color: var(--muted); }

/* ── Resources ── */
.resources-section {
  background: var(--primary);
  color: #fff;
  padding: 48px 24px;
  text-align: center;
}
.resources-section h2 {
  color: #fff;
  border-left-color: var(--accent);
  display: inline-block;
}
.resources-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

/* ── Fade-in (progressive enhancement: JS adds .js-enabled to html) ── */
.js-enabled .fade-in { opacity: 0; transform: translateY(16px); transition: opacity 0.5s, transform 0.5s; }
.js-enabled .fade-in.is-visible { opacity: 1; transform: none; }

/* ── Nav TOC ── */
.toc-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 0 24px;
  overflow-x: auto;
  display: flex;
  justify-content: center;
  gap: 4px;
  font-family: system-ui, sans-serif;
  font-size: 0.82rem;
}
.toc-nav a {
  display: inline-block;
  padding: 9px 12px;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}
.toc-nav a:hover, .toc-nav a.active { color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }

/* ── Language switch icon in paper HTML ── */
.lang-switch-note {
  font-size: 0.8rem;
  color: var(--muted);
  text-align: right;
  margin-bottom: -20px;
  font-family: system-ui, sans-serif;
}

/* AI explanation boxes */
.flecto-note,
.flecto-callout,
.flecto-card,
.flecto-panel {
  position: relative;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  font-size: 0.95rem;
  font-family: system-ui, sans-serif;
}
.flecto-note::before,
.flecto-callout::before,
.flecto-card::before,
.flecto-panel::before {
  content: "🤖 AI explanation";
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #1d6fa4;
  margin-bottom: 0.5em;
  opacity: 0.9;
}
.flecto-note {
  border-left: 3px solid #1d6fa4;
  background: rgba(29, 111, 164, 0.07);
}
.flecto-callout {
  background: rgba(27, 107, 147, 0.1);
  border: 1px solid rgba(27, 107, 147, 0.3);
}
.flecto-card {
  background: var(--highlight-bg);
  border: 1px solid var(--line);
  box-shadow: 0 2px 8px rgba(13,59,102,0.08);
}
.flecto-panel {
  background: #EDF5FA;
  border: 1px solid rgba(27,107,147,0.25);
}
.flecto-note h4,
.flecto-callout h4,
.flecto-card h4,
.flecto-panel h4 {
  margin: 0.5em 0 0.3em;
  font-size: 1rem;
  color: var(--primary);
}
.flecto-card ul,
.flecto-panel ul {
  padding-left: 1.5em;
  margin-top: 0.4em;
}
.flecto-card li,
.flecto-panel li {
  margin-bottom: 0.3em;
  line-height: 1.6;
}
