/* ==========================================================================
   lukasvarga.com — Design System
   Eco-brutalist, modern, tech-oriented. Light + dark theme.
   --------------------------------------------------------------------------
   HOW TO EDIT:
   - Raw palette + LIGHT theme tokens live in :root below.
   - DARK theme tokens live in [data-theme="dark"] right after.
   - Components only ever use semantic tokens (--bg, --ink, --border, ...),
     so adjusting a theme = editing one block.
   ========================================================================== */

/* ---------- 0. Fonts (self-hosted) ---------- */
@font-face {
  font-family: "Space Grotesk";
  src: url("../assets/fonts/space-grotesk-v22-latin-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/inter-v20-latin-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/inter-v20-latin-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../assets/fonts/ibm-plex-mono-v20-latin-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../assets/fonts/ibm-plex-mono-v20-latin-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- 1. Design tokens ---------- */
:root {
  /* Raw palette (never used directly by components) */
  --concrete: #4A4A48;
  --olive: #6A8F3A;
  --sand: #C9C7C5;
  --light-olive: #A3B18A;
  --slate: #2F2F2F;
  --cream: #F7F6F2;
  --clay: #B08968;
  --dust-green: #CCD5AE;
  --steel: #7D8590;
  --pale-stone: #EDEDE9;

  /* ===== LIGHT THEME (default) ===== */
  --bg: var(--cream);                 /* page background */
  --bg-alt: var(--pale-stone);        /* alternating sections */
  --surface: var(--cream);            /* cards, buttons, inputs */
  --ink: var(--slate);                /* primary text */
  --ink-soft: var(--concrete);        /* secondary text */
  --muted: var(--steel);              /* tertiary text, labels */
  --accent: var(--olive);             /* links, highlights */
  --accent-strong: var(--olive);      /* filled accent surfaces (btn primary) */
  --accent-soft: var(--light-olive);
  --accent-tint: var(--dust-green);   /* tinted chips/strips */
  --accent-tint-ink: var(--slate);
  --border: var(--slate);
  --line-soft: var(--sand);           /* hairlines, timeline spine */
  --shadow-ink: var(--slate);         /* brutal shadow color */
  --contrast-bg: var(--slate);        /* dark sections + footer */
  --contrast-ink: var(--cream);
  --contrast-soft: var(--sand);
  --contrast-line: var(--concrete);
  --btn-strong-bg: var(--slate);      /* .btn--dark */
  --btn-strong-ink: var(--cream);
  --btn-strong-hover: var(--concrete);

  /* Typography */
  --font-display: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;

  /* Scale */
  --step-0: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --step-1: clamp(1.25rem, 1.1rem + 0.75vw, 1.6rem);
  --step-2: clamp(1.6rem, 1.3rem + 1.5vw, 2.4rem);
  --step-3: clamp(2.2rem, 1.6rem + 3vw, 4rem);
  --step-4: clamp(2.8rem, 1.8rem + 5vw, 6rem);

  --space: clamp(1rem, 2vw, 1.5rem);
  --section-pad: clamp(4rem, 10vw, 8rem);
  --radius: 2px;
  --line: 2px solid var(--border);
  --shadow-brutal: 6px 6px 0 var(--shadow-ink);
  --shadow-brutal-sm: 3px 3px 0 var(--shadow-ink);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  color-scheme: light;
}

/* ===== DARK THEME =====
   Hand-tuned, not inverted. Backgrounds come from Dark Slate / Warm Concrete,
   text from Cream / Sand, accents shift to Light Olive & Dust Green for
   contrast on dark ground. A few shades (#262625, #3B3B39, #9BA1AA, #55613A)
   are derived from the palette to keep sufficient contrast — documented here
   on purpose. */
[data-theme="dark"] {
  --bg: var(--slate);
  --bg-alt: #2A2A29;                  /* slate, one step deeper */
  --surface: #3B3B39;                 /* slate→concrete midpoint */
  --ink: var(--cream);
  --ink-soft: var(--sand);
  --muted: #9BA1AA;                   /* steel, lightened for contrast */
  --accent: var(--light-olive);
  --accent-strong: var(--olive);
  --accent-soft: var(--dust-green);
  --accent-tint: #55613A;             /* olive, deepened for chip fills */
  --accent-tint-ink: var(--cream);
  --border: var(--sand);
  --line-soft: var(--concrete);
  --shadow-ink: #1E1E1D;
  --contrast-bg: #262625;             /* darker-than-bg panels + footer */
  --contrast-ink: var(--cream);
  --contrast-soft: var(--sand);
  --contrast-line: var(--concrete);
  --btn-strong-bg: var(--cream);
  --btn-strong-ink: var(--slate);
  --btn-strong-hover: var(--sand);

  color-scheme: dark;
}

/* Smooth theme switch: JS adds .theme-switching to <html> for ~400ms */
html.theme-switching *,
html.theme-switching *::before,
html.theme-switching *::after {
  transition: background-color 0.35s ease, color 0.35s ease,
    border-color 0.35s ease, box-shadow 0.35s ease, fill 0.35s ease !important;
}

/* ---------- 2. Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Grain overlay for the eco-brutalist texture */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}
[data-theme="dark"] body::after { filter: invert(1); opacity: 0.05; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--ink);
}

h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }

p { max-width: 65ch; }
a { color: inherit; }
img { max-width: 100%; display: block; }

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

/* ---------- 3. Layout helpers ---------- */
.container {
  width: min(100% - 2.5rem, 1200px);
  margin-inline: auto;
}

.section { padding-block: var(--section-pad); position: relative; }
.section--alt { background: var(--bg-alt); border-top: var(--line); border-bottom: var(--line); }
.section--dark { background: var(--contrast-bg); color: var(--contrast-ink); }
.section--dark h1, .section--dark h2, .section--dark h3, .section--dark h4 { color: var(--contrast-ink); }

.grid-2 { display: grid; gap: calc(var(--space) * 2); grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); align-items: center; }
.grid-3 { display: grid; gap: var(--space); grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }

/* Mono label — the small tag above headings */
.kicker {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.2rem;
}
.kicker::before { content: ""; width: 2rem; height: 2px; background: var(--accent); }
.section--dark .kicker { color: var(--dust-green); }
.section--dark .kicker::before { background: var(--dust-green); }

.lead { font-size: var(--step-1); line-height: 1.45; color: var(--ink-soft); }
.section--dark .lead { color: var(--contrast-soft); }

/* ---------- 4. Cursor-following background ---------- */
#blob-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

/* Custom cursor dot (desktop only) */
.cursor-dot {
  position: fixed;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--olive);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.25s var(--ease), height 0.25s var(--ease), background 0.25s;
  mix-blend-mode: multiply;
}
[data-theme="dark"] .cursor-dot { mix-blend-mode: screen; background: var(--light-olive); }
.cursor-dot.is-hovering { width: 44px; height: 44px; background: var(--light-olive); opacity: 0.65; }
@media (hover: none), (pointer: coarse) { .cursor-dot { display: none; } }

/* ---------- 5. Navigation ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  -webkit-backdrop-filter: blur(12px); /* iOS Safari */
  backdrop-filter: blur(12px);
  border-bottom: var(--line);
  transition: transform 0.4s var(--ease);
}
.site-header.is-hidden { transform: translateY(-100%); }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 4.25rem;
}

.nav__logo {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  letter-spacing: -0.02em;
}
.nav__logo span { color: var(--accent); }

.nav__actions { display: flex; align-items: center; gap: 0.9rem; }

.nav__links { display: flex; gap: 2rem; list-style: none; }

.nav__link {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  position: relative;
  padding-block: 0.3rem;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease);
}
.nav__link:hover::after, .nav__link[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.nav__link[aria-current="page"] { color: var(--accent); }

.nav__toggle {
  display: none;
  background: none;
  border: var(--line);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.45rem 0.9rem;
  cursor: pointer;
  text-transform: uppercase;
}

/* Language switcher — EN / DE, integrated into the header */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
}
.lang-switch__opt {
  text-decoration: none;
  padding: 0.5rem 0.25rem; /* generous tap target */
  color: var(--muted);
  position: relative;
  transition: color 0.2s;
}
.lang-switch__opt::after {
  content: "";
  position: absolute;
  left: 0.25rem; right: 0.25rem; bottom: 0.3rem;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.3s var(--ease);
}
.lang-switch__opt[aria-current="true"] { color: var(--accent); font-weight: 700; }
.lang-switch__opt[aria-current="true"]::after { transform: scaleX(1); }
.lang-switch__opt:hover { color: var(--ink); }
.lang-switch__sep { color: var(--line-soft); user-select: none; }

/* Very narrow screens: tighten the header so logo + EN/DE + toggles fit */
@media (max-width: 400px) {
  .nav__actions { gap: 0.35rem; }
  .nav__logo { font-size: 0.92rem; }
  .lang-switch { font-size: 0.75rem; }
}

/* Theme toggle — minimal, borderless sun/moon morph */
.theme-toggle {
  width: 2.75rem; height: 2.75rem; /* ≥44px tap target */
  border: none;
  background: transparent;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  transition: transform 0.2s var(--ease);
}
.theme-toggle:hover { transform: translateY(-1px); }
.theme-toggle:hover .theme-toggle__dot { transform: scale(1.15); }
[data-theme="dark"] .theme-toggle:hover .theme-toggle__dot { transform: rotate(-30deg) scale(1.15); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-toggle__dot {
  width: 0.85rem; height: 0.85rem;
  border-radius: 50%;
  background: var(--ink);
  position: relative;
  transition: background 0.35s var(--ease), transform 0.45s var(--ease), box-shadow 0.35s var(--ease);
}
/* Sun rays (light mode) */
.theme-toggle__dot::before {
  content: "";
  position: absolute;
  inset: -0.32rem;
  border-radius: 50%;
  border: 2px dotted var(--ink);
  opacity: 0.55;
  transition: opacity 0.3s;
}
/* Moon (dark mode): hollow crescent via inset shadow */
[data-theme="dark"] .theme-toggle__dot {
  background: transparent;
  box-shadow: inset -0.3rem -0.12rem 0 0 var(--ink);
  transform: rotate(-30deg);
}
[data-theme="dark"] .theme-toggle__dot::before { opacity: 0; }

@media (max-width: 760px) {
  .nav__toggle { display: block; padding: 0.6rem 1rem; }
  /* MOBILE MENU — the closed state must never paint inside the header bar.
     (The old translateY(-110%) + z-index:-1 approach parked the menu's bottom
     edge behind the translucent header, which showed as a dark bar crossing
     the logo and toggles.) Hidden = small offset + fade, gated by visibility. */
  .nav__links {
    position: fixed;
    inset: 4.25rem 0 auto 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-bottom: var(--line);
    padding: 0.5rem 1.25rem 1rem;
    max-height: calc(100dvh - 4.25rem);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px);
    transition: transform 0.35s var(--ease), opacity 0.3s ease, visibility 0s 0.35s;
  }
  .nav__links.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    transition: transform 0.35s var(--ease), opacity 0.3s ease, visibility 0s 0s;
  }
  .nav__links li { border-bottom: 1px solid var(--line-soft); }
  .nav__links li:last-child { border-bottom: none; }
  .nav__link { display: block; padding: 0.95rem 0; font-size: 1rem; }
}

/* ---------- 6. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
  padding: 0.9rem 1.7rem;
  border: var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  position: relative;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s;
  box-shadow: var(--shadow-brutal-sm);
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--shadow-ink); }
.btn:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--shadow-ink); }

.btn--primary { background: var(--accent-strong); color: var(--cream); }
.btn--primary:hover { background: var(--accent-soft); color: var(--slate); }
.btn--dark { background: var(--btn-strong-bg); color: var(--btn-strong-ink); }
.btn--dark:hover { background: var(--btn-strong-hover); }
.btn .arrow { transition: transform 0.25s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* ---------- 7. Cards ---------- */
.card {
  border: var(--line);
  background: var(--surface);
  color: var(--ink);
  padding: 2rem;
  position: relative;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
/* Hover lift only on devices with real hover — prevents "sticky hover" on
   touch, where a tapped card would stay lifted. Touch gets :active feedback. */
@media (hover: hover) {
  .card:hover { transform: translate(-3px, -3px); box-shadow: var(--shadow-brutal); }
}
.card:active { transform: translate(-2px, -2px); box-shadow: var(--shadow-brutal-sm); }
.card__icon {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--cream);
  background: var(--olive);
  display: inline-block;
  padding: 0.35rem 0.7rem;
  margin-bottom: 1.25rem;
}
.card--clay .card__icon { background: var(--clay); color: var(--slate); }
.card--steel .card__icon { background: var(--steel); color: var(--slate); }
.card h3, .card h4 { margin-bottom: 0.75rem; }
.card p { font-size: 0.95rem; color: var(--ink-soft); }
/* Cards sitting inside dark sections keep their own surface — works in both themes.
   The default slate shadow is invisible on the dark ground, so hover uses an
   olive offset shadow to make the interaction clearly visible. */
.section--dark .card { box-shadow: none; }
@media (hover: hover) {
  .section--dark .card:hover {
    transform: translate(-3px, -3px);
    box-shadow: 6px 6px 0 var(--accent-soft);
  }
}
.section--dark .card:active { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--accent-soft); }

/* ---------- 8. Hero ---------- */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: 4.25rem;
  position: relative;
}
.hero__tag {
  font-family: var(--font-mono);
  border: var(--line);
  display: inline-block;
  padding: 0.4rem 0.9rem;
  font-size: 0.8rem;
  margin-bottom: 2rem;
  background: var(--accent-tint);
  color: var(--accent-tint-ink);
}
.hero h1 .accent { color: var(--accent); display: inline-block; }
.hero__sub { margin-top: 1.75rem; margin-bottom: 2.5rem; }
.hero__ctas { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero__scroll {
  position: absolute;
  bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  animation: bob 2.4s ease-in-out infinite;
}
@keyframes bob { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }

/* MOBILE HERO — when the columns stack, forcing 100svh + vertical centering
   leaves the portrait flush against the section end (its offset shadow bled
   into the marquee below, and the reveal animation slid it across the
   boundary). Natural height + explicit bottom padding + a capped portrait
   keeps clear space between hero and marquee. */
@media (max-width: 880px) {
  .hero {
    min-height: auto;
    padding-top: calc(4.25rem + clamp(2.5rem, 9vw, 4.5rem));
    padding-bottom: 3.5rem;
  }
  .hero__scroll { display: none; }
  .hero .ph--portrait { max-width: min(75vw, 340px); margin-inline: auto; }
}

/* ---------- 9. Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.12s; }
.reveal[data-delay="2"] { transition-delay: 0.24s; }
.reveal[data-delay="3"] { transition-delay: 0.36s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__scroll { animation: none; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ---------- 10. Timeline (interactive accordion) ---------- */
.timeline { position: relative; padding-left: 2.5rem; }
.timeline::before {
  content: "";
  position: absolute;
  left: 8px; top: 6px; bottom: 6px;
  width: 2px;
  background: var(--line-soft);
}
.timeline__item { position: relative; padding-bottom: 2.5rem; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item::before {
  content: "";
  position: absolute;
  left: -2.5rem; top: 6px;
  width: 18px; height: 18px;
  background: var(--accent-strong);
  border: var(--line);
  transition: transform 0.25s var(--ease), background 0.25s;
}
.timeline__item:hover::before, .timeline__item.is-open::before { transform: rotate(45deg); background: var(--clay); }

/* Clickable header (whole collapsed row) */
.timeline__head {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.timeline__head:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.timeline__date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.timeline__item h4 { margin: 0.35rem 0; transition: color 0.2s; }
.timeline__head:hover h4 { color: var(--accent); }
.timeline__org { font-weight: 600; color: var(--accent); font-size: 0.95rem; }

/* "Details" affordance with plus/cross morph */
.timeline__more {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
}
.timeline__plus { position: relative; width: 0.85rem; height: 0.85rem; transition: transform 0.35s var(--ease); }
.timeline__plus::before, .timeline__plus::after {
  content: "";
  position: absolute;
  background: currentColor;
  top: 50%; left: 0;
  width: 100%; height: 2px;
  margin-top: -1px;
}
.timeline__plus::after { transform: rotate(90deg); }
.timeline__item.is-open .timeline__plus { transform: rotate(45deg); }
.timeline__more .timeline__more-label::after { content: "Details"; }
.timeline__item.is-open .timeline__more-label::after { content: "Close"; }

/* Expandable panel (CSS grid-rows animation — smooth, no JS height math) */
.timeline__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.5s var(--ease);
}
.timeline__panel > div { overflow: hidden; }
.timeline__item.is-open .timeline__panel { grid-template-rows: 1fr; }

.timeline__detail {
  padding-top: 1.1rem;
  display: grid;
  gap: 1rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.timeline__label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  display: block;
  margin-bottom: 0.3rem;
}
.timeline__detail ul { list-style: square; padding-left: 1.2rem; display: grid; gap: 0.35rem; }
.timeline__detail ul ::marker { color: var(--accent); }
/* Tighter spine on small screens — reclaims ~8px of content width */
@media (max-width: 600px) {
  .timeline { padding-left: 2rem; }
  .timeline__item::before { left: -2rem; width: 15px; height: 15px; }
}
.timeline__fun {
  border-left: 3px solid var(--clay);
  padding: 0.2rem 0 0.2rem 0.9rem;
  color: var(--ink-soft);
}

/* ---------- 11. Skill tags (interactive) ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 0.6rem; list-style: none; }
.tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  border: 1.5px solid var(--ink-soft);
  color: var(--ink);
  padding: 0.4rem 0.85rem;
  background: var(--bg-alt);
  transition: background 0.2s, color 0.2s, transform 0.2s var(--ease);
  cursor: pointer;
}
@media (hover: hover) {
  .tag:hover { background: var(--accent-strong); color: var(--cream); transform: translateY(-2px); }
}
.tag.is-active { background: var(--accent-strong); color: var(--cream); border-color: var(--accent-strong); }
.tag:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
/* Comfortable tap targets on touch devices */
@media (pointer: coarse) {
  .tag { padding: 0.6rem 1rem; }
}

/* Info panel that expands under a tag group */
.tag-info {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 0.4s var(--ease), opacity 0.35s;
}
.tag-info.is-open { grid-template-rows: 1fr; opacity: 1; }
.tag-info > div { overflow: hidden; }
.tag-info__box {
  margin-top: 1rem;
  border: var(--line);
  border-left: 6px solid var(--accent-strong);
  background: var(--surface);
  padding: 1rem 1.25rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.tag-info__name {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  display: block;
  margin-bottom: 0.25rem;
}

/* ---------- 12. Image placeholders ---------- */
.ph {
  border: var(--line);
  background:
    repeating-linear-gradient(45deg, transparent, transparent 12px,
      color-mix(in srgb, var(--line-soft) 45%, transparent) 12px,
      color-mix(in srgb, var(--line-soft) 45%, transparent) 14px),
    var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
  padding: 1rem;
  aspect-ratio: 4 / 3;
  box-shadow: var(--shadow-brutal);
}
.ph--portrait { aspect-ratio: 3 / 4; }
.ph--square { aspect-ratio: 1; }
.ph--wide { aspect-ratio: 21 / 9; }
.profile-photo {
  object-fit: cover;
  width: 100%;
  height: auto;
  padding: 0;
  background: var(--bg-alt);
}

/* ---------- 13. Text marquee (landing page) ---------- */
.marquee {
  overflow: hidden;
  border-top: var(--line);
  border-bottom: var(--line);
  background: var(--accent-tint);
  color: var(--accent-tint-ink);
  padding-block: 0.9rem;
  white-space: nowrap;
}
.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 28s linear infinite;
}
.marquee__group {
  display: flex;
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}
.marquee__group span { margin-right: 3rem; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(var(--marquee-shift, -50%)); } }

/* ---------- 13b. Logo marquee (career page) ---------- */
.logos {
  overflow: hidden;
  border-top: var(--line);
  border-bottom: var(--line);
  background: var(--bg-alt);
  padding-block: 1.5rem;
}
.logos__track {
  display: flex;
  width: max-content;
  animation: logos-scroll 32s linear infinite;
}
.logos:hover .logos__track,
.logos:focus-within .logos__track { animation-play-state: paused; }
.logos__group {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: clamp(2.5rem, 6vw, 4.5rem);
  padding-right: clamp(2.5rem, 6vw, 4.5rem);
}
.logos__group img {
  height: 42px;
  width: auto;
  /* Light mode: full brand colors */
  filter: opacity(0.92);
  transition: filter 0.3s ease, transform 0.3s var(--ease);
}
.logos__group img:hover { filter: opacity(1); transform: translateY(-2px); }
/* Dark mode: logos are dark artwork → grayscale + lift to light */
[data-theme="dark"] .logos__group img { filter: grayscale(1) invert(1) opacity(0.7); }
[data-theme="dark"] .logos__group img:hover { filter: grayscale(1) invert(1) opacity(1); }
@media (max-width: 600px) { .logos__group img { height: 32px; } }
/* --logos-shift is set by JS to exactly one group width for a seamless loop */
@keyframes logos-scroll { from { transform: translateX(0); } to { transform: translateX(var(--logos-shift, -50%)); } }
@media (prefers-reduced-motion: reduce) {
  .logos { overflow-x: auto; }
  .logos__track { animation: none; }
}

/* ---------- 14. Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--space); text-align: center; }
.stat { border: var(--line); padding: 1.75rem 1rem; background: var(--surface); }
.stat__num { font-family: var(--font-display); font-size: var(--step-3); font-weight: 700; color: var(--accent); line-height: 1; }
.stat__label { font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-top: 0.5rem; }

/* ---------- 15. Forms ---------- */
.form { display: grid; gap: 1.25rem; max-width: 640px; }
.form label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 0.4rem;
}
.form input, .form textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  padding: 0.9rem 1rem;
  border: var(--line);
  background: var(--surface);
  transition: box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}
.form input:focus, .form textarea:focus {
  outline: none;
  box-shadow: var(--shadow-brutal-sm);
  transform: translate(-2px, -2px);
}
.form textarea { min-height: 160px; resize: vertical; }
.form__consent { display: flex; gap: 0.75rem; align-items: flex-start; font-size: 0.85rem; color: var(--ink-soft); }
.form__consent input { width: auto; margin-top: 0.25rem; }
.form__status { font-family: var(--font-mono); font-size: 0.85rem; min-height: 1.5em; }
.form__status.ok { color: var(--accent); }
.form__status.err { color: var(--clay); }

/* ---------- 16. Footer ---------- */
.site-footer {
  background: var(--contrast-bg);
  color: var(--contrast-soft);
  padding-block: 3.5rem 2rem;
  margin-top: 0;
  border-top: var(--line);
}
.site-footer a { color: var(--dust-green); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer__grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-bottom: 2.5rem; }
.footer__title { font-family: var(--font-mono); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.15em; color: var(--steel); margin-bottom: 0.9rem; }
.footer__list { list-style: none; display: grid; gap: 0.5rem; font-size: 0.95rem; }
.footer__bottom {
  border-top: 1px solid var(--contrast-line);
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--steel);
}

/* ---------- 17. Page transition ---------- */
.page-transition {
  position: fixed;
  inset: 0;
  background: var(--accent-strong);
  z-index: 10000;
  transform: scaleY(0);
  transform-origin: top;
  pointer-events: none;
}
body.is-leaving .page-transition { animation: wipe-in 0.45s var(--ease) forwards; }
body.is-entering .page-transition { transform: scaleY(1); transform-origin: bottom; animation: wipe-out 0.55s var(--ease) forwards; }
@keyframes wipe-in { to { transform: scaleY(1); } }
@keyframes wipe-out { to { transform: scaleY(0); } }

/* ---------- 18. Misc ---------- */
.divider-word {
  font-family: var(--font-display);
  font-size: var(--step-4);
  font-weight: 700;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--line-soft);
  white-space: nowrap;
  user-select: none;
}

.legal-content h2 { font-size: var(--step-2); margin-top: 2.5rem; margin-bottom: 0.75rem; }
.legal-content h3 { font-size: var(--step-1); margin-top: 1.75rem; margin-bottom: 0.5rem; }
.legal-content p, .legal-content ul { margin-bottom: 1rem; }
.legal-content ul { padding-left: 1.25rem; }
.todo-note {
  border: 2px dashed var(--clay);
  background: color-mix(in srgb, var(--clay) 10%, var(--bg));
  padding: 1rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  margin-block: 1rem;
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent-strong); color: var(--cream);
  padding: 0.75rem 1.25rem; z-index: 10001;
  font-family: var(--font-mono);
}
.skip-link:focus { left: 0; }
