/* ==========================================================================
   Components · "Night Glass"
   backdrop · side navigation · hero · glitch · intro · work index · lab ·
   contact · project preview · cursor dot
   ========================================================================== */

.wrap {
  padding-left: calc(var(--side-w) + var(--gutter));
  padding-right: var(--gutter);
}
main, .contact { position: relative; z-index: 1; }

.label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
}
.label__key {
  display: inline-grid;
  place-items: center;
  min-width: 1.6em;
  height: 1.6em;
  border: 1px solid currentColor;
  border-radius: 2px;
  line-height: 1;
}

.section-title {
  margin-top: var(--s, 1.5rem);
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-wrap: balance;
}
.section-title__count {
  margin-left: 0.6em;
  font-size: var(--fs-mono);
  letter-spacing: var(--track-mono);
  color: var(--ice);
  vertical-align: super;
}

/* ==========================================================================
   BACKDROP — video slot, tint, glow, scrim, cursor light, grain
   ========================================================================== */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: var(--night);
  pointer-events: none;
}
.backdrop > * { position: absolute; inset: 0; }

.backdrop__media { isolation: isolate; }          /* keeps the videos' z-index below the blue tint layer */
.backdrop__media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.4s linear;
}
.backdrop__media video.is-playing { opacity: 1; }

.backdrop__tint {
  background: var(--cobalt);
  mix-blend-mode: multiply;
  opacity: 0;
}
/* Blue grade: drain the original colours, lift the dark footage, then multiply by cobalt.
   Multiplying caps every highlight at cobalt's brightness, so light text always stays readable. */
.backdrop.has-video.is-tinted video { filter: grayscale(1) brightness(2.2) contrast(1.25); }
.backdrop.has-video.is-tinted .backdrop__tint {
  background: linear-gradient(180deg, #1646d8 0%, #1a4ddf 60%, #2155e6 100%);
  opacity: 1;
}
.backdrop.has-video.is-tinted .backdrop__glow { mix-blend-mode: screen; }

.backdrop__glow {
  background:
    radial-gradient(ellipse 80% 45% at 50% 115%, rgba(22, 70, 216, 0.30), transparent 70%),
    radial-gradient(ellipse 45% 40% at 12% 22%, rgba(14, 46, 158, 0.18), transparent 70%),
    radial-gradient(ellipse 40% 35% at 88% 70%, rgba(67, 141, 229, 0.10), transparent 70%);
}

.backdrop__scrim {
  background:
    radial-gradient(ellipse 75% 70% at 50% 48%, transparent 35%, rgba(5, 7, 11, 0.65) 100%),
    var(--night);
  opacity: calc(var(--scrim-base) + var(--dim, 0) * var(--scrim-scroll));
}

.backdrop__light {
  inset: auto;
  top: 0;
  left: 0;
  width: var(--light-size);
  height: var(--light-size);
  margin: calc(var(--light-size) / -2) 0 0 calc(var(--light-size) / -2);
  border-radius: 50%;
  background: radial-gradient(circle closest-side,
    rgba(167, 217, 235, 0.20) 0%,
    rgba(67, 141, 229, 0.13) 28%,
    rgba(22, 70, 216, 0.09) 55%,
    rgba(22, 70, 216, 0) 100%);
  mix-blend-mode: screen;
  opacity: calc(1 - var(--dim, 0) * 0.6);
  transform: translate3d(var(--lx, 50vw), var(--ly, 45vh), 0);
  will-change: transform;
}

.backdrop__grain {
  inset: -50%;
  background-image: var(--grain);
  background-size: 220px 220px;
  opacity: 0.055;
  mix-blend-mode: screen;
}
@media (prefers-reduced-motion: no-preference) {
  .backdrop__grain { animation: grain 0.9s steps(6) infinite; }
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -4%); }
  60% { transform: translate(-4%, -2%); }
  80% { transform: translate(3%, 3%); }
  100% { transform: translate(0, 0); }
}

/* Scroll-progress barcode, top right (decorative) */
.barcode {
  position: fixed;
  top: 92px;                               /* under the Menu button */
  right: var(--gutter);
  z-index: 40;
  width: 84px;
  height: 14px;
  background: repeating-linear-gradient(90deg,
    rgba(243, 241, 235, 0.35) 0 1px, transparent 1px 3px,
    rgba(243, 241, 235, 0.35) 3px 5px, transparent 5px 6px,
    rgba(243, 241, 235, 0.35) 6px 7px, transparent 7px 9px);
}
.barcode__fill {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg,
    var(--paper) 0 1px, transparent 1px 3px,
    var(--paper) 3px 5px, transparent 5px 6px,
    var(--paper) 6px 7px, transparent 7px 9px);
  filter: drop-shadow(0 0 4px rgba(167, 217, 235, 0.6));
  transform: scaleX(var(--progress, 0));
  transform-origin: left;
}

/* ==========================================================================
   HEADER: the logo top left (back to the homepage), "Menu" top right.
   The menu opens as a panel from the right with the sections and the sound switch.
   ========================================================================== */
.side {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 36px var(--gutter) 0 clamp(24px, 3.6vw, 56px);
  pointer-events: none;
  transition: opacity 0.35s var(--ease-out), visibility 0s;
}
.side > * { pointer-events: auto; }

.side__brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  align-self: flex-start;
  min-height: var(--target);
  color: var(--paper);
  text-decoration: none;
  filter: drop-shadow(0 0 6px rgba(167, 217, 235, 0.35));
}
.side__mark { width: 48px; height: 48px; object-fit: contain; margin-left: -3px; transform: rotate(90deg); }
.side__wordmark { display: none; }

/* the panel from the right */
.side__panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(440px, 100vw);
  padding: 120px clamp(24px, 3vw, 48px) 40px;
  background: rgba(5, 7, 11, 0.94);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-left: 1px solid var(--line);
  overflow-y: auto;
}
.js .side__panel {
  visibility: hidden;
  transform: translateX(100%);
  transition: transform 0.45s var(--ease-out), visibility 0s linear 0.45s;
}
.js .side.is-open .side__panel {
  visibility: visible;
  transform: none;
  transition: transform 0.45s var(--ease-out);
}
/* the page behind the open panel dims; a click on it closes the menu (initMenu) */
.js .side::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 11, 0.55);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease-out), visibility 0s linear 0.35s;
}
.js .side.is-open::before {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.35s var(--ease-out);
}

.side__nav ul { display: grid; }
.side__link {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 64px;
  border-bottom: 1px solid var(--line);
  color: var(--paper);
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.2rem + 0.8vw, 2rem);
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color var(--dur-button) var(--ease-out), padding var(--dur-button) var(--ease-out);
}
.side__link:hover { color: var(--accent); padding-left: 6px; }
.side__link[aria-current]::before {
  content: "";
  width: 14px;
  height: 1px;
  margin-right: 14px;
  background: currentColor;
}

.side__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
  color: var(--paper);
}
.side__status[hidden] { display: none; }
.side__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.side__toggles {
  display: flex;
  gap: 24px;
  margin-top: auto;
  padding-top: 32px;
}
.toggle {
  min-height: 32px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--paper);
  text-align: left;
  text-shadow: var(--glow);
  cursor: pointer;
  transition: color var(--dur-button) var(--ease-out);
}
.toggle:hover { color: var(--ice); }
.toggle span { display: inline-block; min-width: 3ch; }
.toggle[aria-pressed="true"] span { color: var(--ice); }

.side__menu {
  display: none;
  position: relative;
  z-index: 2;                              /* stays above the open panel, then reads "Close" */
  min-height: var(--target);
  padding: 0 4px 0 12px;
  border: 0;
  background: none;
  color: var(--paper);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  text-shadow: var(--glow);
  cursor: pointer;
  transition: color var(--dur-button) var(--ease-out);
}
.side__menu:hover { color: var(--accent); }
.js .side__menu { display: inline-flex; align-items: center; }
.side__brand { position: relative; z-index: 2; }

/* without JavaScript: no menu button, the links sit in a row in the top bar */
html:not(.js) .side { position: absolute; flex-wrap: wrap; }
html:not(.js) .side__panel { position: static; width: auto; padding: 0; background: none; border: 0; -webkit-backdrop-filter: none; backdrop-filter: none; }
html:not(.js) .side__nav ul { display: flex; flex-wrap: wrap; gap: 4px 20px; }
html:not(.js) .side__link { min-height: var(--target); border: 0; font-family: var(--font-mono); font-size: var(--fs-mono); letter-spacing: var(--track-mono); }
html:not(.js) .side__toggles { display: none; }

@media (max-width: 859px) {
  .side { min-height: 60px; padding: 0 16px; }
  /* the bar's glass sits on a layer of its own: a blur on .side itself would trap the fixed panel inside the bar */
  .side::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(rgba(5, 7, 11, 0.85), rgba(5, 7, 11, 0.55));
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }
  .side__wordmark { display: inline; }
  .side__mark { width: 37px; height: 37px; margin-left: -1px; }
  .side__panel { padding: 96px 20px 32px; border-left: 0; }
  .toggle { min-height: var(--target); }
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 96px var(--gutter);
}
.hero__center { text-align: center; }

.hero__title { font-weight: 300; }
.hero__hi,
.hero__name { display: block; color: var(--paper); text-shadow: var(--glow); }
/* small greeting above, the name is the big line */
.hero__hi {
  font-family: var(--font-display);
  font-size: var(--fs-name);
  font-weight: 400;
  line-height: 1;
  letter-spacing: var(--track-name);
  margin-right: calc(var(--track-name) * -1);   /* trailing tracking would push it off-centre */
}
.hero__name {
  margin-top: clamp(1rem, 0.6rem + 1.4vw, 2rem);
  font-family: var(--font-display);
  font-size: var(--fs-hi);
  font-weight: 300;
  line-height: 1;
  letter-spacing: var(--track-wide);
  margin-right: calc(var(--track-wide) * -1);
}
.hero__role {
  margin-top: 0.9rem;
  min-height: 1.4em;
  color: var(--text-muted);
  letter-spacing: 0.24em;
}

/* glyphs produced by js/glitch.js */
.g { display: inline-block; white-space: pre; }
.g.is-mirror { transform: scaleX(-1); }
.g.is-flip { transform: scaleY(-1); }
.g.is-shift { transform: translateY(-0.14em); }
.g.is-dim { opacity: 0.4; }
.is-glitching { text-shadow: -1.5px 0 rgba(67, 141, 229, 0.85), 1.5px 0 rgba(167, 217, 235, 0.7), var(--glow); }

.hero__aside {   /* one row along the bottom: the weather on the left, the clock and the place on the right */
  position: absolute;
  left: clamp(24px, 3.6vw, 56px);
  right: var(--gutter);
  bottom: 36px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 6px 24px;
  text-align: right;
  pointer-events: none;
}
.hero__clock, .hero__coords { grid-column: 2; justify-self: end; }
.hero__weather { grid-column: 1; grid-row: 1 / span 2; justify-self: start; text-align: left; }
.hero__aside[hidden] { display: none; }
.hero__clock {
  font-size: clamp(0.95rem, 0.85rem + 0.35vw, 1.15rem);
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;     /* digits keep their width, so the seconds do not jitter */
  color: var(--paper);
  text-shadow: var(--glow);
}
.hero__coords { color: var(--text-muted); }
.hero__weather { color: var(--paper); min-height: 1.4em; }
@media (max-width: 859px) {
  .hero { padding-top: 84px; }
  .hero__aside { bottom: 24px; }
}

/* ==========================================================================
   A — INTRODUCTION
   ========================================================================== */
.intro { padding-block: var(--section-y); }
.intro__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.5rem clamp(2rem, 5vw, 6rem);
  margin-top: 2rem;
}
.intro__lead {
  grid-column: 1 / -1;
  max-width: 24ch;
  font-family: var(--font-display);
  font-size: var(--fs-lead);
  font-weight: 300;
  line-height: 1.25;
  letter-spacing: -0.005em;
  text-wrap: pretty;
}
.intro__lead em { font-style: normal; color: var(--ice); }
.intro__text {
  grid-column: 2;
  grid-row: 2;
  max-width: 38ch;
  color: var(--text-muted);
  font-size: var(--fs-body-l);
}
.intro__text p + .btn { margin-top: 2rem; }
.intro__skills { grid-column: 1; grid-row: 2; align-self: start; display: grid; gap: 2rem; }
@media (max-width: 859px) {
  .intro__grid { grid-template-columns: 1fr; }
  .intro__text, .intro__skills { grid-column: 1; grid-row: auto; }
}

/* skills and tools as tags */
.tags__title { margin-bottom: 0.9rem; padding-top: 12px; border-top: 1px solid var(--line); color: var(--text-muted); font-weight: 400; }
.tags__list { display: flex; flex-wrap: wrap; gap: 8px; }
.tags__list li {
  padding: 7px 12px;
  border: 1px solid var(--line-strong);
  color: var(--paper);
  transition: border-color var(--dur-button) var(--ease-out), color var(--dur-button) var(--ease-out);
}
.tags__list li:hover { border-color: var(--ice); color: var(--ice); }

/* outline button */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 52px;
  padding: 0 1.5rem;
  border: 1px solid var(--paper);
  color: var(--paper);
  text-decoration: none;
  transition: background var(--dur-button) var(--ease-out), color var(--dur-button) var(--ease-out);
}
.btn span { display: inline-block; transition: transform var(--dur-button) var(--ease-out); }
.btn:hover { background: var(--paper); color: var(--ink); }
.btn:hover span { transform: translateX(4px); }

/* ==========================================================================
   B — WORK INDEX
   ========================================================================== */
.work { padding-bottom: var(--section-y); }

.index {
  margin: clamp(2.5rem, 2rem + 3vw, 5rem) 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.index__item {
  position: relative;
  display: grid;
  grid-template-columns: 3.5rem clamp(120px, 15vw, 240px) minmax(0, 1fr) auto;
  grid-template-areas: "num media body aside";
  align-items: start;
  gap: 0.5rem clamp(1.25rem, 2.5vw, 2.5rem);
  padding-block: clamp(1.2rem, 1rem + 1.4vw, 2.4rem);
  border-bottom: 1px solid var(--line);
}
.index__num { grid-area: num; padding-top: 0.4em; color: var(--text-muted); }
.index__media {
  grid-area: media;
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--night-2);
  box-shadow: 0 0 0 1px var(--line);
}
.index__media img,
.index__body { grid-area: body; min-width: 0; }
.index__link { display: block; text-decoration: none; }
.index__link::after {                    /* the whole row is the click target */
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}
.index__title {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-index);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.01em;
  transition: transform var(--dur-card) var(--ease-out), color var(--dur-card) var(--ease-out), text-shadow var(--dur-card) var(--ease-out);
}
.index__desc { max-width: 56ch; margin-top: 1.1rem; color: var(--text-muted); }
.index__role { margin-top: 0.5rem; color: var(--text-muted); }
.index__aside {
  grid-area: aside;
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  max-width: 13rem;
  padding-top: 0.6em;
}
.index__meta { color: var(--text-muted); text-align: right; }
.index__arrow {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 300;
  transition: transform var(--dur-card) var(--ease-out);
}

/* hover and keyboard focus share one state */
.index__item:hover .index__title,
.index__item:focus-within .index__title {
  transform: translateX(0.18em);
  color: var(--accent);
  text-shadow: var(--glow);
}
.index__item:hover .index__arrow,
.index__item:focus-within .index__arrow { transform: translateX(6px); }
/* soft glow of the project colour behind the row */
.index__item { isolation: isolate; }
.index__item::before {
  content: "";
  position: absolute;
  inset: 0 calc(-1 * clamp(0.75rem, 2vw, 2rem));
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 55% 120% at 35% 50%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 75%),
    linear-gradient(to bottom, transparent 55%, color-mix(in srgb, var(--accent) 9%, transparent));
  -webkit-mask-image: linear-gradient(to right, transparent, #000 22%, #000 78%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 22%, #000 78%, transparent);
  opacity: 0;
  transition: opacity var(--dur-card) var(--ease-out);
}
.index__item { transition: border-color var(--dur-card) var(--ease-out); }
.index__item:hover::before,
.index__item:focus-within::before { opacity: 1; }
.index__item:hover,
.index__item:focus-within { border-bottom-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.index__item:hover .index__num,
.index__item:focus-within .index__num { color: var(--accent); }
.index__item:hover .index__media,
.index__item:focus-within .index__media { box-shadow: 0 0 0 1px var(--accent), 0 0 28px color-mix(in srgb, var(--accent) 30%, transparent); }
.index__media { transition: box-shadow var(--dur-card) var(--ease-out); }
.index__link:focus-visible { outline: none; }
.index__item:focus-within { outline: 2px solid var(--focus); outline-offset: 6px; }
.index__item:focus-within:not(:has(:focus-visible)) { outline: none; }

@media (max-width: 1179px) {
  .index__item {
    grid-template-columns: 3.5rem clamp(110px, 18vw, 200px) minmax(0, 1fr);
    grid-template-areas: "num media body" ". . aside";
  }
  .index__aside { padding-top: 0; }
  .index__meta { text-align: left; }
}
@media (max-width: 859px) {
  .index__item {
    grid-template-columns: 2.25rem minmax(0, 1fr);
    grid-template-areas: "num media" ". body" ". aside";
    gap: 0.9rem 1rem;
  }
  .index__media { max-width: 420px; }
}

/* cover shown for a project that has no image yet: an abstract thrown vessel */
.ph-vessel {
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse 9% 3.2% at 50% 17%, var(--cobalt-deep) 0 90%, transparent 100%),
    radial-gradient(ellipse 13% 5% at 50% 17%, var(--paper) 0 92%, transparent 100%),
    linear-gradient(var(--ice), var(--ice)) 50% 22% / 14% 20% no-repeat,
    radial-gradient(ellipse 25% 33% at 50% 63%, var(--ice) 0 97%, transparent 100%),
    repeating-radial-gradient(circle at 50% 120%, rgba(243, 241, 235, 0) 0 22px, rgba(243, 241, 235, 0.09) 23px 24px),
    var(--cobalt);
}

/* ==========================================================================
   C — LAB (full-bleed cobalt, spray-paint texture)
   ========================================================================== */
.lab {
  position: relative;
  isolation: isolate;
  overflow: clip;
  padding-block: var(--section-y);
  background: transparent;                 /* dark, like the rest: the night backdrop shows through */
  color: var(--paper);
}
.lab .label { color: var(--paper); }
.lab :focus-visible { outline-color: var(--paper); }

.lab__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem 2rem;
}
.board__pause {
  min-height: var(--target);
  padding: 0 1rem;
  border: 1px solid rgba(243, 241, 235, 0.6);
  background: transparent;
  color: var(--paper);
  cursor: pointer;
}
.board__pause:hover { background: var(--paper); color: var(--cobalt); }
.board__pause[hidden] { display: none; }

/* ---- Scattered board ---- */
.board {
  position: relative;
  margin-top: clamp(2.5rem, 2rem + 3vw, 4.5rem);
  /* the whole board fits one screen: height follows the window (never under 520px), width follows the height */
  --board-h: max(520px, calc(100svh - 130px));
  aspect-ratio: 1.15 / 1;
  width: min(100%, calc(var(--board-h) * 1.15));
  margin-inline: auto;
}
.board__list { position: absolute; inset: 0; margin: 0; padding: 0; list-style: none; }
.board__lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.board__lines line { stroke: rgba(243, 241, 235, 0.85); stroke-width: 1.25; }
.board__lines line.is-dashed { stroke-dasharray: 5 6; animation: board-dash 1.1s linear infinite; }
.board__x { stroke: var(--paper); stroke-width: 1.25; fill: none; }
.board__packet { fill: var(--paper); }
@keyframes board-dash { to { stroke-dashoffset: -22; } }
.board.is-paused .board__lines line { animation-play-state: paused; }

.board__item {
  position: absolute;
  z-index: 1;
  transition:
    left 1.4s cubic-bezier(0.65, 0, 0.35, 1),
    top 1.4s cubic-bezier(0.65, 0, 0.35, 1),
    width 1.4s cubic-bezier(0.65, 0, 0.35, 1),
    height 1.4s cubic-bezier(0.65, 0, 0.35, 1),
    opacity 0.4s var(--ease-out);
}
.board__item.is-open {
  z-index: 5;
  transition-duration: 0.7s, 0.7s, 0.7s, 0.7s, 0.4s;
}
.board__item.is-closing {                /* on its way back: stay above the others until it lands */
  z-index: 4;
  transition-duration: 0.7s, 0.7s, 0.7s, 0.7s, 0.4s;
}
.board.has-open .board__item:not(.is-open) { opacity: 0.3; }

.board__btn {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: var(--paper);
  cursor: zoom-in;
  box-shadow: 0 18px 40px -18px rgba(5, 7, 11, 0.6);
}
.board__item.is-open .board__btn { cursor: zoom-out; }
.board__frame { position: absolute; inset: 0; overflow: hidden; }
.board__frame img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* focus brackets: small squares on two corners, like a tracking frame */
.board__btn::before,
.board__btn::after {
  content: "";
  position: absolute;
  z-index: 2;
  width: 12px;
  height: 12px;
  border: 1px solid var(--paper);
  pointer-events: none;
  transition: transform 0.3s var(--ease-out);
}
.board__btn::before { top: -7px; left: -7px; }
.board__btn::after { right: -7px; bottom: -7px; }
.board__btn:hover::before { transform: translate(-3px, -3px); }
.board__btn:hover::after { transform: translate(3px, 3px); }
.board__btn:focus-visible { outline: 2px solid var(--paper); outline-offset: 6px; }

.board__coord {
  position: absolute;
  left: 0;
  bottom: 100%;
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  white-space: pre;
  color: var(--paper);
  pointer-events: none;
}
.board__cap {
  position: absolute;
  left: 0;
  top: 100%;
  margin-top: 10px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s var(--ease-out);
  pointer-events: none;
}
.board__item.is-open .board__cap { opacity: 1; transition-delay: 0.4s; }
@media (max-width: 599px) {
  .board { aspect-ratio: 5 / 9; width: 100%; }
}

@media (max-width: 859px) {
  .board__coord { font-size: 9px; margin-bottom: 5px; }
  .board__btn::before, .board__btn::after { width: 9px; height: 9px; }
  .board__btn::before { top: -5px; left: -5px; }
  .board__btn::after { right: -5px; bottom: -5px; }
}
.lab__note { margin-top: clamp(2.5rem, 2rem + 3vw, 4.5rem); max-width: 36ch; }
.lab__quote {
  margin-bottom: 1rem;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 1rem + 1.4vw, 2.25rem);
  font-weight: 300;
  line-height: 1.25;
}

/* ==========================================================================
   D — CONTACT
   ========================================================================== */
.contact {
  padding-top: var(--section-y);
  padding-bottom: clamp(5rem, 4rem + 6vw, 9rem);   /* room under the last button, not stuck to the window edge */
}
.contact__title {
  margin-top: 1.5rem;
  max-width: 20ch;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 0.9rem + 3.4vw, 4.5rem);
  font-weight: 300;
  line-height: 1.25;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-shadow: var(--glow);
  text-wrap: balance;
}
.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 3rem clamp(2rem, 6vw, 8rem);
  align-items: start;
  margin-top: clamp(3rem, 2rem + 4vw, 6rem);
}
.contact__side { display: grid; gap: 2.5rem; }

/* ---- Contact form ---- */
.form { display: grid; gap: 1.75rem; }
.field { display: grid; gap: 0.5rem; }
.field__label { color: var(--text-muted); }
.field__input {
  width: 100%;
  min-height: 52px;
  padding: 0.6rem 0;
  border: 0;
  border-bottom: 1px solid var(--text-muted);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: var(--fs-body-l);
  transition: border-color var(--dur-button) var(--ease-out);
}
.field__input--area { resize: vertical; min-height: 140px; line-height: 1.5; }
.field__input:hover { border-bottom-color: var(--text); }
.field__input:focus-visible {
  outline: none;
  border-bottom-color: var(--ice);
  box-shadow: 0 1px 0 0 var(--ice);
}
.field__input[aria-invalid="true"] { border-bottom-color: #ff8a80; }
.field__error { color: #ff8a80; }
.form__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.form__send {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 52px;
  padding: 0 1.5rem;
  border: 1px solid var(--paper);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  transition: background var(--dur-button) var(--ease-out), color var(--dur-button) var(--ease-out), border-color var(--dur-button) var(--ease-out);
}
.form__send:hover { background: transparent; color: var(--paper); }
.form__send:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
.form__send[disabled] { opacity: 0.6; cursor: progress; }
.form__status { color: var(--ice); min-height: 1.4em; }
.form__status.is-error { color: #ff8a80; }
.contact__hint { margin-bottom: 0.75rem; color: var(--text-muted); }
.contact__mail {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 0.8rem + 1.5vw, 2.1rem);
  font-weight: 300;
  letter-spacing: 0.02em;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  overflow-wrap: anywhere;
  transition: color var(--dur-button) var(--ease-out);
}
.contact__mail:hover { color: var(--ice); }

.contact__links li { border-top: 1px solid var(--line); }
.contact__links li:last-child { border-bottom: 1px solid var(--line); }
.ext-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  min-height: 56px;
  font-size: var(--fs-body-l);
  text-decoration: none;
  transition: color var(--dur-button) var(--ease-out);
}
.ext-link:hover { color: var(--ice); }
.ext-link span { display: inline-block; transition: transform var(--dur-button) var(--ease-out); }
.ext-link:hover span { transform: translate(3px, -3px); }
.ext-link[data-cv]:hover span { transform: translateY(3px); }

.contact__base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 32px;
  margin-top: clamp(4rem, 3rem + 5vw, 9rem);
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--text-muted);
}
.to-top {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: var(--target);
  color: var(--paper);
  text-decoration: none;
}
.to-top:hover { color: var(--ice); }
@media (max-width: 859px) {
  .contact__grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   CURSOR CROSS (fine pointers, decorative; the system cursor stays visible)
   ========================================================================== */
.dot {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  pointer-events: none;
  mix-blend-mode: difference;       /* stays visible on dark and light backgrounds */
  opacity: 0;
  transform: translate3d(var(--dx, -99px), var(--dy, -99px), 0);
  transition: opacity 0.25s var(--ease-out);
}
.dot::before,
.dot::after {
  content: "";
  position: absolute;
  background: #fff;
  transition: transform 0.3s var(--ease-out);
}
.dot::before { left: 0; right: 0; top: 50%; height: 1px; margin-top: -0.5px; }
.dot::after { top: 0; bottom: 0; left: 50%; width: 1px; margin-left: -0.5px; }
.dot.is-link::before { transform: rotate(45deg) scaleX(1.5); }
.dot.is-link::after { transform: rotate(45deg) scaleY(1.5); }
.dot.is-on { opacity: 1; }
@media not all and (hover: hover) and (pointer: fine) {
  .dot { display: none; }
}
@media (max-width: 859px) {
  .barcode { display: none; }
}

/* ---- work: video that follows the mouse (see initRowVideo in main.js) ---- */
.hover-video {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 60;
  width: clamp(150px, 14vw, 220px);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.22s var(--ease-out);
  will-change: transform;
}
.hover-video.is-on { opacity: 1; }
.hover-video__card {
  transform: scale(0.92);
  transform-origin: 30% 50%;
  transition: transform 0.32s var(--ease-out);
  filter: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.55));
}
.hover-video.is-on .hover-video__card { transform: none; }
.hover-video video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 540 / 1094;
  /* the recordings have a light page around the phone: clip to the phone's own edge */
  clip-path: inset(1% 3.3% 1.9% 4.1% round 12.6% / 6.2%);
}
.hover-video.is-wide { width: clamp(260px, 25vw, 400px); }
.hover-video.is-wide video { aspect-ratio: 16 / 9; clip-path: inset(0 round 6px); }

/* link from the Lab board to the full gallery */
.lab__all { display: inline-flex; gap: 0.5rem; margin-top: 0.9rem; padding: 8px 0; color: var(--accent); text-decoration: none; border-bottom: 1px solid currentColor; }
.lab__all:hover, .lab__all:focus-visible { color: var(--paper); }

/* ==========================================================================
   Buttons without boxes: plain light text with a glowing blue arrow or dot
   ========================================================================== */
.btn {
  border: 0;
  padding: 0;
  min-height: var(--target);
  text-shadow: var(--glow);
  transition: color var(--dur-button) var(--ease-out);
}
.btn span { color: var(--accent, #7aa2ff); text-shadow: 0 0 10px rgba(122, 162, 255, .8); }
.btn:hover, .btn:focus-visible { background: none; color: #dbe5ff; }
.btn:hover span, .btn:focus-visible span { transform: translateX(8px); }

.board__pause {
  border: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-shadow: var(--glow);
}
.board__pause::before {   /* a small glowing dot, steady while the board moves */
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent, #7aa2ff); box-shadow: 0 0 10px rgba(122, 162, 255, .9);
}
.board__pause[aria-pressed="true"]::before { background: transparent; box-shadow: none; border: 1px solid var(--accent, #7aa2ff); }
.board__pause:hover, .board__pause:focus-visible { background: none; color: #dbe5ff; }

/* the invitation to the About page: larger, lit in the blue of the lines */
.intro__more {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1rem + 0.8vw, 1.75rem);
  letter-spacing: -0.005em;
  color: #dbe5ff;
  text-shadow: 0 0 18px rgba(122, 162, 255, .55);
}
.intro__more span { font-size: 1.1em; }

/* ---------------------------------------------------------------- sound message (home, while scrolling) */
.nudge {
  position: fixed;
  right: var(--gutter);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: 60;
  width: min(22rem, calc(100vw - 2 * var(--gutter)));
  display: grid;
  gap: 0.9rem;
  padding: 1rem 1.15rem;
  background: color-mix(in srgb, var(--night-2) 88%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line-strong);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}
.nudge[hidden] { display: none; }
.nudge.is-in { opacity: 1; transform: none; }
.nudge__text { font-family: var(--font-body); font-size: 1rem; line-height: 1.45; color: var(--paper); }
.nudge__row { display: flex; gap: 0.6rem; }
.nudge__btn {
  min-height: 2.25rem;
  padding: 0.4rem 0.9rem;
  color: var(--paper);
  background: transparent;
  border: 1px solid var(--line-strong);
  cursor: pointer;
  transition: background 0.25s var(--ease-out), color 0.25s var(--ease-out);
}
.nudge__btn:hover { border-color: var(--accent); color: var(--accent); }
.nudge__btn--yes { background: var(--accent); color: var(--ink); border-color: var(--accent); }
.nudge__btn--yes:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }
@media (prefers-reduced-motion: reduce) { .nudge { transition: none; transform: none; } }


/* ---------------------------------------------------------------- language switch (EN / NL) */
.lang-switch span { opacity: 0.55; transition: opacity 0.2s var(--ease-out); }
.lang-switch span.is-on { opacity: 1; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--accent); }
.lang-switch:hover span, .lang-switch:focus-visible span { opacity: 1; }

/* the EN / NL switch in the hero sits just above the weather, bottom left */
.hero__lang { position: absolute; left: clamp(24px, 3.6vw, 56px); bottom: 74px; z-index: 3; min-height: var(--target); display: inline-flex; align-items: center; }
@media (max-width: 859px) { .hero__lang { bottom: 62px; } }
