/* ============================================================
   Stylesheet – Persönliche Webseite
   Schriften werden lokal eingebunden (keine externen Requests).
   Die Font-Dateien in den Ordner /fonts legen – siehe fonts/README.txt
   ============================================================ */

/* ---------- Lokale Schriften ---------- */
@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/SpaceGrotesk-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/SpaceGrotesk-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ---------- Design-Tokens ---------- */
:root {
  --papier: #f5f6f8;
  --flaeche: #ffffff;
  --graphit: #16191f;
  --schiefer: #545d6a;
  --linie: #e2e5ea;
  --akzent: #1e45d6;
  --akzent-dunkel: #142f96;
  --fokus: #16191f;

  --schrift-display: "Space Grotesk", system-ui, sans-serif;
  --schrift-text: "Inter", system-ui, sans-serif;

  --breite: 1040px;
  --radius: 6px;
}

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

html {
  scroll-behavior: smooth;
}

@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;
  }
}

body {
  margin: 0;
  font-family: var(--schrift-text);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--graphit);
  background-color: var(--papier);
  -webkit-font-smoothing: antialiased;
  /* Sicherheitsnetz gegen horizontales Scrollen auf Mobilgeräten */
  overflow-x: clip;
}

/* Lange deutsche Wörter (z. B. "Dienstleistungsgewerkschaft") dürfen
   umbrechen bzw. getrennt werden, statt das Layout zu sprengen */
p,
h1,
h2,
h3,
li {
  overflow-wrap: break-word;
  hyphens: auto;
}

/* ---------- Hintergrund-Animation (Fadennetz) ---------- */
#netz {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.inhalt-ebene {
  position: relative;
  z-index: 1;
}

/* ---------- Barrierefreiheit ---------- */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--graphit);
  color: #fff;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus {
  top: 1rem;
}

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

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

/* ---------- Kopfbereich / Navigation ---------- */
.kopf {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(245, 246, 248, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--linie);
}

.kopf-innen {
  max-width: var(--breite);
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.marke {
  font-family: var(--schrift-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: var(--graphit);
  text-decoration: none;
}

.hauptnav ul {
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  flex-wrap: wrap;
}

.hauptnav a {
  color: var(--graphit);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}
.hauptnav a:hover,
.hauptnav a[aria-current="page"] {
  border-bottom-color: var(--akzent);
}

/* ---------- Hamburger-Menü (schmale Bildschirme) ---------- */
.nav-schalter {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  cursor: pointer;
}

.nav-schalter-linie {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--graphit);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-schalter[aria-expanded="true"] .nav-schalter-linie:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-schalter[aria-expanded="true"] .nav-schalter-linie:nth-child(2) {
  opacity: 0;
}
.nav-schalter[aria-expanded="true"] .nav-schalter-linie:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 760px) {
  .nav-schalter {
    display: flex;
  }
  .hauptnav {
    display: block;
    width: 100%;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transform: translateY(-8px);
    visibility: hidden;
    transition:
      max-height 0.32s ease,
      opacity 0.25s ease,
      transform 0.32s ease,
      visibility 0.32s;
  }
  .kopf.menue-offen .hauptnav {
    max-height: 320px;
    opacity: 1;
    transform: none;
    visibility: visible;
  }
  .hauptnav ul {
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0 0.75rem;
    border-top: 1px solid var(--linie);
    margin-top: 0.5rem;
  }
  .hauptnav a {
    display: block;
    padding: 0.7rem 0.25rem;
    font-size: 1.05rem;
  }
}

/* ---------- Scroll-nach-oben-Button ---------- */
.nach-oben {
  position: fixed;
  right: 1rem;
  bottom: 4.4rem;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--flaeche);
  color: var(--graphit);
  border: 1px solid var(--linie);
  border-radius: 999px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}
.nach-oben.sichtbar {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nach-oben:hover {
  border-color: var(--akzent);
}
.nach-oben svg {
  width: 20px;
  height: 20px;
}

/* Solange das Hinweis-Banner sichtbar ist, treten die schwebenden
   Buttons zurück, damit sich nichts überlappt (v. a. auf Mobilgeräten) */
.hinweis-aktiv .nach-oben,
.hinweis-aktiv .anim-steuerung {
  opacity: 0;
  visibility: hidden;
}

/* ---------- Layout ---------- */
main {
  max-width: var(--breite);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 4.5rem 0;
  border-bottom: 1px solid var(--linie);
}
section:last-of-type {
  border-bottom: none;
}

.eyebrow {
  font-family: var(--schrift-display);
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--akzent);
  margin: 0 0 0.75rem;
}

h1,
h2,
h3 {
  font-family: var(--schrift-display);
  line-height: 1.15;
  margin: 0 0 1rem;
}

h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  font-weight: 700;
}

h3 {
  font-size: 1.15rem;
  font-weight: 500;
}

p {
  margin: 0 0 1rem;
  max-width: 68ch;
}

a {
  color: var(--akzent-dunkel);
  text-underline-offset: 3px;
}
a:hover {
  color: var(--akzent);
}

/* ---------- Hero ---------- */
.hero {
  padding: 6.5rem 0 5rem;
}

.hero-raster {
  display: grid;
  /* Foto bleibt immer rechts neben dem Text und wird bei wenig
     Platz stufenlos kleiner statt umzubrechen.
     minmax(0, 1fr): erlaubt der Textspalte, schmaler zu werden als
     ihr längstes Wort - sonst schiebt sie das Foto aus dem Bildschirm */
  grid-template-columns: minmax(0, 1fr) clamp(110px, 30vw, 280px);
  gap: clamp(1.25rem, 4vw, 3rem);
  align-items: center;
}

.portrait {
  width: 100%;
  height: auto;
  justify-self: end;
  /* Freigestelltes PNG: Rahmen und Kasten-Schatten entfallen,
     der Schatten folgt stattdessen der Kontur der Person */
  filter: grayscale(1) drop-shadow(0 14px 28px rgba(22, 25, 31, 0.22));
}



.hero .untertitel {
  font-size: 1.2rem;
  color: var(--schiefer);
  max-width: 46ch;
}

.hero-meta {
  display: flex;
  gap: 2rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
  font-size: 0.95rem;
  color: var(--schiefer);
}

/* ---------- Lebenslauf (Zeitleiste) ---------- */
.zeitleiste {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
}

.zeitleiste li {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 1.5rem;
  padding: 1.6rem 0;
  border-top: 1px solid var(--linie);
}

.zeitleiste .zeitraum {
  font-family: var(--schrift-display);
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--schiefer);
  letter-spacing: 0.04em;
}

.zeitleiste h3 {
  margin-bottom: 0.2rem;
}

.zeitleiste .ort {
  font-size: 0.95rem;
  color: var(--schiefer);
  margin-bottom: 0.6rem;
}

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

/* ---------- Projekte ---------- */
.projekte-liste {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
}

.projekt {
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  padding: 1.6rem 1.8rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.projekt:hover {
  border-color: var(--akzent);
  transform: translateY(-2px);
}

.projekt-kopf {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}

.projekt .jahr {
  font-family: var(--schrift-display);
  font-size: 0.85rem;
  color: var(--schiefer);
  letter-spacing: 0.06em;
}

.tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.9rem;
  padding: 0;
  list-style: none;
}

.tags li {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--akzent-dunkel);
  background: rgba(30, 69, 214, 0.07);
  border: 1px solid rgba(30, 69, 214, 0.18);
  border-radius: 999px;
  padding: 0.15rem 0.7rem;
}

/* ---------- Kontakt ---------- */
.kontakt-knoepfe {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.75rem;
}

.knopf {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  border: 1px solid var(--linie);
  background: var(--flaeche);
  color: var(--graphit);
  text-decoration: none;
  font-family: var(--schrift-text);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1;
  transition: border-color 0.2s ease, transform 0.2s ease,
              background-color 0.2s ease, color 0.2s ease;
}

.knopf svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.knopf:hover {
  border-color: var(--akzent);
  color: var(--akzent-dunkel);
  transform: translateY(-1px);
}

.knopf-primaer {
  background: var(--graphit);
  border-color: var(--graphit);
  color: #ffffff;
}

.knopf-primaer:hover {
  background: var(--akzent-dunkel);
  border-color: var(--akzent-dunkel);
  color: #ffffff;
}

.kontakt-liste {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

/* ---------- Fußbereich ---------- */
.fuss {
  border-top: 1px solid var(--linie);
  background: var(--flaeche);
}

.fuss-innen {
  max-width: var(--breite);
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: var(--schiefer);
}

.fuss nav ul {
  display: flex;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ---------- Steuerung Animation ---------- */
.anim-steuerung {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 20;
  background: var(--flaeche);
  color: var(--graphit);
  border: 1px solid var(--linie);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-family: var(--schrift-text);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
}
.anim-steuerung:hover {
  border-color: var(--akzent);
}

/* ---------- Cookie- / Speicherhinweis ---------- */
.hinweis-banner {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  z-index: 30;
  width: min(560px, calc(100% - 2rem));
  background: var(--graphit);
  color: #f2f3f5;
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

.hinweis-banner p {
  margin: 0 0 0.8rem;
  font-size: 0.92rem;
  max-width: none;
}

.hinweis-banner a {
  color: #b9c6ff;
}

.hinweis-banner button {
  background: #fff;
  color: var(--graphit);
  border: none;
  border-radius: var(--radius);
  padding: 0.5rem 1.1rem;
  font-family: var(--schrift-text);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}
.hinweis-banner button:hover {
  background: #e6e8ec;
}

.hinweis-banner[hidden] {
  display: none;
}

/* ---------- Scroll-Animationen ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.ist-sichtbar {
  opacity: 1;
  transform: translateY(0);
}
.reveal-gruppe > * {
  transition-delay: calc(var(--verzoegerung, 0) * 90ms);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- Rechtsseiten ---------- */
.rechtstext h2 {
  margin-top: 2.5rem;
  font-size: 1.35rem;
}
.rechtstext section {
  border-bottom: none;
  padding: 0;
}

/* ---------- Responsiv ---------- */
@media (max-width: 640px) {
  .zeitleiste li {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }
  .hero {
    padding: 4rem 0 3.5rem;
  }
  section {
    padding: 3rem 0;
  }
}
