/* ==========================================================================
   Web-Port — Designsystem
   Dunkel & technisch. Anker ist das ursprüngliche Footer-Blau #0d1117.
   Aufbau: Tokens → Reset → Layout → Komponenten → Breakpoints
   ========================================================================== */

:root {
  /* Flächen */
  --bg:            #0d1117;
  --bg-elevated:   #161b22;
  --bg-inset:      #010409;
  --border:        #30363d;
  --border-muted:  #21262d;

  /* Text */
  --text:          #e6edf3;
  --text-muted:    #8b949e;
  --text-faint:    #6e7681;

  /* Akzente */
  --accent:        #58a6ff;
  --accent-hover:  #79c0ff;
  --accent-dim:    rgba(88, 166, 255, 0.12);

  /* Projektarten — Farbcode zieht sich durch Karten, Filter und Detailseite */
  --kind-beruflich:         #58a6ff;
  --kind-semiprofessionell: #d2a8ff;
  --kind-hobby:             #7ee787;
  --kind-studium:           #ffa657;

  /* Typografie */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  /* Maße */
  --measure:      1100px;
  --measure-text: 68ch;
  --radius:       10px;
  --radius-sm:    6px;

  --ease: cubic-bezier(0.2, 0, 0.2, 1);
}

/* ========== Reset ========== */

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

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 700; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 650; }
h3 { font-size: 1.15rem; font-weight: 600; }

code, kbd, samp { font-family: var(--font-mono); font-size: 0.9em; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* Tastatur-Sprungmarke — nur bei Fokus sichtbar */
.skip-link {
  position: absolute; left: -9999px;
  background: var(--accent); color: var(--bg-inset);
  padding: 0.6rem 1rem; border-radius: var(--radius-sm); font-weight: 600;
}
.skip-link:focus { left: 1rem; top: 1rem; z-index: 100; }

/* ========== Layout ========== */

.wrap { width: 100%; max-width: var(--measure); margin: 0 auto; padding: 0 1.5rem; }

main { flex: 1 0 auto; padding: 3.5rem 0 5rem; }

.prose { max-width: var(--measure-text); }
.prose p, .prose ul, .prose ol { margin: 0 0 1.2em; }

.lead { font-size: 1.15rem; color: var(--text-muted); max-width: var(--measure-text); }

.section { margin-top: 4rem; }
.section > h2 { display: flex; align-items: baseline; gap: 0.75rem; }
.section > h2::after { content: ""; flex: 1; height: 1px; background: var(--border-muted); }

/* ========== Header / Navigation ========== */

.site-header {
  border-bottom: 1px solid var(--border-muted);
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 50;
}

.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; padding-top: 1rem; padding-bottom: 1rem;
}

.site-logo a {
  font-family: var(--font-mono); font-weight: 700; font-size: 1.05rem;
  color: var(--text); text-decoration: none; letter-spacing: -0.02em;
}
.site-logo a::before { content: "> "; color: var(--accent); }
.site-logo a:hover { color: var(--accent); text-decoration: none; }

.site-nav { display: flex; gap: 0.35rem; flex-wrap: wrap; }

.site-nav a {
  color: var(--text-muted); text-decoration: none;
  padding: 0.4rem 0.75rem; border-radius: var(--radius-sm);
  font-size: 0.95rem;
  transition: color 0.15s var(--ease), background 0.15s var(--ease);
}
.site-nav a:hover { color: var(--text); background: var(--bg-elevated); text-decoration: none; }
.site-nav a.is-active { color: var(--text); background: var(--accent-dim); }

/* Burger-Button: existiert nur mit JavaScript (Klasse has-js, gesetzt im
   head-Chunk) und nur auf schmalen Viewports — siehe Breakpoints unten. */
.nav-toggle { display: none; }

/* Sprachumschalter (Snippet langSwitch): am Desktop rechts neben dem Menü */
.site-header .wrap { justify-content: flex-start; }
.site-nav { margin-left: auto; }
.lang-switch {
  font-family: var(--font-mono); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.04em;
  color: var(--text-muted); text-decoration: none;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 0.3rem 0.55rem;
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease);
}
.lang-switch:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; }

/* Lebenslauf als PDF (Snippet cvLink) auf „Über mich", unter der Einleitung */
.cv-download { margin: 1.25rem 0 2.5rem; }
.cv-download a {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-mono); font-size: 0.85rem;
  color: var(--text); text-decoration: none;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 0.45rem 0.8rem;
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease);
}
.cv-download a::before { content: "↓"; content: "↓" / ""; color: var(--accent); }
.cv-download a:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; }

/* Hinweis auf englischen Seiten, solange die Übersetzung Vorschau ist */
.lang-banner {
  background: var(--accent-dim); border-bottom: 1px solid var(--border-muted);
  color: var(--text-muted); font-size: 0.88rem;
}
.lang-banner .wrap { padding-top: 0.6rem; padding-bottom: 0.6rem; }
.lang-banner strong { color: var(--text); }

/* Hinweis auf allen Seiten, solange die Website im Aufbau ist (buildBanner).
   Orange wie Baustelle, gedämpft wie der Englisch-Hinweis darunter */
.build-banner {
  background: rgba(255, 166, 87, 0.10); border-bottom: 1px solid var(--border-muted);
  color: var(--text-muted); font-size: 0.88rem;
}
.build-banner .wrap { padding-top: 0.6rem; padding-bottom: 0.6rem; }
.build-banner strong { color: #ffa657; }

/* ========== Hero (Startseite) ========== */

.hero { padding: 2rem 0 1rem; }
.hero h1 { margin-bottom: 0.3em; }
.hero-kicker {
  font-family: var(--font-mono); color: var(--accent);
  font-size: 0.9rem; letter-spacing: 0.04em; margin-bottom: 1rem;
}

/* ========== Projektkarten ========== */

.card-grid {
  display: grid; gap: 1.25rem; margin-top: 2rem;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.card {
  display: flex; flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--border-muted);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.card:hover { border-color: var(--border); transform: translateY(-2px); }

.card-media { position: relative; aspect-ratio: 16 / 9; background: var(--bg-inset); overflow: hidden; }
.card-media figure { margin: 0; height: 100%; }
.card-media picture { display: block; height: 100%; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
/* Bildnachweis (Feld „Bildnachweis", z. B. bei KI-Bildern): auf der Karte im
   Bild, damit er schon beim ersten Blick da ist; auf der Detailseite darunter */
.media-note { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-muted); }
.card-media .media-note {
  position: absolute; right: 0.5rem; bottom: 0.5rem; max-width: calc(100% - 1rem);
  padding: 0.1rem 0.45rem; border-radius: var(--radius-sm);
  background: rgba(1, 4, 9, 0.75);
}
/* Platzhalter, bis das Bild da ist — schlicht, damit er nicht nach Fehler aussieht */
.card-media--leer {
  display: grid; place-items: center; color: var(--border);
  background: repeating-linear-gradient(135deg, var(--bg-inset) 0 12px, var(--bg) 12px 24px);
  border-bottom: 1px solid var(--border-muted);
}

.card-body { padding: 1.1rem 1.25rem 1.25rem; display: flex; flex-direction: column; flex: 1; }

.card-title { margin: 0 0 0.4rem; font-size: 1.1rem; }
.card-title a { color: var(--text); text-decoration: none; }
.card-title a:hover { color: var(--accent); text-decoration: none; }

.card-summary { color: var(--text-muted); font-size: 0.95rem; margin: 0 0 1rem; flex: 1; }
.card .tags { margin-bottom: 1rem; }

.card-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.75rem; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-faint);
}

/* ========== Meta: Art-Badge, Tags ========== */

.kind {
  font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase;
  letter-spacing: 0.06em; padding: 0.2rem 0.5rem; border-radius: 999px;
  border: 1px solid currentColor; white-space: nowrap;
}
.kind--beruflich         { color: var(--kind-beruflich); }
.kind--semiprofessionell { color: var(--kind-semiprofessionell); }
.kind--hobby             { color: var(--kind-hobby); }
.kind--studium           { color: var(--kind-studium); }

.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0; margin: 0; list-style: none; }
.tags li {
  font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-muted);
  background: var(--bg-inset); border: 1px solid var(--border-muted);
  padding: 0.15rem 0.5rem; border-radius: var(--radius-sm);
}
/* Verlinkter Tag (→ Skill-Seite): Link füllt den ganzen Chip */
.tags a {
  display: block; margin: -0.15rem -0.5rem; padding: 0.15rem 0.5rem;
  color: inherit; border-radius: inherit;
}
.tags li:has(> a:hover) { border-color: var(--accent); }
.tags a:hover { color: var(--accent); text-decoration: none; }

/* ========== Projekt-Detailseite ========== */

.project-head {
  border-bottom: 1px solid var(--border-muted);
  padding-bottom: 1.75rem; margin-bottom: 2rem;
}

.project-meta {
  display: flex; flex-wrap: wrap; gap: 0.6rem 1.5rem;
  font-family: var(--font-mono); font-size: 0.85rem; color: var(--text-muted);
  margin: 1rem 0 0;
}
.project-meta > div { display: flex; align-items: baseline; gap: 0.4rem; }
.project-meta dt { color: var(--text-faint); }
.project-meta dd { margin: 0; color: var(--text); }

/* Titelbild: volles Motiv in Inhaltsbreite, höchstens 720 px hoch und nie
   breiter als die Datei — Hochformate (Plakate) und kleine Logos werden dadurch
   schmaler und stehen mittig. --ratio (Breite/Höhe) und --w (größte Breite)
   setzt das Snippet projectImage: So steht die Breite schon vor dem Laden fest,
   die Höhe folgt aus width/height am <img> — nichts springt. */
.project-media { display: block; margin: 0 0 2rem; }
.project-media picture { display: block; }
.project-media .media-note { margin-top: 0.5rem; text-align: center; }
.project-media img {
  width: min(100%, calc(720px * var(--ratio, 1.7778)), var(--w, 100%));
  margin: 0 auto;
  border-radius: var(--radius);
  background: var(--bg-inset);
}

/* Bild-Baustein (ContentBlocks): wie das Titelbild, im Textfluss. Die leere
   Unterschrift (kein Text, kein Nachweis) blendet :empty aus. */
.cb-figure { margin: 2rem 0; }
.cb-figure picture { display: block; }
.cb-figure img {
  width: min(100%, calc(720px * var(--ratio, 1.7778)), var(--w, 100%));
  margin: 0 auto;
  border-radius: var(--radius);
  background: var(--bg-inset);
}
.cb-figure figcaption { margin-top: 0.5rem; font-size: 0.9rem; color: var(--text-muted); text-align: center; }
.cb-figure figcaption:empty { display: none; }
.cb-figure .media-note { display: block; margin-top: 0.25rem; }
/* Video-Baustein: Zwei-Klick-Kasten aus videoEmbed, Abstand gibt die figure */
.cb-video .video-list { margin: 0; }

/* Galerie-Baustein: Kacheln im Ausschnitt 16:9 wie die Projektkarten, ein
   Klick öffnet das ganze Bild */
.cb-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}
.cb-gallery-item { margin: 0; }
.cb-gallery-item a, .cb-gallery-item picture { display: block; }
.cb-gallery-item img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  background: var(--bg-inset);
}
.cb-gallery-item a:hover img { outline: 2px solid var(--accent); outline-offset: 2px; }
.cb-gallery-item figcaption { margin-top: 0.4rem; font-size: 0.85rem; color: var(--text-muted); }
.cb-gallery-item figcaption:empty { display: none; }

.backlink { font-family: var(--font-mono); font-size: 0.85rem; color: var(--text-muted); }
.backlink::before { content: "← "; }
.backlink:hover { color: var(--accent); }

/* ========== Filterleiste ========== */

.filters { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 1.5rem 0 0; }
.filter {
  font-family: var(--font-mono); font-size: 0.82rem;
  background: var(--bg-elevated); color: var(--text-muted);
  border: 1px solid var(--border-muted); border-radius: 999px;
  padding: 0.3rem 0.85rem; cursor: pointer;
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease);
}
.filter:hover { color: var(--text); border-color: var(--border); }
.filter[aria-pressed="true"] {
  color: var(--bg-inset); background: var(--accent); border-color: var(--accent);
}

/* ========== Zeitstrahl: zwei Spuren ==========
   Raster je Jahr: Jahreszahl | Beruf & Ausbildung | Projekte & Privates.
   Die linke Linie jeder Spur läuft über alle Jahre durch — auch durch leere
   Zellen —, so entstehen die zwei Spuren. */

.timeline { margin-top: 2rem; --lane-pad: 1.25rem; }

.timeline-head,
.tl-year {
  display: grid; gap: 0 2rem;
  grid-template-columns: 4.5rem minmax(0, 3fr) minmax(0, 2fr);
}

.timeline-head {
  font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-faint);
  padding-bottom: 0.6rem; border-bottom: 1px solid var(--border-muted);
}
.timeline-head span + span { padding-left: var(--lane-pad); }

.timeline-years { list-style: none; margin: 0; padding: 0; }
.tl-year { border-bottom: 1px solid var(--border-muted); }

.tl-year-label {
  font-family: var(--font-mono); font-size: 1.05rem; font-weight: 600; color: var(--accent);
  margin: 0; padding: 1.5rem 0; align-self: start;
  position: sticky; top: 4.5rem;
}

.tl-lane { padding: 1.5rem 0 1.5rem var(--lane-pad); border-left: 2px solid var(--lane); }
.tl-lane--work { --lane: color-mix(in srgb, var(--kind-beruflich) 45%, transparent); --dot: var(--kind-beruflich); }
.tl-lane--side { --lane: color-mix(in srgb, var(--kind-semiprofessionell) 40%, transparent); --dot: var(--kind-semiprofessionell); }

/* Spurname: am Desktop steht er im Kopf, hier nur für Screenreader —
   auf schmalen Viewports sichtbar (siehe Breakpoints) */
.tl-lane-name {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.tl-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; }
.tl-items > li { position: relative; }
.tl-items > li::before {
  content: ""; position: absolute; top: 0.55rem;
  left: calc(-1 * var(--lane-pad) - 5px);
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--dot); box-shadow: 0 0 0 4px var(--bg);
}

.tl-when {
  font-family: var(--font-mono); font-size: 0.82rem; color: var(--text-faint);
  display: block; margin-bottom: 0.15rem;
}
.tl-what  { font-weight: 600; color: var(--text); }
.tl-where { color: var(--text-muted); }
.tl-station p { margin: 0.4rem 0 0; color: var(--text-muted); }
.tl-track {
  display: inline-block; margin: 0 0.5rem 0.25rem 0;
  font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-faint);
  border: 1px solid var(--border-muted); border-radius: 999px; padding: 0 0.5rem;
}
.tl-desc { font-style: italic; }
.tl-body { margin-top: 0.5rem; color: var(--text-muted); font-size: 0.95rem; }
.tl-body ul { margin: 0; padding-left: 1.1rem; }
.tl-body li { margin: 0.15rem 0; }

/* Fortsetzung einer Station aus einem früheren Jahr: leise, Punkt hohl */
.tl-cont { font-size: 0.88rem; color: var(--text-faint); }
.tl-items > .tl-cont::before { background: var(--bg); border: 2px solid var(--lane); width: 9px; height: 9px; left: calc(-1 * var(--lane-pad) - 5.5px); }
.tl-cont-what { color: var(--text-muted); }
.tl-cont-when { font-family: var(--font-mono); font-size: 0.78rem; white-space: nowrap; }

.tl-project { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 0.6rem; }
.tl-project a { color: var(--text); font-weight: 500; }
.tl-project a:hover { color: var(--accent); }
.tl-items > .tl-project::before { width: 6px; height: 6px; left: calc(-1 * var(--lane-pad) - 4px); top: 0.6rem; }

/* ========== Projekte nach Jahr ========== */

.year-nav { margin: 1.25rem 0 0; }
.year-nav ul { display: flex; flex-wrap: wrap; gap: 0.25rem 0.9rem; padding: 0; margin: 0; list-style: none; }
.year-nav a { font-family: var(--font-mono); font-size: 0.9rem; color: var(--text-muted); }
.year-nav a:hover { color: var(--accent); }

.year-group { margin-top: 3rem; scroll-margin-top: 5rem; }
.year-heading {
  font-family: var(--font-mono); font-size: 1.1rem; color: var(--accent);
  display: flex; align-items: baseline; gap: 0.75rem; margin: 0 0 1rem;
}
.year-heading::after { content: ""; flex: 1; height: 1px; background: var(--border-muted); }

/* ========== Videos (Zwei-Klick) ========== */

/* minmax(0, 1fr): sonst macht aspect-ratio die Box auf schmalen Bildschirmen
   breiter als die Seite (Text höher als 16:9 → Breite wächst mit) */
.video-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; margin: 0 0 2rem; }
.video-consent {
  aspect-ratio: 16 / 9; display: flex; flex-direction: column; justify-content: center;
  gap: 0.75rem; padding: 1.5rem; background: var(--bg-inset);
  border: 1px solid var(--border-muted); border-radius: var(--radius);
}
.video-consent-text { margin: 0; max-width: 52ch; color: var(--text-muted); font-size: 0.9rem; }
.video-consent-text strong { color: var(--text); }
.video-consent-actions { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.video-consent-load {
  font: inherit; font-size: 0.9rem; cursor: pointer;
  color: var(--bg); background: var(--accent); border: 0; border-radius: var(--radius-sm);
  padding: 0.5rem 1rem;
}
.video-consent-load:hover { background: var(--accent-hover); }
.video-consent.is-loaded { padding: 0; background: #000; }
.video-consent iframe { width: 100%; height: 100%; border: 0; border-radius: var(--radius); }

/* ========== Skill-Gruppen ========== */

.skills {
  display: grid; gap: 1.25rem; margin-top: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.skill-group {
  background: var(--bg-elevated); border: 1px solid var(--border-muted);
  border-radius: var(--radius); padding: 1.1rem 1.25rem;
}
.skill-group h3 {
  font-family: var(--font-mono); font-size: 0.82rem; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-faint); margin-bottom: 0.75rem;
}

/* ========== Skill-Querschnitt (/skills/) ========== */

.skill-legend {
  display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; list-style: none;
  padding: 0; margin: 1.5rem 0 0;
  font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-faint);
}
.skill-legend li { display: inline-flex; align-items: center; gap: 0.45rem; }

.skill-index { display: flex; flex-wrap: wrap; gap: 0.55rem; list-style: none; padding: 0; margin: 1.5rem 0 0; }
.skill-index a {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-mono); font-size: 0.88rem; color: var(--text);
  background: var(--bg-elevated); border: 1px solid var(--border-muted);
  border-radius: var(--radius-sm); padding: 0.35rem 0.7rem;
  transition: border-color 0.15s var(--ease), color 0.15s var(--ease);
}
.skill-index a:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; }
.skill-dots { display: inline-flex; gap: 3px; }

/* Ein Punkt je Projekt, Farbe = Art */
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--text-faint); }
.dot--beruflich         { background: var(--kind-beruflich); }
.dot--semiprofessionell { background: var(--kind-semiprofessionell); }
.dot--hobby             { background: var(--kind-hobby); }
.dot--studium           { background: var(--kind-studium); }

.skill-head { border-bottom: 1px solid var(--border-muted); padding: 0.75rem 0 1.75rem; }
.skill-head h1 { font-family: var(--font-mono); letter-spacing: -0.03em; }
.skill-split {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; list-style: none;
  padding: 0; margin: 1rem 0 0;
  font-family: var(--font-mono); font-size: 0.85rem; color: var(--text-muted);
}
/* ========== Footer ========== */

.site-footer {
  background-color: var(--bg-inset);
  border-top: 1px solid var(--border-muted);
  color: var(--text-muted);
  padding: 2.5rem 0;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.footer-content {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem;
}

.footer-content a { color: var(--text-muted); text-decoration: none; }
.footer-content a:hover { color: var(--text); text-decoration: underline; }

.footer-left   { font-family: var(--font-mono); font-size: 0.85rem; }
.footer-center { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.footer-right  { display: flex; gap: 0.85rem; align-items: center; }

.footer-right a { display: inline-flex; }
.footer-right svg { width: 20px; height: 20px; fill: currentColor; transition: transform 0.2s var(--ease); }
.footer-right a:hover svg { transform: scale(1.12); }

/* ========== Hilfsklassen ========== */

.is-hidden { display: none !important; }

/* Nur für Screenreader */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.empty-note {
  color: var(--text-faint); font-family: var(--font-mono); font-size: 0.9rem;
  border: 1px dashed var(--border); border-radius: var(--radius);
  padding: 1.5rem; text-align: center; margin-top: 2rem;
}

/* ========== Offline-Maske (Template Offline) ==========
   Eine Karte mittig auf dem Raster, ein ruhig pulsierender Statuspunkt.
   Ohne Header und Footer — es gibt nichts, wohin man navigieren könnte. */

body.offline {
  background:
    radial-gradient(ellipse 60% 50% at 50% 40%, var(--accent-dim), transparent 70%),
    linear-gradient(var(--border-muted) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, var(--border-muted) 1px, transparent 1px) 0 0 / 48px 48px,
    var(--bg);
}
.offline-main { flex: 1; display: grid; place-items: center; padding: 3rem 1.25rem; }
.offline-card {
  width: 100%; max-width: 34rem;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius); padding: clamp(1.75rem, 5vw, 2.75rem);
  box-shadow: 0 24px 60px rgba(1, 4, 9, 0.6);
}
.offline-card h1 { font-size: clamp(1.9rem, 6vw, 2.6rem); }
.offline-card p { margin: 0 0 1rem; }
.offline-brand {
  display: flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-mono); font-size: 0.85rem; letter-spacing: 0.04em;
  color: var(--text-muted); margin-bottom: 1.75rem !important;
}
.offline-dot {
  width: 0.55rem; height: 0.55rem; border-radius: 50%;
  background: var(--kind-studium); box-shadow: 0 0 0 0 rgba(255, 166, 87, 0.5);
  animation: offline-pulse 2.4s var(--ease) infinite;
}
@keyframes offline-pulse {
  70%  { box-shadow: 0 0 0 0.6rem rgba(255, 166, 87, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 166, 87, 0); }
}
.offline-en {
  margin: 1.5rem 0; padding-top: 1.25rem;
  border-top: 1px solid var(--border-muted); color: var(--text-muted);
}
.offline-en-title { color: var(--text); font-weight: 600; margin-bottom: 0.25rem !important; }
.offline-contact {
  display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center;
  font-family: var(--font-mono); font-size: 0.9rem; margin: 0 !important;
}
.offline-sep { color: var(--text-faint); }

/* ========== Breakpoints ========== */

@media (max-width: 768px) {
  main { padding: 2.5rem 0 3.5rem; }

  .site-header .wrap { flex-wrap: wrap; gap: 0.75rem; }
  .site-nav { gap: 0.15rem; margin-left: -0.75rem; width: 100%; order: 4; }
  /* Mobil: Logo | Sprache, Burger — das Menü klappt darunter auf */
  .lang-switch { order: 2; margin-left: auto; }
  .nav-toggle  { order: 3; }

  /* Mit JS: Navigation eingeklappt, Burger-Button neben dem Logo */
  html.has-js .nav-toggle {
    display: inline-flex; align-items: center; gap: 0.6rem;
    background: none; border: 1px solid var(--border); border-radius: var(--radius-sm);
    color: var(--text-muted); font: inherit; font-size: 0.9rem;
    padding: 0.45rem 0.75rem; cursor: pointer;
    transition: color 0.15s var(--ease), background 0.15s var(--ease);
  }
  html.has-js .nav-toggle:hover,
  html.has-js .nav-toggle[aria-expanded="true"] { color: var(--text); background: var(--bg-elevated); }
  html.has-js .nav-toggle-bar {
    width: 16px; height: 2px; background: currentColor; border-radius: 1px;
    box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor;
  }
  html.has-js .site-nav {
    display: none; flex-direction: column; margin-left: 0;
    padding-top: 0.5rem; border-top: 1px solid var(--border-muted);
  }
  html.has-js .site-nav.is-open { display: flex; }
  html.has-js .site-nav a { padding: 0.65rem 0.75rem; }

  .footer-content { flex-direction: column; text-align: center; }
  .footer-right  { order: 1; }
  .footer-left   { order: 2; }
  .footer-center { order: 3; justify-content: center; }

  /* Zeitstrahl: Spuren untereinander, Spurname sichtbar, leere Spuren weg */
  .timeline-head { display: none; }
  .tl-year { grid-template-columns: minmax(0, 1fr); }
  .tl-year-label { position: static; padding: 1.5rem 0 0.25rem; }
  .tl-lane { padding: 0.75rem 0 0.75rem var(--lane-pad); }
  .tl-lane.is-empty { display: none; }
  .tl-lane-name {
    position: static; width: auto; height: auto; margin: 0 0 0.75rem; overflow: visible;
    clip: auto; white-space: normal;
    font-family: var(--font-mono); font-size: 0.72rem; font-weight: 400; text-transform: uppercase;
    letter-spacing: 0.06em; color: var(--text-faint);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .card:hover { transform: none; }
}

/* ========== Kontaktformular ========== */

.contact-form { display: grid; gap: 1.1rem; max-width: 40rem; margin-top: 1rem; }
.field { display: grid; gap: 0.35rem; }
.field label { font-size: 0.9rem; color: var(--text-muted); }
.field input,
.field textarea {
  font: inherit; color: var(--text);
  background: var(--bg-inset); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 0.6rem 0.75rem;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.field textarea { resize: vertical; min-height: 9rem; }
.field input:focus,
.field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.field [aria-invalid="true"] { border-color: #f85149; }
.field-error { margin: 0; color: #ff7b72; font-size: 0.85rem; }

.button {
  justify-self: start; font: inherit; font-size: 0.95rem; cursor: pointer;
  color: var(--bg); background: var(--accent); border: 0;
  border-radius: var(--radius-sm); padding: 0.6rem 1.2rem;
  transition: background 0.15s var(--ease);
}
.button:hover { background: var(--accent-hover); }

.form-note { margin: 0; font-size: 0.85rem; color: var(--text-faint); }
.form-alert { padding: 0.8rem 1rem; border-radius: var(--radius-sm); border: 1px solid; margin: 1rem 0 0; }
.form-alert--ok { color: #7ee787; border-color: rgba(126, 231, 135, 0.4); background: rgba(126, 231, 135, 0.08); }
.form-alert--error { color: #ff7b72; border-color: rgba(248, 81, 73, 0.4); background: rgba(248, 81, 73, 0.08); }

/* Honeypot: aus dem Layout genommen, aber nicht display:none (das erkennen Bots) */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
