/* Studiegids: koel gecoat papier, inkt en drie hoofdstukkleuren */
:root {
  --paper: #f5f6f8;
  --sheet: #ffffff;
  --ink: #121a2e;
  --muted: #4e586b;
  --line: #d5dae3;
  --blue: #1f4fd8;
  --green: #0e7c66;
  --yellow: #f2b705;

  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1200px;
  --gutter: clamp(20px, 5vw, 64px);
  --thumb: 0px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 1024px) {
  :root { --thumb: 72px; }
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
  scrollbar-color: var(--ink) var(--paper);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  caret-color: var(--blue);
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--blue); color: #fff; }

h1, h2, h3 { margin: 0; line-height: 1.1; font-weight: 700; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-underline-offset: 0.2em; }
img { max-width: 100%; }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 2px;
}
.cover :focus-visible,
.contact :focus-visible { outline-color: #fff; }

.wrap {
  max-width: calc(var(--wrap) + var(--thumb));
  margin: 0 auto;
  padding: 0 calc(var(--gutter) + var(--thumb)) 0 var(--gutter);
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 8px 14px;
  background: var(--ink);
  color: #fff;
}
.skip:focus { top: 12px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Duimindex ---------- */
.thumb {
  position: fixed;
  z-index: 40;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}
.thumb ol { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.thumb a {
  --on: #fff;
  display: block;
  width: 64px;
  padding: 16px 0;
  writing-mode: vertical-rl;
  transform: rotate(180deg) translateX(-26px);
  text-align: center;
  font-size: 0.8125rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--on);
  background: var(--c);
  border-radius: 0 6px 6px 0;
  box-shadow: 0 0 0 2px var(--paper);
  transition: transform 0.3s var(--ease), filter 0.2s;
}
.thumb a:hover { transform: rotate(180deg) translateX(-20px); filter: brightness(1.08); }
.thumb a[aria-current="true"] {
  transform: rotate(180deg) translateX(0);
  font-weight: 800;
}
.thumb a:focus-visible { outline-color: var(--ink); outline-offset: 2px; }

/* ---------- Knoppen ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 26px;
  font: inherit;
  font-weight: 700;
  font-size: 0.9375rem;
  text-decoration: none;
  border: 2px solid var(--ink);
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--blue); border-color: var(--blue); }
.btn-secondary { background: transparent; color: var(--ink); }
.btn-secondary:hover { background: var(--ink); color: #fff; }

/* ---------- Omslag ---------- */
.cover {
  position: relative;
  background: var(--blue);
  color: #fff;
  padding: clamp(24px, 4vh, 48px) 0 0;
}
.cover-name {
  font-size: clamp(3.4rem, 11.2vw, 11.5rem);
  font-weight: 850;
  font-stretch: 125%;
  line-height: 0.86;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  margin-left: -0.04em;
}
.cover-name .w { display: inline-block; overflow: hidden; padding-bottom: 0.04em; vertical-align: top; }
.cover-name .w > span { display: inline-block; }

.cover-body {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
  margin-top: clamp(24px, 4vh, 44px);
}
.cover-text { padding-top: 8px; }
.subtitle {
  font-size: clamp(1.25rem, 2vw, 1.625rem);
  font-weight: 650;
  font-stretch: 110%;
  letter-spacing: -0.01em;
}
.intro {
  margin-top: 16px;
  max-width: 54ch;
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.86);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
}
.cover .btn-primary { background: #fff; color: var(--ink); border-color: #fff; }
.cover .btn-primary:hover { background: var(--yellow); border-color: var(--yellow); }

.edu-badge {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 9px 14px 9px 16px;
  color: var(--ink);
  text-decoration: none;
  background: #f1f2f4;
  border: 1px solid #e2e5ea;
  border-radius: 4px;
  transition: transform 0.2s var(--ease);
}
.edu-badge:hover { transform: translateY(-2px); }
.zuyd-mark {
  font-size: 0.9375rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.18em;
  color: #d71920;
}
.edu-text { display: flex; flex-direction: column; line-height: 1.3; }
.edu-text strong { font-size: 0.9375rem; font-weight: 700; }
.edu-text span { font-size: 0.8125rem; color: var(--muted); }
.edu-degree {
  margin-left: 6px;
  padding: 3px 8px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  background: var(--ink);
  border-radius: 3px;
}

.photo {
  position: relative;
  margin: 0;
  justify-self: end;
  width: 100%;
  /* Klein genoeg dat de kerngegevens onder de omslag bij openen in beeld staan */
  max-width: clamp(180px, 28vh, 230px);
  aspect-ratio: 4 / 5;
  padding: 10px;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 24px 48px -24px rgba(0, 0, 0, 0.4);
}
.photo::before {
  content: "";
  position: absolute;
  inset: 10px;
  background: #dfe5f3;
  border-radius: 2px;
}
.initials {
  position: absolute;
  inset: 10px;
  display: grid;
  place-items: center;
  font-size: clamp(4rem, 8vw, 6rem);
  font-weight: 850;
  font-stretch: 125%;
  letter-spacing: -0.04em;
  color: #b5c1de;
}
.photo img {
  position: absolute;
  inset: 10px;
  width: calc(100% - 20px);
  height: calc(100% - 20px);
  object-fit: cover;
  border-radius: 2px;
}

.facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: clamp(28px, 4.5vh, 48px);
  border-top: 2px solid rgba(255, 255, 255, 0.9);
}
.facts > div { padding: 18px 20px 26px 0; }
.facts > div + div { padding-left: 20px; border-left: 1px solid rgba(255, 255, 255, 0.35); }
.facts dt { font-size: 0.8125rem; color: rgba(255, 255, 255, 0.78); }
.facts dd { margin-top: 4px; font-weight: 650; line-height: 1.35; }

/* ---------- Hoofdstukken ---------- */
.chapter {
  --on: #fff;
  padding: clamp(72px, 10vw, 128px) 0;
  overflow-x: clip;
}
.chapter-tint { background: #eceff3; }

.chapter-head {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  gap: 32px clamp(32px, 5vw, 72px);
  align-items: end;
  padding-bottom: 28px;
  border-bottom: 2px solid var(--ink);
}
.chapter-head h2 {
  position: relative;
  justify-self: start;
  padding: 22px 28px 20px 0;
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 850;
  font-stretch: 120%;
  letter-spacing: -0.03em;
  line-height: 0.95;
  color: var(--on);
  background: var(--c);
  border-radius: 0 6px 6px 0;
}
/* het kleurvlak loopt door tot de rand van de pagina, zoals een gedrukte hoofdstuktab */
.chapter-head h2::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  right: 100%;
  width: 100vw;
  background: var(--c);
}
.chapter-head p {
  max-width: 56ch;
  font-size: clamp(1.125rem, 1.6vw, 1.3125rem);
  line-height: 1.5;
}
.chapter-body { margin-top: 48px; }

/* Profiel: asymmetrisch, met bewuste lege ruimte links */
.profile {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  margin-top: 56px;
}
.lead {
  grid-column: 4 / 13;
  font-size: clamp(1.5rem, 2.6vw, 2.25rem);
  font-weight: 600;
  font-stretch: 105%;
  line-height: 1.25;
  letter-spacing: -0.015em;
}
.profile-cols {
  grid-column: 4 / 13;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.profile-cols p { color: var(--muted); font-size: 1rem; }

/* ---------- Werk: register van projecten, zoals het moduleoverzicht in een studiegids ---------- */
.projects { margin-top: 20px; }
.project {
  position: relative;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr) 240px 168px;
  align-items: center;
  gap: 32px;
  padding: 22px 0;
  border-bottom: 1px solid #cfd5df;
}
.shot {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #e6e9ee;
  border: 1px solid var(--line);
  border-radius: 4px;
}
.shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left top;
  transition: transform 0.6s var(--ease);
}
.project:hover .shot img { transform: scale(1.05); }
.shot-center img { object-position: center; }
.shot-dark { display: flex; align-items: center; padding: 12px; background: #0f0f0f; border-color: #0f0f0f; }
.shot-dark img { height: auto; object-fit: contain; border-radius: 3px; }
.project:hover .shot-dark img { transform: none; }

.project h3 {
  font-size: clamp(1.375rem, 2vw, 1.75rem);
  font-weight: 800;
  font-stretch: 112%;
  letter-spacing: -0.02em;
}
.project-body p { margin-top: 6px; color: var(--muted); max-width: 46ch; }

.project-meta { font-size: 0.875rem; }
.project-meta > div {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  padding: 7px 0;
  border-top: 1px solid var(--line);
}
.project-meta > div:last-child { border-bottom: 1px solid var(--line); }
.project-meta dt { color: var(--muted); }
.project-meta dd { font-weight: 700; }

.more {
  justify-self: end;
  padding: 11px 18px;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  white-space: nowrap;
  color: var(--ink);
  background: transparent;
  border: 2px solid var(--ink);
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.more::after { content: ""; position: absolute; inset: 0; z-index: 2; }
.project:hover .more { color: #fff; background: var(--blue); border-color: var(--blue); }
.more:focus-visible { outline: none; }
.project:has(.more:focus-visible) { outline: 3px solid var(--blue); outline-offset: 2px; }

/* ---------- Functies: overzichtstabel ---------- */
.roles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: auto auto auto;
  margin-top: 48px;
}
.role {
  display: grid;
  grid-row: span 3;
  grid-template-rows: subgrid;
  padding: 4px 28px 8px;
}
.role:first-child { padding-left: 0; }
.role + .role { border-left: 1px solid var(--line); }
.role h3 {
  font-size: clamp(1.1875rem, 1.6vw, 1.375rem);
  hyphens: manual;
  font-weight: 800;
  font-stretch: 112%;
  letter-spacing: -0.015em;
}
.role > p { margin-top: 10px; color: var(--muted); font-size: 0.9875rem; }
.role ul { margin-top: 20px; border-top: 2px solid var(--ink); }
.role li {
  padding: 11px 0;
  font-size: 0.9375rem;
  border-bottom: 1px solid var(--line);
}

/* ---------- Vaardigheden ---------- */
.skills {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 56px;
}
.skills > div {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: 20px;
  padding: 18px 0 20px;
  border-bottom: 1px solid #cfd5df;
}
.skills dt { font-weight: 750; }
.skills dd { color: var(--muted); font-size: 0.9375rem; }

.sub {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  gap: 24px;
  margin-top: 48px;
}
.sub h3 { font-size: 1.125rem; font-weight: 800; padding-top: 6px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags li {
  padding: 7px 14px;
  font-size: 0.9375rem;
  font-weight: 500;
  background: var(--sheet);
  border: 1px solid #cfd5df;
  border-radius: 3px;
}

/* ---------- Ervaring en opleiding ---------- */
.timeline > li {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  grid-template-rows: auto auto 1fr;
  column-gap: 48px;
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
}
.chapter-tint .timeline > li { border-color: #cfd5df; }
.timeline > li:first-child { padding-top: 0; }
.timeline .period { grid-column: 1; grid-row: 1; font-size: 0.875rem; color: var(--muted); }
.timeline .org { grid-column: 1; grid-row: 2; align-self: start; font-weight: 700; font-size: 1.0625rem; }
.timeline h3 {
  grid-column: 2;
  grid-row: 1;
  font-size: clamp(1.375rem, 2.2vw, 1.875rem);
  font-weight: 800;
  font-stretch: 112%;
  letter-spacing: -0.02em;
}
.timeline > li > p:not(.period):not(.org) { grid-column: 2; grid-row: 2; margin-top: 10px; color: var(--muted); max-width: 62ch; }
.timeline .duties { grid-column: 2; grid-row: 3; }
.duties { margin-top: 14px; }
.duties li {
  position: relative;
  padding: 6px 0 6px 22px;
  font-size: 0.9875rem;
}
.duties li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 17px;
  width: 10px;
  height: 2px;
  background: var(--c, var(--blue));
}
.degree {
  display: inline-block;
  margin-left: 10px;
  padding: 3px 8px;
  font-size: 0.75rem;
  font-weight: 700;
  font-stretch: 100%;
  letter-spacing: 0;
  vertical-align: 0.35em;
  color: #fff;
  background: var(--ink);
  border-radius: 3px;
}

/* ---------- Contact: achterkant van de gids ---------- */
.contact {
  padding: clamp(80px, 12vw, 152px) 0 clamp(56px, 8vw, 96px);
  background: var(--ink);
  color: #fff;
}
.contact-body {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 32px clamp(32px, 6vw, 96px);
  align-items: start;
  margin-top: clamp(32px, 5vw, 56px);
  padding-top: 28px;
  border-top: 2px solid #fff;
}
.contact-title {
  margin-left: -0.04em;
  font-size: clamp(3.4rem, 11.2vw, 11.5rem);
  font-weight: 850;
  font-stretch: 125%;
  letter-spacing: -0.04em;
  line-height: 0.85;
  text-transform: uppercase;
}
.contact-body .large {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  line-height: 1.45;
}
.contact-list { border-top: 1px solid rgba(255, 255, 255, 0.2); }
.contact-list > div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}
.contact-list dt { color: rgba(255, 255, 255, 0.72); font-size: 0.9375rem; }
.contact-list dd { font-weight: 700; overflow-wrap: anywhere; }
.contact-list a {
  text-decoration: none;
  background: linear-gradient(var(--yellow), var(--yellow)) left bottom / 100% 2px no-repeat;
  padding-bottom: 2px;
  transition: color 0.2s;
}
.contact-list a:hover { color: var(--yellow); }

.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.875rem;
  padding-bottom: 32px;
}
.site-footer p { padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, 0.16); }

/* ---------- Projectvenster ---------- */
.detail {
  width: min(980px, calc(100% - 32px));
  max-height: calc(100% - 48px);
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.detail::backdrop { background: rgba(18, 26, 46, 0.62); }
body:has(.detail[open]) { overflow: hidden; }
.detail-close {
  position: sticky;
  top: 16px;
  float: right;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin: 16px 16px -58px 0;
  color: #fff;
  background: var(--ink);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.15s, transform 0.2s var(--ease);
}
.detail-close:hover { background: var(--blue); transform: rotate(90deg); }
.detail-media { background: #e6e9ee; border-bottom: 2px solid var(--ink); }
.detail-media img { display: block; width: 100%; height: auto; }
.detail-media-dark { background: #0f0f0f; padding: 32px; }
.detail-media-dark img { border-radius: 6px; }
.detail-media-sheet { background: #fff; padding: 24px 24px 8px; }
.detail-video { position: relative; aspect-ratio: 16 / 9; background: #000; }
.detail-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.detail-body { padding: 36px 48px 48px; }
.detail-body-top { padding-bottom: 24px; }
.detail-body-first { padding-top: 48px; }
.detail-body-top + .stepper { margin: 0 48px; }
.stepper + .detail-body { padding-top: 32px; }
.detail h2 {
  margin-top: 6px;
  font-size: clamp(1.875rem, 3.6vw, 2.75rem);
  font-weight: 850;
  font-stretch: 120%;
  letter-spacing: -0.03em;
}
.detail-intro { margin-top: 14px; max-width: 64ch; font-size: 1.125rem; color: var(--muted); }
.detail h3 { margin-top: 32px; font-size: 1.0625rem; font-weight: 800; }
.detail-facts {
  display: flex;
  flex-wrap: wrap;
  margin-top: 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.detail-facts > div { display: flex; gap: 10px; padding: 9px 28px 9px 0; font-size: 0.9375rem; }
.detail-facts > div + div { padding-left: 28px; border-left: 1px solid var(--line); }
.detail-facts dt { color: var(--muted); }
.detail-facts dd { font-weight: 700; }
.checks { margin-top: 12px; border-top: 2px solid var(--ink); }
.checks li {
  position: relative;
  padding: 11px 0 11px 30px;
  border-bottom: 1px solid var(--line);
}
.checks li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 19px;
  width: 11px;
  height: 6px;
  border-left: 2px solid var(--blue);
  border-bottom: 2px solid var(--blue);
  transform: rotate(-45deg);
}
.gallery {
  display: grid;
  grid-template-columns: minmax(0, 2.3fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  margin-top: 32px;
}
.gallery-stack { grid-template-columns: minmax(0, 1fr); }
.gallery-doc figure { width: 100%; max-width: 600px; justify-self: center; }
.gallery figure, .step { margin: 0; }
.gallery img, .step img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}
.gallery figcaption, .step figcaption { margin-top: 8px; font-size: 0.875rem; color: var(--muted); }
.detail-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.detail-note { margin-top: 16px; font-size: 0.875rem; color: var(--muted); }

/* Stap-voor-stap demo */
.stepper-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.stepper-tabs button {
  padding: 8px 14px;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 650;
  color: var(--ink);
  background: var(--sheet);
  border: 1px solid #cfd5df;
  border-radius: 3px;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.stepper-tabs button:hover { border-color: var(--ink); }
.stepper-tabs button[aria-pressed="true"] { color: #fff; background: var(--blue); border-color: var(--blue); }
.step-doc img { max-width: 560px; margin: 0 auto; }
.step-doc figcaption { text-align: center; }
.stepper-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.stepper-count { font-size: 0.875rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.stepper-nav .btn { padding: 10px 18px; }
.stepper-nav .btn:disabled { opacity: 0.35; cursor: default; }

/* ---------- Beweging ---------- */
@media (prefers-reduced-motion: no-preference) {
  /* Openingsmoment: de naam komt omhoog uit zijn regel, het fotokader opent, de tabs schuiven in */
  .cover-name .w > span { animation: rise 0.9s var(--ease) both; }
  .cover-name .w:nth-child(2) > span { animation-delay: 0.09s; }
  .cover-text { animation: settle 0.8s var(--ease) 0.3s both; }
  .photo { animation: open-frame 0.9s var(--ease) 0.2s both; }
  .facts { animation: settle 0.8s var(--ease) 0.45s both; }
  .thumb li { animation: tab-in 0.6s var(--ease) both; }
  .thumb li:nth-child(1) { animation-delay: 0.35s; }
  .thumb li:nth-child(2) { animation-delay: 0.39s; }
  .thumb li:nth-child(3) { animation-delay: 0.43s; }
  .thumb li:nth-child(4) { animation-delay: 0.47s; }
  .thumb li:nth-child(5) { animation-delay: 0.51s; }
  .thumb li:nth-child(6) { animation-delay: 0.55s; }
  .thumb li:nth-child(7) { animation-delay: 0.59s; }
  .thumb li:nth-child(8) { animation-delay: 0.63s; }

  /* Een projectblad schuift uit de gids omhoog */
  .detail[open] { animation: sheet-up 0.5s var(--ease) both; }
  .detail[open]::backdrop { animation: fade 0.3s ease both; }
  .step:not([hidden]) { animation: step-in 0.35s var(--ease) both; }
}

@keyframes rise { from { transform: translateY(105%); } to { transform: none; } }
@keyframes settle { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes open-frame { from { clip-path: inset(100% 0 0 0 round 4px); } to { clip-path: inset(0 0 0 0 round 4px); } }
@keyframes tab-in { from { transform: translateX(100%); } to { transform: none; } }
@keyframes sheet-up { from { opacity: 0; transform: translateY(48px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes step-in { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; }
}

/* ---------- Kleinere schermen ---------- */
@media (max-width: 1023px) {
  body { padding-top: 46px; }
  html { scroll-padding-top: 58px; }
  .thumb {
    top: 0;
    left: 0;
    transform: none;
    background: var(--paper);
    border-bottom: 2px solid var(--ink);
  }
  .thumb ol {
    flex-direction: row;
    align-items: flex-start;
    gap: 3px;
    padding: 0 12px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .thumb ol::-webkit-scrollbar { display: none; }
  .thumb a {
    width: auto;
    padding: 12px 14px 10px;
    writing-mode: horizontal-tb;
    transform: translateY(-6px);
    white-space: nowrap;
    border-radius: 0 0 5px 5px;
  }
  .thumb a:hover { transform: translateY(-3px); }
  .thumb a[aria-current="true"] { transform: none; }
  .thumb li { animation: none !important; }

  .cover-body { grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr); }
  .chapter-head { grid-template-columns: 1fr; }
  .profile { display: block; }
  .profile-cols { grid-template-columns: 1fr 1fr; }
  .roles { grid-template-columns: 1fr; }
  .role, .role:first-child { padding: 28px 0; }
  .role + .role { border-left: 0; border-top: 1px solid var(--line); }
  .role { grid-row: auto; grid-template-rows: none; display: block; }
  .skills { grid-template-columns: 1fr; }
  .contact-body { grid-template-columns: 1fr; }
  .project { grid-template-columns: 200px minmax(0, 1fr); gap: 16px 24px; }
  .project-meta { max-width: 360px; }
  .project-meta { grid-column: 2; }
  .more { grid-column: 2; justify-self: start; }
}

@media (max-width: 700px) {
  .cover-body { grid-template-columns: 1fr; gap: 36px; }
  .photo { justify-self: start; max-width: 280px; }
  .facts { grid-template-columns: 1fr 1fr; }
  .facts > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .facts > div:nth-child(n + 3) { border-top: 1px solid rgba(255, 255, 255, 0.35); }
  .profile-cols { grid-template-columns: 1fr; gap: 20px; }
  .project { grid-template-columns: 1fr; }
  .project-meta, .more { grid-column: 1; }
  .skills > div { grid-template-columns: 1fr; gap: 4px; }
  .sub { grid-template-columns: 1fr; gap: 12px; }
  .timeline > li { grid-template-columns: 1fr; grid-template-rows: none; }
  .timeline .period, .timeline .org, .timeline h3,
  .timeline > li > p:not(.period):not(.org), .timeline .duties { grid-column: 1; grid-row: auto; }
  .timeline .org { order: 2; margin-top: 2px; }
  .timeline .period { order: 0; }
  .timeline h3 { order: 1; margin-top: 6px; }
  .timeline > li > p:not(.period):not(.org) { order: 3; }
  .timeline .duties { order: 4; }
  .timeline > li { display: flex; flex-direction: column; }
  .contact-list > div { grid-template-columns: 1fr; gap: 2px; }
  .detail { width: calc(100% - 16px); max-height: calc(100% - 16px); }
  .detail-body { padding: 28px 20px 32px; }
  .detail-body-top { padding-bottom: 20px; }
  .detail-body-top + .stepper { margin: 0 20px; }
  .gallery { grid-template-columns: 1fr; }
  .gallery figure:has(img[height="1298"]) { max-width: 260px; }
  .detail-media-dark { padding: 16px; }
}
