/* ==================================================================
   About page — on top of site.css. Only what this page adds: the hero
   with the Polaroid, the globe, the timeline rows, the IT → CMD switch,
   the hobby cards and their camera, and the AirPods outro.
   Every colour comes from the surface tokens in site.css.
   ================================================================== */

.ab { position: relative; overflow: clip; }

/* chapter number inside an eyebrow: "01 · Where I'm from" */
.ab__num { font-variant-numeric: tabular-nums; }
.ab__num:empty { display: none; }
.ab__num::after { content: " · "; white-space: pre; }

.ab__body {
  max-width: 34rem;
  color: var(--ink-soft);
  font-size: 1.125rem;
  text-wrap: pretty;
}

/* about.js renders unfinished copy (TODO / "Vul aan") with this */
.ab__todo {
  display: block;
  margin-top: .75rem;
  padding-left: .875rem;
  border-left: 2px solid var(--brand-accent);
  font-style: normal;
  font-size: .9375rem;
  color: var(--ink-soft);
}

/* ── Hero ───────────────────────────────────────────────────────── */
.ab--hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding-top: var(--header-h);
  background:
    var(--dots),
    radial-gradient(120% 90% at 85% 10%, #828282 0%, transparent 60%),
    radial-gradient(90% 80% at 10% 100%, #4a4a4a 0%, transparent 65%),
    radial-gradient(70% 60% at 70% 85%, #767676 0%, transparent 70%),
    #545454;
}
.ab--hero [data-enter] { animation: enter 1s var(--ease-out) both; animation-delay: calc(150ms + var(--d, 0) * 90ms); }
.ab-hero {
  position: relative;
  z-index: 1;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-lg) var(--gutter);
  padding-block: var(--space-sm) var(--space-xl);
}
.ab-hero__copy {
  align-self: center;   /* level with the photo, not sunk to the bottom */
  grid-row: 1;
  display: grid;
  gap: var(--space-md);
  justify-items: start;
}
.ab-hero__title span { display: block; }
/* the name leads; "Designer who codes." is its subtitle, a step down */
.ab-hero__title .soft { margin-top: .2em; font-size: .55em; line-height: 1; }
.ab-hero__lead { max-width: 26ch; color: var(--ink-soft); text-wrap: balance; }
.ab-hero__hint {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: var(--text-caption);
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.ab-hero__hint span { width: 4rem; height: 1px; background: var(--rule); }
@media (min-width: 64rem) {
  .ab-hero { grid-template-columns: minmax(0, 1fr) auto; }
  /* the copy sits level with the photo; the scroll hint stays down at the
     foot of the hero, where it was */
  .ab-hero__hint { position: absolute; left: var(--gutter); bottom: var(--space-xl); }
  /* bigger, and pulled in from the right edge towards the copy */
  .polaroid-stage { align-self: center; grid-row: 1; grid-column: 2; margin-right: clamp(2rem, 7vw, 9rem); }
}
@media (max-width: 63.99rem) {
  .ab-hero__hint { display: none; }
  .polaroid-stage { justify-self: center; }
}

/* ── Polaroid ───────────────────────────────────────────────────────
   about-polaroid.js writes the --pol-* values from the pointer; every
   one has a resting default, so the card looks right without the script. */
.polaroid-stage {
  perspective: 900px;
  perspective-origin: 50% 45%;
}
.polaroid {
  --pol-w: clamp(17rem, min(32vw, 55svh), 30rem);   /* capped by height too, for short laptop screens */
  --pol-tilt: -3.5deg;
  --pol-rx: 0deg;
  --pol-ry: 0deg;
  --pol-lift: 0px;
  --pol-px: 0px;
  --pol-py: 0px;
  --pol-sx: 0px;
  --pol-sy: 28px;
  position: relative;
  width: var(--pol-w);
  padding: calc(var(--pol-w) * .034) calc(var(--pol-w) * .034) calc(var(--pol-w) * .137);
  background: #f6f3ec;
  box-shadow: var(--pol-sx) var(--pol-sy) 62px -10px rgba(0, 0, 0, .55),
              0 2px 5px rgba(0, 0, 0, .35);
  transform: rotateX(var(--pol-rx)) rotateY(var(--pol-ry))
             rotate(var(--pol-tilt)) translateY(var(--pol-lift));
}
.polaroid__shot {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: #12100e;
}
.polaroid__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06) translate(var(--pol-px), var(--pol-py));
}
.polaroid__sheen {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: var(--pol-sheen-o, 0);
  background: linear-gradient(105deg,
    transparent calc(var(--pol-sheen-x, 50%) - 34%),
    rgba(255, 255, 255, .16) calc(var(--pol-sheen-x, 50%) - 9%),
    rgba(255, 255, 255, .3) var(--pol-sheen-x, 50%),
    rgba(255, 255, 255, .16) calc(var(--pol-sheen-x, 50%) + 9%),
    transparent calc(var(--pol-sheen-x, 50%) + 34%));
  mix-blend-mode: screen;
}
.polaroid__caption {
  margin-top: calc(var(--pol-w) * .045);
  text-align: center;
  font-size: .8125rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #57534c;
}

/* ── 01 Where I'm from ──────────────────────────────────────────── */
.ab--globe { min-height: 100svh; display: flex; align-items: center; }
.ab__globe {
  position: absolute;
  top: 0;
  right: 0;
  width: 60%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: .9;
}
.ab-split { position: relative; z-index: 1; }
.ab-split__copy { display: grid; gap: var(--space-md); max-width: 36rem; }
@media (max-width: 63.99rem) {
  .ab--globe { flex-direction: column; align-items: stretch; padding-bottom: 0; }
  .ab__globe { position: relative; width: 100%; height: auto; aspect-ratio: 1; opacity: .7; margin-top: var(--space-md); order: 2; }
}

.ab__facts { display: grid; border-top: 1px solid var(--rule); }
.ab__facts > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-sm);
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
}
.ab__facts dt {
  font-size: var(--text-caption);
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.ab__facts dd { text-align: right; }

/* ── Timeline rows ──────────────────────────────────────────────── */
.road { border-top: 1px solid var(--rule); counter-reset: none; }
.road__row {
  display: grid;
  grid-template-columns: 2.5rem 4.5rem minmax(0, 1fr);
  grid-template-areas: "num year what" ". . kind";
  align-items: baseline;
  gap: .5rem var(--space-sm);
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--rule);
  transition: background var(--dur-base) var(--ease-out);
}
@media (min-width: 48rem) {
  .road__row {
    grid-template-columns: 3rem 6rem minmax(0, 1fr) 10rem;
    grid-template-areas: "num year what kind";
    padding: 1.5rem 0;
  }
}
.road__num { grid-area: num; font-size: var(--text-caption); color: var(--ink-soft); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.road__year { grid-area: year; font-size: var(--text-heading); letter-spacing: var(--tracking-heading); font-variant-numeric: tabular-nums; }
.road__what { grid-area: what; display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem 1rem; }
.road__title { font-size: var(--text-title); letter-spacing: var(--tracking-heading); line-height: 1.05; }
.road__where { color: var(--ink-soft); }
.road__kind { grid-area: kind; justify-self: start; }
@media (min-width: 48rem) { .road__kind { justify-self: end; } }
@media (hover: hover) {
  .road__row:hover .road__title { color: var(--brand-accent); }
}

/* ── 02 The switch ──────────────────────────────────────────────── */
.ab--switch { --cmd-yellow: #ffd60a; }
.abs-card { align-items: center; text-align: center; padding-block: var(--space-xl); }
.abs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1.25rem, 4vw, 3.5rem);
  width: 100%;
}
.abs__side {
  font-size: clamp(4rem, 2rem + 7vw, 9rem);
  line-height: 1;
  letter-spacing: var(--tracking-heading);
  color: #ffffff1f;
  transition: color .55s var(--ease-swift);
  user-select: none;
}
.abs__side.is-on { color: var(--ink); }
.abs__side--cmd.is-on { color: var(--cmd-yellow); }
.abs__toggle { flex: none; color: var(--ink); }
.abs__track {
  --tw: clamp(7.5rem, 5rem + 6vw, 11rem);
  --pad: calc(var(--tw) * .05);
  --knob: calc(var(--tw) * .36);
  position: relative;
  display: block;
  width: var(--tw);
  height: calc(var(--knob) + var(--pad) * 2 + 4px);
  padding: var(--pad);
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  overflow: hidden;
  transition: border-color .55s var(--ease-swift);
}
.abs__track::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../img/about/bg-cmd.png") center / cover no-repeat;
  opacity: 0;
  transition: opacity .55s var(--ease-swift);
}
.abs__toggle[aria-checked="true"] .abs__track { border-color: var(--cmd-yellow); }
.abs__toggle[aria-checked="true"] .abs__track::before { opacity: 1; }
.abs__knob {
  position: relative;
  z-index: 1;
  display: block;
  width: var(--knob);
  height: var(--knob);
  border-radius: 50%;
  background: var(--ink);
  transition: transform .55s var(--ease-swift);
}
.abs__toggle[aria-checked="true"] .abs__knob {
  transform: translateX(calc(var(--tw) - var(--knob) - var(--pad) * 2 - 4px));
}
.abs__toggle:focus-visible { outline-offset: 6px; border-radius: var(--radius-pill); }
.abs__panels {
  display: grid;
  width: 100%;
  margin-top: var(--space-lg);
}
.abs__panel {
  grid-area: 1 / 1;
  display: grid;
  justify-items: center;
  gap: var(--space-sm);
  opacity: 0;
  visibility: hidden;
  transform: translateY(.75rem);
  transition: opacity .45s var(--ease-out), transform .45s var(--ease-out), visibility .45s;
}
.abs__panel.is-on { opacity: 1; visibility: visible; transform: none; }
.abs__body {
  max-width: 38rem;
  color: var(--ink-soft);
  font-size: 1.125rem;
  text-wrap: pretty;
}
.abs__body .ab__todo { display: block; text-align: left; width: fit-content; margin-inline: auto; }
@media (max-width: 47.99rem) {
  .abs { flex-direction: column; }
}

/* ── Internship goals (?intro) ──────────────────────────────────── */
.ab__goals { border-top: 1px solid var(--rule); }
.ab__goal {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  gap: var(--space-sm);
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--rule);
}
.ab__goal-num { font-size: var(--text-caption); color: var(--ink-soft); letter-spacing: 0; padding-top: .375rem; }
.ab__goal-title { font-size: var(--text-title); letter-spacing: var(--tracking-heading); line-height: 1.05; margin-bottom: .5rem; }
.ab__goal-body { color: var(--ink-soft); max-width: 40rem; }

/* ── 03 Off the clock ───────────────────────────────────────────── */
.ab--hobby { position: relative; }
.hobbies {
  display: grid;
  gap: var(--space-xs);
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 64rem) { .hobbies { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.hobby { min-height: 24rem; }
.hobby__art {
  margin: var(--space-sm) 0 auto;
  color: var(--ink);
}
.hobby__art svg { width: 100%; height: auto; max-height: 11rem; }
.hobby.is-clickable { cursor: pointer; }
.hobby.is-clickable::after {
  content: "Klik";
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  padding: .3125rem .75rem;
  border-radius: var(--radius-pill);
  background: var(--brand-accent);
  color: var(--brand-white);
  font-size: var(--text-caption);
  letter-spacing: 0;
  transition: transform var(--dur-base) var(--ease-out);
}
.hobby.is-clickable:hover::after { transform: scale(1.06); }
.hobby.is-clickable:hover { outline: 1px solid var(--brand-accent); outline-offset: -1px; }

.focus-sport .sw-hand { transform-origin: 100px 72px; animation: abSweep 4s linear infinite; }
@keyframes abSweep { to { transform: rotate(360deg); } }
.focus-photo .iris { transform-origin: center; transform-box: fill-box; animation: abIris 5s ease-in-out infinite; }
.focus-photo .iris-core { transform-origin: center; transform-box: fill-box; animation: abIrisCore 5s ease-in-out infinite; }
@keyframes abIris {
  0%, 100% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(22deg) scale(.9); }
}
@keyframes abIrisCore {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(.55); }
}
.focus-web .wl { transform-origin: left center; transform-box: fill-box; animation: abType 4.2s ease-in-out infinite; }
.focus-web .wl2 { animation-delay: .35s; }
.focus-web .wl3 { animation-delay: .7s; }
@keyframes abType {
  0% { transform: scaleX(0); opacity: 0; }
  14%, 72% { transform: scaleX(1); opacity: 1; }
  88%, 100% { transform: scaleX(0); opacity: 0; }
}

/* the camera opens over the cards: sport and web step aside */
#ab-hobby.is-camera-open { min-height: 52rem; }
#ab-hobby .hobby {
  transition: transform .7s var(--ease-swift), opacity .5s var(--ease-out);
}
#ab-hobby.is-camera-open .focus-sport { transform: translateX(-26%) scale(.9); opacity: .28; }
#ab-hobby.is-camera-open .focus-web { transform: translateX(26%) scale(.9); opacity: .28; }
#ab-hobby.is-camera-open .focus-photo { opacity: 0; pointer-events: none; }
#ab-hobby .ab__head { transition: opacity .45s var(--ease-out), transform .6s var(--ease-swift); }
#ab-hobby.is-camera-open .ab__head { opacity: 0; transform: translateY(-1.5rem); }

.camstage {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  width: min(68rem, 94vw);
  aspect-ratio: 3 / 2;
  transform: translate(-50%, -50%) scale(.94);
  opacity: 0;
  visibility: hidden;
  transition: opacity .5s var(--ease-out), transform .7s var(--ease-swift), visibility .5s;
}
#ab-hobby.is-camera-open .camstage {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}
.camstage__canvas { position: absolute; inset: 0; }
.camstage__canvas canvas { width: 100%; height: 100%; display: block; }
.camstage__flash {
  position: absolute;
  inset: -20%;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, rgba(255, 255, 255, .5) 35%, transparent 70%);
  opacity: 0;
  pointer-events: none;
  mix-blend-mode: screen;
}
.camstage__flash.is-firing { animation: camflash 420ms ease-out; }
@keyframes camflash {
  0% { opacity: 0; transform: scale(.7); }
  8% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.15); }
}
.camstage__status {
  position: absolute;
  inset: 50% 0 auto;
  text-align: center;
  color: var(--ink-soft);
}
.camstage__close {
  position: absolute;
  left: 50%;
  bottom: -3rem;
  translate: -50% 0;
  height: 2.75rem;
  padding: 0 1.25rem;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: var(--canvas);
  transition: background var(--dur-fast) var(--ease-out);
}
.camstage__close:hover { background: var(--brand-accent); color: var(--brand-white); }
@media (max-width: 47.99rem) {
  .camstage { aspect-ratio: 4 / 3; }
  #ab-hobby.is-camera-open { min-height: 70rem; }
  #ab-hobby.is-camera-open .focus-sport { transform: translateY(-8%) scale(.94); }
  #ab-hobby.is-camera-open .focus-web { transform: translateY(8%) scale(.94); }
}

/* ── AirPods outro ──────────────────────────────────────────────────
   The word sits behind the model; the renderer is alpha:true and never
   clears to a colour, so the type reads straight through the canvas. */
.apods {
  position: relative;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}
.apods__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}
.apods__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.apods__heading {
  display: grid;
  margin: 0;
  font-weight: 500;
}
/* the small words sit on the big word's edges: "my" at its left, "weapon"
   at its right */
.apods__small {
  justify-self: start;
  font-size: clamp(1.75rem, 1rem + 2.6vw, 4rem);
  line-height: 1;
  letter-spacing: var(--tracking-heading);
  color: var(--ink);
}
.apods__small--end { justify-self: end; }
.apods__word { position: relative; display: block; }
.apods__bgtext {
  display: block;
  margin: 0;
  font-size: 21vw;
  line-height: 1;
  font-weight: 500;
  letter-spacing: var(--tracking-heading);
  white-space: nowrap;
  color: var(--ink);
}
.apods__eq {
  /* a little bigger than the word on every side, so no letter that
     overhangs its box (the s and the t) is ever sliced */
  position: absolute;
  inset: -9% -6%;
  width: 112%;
  height: 118%;
  pointer-events: none;
}
.apods__bg.is-eq .apods__bgtext { color: transparent; }
/* the line under the word, and the button that starts the music. While
   the section is scrubbing (.is-scrubbed) it waits for the buds to be out
   (.is-said); without the script it simply shows. */
.apods__say {
  position: absolute;
  left: 0;
  right: 0;
  bottom: var(--space-xl);
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: var(--space-sm);
  padding-inline: var(--gutter);
  text-align: center;
  transition: opacity .7s var(--ease-out), translate .7s var(--ease-out);
}
.apods.is-scrubbed:not(.is-said) .apods__say { opacity: 0; translate: 0 1rem; pointer-events: none; }
.apods__line {
  max-width: 34ch;
  font-size: var(--text-title);
  line-height: 1.1;
  letter-spacing: var(--tracking-heading);
  text-wrap: balance;
}
.apods__line .soft { display: block; }
.apods__play .sound-bars { color: inherit; }
.apods__play .apods__on,
.apods__play[aria-pressed="true"] .apods__off { display: none; }
.apods__play[aria-pressed="true"] .apods__on { display: inline; }
.apods__status {
  position: absolute;
  inset: 50% 0 auto;
  z-index: 2;
  text-align: center;
  color: var(--ink-soft);
}
@media (max-width: 47.99rem) {
  .apods__bg {
    align-items: flex-start;
    justify-content: flex-start;
    padding: calc(var(--header-h) + var(--space-sm)) var(--gutter) 0;
    z-index: 2;
  }
  .apods__bgtext { font-size: var(--text-mega); white-space: normal; }
  /* no AirPods section on phones at all, the "my secret weapon" outro included
     (about-airpods.js does not run there either) */
  .apods { display: none; }
}

/* model credits under the footer line */
.footer__credits { border-top: 0; padding-top: 0; }
.footer__credits a { text-decoration: underline; text-underline-offset: .2em; }

@media (prefers-reduced-motion: reduce) {
  .polaroid { transition: none; }
  .focus-sport .sw-hand, .focus-photo .iris, .focus-photo .iris-core, .focus-web .wl { animation: none; }
  .focus-web .wl { transform: none; opacity: 1; }
}
