/* =============================================================================
   CV Dominic Meiser — Screen Styles
   Tonalität: seriös, dezent, lesbar. Kein Cyberpunk-Glamour.
   Light-Default mit subtilem Akzent; Dark-Variante via prefers-color-scheme.
   ============================================================================= */

:root {
  --bg:        #fbfaf7;       /* warmes Off-White */
  --surface:   #ffffff;
  --ink:       #1a1c20;
  --muted:     #5b6068;
  --line:      #e3e1db;
  --accent:    #1f4d6b;       /* dunkles Petrol — seriös */
  --accent-bg: #eef3f6;
  --highlight: #c2ad7a;       /* gedeckter Goldton für Kennzahlen */
  --serif:     "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans:      "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono:      "JetBrains Mono", Consolas, "Courier New", monospace;
  --maxw:      980px;
  --pad:       2rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #14161a;
    --surface:   #1a1d22;
    --ink:       #e8e7e2;
    --muted:     #8d9199;
    --line:      #2a2e35;
    --accent:    #6fa8c8;
    --accent-bg: #1d2a33;
    --highlight: #d4bd86;
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent); text-decoration: none; border-bottom: 1px dotted var(--accent); }
a:hover { border-bottom-style: solid; }

/* ----- Topbar ----- */
.topbar {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  position: sticky; top: 0; z-index: 10;
}
.topbar-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.85rem var(--pad);
  display: flex; align-items: center; justify-content: space-between;
}
.brand {
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.modus-switch {
  display: flex; gap: 0.25rem;
  background: var(--accent-bg);
  border-radius: 999px;
  padding: 0.25rem;
}
.modus-link {
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  border: none;
}
.modus-link.active {
  background: var(--accent);
  color: #fff;
  border: none;
}

/* ----- Page wrapper ----- */
.page {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 3rem var(--pad) 5rem;
}

/* ----- Hero ----- */
.hero { margin-bottom: 2.5rem; }
.hero-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.6rem;
  align-items: start;
  margin-bottom: 1.6rem;
}
.hero-foto {
  width: 140px;
  height: auto;
  aspect-ratio: 578 / 800;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--line);
  filter: saturate(0.95);
}
.hero-text { margin-bottom: 0; }
.name {
  font-family: var(--serif);
  font-size: 2.6rem;
  margin: 0 0 0.4rem;
  letter-spacing: -0.01em;
  font-weight: 600;
}
.rolle {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 0.2rem;
}
.subline {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0 0 1rem;
  font-style: italic;
}
.kontakt {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
}
.kontakt a { color: var(--muted); border-bottom-color: var(--line); }
.sep { margin: 0 0.55rem; opacity: 0.45; }

/* Kennzahlen — dezente Karten, keine Glamour-Stat-Cards */
.kennzahlen {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.8rem;
}
.kennzahlen li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--highlight);
  border-radius: 4px;
  padding: 0.85rem 1rem;
}
.kennzahlen strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.kz-label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

/* ----- Abschnitte ----- */
.abschnitt { margin: 2.5rem 0; }
.abschnitt-titel {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.2rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
}
.profil-text {
  font-size: 1.02rem;
  line-height: 1.7;
  margin: 0 0 0.9rem;
  max-width: 70ch;
}
.tagline {
  font-family: var(--serif);
  font-style: italic;
  color: var(--accent);
  font-size: 1.05rem;
  margin: 0;
}

/* ----- Timeline ----- */
.timeline { list-style: none; margin: 0; padding: 0; }
.tl-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1.4rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}
.tl-item:first-child { border-top: none; padding-top: 0; }
.tl-zeit {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  padding-top: 0.25rem;
  letter-spacing: 0.02em;
}
.tl-rolle {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 0.15rem;
  color: var(--ink);
}
.tl-org {
  margin: 0 0 0.55rem;
  color: var(--accent);
  font-size: 0.93rem;
}
.tl-bullets, .tl-mod, .tl-thesis, .tl-note {
  margin: 0.3rem 0;
  font-size: 0.93rem;
  line-height: 1.55;
}
.tl-bullets {
  list-style: disc;
  padding-left: 1.1rem;
}
.tl-bullets li { margin-bottom: 0.2rem; }
.tl-thesis em {
  font-style: normal;
  font-weight: 600;
  color: var(--ink);
}
.tl-note { color: var(--muted); }
.tl-mod { color: var(--muted); font-size: 0.88rem; }

.typ-nebentaetig .tl-rolle { font-weight: 500; }
.typ-nebentaetig .tl-bullets, .typ-engagement .tl-bullets { font-size: 0.88rem; }
.typ-engagement .tl-rolle { font-weight: 500; }

/* ----- Zertifikate ----- */
.zertifikate-liste { list-style: none; margin: 0; padding: 0; }
.zertifikate-liste li {
  padding: 0.6rem 0;
  border-bottom: 1px dotted var(--line);
  font-size: 0.95rem;
}
.zertifikate-liste li:last-child { border-bottom: none; }
.z-datum {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  margin-right: 0.4rem;
}

/* ----- Stack ----- */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.2rem;
}
.stack-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1rem 1.2rem;
}
.stack-card h3 {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin: 0 0 0.7rem;
  font-weight: 600;
}
.stack-card ul { list-style: none; margin: 0; padding: 0; }
.stack-card li {
  font-size: 0.9rem;
  padding: 0.2rem 0;
  color: var(--ink);
  border-bottom: 1px dotted var(--line);
}
.stack-card li:last-child { border-bottom: none; }
.stack-ai_engineering_subline {
  border-color: var(--highlight);
  border-left: 3px solid var(--highlight);
}

/* ----- Sprachen ----- */
.sprachen-liste {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.8rem;
}
.sprachen-liste li {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.5rem 0.8rem;
  padding: 0.5rem 0;
  border-bottom: 1px dotted var(--line);
  font-size: 0.92rem;
}
.sprachen-liste strong { font-weight: 600; }
.sprachen-liste .niveau {
  grid-column: 1 / -1;
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: -0.2rem;
}
.lvl { display: inline-flex; gap: 3px; }
.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--line);
  display: inline-block;
}
.dot.on { background: var(--accent); }

/* ----- AI-Anhang ----- */
.anhang { background: var(--accent-bg); padding: 1.8rem 2rem; border-radius: 8px; }
.anhang .abschnitt-titel { border-bottom-color: var(--accent); }
.anhang-intro {
  font-size: 0.98rem;
  line-height: 1.65;
  max-width: 70ch;
  margin: 0 0 1.4rem;
}
.projekt-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
.projekt-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1rem 1.3rem;
}
.projekt-item h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  font-weight: 600;
}
.proj-kurz {
  margin: 0 0 0.5rem;
  font-size: 0.93rem;
  color: var(--muted);
  font-style: italic;
}
.proj-det {
  margin: 0; padding-left: 1.1rem;
  font-size: 0.88rem;
  line-height: 1.55;
}
.proj-det li { margin-bottom: 0.15rem; }

/* ----- Optional-Anhang ----- */
.akademisch-optional { font-size: 0.92rem; color: var(--muted); }
.akademisch-optional a { color: var(--accent); }

/* ----- Footer ----- */
.seiten-footer {
  margin-top: 4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}
.seiten-footer p { margin: 0.2rem 0; }
.footer-print { display: none; }

/* ----- Modus-Variation: in AI-Modus den AI-Anhang nach oben ziehen ----- */
.modus-ai #anhang-ai {
  /* Bleibt visuell prominent, aber Reihenfolge bleibt für Druck stabil.
     Optional: Reihenfolge via order: aufbrechen — aktuell bewusst nicht,
     damit Print-Reihenfolge konsistent bleibt. */
}
.modus-ai .anhang { background: linear-gradient(180deg, var(--accent-bg), var(--surface)); }

/* ----- Responsive ----- */
@media (max-width: 700px) {
  :root { --pad: 1.1rem; }
  .name { font-size: 2rem; }
  .tl-item { grid-template-columns: 1fr; gap: 0.4rem; }
  .tl-zeit { padding-top: 0; }
  .topbar-inner { flex-direction: column; gap: 0.6rem; align-items: flex-start; }
  .hero-head { grid-template-columns: 1fr; gap: 1rem; }
  .hero-foto { width: 110px; }
}
