/* ==========================================================================
   altmann-alexander.de – „Ruhiges Porträt“
   Farben aus dem eigenen Foto am Wasser: Himmel, Wasser, Gras, Stein.
   Schriften lokal (OFL): EB Garamond für Text und Titel, Source Sans 3 für Angaben.
   ========================================================================== */

@font-face {
  font-family: "EB Garamond";
  src: url("../schrift/eb-garamond.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "EB Garamond";
  src: url("../schrift/eb-garamond-kursiv.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("../schrift/source-sans-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("../schrift/source-sans-semibold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* --- Token ----------------------------------------------------------------- */

:root {
  color-scheme: light dark;

  --grund:       #f1f4f5;   /* heller Horizont */
  --flaeche:     #ffffff;
  --text:        #1f2428;   /* dunkler Baum */
  --text-leise:  #56606a;
  --wasser:      #36597a;   /* Wasser, für Links und Akzente */
  --himmel:      #d9e9f6;   /* Himmel, für zarte Flächen */
  --himmel-satt: #4b9fda;
  --gras:        #6f6a30;   /* trockenes Gras */
  --linie:       #d5dcdf;

  --serif: "EB Garamond", "Garamond", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans:  "Source Sans 3", "Source Sans Pro", "Segoe UI", system-ui, sans-serif;

  --t-name:   clamp(3rem, 1.6rem + 5.6vw, 5.75rem);
  --t-titel:  clamp(2.1rem, 1.5rem + 2.4vw, 3.25rem);
  --t-thema:  clamp(1.5rem, 1.3rem + 0.8vw, 1.85rem);
  --t-gross:  clamp(1.5rem, 1.25rem + 1vw, 1.95rem);
  --t-text:   clamp(1.2rem, 1.12rem + 0.3vw, 1.35rem);
  --t-angabe: 1rem;

  --rand:   clamp(1.25rem, 5vw, 4rem);
  --spalte: clamp(1rem, 3vw, 3rem);
  --breite: 76rem;
  --mass:   34em;

  --aus: cubic-bezier(0.23, 1, 0.32, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --grund:       #14191c;
    --flaeche:     #1b2226;
    --text:        #e6eaec;
    --text-leise:  #a3afb8;
    --wasser:      #93bbdd;
    --himmel:      #213547;
    --himmel-satt: #6db5e8;
    --gras:        #bdb67f;
    --linie:       #2e383d;
  }
}

/* --- Grundlagen ------------------------------------------------------------ */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--grund);
  color: var(--text);
  font-family: var(--serif);
  font-size: var(--t-text);
  line-height: 1.55;
  font-variant-numeric: oldstyle-nums proportional-nums;
}

h1, h2, h3, p, dl, dd, ol, figure { margin: 0; }
h1, h2, h3 { font-weight: 400; }
ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }

a {
  color: var(--wasser);
  text-decoration-line: underline;
  text-decoration-thickness: from-font;
  text-underline-position: from-font;
  text-underline-offset: 0.12em;
  transition: color 160ms ease;
}
@media (hover: hover) and (pointer: fine) {
  a:hover { color: var(--text); }
}

:focus-visible {
  outline: 2px solid var(--wasser);
  outline-offset: 3px;
  border-radius: 2px;
}
::selection { background: var(--himmel); color: var(--text); }

time { font-variant-numeric: lining-nums tabular-nums; }

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

.sprung {
  position: absolute;
  left: var(--rand);
  top: 0.75rem;
  z-index: 10;
  padding: 0.5rem 0.9rem;
  background: var(--text);
  color: var(--grund);
  font-family: var(--sans);
  font-size: var(--t-angabe);
  text-decoration: none;
  transform: translateY(-160%);
}
.sprung:focus-visible { transform: none; }

/* --- Kopf ------------------------------------------------------------------ */

.kopf {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  max-width: var(--breite);
  margin: 0 auto;
  padding: clamp(1.25rem, 3vw, 2rem) var(--rand) 0;
  font-family: var(--sans);
  font-size: var(--t-angabe);
}
.kopf__name {
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}
.kopf__wege {
  display: flex;
  flex-wrap: wrap;
  gap: 0 clamp(1rem, 2.5vw, 1.5rem);
}
.kopf__wege a {
  display: inline-block;
  padding-block: 0.6rem;
  color: var(--text-leise);
  text-decoration: none;
}
@media (hover: hover) and (pointer: fine) {
  .kopf__wege a:hover { color: var(--text); }
}

/* --- Gemeinsames Raster ----------------------------------------------------- */

main { display: block; }

.vorstellung,
.abschnitt {
  max-width: var(--breite);
  margin: 0 auto;
  padding-inline: var(--rand);
}

.abschnitt {
  padding-top: clamp(4.5rem, 10vw, 8rem);
  display: grid;
  gap: clamp(1.75rem, 3vw, 2.75rem);
}
.abschnitt__titel {
  font-size: var(--t-titel);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

/* --- Vorstellung ------------------------------------------------------------ */

.vorstellung {
  display: grid;
  gap: clamp(1.75rem, 4vw, 3rem);
  padding-top: clamp(2.5rem, 7vw, 5.5rem);
}
.vorstellung__bild img {
  width: 100%;
  max-width: 22rem;
  height: auto;
  aspect-ratio: 1;
  border-radius: 3px;
  background: var(--himmel);
}
.vorstellung__text {
  display: grid;
  gap: 1rem;
  max-width: var(--mass);
}
.vorstellung__name {
  font-size: var(--t-name);
  line-height: 1.02;
  letter-spacing: -0.015em;
  margin-bottom: 0.35rem;
  text-wrap: balance;
}
.vorstellung__einstieg {
  font-size: var(--t-gross);
  line-height: 1.3;
}
.vorstellung__text p { text-wrap: pretty; }

@media (min-width: 56rem) {
  .vorstellung {
    grid-template-columns: minmax(16rem, 5fr) 7fr;
    align-items: end;
    column-gap: var(--spalte);
  }
  .vorstellung__bild img { max-width: none; }
}

/* --- Interessen ------------------------------------------------------------- */

.thema {
  font-size: var(--t-thema);
  line-height: 1.15;
  margin-bottom: 0.5rem;
}

.musik {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}
.musik__text { display: grid; gap: 0.9rem; max-width: var(--mass); }
.musik__text .thema { margin-bottom: 0; }

@media (min-width: 56rem) {
  .musik { grid-template-columns: 7fr 5fr; column-gap: var(--spalte); }
}

.lissajous {
  display: grid;
  gap: 1rem;
  max-width: 22rem;
  width: 100%;
}
.lissajous__schirm {
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--flaeche);
  box-shadow: inset 0 0 0 1px var(--linie);
}
.lissajous__bild { width: 100%; height: 100%; }
.lissajous__achse { fill: none; stroke: var(--linie); stroke-width: 1; vector-effect: non-scaling-stroke; }
.lissajous__spur {
  fill: none;
  stroke: var(--wasser);
  stroke-width: 1.75;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.intervalle {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.intervalle label { position: relative; }
.intervalle input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.intervalle span {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 1rem;
  border: 1px solid var(--linie);
  border-radius: 999px;
  background: var(--flaeche);
  font-family: var(--sans);
  font-size: var(--t-angabe);
  color: var(--text);
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}
.intervalle input:checked + span { background: var(--text); border-color: var(--text); color: var(--grund); }
.intervalle input:focus-visible + span { outline: 2px solid var(--wasser); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) {
  .intervalle label:hover span { border-color: var(--text-leise); }
}

.lissajous__unten {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}
.lissajous__text {
  font-family: var(--sans);
  font-size: var(--t-angabe);
  color: var(--text-leise);
}
.ton {
  min-height: 2.75rem;
  padding: 0 1rem;
  border: 1px solid var(--linie);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-family: var(--sans);
  font-size: var(--t-angabe);
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, transform 120ms var(--aus);
}
.ton:active { transform: scale(0.97); }
.ton[aria-pressed="true"] { background: var(--wasser); border-color: var(--wasser); color: var(--grund); }

.themen {
  display: grid;
  gap: clamp(1.75rem, 3vw, 2.5rem) var(--spalte);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  margin-top: clamp(0.5rem, 2vw, 1.5rem);
}
.themen__eintrag p { text-wrap: pretty; }

/* --- Eigenes Projekt ---------------------------------------------------------- */

.projekt { display: grid; gap: 1rem; max-width: var(--mass); }
.projekt p { text-wrap: pretty; }
.projekt__link {
  font-size: var(--t-gross);
  line-height: 1.2;
}

/* --- Werdegang ---------------------------------------------------------------- */

.zeitleiste {
  position: relative;
  height: 7.5rem;
}
.zeitleiste svg { width: 100%; height: 100%; overflow: visible; }
.zeitleiste__achse { stroke: var(--linie); stroke-width: 1; vector-effect: non-scaling-stroke; }
.zeitleiste__jahr {
  font-family: var(--sans);
  font-size: 13px;
  fill: var(--text-leise);
  text-anchor: middle;
  font-variant-numeric: tabular-nums;
}
.zeitleiste__zeile {
  font-family: var(--sans);
  font-size: 13px;
  fill: var(--text-leise);
}
.zeitleiste__balken { fill: var(--wasser); transition: opacity 200ms ease; }
.zeitleiste__balken--beruf { fill: var(--text); }
.zeitleiste__arbeit { fill: var(--himmel-satt); }
.zeitleiste.hat-fokus .zeitleiste__gruppe { opacity: 0.3; }
.zeitleiste.hat-fokus .zeitleiste__gruppe.ist-hervor { opacity: 1; }
.zeitleiste__gruppe { transition: opacity 200ms ease; }

.stationen {
  display: grid;
  gap: clamp(2rem, 4vw, 3rem) var(--spalte);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}
.stationen__titel {
  font-family: var(--sans);
  font-weight: 600;
  font-size: var(--t-angabe);
  color: var(--text-leise);
  margin-bottom: 1rem;
}
.stationen__liste { display: grid; gap: 1.5rem; }
.station {
  padding-left: 1rem;
  border-left: 2px solid var(--wasser);
  transition: border-color 200ms ease;
}
.station[data-art="beruf"] { border-left-color: var(--text); }
.station.ist-hervor { border-left-color: var(--himmel-satt); }
.station__zeit {
  font-family: var(--sans);
  font-size: var(--t-angabe);
  color: var(--text-leise);
}
.station__was { font-size: 1.3rem; line-height: 1.25; margin-top: 0.1rem; }
.station__wo { color: var(--text-leise); font-variant-numeric: lining-nums; }
.station__arbeit { font-style: italic; margin-top: 0.2rem; }
.station__arbeit time { font-style: normal; }

.angaben { display: grid; gap: 0.4rem; max-width: 20rem; }
.angaben div { display: flex; justify-content: space-between; gap: 1rem; }
.angaben dd { color: var(--text-leise); font-variant-numeric: lining-nums; }

.pdf { margin-top: 1.5rem; }
.pdf__groesse { color: var(--text-leise); font-family: var(--sans); font-size: var(--t-angabe); }

/* --- Kontakt ------------------------------------------------------------------- */

.kontakt { display: grid; gap: 0.75rem; }
.kontakt__adresse {
  font-size: clamp(1.6rem, 1.1rem + 2.4vw, 2.75rem);
  line-height: 1.15;
  overflow-wrap: anywhere;
}

/* --- Fuß ------------------------------------------------------------------------ */

.fuss {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  max-width: var(--breite);
  margin: 0 auto;
  padding: clamp(4.5rem, 10vw, 8rem) var(--rand) calc(2rem + env(safe-area-inset-bottom, 0px));
  font-family: var(--sans);
  font-size: var(--t-angabe);
  color: var(--text-leise);
}
.fuss__wege { display: flex; gap: 1.5rem; }
.fuss a { color: var(--text-leise); }

/* --- Textseiten ------------------------------------------------------------------ */

.textseite {
  max-width: var(--breite);
  margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 5rem) var(--rand) 0;
}
.textseite__titel {
  font-size: var(--t-name);
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}
.textseite__inhalt { max-width: var(--mass); }
.textseite__inhalt h2 {
  font-size: var(--t-thema);
  line-height: 1.2;
  margin: 2.25rem 0 0.5rem;
}
.textseite__inhalt p + p { margin-top: 0.8em; }
.textseite__inhalt address { font-style: normal; }

/* --- Bewegung reduzieren ---------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
  }
}

/* --- Druck -------------------------------------------------------------------------- */

@media print {
  :root { --grund: #fff; --flaeche: #fff; --text: #000; --text-leise: #333; --wasser: #1d3f5e; --linie: #bbb; }
  .kopf__wege, .sprung, .lissajous, .zeitleiste { display: none !important; }
  .abschnitt { padding-top: 2rem; break-inside: avoid-page; }
  a { color: inherit; text-decoration: none; }
}
