/* ── Variables ─────────────────────────────────────────────────── */
:root {
  --orange: #E87722;
  --orange-hover: #D06820;
  --orange-deep: #B85A1A;
  --navy: #0A2540;
  --navy-mid: #163456;
  --navy-light: #1E4D7B;
  --light-accent: #FFF4EC;
  --bg: #FAFBFC;
  --surface: #F4F6F8;
  --white: #FFFFFF;
  --heading: #0A2540;
  --body: #3D4F5F;
  --muted: #6B7F8E;
  --border: #E2E8EE;
  --shadow-sm: 0 2px 8px rgba(10,37,64,.05);
  --shadow-md: 0 6px 20px rgba(232,119,34,.10);
  --shadow-lg: 0 18px 40px rgba(232,119,34,.18);
  --max: 1240px;
  --gutter: 40px;
  --purple: #7C3AED;
  --purple-light: #EDE9FE;
}

/* ── Reset ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Public Sans', system-ui, -apple-system, sans-serif;
  color: var(--body);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
h1, h2, h3, h4 { color: var(--heading); margin: 0; font-weight: 800; text-wrap: balance; }
p { margin: 0; }
a { color: var(--orange); text-decoration: none; }
img { display: block; max-width: 100%; }
::selection { background: var(--orange); color: var(--white); }

/* ── Layout ────────────────────────────────────────────────────── */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ── Typography helpers ────────────────────────────────────────── */
.serif {
  font-style: italic;
  font-weight: 300;
  color: var(--orange);
  -webkit-text-fill-color: var(--orange);
}
.accent {
  font-style: italic;
  font-weight: 600;
  color: var(--orange);
  -webkit-text-fill-color: var(--orange);
}

/* ── Folio badge ───────────────────────────────────────────────── */
.folio {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding: 6px 14px 6px 12px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.folio__slash {
  font-size: 13px;
  font-weight: 700;
  color: var(--orange);
  line-height: 1;
}
.folio__label {
  font-size: 11px;
  font-weight: 600;
  color: var(--body);
  letter-spacing: .14em;
  text-transform: uppercase;
  line-height: 1;
}

/* ── Buttons ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: inherit;
  font-weight: 700;
  font-size: 16px;
  line-height: 1;
  padding: 16px 24px;
  border-radius: 8px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all .25s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn--primary {
  background: var(--orange);
  color: var(--white);
  border: none;
  box-shadow: 0 4px 16px rgba(232,119,34,.25);
}
.btn--primary:hover {
  background: var(--orange-hover);
  box-shadow: 0 6px 20px rgba(232,119,34,.35);
  text-decoration: none;
}
.btn--ghost {
  background: transparent;
  color: var(--orange);
  border-color: rgba(232,119,34,.35);
}
.btn--ghost:hover {
  border-color: var(--orange);
  background: rgba(232,119,34,.07);
}
.btn--dark {
  background: var(--navy);
  color: var(--white);
  border: none;
  box-shadow: 0 4px 16px rgba(10,37,64,.2);
}
.btn--dark:hover {
  background: var(--navy-mid);
  box-shadow: 0 6px 20px rgba(10,37,64,.3);
}
.btn--partner {
  background: transparent;
  color: var(--purple);
  border-color: rgba(124,58,237,.35);
  margin-top: 16px;
  font-size: 14px;
  padding: 12px 20px;
}
.btn--partner:hover {
  border-color: var(--purple);
  background: rgba(124,58,237,.07);
}
.btn--lg { padding: 20px 28px; font-size: 17px; }
.btn--xl { padding: 24px 36px; font-size: 18px; border-radius: 10px; }
.btn--arrow::after {
  content: "\2192";
  font-weight: 400;
  font-size: 18px;
  transition: transform .25s ease;
}
.btn--arrow:hover::after { transform: translateX(4px); }

/* ── Nav ───────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250,251,252,.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: transform .3s ease;
}
.nav--hidden { transform: translateY(-100%); }
.nav__inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.wordmark { text-decoration: none; display: inline-flex; align-items: center; }
.wordmark svg { height: 28px; width: auto; }
.nav__links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav__link {
  font-size: 14px;
  font-weight: 600;
  color: var(--body);
  text-decoration: none;
  transition: color .2s;
}
.nav__link:hover { color: var(--orange); }
.nav__link--active { color: var(--orange); }

/* ── Article hero ──────────────────────────────────────────────── */
.article-hero {
  height: calc(100dvh - 72px);
  display: flex;
  align-items: center;
  padding: 32px 0;
  overflow: hidden;
}
.article-hero__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  width: 100%;
}
.article-hero h1 {
  font-size: clamp(30px, 3.2vw, 54px);
  line-height: 1.06;
  letter-spacing: -.03em;
  margin-bottom: 0;
}
.article-hero__abstract {
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.65;
  color: var(--body);
  margin: 28px 0 32px;
  max-width: 48ch;
}
.article-hero__meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0;
}
.article-hero__meta::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B7F8E' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpolyline points='12 6 12 12 16 14'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  opacity: .7;
}
.article-hero__img {
  width: 100%;
  height: clamp(300px, 45vh, 480px);
  border-radius: 18px;
  object-fit: cover;
  display: block;
}
@media (max-width: 900px) {
  .article-hero {
    height: auto;
    padding: 80px 0 40px;
  }
  .article-hero__inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .article-hero__img { order: -1; height: clamp(200px, 40vw, 360px); }
}
@media (max-width: 640px) {
  .article-hero { padding: 60px 0 32px; }
}

/* ── Article layout (body + TOC sidebar) ───────────────────────── */
.article-layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 720px) 200px;
  gap: 64px;
  align-items: start;
}
.article-content { min-width: 0; }

.article-toc {
  position: sticky;
  top: 96px;
  padding-top: 40px;
  border-left: 2px solid var(--border);
  padding-left: 20px;
}
.article-toc__title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--body);
  margin-bottom: 16px;
}
.article-toc a {
  display: block;
  font-size: 13px;
  font-weight: 400;
  color: var(--body);
  text-decoration: none;
  padding: 5px 0;
  line-height: 1.4;
  transition: color .2s;
  opacity: .65;
}
.article-toc a:hover { opacity: 1; color: var(--orange); }
.article-toc a.is-active { opacity: 1; color: var(--orange); font-weight: 600; }

@media (max-width: 860px) {
  .article-layout {
    grid-template-columns: 1fr;
    max-width: 760px;
  }
  .article-toc { display: none; }
}

/* ── Reveal animation ──────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive base ───────────────────────────────────────────── */
@media (max-width: 640px) {
  :root { --gutter: 20px; }
  .nav__links { display: none; }
}
