/* ==== Design tokens (ported from the Claude Design mockup) ==== */
:root, html[data-theme="dark"] {
  --ground: #1a1917; --ink: #f9f4ed; --body: #eee7db; --muted: #c0b6a5; --faint: #82796a;
  --line: #474238; --line-strong: #645c50;
  --sig: #f6a06b; --sig-hi: #ffc6a5; --sig-strong: #c67139; --sig-ink: #201e1d; --sig-glow: rgba(246,160,107,0.14);
  --sage: #aebf92; --sage-ink: #ccdbb2; --sage-bg: #272e1b; --accent-bg: #402310;
  --panel: rgba(46,43,37,0.72); --panel-soft: rgba(46,43,37,0.5); --input-bg: #201e1d;
  --readout-bg: rgba(26,25,23,0.78); --ph-a: #232220; --ph-b: #2e2b25;
  --sel-bg: #8c491a; --sel-fg: #fff2eb;
  --glow-1: rgba(174,191,146,0.07); --glow-2: rgba(198,113,57,0.08);
  --contour-rgb: 174,191,146; --contour-a: 0.13; --contour-a-index: 0.30;
  --portrait-wash: saturate(0.75) contrast(0.9);
  --font-heading: "Caprasimo", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --font-body: "Figtree", system-ui, sans-serif;
}
html[data-theme="light"] {
  --ground: #f5ead8; --ink: #201e1d; --body: #474238; --muted: #645c50; --faint: #6b6252;
  --line: #dcd3c4; --line-strong: #c0b6a5;
  --sig: #8c491a; --sig-hi: #8c491a; --sig-strong: #c67139; --sig-ink: #201e1d; --sig-glow: rgba(198,113,57,0.16);
  --sage: #56633f; --sage-ink: #56633f; --sage-bg: #f0fae1; --accent-bg: #ffe1d0;
  --panel: rgba(235,221,197,0.72); --panel-soft: rgba(235,221,197,0.5); --input-bg: #f9f4ed;
  --readout-bg: rgba(249,244,237,0.85); --ph-a: #ebddc5; --ph-b: #dcd3c4;
  --sel-bg: #ffe1d0; --sel-fg: #402310;
  --glow-1: rgba(122,138,94,0.10); --glow-2: rgba(198,113,57,0.10);
  --contour-rgb: 86,99,63; --contour-a: 0.10; --contour-a-index: 0.22;
  --portrait-wash: saturate(0.6) contrast(0.85) brightness(1.05);
}

/* ==== Reset / base ==== */
*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark light; }
html[data-theme="light"] { color-scheme: light; }
body {
  margin: 0; background: var(--ground); color: var(--body);
  font-family: var(--font-body); font-size: 15px; line-height: 1.55;
  transition: background-color .4s ease, color .4s ease;
}
h1, h2, h3, h4 { color: var(--ink); font-family: var(--font-heading); font-weight: 400; line-height: 1.05; margin: 0; }
p { margin: 0; }
a { color: var(--sig); text-decoration: none; }
a:hover { color: var(--sig-hi); text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--sig-strong); outline-offset: 2px; }
::selection { background: var(--sel-bg); color: var(--sel-fg); }
input::placeholder, textarea::placeholder { color: var(--faint); }
button { font: inherit; }

/* Language toggling: both spans render server-side, CSS shows only one. */
html[data-lang="en"] [data-lang="nl"] { display: none; }
html[data-lang="nl"] [data-lang="en"] { display: none; }

.eyebrow { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; margin: 0 0 13.2px; }
.eyebrow--sage { color: var(--sage); }
.eyebrow--sig { color: var(--sig); font-size: 11px; letter-spacing: 0.1em; margin: 0; }
.eyebrow--faint { color: var(--faint); }

@media print { #contours, .readout { display: none; } body { background: #fff; color: #201e1d; } }

/* ==== Background ==== */
#contours { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.bg-glow {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(120% 80% at 15% 0%, var(--glow-1), transparent 60%),
              radial-gradient(90% 70% at 100% 100%, var(--glow-2), transparent 65%);
}

/* ==== Readout / toggles ==== */
.readout {
  position: fixed; right: clamp(12px, 2vw, 28px); bottom: clamp(12px, 2vw, 28px); z-index: 3;
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; color: var(--sage);
  background: var(--readout-bg); border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 8px 6px 14px; backdrop-filter: blur(6px);
}
.readout__divider { width: 1px; align-self: stretch; background: var(--line); }
.switch { position: relative; flex: none; border: 1px solid var(--line); border-radius: 999px; background: transparent; cursor: pointer; padding: 0; }
.switch:hover { border-color: var(--sage); }
.switch--lang { width: 62px; height: 28px; overflow: hidden; }
.switch--theme { width: 50px; height: 28px; background: var(--panel-soft); }
.switch--theme:hover { border-color: var(--sig); }
.switch--lang .switch__knob {
  position: absolute; top: 2px; left: 2px; width: 28px; height: 22px; border-radius: 999px;
  background: var(--sage-bg); transition: transform .38s cubic-bezier(.3,.85,.3,1);
}
html[data-lang="nl"] .switch--lang .switch__knob { transform: translateX(30px); }
.switch__flags { position: relative; display: flex; height: 100%; align-items: center; }
.switch__flag { flex: 1; display: grid; place-items: center; opacity: 0.45; transition: opacity .3s ease; }
.switch__flag svg { display: block; border-radius: 2px; overflow: hidden; }
html[data-lang="en"] .switch__flag--en, html[data-lang="nl"] .switch__flag--nl { opacity: 1; }
.switch--theme .switch__knob {
  position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 999px;
  background: var(--sig-strong); color: var(--sig-ink); display: grid; place-items: center;
  transition: transform .38s cubic-bezier(.3,.85,.3,1);
}
html[data-theme="light"] .switch--theme .switch__knob { transform: translateX(22px); }
.switch--theme svg { position: absolute; transition: opacity .3s ease; }
.icon-moon { opacity: 1; }
.icon-sun { opacity: 0; }
html[data-theme="light"] .icon-sun { opacity: 1; }
html[data-theme="light"] .icon-moon { opacity: 0; }

/* ==== Layout shell ==== */
.page { position: relative; z-index: 1; max-width: 1080px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 64px); }

.navbar {
  position: sticky; top: 0; z-index: 4; display: flex; align-items: center; gap: 17.6px; flex-wrap: wrap;
  padding: 17.6px clamp(14px, 3vw, 26px); margin: 8.8px calc(clamp(14px, 3vw, 26px) * -1) 0;
  border-radius: 999px; background: var(--readout-bg); backdrop-filter: blur(8px);
}
.navbar__brand {
  font-family: var(--font-heading); font-size: 19px; margin-right: auto; color: var(--ink);
  opacity: 0; transform: translateY(-6px); transition: opacity .45s ease, transform .45s ease;
}
.navbar__brand.is-visible { opacity: 1; transform: none; }
.navbar__link {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
}
.navbar__link:hover { color: var(--sig); text-decoration: none; }
.navbar__link--cta {
  color: var(--ink); border: 1px solid var(--line-strong); border-radius: 999px; padding: 9px 16px;
}
.navbar__link--cta:hover { border-color: var(--sig); color: var(--sig); }
.navbar__toggle {
  display: none; flex: none; width: 36px; height: 36px; align-items: center; justify-content: center;
  border: 1px solid var(--line-strong); border-radius: 999px; background: transparent; color: var(--ink);
  cursor: pointer; padding: 0;
}
.navbar__toggle:hover { border-color: var(--sig); color: var(--sig); }
.navbar__menu { display: flex; align-items: center; gap: 17.6px; flex-wrap: wrap; }

@media (max-width: 640px) {
  .navbar { flex-wrap: nowrap; }
  .navbar__toggle { display: flex; }
  .navbar__menu {
    display: none; position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 1;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: var(--readout-bg); border: 1px solid var(--line); border-radius: 20px;
    padding: 10px; backdrop-filter: blur(8px);
  }
  .navbar__menu.is-open { display: flex; }
  .navbar__link { padding: 11px 14px; border-radius: 12px; }
  .navbar__link:hover { background: var(--panel-soft); }
  .navbar__link--cta { text-align: center; border-color: var(--line); }
}

/* ==== Hero ==== */
.hero {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(24px, 4vw, 56px); align-items: center; padding: clamp(24px, 4vw, 52px) 0 clamp(32px, 5vw, 64px);
}
.hero__info { display: flex; flex-direction: column; gap: 17.6px; align-items: flex-start; }
.hero__name { font-size: clamp(42px, 6.6vw, 76px); line-height: 0.98; max-width: 13ch; }
.hero__subtitle { font-size: clamp(18px, 2.1vw, 23px); line-height: 1.35; max-width: 28ch; color: var(--ink); }
.hero__tagline { font-size: 16px; line-height: 1.6; max-width: 46ch; color: var(--muted); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 8.8px; }
.hero__portrait { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 260px; justify-self: end; }

/* ==== Buttons ==== */
.btn {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase;
  border-radius: 999px; padding: 13px 22px; text-decoration: none; display: inline-flex; align-items: center;
  justify-content: center; border: 0; cursor: pointer;
}
.btn--primary { background: var(--sig-strong); color: var(--sig-ink); }
.btn--primary:hover { background: var(--sig); text-decoration: none; }
.btn--outline { border: 1px solid var(--line-strong); color: var(--ink); background: transparent; }
.btn--outline:hover { border-color: var(--sage); color: var(--sage-ink); text-decoration: none; }
.btn--block { width: 100%; min-height: 46px; margin-top: 8.8px; }

/* ==== Photo slots / placeholders ==== */
.photo-slot { position: relative; overflow: hidden; border: 1px solid var(--line); }
.photo-slot img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-slot--circle { aspect-ratio: 1; border-radius: 999px; filter: var(--portrait-wash); }
.photo-slot--16-10 { aspect-ratio: 16 / 10; border-radius: 20px; }
.photo-slot--logo { aspect-ratio: 1; border-radius: 18px; width: clamp(52px, 8vw, 66px); height: clamp(52px, 8vw, 66px); flex: none; }
.photo-slot--logo.photo-slot--empty { border-style: dashed; border-color: var(--line-strong); padding: 9px; display: grid; place-items: center; }
.photo-slot__pattern { position: absolute; inset: 0; width: 100%; height: 100%; }
.photo-slot__pattern .ph-a { fill: var(--ph-a); }
.photo-slot__pattern .ph-b { fill: var(--ph-b); }
.photo-slot__caption {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--faint); margin-top: 8.8px; text-align: center;
}
.photo-slot--logo .photo-slot__caption { font-size: 9px; margin: 0; text-align: center; }

/* ==== Sections ==== */
.section { padding: clamp(48px, 8vw, 96px) 0; }
.section__heading { font-size: clamp(30px, 4.4vw, 46px); max-width: 24ch; margin: 0 0 clamp(28px, 4vw, 44px); }
.section__heading--route { max-width: 22ch; margin-bottom: clamp(32px, 5vw, 56px); }

/* ==== Segmented control (Education / Work) ==== */
.segmented {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px; margin: 0 0 clamp(26px, 4vw, 40px);
  border: 1px solid var(--line); border-radius: 999px; position: relative; background: var(--panel-soft);
}
.segmented__indicator {
  position: absolute; top: 4px; left: 4px; width: 0; height: calc(100% - 8px); border-radius: 999px;
  background: var(--sage-bg); transition: left .42s cubic-bezier(.3,.85,.3,1), width .42s cubic-bezier(.3,.85,.3,1);
}
.segmented__btn {
  position: relative; text-align: center; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--sage-ink); opacity: 0.5; background: transparent; border: 0;
  border-radius: 999px; padding: 9px 18px; cursor: pointer; transition: opacity .3s ease; white-space: nowrap;
}
.segmented__btn.is-active { opacity: 1; }

/* ==== Timeline ==== */
.timeline-track { position: relative; padding-left: clamp(44px, 7vw, 76px); }
.timeline-track[hidden] { display: none; }
.timeline-track__path { position: absolute; left: 0; top: 8px; bottom: 8px; width: clamp(30px, 5vw, 52px); height: calc(100% - 16px); overflow: visible; }
.timeline-track__path-base { fill: none; stroke: var(--line); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 5 7; vector-effect: non-scaling-stroke; }
.timeline-track__path-fill { fill: none; stroke: var(--sig); stroke-width: 2.5; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.timeline-track__list { display: flex; flex-direction: column; gap: clamp(28px, 4.5vw, 48px); }
.waypoint { position: relative; }
.waypoint__dot {
  position: absolute; left: calc(clamp(44px, 7vw, 76px) * -1 + clamp(30px, 5vw, 52px) * 0.5 - 8px); top: 10px;
  width: 16px; height: 16px; border-radius: 999px; background: var(--ground); border: 3px solid var(--line);
  transition: border-color .4s ease, background .4s ease, box-shadow .4s ease;
}
.waypoint__dot.is-active { border-color: var(--sig); background: var(--sig); box-shadow: 0 0 0 6px var(--sig-glow); }
.waypoint__row { display: flex; gap: clamp(14px, 2.2vw, 22px); align-items: flex-start; }
.waypoint__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8.8px; }
.waypoint__title { font-size: clamp(22px, 2.8vw, 30px); }
.waypoint__title--placeholder { color: var(--faint); }
.waypoint__desc { font-size: 17px; line-height: 1.6; max-width: 60ch; color: var(--muted); }
.waypoint__desc--placeholder {
  font-family: var(--font-mono); font-size: 14px; line-height: 1.6; color: var(--faint);
  border-left: 2px dashed var(--line); padding-left: 13.2px;
}
.waypoint--expandable { cursor: pointer; }
.waypoint__cta {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--sig); margin-top: 2px;
}
.waypoint--expandable:not(.is-open) .when-open { display: none; }
.waypoint--expandable.is-open .when-closed { display: none; }
.waypoint__detail { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .45s cubic-bezier(.3,.85,.3,1), opacity .35s ease; }
.waypoint--expandable.is-open .waypoint__detail { grid-template-rows: 1fr; opacity: 1; }
.waypoint__detail-inner { min-height: 0; overflow: hidden; }
.waypoint__long { font-size: 16px; line-height: 1.6; color: var(--muted); padding-top: 8.8px; max-width: 60ch; }

/* ==== Chips / tags ==== */
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-family: var(--font-mono); font-size: 11px; padding: 4px 11px; border-radius: 999px; }
.chip--sage { background: var(--sage-bg); color: var(--sage-ink); }
.chip--plain { font-size: 12px; padding: 5px 12px; border: 1px solid var(--line); color: var(--body); }
.chip--accent { font-size: 12px; padding: 5px 12px; background: var(--accent-bg); color: var(--sig-hi); }

/* ==== Projects ==== */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 17.6px; align-items: start; }
.projects-grid.has-open .project-card:not(.is-open) { display: none; }
.project-card {
  display: flex; flex-direction: column; gap: 8.8px; padding: 26.4px; border-radius: 28px;
  background: var(--panel); border: 1px solid var(--line); cursor: pointer; transition: border-color .3s ease;
}
.project-card:hover { border-color: var(--sig); }
.project-card.is-open { grid-column: 1 / -1; }
.project-card__title { font-size: 22px; }
.project-card__title--placeholder { color: var(--faint); }
.project-card__desc { font-size: 16px; line-height: 1.6; color: var(--muted); }
.project-card__desc--placeholder { font-family: var(--font-mono); font-size: 14px; line-height: 1.6; color: var(--faint); }
.project-card__cta { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--sig); margin-top: 8.8px; }
.project-card:not(.is-open) .when-open { display: none; }
.project-card.is-open .when-closed { display: none; }
.project-card__detail { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .45s cubic-bezier(.3,.85,.3,1), opacity .35s ease; }
.project-card.is-open .project-card__detail { grid-template-rows: 1fr; opacity: 1; }
.project-card__detail-inner { min-height: 0; overflow: hidden; }
.project-card__detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 17.6px; padding-top: 17.6px; border-top: 1px solid var(--line); margin-top: 17.6px; }
.project-card__long { font-family: var(--font-mono); font-size: 13px; line-height: 1.7; color: var(--faint); }
.project-figure { margin: 0; }

/* ==== Project photo gallery ==== */
.project-gallery { display: flex; flex-direction: column; gap: 8.8px; }
.project-gallery__stage { position: relative; }
.project-gallery__stage .project-gallery__img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .3s ease; pointer-events: none;
}
.project-gallery__stage .project-gallery__img.is-active { opacity: 1; pointer-events: auto; }
.project-gallery__nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 28px; height: 28px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--readout-bg); color: var(--ink);
  display: grid; place-items: center; cursor: pointer; font-size: 16px; line-height: 1; padding: 0;
}
.project-gallery__nav:hover { border-color: var(--sig); color: var(--sig); }
.project-gallery__nav--prev { left: 8px; }
.project-gallery__nav--next { right: 8px; }
.project-gallery__dots { display: flex; justify-content: center; gap: 6px; }
.project-gallery__dot { width: 6px; height: 6px; border-radius: 999px; background: var(--line-strong); border: 0; padding: 0; cursor: pointer; }
.project-gallery__dot.is-active { background: var(--sig); }

/* ==== Basecamp / van section ==== */
.basecamp {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: clamp(24px, 4vw, 48px);
  align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 32px; padding: clamp(26px, 4vw, 48px);
}
.basecamp__title { font-size: clamp(24px, 3.2vw, 34px); max-width: 20ch; margin-bottom: 13.2px; }
.basecamp__body { font-size: 17px; line-height: 1.6; max-width: 46ch; color: var(--muted); }
.basecamp__figure { margin: 0; }

/* ==== Kit ==== */
.kit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: clamp(24px, 4vw, 44px); }
.kit-group__heading { font-size: 18px; margin-bottom: 13.2px; }

/* ==== Contact ==== */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: clamp(28px, 5vw, 56px); }
.contact__blurb { font-size: 17px; line-height: 1.6; max-width: 40ch; color: var(--muted); margin: 17.6px 0; }
.contact__links { display: flex; flex-wrap: wrap; gap: 8.8px; }
.link-pill { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; border: 1px solid var(--line-strong); color: var(--ink); border-radius: 999px; padding: 11px 18px; }
.link-pill:hover { border-color: var(--sage); color: var(--sage-ink); text-decoration: none; }
.link-pill--text { border: 0; color: var(--sig); padding: 11px 8px; }
.link-row { display: flex; flex-wrap: wrap; gap: 6px; }
.link-pill--small { font-size: 11px; padding: 6px 13px; }
.link-pill--text:hover { color: var(--sig-hi); text-decoration: underline; }
.contact-form { display: flex; flex-direction: column; gap: 13.2px; background: var(--panel); border: 1px solid var(--line); border-radius: 32px; padding: clamp(22px, 3.5vw, 36px); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sage); }
.field input, .field textarea {
  font-family: inherit; font-size: 15px; padding: 8px 16px; color: var(--ink); background: var(--input-bg);
  border: 1px solid var(--line); border-radius: 999px; caret-color: var(--sig);
}
.field input { min-height: 44px; }
.field textarea { border-radius: 20px; padding: 12px 16px; resize: vertical; }
.field__note { font-family: var(--font-mono); font-size: 11px; color: var(--faint); margin: 0; }
.field__status { font-family: var(--font-mono); font-size: 12px; margin: 0; }
.field__status--ok { color: var(--sage); }
.field__status--error { color: var(--sig); }

/* ==== Footer ==== */
.site-footer {
  border-top: 1px solid var(--line); padding: 26.4px 0 35.2px; display: flex; flex-wrap: wrap; gap: 13.2px;
  justify-content: space-between; font-family: var(--font-mono); font-size: 12px; color: var(--faint);
}

/* ==== Scroll reveal ==== */
[data-reveal] { transition: opacity .6s ease, transform .6s cubic-bezier(.22,.7,.3,1); }
[data-reveal].is-hidden { opacity: 0; transform: translateY(14px); }

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