:root {
  --bg: #f2efe8;
  --bg-soft: #fbfaf7;
  --panel: #ffffff;
  --panel-strong: #f8f4ea;
  --ink: #182431;
  --ink-soft: #506173;
  --line: #d8cfbf;
  --brand: #17395c;
  --brand-2: #285f8f;
  --accent: #d97706;
  --accent-2: #b45309;
  --success: #0f766e;
  --danger: #b42318;
  --shadow-sm: 0 8px 24px rgba(24, 36, 49, 0.08);
  --shadow-md: 0 16px 40px rgba(24, 36, 49, 0.12);
  --shadow-xl: 0 22px 64px rgba(18, 34, 48, 0.24);
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --font-sans: "Manrope", "Segoe UI", sans-serif;
  --font-serif: "Cormorant Garamond", Georgia, serif;
  --nav-height: 72px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-height) + 12px); }

body {
  margin: 0;
  background:
    radial-gradient(circle at top right, rgba(217, 119, 6, 0.08), transparent 28rem),
    radial-gradient(circle at 18% 72%, rgba(40, 95, 143, 0.08), transparent 26rem),
    linear-gradient(180deg, #f7f4ed 0%, var(--bg) 100%);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.65;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.28) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.2) 1px, transparent 1px);
  background-size: 38px 38px;
  opacity: 0.24;
  z-index: -1;
}

img { display: block; max-width: 100%; }
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

/* ── Scroll progress bar ── */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--accent), #f4a62d, var(--accent-2));
  z-index: 1100; transition: width 0.08s linear;
  box-shadow: 0 0 8px rgba(217, 119, 6, 0.5);
}

/* ── Nav bar ── */
.site-nav {
  position: sticky; top: 0; z-index: 1000; height: var(--nav-height);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(15, 28, 41, 0.92);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  transition: height 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}
.site-nav.scrolled { height: 56px; background: rgba(10, 22, 34, 0.97); box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25); }
.nav-inner { max-width: 1240px; margin: 0 auto; padding: 0 24px; height: 100%; display: flex; align-items: center; gap: 18px; }
.nav-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-brand:hover { text-decoration: none; }
.nav-brand-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px;
  border-radius: 10px; background: linear-gradient(135deg, var(--accent), #f4a62d); color: #1b2530;
  font-family: var(--font-sans); font-size: 0.72rem; font-weight: 900; letter-spacing: 0.04em;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.35); transition: transform 0.3s ease;
}
.site-nav.scrolled .nav-brand-icon { width: 32px; height: 32px; font-size: 0.64rem; }
.nav-brand:hover .nav-brand-icon { transform: rotate(-6deg) scale(1.06); }
.nav-brand-text { font-family: var(--font-serif); font-size: 1.3rem; font-weight: 700; color: #fff; letter-spacing: 0.02em; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2); }
.nav-links { list-style: none; display: flex; align-items: center; gap: 4px; margin: 0 0 0 auto; padding: 0; }
.nav-links a {
  position: relative; display: inline-flex; padding: 8px 14px; border-radius: 999px;
  color: rgba(255, 255, 255, 0.72); font-size: 0.84rem; font-weight: 700; letter-spacing: 0.01em;
  text-decoration: none; transition: color 0.2s ease, background 0.2s ease;
}
.nav-links a::after {
  content: ""; position: absolute; bottom: 2px; left: 50%; width: 0; height: 2px;
  background: var(--accent); border-radius: 2px; transform: translateX(-50%); transition: width 0.25s ease;
}
.nav-links a:hover { background: rgba(255, 255, 255, 0.08); color: #fff; text-decoration: none; }
.nav-links a:hover::after { width: 60%; }
.nav-links a.is-active { color: #fff; background: rgba(217, 119, 6, 0.15); }
.nav-links a.is-active::after { width: 60%; background: var(--accent); }

.nav-toggle {
  display: none; margin-left: auto; width: 40px; height: 40px; border: 0; border-radius: 10px;
  background: rgba(255, 255, 255, 0.08); cursor: pointer; flex-direction: column; align-items: center;
  justify-content: center; gap: 5px; transition: background 0.2s ease;
}
.nav-toggle:hover { background: rgba(255, 255, 255, 0.14); }
.hamburger-line { display: block; width: 20px; height: 2px; background: #fff; border-radius: 2px; transition: transform 0.3s ease, opacity 0.3s ease; }
.nav-toggle.is-open .hamburger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open .hamburger-line:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.is-open .hamburger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Back to top ── */
.back-to-top {
  position: fixed; bottom: 28px; right: 28px; z-index: 900; width: 48px; height: 48px; border: 0;
  border-radius: 50%; background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%); color: #fff;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(23, 57, 92, 0.35); opacity: 0; visibility: hidden; transform: translateY(16px);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, background 0.2s ease;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: linear-gradient(135deg, var(--brand-2) 0%, var(--brand) 100%); transform: translateY(-3px); box-shadow: 0 12px 32px rgba(23, 57, 92, 0.45); }

/* ── Hero ── */
.hero {
  position: relative; overflow: hidden; padding: 88px 24px 78px;
  background:
    radial-gradient(circle at 18% 18%, rgba(217, 119, 6, 0.18), transparent 20rem),
    radial-gradient(circle at 84% 22%, rgba(40, 95, 143, 0.2), transparent 24rem),
    linear-gradient(135deg, #0f2436 0%, #183552 38%, #214a70 100%);
  color: #fff;
}
.hero::before {
  content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%; right: -140px; top: -120px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.24) 0%, rgba(255, 255, 255, 0) 68%);
  filter: blur(8px); animation: heroFloat 7s ease-in-out infinite alternate;
}
.hero::after {
  content: ""; position: absolute; inset: auto 0 0; height: 120px;
  background: linear-gradient(180deg, rgba(15, 36, 54, 0) 0%, rgba(15, 36, 54, 0.7) 100%); pointer-events: none;
}
@keyframes heroFloat { 0% { transform: translateY(0); opacity: 0.72; } 100% { transform: translateY(20px); opacity: 1; } }

.hero-inner, .container { max-width: 1240px; margin: 0 auto; }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr); gap: 28px; align-items: start; }

.eyebrow-row, .pill-row, .profile-row { display: flex; flex-wrap: wrap; gap: 10px; }
.eyebrow, .pill, .profile-pill, .mini-badge { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 7px 14px; font-size: 0.82rem; font-weight: 800; letter-spacing: 0.04em; }
.eyebrow { background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.16); color: rgba(255, 255, 255, 0.9); text-transform: uppercase; }
.eyebrow.accent { background: rgba(217, 119, 6, 0.18); color: #ffd49a; border-color: rgba(255, 212, 154, 0.2); }

.hero-title, .page-title, .section-title { font-family: var(--font-serif); line-height: 1.06; letter-spacing: 0.01em; }
.hero-title { margin: 18px 0 12px; font-size: clamp(2.4rem, 5vw, 4.4rem); font-weight: 700; max-width: 16ch; }
.hero-subtitle { max-width: 58rem; margin: 0 0 20px; font-size: 1.05rem; color: rgba(255, 255, 255, 0.82); }

.author-block { margin: 22px 0 18px; padding: 18px 20px; border-radius: var(--radius-md); background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.12); }
.author-line { margin: 0 0 6px; font-weight: 800; }
.affiliation-line, .muted { margin: 0; color: rgba(255, 255, 255, 0.72); font-size: 0.95rem; }
.profile-pill { margin-top: 4px; background: rgba(255, 255, 255, 0.12); color: #fff; font-size: 0.78rem; }

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px;
  padding: 12px 18px; font-size: 0.92rem; font-weight: 800; letter-spacing: 0.01em; cursor: pointer;
  text-decoration: none; transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; }
.btn:active { transform: translateY(0); }
.btn-primary { background: linear-gradient(135deg, #f4a62d 0%, var(--accent) 100%); color: #1b2530; box-shadow: 0 10px 28px rgba(217, 119, 6, 0.28); }
.btn-primary:hover { box-shadow: 0 14px 36px rgba(217, 119, 6, 0.4); background: linear-gradient(135deg, #f9b94a 0%, #e88a05 100%); }
.btn-secondary { background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.16); color: #fff; }
.btn-secondary:hover { background: rgba(255, 255, 255, 0.18); border-color: rgba(255, 255, 255, 0.28); }
.btn-dark { background: var(--brand); color: #fff; }
.btn-dark:hover { background: var(--brand-2); box-shadow: 0 8px 24px rgba(23, 57, 92, 0.3); }
.btn-ghost { background: transparent; border: 1px solid rgba(255, 255, 255, 0.2); color: rgba(255, 255, 255, 0.88); }
.btn-block { width: 100%; }

/* Light-surface variants (buttons placed on cream sections need dark text/border, not white-on-white) */
.section .btn-secondary { background: rgba(23, 57, 92, 0.08); border: 1px solid rgba(23, 57, 92, 0.16); color: var(--brand); }
.section .btn-secondary:hover { background: rgba(23, 57, 92, 0.14); }
.section .btn-ghost { border-color: rgba(23, 57, 92, 0.24); color: var(--brand); }

.hero-sidecard, .card, .metric-card, .paper-sheet, .resource-card, .figure-card, .download-step, .chart-card {
  border-radius: var(--radius-md); background: rgba(255, 255, 255, 0.95); box-shadow: var(--shadow-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover, .resource-card:hover, .figure-card:hover, .chart-card:hover, .mini-card:hover, .work-card:hover {
  transform: translateY(-4px); border-color: rgba(40, 95, 143, 0.28); box-shadow: 0 16px 34px rgba(23, 57, 92, 0.12);
}
.metric-card { transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease; }
.metric-card:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 12px 32px rgba(23, 57, 92, 0.18); border-color: var(--accent); }

.hero-sidecard { padding: 22px; color: var(--ink); border: 1px solid rgba(216, 207, 191, 0.8); }
.hero-sidecard h3 { margin: 0 0 6px; font-family: var(--font-serif); font-size: 1.4rem; color: var(--brand); }
.hero-sidecard p { margin: 0 0 14px; color: var(--ink-soft); font-size: 0.92rem; }

/* ── Sections ── */
.section { padding: 78px 24px; }
.section-alt { background: linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0.2) 100%); }
.section-title { margin: 0; font-size: clamp(2rem, 4vw, 3.1rem); font-weight: 700; color: var(--brand); }
.section-kicker { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 10px; text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.78rem; font-weight: 900; color: var(--accent-2); }
.section-kicker::before { content: ""; display: inline-block; width: 24px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.section-subtitle { margin: 10px 0 0; max-width: 56rem; color: var(--ink-soft); font-size: 1rem; }

.overview-grid, .results-grid, .resource-grid, .profile-grid { margin-top: 28px; display: grid; gap: 22px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.architecture-grid { margin-top: 28px; display: grid; gap: 22px; grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.92fr); }
.split-callout { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); margin-top: 24px; }

.card, .resource-card, .figure-card {
  padding: 22px; background: var(--panel); border: 1px solid rgba(216, 207, 191, 0.8);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card h3, .resource-card h3, .figure-card h3 { margin: 0 0 12px; font-size: 1.1rem; color: var(--brand); }
.card p, .resource-card p, .download-step p { margin: 0; color: var(--ink-soft); }
.list-tight { margin: 10px 0 0; padding-left: 1.2rem; }
.list-tight li { margin-bottom: 0.45rem; color: var(--ink-soft); }

.module-card { border-left: 4px solid var(--brand-2); }
.module-card:nth-child(2) { border-left-color: var(--accent); }
.module-card:nth-child(3) { border-left-color: var(--success); }

.formula-box {
  margin: 22px 0; padding: 26px; border-radius: var(--radius-md); text-align: center;
  background: linear-gradient(135deg, #132e47 0%, #20486a 100%); color: #fff; box-shadow: var(--shadow-md);
  font-family: var(--font-serif); font-size: 1.5rem; overflow-x: auto;
}
.formula-box .formula-legend { margin-top: 10px; font-family: var(--font-sans); font-size: 0.82rem; color: rgba(255, 255, 255, 0.78); font-weight: 600; }

.metric-grid { margin-top: 18px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.metric-card { padding: 20px; background: linear-gradient(180deg, #fffefb 0%, #f5efe4 100%); border: 1px solid rgba(216, 207, 191, 0.9); text-align: center; }
.metric-card strong { display: block; margin-bottom: 4px; font-family: var(--font-serif); font-size: 2.1rem; line-height: 1; color: var(--brand); }
.metric-card strong[data-count] {
  display: inline-block; background: linear-gradient(90deg, var(--brand) 40%, var(--accent) 50%, var(--brand) 60%);
  background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: counterShimmer 3s ease-in-out infinite;
}
@keyframes counterShimmer { 0%, 100% { background-position: 200% 0; } 50% { background-position: -200% 0; } }
.metric-card span { font-size: 0.85rem; color: var(--ink-soft); font-weight: 700; }

.stats-table { width: 100%; margin-top: 18px; border-collapse: collapse; overflow: hidden; border-radius: 12px; }
.stats-table th, .stats-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid rgba(216, 207, 191, 0.68); }
.stats-table th { background: #193958; color: #fff; font-size: 0.82rem; letter-spacing: 0.04em; text-transform: uppercase; }
.stats-table tr:nth-child(even) td { background: rgba(248, 244, 234, 0.7); }
.stats-table tr.highlight td { background: rgba(15, 118, 110, 0.08); font-weight: 800; }
.stats-table td.tag-bad { color: var(--danger); font-weight: 800; }
.stats-table td.tag-good { color: var(--success); font-weight: 800; }

.quote-box { padding: 18px; border-radius: var(--radius-md); background: #fff8eb; border: 1px solid rgba(217, 119, 6, 0.18); color: #65410d; margin-top: 22px; }
.quote-box strong { color: #8f4f07; }

.code-block { background: #0f2436; color: #d7f7e8; border-radius: 14px; padding: 20px 22px; font-size: 0.86rem; overflow-x: auto; box-shadow: var(--shadow-md); }
.code-block .cmt { color: #7c8a86; }

.chart-grid { margin-top: 28px; display: grid; gap: 22px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.chart-card { padding: 16px; border: 1px solid rgba(216, 207, 191, 0.86); cursor: zoom-in; }
.chart-card img { border-radius: 10px; aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.chart-card figcaption { margin: 12px 2px 2px; font-size: 0.86rem; font-weight: 700; color: var(--brand); }

/* ── Paper section ── */
.paper-preview-shell { margin-top: 28px; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr); gap: 24px; }
.paper-sheet { padding: 28px 28px 24px; border: 1px solid rgba(23, 57, 92, 0.12); }
.paper-topline { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-bottom: 2px solid rgba(40, 95, 143, 0.18); padding-bottom: 12px; margin-bottom: 16px; color: var(--brand); font-size: 0.82rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.08em; }
.paper-title { margin: 0 0 10px; font-family: var(--font-serif); font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.08; color: var(--ink); }
.paper-authors, .paper-affiliation { margin: 0 0 8px; color: var(--ink-soft); }
.paper-columns { margin-top: 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.paper-columns h4 { margin: 0 0 8px; font-size: 0.82rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.08em; color: var(--brand-2); }
.paper-columns p { margin: 0 0 10px; font-size: 0.94rem; color: var(--ink-soft); text-align: justify; }
.paper-lock { margin-top: 18px; padding: 14px 16px; border-radius: 12px; background: #fff8eb; border: 1px solid rgba(217, 119, 6, 0.2); color: #7c4a0c; font-size: 0.88rem; font-weight: 700; }

.policy-card { padding: 24px; border-radius: var(--radius-md); background: linear-gradient(180deg, #112b40 0%, #17395c 100%); color: #fff; box-shadow: var(--shadow-md); }
.policy-card h3 { margin: 0 0 12px; color: #fff; font-family: var(--font-serif); font-size: 1.4rem; }
.policy-card > p { color: rgba(255, 255, 255, 0.82); margin: 0 0 12px; }
.policy-list { margin: 0 0 18px; padding-left: 1.2rem; }
.policy-list li { margin-bottom: 0.6rem; color: rgba(255, 255, 255, 0.84); }
.policy-card .btn-secondary { background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.16); color: #fff; }
.policy-card .btn-secondary:hover { background: rgba(255, 255, 255, 0.18); border-color: rgba(255, 255, 255, 0.28); }

/* ── Resource / profile ── */
.resource-card { display: grid; gap: 10px; }
.resource-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { background: rgba(23, 57, 92, 0.08); color: var(--brand); }
.pill.accent { background: rgba(217, 119, 6, 0.12); color: #8f4f07; }
a.pill { cursor: pointer; font-weight: 800; transition: transform 0.2s ease, box-shadow 0.2s ease; }
a.pill:hover { transform: translateY(-2px); text-decoration: none; box-shadow: 0 6px 16px rgba(23, 57, 92, 0.18); }
.profile-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.profile-links a.pill { background: var(--panel-strong); border: 1px solid rgba(216, 207, 191, 0.9); color: var(--brand); }
.profile-card { display: flex; align-items: center; gap: 18px; padding: 26px; }
.avatar { width: 68px; height: 68px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--accent)); display: grid; place-items: center; color: #fff; font-weight: 900; font-size: 1.1rem; flex: none; font-family: var(--font-serif); box-shadow: var(--shadow-sm); }

/* ── Video ── */
.video-frame { margin-top: 28px; overflow: hidden; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); background: #0f2436; aspect-ratio: 16/9; position: relative; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ── Footer ── */
.footer { padding: 34px 24px 42px; background: #12283b; color: rgba(255, 255, 255, 0.76); }
.footer-inner { max-width: 1240px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between; align-items: center; }
.footer a { color: #ffe1ae; }
.copyright-bar { max-width: 1240px; margin: 16px auto 0; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.18); color: rgba(255, 255, 255, 0.84); font-size: 0.82rem; text-align: center; letter-spacing: 0.03em; }

/* ── Reveal on scroll ── */
.is-reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
.is-reveal.revealed { opacity: 1; transform: none; }

/* ── Secure download gate ── */
.gate-overlay { position: fixed; inset: 0; z-index: 9000; display: flex; align-items: center; justify-content: center; padding: 18px; background: rgba(9, 16, 25, 0.68); backdrop-filter: blur(8px); }
body.gate-locked { overflow: hidden; }
.is-hidden { display: none !important; }
.gate-modal { width: min(100%, 560px); max-height: min(92vh, 760px); overflow: auto; padding: 26px; border-radius: 24px; background: #fff; box-shadow: 0 28px 70px rgba(9, 16, 25, 0.3); }
.gate-head { display: flex; justify-content: space-between; gap: 14px; align-items: start; margin-bottom: 18px; }
.gate-head h3 { margin: 0 0 4px; color: var(--brand); font-size: 1.35rem; font-family: var(--font-serif); }
.gate-head p { margin: 0; color: var(--ink-soft); }
.gate-close { border: 0; background: transparent; color: var(--ink-soft); cursor: pointer; font-size: 1.5rem; line-height: 1; }
.gate-steps { display: grid; gap: 14px; }
.download-step { padding: 18px; border: 1px solid rgba(216, 207, 191, 0.84); }
.download-step h4 { margin: 0 0 8px; color: var(--brand); }
.step-badge { display: inline-flex; align-items: center; justify-content: center; margin-bottom: 10px; padding: 6px 10px; border-radius: 999px; background: rgba(23, 57, 92, 0.08); color: var(--brand); font-size: 0.76rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }
.gate-check { display: flex; gap: 10px; align-items: start; margin-top: 12px; color: var(--ink-soft); font-size: 0.92rem; }
.gate-actions { margin-top: 14px; display: grid; gap: 10px; }
.gate-input { width: 100%; margin-top: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(216, 207, 191, 0.9); background: #fff; color: var(--ink); }
.gate-modal .btn-secondary { background: rgba(23, 57, 92, 0.08); border: 1px solid rgba(23, 57, 92, 0.16); color: var(--brand); }
.gate-modal .btn-secondary:hover { background: rgba(23, 57, 92, 0.14); }
.gate-error { margin-top: 10px; color: var(--danger); font-size: 0.85rem; font-weight: 800; }
.download-links { display: grid; gap: 12px; margin-top: 14px; }
.download-links a { display: inline-flex; align-items: center; justify-content: center; text-align: center; }
.email-template { margin-top: 12px; padding: 12px; border-radius: 12px; background: #f8f4ea; color: #5d4f3e; border: 1px solid rgba(216, 207, 191, 0.82); font-size: 0.88rem; white-space: pre-wrap; }
.copy-btn { border: 0; background: #f4ead6; color: #65410d; border-radius: 10px; padding: 10px 12px; cursor: pointer; font-weight: 800; margin-top: 8px; }
button[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ── Lightbox (for chart gallery) ── */
.lightbox { position: fixed; inset: 0; background: rgba(9, 16, 25, 0.82); display: none; align-items: center; justify-content: center; z-index: 9500; padding: 24px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: min(92vw, 1000px); max-height: 86vh; border-radius: 12px; box-shadow: var(--shadow-xl); }
.lightbox-close { position: absolute; top: 20px; right: 24px; background: rgba(255, 255, 255, 0.14); border: none; color: white; width: 40px; height: 40px; border-radius: 999px; font-size: 1.1rem; cursor: pointer; }

/* ── Responsive ── */
@media (max-width: 1120px) {
  .hero-grid, .overview-grid, .results-grid, .resource-grid, .profile-grid,
  .architecture-grid, .paper-preview-shell, .chart-grid, .split-callout, .metric-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute; top: calc(100% + 8px); left: 16px; right: 16px; flex-direction: column; align-items: stretch;
    background: rgba(10, 22, 34, 0.98); border-radius: 16px; padding: 12px; gap: 4px; display: none;
    box-shadow: var(--shadow-xl);
  }
  .nav-links.open { display: flex; }
  .nav-links a { width: 100%; }
}
@media (max-width: 560px) {
  .section { padding: 56px 20px; }
  .profile-card { flex-direction: column; text-align: center; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
}
