/* ===========================================================================
   dolle-koch.berlin – Stylesheet
   Reihenfolge: Fonts · Tokens · Reset · Shell · Komponenten · Sections ·
                Motion · Print
   Regel für Erweiterungen: nur die Tokens aus dem Block :root verwenden,
   keine neuen Farbwerte einführen.
   =========================================================================== */

/* --------------------------------------------------------------- 1. Fonts */
/* Selbst gehostet, subgesetzt auf Latin + Latin Extended. Keine Anfrage an
   fremde Server – damit ist das Thema Google Fonts / DSGVO erledigt.        */

@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/instrument-serif-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans-var.woff2") format("woff2-variations");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono-var.woff2") format("woff2-variations");
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
}

/* -------------------------------------------------------------- 2. Tokens */

:root {
  /* Farben – ausschließlich diese Werte verwenden */
  --bg: oklch(0.985 0.004 250);
  --surface: oklch(1 0 0);
  --ink: oklch(0.24 0.015 255);
  --ink-muted: oklch(0.48 0.012 255);
  --line: oklch(0.92 0.008 250);
  --accent: oklch(0.55 0.15 250);
  --accent-deep: oklch(0.4 0.13 250);
  --dark: oklch(0.19 0.02 255);
  --dark-blue: oklch(0.29 0.09 255);
  --danger: oklch(0.55 0.18 25);

  /* Typografie */
  --font-display: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --font-sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --fs-11: 11px;
  --fs-14: 14px;
  --fs-15: 15px;
  --fs-16: 16px;
  --fs-18: 18px;
  --fs-21: 21px;
  --fs-30: 30px;
  --fs-42: 42px;
  --fs-50: 50px;
  --fs-h1: clamp(46px, 5.6vw, 84px);

  /* Maße */
  --rail: min(300px, 24vw);
  --topbar: 80px;
  --content-max: 1140px;
  --pad-x: 56px;
  --pad-y: 110px;

  /* Form */
  --r-card: 18px;
  --r-input: 12px;
  --r-pill: 999px;
  --r-dialog: 22px;

  /* Bewegung */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 180ms;
  --t-slow: 280ms;
  --shadow-hover: 0 22px 50px oklch(0.3 0.02 255 / 0.1);
}

/* --------------------------------------------------------- 3. Reset & Basis */

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

html {
  scroll-behavior: smooth;
  /* Anker-Ziele nicht unter die Topbar rutschen lassen */
  scroll-padding-top: 24px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-16);
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--t-fast) var(--ease);
}

a:hover {
  color: var(--accent-deep);
}

button {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 0;
}

p {
  margin: 0 0 1em;
}

p:last-child {
  margin-bottom: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

.numeric {
  font-variant-numeric: tabular-nums;
}

/* Sichtbarer Fokus – nie entfernen. */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 200;
  transform: translateY(-200%);
  padding: 12px 20px;
  background: var(--accent);
  color: var(--surface);
  border-radius: var(--r-pill);
  font-size: var(--fs-14);
  font-weight: 600;
  text-decoration: none;
  transition: transform var(--t-fast) var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
  color: var(--surface);
}

/* --------------------------------------------------------- 4. Bausteine */

.eyebrow {
  display: inline-block;
  margin: 0 0 18px;
  font-family: var(--font-mono);
  font-size: var(--fs-11);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.eyebrow--accent {
  color: var(--accent);
}

.section-title {
  font-size: clamp(var(--fs-30), 4.2vw, var(--fs-50));
  margin-bottom: 20px;
}

.lead {
  max-width: 62ch;
  font-size: var(--fs-18);
  color: var(--ink-muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 13px 28px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-size: var(--fs-15);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease),
    background-color var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease),
    color var(--t-fast) var(--ease),
    box-shadow var(--t-slow) var(--ease);
}

.btn:active {
  transform: scale(0.98);
}

.btn--primary {
  background: var(--accent);
  color: var(--surface);
}

.btn--primary:hover {
  background: var(--accent-deep);
  color: var(--surface);
  box-shadow: var(--shadow-hover);
}

.btn--ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn--light {
  background: var(--surface);
  color: var(--dark-blue);
}

.btn--light:hover {
  color: var(--dark-blue);
  box-shadow: var(--shadow-hover);
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  transition: transform var(--t-slow) var(--ease),
    box-shadow var(--t-slow) var(--ease),
    border-color var(--t-slow) var(--ease);
}

.card:hover {
  transform: translateY(-5px);
  border-color: oklch(0.85 0.02 250);
  box-shadow: var(--shadow-hover);
}

/* ----------------------------------------------------------- 5. Shell */

.progress {
  position: fixed;
  top: 0;
  left: var(--rail);
  right: 0;
  height: 3px;
  z-index: 90;
  background: transparent;
  pointer-events: none;
}

.progress__bar {
  height: 100%;
  width: 0;
  background: var(--accent);
  transform-origin: left center;
}

.rail {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--rail);
  z-index: 100;
  display: flex;
  flex-direction: column;
  padding: 40px 30px;
  background: var(--dark);
  color: oklch(0.88 0.01 255);
}

.rail__brand {
  text-decoration: none;
  color: inherit;
}

.rail__name {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-21);
  line-height: 1.15;
  color: var(--surface);
}

.rail__role {
  display: block;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: var(--fs-11);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: oklch(0.68 0.02 255);
}

.rail__nav {
  margin-top: 48px;
  flex: 1;
}

.rail__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rail__link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 6px 0;
  font-size: var(--fs-15);
  color: oklch(0.75 0.015 255);
  text-decoration: none;
}

.rail__link::before {
  content: "";
  display: block;
  width: 14px;
  height: 1px;
  background: currentColor;
  transition: width var(--t-slow) var(--ease),
    background-color var(--t-slow) var(--ease);
}

.rail__link:hover {
  color: var(--surface);
}

.rail__link.is-active {
  color: var(--surface);
  font-weight: 600;
}

.rail__link.is-active::before {
  width: 34px;
  background: var(--accent);
}

.rail__foot {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.rail__social {
  display: flex;
  gap: 10px;
}

.rail__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid oklch(0.32 0.02 255);
  border-radius: 50%;
  color: oklch(0.78 0.015 255);
  transition: border-color var(--t-fast) var(--ease),
    color var(--t-fast) var(--ease),
    transform var(--t-fast) var(--ease);
}

.rail__social a:hover {
  border-color: var(--accent);
  color: var(--surface);
  transform: translateY(-3px);
}

.rail__copy {
  font-family: var(--font-mono);
  font-size: var(--fs-11);
  letter-spacing: 0.14em;
  color: oklch(0.6 0.015 255);
}

.rail__burger {
  display: none;
}

.rail__lang {
  align-self: flex-start;
  padding: 6px 14px;
  min-height: 32px;
  border: 1px solid oklch(0.32 0.02 255);
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: var(--fs-11);
  letter-spacing: 0.18em;
  color: oklch(0.78 0.015 255);
  text-decoration: none;
}

.rail__lang:hover {
  border-color: var(--accent);
  color: var(--surface);
}

.shell {
  margin-left: var(--rail);
}

.section {
  padding: var(--pad-y) var(--pad-x);
}

.section__inner {
  max-width: var(--content-max);
  margin: 0 auto;
}

.section--dark {
  background: var(--dark);
  color: oklch(0.86 0.01 255);
}

.section--dark .section-title,
.section--dark h3 {
  color: var(--surface);
}

.section--dark .lead {
  color: oklch(0.72 0.015 255);
}

.section--tight {
  padding-top: 0;
}

/* -------------------------------------------------------------- 6. Hero */

.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: var(--pad-y) var(--pad-x);
}

.hero__inner {
  max-width: 640px;
}

.hero__eyebrow {
  color: var(--accent);
}

.hero__name {
  font-size: var(--fs-h1);
  margin-bottom: 26px;
}

.hero__pitch {
  max-width: 54ch;
  margin-bottom: 36px;
  font-size: var(--fs-18);
  color: var(--ink-muted);
}

.hero__pitch p {
  margin-bottom: 0.7em;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero__media {
  position: relative;
  min-height: 500px;
}

.hero__figure {
  margin: 0;
  overflow: hidden;
  border-radius: var(--r-card);
  border: 1px solid var(--line);
  background: var(--surface);
}

.hero__figure picture {
  display: block;
  width: 100%;
  height: 100%;
}

.hero__figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
}

/* Hochformat 3:4 – das Porträt. */
.hero__figure--main {
  position: absolute;
  inset: 0 32% 24% 0;
}

/* Querformat 4:3 – das Stadtmotiv. Die feste Seitenverhältnis-Angabe
   verhindert, dass das Bild im Rahmen beschnitten wird. */
.hero__figure--second {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 56%;
  aspect-ratio: 4 / 3;
  box-shadow: var(--shadow-hover);
}

/* ------------------------------------------------------------ 7. Profil */

.profil__intro {
  max-width: 66ch;
  margin: 0 auto 64px;
  text-align: center;
  font-size: var(--fs-18);
  color: var(--ink-muted);
}

.profil__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 56px;
  align-items: start;
}

.skills {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.skill__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
  font-size: var(--fs-15);
  font-weight: 500;
}

.skill__value {
  font-family: var(--font-mono);
  font-size: var(--fs-11);
  letter-spacing: 0.18em;
  color: var(--ink-muted);
}

.skill__track {
  display: block;
  height: 6px;
  border-radius: var(--r-pill);
  background: var(--line);
  overflow: hidden;
}

.skill__fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--accent), var(--accent-deep));
  transition: width 900ms var(--ease);
}

.stats {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 16px;
}

.stat {
  padding: 26px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  transition: transform var(--t-slow) var(--ease),
    box-shadow var(--t-slow) var(--ease);
}

.stat:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.stat__value {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-42);
  line-height: 1;
  color: var(--accent-deep);
  font-variant-numeric: tabular-nums;
}

.stat__label {
  display: block;
  margin-top: 10px;
  font-size: var(--fs-14);
  color: var(--ink-muted);
}

/* ------------------------------------------------------- 8. Meine Arbeit */
/* Ein zusammenhaengender Text, kein Karteninhalt: zweispaltig auf grossen
   Schirmen, Ueberschrift laeuft beim Scrollen mit. Zeilenlaenge bleibt in
   der lesbaren Spanne von rund 60 bis 68 Zeichen.                          */

.essay {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 40px 64px;
  align-items: start;
}

.essay__title {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.08;
  font-size: clamp(var(--fs-30), 3.2vw, var(--fs-42));
  max-width: 16ch;
}

.essay__body {
  max-width: 64ch;
  font-size: var(--fs-18);
  color: var(--ink-muted);
}

.essay__body p {
  margin-bottom: 1.25em;
}

/* Der erste Absatz traegt den Einstieg – etwas dunkler, damit der Text
   nicht flach beginnt. */
.essay__body p:first-child {
  color: var(--ink);
}

@media (min-width: 1024px) {
  .essay__head {
    position: sticky;
    top: 90px;
  }
}

@media (max-width: 899px) {
  .essay {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .essay__title {
    max-width: 22ch;
  }

  .essay__body {
    font-size: var(--fs-16);
  }
}

/* ---------------------------------------------------------- 9. CTA-Band */

.cta {
  background: var(--dark-blue);
  color: var(--surface);
  padding: 72px var(--pad-x);
}

.cta__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.cta__status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: var(--fs-11);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: oklch(0.85 0.05 200);
}

.cta__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: oklch(0.8 0.16 150);
}

.cta__title {
  font-size: clamp(var(--fs-30), 3.4vw, var(--fs-42));
  color: var(--surface);
  margin-bottom: 12px;
}

.cta__text {
  max-width: 52ch;
  color: oklch(0.84 0.03 255);
  font-size: var(--fs-15);
}

/* -------------------------------------------------------- 10. Portfolio */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 40px 0 32px;
}

.filter {
  min-height: 44px;
  padding: 10px 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
  font-size: var(--fs-14);
  font-weight: 500;
  color: var(--ink-muted);
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease),
    color var(--t-fast) var(--ease);
}

.filter:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.filter[aria-selected="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--surface);
}

.projects {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.project {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  transition: transform var(--t-slow) var(--ease),
    box-shadow var(--t-slow) var(--ease),
    border-color var(--t-slow) var(--ease);
}

.project:hover {
  transform: translateY(-6px);
  border-color: oklch(0.85 0.02 250);
  box-shadow: var(--shadow-hover);
}

.project[hidden] {
  display: none;
}

.project__media {
  aspect-ratio: 4 / 3;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.project__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 26px 24px;
}

.project__meta {
  font-family: var(--font-mono);
  font-size: var(--fs-11);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 12px;
}

.project__title {
  font-size: var(--fs-21);
  margin-bottom: 10px;
}

.project__teaser {
  flex: 1;
  font-size: var(--fs-15);
  color: var(--ink-muted);
  margin-bottom: 20px;
}

.project__action {
  align-self: flex-start;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: none;
  font-size: var(--fs-14);
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
}

.project__action:hover {
  color: var(--accent-deep);
}

/* ------------------------------------------------------------ 11. Dialog */

.dialog {
  width: min(680px, calc(100vw - 32px));
  max-height: min(86vh, 900px);
  padding: 0;
  border: 0;
  border-radius: var(--r-dialog);
  background: var(--surface);
  color: var(--ink);
}

.dialog::backdrop {
  background: oklch(0.19 0.02 255 / 0.55);
  backdrop-filter: blur(2px);
}

.dialog__surface {
  display: flex;
  flex-direction: column;
  max-height: inherit;
  overflow: hidden;
  border-radius: inherit;
}

.mt-lg {
  margin-top: 36px;
}

.dialog__head {
  position: sticky;
  top: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 30px 30px 18px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.dialog__title {
  font-size: var(--fs-30);
}

.dialog__meta {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: var(--fs-11);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.dialog__close {
  flex: none;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  cursor: pointer;
  transition: border-color var(--t-fast) var(--ease),
    color var(--t-fast) var(--ease);
}

.dialog__close:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.dialog__body {
  padding: 26px 30px 34px;
  overflow-y: auto;
  font-size: var(--fs-15);
  color: var(--ink-muted);
}

.dialog__facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin: 0 0 24px;
}

.dialog__fact {
  padding: 14px 16px;
  background: var(--bg);
  border-radius: var(--r-input);
}

.dialog__fact dt {
  font-family: var(--font-mono);
  font-size: var(--fs-11);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.dialog__fact dd {
  margin: 6px 0 0;
  font-size: var(--fs-16);
  font-weight: 600;
  color: var(--ink);
}

.dialog__link {
  display: inline-flex;
  margin-top: 6px;
  font-weight: 600;
}

/* --------------------------------------------------------- 12. Werdegang */

.timeline {
  list-style: none;
  margin-top: 56px;
  border-left: 1px solid oklch(0.32 0.02 255);
}

.timeline__item {
  position: relative;
  padding: 0 0 44px 34px;
}

.timeline__item:last-child {
  padding-bottom: 0;
}

.timeline__item::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 9px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
}

.timeline__period {
  font-family: var(--font-mono);
  font-size: var(--fs-11);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: oklch(0.72 0.09 250);
  font-variant-numeric: tabular-nums;
}

.timeline__role {
  margin: 10px 0 4px;
  font-size: var(--fs-21);
  color: var(--surface);
}

.timeline__org {
  font-size: var(--fs-14);
  font-weight: 600;
  color: oklch(0.78 0.02 255);
}

.timeline__text {
  margin-top: 10px;
  max-width: 62ch;
  font-size: var(--fs-15);
  color: oklch(0.7 0.015 255);
}

.werdegang__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 48px;
}

.section--dark .btn--ghost {
  border-color: oklch(0.34 0.02 255);
  color: oklch(0.86 0.01 255);
}

.section--dark .btn--ghost:hover {
  border-color: var(--accent);
  color: var(--surface);
}

.degrees {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.degree {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.degree:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.degree__year {
  font-family: var(--font-mono);
  font-size: var(--fs-11);
  letter-spacing: 0.18em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.degree__title {
  margin: 6px 0 2px;
  font-size: var(--fs-18);
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ink);
}

.degree__org {
  font-size: var(--fs-14);
  color: var(--ink-muted);
}

/* ----------------------------------------------------------- 13. Kontakt */

.contact__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin: 48px 0 40px;
}

.contact-card {
  display: block;
  padding: 28px 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  text-decoration: none;
  color: inherit;
  transition: transform var(--t-slow) var(--ease),
    box-shadow var(--t-slow) var(--ease),
    border-color var(--t-slow) var(--ease);
}

a.contact-card:hover {
  transform: translateY(-5px);
  border-color: oklch(0.85 0.02 250);
  box-shadow: var(--shadow-hover);
  color: inherit;
}

.contact-card__label {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--fs-11);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 10px;
}

.contact-card__value {
  display: block;
  font-size: var(--fs-18);
  font-weight: 600;
  overflow-wrap: anywhere;
}

a.contact-card .contact-card__value {
  color: var(--accent);
}

/* ---------------------------------------------------------- 14. Formular */

.form {
  max-width: 620px;
  padding: 40px 36px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
}

.form__title {
  font-size: var(--fs-30);
  margin-bottom: 26px;
}

.field {
  margin-bottom: 22px;
}

.field__label {
  display: block;
  margin-bottom: 8px;
  font-size: var(--fs-14);
  font-weight: 600;
}

.field__req {
  color: var(--ink-muted);
  font-weight: 400;
}

.field__control {
  width: 100%;
  min-height: 48px;
  padding: 13px 16px;
  font-family: inherit;
  font-size: var(--fs-16);
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-input);
  transition: border-color var(--t-fast) var(--ease),
    background-color var(--t-fast) var(--ease);
}

.field__control:hover {
  border-color: oklch(0.85 0.02 250);
}

.field__control:focus {
  background: var(--surface);
  border-color: var(--accent);
}

textarea.field__control {
  min-height: 160px;
  resize: vertical;
  line-height: 1.6;
}

.field__control[aria-invalid="true"] {
  border-color: var(--danger);
}

.field__error {
  display: block;
  margin-top: 7px;
  font-size: var(--fs-14);
  color: var(--danger);
}

.field__error:empty {
  display: none;
}

/* Honeypot: für Menschen unsichtbar, für Bots ein Feld wie jedes andere. */
.field--trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form__note {
  margin-top: 18px;
  font-size: var(--fs-14);
  color: var(--ink-muted);
}

.form__submit[aria-busy="true"] {
  opacity: 0.7;
  pointer-events: none;
}

/* Nachricht ohne JavaScript (Fallback) */
.form__flash {
  margin-bottom: 22px;
  padding: 14px 18px;
  border-radius: var(--r-input);
  font-size: var(--fs-15);
}

.form__flash--ok {
  background: oklch(0.95 0.04 160);
  color: oklch(0.36 0.09 160);
}

.form__flash--error {
  background: oklch(0.95 0.04 25);
  color: oklch(0.42 0.14 25);
}

/* ------------------------------------------------------------- 15. Toast */

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 150;
  max-width: min(380px, calc(100vw - 48px));
  padding: 16px 20px;
  border-radius: var(--r-input);
  background: var(--dark);
  color: var(--surface);
  font-size: var(--fs-15);
  box-shadow: var(--shadow-hover);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity var(--t-slow) var(--ease),
    transform var(--t-slow) var(--ease);
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast--error {
  background: var(--danger);
}

/* ------------------------------------------------------ 16. Cookie-Banner */

.consent {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 160;
  display: none;
}

.consent.is-open {
  display: block;
}

.consent__box {
  max-width: 560px;
  margin-left: auto;
  padding: 26px 26px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: 0 26px 60px oklch(0.3 0.02 255 / 0.22);
}

.consent__title {
  margin-bottom: 10px;
  font-size: var(--fs-21);
}

.consent__text {
  margin-bottom: 18px;
  font-size: var(--fs-14);
  color: var(--ink-muted);
}

.consent__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
  padding: 16px;
  background: var(--bg);
  border-radius: var(--r-input);
}

.consent__label {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: var(--fs-14);
  cursor: pointer;
}

.consent__label input {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--accent);
  flex: none;
}

.consent__label input:disabled {
  cursor: not-allowed;
}

.consent__hint {
  display: block;
  margin-top: 3px;
  color: var(--ink-muted);
}

.consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Annahme und Ablehnung sind bewusst gleich gross und gleich auffaellig.
   Eine versteckte Ablehnung waere keine wirksame Einwilligung. */
.consent__actions .btn {
  flex: 1 1 auto;
  min-width: 150px;
}

.consent__foot {
  margin-top: 16px;
  font-size: var(--fs-11);
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  color: var(--ink-muted);
}

.consent__foot a {
  text-decoration: none;
}

.consent__foot a:hover {
  text-decoration: underline;
}

@media (max-width: 720px) {
  .consent {
    left: 10px;
    right: 10px;
    bottom: 10px;
  }

  .consent__box {
    padding: 20px 18px 18px;
  }

  .consent__actions .btn {
    flex: 1 1 100%;
  }
}

/* Banner und Toast wuerden sich unten rechts ueberlagern – der Toast weicht
   nach oben aus, solange der Banner offen ist. */
.consent.is-open ~ .toast {
  bottom: auto;
  top: 24px;
}

/* ------------------------------------------------------------ 17. Footer */

.footer {
  padding: 44px var(--pad-x);
  border-top: 1px solid var(--line);
  background: var(--bg);
}

.footer__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  font-size: var(--fs-14);
  color: var(--ink-muted);
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  list-style: none;
}

.footer__links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
}

.footer__links a:hover {
  text-decoration: underline;
}

/* ------------------------------------------------------ 18. Textseiten */

.page-head {
  padding: calc(var(--pad-y) - 20px) var(--pad-x) 0;
}

.page-head__inner {
  max-width: var(--content-max);
  margin: 0 auto;
}

.page-title {
  font-size: clamp(var(--fs-42), 5vw, var(--fs-50));
  margin-bottom: 14px;
}

.prose {
  max-width: 68ch;
  font-size: var(--fs-16);
  color: var(--ink-muted);
}

.prose h2 {
  margin: 44px 0 14px;
  font-size: var(--fs-30);
  color: var(--ink);
}

.prose h3 {
  margin: 30px 0 10px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: var(--fs-18);
  letter-spacing: 0;
  color: var(--ink);
}

.prose ul {
  margin: 0 0 1em;
  padding-left: 1.2em;
  list-style: disc;
}

.prose li {
  margin-bottom: 0.4em;
}

.prose address {
  font-style: normal;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-size: var(--fs-14);
  font-weight: 600;
  text-decoration: none;
}

.cv-block {
  margin-bottom: 52px;
}

.cv-block__title {
  padding-bottom: 12px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-21);
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: 0;
}

.cv-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.cv-item {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 20px;
}

.cv-item__period {
  font-family: var(--font-mono);
  font-size: var(--fs-11);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  padding-top: 5px;
  font-variant-numeric: tabular-nums;
}

.cv-item__role {
  font-size: var(--fs-18);
  font-weight: 600;
}

.cv-item__org {
  font-size: var(--fs-15);
  color: var(--ink-muted);
}

.cv-item__text {
  margin-top: 8px;
  font-size: var(--fs-15);
  color: var(--ink-muted);
  max-width: 62ch;
}

/* ------------------------------------------------------------ 19. Reveal */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 640ms var(--ease), transform 640ms var(--ease);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* Gestaffelt – ohne Inline-Styles, damit die CSP streng bleiben kann. */
.reveal-group > *:nth-child(2) {
  transition-delay: 80ms;
}
.reveal-group > *:nth-child(3) {
  transition-delay: 160ms;
}
.reveal-group > *:nth-child(4) {
  transition-delay: 240ms;
}
.reveal-group > *:nth-child(5) {
  transition-delay: 320ms;
}
.reveal-group > *:nth-child(6) {
  transition-delay: 400ms;
}

/* Solange JS nicht geladen ist, bleibt nichts unsichtbar hängen. */
.no-js .reveal {
  opacity: 1;
  transform: none;
}

.no-js .skill__fill {
  transition: none;
}

/* ------------------------------------------------------- 20. Breakpoints */

@media (max-width: 1180px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero__media {
    min-height: 420px;
  }
}

@media (max-width: 1024px) {
  :root {
    --pad-x: 40px;
    --pad-y: 80px;
  }
}

/* Ab hier wird die Sidebar zur Topbar. */
@media (max-width: 899px) {
  :root {
    --rail: 0px;
  }

  .progress {
    top: var(--topbar);
    left: 0;
  }

  .rail {
    inset: 0 0 auto 0;
    width: 100%;
    height: var(--topbar);
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0 22px;
    overflow: visible;
  }

  .rail__name {
    font-size: var(--fs-18);
  }

  .rail__role {
    font-size: 10px;
    letter-spacing: 0.16em;
  }

  .rail__nav {
    position: absolute;
    top: var(--topbar);
    left: 0;
    right: 0;
    margin: 0;
    padding: 12px 22px 26px;
    background: var(--dark);
    border-top: 1px solid oklch(0.28 0.02 255);
    display: none;
  }

  .rail__nav.is-open {
    display: block;
  }

  .rail__link {
    min-height: 48px;
  }

  .rail__foot {
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }

  .rail__copy {
    display: none;
  }

  .rail__social {
    display: none;
  }

  .rail__burger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid oklch(0.32 0.02 255);
    border-radius: 50%;
    background: transparent;
    color: oklch(0.85 0.01 255);
    cursor: pointer;
  }

  .shell {
    margin-left: 0;
    margin-top: var(--topbar);
  }

  html {
    scroll-padding-top: calc(var(--topbar) + 16px);
  }

  .hero {
    min-height: 0;
  }

  .hero__media {
    min-height: 400px;
  }
}

@media (max-width: 720px) {
  :root {
    --pad-x: 22px;
    --pad-y: 72px;
  }

  .form {
    padding: 28px 22px;
  }

  .hero__figure--main {
    inset: 0 30% 22% 0;
  }

  .hero__figure--second {
    width: 58%;
  }

  .cv-item {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .dialog {
    width: 100vw;
    max-width: 100vw;
    max-height: 92vh;
    margin: auto auto 0;
    border-radius: var(--r-dialog) var(--r-dialog) 0 0;
  }

  .toast {
    right: 16px;
    left: 16px;
    bottom: 16px;
    max-width: none;
  }
}

/* -------------------------------------------------- 21. Reduced Motion */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .card:hover,
  .project:hover,
  .stat:hover,
  a.contact-card:hover {
    transform: none;
  }
}

/* -------------------------------------------------------------- 22. Print */

@media print {
  .rail,
  .progress,
  .toast,
  .consent,
  .footer,
  .back-link,
  .btn,
  .cta {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }

  .shell {
    margin: 0;
  }

  .section,
  .page-head {
    padding: 0 0 18pt;
  }

  .cv-block {
    break-inside: avoid;
    margin-bottom: 24pt;
  }

  .cv-item {
    break-inside: avoid;
  }

  a {
    color: #000;
    text-decoration: none;
  }

  .prose a::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
  }
}
