/* ==========================================================================
   simon-danckaert.com homepage
   Built on the original site's own language: the black -> #12182b gradient,
   Vampiro One wordmark with the magenta stack shadow, Bebas Neue headings
   with a rule underneath, and the chunky offset card shadow.
   Bigger type, one idea per screen, no scroll-triggered animation.
   ========================================================================== */

/* --------------------------------------------------------------- tokens */
:root {
  --ink-900: #05070f;
  --ink-800: #0a0d17;
  --ink-700: #12182b;

  /* the original card fill and its hard drop shadow */
  --card: rgba(57, 80, 102, 0.42);
  --card-hi: rgba(72, 100, 126, 0.55);
  --card-shadow: rgba(9, 7, 26, 0.42);

  --mint: #d5ffea;
  --cyan: #a4f3ff;
  --lav: #d1ccff;
  --magenta: #894384;
  --magenta-hi: #b85bb0;
  --accent: #74edff;
  --text: #dcf2f8;
  --text-dim: #9db6c4;

  --display: "Bebas Neue", Impact, sans-serif;
  --word: "Vampiro One", cursive;
  --label: "Oswald", sans-serif;
  --body: "Inter", Helvetica, Arial, sans-serif;

  /* body lands at 1.2rem on a desktop, matching the original site */
  --fs-sm: 0.95rem;
  --fs-base: clamp(1.05rem, 1rem + 0.25vw, 1.2rem);
  --fs-lead: clamp(1.1rem, 1.02rem + 0.3vw, 1.28rem);
  --fs-h3: clamp(1.3rem, 1.18rem + 0.5vw, 1.65rem);
  --fs-h2: clamp(2.2rem, 1.85rem + 1.6vw, 3.5rem);
  --fs-hero: clamp(3rem, 1.9rem + 5.6vw, 7.5rem);

  --sp-1: 0.4rem;
  --sp-2: 0.8rem;
  --sp-3: 1.3rem;
  --sp-4: 2rem;
  --sp-5: 3.2rem;
  --sp-6: 3.4rem;
  --sp-7: clamp(3.5rem, 6vw, 6rem);

  --wrap: 1560px;
  --radius: 10px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  /* The wordmark's stacked magenta shadow: 18 hard copies 0.01em apart, only
     0.18em deep in total. Every layer is offset-only — no blur radius — so the
     edge stays as crisp as the glyph; the softness is alpha alone.

     The alphas look far too low to be a gradual ramp, and that is the point:
     the layers all overlap, so a point at depth t is painted by every layer at
     or below it and the *visible* opacity there is 1 - product of (1 - alpha).
     These were solved backwards from the ramp we actually want to see, which
     holds solid for three steps and then falls away evenly from 0.04em on —
     roughly the top fifth of the stack. Editing any single value shifts the
     whole curve under it, so retune the set, not one layer.

     Shared by the h1 and the .hero-name button so the two can't drift apart. */
  --name-shadow: 0 0.01em var(--magenta), 0 0.02em var(--magenta),
    0 0.03em var(--magenta), 0 0.04em rgba(137, 67, 132, 0.55),
    0 0.05em rgba(137, 67, 132, 0.39), 0 0.06em rgba(137, 67, 132, 0.28),
    0 0.07em rgba(137, 67, 132, 0.22), 0 0.08em rgba(137, 67, 132, 0.18),
    0 0.09em rgba(137, 67, 132, 0.15), 0 0.1em rgba(137, 67, 132, 0.13),
    0 0.11em rgba(137, 67, 132, 0.12), 0 0.12em rgba(137, 67, 132, 0.1),
    0 0.13em rgba(137, 67, 132, 0.09), 0 0.14em rgba(137, 67, 132, 0.08),
    0 0.15em rgba(137, 67, 132, 0.07), 0 0.16em rgba(137, 67, 132, 0.06),
    0 0.17em rgba(137, 67, 132, 0.05), 0 0.18em rgba(137, 67, 132, 0.03);
}

/* ---------------------------------------------------------------- reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  /* The page gradient is a fixed vignette: black at the top of the viewport,
     black at the bottom, --ink-700 through the middle.

     `fixed` pins its background *positioning area* to one viewport box, so the
     image can never paint outside that box — while the canvas painting area is
     the whole scrollable document. A phone exposes the gap between the two: the
     URL bar collapsing grows the viewport, and overscroll rubber-bands the page
     past its own end. Those pixels had nothing behind them, so they fell through
     to the browser's default canvas white and flashed a white box at the bottom
     while scrolling. A background-color has no positioning area, so it floods
     the entire canvas and backstops the gradient; #000 is the gradient's own end
     stop, so the seam is invisible.

     Both belong on html, not body. The canvas takes its colour from the root,
     and a colour here also stops a body background from being propagated up —
     so splitting the pair would silently move the gradient off the canvas. */
  background-color: #000;
  background-image: linear-gradient(180deg, #000 0%, var(--ink-700) 26%, var(--ink-700) 78%, #000 100%);
  background-attachment: fixed;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}

body {
  color: var(--text);
  font-family: var(--body);
  font-size: var(--fs-base);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img,
video {
  display: block;
  max-width: 100%;
  /* the width/height attributes are presentational hints; without this the
     baked-in height wins over aspect-ratio and round images come out oval */
  height: auto;
}

a {
  color: var(--accent);
  text-decoration: none;
}

ul {
  list-style: none;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  padding: 0.8rem 1.4rem;
  background: var(--accent);
  color: var(--ink-900);
  font-family: var(--label);
  border-radius: 0 0 var(--radius) var(--radius);
}
.skip-link:focus {
  top: 0;
}

/* --------------------------------------------------------------- layout */
.wrap {
  width: min(100% - 5rem, var(--wrap));
  margin-inline: auto;
}

/* grids run the full width; running text gets pulled back in so lines
   never grow past a comfortable reading measure */
.about,
.cv-layout {
  max-width: 1200px;
  margin-inline: auto;
}

/* generous room so each section reads on its own */
.section {
  padding-block: var(--sp-7);
}


/* the original's big centred heading with a rule under it, grown up */
.section-title {
  font-family: var(--display);
  font-size: var(--fs-h2);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: 0.02em;
  color: #fff;
  text-align: center;
}

.section-head {
  margin-bottom: var(--sp-6);
  text-align: center;
}

/* the rule sits under the heading itself, above any subtitle */
.section-title::after {
  content: "";
  display: block;
  width: 110px;
  height: 5px;
  margin: var(--sp-3) auto 0;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--magenta-hi), var(--accent));
}

.section-sub {
  max-width: 46rem;
  margin: var(--sp-3) auto 0;
  font-size: var(--fs-lead);
  color: var(--mint);
  text-align: center;
}

.lead {
  font-size: var(--fs-lead);
  line-height: 1.6;
  color: var(--mint);
}

/* --------------------------------------------------------------- header */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  padding-block: var(--sp-2);
  border-bottom: 1px solid transparent;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease);
}

.site-header.is-stuck {
  background: rgba(6, 9, 17, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: rgba(164, 243, 255, 0.16);
}

/* A backdrop-filter makes this header the containing block for any fixed
   positioned descendant. Left in place it collapses the full screen mobile
   menu into the header bar the moment you have scrolled far enough for the
   stuck state to kick in, so the blur comes off while the menu is open. */
.site-header.has-menu-open,
.site-header.is-stuck.has-menu-open {
  background: transparent;
  border-bottom-color: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
}

.wordmark {
  font-family: var(--word);
  font-size: clamp(1.15rem, 1rem + 0.6vw, 1.55rem);
  color: var(--lav);
  line-height: 1;
  white-space: nowrap;
  text-shadow: 0 2px var(--magenta), 0 4px var(--magenta), 0 6px var(--magenta);
  transition: color 0.25s var(--ease);
}
.wordmark:hover {
  color: var(--accent);
}

.main-nav ul {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2vw, 2.2rem);
}

.nav-link {
  position: relative;
  font-family: var(--label);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--mint);
  padding-block: 0.2rem;
  transition: color 0.25s var(--ease);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 3px;
  border-radius: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s var(--ease);
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--accent);
}
.nav-link:hover::after,
.nav-link.is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

/* tap to call and mail, always on screen for phone visitors */
.header-contact {
  display: flex;
  gap: 0.45rem;
}

.header-contact a {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: var(--radius);
  background: var(--card);
  color: var(--mint);
  box-shadow: 3px 3px var(--card-shadow);
  transition: transform 0.25s var(--ease), color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.header-contact a:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px var(--card-shadow);
  color: var(--accent);
}

.header-contact svg {
  width: 21px;
  height: 21px;
}

.lang-switch {
  display: inline-flex;
  border-radius: 999px;
  overflow: hidden;
  background: var(--card);
  box-shadow: 3px 3px var(--card-shadow);
}

.lang-switch button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--mint);
  font-family: var(--label);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  padding: 0.55rem 0.9rem;
  cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}

.lang-switch button[aria-pressed="true"] {
  background: var(--accent);
  color: var(--ink-900);
}

.main-nav .lang-switch--menu {
  display: none;
}

.nav-toggle {
  display: none;
  appearance: none;
  border: 0;
  background: var(--card);
  box-shadow: 3px 3px var(--card-shadow);
  border-radius: var(--radius);
  width: 46px;
  height: 46px;
  cursor: pointer;
  position: relative;
}

.nav-toggle span {
  position: absolute;
  left: 50%;
  width: 21px;
  height: 2px;
  border-radius: 2px;
  background: var(--mint);
  transform: translateX(-50%);
  transition: transform 0.35s var(--ease), opacity 0.2s var(--ease);
}
.nav-toggle span:nth-child(1) { top: 16px; }
.nav-toggle span:nth-child(2) { top: 22px; }
.nav-toggle span:nth-child(3) { top: 28px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateX(-50%) translateY(6px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateX(-50%) translateY(-6px) rotate(-45deg);
}

/* -------------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 48px;
  padding: 0.7rem 1.35rem;
  border: 0;
  border-radius: var(--radius);
  font-family: var(--display);
  font-size: 1.2rem;
  letter-spacing: 0.05em;
  color: var(--ink-900);
  background: var(--accent);
  box-shadow: 6px 6px var(--card-shadow);
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
}

.btn:hover {
  transform: translate(-3px, -3px);
  box-shadow: 9px 9px var(--card-shadow);
  background: #96f3ff;
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 3px 3px var(--card-shadow);
}

.btn--alt {
  background: var(--lav);
}
.btn--alt:hover {
  background: #e2ddff;
}

.btn--ghost {
  background: var(--card);
  color: var(--mint);
}
.btn--ghost:hover {
  background: var(--card-hi);
  color: #fff;
}

.btn svg {
  width: 20px;
  height: 20px;
  flex: none;
}

/* ----------------------------------------------------------------- hero */
/* The reel is the point here, so nothing sits on top of it except the name
   and one line. No full plane over the video. */
/* The bottom padding sits the name low, inside the band where the reel has
   already gone down to flat --ink-700, so the block reads against a settled
   colour rather than against moving footage. */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-block: 7rem clamp(1.75rem, 4vh, 3rem);
  overflow: hidden;
  text-align: center;
}

/* The reel and the darkening that swallows it live in one masked box. They
   have to be composited together before the mask is applied: masking the
   video and the overlay as two separate layers leaves the video weighted
   (1 - overlay_alpha * mask) * mask in the result, which peaks at 25% in the
   middle of the ramp, so the reel reappears through its own fade and its
   bottom edge shows as a line. Darkened first, masked second, it cannot. */
.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;

  /* One anchor for the whole hand-off: the reel is fully buried in flat
     --ink-700 here, and this is where the mask starts fading that flat colour
     out. Both the ramp below and the mask are written against it, so they can
     never drift apart and let the reel back through.
     92% + 48px, but never closer than 52px to the bottom edge -- on a short
     viewport the +48px would otherwise run off the element and leave a hard
     line instead of a fade. Below ~1250px tall it is the 52px guard that
     decides, so that number, not the percentage, is what sets how low the
     fade sits on a typical screen. Do not take it under ~40px: the ink is
     #12182b and the fixed body gradient behind it is near black down here, so
     tighter than that the colour step stops reading as a blend and starts
     reading as the edge this whole arrangement exists to hide.
     The ramp fractions below are relative to this, so nudging this value
     alone slides the whole fade up or down at a constant length. */
  --fade-start: min(calc(92% + 48px), calc(100% - 52px));

  -webkit-mask-image: linear-gradient(
    180deg,
    #000 var(--fade-start),
    rgba(0, 0, 0, 0.62) calc((var(--fade-start) + 100%) / 2),
    transparent 100%
  );
  mask-image: linear-gradient(
    180deg,
    #000 var(--fade-start),
    rgba(0, 0, 0, 0.62) calc((var(--fade-start) + 100%) / 2),
    transparent 100%
  );
}

/* soft vignette, a little shade under the header, and the ramp that takes the
   reel down to flat --ink-700. Its stops are fractions of --fade-start rather
   than of the hero, so the ramp slides down with the fade and stays in order
   even where --fade-start hits its short-viewport limit. */
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(115% 75% at 50% 40%, transparent 40%, rgba(5, 7, 15, 0.55) 100%),
    linear-gradient(
      180deg,
      rgba(5, 7, 15, 0.55) 0%,
      transparent 22%,
      transparent calc(var(--fade-start) * 0.89),
      rgba(9, 12, 24, 0.5) calc(var(--fade-start) * 0.945),
      rgba(11, 14, 28, 0.85) calc(var(--fade-start) * 0.98),
      var(--ink-700) var(--fade-start),
      var(--ink-700) 100%
    );
}

.hero-media picture {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-media img,
.hero-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-media video {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s var(--ease);
}
.hero-media video.is-ready {
  opacity: 1;
}

.hero h1 {
  font-family: var(--word);
  font-size: var(--fs-hero);
  font-weight: 400;
  line-height: 0.95;
  color: var(--lav);
  text-shadow: var(--name-shadow);
}

.hero-tagline {
  margin-top: var(--sp-4);
  font-family: var(--display);
  font-size: clamp(1.05rem, 0.92rem + 0.8vw, 1.6rem);
  letter-spacing: 0.06em;
  color: var(--mint);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.9);
}

/* Clicking the name swaps the tagline for the categories: the tagline
   defocuses upward and each category resolves out of a blur in turn, with the
   accent rule sweeping under it as it lands. Staggered by delay, not duration,
   so every item travels the same short distance at the same speed. */
.hero-name {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  /* buttons get text-shadow: none from the UA sheet, so the stacked 3D
     shadow has to be restated here rather than inherited from the h1 */
  text-shadow: var(--name-shadow);
  transition: color 0.25s var(--ease);
}

.hero-name:hover,
.hero-name[aria-expanded="true"] {
  color: #74fffd;
}

.hero-tagline {
  transition: opacity 0.3s var(--ease), transform 0.45s var(--ease), filter 0.45s var(--ease);
}

.hero-tagline.is-hidden {
  opacity: 0;
  transform: translateY(-0.5em) scale(0.98);
  filter: blur(6px);
  pointer-events: none;
}

/* Tagline and menu share one grid cell, so the slot is always as tall as the
   menu and the name does not jump when the categories appear. */
.hero-slot {
  display: grid;
  margin-top: var(--sp-3);
}

.hero-slot > * {
  grid-area: 1 / 1;
  align-self: center;
  justify-self: center;
}

.hero-menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: clamp(1.1rem, 2.6vw, 2.6rem);
  visibility: hidden;
  opacity: 0;
  /* on the way out the whole row defocuses together, then goes untabbable */
  transition: opacity 0.24s var(--ease), visibility 0s linear 0.24s;
}

.hero-menu.is-open {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.2s var(--ease), visibility 0s;
}

.hero-menu a {
  position: relative;
  font-family: var(--label);
  font-weight: 600;
  font-size: clamp(1.15rem, 0.95rem + 0.75vw, 1.7rem);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.85);
  padding-block: 0.25rem;
  transition: color 0.25s var(--ease);
}

.hero-menu a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 3px;
  border-radius: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s var(--ease);
}

.hero-menu a:hover {
  color: var(--accent);
}

.hero-menu a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* One stagger per item, inherited by the link's rule, so the word and the
   sweep under it stay locked together. */
.hero-menu.is-open li:nth-child(1) { --stagger: 0.05s; }
.hero-menu.is-open li:nth-child(2) { --stagger: 0.14s; }
.hero-menu.is-open li:nth-child(3) { --stagger: 0.23s; }
.hero-menu.is-open li:nth-child(4) { --stagger: 0.32s; }
.hero-menu.is-open li:nth-child(5) { --stagger: 0.41s; }

.hero-menu.is-open li {
  animation: heroFocusIn 0.62s var(--ease) var(--stagger, 0s) backwards;
}

.hero-menu.is-open a::after {
  /* no fill mode: once the rule has swept past it is back under hover control */
  animation: heroSweep 0.62s var(--ease) var(--stagger, 0s);
}

/* the word lifts a little and resolves out of a blur, rather than falling in */
@keyframes heroFocusIn {
  0% {
    opacity: 0;
    transform: translateY(0.45em) scale(0.94);
    filter: blur(12px);
  }
  60% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

/* transform-origin is pinned here so the base rule's right origin, which the
   hover wipe needs, does not distort the sweep */
@keyframes heroSweep {
  0% {
    transform: translateX(-115%) scaleX(0.45);
    transform-origin: 50% 50%;
    opacity: 0;
  }
  45% {
    transform: translateX(0) scaleX(1);
    opacity: 0.95;
  }
  100% {
    transform: translateX(115%) scaleX(0.45);
    transform-origin: 50% 50%;
    opacity: 0;
  }
}

/* ---------------------------------------------------------------- about */
.about {
  display: flex;
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
}

.about-portrait {
  flex: none;
  width: clamp(210px, 26vw, 330px);
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 10px 10px var(--card-shadow), 0 0 0 5px var(--magenta);
}

.about p {
  font-size: var(--fs-lead);
  line-height: 1.6;
  color: var(--mint);
}

.about p strong {
  color: #fff;
}

.about p + p {
  margin-top: var(--sp-3);
}

/* ------------------------------------------------------------ timeline */
/* Each entry carries --months; the bar on the axis is drawn from it, so a
   four year job is visibly four times a one year one. */
.track {
  list-style: none;
  position: relative;
}

.track::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: linear-gradient(180deg, rgba(116, 237, 255, 0.5), rgba(137, 67, 132, 0.35));
}

.track-item {
  position: relative;
  /* the indent belongs to the item, so the bar and dot sit in its own
     padding instead of landing on top of the text */
  padding-left: 2.9rem;
  padding-bottom: var(--sp-5);
  min-height: calc(var(--months, 6) * 6px + 2rem);
}

.track-item:last-child {
  padding-bottom: 0;
}

/* the duration bar */
.track-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  width: 10px;
  height: calc(var(--months, 6) * 6px);
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent), rgba(116, 237, 255, 0.28));
}

/* the dot at the start of the job */
.track-item::after {
  content: "";
  position: absolute;
  left: -3px;
  top: 5px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ink-700);
  border: 3px solid var(--accent);
}

.track-item.is-current::after {
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(116, 237, 255, 0.16);
}

.track-item.is-current::before {
  background: linear-gradient(180deg, #fff, var(--accent));
}

.track-date {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--label);
  font-weight: 500;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cyan);
}

.track-dur {
  padding: 0.1rem 0.6rem;
  border-radius: 999px;
  background: rgba(116, 237, 255, 0.12);
  color: var(--mint);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
}

.track-item.is-current .track-dur {
  background: var(--accent);
  color: var(--ink-900);
}

.track-role {
  font-family: var(--label);
  font-weight: 600;
  font-size: 1.15rem;
  line-height: 1.3;
  color: #fff;
  margin-top: 0.25rem;
}

.track-org {
  color: var(--accent);
}

.track-sub {
  color: var(--lav);
}

.track-detail {
  list-style: none;
  margin-top: var(--sp-2);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  color: var(--mint);
  font-size: var(--fs-sm);
  line-height: 1.6;
}

.track-detail > li {
  position: relative;
  padding-left: 0.9rem;
}

.track-detail > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(164, 243, 255, 0.55);
}

.track-detail b {
  color: #fff;
  font-weight: 600;
}

/* ---------------------------------------------------------------- cards */
/* The chunky offset shadow carried over from the original site. Only ever
   put on things that are actually clickable. */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 12px 12px var(--card-shadow);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}

.card:hover {
  transform: translate(-4px, -4px);
  box-shadow: 18px 18px var(--card-shadow);
  background: var(--card-hi);
}

/* ----------------------------------------------------------- work cards */
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--sp-4);
}

/* all four skills sit on one row once there is room for them */
@media (min-width: 1080px) {
  .work-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.work-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* the source art is square, so a square window shows it uncropped and gives
   the image more of the card than the old 4/3 letterbox did */
.work-card-media {
  aspect-ratio: 1;
  overflow: hidden;
}

.work-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.work-card:hover .work-card-media img {
  transform: scale(1.06);
}

.work-card-body {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  padding: var(--sp-3) var(--sp-4) var(--sp-4);
  flex: 1;
}

.work-card h3 {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 400;
  color: #fff;
  line-height: 1.1;
}

.work-card p {
  color: var(--mint);
  font-size: var(--fs-sm);
  flex: 1;
}

.card-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: var(--sp-2);
  font-family: var(--display);
  font-size: 1.05rem;
  letter-spacing: 0.05em;
  color: var(--accent);
}

.card-cta svg {
  width: 17px;
  height: 17px;
  transition: transform 0.3s var(--ease);
}

.work-card:hover .card-cta svg {
  transform: translateX(5px);
}

/* makes the whole card the click target without nesting links */
.stretch::after {
  content: "";
  position: absolute;
  inset: 0;
}

/* ------------------------------------------------------------- showreel */
.reel {
  position: relative;
  width: min(100%, 1200px);
  margin-inline: auto;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  box-shadow: 12px 12px var(--card-shadow);
}

.reel iframe,
.reel img {
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

.reel-facade {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  appearance: none;
  border: 0;
  padding: 0;
  background: rgba(5, 7, 15, 0.32);
  cursor: pointer;
  transition: background 0.3s var(--ease);
}

.reel-facade:hover {
  background: rgba(5, 7, 15, 0.15);
}

.reel-play {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--ink-900);
  box-shadow: 6px 6px var(--card-shadow);
  transition: transform 0.3s var(--ease);
}

.reel-facade:hover .reel-play {
  transform: scale(1.1);
}

.reel-play svg {
  width: 28px;
  height: 28px;
  margin-left: 4px;
}

/* -------------------------------------------------------------- gallery */
.gallery-note {
  max-width: 44rem;
  margin: calc(var(--sp-6) * -0.6) auto var(--sp-5);
  font-size: var(--fs-sm);
  color: var(--text-dim);
  text-align: center;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--sp-3);
}

/* four per row on desktop, so each piece is shown large */
@media (min-width: 1080px) {
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.gallery-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--ink-700);
  box-shadow: 8px 8px var(--card-shadow);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.gallery-item:hover {
  transform: translate(-4px, -4px);
  box-shadow: 13px 13px var(--card-shadow);
}

.gallery-item a {
  display: block;
  height: 100%;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.gallery-item:hover img {
  transform: scale(1.07);
}

/* ------------------------------------------------------------------- cv */
.cv-layout {
  display: grid;
  grid-template-columns: minmax(0, 400px) minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: start;
  width: min(100%, 1180px);
  margin-inline: auto;
}

/* the resume stays in view while the timeline scrolls past it */
.cv-aside {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.cv-preview {
  border-radius: var(--radius);
  box-shadow: 12px 12px var(--card-shadow);
  overflow: hidden;
  display: block;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.cv-preview:hover {
  transform: translate(-4px, -4px);
  box-shadow: 18px 18px var(--card-shadow);
}

.cv-preview img {
  width: 100%;
}

.download-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.download-row .btn {
  flex: 1 1 auto;
}

.download-note {
  margin-top: var(--sp-3);
  color: var(--text-dim);
  font-size: var(--fs-sm);
}

/* -------------------------------------------------------------- contact */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--sp-4);
  max-width: 860px;
  margin-inline: auto;
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-4) var(--sp-3);
  text-align: center;
}

.contact-card img {
  width: 88px;
  aspect-ratio: 1;
  transition: transform 0.3s var(--ease);
}

.contact-card:hover img {
  transform: scale(1.08) rotate(-4deg);
}

.contact-label {
  font-family: var(--display);
  font-size: 1.35rem;
  color: #fff;
  line-height: 1.1;
}

.contact-value {
  color: var(--accent);
  word-break: break-word;
}

/* --------------------------------------------------------------- footer */
.site-footer {
  padding-block: var(--sp-3);
  text-align: center;
}

.footer-inner {
  font-family: "Julius Sans One", sans-serif;
  color: var(--text-dim);
  font-size: 0.8rem;
  line-height: 1.7;
}

.to-top {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 90;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(164, 243, 255, 0.34);
  background: rgba(8, 11, 20, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--mint);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), visibility 0.35s,
    color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.to-top:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.to-top svg {
  width: 20px;
  height: 20px;
}

/* ------------------------------------------------------------ languages */
[data-lang-block] {
  display: none;
}
[data-lang-block].is-active {
  display: block;
}

/* ---------------------------------------------------------- breakpoints */
@media (max-width: 1000px) {
  .cv-layout {
    grid-template-columns: 1fr;
  }

  .cv-aside {
    position: static;
    max-width: 460px;
    margin-inline: auto;
  }

  .about {
    flex-direction: column;
  }

  /* portrait centres, but long copy stays left aligned to stay readable */
  .about > div {
    width: 100%;
  }
}

@media (max-width: 860px) {
  .nav-toggle {
    display: block;
    position: relative;
    z-index: 120;
  }

  .main-nav {
    position: fixed;
    inset: 0;
    z-index: 110;
    display: grid;
    /* one row spanning the overlay, so the list's min-height: 100% below has
       something definite to measure against */
    grid-template-rows: 1fr;
    justify-items: center;
    align-items: center;
    /* a tall menu on a short phone has to stay reachable: without the safe
       keyword the centred list overflows past the top edge and cannot be
       scrolled back to. Browsers without it keep plain centring. */
    align-items: safe center;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: rgba(5, 7, 15, 0.97);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s var(--ease), visibility 0.35s;
  }

  .main-nav.is-open {
    opacity: 1;
    visibility: visible;
  }

  /* The list fills the overlay so the two auto margins below have space to
     share out: the destinations settle in the middle, the language switch
     sits on the bottom edge instead of reading as a sixth menu item. */
  .main-nav ul {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--sp-3);
    min-height: 100%;
    /* clears the hamburger, which sits above this overlay */
    padding: 5rem 1rem calc(2.5rem + env(safe-area-inset-bottom, 0px));
  }

  /* free space is split evenly between these two, so the links stay centred
     while the switch is pushed all the way down. On a screen too short for
     both, the margins collapse to zero and the list simply scrolls. */
  .main-nav ul > li:first-child,
  .main-nav ul > li:last-child {
    margin-top: auto;
  }

  /* the original site's oversized stacked menu, kept for the phone */
  .main-nav .nav-link {
    font-size: clamp(2.4rem, 11vw, 3.6rem);
    color: var(--lav);
    text-shadow: 0 3px var(--magenta), 0 6px var(--magenta);
  }

  .main-nav .nav-link::after {
    display: none;
  }

  .main-nav .lang-switch--menu {
    display: inline-flex;
    margin-top: 0;
  }

  .main-nav .lang-switch--menu button {
    font-size: 1.1rem;
    padding: 0.7rem 1.5rem;
  }

  .header-actions .lang-switch {
    display: none;
  }

  .hero {
    padding-block: 6rem 2.75rem;
    /* keeps the name and the category row off the screen edges */
    padding-inline: 1.5rem;
  }

  /* five uppercase words at the desktop size run the full width of a phone
     and butt up against both edges, so the row is scaled down and capped */
  .hero-menu {
    gap: 0.5rem 1.1rem;
    max-width: 26rem;
  }

  .hero-menu a {
    font-size: clamp(0.95rem, 3.6vw, 1.3rem);
    letter-spacing: 0.07em;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {
  /* An A4 page scaled down to phone width is not a preview, it is a blank
     white rectangle with unreadable specks on it, and it reads as something
     that failed to load. The two download buttons carry the section alone. */
  .cv-preview {
    display: none;
  }
}

@media (max-width: 560px) {
  .wrap {
    width: min(100% - 1.6rem, var(--wrap));
  }

  .download-row .btn {
    flex: 1 1 100%;
  }

  .card,
  .gallery-item,
  .reel,
  .cv-preview {
    box-shadow: 7px 7px var(--card-shadow);
  }
}

/* ---------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .hero-media video {
    display: none;
  }
}
