/* ============================================================
   tk. — Engineering Leadership · AI Enablement
   Idee: Bahnsteig-Beschilderung. Signalgrün-Bänder oben/unten,
   Berufsweg als Linienplan (jede Rolle = Halt).
   Eine Schrift (Archivo variabel): condensed für Display, normal für Text.
   ============================================================ */

:root {
  --paper:     #f3f5f3;   /* Bahnsteig-Beton, leicht grünstichig */
  --ink:       #16261e;   /* tiefes Tannengrün statt Schwarz */
  --mute:      #56625b;   /* AA auf paper */
  --rule:      #d3dbd5;
  --route:     #0b5d3b;   /* Signalgrün: Bänder + Linie (Weiß 8:1, Gelb 5:1) */
  --route-ink: #d2e8da;   /* Sekundärtext auf Grün */
  --signal:    #ffc83d;   /* aktueller Halt, Akzente auf Grün */

  --sans: 'Archivo', system-ui, -apple-system, sans-serif;
  --gutter: max(1.25rem, calc((100% - 68rem) / 2));
  --years: 5.5rem;        /* Spalte Jahreszahlen im Linienplan */
  --track: 3rem;          /* Spalte Linie + Halte */
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

::selection { background: var(--signal); color: var(--ink); }

a { color: inherit; }

:focus-visible { outline: 3px solid var(--route); outline-offset: 3px; border-radius: 2px; }
.band :focus-visible { outline-color: var(--signal); }

/* Display-Schnitt: schmal und schwer, wie Bahnhofsschilder */
.display {
  font-stretch: 68%;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 0.92;
}

/* ---------- Blaue Bänder (Header, Hero, Kontakt) ---------- */
.band { background: var(--route); color: #fff; }

.site-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 2rem;
  padding: 0.85rem var(--gutter);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

/* Markenzeichen als Gleisnummern-Schild */
.brand {
  display: inline-grid; place-items: center;
  width: 2.4rem; height: 2.4rem;
  background: #fff; color: var(--route);
  border-radius: 6px;
  font-stretch: 75%; font-weight: 800; font-size: 1.2rem;
  text-decoration: none; letter-spacing: -0.02em;
}

.site-nav { display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap; margin-left: auto; }
.site-nav a {
  color: var(--route-ink); text-decoration: none; font-size: 0.95rem;
  padding: 0.3rem 0; border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: #fff; }
.site-nav a[aria-current="true"] { color: #fff; border-bottom-color: var(--signal); }
.site-nav .lang-switch {
  padding: 0.2rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 4px;
  font-weight: 650; font-size: 0.82rem; letter-spacing: 0.04em;
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 15rem;
  grid-template-areas:
    "tag   photo"
    "name  photo"
    "text  text";
  column-gap: 3rem;
  padding: 4.5rem var(--gutter) 5rem;
}
.hero-tag { grid-area: tag; margin: 0 0 1.25rem; color: var(--signal); font-weight: 600; }
.hero h1 {
  grid-area: name; margin: 0; align-self: end;
  font-size: clamp(3.4rem, 10.5vw, 8.75rem);
}
.hero-photo { grid-area: photo; margin: 0; align-self: end; border-radius: 6px; overflow: hidden; }
.hero-photo img {
  display: block; width: 100%; height: auto;
  filter: url(#duotone) contrast(1.08);  /* Duoton: Tinte bis Papier */
}
.hero-text { grid-area: text; margin-top: 2.75rem; padding-top: 2rem; border-top: 6px solid #fff; }
.statement {
  margin: 0; max-width: 34ch;
  font-size: clamp(1.4rem, 2.6vw, 2rem); line-height: 1.25;
  font-weight: 600; font-stretch: 90%; letter-spacing: -0.01em;
}
.lede { margin: 1.25rem 0 0; max-width: 62ch; color: var(--route-ink); font-size: 1.125rem; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2.25rem; }
.btn {
  display: inline-block; padding: 0.8rem 1.4rem;
  font-weight: 650; font-size: 1rem; text-decoration: none;
  border-radius: 6px; border: 2px solid transparent;
}
.btn-primary { background: var(--signal); color: var(--ink); }
.btn-primary:hover { background: #fff; }
.btn-ghost { border-color: rgba(255, 255, 255, 0.6); color: #fff; }
.btn-ghost:hover { border-color: #fff; background: rgba(255, 255, 255, 0.08); }

/* ---------- Sektionen ---------- */
main > section:not(.hero) {
  display: grid;
  grid-template-columns: 14rem minmax(0, 1fr);
  column-gap: 3rem;
  padding: 6rem var(--gutter) 0;
  scroll-margin-top: 3.5rem;
}
main > section:last-child { padding-bottom: 7rem; }
.section-title {
  margin: 0; font-size: clamp(2.25rem, 4.5vw, 3.25rem);
  align-self: start; position: sticky; top: 6rem;
}
.section-body { min-width: 0; }

.prose { max-width: 64ch; }
.prose p { margin: 0 0 1.15rem; }
.prose p:first-child { font-size: 1.2rem; line-height: 1.5; }

/* ---------- Linienplan ---------- */
.route { list-style: none; margin: 0; padding: 0; }
.stop {
  position: relative;
  display: grid;
  grid-template-columns: var(--years) var(--track) minmax(0, 1fr);
  grid-template-areas: "years dot body";
  padding-bottom: 3.25rem;
}
.stop:last-child { padding-bottom: 0; }

/* Liniensegment bis zum nächsten Halt */
.stop::before {
  content: ""; position: absolute;
  left: calc(var(--years) + var(--track) / 2 - 3px);
  top: 0.9rem; bottom: -0.9rem; width: 6px;
  background: var(--route);
  transform-origin: top;
}
.stop:last-child::before { display: none; }

.stop-dot {
  grid-area: dot; justify-self: center; z-index: 1;
  width: 1.3rem; height: 1.3rem; margin-top: 0.3rem;
  background: var(--paper); border: 4px solid var(--route); border-radius: 50%;
}
.stop-now .stop-dot {
  width: 1.7rem; height: 1.7rem; margin-top: 0.1rem;
  background: var(--signal); border-width: 5px;
}

.stop-years { grid-area: years; margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.y-from { display: block; font-size: 1.6rem; line-height: 1.1; font-weight: 750; font-stretch: 75%; }
.y-to { display: block; color: var(--mute); font-size: 0.9rem; }

.stop-body { grid-area: body; min-width: 0; }
.stop-body h3 { margin: 0; font-size: 1.45rem; line-height: 1.2; font-weight: 700; font-stretch: 85%; letter-spacing: -0.01em; }
.stop-org { margin: 0.2rem 0 0; color: var(--route); font-weight: 600; }
.stop-summary { margin: 0.9rem 0 0; max-width: 52ch; font-size: 1.2rem; line-height: 1.4; font-weight: 500; }
.stop-scope { margin: 0.75rem 0 0; max-width: 66ch; }
.stop-body li strong { font-weight: 650; }
.stop-body ul { margin: 1rem 0 0; padding: 0 0 0 1.1rem; list-style: square; max-width: 66ch; color: var(--ink); }
.stop-body li { padding-left: 0.2rem; }
.stop-body li + li { margin-top: 0.55rem; }
.stop-body li::marker { color: var(--route); }

/* Ausbildung: Nebenlinie, dünner und leiser */
.route-minor .stop { padding-bottom: 2rem; }
.route-minor .stop::before { width: 2px; left: calc(var(--years) + var(--track) / 2 - 1px); background: var(--rule); }
.route-minor .stop-dot { width: 0.9rem; height: 0.9rem; margin-top: 0.5rem; border-width: 2px; border-color: var(--mute); }
.route-minor .stop:last-child { padding-bottom: 0; }
.route-minor .y-from { font-size: 1.25rem; }
.route-minor h3 { font-size: 1.2rem; }
.route-minor .stop-org { color: var(--mute); font-weight: 400; }

/* Zeichnen der Linie beim ersten Sichtbarwerden (Klasse via JS) */
.route.will-draw .stop::before { transform: scaleY(0); }
.route.will-draw .stop-dot { transform: scale(0); }
.route.is-drawn .stop::before {
  transform: scaleY(1);
  transition: transform 0.45s cubic-bezier(0.6, 0, 0.3, 1) calc(var(--i) * 0.38s + 0.15s);
}
.route.is-drawn .stop-dot {
  transform: scale(1);
  transition: transform 0.3s cubic-bezier(0.3, 1.6, 0.5, 1) calc(var(--i) * 0.38s);
}

/* ---------- Führung ---------- */
.focus { list-style: none; margin: 2.5rem 0 0; padding: 0; max-width: 46rem; border-top: 2px solid var(--ink); }
.focus li {
  display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 1.5rem;
  padding: 1rem 0; border-bottom: 1px solid var(--rule);
}
.focus strong { font-weight: 700; font-stretch: 85%; font-size: 1.1rem; }
.focus span { color: var(--mute); }

/* ---------- Sprachen ---------- */
.languages { display: flex; flex-wrap: wrap; gap: 0.75rem 3rem; margin: 2.75rem 0 0; }
.languages dt { font-weight: 700; font-stretch: 85%; font-size: 1.1rem; }
.languages dd { margin: 0; color: var(--mute); }

/* ---------- Kontakt ---------- */
footer.band { padding: 5.5rem var(--gutter) 2.5rem; margin-top: 2rem; }
footer h2 { margin: 0; font-size: clamp(3.25rem, 9vw, 7rem); }
footer p { max-width: 58ch; margin: 1.5rem 0 0; color: var(--route-ink); font-size: 1.125rem; }
.contact-links { list-style: none; margin: 2.5rem 0 0; padding: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 0.6rem; }
.contact-links a {
  font-size: clamp(1.4rem, 3.2vw, 2.25rem); font-weight: 650; font-stretch: 80%;
  text-decoration: underline; text-decoration-color: var(--signal);
  text-decoration-thickness: 3px; text-underline-offset: 0.18em;
  overflow-wrap: anywhere;
}
.contact-links a:hover { color: var(--signal); }
.footer-note { margin-top: 4.5rem; font-size: 0.875rem; color: var(--route-ink); }

/* ---------- Responsive ---------- */
@media (max-width: 56rem) {
  main > section:not(.hero) { grid-template-columns: 1fr; padding-top: 4.5rem; }
  .section-title { position: static; margin-bottom: 2rem; }
}

@media (max-width: 40rem) {
  .site-header { position: static; flex-wrap: wrap; gap: 0.75rem 1rem; }
  .site-nav { margin-left: 0; gap: 0.4rem 1rem; font-size: 0.9rem; }
  .hero {
    grid-template-columns: 1fr 6.5rem;
    grid-template-areas: "tag tag" "name photo" "text text";
    column-gap: 1rem; padding-top: 2.5rem; padding-bottom: 3.5rem;
  }
  .hero-text { margin-top: 2rem; }

  /* Linienplan: Jahre wandern in den Textblock */
  .stop { grid-template-columns: 2rem minmax(0, 1fr); grid-template-areas: "dot years" "dot body"; column-gap: 0.75rem; }
  .stop::before, .route-minor .stop::before { left: calc(1rem - 3px); }
  .route-minor .stop::before { left: calc(1rem - 1px); }
  .stop-years { text-align: left; display: flex; gap: 0.5rem; align-items: baseline; }
  .y-from, .y-to { display: inline; }
  .y-from { font-size: 1.15rem; }
  .stop-body h3 { font-size: 1.3rem; }
  .focus li { grid-template-columns: 1fr; gap: 0.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .route.will-draw .stop::before, .route.will-draw .stop-dot { transform: none; transition: none; }
}
