/* ============================================================
   Jelle Romijn — Portfolio
   Strak / dark / monochrome design system
   ============================================================ */

:root {
  /* palette — LIGHT warm paper default (almost no black) */
  --bg:          #f3eee3;
  --bg-2:        #ebe4d6;
  --bg-3:        #f7f3ea;
  --surface:     #faf7f0;
  --surface-2:   #efe8da;
  --fg:          #232017;
  --fg-dim:      #6b6454;
  --muted:       #9a917d;
  --line:        rgba(35, 32, 23, 0.12);
  --line-2:      rgba(35, 32, 23, 0.20);
  --accent:      #232017;
  --accent-ink:  #f3eee3;
  --contact-bg:  #ece2cd;
  /* warm paper for inverted panels */
  --paper:       #f4f1ea;
  --paper-2:     #ece7db;
  --ink:         #17150f;
  --ink-dim:     #5a554b;

  /* type — default "Neue" grotesk system (swapped by [data-type]) */
  --font-display: "Space Grotesk", "Hanken Grotesk", system-ui, sans-serif;
  --font-body:    "Hanken Grotesk", system-ui, -apple-system, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;
  --display-weight: 500;
  --display-tracking: -0.02em;

  /* layout */
  --container: 1240px;
  --gutter: clamp(20px, 5vw, 64px);
  --radius: 14px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---- tone variants: light (default in :root) / warm / deep ---- */
[data-tone="warm"] {
  --bg: #1d1912; --bg-2: #241f16; --bg-3: #181410;
  --surface: #2a241a; --surface-2: #332c20;
  --fg: #f4f1ea; --fg-dim: #aca598; --muted: #7d7567;
  --line: rgba(244, 241, 234, 0.11); --line-2: rgba(244, 241, 234, 0.20);
  --accent: #f4f1ea; --accent-ink: #1d1912; --contact-bg: var(--paper);
}
[data-tone="deep"] {
  --bg: #0d0c0a; --bg-2: #131210; --bg-3: #100f0d;
  --surface: #1a1814; --surface-2: #221f1a;
  --fg: #f4f1ea; --fg-dim: #a9a399; --muted: #726c61;
  --line: rgba(244, 241, 234, 0.10); --line-2: rgba(244, 241, 234, 0.18);
  --accent: #f4f1ea; --accent-ink: #0d0c0a; --contact-bg: var(--paper);
}

/* ---- type variant: Editorial (serif display) ---- */
[data-type="editorial"] {
  --font-display: "Instrument Serif", Georgia, serif;
  --display-weight: 400;
  --display-tracking: -0.005em;
}
/* ---- type variant: Mono (terminal display) ---- */
[data-type="mono"] {
  --font-display: "JetBrains Mono", ui-monospace, monospace;
  --display-weight: 500;
  --display-tracking: -0.04em;
}

/* ---- accent variants ---- */
[data-accent="clay"]   { --accent: #c8612f; --accent-ink: #fbf6ee; }
[data-accent="blue"]   { --accent: #5b8cff; --accent-ink: #06080f; }
[data-accent="green"]  { --accent: #4fd99a; --accent-ink: #04130c; }
[data-accent="orange"] { --accent: #ff7a45; --accent-ink: #1a0a04; }
[data-accent="lime"]   { --accent: #c8ff32; --accent-ink: #131a04; }

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* clip (not hidden) so the body does NOT become a scroll container —
     hidden would break position:sticky on the pinned section */
  overflow-x: clip;
}

::selection { background: var(--accent); color: var(--accent-ink); }

/* subtle film grain for depth — fixed overlay, never interactive */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ---------- shared atoms ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--line-2);
}

.display {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
  line-height: 0.98;
}

/* serif-italic accent flourish — always contrasts with the type system */
.ital {
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
  letter-spacing: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   STICKY STACKING — each section pins, the next slides up over it
   (gated behind data-stack="on")
   ============================================================ */
[data-stack="on"] main > section {
  position: sticky;
  top: 0;
  min-height: 100svh;
}
/* every stacked panel needs an OPAQUE background so it fully covers
   the pinned section beneath it as it rises */
[data-stack="on"] .hero { background: var(--bg); }
[data-stack="on"] .section:not(.section--panel) { background: var(--bg); }
[data-stack="on"] main > section {
  box-shadow: 0 -24px 60px -30px rgba(0,0,0,0.5);
}
[data-stack="on"] .hero { box-shadow: none; }
/* frozen / reduced-motion environments: behave like a normal page */
@media (prefers-reduced-motion: reduce) {
  [data-stack="on"] main > section { position: relative; min-height: 0; }
}

.section {
  position: relative;
  padding-block: clamp(80px, 13vh, 160px);
  border-top: 1px solid var(--line);
}
/* tonal rhythm — alternate panels so it isn't one flat black */
.section--panel { background: var(--bg-2); }
.section--panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(80% 120% at 100% 0%, color-mix(in srgb, var(--accent) 4%, transparent), transparent 55%);
  pointer-events: none;
}
.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: clamp(40px, 6vw, 72px);
}
.section__index {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--muted);
}
.section__title {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
  font-size: clamp(30px, 4.4vw, 52px);
  line-height: 1.02;
}

/* ---------- reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }
/* hard failsafe: instant visible, no transition (frozen/throttled environments) */
.reveal-done .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
.reveal-done .hero__title .ln > span { transform: none !important; transition: none !important; }
.reveal[data-d="1"] { transition-delay: 0.08s; }
.reveal[data-d="2"] { transition-delay: 0.16s; }
.reveal[data-d="3"] { transition-delay: 0.24s; }
.reveal[data-d="4"] { transition-delay: 0.32s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--line);
}
.nav__inner {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__brand {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 9px;
}
.nav__brand .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent);
  animation: pulse 2.6s var(--ease) infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); }
  70%  { box-shadow: 0 0 0 7px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav__links a {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--fg-dim);
  padding: 8px 14px;
  border-radius: 8px;
  white-space: nowrap;
  transition: color 0.25s, background 0.25s;
}
.nav__links a:hover { color: var(--fg); background: var(--surface); }
.nav__cta {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--fg) !important;
  border: 1px solid var(--line-2);
  margin-left: 8px;
}
.nav__cta:hover { background: var(--accent) !important; color: var(--accent-ink) !important; border-color: var(--accent); }
@media (max-width: 720px) {
  .nav__links a:not(.nav__cta) { display: none; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: 96px;
  padding-bottom: 64px;
  overflow: hidden;
}
/* subtle vignette + grid, not a gradient blob */
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 80% at 50% 0%, color-mix(in srgb, var(--accent) 6%, transparent), transparent 60%);
  opacity: 0.7;
  pointer-events: none;
}
.hero__grid {
  position: absolute;
  /* extend 20% beyond hero bounds so parallax drift never exposes a gap */
  top: -20%; left: 0; right: 0; bottom: -20%;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(110% 90% at 50% 10%, #000 25%, transparent 72%);
  mask-image: radial-gradient(110% 90% at 50% 10%, #000 25%, transparent 72%);
  opacity: 0.5;
  pointer-events: none;
  will-change: transform;
}
.hero__inner { position: relative; width: 100%; }

/* default + split: text left, portrait right */
[data-hero="left"] .hero__inner,
[data-hero="split"] .hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(0, 0.68fr);
  gap: clamp(36px, 5vw, 80px);
  align-items: center;
}
.hero__masthead { grid-column: 1 / -1; }
.hero__main { min-width: 0; }
@media (max-width: 900px) {
  [data-hero="left"] .hero__inner,
  [data-hero="split"] .hero__inner { grid-template-columns: 1fr; }
}

/* masthead strip — small structured meta across the top */
.hero__masthead {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 18px;
  margin-bottom: clamp(28px, 4vw, 52px);
  border-bottom: 1px solid var(--line);
}
.hero__masthead b { color: var(--fg); font-weight: 400; }
@media (max-width: 620px) { .hero__masthead span:nth-child(n+3) { display: none; } }

/* portrait aside */
.hero__aside { display: flex; flex-direction: column; gap: 16px; }
[data-hero="center"] .hero__aside { display: none; }
.hero__photo {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
}
.hero__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero__photo-tag {
  position: absolute;
  left: 12px; bottom: 12px;
  z-index: 3;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.03em;
  color: var(--fg);
  background: color-mix(in srgb, var(--bg) 50%, transparent);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  padding: 6px 11px;
  border-radius: 8px;
  border: 1px solid var(--line);
}
.hero__currently {
  display: flex;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: var(--fg-dim);
}
.hero__currently i {
  flex: none;
  margin-top: 5px;
  width: 7px; height: 7px; border-radius: 50%;
  background: #2bb673;
  animation: pulse 2.6s var(--ease) infinite;
}
.hero__currently b { color: var(--fg); font-weight: 400; }

/* rotating freelance seal — playful, pauses on hover */
.hero__seal {
  position: absolute;
  top: 8%;
  right: 4%;
  width: 132px;
  height: 132px;
  z-index: 3;
  color: var(--accent);
  pointer-events: auto;
}
.hero__seal-rot {
  transform-origin: 66px 66px;
  animation: spin 26s linear infinite;
}
.hero__seal:hover .hero__seal-rot { animation-play-state: paused; }
.hero__seal text {
  font-family: var(--font-mono);
  font-size: 9.4px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  fill: currentColor;
}
.hero__seal-arr {
  font-family: var(--font-display);
  font-size: 26px;
  fill: var(--accent);
  text-anchor: middle;
}
@media (prefers-reduced-motion: reduce) { .hero__seal-rot { animation: none; } }
@media (max-width: 760px) { .hero__seal { display: none; } }

.hero__status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-dim);
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 7px 14px;
  border-radius: 999px;
  white-space: nowrap;
  margin-bottom: 36px;
}
.hero__status .live {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.6s var(--ease) infinite;
}
.hero__title {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
  font-size: clamp(48px, 11.5vw, 168px);
  line-height: 0.9;
}
.hero__title .ln { display: block; overflow: hidden; }
.hero__title .ln > span {
  display: block;
  transform: translateY(112%);
  transition: transform 0.95s var(--ease);
}
.hero__title.in .ln > span { transform: none; }
.hero__title.in .ln:nth-child(2) > span { transition-delay: 0.1s; }
.hero__title .muted2 { color: var(--muted); }
@media (prefers-reduced-motion: reduce) {
  .hero__title .ln > span { transform: none; transition: none; }
}

.hero__meta {
  margin-top: clamp(32px, 5vw, 56px);
  display: flex;
  gap: clamp(28px, 6vw, 88px);
  flex-wrap: wrap;
  align-items: flex-start;
}
.hero__lead {
  max-width: 46ch;
  font-size: clamp(17px, 1.7vw, 21px);
  color: var(--fg-dim);
  line-height: 1.55;
}
.hero__lead b { color: var(--fg); font-weight: 500; }
.hero__facts {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.hero__fact {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--muted);
  display: flex;
  gap: 12px;
}
.hero__fact b { color: var(--fg); font-weight: 400; }

.hero__cta-row {
  margin-top: clamp(40px, 6vw, 64px);
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* hero layout variants */
[data-hero="center"] .hero__inner { text-align: center; }
[data-hero="center"] .hero__meta { justify-content: center; }
[data-hero="center"] .hero__cta-row { justify-content: center; }
[data-hero="center"] .hero__lead { margin-inline: auto; }

[data-hero="split"] .hero__meta { flex-direction: column; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.03em;
  padding: 14px 22px;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  color: var(--fg);
  transition: transform 0.25s var(--ease), background 0.25s, color 0.25s, border-color 0.25s;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn--primary:hover { background: color-mix(in srgb, var(--accent) 88%, #fff); }
.btn--ghost:hover { background: var(--surface); border-color: var(--line-2); }
.btn .arr { transition: transform 0.3s var(--ease); }
.btn:hover .arr { transform: translate(3px, -3px); }

/* ============================================================
   PINNED STATEMENT — stays put while content rises bottom→top
   ============================================================ */
.pin {
  /* height / position / overflow / z-index set inline on the section — see Statement component */
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  display: grid;
  place-items: center;
}
.pin__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(120% 90% at 50% 50%, #000 28%, transparent 78%);
  mask-image: radial-gradient(120% 90% at 50% 50%, #000 28%, transparent 78%);
  opacity: 0.4;
  pointer-events: none;
}
.pin__inner {
  position: relative;
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
  will-change: transform;
}
.pin__kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: clamp(24px, 4vw, 40px);
}
.pin__kicker .dot2 {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.6s var(--ease) infinite;
}
.pin__statement {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
  font-size: clamp(32px, 5.6vw, 84px);
  line-height: 1.05;
  max-width: 16ch;
  text-wrap: balance;
}
.pin__statement .dim { color: var(--muted); }
.pin__foot {
  margin-top: clamp(32px, 5vw, 56px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--fg-dim);
  border-top: 1px solid var(--line);
  padding-top: 20px;
  max-width: 680px;
}
.pin__hint { color: var(--muted); }
/* vertical progress rail — reinforces "you're scrolling but staying put" */
.pin__rail {
  position: absolute;
  right: clamp(14px, 2vw, 36px);
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: clamp(120px, 24vh, 240px);
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
}
.pin__rail i {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--accent);
  transform: scaleY(var(--p, 0));
  transform-origin: top;
}
@media (max-width: 760px) { .pin__rail { display: none; } }
/* reduced motion / frozen environments: fall back to a normal static section */
@media (prefers-reduced-motion: reduce) {
  .pin-wrap { height: auto !important; }
  .pin { position: relative !important; height: auto !important; overflow: visible !important; padding-block: clamp(80px, 13vh, 160px); }
  .pin__inner { transform: none !important; }
}

/* ============================================================
   ABOUT
   ============================================================ */
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 7vw, 96px);
  align-items: start;
}
@media (max-width: 860px) { .about__grid { grid-template-columns: 1fr; } }
.about__left { display: flex; flex-direction: column; gap: clamp(32px, 4vw, 52px); }
/* "how I work" block */
.about__approach {
  border-top: 1px solid var(--line);
  padding-top: 26px;
  max-width: 440px;
}
.about__approach-h {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.about__approach ol {
  list-style: none;
  margin: 18px 0 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.about__approach li {
  display: flex;
  gap: 14px;
  font-size: 16px;
  line-height: 1.45;
  color: var(--fg);
}
.about__approach li span {
  flex: none;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  padding-top: 3px;
}
.about__sign {
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-size: 27px;
  color: var(--fg-dim);
}
.about__big {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
  font-size: clamp(26px, 3.2vw, 40px);
  line-height: 1.16;
  text-wrap: balance;
}
.about__big .dim { color: var(--muted); }
.about__col p { color: var(--fg-dim); margin-bottom: 20px; max-width: 52ch; }
.about__col p b { color: var(--fg); font-weight: 500; }
.about__list {
  margin-top: 36px;
  border-top: 1px solid var(--line);
}
.about__li {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 2px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  transition: padding-left 0.3s var(--ease), color 0.3s;
}
.about__li:hover { padding-left: 12px; }
.about__li span:first-child { color: var(--fg); }
.about__li span:last-child { color: var(--muted); text-align: right; }

/* ============================================================
   WORK / CAROUSEL
   ============================================================ */
.work__head-extra {
  display: flex;
  align-items: center;
  gap: 16px;
}
.work__count {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.car {
  position: relative;
  margin-top: 8px;
}
.car__track {
  display: flex;
  gap: clamp(18px, 2.2vw, 28px);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-block: 6px;
  padding-inline: var(--gutter);
  margin-inline: calc(-1 * var(--gutter));
  scrollbar-width: none;
  cursor: grab;
}
.car__track::-webkit-scrollbar { display: none; }
.car__track.dragging { cursor: grabbing; scroll-snap-type: none; }
.car__track.dragging * { pointer-events: none; }

.card {
  scroll-snap-align: start;
  flex: 0 0 clamp(280px, 33%, 420px);
  min-width: 0;
  transition: transform 0.45s var(--ease);
}
.car__track:not(.dragging) .card:hover { transform: translateY(-7px) rotate(-0.7deg); }
@media (max-width: 860px) { .card { flex-basis: 80%; } }

.card__media {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  transition: border-color 0.35s, box-shadow 0.35s;
}
.car__track:not(.dragging) .card:hover .card__media {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  box-shadow: 0 20px 44px color-mix(in srgb, var(--fg) 14%, transparent);
}
.card__star {
  position: absolute;
  top: 14px; right: 14px;
  z-index: 3;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--accent-ink);
  background: var(--accent);
  padding: 5px 10px 5px 8px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transform: rotate(2.5deg);
}
.card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}
.card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(180deg, transparent 55%, color-mix(in srgb, var(--fg) 22%, transparent));
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
}
.card:hover .card__media::after { opacity: 1; }
.modal-cover {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  margin-bottom: 22px;
}
.card__num {
  position: absolute;
  top: 14px; left: 14px;
  z-index: 3;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--fg);
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  padding: 5px 9px;
  border-radius: 7px;
  border: 1px solid var(--line);
}
.card__overlay {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 3;
  padding: 16px;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
}
.card__open {
  width: 42px; height: 42px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent);
  color: var(--accent-ink);
  transform: scale(0.6);
  opacity: 0;
  transition: transform 0.4s var(--ease), opacity 0.4s var(--ease);
}
.card:hover .card__open { transform: none; opacity: 1; }

.card__body {
  padding: 18px 2px 2px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.card__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}
.card__title {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
  font-size: clamp(21px, 2.4vw, 27px);
  line-height: 1.05;
}
.card__year {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
}
.card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--fg-dim);
  border: 1px solid var(--line);
  padding: 5px 10px;
  border-radius: 999px;
}

.car__controls {
  display: inline-flex;
  gap: 8px;
}
.car__btn {
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--fg);
  display: grid; place-items: center;
  transition: background 0.25s, color 0.25s, transform 0.2s var(--ease), opacity 0.25s;
}
.car__btn:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.car__btn:active { transform: scale(0.92); }
.car__btn:disabled { opacity: 0.32; pointer-events: none; }

.car__progress {
  margin-top: 28px;
  height: 2px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
}
.car__progress i {
  display: block;
  height: 100%;
  width: 30%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.2s var(--ease), transform 0.2s var(--ease);
}

/* ---- pinned horizontale projectsectie ---- */
/* De sectie krijgt via inline-style een hoogte van 100vh + scrollafstand.
   De binnenste laag 'pint' (sticky) en de track verschuift horizontaal. */
.workpin.section { padding-block: 0; }
/* Doe NIET mee aan het sectie-stapeleffect: dat zou de sectie zelf al op
   top:0 vastzetten, waardoor de horizontale pin-berekening niet meer klopt.
   Deze sectie scrollt normaal; de binnenste sticky verzorgt de pin. */
[data-stack="on"] main > section.workpin { position: relative; min-height: 0; box-shadow: none; }
.workpin__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(14px, 2.5vh, 28px);
  overflow: hidden;
  padding-block: clamp(16px, 4vh, 44px);
  box-sizing: border-box;
}
.workpin__viewport {
  flex: 0 1 auto;
  display: flex;
  align-items: center;
  overflow: hidden;
  min-height: 0;
}
.workpin__track {
  display: flex;
  gap: clamp(18px, 2.2vw, 28px);
  padding-inline: var(--gutter);
  will-change: transform;
}
/* In gepinde modus bepaalt de hoogte de kaartmaat; media vult de rest. */
.workpin .card {
  display: flex;
  flex-direction: column;
  height: min(66vh, 600px);
  /* Bredere kaarten → minder passen tegelijk → langere horizontale scroll,
     zodat je echt door elk project heen gaat voordat de pagina verder gaat. */
  flex: 0 0 clamp(300px, 42vw, 600px);
}
.workpin .card__media {
  flex: 1 1 auto;
  aspect-ratio: auto;
  min-height: 0;
}
.workpin .card__body { flex: 0 0 auto; }
.workpin .car__progress { margin-top: 0; }
@media (max-width: 860px) {
  .workpin .card { flex-basis: 78%; height: min(68vh, 540px); }
}
/* Respecteer 'minder beweging': geen pin-hijack, gewoon horizontaal scrollen. */
@media (prefers-reduced-motion: reduce) {
  .workpin.section { height: auto !important; padding-block: 96px; }
  .workpin__sticky { position: static; height: auto; }
  .workpin__viewport { overflow-x: auto; }
  .workpin__track { transform: none !important; }
}

/* ============================================================
   SKILLS
   ============================================================ */
.skills__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(28px, 4vw, 56px);
}
@media (max-width: 820px) { .skills__grid { grid-template-columns: 1fr; } }
.skillcol h4 {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.skillcol ul { list-style: none; }
.skillcol li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  font-size: 16px;
  color: var(--fg);
  border-bottom: 1px solid var(--line);
  transition: color 0.25s, padding-left 0.3s var(--ease);
}
.skillcol li:hover { padding-left: 8px; }
.skillcol li small {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.marquee {
  margin-top: clamp(48px, 7vw, 88px);
  border-block: 1px solid var(--line);
  padding-block: clamp(20px, 3vw, 34px);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__row {
  display: flex;
  gap: 0;
  width: max-content;
  animation: scrollx 32s linear infinite;
}
.marquee:hover .marquee__row { animation-play-state: paused; }
.marquee__item {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
  font-size: clamp(24px, 3.4vw, 44px);
  color: var(--fg-dim);
  padding-inline: clamp(20px, 3vw, 44px);
  display: inline-flex;
  align-items: center;
  gap: clamp(20px, 3vw, 44px);
  white-space: nowrap;
}
.marquee__item::after { content: "✦"; color: var(--muted); font-size: 0.5em; }
@keyframes scrollx { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee__row { animation: none; } }

/* ============================================================
   CONTACT — inverted warm-paper panel
   ============================================================ */
.contact--light {
  background: var(--contact-bg);
  color: var(--ink);
  border-top: 1px solid var(--line);
  padding-bottom: 0;
}
.contact--light::selection { background: var(--ink); color: var(--paper); }
.contact__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding-bottom: clamp(40px, 6vw, 72px);
}
.contact__top .section__index { color: var(--ink-dim); }
.contact__clock {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--ink-dim);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-variant-numeric: tabular-nums;
}
.contact__clock-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #2bb673;
  box-shadow: 0 0 0 0 rgba(43,182,115,.5);
  animation: pulse 2.6s var(--ease) infinite;
}
.contact__intro {
  font-family: var(--font-mono);
  font-size: clamp(13px, 1.4vw, 15px);
  letter-spacing: 0.02em;
  color: var(--ink-dim);
  margin-bottom: 14px;
}
.contact__mail {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.1em;
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  letter-spacing: -0.03em;
  font-size: clamp(32px, 6.4vw, 92px);
  line-height: 0.96;
  color: var(--ink);
  overflow-wrap: anywhere;
  position: relative;
}
.contact__mail::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0.04em;
  width: 100%; height: 0.04em;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease);
}
.contact__mail:hover::after { transform: scaleX(1); }
.contact__mail-arr {
  font-size: 0.5em;
  transition: transform 0.3s var(--ease);
}
.contact__mail:hover .contact__mail-arr { transform: translate(0.12em, -0.12em); }

.contact__meta {
  margin-top: clamp(48px, 7vw, 88px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: color-mix(in srgb, var(--ink) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  border-radius: var(--radius);
  overflow: hidden;
}
@media (max-width: 720px) { .contact__meta { grid-template-columns: 1fr; } }
.cmeta {
  background: var(--paper);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cmeta small {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.cmeta b {
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
}

.contact__bottom {
  margin-top: clamp(40px, 6vw, 64px);
  display: flex;
  flex-wrap: wrap;
  gap: clamp(24px, 5vw, 64px);
  align-items: flex-end;
  justify-content: space-between;
}
.contact__note { max-width: 44ch; color: var(--ink-dim); font-size: clamp(16px, 1.5vw, 19px); }
.socials { display: flex; gap: 10px; flex-wrap: wrap; }
.socials a {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.03em;
  color: var(--fg-dim);
  border: 1px solid var(--line-2);
  padding: 11px 18px;
  border-radius: 10px;
  transition: color 0.25s, background 0.25s, transform 0.2s var(--ease);
}
.socials a:hover { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
/* ink variant on the paper panel */
.socials--ink a { color: var(--ink); border-color: color-mix(in srgb, var(--ink) 22%, transparent); }
.socials--ink a:hover { color: var(--paper); background: var(--ink); border-color: var(--ink); }

/* ---------- footer ---------- */
.foot {
  background: var(--bg);
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-block: 36px;
  margin-top: clamp(64px, 10vw, 130px);
}
.foot__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.03em;
  color: var(--muted);
}
.foot__inner a:hover { color: var(--fg); }

/* back-to-top progress ring scrubbed in JS via --p */

/* ============================================================
   PROJECT MODAL — BOTTOM SHEET
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0, 0, 0, 0.48);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: flex-end;
  animation: modal-bg-in 0.3s var(--ease) both;
}
@keyframes modal-bg-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.modal-drawer {
  width: min(480px, 100vw);
  height: 100%;
  background: var(--surface);
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modal-slide-in 0.4s var(--ease) both;
}
@keyframes modal-slide-in {
  from { transform: translateX(100%); }
  to   { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .modal-overlay { animation: none; }
  .modal-drawer  { animation: none; }
}

.modal-handle { display: none; }

.modal-header {
  flex: none;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 28px 24px;
  border-bottom: 1px solid var(--line);
}
.modal-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 6px;
}
.modal-title {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.05;
}
.modal-year {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.modal-close {
  flex: none;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  color: var(--fg-dim);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 14px;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.modal-close:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

.modal-body {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  padding: 28px 28px 32px;
  display: flex;
  flex-direction: column;
}

.modal-cols { display: contents; }
.modal-info { display: contents; }
.modal-sidebar { display: contents; }

.modal-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.modal-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.modal-desc {
  color: var(--fg-dim);
  font-size: 15px;
  line-height: 1.65;
}

/* link buttons */
.modal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.modal-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.03em;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  color: var(--fg-dim);
  background: var(--surface-2);
  transition: color 0.25s, background 0.25s, border-color 0.25s;
  white-space: nowrap;
}
.modal-link:hover { color: var(--fg); background: var(--bg-2); border-color: var(--fg-dim); }
.modal-link--accent { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.modal-link--accent:hover { opacity: 0.82; color: var(--accent-ink); }

/* website preview thumbnail */
.site-preview {
  display: block;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  transition: box-shadow 0.3s var(--ease), border-color 0.3s;
  text-decoration: none;
}
.site-preview:hover {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  box-shadow: 0 8px 24px color-mix(in srgb, var(--fg) 10%, transparent);
}
.site-preview__chrome {
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  padding: 7px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.site-preview__dots {
  display: flex;
  gap: 4px;
  flex: none;
}
.site-preview__dots i {
  display: block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--line-2);
}
.site-preview__bar {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.03em;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 2px 8px;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.site-preview__body {
  aspect-ratio: 16 / 9;
  background: var(--surface-2);
  overflow: hidden;
}
.site-preview__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
  transition: transform 0.4s var(--ease);
}
.site-preview:hover .site-preview__img { transform: scale(1.03); }
.site-preview__loading {
  width: 100%; height: 100%;
  display: grid;
  place-items: center;
  background: var(--surface-2);
}
.site-preview__loading i {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid var(--line-2);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}
.site-preview__placeholder {
  width: 100%; height: 100%;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}
