/* ─── Custom properties ─────────────────────────────────────────────────────── */

:root {
  /* Light theme */
  --bg:           #f5f4f1;
  --bg-elevated:  #ffffff;
  --bg-subtle:    #eeedea;
  --text:         #1a1917;
  --text-muted:   #6b6968;
  --text-faint:   #9b9997;
  --accent:       #e5554e;
  --accent-hover: #cc3e37;
  --grey:         #787878;
  --border:       #e0deda;
  --shadow-sm:    0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:    0 4px 16px rgba(0,0,0,.07), 0 1px 4px rgba(0,0,0,.04);
  --shadow-lg:    0 12px 40px rgba(0,0,0,.09), 0 4px 12px rgba(0,0,0,.04);

  /* Typography */
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;

  /* Spacing */
  --sp-1:  0.25rem;
  --sp-2:  0.5rem;
  --sp-3:  0.75rem;
  --sp-4:  1rem;
  --sp-5:  1.25rem;
  --sp-6:  1.5rem;
  --sp-8:  2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-20: 5rem;
  --sp-24: 6rem;

  /* Layout */
  --container: 1280px;
  --content:   720px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;

  /* Transition */
  --t: 0.22s ease;
}

[data-theme="dark"] {
  --bg:           #1a1a1a;
  --bg-elevated:  #242424;
  --bg-subtle:    #1f1f1f;
  --text:         #e8e6e3;
  --text-muted:   #9a9896;
  --text-faint:   #6b6967;
  --border:       #333330;
  --shadow-sm:    0 1px 3px rgba(0,0,0,.25);
  --shadow-md:    0 4px 16px rgba(0,0,0,.3);
  --shadow-lg:    0 12px 40px rgba(0,0,0,.35);
}

/* ─── Reset ─────────────────────────────────────────────────────────────────── */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  transition: background var(--t), color var(--t);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; font: inherit; border: none; background: none; }

/* ─── Container ─────────────────────────────────────────────────────────────── */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--sp-6);
}

@media (max-width: 640px) {
  .container { padding-inline: var(--sp-4); }
}

/* ─── Logo ───────────────────────────────────────────────────────────────────── */

.logo {
  display: inline-flex;
  align-items: baseline;
  font-family: var(--font-body);
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  text-decoration: none;
  flex-shrink: 0;
}

.logo--small { font-size: 1.25rem; }

.logo-grey { color: var(--grey); }
.logo-red  { color: var(--accent); }

/* h with the dot of .wf sitting inside its arch */
.logo-h-zone {
  display: inline-flex;
  align-items: baseline;
}

.logo-h-wrap {
  position: relative;
  display: inline-block;
}

.logo-h {
  color: var(--grey);
  display: inline-block;
}

/* The red dot — sits inside the arch (short right leg) of the 'h' */
.logo-dot {
  position: absolute;
  color: var(--accent);
  font-size: 0.42em;
  font-weight: 700;
  /* Push into the arch interior: right half, just below the top of the hump */
  right: 0.32em;
  top:   0.3em;
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

/* ─── Header ─────────────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background var(--t), border-color var(--t);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
  height: 4rem;
}

/* Nav */
.site-nav { flex: 1; }

.nav-list {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  flex-wrap: wrap;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-sm);
  transition: color var(--t), background var(--t);
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--text);
  background: var(--bg-subtle);
}

.nav-link.is-active { color: var(--accent); }

/* Controls */
.header-controls {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-left: auto;
}

.lang-switch {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: var(--sp-1) var(--sp-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: color var(--t), border-color var(--t), background var(--t);
}

.lang-switch:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}

/* Theme toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  color: var(--text-muted);
  transition: color var(--t), background var(--t);
}

.theme-toggle:hover {
  color: var(--text);
  background: var(--bg-subtle);
}

.icon {
  width: 1.1rem;
  height: 1.1rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* Show/hide sun & moon based on theme */
[data-theme="light"] .icon-moon { display: none; }
[data-theme="dark"]  .icon-sun  { display: none; }
[data-theme="dark"]  .icon-moon { display: block; }

/* Burger menu */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
}

.burger-bar {
  display: block;
  width: 1.2rem;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--t), opacity var(--t);
}

.menu-toggle[aria-expanded="true"] .burger-bar:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.menu-toggle[aria-expanded="true"] .burger-bar:nth-child(2) {
  opacity: 0;
}
.menu-toggle[aria-expanded="true"] .burger-bar:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* ─── Hero ───────────────────────────────────────────────────────────────────── */

.hero {
  padding: var(--sp-24) 0 var(--sp-20);
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 80% 20%, color-mix(in srgb, var(--accent) 5%, transparent), transparent),
    radial-gradient(ellipse 40% 60% at 10% 80%, color-mix(in srgb, var(--grey) 4%, transparent), transparent);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  max-width: 860px;
}

.hero-heading {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 4.5rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: var(--sp-6);
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-muted);
  max-width: 620px;
  line-height: 1.7;
  margin-bottom: var(--sp-10);
}

/* ─── Buttons ────────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: background var(--t), color var(--t), border-color var(--t), transform var(--t), box-shadow var(--t);
  white-space: nowrap;
  text-decoration: none;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 16px color-mix(in srgb, var(--accent) 35%, transparent);
}

.btn-outline {
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  background: transparent;
}

.btn-outline:hover {
  border-color: var(--text-muted);
  color: var(--text);
  background: var(--bg-subtle);
}

/* ─── Intro strip ────────────────────────────────────────────────────────────── */

.intro-strip {
  padding: var(--sp-16) 0;
  border-bottom: 1px solid var(--border);
}

.section-heading {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--sp-4);
  letter-spacing: -0.01em;
}

.section-lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 640px;
  line-height: 1.7;
}

/* ─── Post cards ─────────────────────────────────────────────────────────────── */

.posts-section {
  padding: var(--sp-16) 0 var(--sp-20);
}

.posts-grid {
  display: grid;
  gap: var(--sp-6);
  margin-bottom: var(--sp-6);
}

/* Twee kaarten bovenaan — gelijkwaardig, iets prominenter */
.posts-grid--two {
  grid-template-columns: repeat(2, 1fr);
  margin-bottom: var(--sp-6);
}

/* Drie kaarten onderaan */
.posts-grid--three {
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: var(--sp-10);
}

/* Volledig grid op blogoverzicht */
.posts-grid--full {
  grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr));
  margin-bottom: var(--sp-12);
}

.post-card {
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--t), transform var(--t);
}

.post-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* Bovenste twee kaarten: iets prominenter */
.post-card--top .post-card-image {
  aspect-ratio: 16/9;
}

.post-card--top .post-card-title {
  font-size: clamp(1.2rem, 1.8vw, 1.55rem);
}

.post-card-image {
  overflow: hidden;
  aspect-ratio: 16/9;
}

.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.post-card:hover .post-card-image img {
  transform: scale(1.03);
}

.post-card-body {
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-date {
  font-size: 0.78rem;
  color: var(--text-faint);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: var(--sp-3);
  display: block;
}

.post-date--large {
  font-size: 0.82rem;
  margin-bottom: var(--sp-4);
}

.post-card-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: var(--sp-3);
  letter-spacing: -0.01em;
}

.post-card--featured .post-card-title {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
}

.post-card-title a {
  color: var(--text);
  transition: color var(--t);
}

.post-card-title a:hover { color: var(--accent); }

.post-card-excerpt {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: var(--sp-5);
  flex: 1;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  transition: gap var(--t), color var(--t);
  align-self: flex-start;
  margin-top: auto;
}

.read-more svg {
  width: 0.9rem;
  height: 0.9rem;
  flex-shrink: 0;
  transition: transform var(--t);
}

.read-more:hover { gap: var(--sp-3); }
.read-more:hover svg { transform: translateX(3px); }

.posts-more {
  text-align: center;
}

/* ─── Haiku slider ───────────────────────────────────────────────────────────── */

.haiku-section {
  padding: var(--sp-16) 0 var(--sp-20);
  background: var(--bg-subtle);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.haiku-slider {
  display: grid;
  grid-template-columns: 3rem 1fr 3rem;
  align-items: center;
  gap: var(--sp-4);
  max-width: 680px;
  margin-inline: auto;
}

.haiku-track {
  text-align: center;
  min-height: 8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.haiku-slide {
  display: none;
  opacity: 0;
  transition: opacity 0.55s ease;
  width: 100%;
}

.haiku-slide.is-active {
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 1;
}

.haiku-slide.is-exiting {
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
}

.haiku-poem {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
}

.haiku-line {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-style: italic;
  line-height: 1.5;
  color: var(--text);
  letter-spacing: 0.01em;
}

.haiku-count {
  font-size: 0.75rem;
  color: var(--text-faint);
  font-weight: 500;
  letter-spacing: 0.08em;
}

.haiku-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  color: var(--text-muted);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  transition: color var(--t), border-color var(--t), background var(--t), box-shadow var(--t);
  flex-shrink: 0;
}

.haiku-arrow:hover {
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--accent) 20%, transparent);
}

.haiku-arrow svg {
  width: 1rem;
  height: 1rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.haiku-dots {
  display: flex;
  justify-content: center;
  gap: var(--sp-2);
  margin-top: var(--sp-6);
}

.haiku-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border);
  transition: background var(--t), transform var(--t);
}

.haiku-dot.is-active {
  background: var(--accent);
  transform: scale(1.4);
}

/* ─── Page hero ──────────────────────────────────────────────────────────────── */

.page-hero {
  padding: var(--sp-16) 0 var(--sp-12);
  border-bottom: 1px solid var(--border);
}

.page-hero--slim {
  padding: var(--sp-12) 0 var(--sp-8);
}

.page-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: var(--sp-4);
}

.page-intro {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 640px;
  line-height: 1.7;
}

.page-body {
  padding: var(--sp-12) 0 var(--sp-20);
}

/* ─── Prose ──────────────────────────────────────────────────────────────────── */

.prose {
  max-width: var(--content);
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text);
}

.prose h2 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-top: var(--sp-12);
  margin-bottom: var(--sp-4);
  line-height: 1.2;
}

.prose h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text);
  margin-top: var(--sp-8);
  margin-bottom: var(--sp-3);
}

.prose p {
  margin-bottom: var(--sp-5);
}

.prose em {
  font-style: italic;
  color: var(--text-muted);
}

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

.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.prose a:hover { color: var(--accent-hover); }

.prose ul,
.prose ol {
  padding-left: 1.4rem;
  margin-bottom: var(--sp-5);
}

.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }

.prose li {
  margin-bottom: var(--sp-2);
  line-height: 1.65;
}

.prose li p { margin-bottom: var(--sp-2); }

.prose blockquote {
  border-left: 3px solid var(--accent);
  margin: var(--sp-8) 0;
  padding: var(--sp-4) var(--sp-6);
  background: color-mix(in srgb, var(--accent) 4%, transparent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.prose blockquote p {
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 0;
}

.prose hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: var(--sp-12) 0;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--sp-8);
  font-size: 0.93rem;
}

.prose th,
.prose td {
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.prose th {
  background: var(--bg-subtle);
  font-weight: 600;
  color: var(--text);
}

.prose td { color: var(--text-muted); }

/* Inline floating images (from original Hugo content) */
.prose img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
}

.prose img[style*="float:right"],
.prose img[style*="float: right"] {
  margin-left: var(--sp-6);
  margin-bottom: var(--sp-4);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.prose img[style*="float:left"],
.prose img[style*="float: left"] {
  margin-right: var(--sp-6);
  margin-bottom: var(--sp-4);
}

.prose figure {
  margin: var(--sp-8) 0;
}

.prose figcaption {
  font-size: 0.83rem;
  color: var(--text-faint);
  font-style: italic;
  margin-top: var(--sp-2);
  text-align: center;
}

/* FAQ / details sections in the Fourth Way page */
.prose h3 + p { margin-top: 0; }

.contact-email a {
  font-size: 1.2rem;
  color: var(--accent);
  font-weight: 500;
}

/* ─── Contact form ────────────────────────────────────────────────────────────── */

.contact-form {
  max-width: 600px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  margin-bottom: var(--sp-6);
}

.form-field label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color var(--t), box-shadow var(--t);
  appearance: none;
  -webkit-appearance: none;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent);
}

.form-field textarea {
  resize: vertical;
  min-height: 140px;
  line-height: 1.6;
}

.form-actions {
  margin-top: var(--sp-2);
}

.form-feedback {
  margin-top: var(--sp-6);
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--radius);
  font-size: 0.95rem;
}

.form-feedback--success {
  background: color-mix(in srgb, #6aa679 15%, transparent);
  color: #2b5c36;
  border: 1px solid color-mix(in srgb, #6aa679 30%, transparent);
}

[data-theme="dark"] .form-feedback--success {
  color: #a8d4b2;
}

.form-feedback--error {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
}

/* ─── Article ────────────────────────────────────────────────────────────────── */

.article-header {
  padding: var(--sp-12) 0 var(--sp-8);
  border-bottom: 1px solid var(--border);
}

.article-header-inner {
  max-width: 860px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--text-faint);
  margin-bottom: var(--sp-6);
  transition: color var(--t);
}

.back-link:hover { color: var(--accent); }

.back-link svg {
  width: 0.9rem;
  height: 0.9rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.article-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: var(--sp-5);
}

.article-intro {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 620px;
}

.article-hero-image {
  padding: var(--sp-8) 0;
}

.article-hero-image figure {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.article-hero-image img {
  width: 100%;
  aspect-ratio: 16/7;
  object-fit: cover;
}

.article-hero-image figcaption {
  padding: var(--sp-3) var(--sp-4) 0;
  font-size: 0.82rem;
  color: var(--text-faint);
  font-style: italic;
  text-align: center;
}

.article-body {
  padding: var(--sp-8) 0 var(--sp-16);
}

/* Two-column layout: prose + TOC */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: var(--sp-12);
  align-items: start;
}

.article-prose { min-width: 0; }

/* ── TOC sidebar ──────────────────────────────────────────────────────────── */

.post-toc {
  position: relative;   /* needed for JS absolute fallback near footer */
}

.toc-inner {
  position: sticky;
  top: 5rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--sp-5) var(--sp-5);
  font-size: 0.85rem;
  line-height: 1.5;
}

.toc-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-faint);
  margin-bottom: var(--sp-4);
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toc-link {
  display: block;
  padding: 0.3rem 0.5rem;
  border-radius: 5px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--t), background var(--t);
  border-left: 2px solid transparent;
  line-height: 1.35;
  font-size: 0.82rem;
}

.toc-link:hover {
  color: var(--text);
  background: var(--border);
}

.toc-link.is-active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, transparent);
  font-weight: 500;
}

/* Hide TOC on narrow screens */
@media (max-width: 1023px) {
  .article-layout {
    grid-template-columns: 1fr;
  }
  .post-toc { display: none; }
}

.article-footer {
  padding-bottom: var(--sp-16);
  border-top: 1px solid var(--border);
  padding-top: var(--sp-8);
}

.article-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
}

.article-nav-top {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
}

.article-nav-top svg { flex-shrink: 0; }

/* ─── Publication pages ──────────────────────────────────────────────────────── */

/* Override the accent colour for the entire publication main area.
   The site nav stays red; only within this <main> does the accent become slate-blue.
   Both light and dark themes inherit the override automatically. */
.publication-page {
  --accent:       #4a6fa5;
  --accent-hover: #3a5a8e;
}

/* Hero strip */
.pub-hero {
  padding: var(--sp-12) 0 var(--sp-8);
  border-top: 3px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 5%, var(--bg));
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 20%, var(--border));
}

/* Breadcrumb */
.pub-breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 0.83rem;
  color: var(--text-faint);
  margin-bottom: var(--sp-5);
  flex-wrap: wrap;
}

.pub-breadcrumb a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--t);
}

.pub-breadcrumb a:hover { color: var(--accent-hover); }

.pub-breadcrumb-sep { opacity: 0.5; }

.pub-breadcrumb-current {
  color: var(--text-muted);
  font-style: italic;
}

/* Title */
.pub-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: var(--sp-3);
}

/* "Externe bron" label */
.pub-label {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  border-radius: 99px;
  padding: 0.25rem 0.75rem;
}

.pub-label::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* Body */
.pub-body {
  padding: var(--sp-10) 0 var(--sp-16);
}

/* Left accent stripe on prose blockquotes already uses --accent (inherited) */

/* Back button footer */
.pub-footer {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  margin-top: var(--sp-12);
  padding-top: var(--sp-8);
  border-top: 1px solid var(--border);
}

.pub-back {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
  color: var(--accent);
}

.pub-back:hover {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border-color: var(--accent);
  color: var(--accent-hover);
}

.pub-back svg { flex-shrink: 0; }

.pub-footer-hint {
  font-size: 0.8rem;
  color: var(--text-faint);
  font-style: italic;
}

/* Dark theme adjustments */
[data-theme="dark"] .pub-hero {
  background: color-mix(in srgb, var(--accent) 8%, var(--bg));
}

/* ─── Error page ─────────────────────────────────────────────────────────────── */

.error-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  padding: var(--sp-16) 0;
}

.error-code {
  font-family: var(--font-display);
  font-size: 5rem;
  font-weight: 600;
  color: var(--border);
  margin-bottom: var(--sp-4);
  line-height: 1;
}

.error-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--sp-4);
}

.error-body {
  color: var(--text-muted);
  margin-bottom: var(--sp-8);
}

/* ─── Footer ─────────────────────────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--border);
  padding: var(--sp-10) 0;
  background: var(--bg-subtle);
  margin-top: auto;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: var(--sp-10);
}

.footer-tagline {
  font-size: 0.83rem;
  color: var(--text-faint);
  margin-top: var(--sp-2);
}

.footer-top-link {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.back-to-top {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 0.85rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: var(--sp-2) var(--sp-4);
  border-radius: 2rem;
  transition: color var(--t), border-color var(--t), background var(--t);
  white-space: nowrap;
}

.back-to-top:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}

.footer-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--sp-3);
}

.footer-legal {
  display: flex;
  gap: var(--sp-4);
}

.footer-legal a {
  font-size: 0.8rem;
  color: var(--text-faint);
  transition: color var(--t);
}

.footer-legal a:hover { color: var(--accent); }

.footer-copy {
  font-size: 0.78rem;
  color: var(--text-faint);
}

.empty-state {
  color: var(--text-muted);
  text-align: center;
  padding: var(--sp-16) 0;
}

/* ─── Responsive ─────────────────────────────────────────────────────────────── */

@media (max-width: 1024px) {
  .posts-grid--three { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  /* Mobile nav */
  .menu-toggle { display: flex; }

  .site-nav {
    display: none;
    position: absolute;
    top: 4rem;
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    padding: var(--sp-4) var(--sp-6) var(--sp-6);
    box-shadow: var(--shadow-md);
    z-index: 99;
  }

  .site-nav.is-open { display: block; }

  .nav-list {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-1);
  }

  .nav-link {
    width: 100%;
    padding: var(--sp-3) var(--sp-4);
    font-size: 1rem;
  }

  /* Layout */
  .posts-grid--two,
  .posts-grid--three { grid-template-columns: 1fr; }

  /* Footer */
  .footer-inner {
    grid-template-columns: 1fr;
    gap: var(--sp-8);
  }
  .footer-meta { align-items: flex-start; }
  .footer-legal { flex-wrap: wrap; }

  /* Haiku slider */
  .haiku-slider {
    grid-template-columns: 2.5rem 1fr 2.5rem;
    gap: var(--sp-2);
  }
}

@media (max-width: 480px) {
  .header-inner { gap: var(--sp-4); }

  .haiku-line { font-size: 1.25rem; }

  .hero { padding: var(--sp-16) 0 var(--sp-12); }
}

/* ═══════════════════════════════════════════════════════════════════════════
   BEGIN HIER
   ═══════════════════════════════════════════════════════════════════════════ */

.page-hero--begin {
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
}

.reading-time {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  margin-top: var(--sp-4);
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Leesreis kaarten */
.begin-hier-section {
  padding: var(--sp-16) 0;
}

.begin-card {
  display: grid;
  grid-template-columns: 3rem 1fr 1fr;
  gap: var(--sp-8);
  align-items: center;
  padding: var(--sp-8) 0;
  border-bottom: 1px solid var(--border);
}

.begin-card:last-child {
  border-bottom: none;
}

.begin-card__number {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1;
  text-align: center;
}

.begin-card__image-link {
  display: block;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.begin-card__image img {
  display: block;
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.begin-card__image-link:hover img {
  transform: scale(1.03);
}

.begin-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.begin-card__title {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 0;
}

.begin-card__title a {
  color: var(--text);
  text-decoration: none;
}

.begin-card__title a:hover {
  color: var(--accent);
}

.begin-card__excerpt {
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Outro */
.begin-outro {
  background: var(--bg-subtle);
  border-top: 1px solid var(--border);
  padding: var(--sp-12) 0;
  text-align: center;
}

.begin-outro__text {
  font-size: 1.0625rem;
  color: var(--text-muted);
  max-width: 60ch;
  margin: 0 auto var(--sp-8);
  line-height: 1.7;
}

.begin-outro__links {
  display: flex;
  gap: var(--sp-4);
  justify-content: center;
  flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 900px) {
  .begin-card {
    grid-template-columns: 2.5rem 1fr;
    grid-template-rows: auto auto;
  }
  .begin-card__image-link {
    grid-column: 2;
    grid-row: 1;
  }
  .begin-card__body {
    grid-column: 2;
    grid-row: 2;
  }
}

@media (max-width: 600px) {
  .begin-card {
    grid-template-columns: 1fr;
    gap: var(--sp-4);
  }
  .begin-card__number {
    font-size: 2rem;
    text-align: left;
  }
  .begin-card__image-link {
    grid-column: 1;
    grid-row: auto;
  }
  .begin-card__body {
    grid-column: 1;
    grid-row: auto;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PINNED POST (bloglijst)
   ═══════════════════════════════════════════════════════════════════════════ */

.pinned-post-wrap {
  margin-bottom: var(--sp-12);
  padding-bottom: var(--sp-12);
  border-bottom: 1px solid var(--border);
}

.pinned-label {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
  padding: var(--sp-1) var(--sp-3);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.post-card--pinned {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

/* ═══════════════════════════════════════════════════════════════════════════
   BEGIN HIER — PROSE STIJL (fullContent)
   ═══════════════════════════════════════════════════════════════════════════ */

.begin-hier-prose {
  max-width: var(--content);
  margin: 0 auto;
  padding: var(--sp-12) 0 var(--sp-16);
}

.begin-hier-prose .begin-hier-image {
  margin: var(--sp-8) 0;
}

.begin-hier-prose .begin-hier-image img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  display: block;
}

.begin-hier-prose h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 600;
  margin: var(--sp-12) 0 var(--sp-4);
  color: var(--text);
}

.begin-hier-prose h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin: var(--sp-10) 0 var(--sp-3);
  color: var(--text);
}

.begin-hier-prose p {
  line-height: 1.75;
  color: var(--text);
  margin: 0 0 var(--sp-4);
}

.begin-hier-prose ul {
  margin: var(--sp-4) 0 var(--sp-4) var(--sp-6);
  line-height: 1.75;
}

.begin-hier-prose li {
  margin-bottom: var(--sp-2);
  color: var(--text);
}

.begin-hier-prose a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.begin-hier-prose a:hover {
  color: var(--accent-hover);
}

.begin-hier-prose hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: var(--sp-10) 0;
}

.begin-hier-prose blockquote {
  border-left: 3px solid var(--accent);
  margin: var(--sp-8) 0;
  padding: var(--sp-4) var(--sp-6);
  background: var(--bg-subtle);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.begin-hier-prose blockquote p {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-style: italic;
  color: var(--text);
  margin: 0 0 var(--sp-3);
  line-height: 1.8;
}

.begin-hier-prose blockquote footer {
  font-size: 0.875rem;
  color: var(--text-muted);
}
