/* =============================================================================
   THE BEACON — site.css
   Shared styles for the homepage shells (/index.html and /nl/index.html).
   Article pages use css/article.css instead.
   ============================================================================= */

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

:root {
  --navy:       #06182A;
  --navy-mid:   #0F1C2E;
  --navy-light: #172840;
  --teal:       #2DD4BF;
  --teal-dim:   #1FA8A8;
  --teal-faint: rgba(45,212,191,0.08);
  --off-white:  #F0EDE6;
  --muted:      #8FA8BC;
  --border:     rgba(45,212,191,0.15);
  --font-serif: 'Spectral', Georgia, serif;
  --font-sans:  'IBM Plex Sans', system-ui, sans-serif;
  --font-mono:  'IBM Plex Mono', monospace;
  --anim-scroll-pulse: 2s;
  --anim-transition-fast: 0.15s;
  --anim-transition-default: 0.2s;
}

[data-theme="light"] {
  --navy:       #F5F7FA;
  --navy-mid:   #FFFFFF;
  --navy-light: #EBF0F5;
  --teal:       #0F7B6C;
  --teal-dim:   #0D6B5E;
  --teal-faint: rgba(15,123,108,0.08);
  --off-white:  #1A2B3C;
  --muted:      #4A6580;
  --border:     rgba(15,123,108,0.15);
}

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  background: var(--navy);
  color: var(--off-white);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
  height: 64px;
  background: rgba(6,24,42,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 0.5px solid var(--border);
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
}
.nav-logo-text {
  font-family: var(--font-serif);
  font-size: 17px; font-weight: 600;
  color: var(--off-white);
  letter-spacing: 0.01em;
}
.nav-right {
  display: flex; align-items: center; gap: 2rem;
}
.nav-links {
  display: flex; align-items: center; gap: 2rem; list-style: none;
}
.nav-links a {
  font-size: 13px; font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--off-white); }

/* ── LANGUAGE TOGGLE ── */
.lang-toggle {
  display: flex; align-items: center;
  gap: 0;
  border: 0.5px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.lang-btn {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 400;
  letter-spacing: 0.08em;
  padding: 5px 10px;
  background: transparent;
  color: var(--muted);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.lang-btn:first-child {
  border-right: 0.5px solid var(--border);
}
.lang-btn.active {
  background: var(--teal-faint);
  color: var(--teal);
}
.lang-btn:hover:not(.active) {
  color: var(--off-white);
}

/* ── THEME TOGGLE ── */
.theme-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  background: transparent;
  border: 0.5px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.15s;
}
.theme-toggle:hover {
  border-color: rgba(45,212,191,0.4);
}
[data-theme="light"] .theme-toggle:hover {
  border-color: rgba(15,123,108,0.4);
}
.theme-toggle svg {
  width: 16px; height: 16px;
  color: var(--muted);
  transition: color 0.15s;
}
.theme-toggle:hover svg {
  color: var(--off-white);
}
.theme-icon-sun,
.theme-icon-moon { display: none; }
[data-theme="dark"] .theme-icon-sun,
:root:not([data-theme]) .theme-icon-sun { display: block; }
[data-theme="light"] .theme-icon-moon { display: block; }

/* Light mode nav background */
[data-theme="light"] nav {
  background: rgba(245,247,250,0.85);
}

/* Light mode lighthouse illustration */
.about-visual svg { --lh-body: #172840; --lh-accent: #2DD4BF; --lh-dark: #0F1C2E; --lh-glow: #F0EDE6; }
[data-theme="light"] .about-visual svg { --lh-body: #E8EFF5; --lh-accent: #0F7B6C; --lh-dark: #F5F7FA; --lh-glow: #1A2B3C; }

/* ── HERO ── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; flex-direction: column;
  justify-content: flex-end;
  padding: 0 clamp(1.5rem, 5vw, 4rem) clamp(4rem, 8vh, 7rem);
  overflow: hidden;
}
.hero-canvas {
  position: absolute; inset: 0;
  pointer-events: none;
}
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px; color: var(--teal);
  letter-spacing: 0.12em; text-transform: uppercase;
  margin-bottom: 1.25rem;
}
.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.6rem, 6vw, 5rem);
  font-weight: 600; line-height: 1.1;
  max-width: 820px;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}
.hero-title em { font-style: italic; color: var(--teal); }
.hero-sub {
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  color: var(--muted);
  max-width: 560px; line-height: 1.75;
  margin-bottom: 2.5rem;
}
.hero-actions { display: flex; align-items: center; gap: 1.25rem; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--teal); color: var(--navy);
  font-family: var(--font-sans); font-size: 14px; font-weight: 500;
  padding: 12px 24px; border-radius: 4px;
  text-decoration: none; border: none; cursor: pointer;
  transition: opacity 0.2s;
}
.btn-primary:hover { opacity: 0.88; }
.hero-scroll {
  position: absolute; bottom: 2rem; right: clamp(1.5rem, 5vw, 4rem);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.hero-scroll span {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--muted); letter-spacing: 0.1em;
  writing-mode: vertical-rl;
}
.hero-scroll-line {
  width: 1px; height: 48px;
  background: linear-gradient(to bottom, var(--teal-dim), transparent);
  animation: scrollpulse var(--anim-scroll-pulse) ease-in-out infinite;
}
@keyframes scrollpulse {
  0%, 100% { opacity: 0.4; }
  50%       { opacity: 1; }
}

/* ── SECTION SHELL ── */
.section { padding: clamp(4rem, 8vw, 7rem) clamp(1.5rem, 5vw, 4rem); }
.section-inner { max-width: 1160px; margin: 0 auto; }
.section-label {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--teal); letter-spacing: 0.12em; text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 600; letter-spacing: -0.02em; line-height: 1.2;
  margin-bottom: 1rem;
}
.section-sub {
  font-size: 1rem; color: var(--muted);
  max-width: 540px; margin-bottom: 2rem;
}

/* ── CATEGORIES ── */
.categories {
  background: var(--navy-mid);
  border-top: 0.5px solid var(--border);
  border-bottom: 0.5px solid var(--border);
}
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 0.5px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.category-card {
  display: block;
  background: var(--navy-mid);
  padding: 2rem 1.75rem;
  transition: background 0.2s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.category-card:hover { background: var(--navy-light); }
.category-card:focus-visible {
  outline: 1.5px solid var(--teal);
  outline-offset: -1.5px; /* grid has overflow:hidden; keep ring inside */
}
.category-count {
  display: block; margin-top: 1rem;
  font-family: var(--font-mono); font-size: 11px;
  color: var(--muted); letter-spacing: 0.06em;
  transition: color 0.2s;
}
.category-card:hover .category-count { color: var(--teal); }
.category-icon {
  width: 36px; height: 36px;
  margin-bottom: 1.25rem;
  color: var(--teal);
}
.category-card h3 {
  font-family: var(--font-serif);
  font-size: 1.05rem; font-weight: 600;
  margin-bottom: 0.5rem; color: var(--off-white);
}
.category-card p {
  font-size: 13.5px; color: var(--muted); line-height: 1.65;
}

/* ── FILTER BAR ── */
.filter-bar {
  display: flex; align-items: center;
  gap: 8px; flex-wrap: wrap;
  margin-bottom: 2.5rem;
}
.filter-btn {
  font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.06em;
  padding: 6px 16px; border-radius: 100px;
  border: 0.5px solid var(--border);
  background: transparent; color: var(--muted);
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
  white-space: nowrap;
}
.filter-btn:hover { border-color: rgba(45,212,191,0.4); color: var(--off-white); }
.filter-btn.active { background: var(--teal); border-color: var(--teal); color: var(--navy); }
.filter-count {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--muted); margin-left: auto; white-space: nowrap;
}

/* ── ARTICLES GRID ── */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}
.article-card {
  background: var(--navy-mid);
  border: 0.5px solid var(--border);
  border-radius: 8px; padding: 1.75rem;
  text-decoration: none; color: inherit;
  display: flex; flex-direction: column;
  transition: border-color 0.2s, background 0.2s;
}
.article-card:hover { border-color: var(--teal-dim); background: var(--navy-light); }
.article-card.hidden { display: none; }
.article-meta {
  display: flex; align-items: center; gap: 0.75rem;
  margin-bottom: 1rem; flex-wrap: wrap;
}
.article-tag {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--teal); background: var(--teal-faint);
  border: 0.5px solid rgba(45,212,191,0.2);
  padding: 3px 8px; border-radius: 3px; letter-spacing: 0.06em;
}
.article-date { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.article-reading-time { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.article-card h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem; font-weight: 600;
  line-height: 1.35; margin-bottom: 0.75rem; color: var(--off-white);
}
.article-card p {
  font-size: 13.5px; color: var(--muted);
  line-height: 1.65; flex: 1; margin-bottom: 1.5rem;
}
.article-read {
  font-size: 12px; font-weight: 500; color: var(--teal);
  display: flex; align-items: center; gap: 5px;
  transition: gap 0.2s;
}
.article-card:hover .article-read { gap: 8px; }

/* ── FEATURED CARD ──
   The featured card renders full-width inside #articles, between the
   section heading and the filter bar — it is not part of the articles
   grid, so no grid-column placement is needed. site.js hides the
   container when no published article has featured: true. */
.featured-container { margin-bottom: 2.5rem; } /* matches .filter-bar spacing */
.article-card.featured {
  flex-direction: row; gap: 2rem; align-items: flex-start;
}
.featured-badge {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--navy); background: var(--teal);
  padding: 3px 10px; border-radius: 3px;
  letter-spacing: 0.12em; text-transform: uppercase;
  margin-bottom: 1rem; display: inline-block;
}
.featured-body { flex: 1; }
.featured-aside {
  flex: 0 0 220px;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.featured-aside p {
  font-size: 12px; color: var(--muted);
  font-family: var(--font-mono); line-height: 1.6;
}

/* Dutch language indicator on article cards */
.lang-indicator {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--muted);
  border: 0.5px solid var(--border);
  padding: 2px 6px; border-radius: 3px;
  letter-spacing: 0.06em;
  margin-left: auto;
}

/* Empty state */
.articles-empty {
  display: none; grid-column: 1 / -1;
  text-align: center; padding: 4rem 2rem;
  color: var(--muted); font-family: var(--font-mono); font-size: 13px;
}
.articles-empty.visible { display: block; }

/* ── ABOUT ── */
.about { background: var(--navy-mid); border-top: 0.5px solid var(--border); }
.about-inner {
  max-width: 1160px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 4rem; align-items: center;
}
.about-text h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 600; letter-spacing: -0.02em; line-height: 1.2;
  margin-bottom: 1.25rem;
}
.about-text p {
  color: var(--muted); font-size: 15px; line-height: 1.8; margin-bottom: 1rem;
}
.about-text p:last-of-type { margin-bottom: 2rem; }
.cert-list {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  list-style: none; margin-bottom: 0;
}
.cert-list li {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--teal); background: var(--teal-faint);
  border: 0.5px solid rgba(45,212,191,0.2);
  padding: 4px 10px; border-radius: 3px; letter-spacing: 0.06em;
}
.about-visual {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  min-height: 320px;
}

/* ── FOOTER ── */
footer {
  border-top: 0.5px solid var(--border);
  padding: 2.5rem clamp(1.5rem, 5vw, 4rem);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
}
.footer-brand {
  display: flex; align-items: center; gap: 8px; text-decoration: none;
}
.footer-brand span { font-family: var(--font-serif); font-size: 15px; color: var(--muted); }
.footer-brand strong { color: var(--off-white); font-weight: 600; }
.footer-right {
  font-family: var(--font-mono); font-size: 11px; color: var(--muted);
  display: flex; align-items: center; gap: 1.5rem;
}
.footer-right a { color: var(--muted); text-decoration: none; transition: color 0.2s; }
.footer-right a:hover { color: var(--teal); }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .article-card.featured { flex-direction: column; }
  .featured-aside { flex: unset; }
  .about-inner { grid-template-columns: 1fr; gap: 2rem; }
  .about-visual { min-height: 200px; }
  .filter-count { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-scroll-line { animation: none; }
  .article-card { transition: border-color 0.2s, background 0.2s; }
}
