@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@600;700;800;900&family=Barlow:ital,wght@0,400;0,500;0,600;0,700;1,400;1,600&family=Spectral:ital,wght@0,400;0,600;1,400;1,600&display=swap');

/* ─── Design tokens ─────────────────────────────────────────── */
:root {
  /* Backgrounds: warm off-white — comfortable for long-form reading */
  --bg:            oklch(97%  0.008 85);
  --surface:       oklch(99%  0.003 85);
  --surface-2:     oklch(93%  0.014 85);

  /* Borders */
  --border:        oklch(88%  0.012 85);
  --border-hi:     oklch(76%  0.014 85);

  /* Amber accent — darkened for WCAG contrast on light backgrounds */
  --accent:        oklch(47%  0.18  65);
  --accent-lo:     oklch(47%  0.18  65 / 0.10);
  --accent-line:   oklch(47%  0.18  65 / 0.28);

  /* Text scale */
  --text:          oklch(16%  0.008 75);
  --text-body:     oklch(28%  0.008 75);
  --text-muted:    oklch(46%  0.008 75);
  --text-dim:      oklch(66%  0.008 75);

  /* Dark surface tokens — used by hero, footer, about hero */
  --dark-bg:       oklch(14%  0.008 75);
  --dark-surface:  oklch(19%  0.008 75);
  --dark-border:   oklch(28%  0.008 75);
  --dark-text:     oklch(95%  0.004 75);
  --dark-muted:    oklch(62%  0.005 75);
  --dark-accent:   oklch(78%  0.15  80);

  --max-w:  1120px;
}

/* ─── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { scroll-behavior: smooth; }
img   { display: block; max-width: 100%; }
a     { color: inherit; text-decoration: none; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Barlow', sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ─── Layout ─────────────────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
}

/* ─── Reading Progress ──────────────────────────────────────── */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--accent);
  z-index: 200;
  transition: width 0.1s linear;
}

/* ─── Header ─────────────────────────────────────────────────── */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: oklch(97% 0.008 85 / 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.logo {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: 22px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  transition: color 0.2s;
}
.logo em {
  font-style: normal;
  color: var(--accent);
}
.logo:hover { color: var(--accent); }

nav { display: flex; align-items: center; gap: 4px; }

nav a {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 6px 14px;
  transition: color 0.2s, background 0.2s;
}
nav a:hover, nav a.active {
  color: var(--text);
  background: var(--surface-2);
}

/* Mobile nav toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-muted);
  transition: 0.25s;
}

/* ─── Hero ───────────────────────────────────────────────────── */
.hero {
  padding: 96px 0 80px;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.hero-eyebrow {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 28px;
  opacity: 0;
  animation: fadeUp 0.5s 0.05s ease-out forwards;
}

.hero-headline {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: clamp(68px, 12vw, 148px);
  line-height: 0.92;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 40px;
  opacity: 0;
  animation: fadeUp 0.55s 0.12s ease-out forwards;
}
.hero-headline em {
  font-style: normal;
  color: var(--accent);
}

.hero-foot {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 48px;
  max-width: 900px;
  opacity: 0;
  animation: fadeUp 0.55s 0.22s ease-out forwards;
}

.hero-sub {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 52ch;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
  align-items: center;
}

/* ─── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 11px 22px;
  cursor: pointer;
  border: none;
  transition: all 0.18s ease-out;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: oklch(97% 0.004 85);
}
.btn-primary:hover {
  background: oklch(42% 0.18 65);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-hi);
}
.btn-ghost:hover {
  color: var(--text);
  border-color: var(--text-dim);
}

/* ─── Section label ──────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 14px;
  margin-bottom: 0;
  border-bottom: 1px solid var(--border);
}
.section-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.section-link {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  transition: opacity 0.2s;
}
.section-link:hover { opacity: 0.7; }

/* ─── Tag label ──────────────────────────────────────────────── */
.card-tag {
  display: inline-block;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-lo);
  padding: 2px 8px;
  width: fit-content;
}

/* ─── Articles section ───────────────────────────────────────── */
.articles-section { padding: 72px 0; }

/* Lead article: full-width editorial feature */
.article-lead {
  border-bottom: 1px solid var(--border);
  padding: 40px 0 40px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 56px;
  align-items: start;
  opacity: 0;
  animation: fadeUp 0.5s 0.08s ease-out forwards;
}

.article-lead-main { display: flex; flex-direction: column; gap: 16px; }

.lead-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: clamp(28px, 3.5vw, 42px);
  line-height: 1.05;
  letter-spacing: 0.01em;
  color: var(--text);
  transition: color 0.2s;
}
.article-lead:hover .lead-title { color: var(--accent); }

.lead-excerpt {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 58ch;
}

.article-lead-side {
  padding-top: 4px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  gap: 24px;
}

/* Article list: secondary stories beneath the lead */
.article-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: none;
}
.article-list-item {
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
  opacity: 0;
  animation: fadeUp 0.5s ease-out forwards;
}
.article-list-item:nth-child(odd)  { padding-right: 32px; border-right: 1px solid var(--border); }
.article-list-item:nth-child(even) { padding-left: 32px; }
.article-list-item:nth-child(1) { animation-delay: 0.14s; }
.article-list-item:nth-child(2) { animation-delay: 0.20s; }
.article-list-item:nth-child(3) { animation-delay: 0.26s; }
.article-list-item:nth-child(4) { animation-delay: 0.32s; }

.article-list-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: 0.01em;
  color: var(--text);
  transition: color 0.2s;
}
.article-list-item:hover .article-list-title { color: var(--accent); }

.article-list-excerpt {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Meta line shared by lead and list */
.card-meta {
  display: flex;
  align-items: center;
  gap: 0;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.card-meta span + span::before {
  content: '·';
  margin: 0 10px;
}

/* ─── Topics ─────────────────────────────────────────────────── */
.topics-section { padding: 0 0 72px; }
.topics-grid { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 28px; }

.topic-pill {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 7px 18px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: transparent;
  transition: color 0.18s, border-color 0.18s, background 0.18s;
  cursor: pointer;
}
.topic-pill:hover {
  color: var(--text);
  border-color: var(--border-hi);
  background: var(--surface);
}

/* ─── About strip ─────────────────────────────────────────────── */
.about-section {
  padding: 80px 0;
  border-top: 1px solid var(--border);
}
.about-inner {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 72px;
  align-items: start;
}
.about-label {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: 56px;
  line-height: 0.9;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text);
}
.about-label em {
  font-style: normal;
  color: var(--accent);
  display: block;
}
.about-body p {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 18px;
  max-width: 60ch;
}
.about-body p:last-child { margin-bottom: 0; }

.about-details {
  margin-top: 28px;
  border-top: 1px solid var(--border);
}
.about-detail {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}
.about-detail-label {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.about-detail-value {
  font-size: 15px;
  color: var(--text-muted);
}
.about-detail-value a {
  color: var(--accent);
  transition: opacity 0.18s;
}
.about-detail-value a:hover { opacity: 0.75; }

/* ─── Footer ─────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 36px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-logo {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.footer-logo em { font-style: normal; color: var(--accent); opacity: 0.45; }

.footer-copy {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* ─── Article page ─────────────────────────────────────────────── */
.article-hero {
  padding: 72px 0 56px;
  border-bottom: 1px solid var(--border);
}
.article-hero .card-tag { margin-bottom: 22px; }

.article-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: clamp(36px, 5.5vw, 64px);
  line-height: 0.97;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  max-width: 820px;
  margin-bottom: 24px;
}

.article-meta {
  display: flex;
  align-items: center;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.article-meta .divider { margin: 0 12px; color: var(--text-dim); }

/* Article body: reading-optimized with Spectral serif */
.article-body {
  max-width: 68ch;
  padding: 64px 0 96px;
  font-family: 'Spectral', Georgia, serif;
  font-kerning: normal;
}

/* Lead paragraph — larger, sets the scene */
.article-body > p:first-child {
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--text-body);
  line-height: 1.75;
  margin-bottom: 1.75rem;
}

.article-body p {
  font-size: 1.075rem;
  line-height: 1.88;
  color: var(--text-body);
  margin-bottom: 1.5rem;
}

/* Section headings: Barlow Condensed contrasts with Spectral body */
.article-body h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text);
  margin: 3.5rem 0 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}

.article-body h3 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: clamp(1.2rem, 2.5vw, 1.375rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
  margin: 2.5rem 0 0.75rem;
}

.article-body strong {
  font-weight: 600;
  color: var(--text);
}

.article-body a {
  color: var(--accent);
  border-bottom: 1px solid var(--accent-line);
  transition: border-color 0.18s;
}
.article-body a:hover { border-color: var(--accent); }

.article-body ul,
.article-body ol {
  margin: 0 0 1.5rem 0;
  padding-left: 0;
  list-style: none;
  color: var(--text-body);
  font-size: 1.075rem;
  line-height: 1.8;
}
.article-body ul li,
.article-body ol li {
  padding-left: 1.5rem;
  position: relative;
  margin-bottom: 0.6rem;
}
.article-body ul li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--text-dim);
  font-family: 'Barlow Condensed', sans-serif;
}
.article-body ol { counter-reset: ol-counter; }
.article-body ol li { counter-increment: ol-counter; }
.article-body ol li::before {
  content: counter(ol-counter, decimal-leading-zero);
  position: absolute;
  left: 0;
  color: var(--accent);
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  top: 4px;
}

/* Blockquote: Spectral italic shines here — top/bottom rules, no side stripe */
.article-body blockquote {
  margin: 2.5rem 0;
  padding: 1.75rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.article-body blockquote p {
  font-family: 'Spectral', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 400;
  font-style: italic;
  color: var(--text);
  line-height: 1.6;
  margin: 0;
}

/* Stat callout: full border box, no side stripe */
.stat-callout {
  margin: 2.5rem 0;
  padding: 2rem;
  background: var(--accent-lo);
  border: 1px solid var(--accent-line);
}
.stat-callout .stat-number {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: clamp(3rem, 8vw, 4.5rem);
  color: var(--accent);
  line-height: 1;
  letter-spacing: 0.01em;
  margin-bottom: 0.5rem;
  font-variant-numeric: tabular-nums;
}
.stat-callout .stat-label {
  font-family: 'Spectral', Georgia, serif;
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 52ch;
}

/* Data tables */
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-family: 'Barlow Condensed', sans-serif;
  font-variant-numeric: tabular-nums;
}
.article-body thead th {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-align: left;
  padding: 0.6rem 1rem;
  border-bottom: 2px solid var(--border);
}
.article-body td {
  font-size: 0.95rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-body);
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
}
.article-body tbody tr:hover td { background: var(--surface-2); }
.article-body th:not(:first-child),
.article-body td:not(:first-child) { text-align: right; }
.article-body tr.highlight td {
  color: var(--accent);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.03em;
}
.table-caption {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
}

/* Back link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 40px;
  transition: color 0.18s;
}
.back-link::before { content: '←'; font-size: 14px; }
.back-link:hover { color: var(--accent); }

/* ─── Dark sections (hero, footer, about hero) ───────────────── */
.hero {
  background: var(--dark-bg);
  border-bottom-color: var(--dark-border);
}
.hero .hero-eyebrow { color: var(--dark-accent); }
.hero .hero-headline { color: var(--dark-text); }
.hero .hero-headline em { color: var(--dark-accent); }
.hero .hero-sub { color: var(--dark-muted); }
.hero .btn-primary { background: var(--dark-accent); color: var(--dark-bg); }
.hero .btn-primary:hover { background: oklch(83% 0.14 80); }
.hero .btn-ghost { color: var(--dark-muted); border-color: var(--dark-border); }
.hero .btn-ghost:hover { color: var(--dark-text); border-color: oklch(50% 0.006 75); }

footer {
  background: var(--dark-bg);
  border-top-color: var(--dark-border);
}
.footer-logo { color: oklch(40% 0.006 75); }
.footer-logo em { color: var(--dark-accent); opacity: 0.5; }
.footer-copy { color: oklch(40% 0.006 75); }

/* About page hero inherits .hero dark treatment via the class */
.about-page-hero {
  background: var(--dark-bg);
  border-bottom-color: var(--dark-border);
}
.about-page-hero .eyebrow { color: var(--dark-accent); }
.about-name { color: var(--dark-text); }
.about-name em { color: var(--dark-accent); }
.about-tagline { color: var(--dark-muted); }

/* ─── Animations ─────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 860px) {
  .article-lead { grid-template-columns: 1fr; gap: 20px; }
  .article-lead-side { flex-direction: row; align-items: center; }
  .about-inner { grid-template-columns: 1fr; gap: 36px; }
  .hero-foot { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 640px) {
  .hero { padding: 64px 0 56px; }
  .hero-headline { font-size: clamp(60px, 14vw, 96px); }
  .hero-actions { flex-direction: column; align-items: flex-start; }

  nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 60px; left: 0; right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 12px 16px;
    gap: 2px;
  }
  nav.open { display: flex; }
  nav a { padding: 10px 14px; width: 100%; }
  .menu-toggle { display: flex; }

  .article-list { grid-template-columns: 1fr; }
  .article-list-item:nth-child(odd)  { padding-right: 0; border-right: none; }
  .article-list-item:nth-child(even) { padding-left: 0; }

  .footer-inner { flex-direction: column; align-items: flex-start; }
  .article-body { max-width: 100%; }
}
