/* =========================================================
   Design der Visitenkarte – gilt für alle Seiten
   ========================================================= */

/* ----- Farben (helle Ansicht) ----- */
:root {
  --hintergrund: #f4f6fa;
  --karte: #ffffff;
  --text: #14192b;
  --text-leise: #5a6275;
  --linie: #e2e6ee;
  --blau: #0a1f44;        /* Marineblau, Hauptfarbe */
  --rot: #c8102e;         /* Rot, Akzentfarbe */
  --kopf: #0a1f44;        /* Hintergrund Kopfbereich */
}

/* ----- Farben (dunkle Ansicht, wenn am Gerät eingestellt) ----- */
@media (prefers-color-scheme: dark) {
  :root {
    --hintergrund: #0b111e;
    --karte: #141c2c;
    --text: #e8ecf4;
    --text-leise: #a3acbf;
    --linie: #26304a;
    --blau: #9db8ff;      /* helleres Blau, damit es auf Dunkel lesbar ist */
    --rot: #ff5468;
    --kopf: #101a33;
  }
}

/* ----- Grundeinstellungen ----- */
* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--hintergrund);
  color: var(--text);
  /* Systemschriften: werden nicht aus dem Internet geladen (Datenschutz) */
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

/* Inhalt mittig, am PC bis 1100px breit, am Handy 16px Rand */
.inhalt {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}
/* schmalere Variante für reine Textseiten (Impressum, Datenschutz) */
.inhalt.schmal { max-width: 760px; }

a { color: var(--blau); }

/* ----- Kopfbereich ----- */
.kopf {
  background: var(--kopf);
  color: #fff;
  padding: 20px 0;
  border-bottom: 4px solid var(--rot);
}

/* Zeile: links Person, rechts EKG. Am Handy rutscht das EKG unter den Namen */
.kopf-zeile {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 32px;
}

.person {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: none;
}

.zeichen {
  width: 52px;
  height: 52px;
  flex: none;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 1px;
}

.kopf h1 {
  margin: 0;
  font-size: 1.6rem;
  line-height: 1.2;
}

.untertitel {
  margin: 2px 0 0;
  opacity: 0.85;
}

/* ----- EKG-Linie im Kopfbereich ----- */
.ekg {
  display: block;
  flex: 1 1 300px;     /* nimmt den restlichen Platz neben dem Namen ein */
  min-width: 0;
  height: 48px;
}
.ekg path {
  fill: none;
  stroke: var(--rot);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  /* Linie wird beim Öffnen von links nach rechts "gezeichnet" */
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: ekg-zeichnen 3.6s ease-out 0.3s forwards;
}
@keyframes ekg-zeichnen {
  to { stroke-dashoffset: 0; }
}
/* Wer am Gerät "Bewegung reduzieren" eingestellt hat, sieht die Linie sofort */
@media (prefers-reduced-motion: reduce) {
  .ekg path { animation: none; stroke-dashoffset: 0; }
}

/* ----- Karten (die weißen Kästen) ----- */
main { padding-top: 24px; padding-bottom: 24px; }

/* PC: Über mich und Qualifikationen nebeneinander, Kontakt darunter über volle Breite */
@media (min-width: 900px) {
  .raster {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 20px;
    align-items: start;
  }
  .raster .karte { margin-bottom: 0; }
  .raster .breit { grid-column: 1 / -1; }
}

.karte {
  background: var(--karte);
  border: 1px solid var(--linie);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
}

.karte h2 {
  margin: 0 0 12px;
  font-size: 1.25rem;
  color: var(--blau);
}

/* kleiner roter Strich vor jeder Überschrift */
.karte h2::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 1em;
  background: var(--rot);
  border-radius: 2px;
  margin-right: 10px;
  vertical-align: -2px;
}

.leise { color: var(--text-leise); }

/* ----- Liste Beruf / Ehrenamt ----- */
.liste { margin: 16px 0 0; }
.liste div {
  padding: 12px 0;
  border-top: 1px solid var(--linie);
}
.liste dt {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-leise);
}
.liste dd { margin: 2px 0 0; }

/* Aufzählung mit kleinen roten Punkten (Ehrenamt, Projekte) */
.punkte {
  margin: 4px 0 0;
  padding-left: 18px;
}
.punkte li { margin-bottom: 4px; }
.punkte li::marker { color: var(--rot); }

/* kleines Schild mit Zeitraum, z. B. "aktuell" oder "2021–2024" */
.zeit {
  display: inline-block;
  margin-left: 6px;
  padding: 0 8px;
  border: 1px solid var(--linie);
  border-radius: 999px;
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--text-leise);
  white-space: nowrap;
  vertical-align: 1px;
}
.zeit.aktuell {
  border-color: var(--rot);
  color: var(--rot);
  font-weight: 600;
}

/* ----- Qualifikationen ----- */
.quali {
  list-style: none;
  margin: 0;
  padding: 0;
}
.quali li {
  padding: 12px 0 12px 16px;
  border-left: 3px solid var(--rot);
  margin-bottom: 10px;
}
.quali strong { display: block; }
.quali span { color: var(--text-leise); font-size: 0.95rem; }

/* ----- Knöpfe (E-Mail, Social Media) ----- */
.knoepfe {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;        /* Handy: untereinander */
}
@media (min-width: 560px) {
  .knoepfe { grid-template-columns: 1fr 1fr; }   /* PC: zwei nebeneinander */
  .knopf.haupt { grid-column: 1 / -1; }          /* E-Mail über volle Breite */
}
@media (min-width: 900px) {
  .knoepfe { grid-template-columns: repeat(4, 1fr); }  /* großer PC: alle 4 in einer Reihe */
  .knopf.haupt { grid-column: auto; }
}

.knopf {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--linie);
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  transition: border-color 0.15s, background 0.15s;
}
.knopf:hover, .knopf:focus-visible {
  border-color: var(--blau);
}
.knopf svg {
  width: 22px;
  height: 22px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.knopf .name {
  margin-left: auto;
  font-weight: 400;
  color: var(--text-leise);
}

/* E-Mail-Knopf hervorgehoben */
.knopf.haupt {
  background: var(--rot);
  border-color: var(--rot);
  color: #fff;
  justify-content: center;
}
.knopf.haupt:hover, .knopf.haupt:focus-visible {
  filter: brightness(1.08);
  border-color: var(--rot);
}

/* ----- Hinweis-Karte "Projekte" auf der Startseite ----- */
.projekte-hinweis p { margin: 0; }
.projekte-hinweis .knopf {
  margin-top: 16px;
  justify-content: center;
}
@media (min-width: 560px) {
  /* PC: Text links, Knopf rechts */
  .projekte-hinweis {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
  }
  .projekte-hinweis .knopf { margin-top: 0; flex: none; }
}

/* ----- Projekte-Unterseite ----- */
.kopf.klein { padding: 20px 0; }
.kopf.klein h1 { font-size: 1.5rem; }
.kopf.klein a { color: #fff; }

.projekte {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));  /* so viele Spalten, wie passen */
}
.projekte .karte { margin-bottom: 0; }
.projekt h3 {
  margin: 0 0 4px;
  font-size: 1.1rem;
  color: var(--blau);
}
.projekt .eckdaten {
  margin: 0 0 12px;
  font-size: 0.85rem;
  color: var(--rot);
  font-weight: 600;
}
.projekt p { margin: 0; }

/* Bilder in einer Projekt-Karte: zwei nebeneinander, ein einzelnes über volle Breite */
.projekt-bilder {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  margin-top: 14px;
}
.projekt-bilder img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;     /* alle Bilder gleich hoch, egal welches Format */
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--linie);
}
.projekt-bilder a:hover img { opacity: 0.9; }
.projekt-bilder img.oben { object-position: center 15%; }   /* für Hochformat: oberen Teil zeigen */
.projekt .bildnachweis {
  margin-top: 6px;
  font-size: 0.75rem;
  color: var(--text-leise);
}

/* kleiner Pfeil hinter externen Links (öffnen in neuem Tab) */
.knopf.extern::after {
  content: "↗";
  margin-left: 6px;
  color: var(--text-leise);
  font-weight: 400;
}

/* ----- Fußzeile ----- */
.fuss {
  text-align: center;
  padding: 8px 16px 40px;
  font-size: 0.9rem;
}
.fuss a {
  color: var(--text-leise);
  margin: 0 10px;
}

/* ----- Unterseiten (Impressum, Datenschutz) ----- */
.text h2 { margin-top: 28px; }
.text h2:first-child { margin-top: 0; }
.zurueck {
  display: inline-block;
  margin-bottom: 16px;
}
