/* ================================================================
   THEME SYSTEM — 6 thema's, elk met unieke typografie & palet
   FIXES: :root fallback, geen color-mix(), grain z-index fix
   ================================================================ */

/* ── DEFAULT :root fallback (Obsidian waardes) ─────────────── */
/* Zodat CSS vars altijd beschikbaar zijn, ook voor data-theme */
:root {
  --bg:           #0a0a0e;
  --bg2:          #111118;
  --bg3:          #17171f;
  --surface:      #1e1e28;
  --border:       rgba(255,215,100,0.1);
  --border-hover: rgba(255,215,100,0.3);
  --text:         #f0ede4;
  --muted:        #8c8a7e;
  --accent:       #d4a843;
  --accent2:      #e8c96a;
  --accent-glow:  rgba(212,168,67,0.25);
  --accent-soft:  rgba(212,168,67,0.12);
  --font-head:    'Playfair Display', Georgia, serif;
  --font-body:    'Instrument Sans', 'DM Sans', sans-serif;
  --font-mono:    'JetBrains Mono', 'Courier New', monospace;
  --radius:       8px;
  --radius-lg:    16px;
  --nav-h:        68px;
}

/* ================================================================
   THEMA 1: "Obsidian" — Dark luxury, goud accent (DEFAULT)
   ================================================================ */
[data-theme="obsidian"] {
  --bg:           #0a0a0e;
  --bg2:          #111118;
  --bg3:          #17171f;
  --surface:      #1e1e28;
  --border:       rgba(255,215,100,0.1);
  --border-hover: rgba(255,215,100,0.3);
  --text:         #f0ede4;
  --muted:        #8c8a7e;
  --accent:       #d4a843;
  --accent2:      #e8c96a;
  --accent-glow:  rgba(212,168,67,0.25);
  --accent-soft:  rgba(212,168,67,0.12);
  --font-head:    'Playfair Display', Georgia, serif;
  --font-body:    'Instrument Sans', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;
  --radius:       8px;
  --radius-lg:    16px;
}

/* ================================================================
   THEMA 2: "Arctic" — Light minimal, ijsblauw
   ================================================================ */
[data-theme="arctic"] {
  --bg:           #f4f6f9;
  --bg2:          #ffffff;
  --bg3:          #eef1f5;
  --surface:      #e8ecf2;
  --border:       rgba(0,0,0,0.08);
  --border-hover: rgba(14,120,200,0.35);
  --text:         #0d1117;
  --muted:        #6b7280;
  --accent:       #0e78c8;
  --accent2:      #3b9ce8;
  --accent-glow:  rgba(14,120,200,0.15);
  --accent-soft:  rgba(14,120,200,0.08);
  --font-head:    'Plus Jakarta Sans', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;
  --radius:       10px;
  --radius-lg:    18px;
}

/* ================================================================
   THEMA 3: "Forest" — Donkergroen, organisch
   ================================================================ */
[data-theme="forest"] {
  --bg:           #0c110d;
  --bg2:          #111a12;
  --bg3:          #162018;
  --surface:      #1d2a1f;
  --border:       rgba(100,200,100,0.1);
  --border-hover: rgba(100,200,100,0.3);
  --text:         #e4ede4;
  --muted:        #7a9c7e;
  --accent:       #5cb86a;
  --accent2:      #80d48c;
  --accent-glow:  rgba(92,184,106,0.2);
  --accent-soft:  rgba(92,184,106,0.1);
  --font-head:    'Cormorant Garamond', Georgia, serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;
  --radius:       6px;
  --radius-lg:    14px;
}

/* ================================================================
   THEMA 4: "Ember" — Warm donker, oranje-rood
   ================================================================ */
[data-theme="ember"] {
  --bg:           #0e0904;
  --bg2:          #160f06;
  --bg3:          #1e1509;
  --surface:      #271c0d;
  --border:       rgba(255,140,50,0.1);
  --border-hover: rgba(255,140,50,0.3);
  --text:         #f5ede0;
  --muted:        #9c8060;
  --accent:       #f07030;
  --accent2:      #f59050;
  --accent-glow:  rgba(240,112,48,0.25);
  --accent-soft:  rgba(240,112,48,0.1);
  --font-head:    'Bebas Neue', sans-serif;
  --font-body:    'Barlow', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;
  --radius:       4px;
  --radius-lg:    10px;
}

/* ================================================================
   THEMA 5: "Violet" — Diep paars, neon
   ================================================================ */
[data-theme="violet"] {
  --bg:           #08060f;
  --bg2:          #0e0b1a;
  --bg3:          #130f22;
  --surface:      #1a152e;
  --border:       rgba(160,100,255,0.12);
  --border-hover: rgba(160,100,255,0.35);
  --text:         #ece8ff;
  --muted:        #8878b8;
  --accent:       #9b59f5;
  --accent2:      #b880ff;
  --accent-glow:  rgba(155,89,245,0.3);
  --accent-soft:  rgba(155,89,245,0.12);
  --font-head:    'Outfit', sans-serif;
  --font-body:    'Nunito', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;
  --radius:       12px;
  --radius-lg:    22px;
}

/* ================================================================
   THEMA 6: "Chalk" — Wit papier, editorial
   ================================================================ */
[data-theme="chalk"] {
  --bg:           #faf8f3;
  --bg2:          #ffffff;
  --bg3:          #f2f0ea;
  --surface:      #e8e5dc;
  --border:       rgba(0,0,0,0.1);
  --border-hover: rgba(0,0,0,0.3);
  --text:         #1a1814;
  --muted:        #7a766a;
  --accent:       #c0392b;
  --accent2:      #e74c3c;
  --accent-glow:  rgba(192,57,43,0.15);
  --accent-soft:  rgba(192,57,43,0.07);
  --font-head:    'Libre Baskerville', Georgia, serif;
  --font-body:    'Source Sans 3', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;
  --radius:       4px;
  --radius-lg:    8px;
}

/* ================================================================
   GLOBAL RESET & BASE STYLES
   ================================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background: var(--bg);
}

body {
  font-family: var(--font-body, 'DM Sans', sans-serif);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 0.35s ease, color 0.35s ease;
}

/* Scrollbar */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 999px; }

/* Selection */
::selection { background: var(--accent); color: #fff; }

/* Links */
a { color: inherit; }

/* ── Grain overlay — pointer-events: none is kritiek ────────── */
body::after {
  content: '';
  position: fixed; inset: 0;
  z-index: 999;           /* Was 9999 — verlaagd zodat klikken werkt */
  pointer-events: none;   /* Nooit muisgebeurtenissen blokkeren */
  opacity: 0.022;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}
[data-theme="arctic"] body::after,
[data-theme="chalk"]  body::after { opacity: 0.012; }

/* ================================================================
   NAVIGATION
   ================================================================ */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: var(--nav-h);
  display: flex; align-items: center;
  padding: 0 clamp(1.25rem, 5vw, 3.5rem);
  transition: background 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.site-nav.scrolled {
  /* JS sets inline background-color: var(--bg) */
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 28px rgba(0,0,0,0.18);
}

/* Lichte thema's: extra subtle nav */
[data-theme="arctic"] .site-nav.scrolled,
[data-theme="chalk"]  .site-nav.scrolled {
  box-shadow: 0 1px 20px rgba(0,0,0,0.07);
}

/* Nav brand */
.nav-brand {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.25rem;
  text-decoration: none;
  color: var(--text);
  margin-right: auto;
  letter-spacing: -0.02em;
  display: flex; align-items: center; gap: 2px;
}
.nav-brand .dot { color: var(--accent); }

[data-theme="ember"] .nav-brand  { font-size: 1.6rem; letter-spacing: 0.04em; text-transform: uppercase; }
[data-theme="forest"] .nav-brand { font-size: 1.5rem; font-style: italic; }

/* Nav links */
.nav-links {
  display: flex; align-items: center; gap: 0.15rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius);
  transition: color 0.2s, background 0.2s;
  position: relative;
  letter-spacing: 0.01em;
}

.nav-links a:hover  { color: var(--text);   background: var(--bg3); }
.nav-links a.active { color: var(--accent); }

/* Light theme: underline style */
[data-theme="arctic"] .nav-links a::after,
[data-theme="chalk"]  .nav-links a::after {
  content: '';
  position: absolute; bottom: 4px; left: 50%; right: 50%;
  height: 1.5px; background: var(--accent);
  transition: left 0.2s, right 0.2s;
}
[data-theme="arctic"] .nav-links a:hover::after,
[data-theme="chalk"]  .nav-links a:hover::after,
[data-theme="arctic"] .nav-links a.active::after,
[data-theme="chalk"]  .nav-links a.active::after { left: 0.85rem; right: 0.85rem; }
[data-theme="arctic"] .nav-links a.active,
[data-theme="chalk"]  .nav-links a.active        { background: none; }

/* CTA nav button */
.nav-cta {
  background: var(--accent) !important;
  color: #fff !important;
  font-weight: 600 !important;
  margin-left: 0.5rem;
  border-radius: var(--radius) !important;
  padding: 0.45rem 1.1rem !important;
  box-shadow: 0 2px 12px var(--accent-glow);
  transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s !important;
}
.nav-cta:hover {
  opacity: 0.9 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px var(--accent-glow) !important;
}
[data-theme="chalk"] .nav-cta  { border-radius: 2px !important; }
[data-theme="ember"] .nav-cta  { letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.78rem !important; }

/* Theme switcher dots */
.theme-switcher {
  display: flex; align-items: center; gap: 0.25rem;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 999px; padding: 3px;
  margin-left: 1rem;
}
.theme-dot {
  width: 18px; height: 18px; border-radius: 50%;
  cursor: pointer; border: 2px solid transparent;
  transition: transform 0.2s, border-color 0.2s;
}
.theme-dot:hover  { transform: scale(1.25); }
.theme-dot.active { border-color: var(--text); transform: scale(1.1); }
.theme-dot[data-t="obsidian"] { background: linear-gradient(135deg,#0a0a0e,#d4a843); }
.theme-dot[data-t="arctic"]   { background: linear-gradient(135deg,#f4f6f9,#0e78c8); }
.theme-dot[data-t="forest"]   { background: linear-gradient(135deg,#0c110d,#5cb86a); }
.theme-dot[data-t="ember"]    { background: linear-gradient(135deg,#0e0904,#f07030); }
.theme-dot[data-t="violet"]   { background: linear-gradient(135deg,#08060f,#9b59f5); }
.theme-dot[data-t="chalk"]    { background: linear-gradient(135deg,#faf8f3,#c0392b); }

/* Hamburger */
.nav-toggle {
  display: none; background: none; border: none;
  cursor: pointer; padding: 0.4rem; margin-left: 0.75rem;
  flex-direction: column; gap: 5px;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 768px) {
  .nav-toggle    { display: flex; }
  .theme-switcher { display: none; }
  .nav-links {
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    background: var(--bg2);
    flex-direction: column; align-items: stretch;
    padding: 1rem 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    transform: translateY(-110%);
    transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
    gap: 0.25rem;
    z-index: 199;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a    { padding: 0.8rem 1rem; font-size: 1rem; }
  .nav-cta        { margin-left: 0 !important; text-align: center; }
}

/* ================================================================
   MAIN WRAPPER
   ================================================================ */
.site-main { padding-top: var(--nav-h); position: relative; z-index: 1; }

/* ================================================================
   LAYOUT
   ================================================================ */
.container        { max-width: 1140px; margin: 0 auto; padding: 0 clamp(1.25rem, 5vw, 3rem); }
.container-narrow { max-width: 760px;  margin: 0 auto; padding: 0 clamp(1.25rem, 5vw, 3rem); }
.section          { padding: clamp(3rem, 7vw, 6rem) 0; }

/* ================================================================
   TYPOGRAPHY
   ================================================================ */
.display-title {
  font-family: var(--font-head);
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -0.04em;
}
[data-theme="forest"]  .display-title,
[data-theme="chalk"]   .display-title,
[data-theme="obsidian"] .display-title { letter-spacing: -0.02em; line-height: 1.05; }
[data-theme="ember"]   .display-title  { letter-spacing: 0.02em; line-height: 0.95; text-transform: uppercase; }

.section-eyebrow {
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 0.75rem;
  display: block;
}
[data-theme="forest"] .section-eyebrow { font-style: italic; letter-spacing: 0.08em; font-size: 0.85rem; }
[data-theme="chalk"]  .section-eyebrow { font-family: var(--font-head); font-size: 0.85rem; }

.section-title {
  font-family: var(--font-head);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}
[data-theme="ember"]  .section-title { text-transform: uppercase; letter-spacing: 0.05em; font-weight: 400; }
[data-theme="chalk"]  .section-title { font-style: italic; }
[data-theme="forest"] .section-title { font-style: italic; font-weight: 600; }

.lead {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.85;
  max-width: 600px;
}

/* ================================================================
   BUTTONS
   ================================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.9rem; font-weight: 600;
  padding: 0.7rem 1.6rem;
  border-radius: var(--radius);
  text-decoration: none; border: none;
  cursor: pointer; transition: all 0.2s;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent); color: #fff;
  box-shadow: 0 4px 14px var(--accent-glow);
}
.btn-primary:hover {
  opacity: 0.9; transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-glow);
}
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--text); background: var(--bg3); }

[data-theme="ember"] .btn         { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8rem; }
[data-theme="chalk"] .btn         { border-radius: 2px; }
[data-theme="chalk"] .btn-primary { box-shadow: 3px 3px 0 var(--text); }
[data-theme="chalk"] .btn-primary:hover { transform: translate(-2px,-2px); box-shadow: 5px 5px 0 var(--text); }

/* ================================================================
   CARDS
   ================================================================ */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}
[data-theme="arctic"] .card:hover,
[data-theme="chalk"]  .card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.1); }

.card-img {
  width: 100%; height: 200px;
  background: var(--bg3) center/cover no-repeat;
  position: relative; overflow: hidden;
}
.card-img-empty {
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 2rem;
}
.card-body { padding: 1.5rem; }

.card-tag {
  display: inline-block;
  font-size: 0.7rem; font-weight: 700;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent2);
  letter-spacing: 0.04em; text-transform: uppercase;
  margin-right: 0.35rem; margin-bottom: 0.35rem;
}
[data-theme="chalk"] .card-tag { border-radius: 2px; border: 1px solid var(--border); background: var(--bg3); color: var(--muted); }
[data-theme="ember"] .card-tag { border-radius: 3px; }

.card-title {
  font-family: var(--font-head);
  font-size: 1.1rem; font-weight: 700;
  line-height: 1.25;
  margin: 0.6rem 0 0.5rem;
  letter-spacing: -0.01em;
}
[data-theme="ember"]  .card-title { font-weight: 400; text-transform: uppercase; letter-spacing: 0.05em; }
[data-theme="chalk"]  .card-title { font-style: italic; }
[data-theme="forest"] .card-title { font-style: italic; }

.card-text { font-size: 0.875rem; color: var(--muted); line-height: 1.75; margin-bottom: 1rem; }
.card-link {
  font-size: 0.825rem; font-weight: 700;
  color: var(--accent); text-decoration: none;
  letter-spacing: 0.03em;
  display: inline-flex; align-items: center; gap: 0.3rem;
  transition: gap 0.2s;
}
.card-link:hover { gap: 0.55rem; }

/* ================================================================
   FORMS
   ================================================================ */
.form-group  { margin-bottom: 1.25rem; }
.form-label  {
  display: block; font-size: 0.825rem; font-weight: 600;
  color: var(--muted); margin-bottom: 0.45rem;
  letter-spacing: 0.02em;
}
[data-theme="chalk"] .form-label { font-family: var(--font-head); font-size: 0.9rem; font-style: italic; font-weight: 400; }

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  background: var(--bg3);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
}
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-input::placeholder,
.form-textarea::placeholder { color: var(--muted); opacity: 0.6; }

[data-theme="chalk"] .form-input,
[data-theme="chalk"] .form-textarea  { border-radius: 2px; }
[data-theme="chalk"] .form-input:focus { box-shadow: 2px 2px 0 var(--accent); }

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

/* Lichte thema's: zorg dat input tekst leesbaar is */
[data-theme="arctic"] .form-input,
[data-theme="arctic"] .form-textarea,
[data-theme="arctic"] .form-select,
[data-theme="chalk"]  .form-input,
[data-theme="chalk"]  .form-textarea,
[data-theme="chalk"]  .form-select  { color: var(--text); }

/* Form check */
.form-check { display: flex; align-items: center; gap: 0.6rem; cursor: pointer; }
.form-check input[type=checkbox] { accent-color: var(--accent); width: 16px; height: 16px; }

/* ================================================================
   ALERTS
   ================================================================ */
.alert {
  padding: 0.9rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}
.alert-success { background: rgba(92,184,106,0.1); border: 1px solid rgba(92,184,106,0.3); color: #7dd48a; }
.alert-error   { background: rgba(240,100,80,0.1);  border: 1px solid rgba(240,100,80,0.3);  color: #f09080; }
.alert-info    { background: var(--accent-soft);    border: 1px solid var(--accent-glow);    color: var(--accent2); }

[data-theme="arctic"] .alert-success,
[data-theme="chalk"]  .alert-success { color: #1a7a28; background: #e8f5ea; border-color: #b2dfb8; }
[data-theme="arctic"] .alert-error,
[data-theme="chalk"]  .alert-error   { color: #8b1a1a; background: #fce8e8; border-color: #f5b0b0; }
[data-theme="arctic"] .alert-info,
[data-theme="chalk"]  .alert-info    { color: var(--accent); background: var(--accent-soft); border-color: var(--accent-glow); }

/* ================================================================
   FOOTER
   ================================================================ */
.site-footer {
  margin-top: 5rem;
  padding: 3rem clamp(1.25rem, 5vw, 3.5rem);
  border-top: 1px solid var(--border);
}
.footer-inner {
  max-width: 1140px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1.5rem;
}
.footer-brand {
  font-family: var(--font-head); font-size: 1.1rem; font-weight: 700;
  color: var(--muted); text-decoration: none;
}
.footer-brand .dot { color: var(--accent); }
.footer-text { font-size: 0.825rem; color: var(--muted); }
.footer-socials { display: flex; gap: 1rem; align-items: center; }
.footer-socials a {
  color: var(--muted); text-decoration: none;
  width: 36px; height: 36px; border-radius: var(--radius);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.footer-socials a:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}
[data-theme="chalk"] .footer-socials a { border-radius: 2px; }

@media (max-width: 600px) { .footer-inner { flex-direction: column; align-items: flex-start; } }

/* ================================================================
   HERO
   ================================================================ */
.hero {
  min-height: calc(100vh - var(--nav-h));
  display: flex; align-items: center;
  position: relative; overflow: hidden;
  padding: 4rem 0;
}

.hero-glow {
  position: absolute; pointer-events: none;
  border-radius: 50%; filter: blur(120px);
}
.hero-glow-1 {
  width: 600px; height: 600px; background: var(--accent);
  top: -200px; right: -100px; opacity: 0.12;
}
.hero-glow-2 {
  width: 400px; height: 400px; background: var(--accent);
  bottom: -100px; left: -80px; opacity: 0.08;
}
[data-theme="arctic"] .hero-glow-1,
[data-theme="chalk"]  .hero-glow-1 { opacity: 0.06; }
[data-theme="arctic"] .hero-glow-2,
[data-theme="chalk"]  .hero-glow-2 { opacity: 0.03; }

.hero-inner {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 4rem; align-items: center;
  position: relative; z-index: 1;
}

.hero-status {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted);
  padding: 0.35rem 0.9rem 0.35rem 0.65rem;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 999px; margin-bottom: 1.75rem;
}
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #4ade80;
  animation: statusPulse 2.5s ease infinite;
}
@keyframes statusPulse {
  0%,100% { opacity:1; box-shadow: 0 0 0 0 rgba(74,222,128,0.4); }
  50%      { opacity:0.6; box-shadow: 0 0 0 4px rgba(74,222,128,0); }
}
[data-theme="chalk"] .hero-status { border-radius: 2px; }
[data-theme="ember"] .hero-status { border-radius: var(--radius); letter-spacing: 0.1em; }

.hero-title-wrap { margin-bottom: 1.5rem; }
.hero-sub {
  font-family: var(--font-head); font-size: clamp(1rem, 2vw, 1.35rem);
  color: var(--muted); font-weight: 400; margin-bottom: 1.25rem;
}
[data-theme="ember"]  .hero-sub { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.9rem; }
[data-theme="chalk"]  .hero-sub { font-style: italic; }
[data-theme="forest"] .hero-sub { font-style: italic; }

.hero-desc    { color: var(--muted); max-width: 500px; line-height: 1.85; margin-bottom: 2.25rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-visual  { display: flex; justify-content: flex-end; align-items: center; }

/* Code card */
.code-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  width: min(360px, 100%);
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
}
[data-theme="arctic"] .code-card { box-shadow: 0 12px 40px rgba(0,0,0,0.12); }
[data-theme="chalk"]  .code-card { box-shadow: 4px 4px 0 var(--text); border-radius: var(--radius); }

.code-card-bar {
  background: var(--bg3); padding: 0.75rem 1rem;
  display: flex; align-items: center; gap: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.code-dot   { width: 11px; height: 11px; border-radius: 50%; }
.code-dot-r { background: #ff5f56; }
.code-dot-y { background: #ffbd2e; }
.code-dot-g { background: #27c93f; }

.code-body {
  padding: 1.25rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.83rem; line-height: 2;
  color: var(--muted);
}
/* Code token colors — dark themes */
.t-kw   { color: #c792ea; }
.t-fn   { color: #82aaff; }
.t-str  { color: #c3e88d; }
.t-num  { color: #f78c6c; }
.t-prop { color: #ffcb6b; }
.t-bool { color: #89ddff; }
.t-cmt  { color: var(--muted); font-style: italic; opacity: 0.7; }

/* Code token colors — arctic */
[data-theme="arctic"] .t-kw   { color: #9333ea; }
[data-theme="arctic"] .t-fn   { color: #2563eb; }
[data-theme="arctic"] .t-str  { color: #059669; }
[data-theme="arctic"] .t-num  { color: #dc2626; }
[data-theme="arctic"] .t-prop { color: #d97706; }
[data-theme="arctic"] .t-bool { color: #0891b2; }

/* Code token colors — chalk */
[data-theme="chalk"] .t-kw   { color: #8b1a8b; }
[data-theme="chalk"] .t-fn   { color: #1a3a8b; }
[data-theme="chalk"] .t-str  { color: #1a7a28; }
[data-theme="chalk"] .t-prop { color: #7a4a1a; }
[data-theme="chalk"] .t-bool { color: #c0392b; }

/* ================================================================
   SECTIONS
   ================================================================ */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.75rem; }
.section-header {
  display: flex; align-items: flex-end;
  justify-content: space-between; flex-wrap: wrap;
  gap: 1rem; margin-bottom: 2.5rem;
}

.cta-block {
  background: linear-gradient(135deg, var(--bg2), var(--bg3));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(2.5rem, 5vw, 4rem);
  text-align: center; position: relative; overflow: hidden;
}
.cta-block::before {
  content: '';
  position: absolute; top: -60%; left: 50%; transform: translateX(-50%);
  width: 400px; height: 400px; border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}
[data-theme="chalk"] .cta-block {
  border: 2px solid var(--text); border-radius: var(--radius);
  box-shadow: 5px 5px 0 var(--text);
}
.cta-block .lead { margin: 0 auto 2rem; }

/* ================================================================
   BLOG
   ================================================================ */
.blog-list {
  display: flex; flex-direction: column; gap: 1px;
  border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden;
}
.blog-row {
  display: grid; grid-template-columns: 160px 1fr auto;
  gap: 1.5rem; align-items: center;
  padding: 1.35rem 1.75rem;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}
.blog-row:last-child { border-bottom: none; }
.blog-row:hover      { background: var(--bg3); }
.blog-row-meta  { display: flex; flex-direction: column; gap: 0.5rem; }
.blog-date      { font-size: 0.78rem; color: var(--muted); font-family: var(--font-mono); }
.blog-row-title a {
  font-family: var(--font-head); font-size: 1.05rem; font-weight: 700;
  color: var(--text); text-decoration: none; transition: color 0.2s;
}
.blog-row-title a:hover { color: var(--accent); }
.blog-row-excerpt { font-size: 0.85rem; color: var(--muted); margin-top: 0.35rem; line-height: 1.6; }

[data-theme="chalk"]  .blog-row-title a,
[data-theme="forest"] .blog-row-title a { font-style: italic; }

/* ================================================================
   POST PAGE
   ================================================================ */
.post-header { padding: 3rem 0 2.5rem; }
.post-back {
  color: var(--muted); text-decoration: none; font-size: 0.85rem;
  display: inline-flex; align-items: center; gap: 0.4rem;
  margin-bottom: 1.5rem; transition: color 0.2s;
}
.post-back:hover { color: var(--accent); }
.post-meta-row { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.post-date     { font-size: 0.8rem; color: var(--muted); font-family: var(--font-mono); }
.post-title    {
  font-family: var(--font-head); font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700; line-height: 1.1; letter-spacing: -0.03em;
}
[data-theme="chalk"]  .post-title { font-style: italic; }
[data-theme="forest"] .post-title { font-style: italic; }
[data-theme="ember"]  .post-title { text-transform: uppercase; letter-spacing: 0.03em; }

.post-body {
  color: var(--muted); font-size: 1.05rem; line-height: 1.95;
  max-width: 720px; margin: 0 auto;
}
.post-body h2,
.post-body h3      { font-family: var(--font-head); color: var(--text); margin: 2rem 0 0.75rem; }
.post-body p       { margin-bottom: 1.35rem; }
.post-body a       { color: var(--accent); }
.post-body pre     {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem;
  overflow-x: auto; margin: 1.5rem 0;
}
.post-body code    {
  font-family: var(--font-mono); font-size: 0.875em;
  color: var(--accent2); background: var(--accent-soft);
  padding: 0.15em 0.4em; border-radius: 4px;
}
.post-body pre code  { background: none; padding: 0; }
.post-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.75rem 1.5rem; margin: 1.5rem 0;
  background: var(--bg2); border-radius: 0 var(--radius) var(--radius) 0;
}

/* ================================================================
   ABOUT PAGE
   ================================================================ */
.about-layout      { display: grid; grid-template-columns: 1.7fr 1fr; gap: 5rem; align-items: start; }
.about-text-content { color: var(--muted); line-height: 1.95; font-size: 1rem; }
.about-text-content p { margin-bottom: 1.25rem; }
.about-sidebar-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.75rem;
}
[data-theme="chalk"] .about-sidebar-card { border-radius: var(--radius); border: 2px solid var(--border); box-shadow: 3px 3px 0 var(--border); }

/* ================================================================
   CONTACT PAGE
   ================================================================ */
.contact-layout { display: grid; grid-template-columns: 1fr 1.3fr; gap: 4rem; align-items: start; }
.contact-info-item {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 0.75rem;
}
.contact-info-icon  { font-size: 1.25rem; flex-shrink: 0; }
.contact-info-label { font-size: 0.78rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.contact-info-value { font-size: 0.9rem; color: var(--text); }
.contact-form-card  {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 2.25rem;
}
[data-theme="chalk"] .contact-form-card { border-radius: var(--radius); border: 2px solid var(--text); box-shadow: 4px 4px 0 var(--text); }

.hp-field { display: none !important; }

/* Upload dropzone */
.upload-dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background: var(--bg3);
}
.upload-dropzone:hover,
.upload-dropzone.dragover { border-color: var(--accent); background: var(--accent-soft); }
.upload-dz-icon  { font-size: 1.75rem; display: block; margin-bottom: 0.4rem; }
.upload-dz-text  { display: block; font-size: 0.875rem; font-weight: 600; color: var(--text); }
.upload-dz-hint  { display: block; font-size: 0.75rem; color: var(--muted); margin-top: 0.25rem; }
.upload-dz-file  { display: flex; align-items: center; gap: 0.75rem; justify-content: center; }

/* ================================================================
   PROJECTS PAGE
   ================================================================ */
.projects-filters { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 2rem; }
.filter-btn {
  font-size: 0.78rem; font-weight: 700;
  padding: 0.4rem 1rem; border-radius: 999px;
  border: 1.5px solid var(--border);
  background: transparent; color: var(--muted);
  cursor: pointer; transition: all 0.2s; letter-spacing: 0.04em;
}
.filter-btn:hover,
.filter-btn.active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
[data-theme="chalk"] .filter-btn { border-radius: 2px; }
[data-theme="ember"] .filter-btn { text-transform: uppercase; border-radius: 3px; }

/* ================================================================
   EMPTY STATES
   ================================================================ */
.empty-state {
  text-align: center; padding: 5rem 2rem;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.empty-icon  { font-size: 3rem; margin-bottom: 1rem; }
.empty-title { font-family: var(--font-head); font-size: 1.35rem; margin-bottom: 0.5rem; }
.empty-text  { color: var(--muted); font-size: 0.9rem; }
[data-theme="chalk"] .empty-state { border-radius: var(--radius); border: 2px solid var(--border); }

/* ================================================================
   ANIMATIONS
   ================================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: none; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slideRight {
  from { opacity: 0; transform: translateX(-24px); }
  to   { opacity: 1; transform: none; }
}

.anim-fadeup { animation: fadeUp  0.65s cubic-bezier(0.4,0,0.2,1) both; }
.anim-fadein { animation: fadeIn  0.5s ease both; }
.anim-slide  { animation: slideRight 0.55s cubic-bezier(0.4,0,0.2,1) both; }

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* ================================================================
   FILES PAGE
   ================================================================ */
.files-locked-wrap {
  max-width: 480px; margin: 0 auto; text-align: center;
  padding: 4rem 2rem;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.files-lock-icon   { font-size: 3.5rem; margin-bottom: 1rem; }
.files-locked-wrap h2 { font-family: var(--font-head); font-size: 1.5rem; font-weight: 700; margin-bottom: 0.6rem; }
.files-locked-wrap p  { color: var(--muted); font-size: 0.9rem; margin-bottom: 1.5rem; }
.files-pw-form { display: flex; gap: 0.75rem; max-width: 340px; margin: 0 auto; }
.files-pw-form .form-input { flex: 1; }

.files-category   { margin-bottom: 3rem; }
.files-cat-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; flex-wrap: wrap; gap: 0.5rem; }
.files-cat-title  { font-family: var(--font-head); font-size: 1.15rem; font-weight: 700; display: flex; align-items: center; gap: 0.6rem; margin: 0; }
.files-cat-icon   { font-size: 1rem; }
.files-cat-count  { font-size: 0.78rem; color: var(--muted); }

.files-grid       { display: flex; flex-direction: column; gap: 0.75rem; }
.file-card {
  display: grid; grid-template-columns: 3rem 1fr auto;
  gap: 1rem; align-items: center;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem 1.25rem;
  transition: border-color 0.2s, transform 0.2s;
}
.file-card:hover  { border-color: var(--border-hover); transform: translateX(3px); }
.file-card-icon   { font-size: 2rem; text-align: center; }
.file-card-name   { font-weight: 700; font-size: 0.95rem; margin-bottom: 0.25rem; line-height: 1.3; }
.file-card-desc   { font-size: 0.8rem; color: var(--muted); margin: 0 0 0.4rem; line-height: 1.5; }
.file-card-meta   { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; font-size: 0.75rem; color: var(--muted); }
.file-ext-badge   {
  background: var(--accent-soft); color: var(--accent2);
  font-weight: 700; font-size: 0.65rem;
  padding: 0.15rem 0.5rem; border-radius: 4px;
  text-transform: uppercase; letter-spacing: 0.04em;
}

.files-upload-section {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 2rem;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 960px) {
  .hero-inner       { grid-template-columns: 1fr; }
  .hero-visual      { justify-content: flex-start; }
  .grid-3           { grid-template-columns: 1fr 1fr; }
  .about-layout     { grid-template-columns: 1fr; gap: 2.5rem; }
  .contact-layout   { grid-template-columns: 1fr; gap: 2.5rem; }
  .blog-row         { grid-template-columns: 1fr; }
  .blog-row-read    { display: none; }
  .file-card        { grid-template-columns: 2.5rem 1fr; }
  .file-card-action { grid-column: 1/-1; }
}
@media (max-width: 600px) {
  .grid-3, .grid-2  { grid-template-columns: 1fr; }
  .section-header   { flex-direction: column; align-items: flex-start; }
  .cta-block        { padding: 2rem 1.5rem; }
  .files-pw-form    { flex-direction: column; }
}
