/* ============================================================
   style.css – Nils Ritterbusch
   Komplett zusammengeführt inkl. WCAG-Fixes
   ============================================================ */

/* ── Variablen ───────────────────────────────────────────── */
:root {
  color-scheme: light dark;
  --bg:           #f8fafc;
  --surface:      #ffffff;
  --surface-muted:#eef2f7;
  --text:         #111827;
  --text-muted:   #4b5563;
  --brand:        #174ea6;
  --brand-dark:   #0b3578;
  --border:       #cbd5e1;
  --focus:        #ffbf47;
  --shadow:       0 18px 45px rgba(15, 23, 42, 0.12);
  --radius:       1.25rem;
  --max-width:    1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:           #0f172a;
    --surface:      #172033;
    --surface-muted:#111827;
    --text:         #f8fafc;
    --text-muted:   #d1d5db;
    --brand:        #8ab4f8;
    --brand-dark:   #cfe1ff;
    --border:       #334155;
    --shadow:       0 18px 45px rgba(0, 0, 0, 0.35);
  }
}

/* ── Reset & Basis ───────────────────────────────────────── */
* {
  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;
    scroll-behavior:          auto   !important;
    transition-duration:      0.01ms !important;
  }
}

body {
  margin: 0;
  background:  var(--bg);
  color:       var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size:   1rem;
  line-height: 1.65;
}

img, svg {
  max-width: 100%;
}

a {
  color:                    var(--brand);
  text-underline-offset:    0.18em;
  text-decoration-thickness:0.08em;
}
a:hover { color: var(--brand-dark); }

/* ── Fokusring (WCAG 2.4.11) ─────────────────────────────── */
:focus-visible {
  outline:       4px solid var(--focus);
  outline-offset:4px;
  border-radius: 0.35rem;
}
:focus:not(:focus-visible) { outline: none; }

/* ── Skip-Link ───────────────────────────────────────────── */
.skip-link {
  position:  absolute;
  top:       0.75rem;
  left:      0.75rem;
  z-index:   20;
  padding:   0.75rem 1rem;
  background:var(--text);
  color:     var(--bg);
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

/* ── Layout ──────────────────────────────────────────────── */
.container {
  width:         min(100% - 2rem, var(--max-width));
  margin-inline: auto;
}
.narrow { max-width: 760px; }

/* ── Header ──────────────────────────────────────────────── */
.site-header {
  position:        sticky;
  top:             0;
  z-index:         10;
  background:      color-mix(in srgb, var(--surface) 92%, transparent);
  border-bottom:   1px solid var(--border);
  backdrop-filter: blur(12px);
}

.header-content,
.footer-content {
  display:        flex;
  align-items:    center;
  justify-content:space-between;
  gap:            1rem;
  padding-block:  1rem;
}

.brand {
  display:        inline-flex;
  align-items:    center;
  gap:            0.75rem;
  color:          var(--text);
  font-weight:    800;
  text-decoration:none;
}
.brand-mark {
  display:      grid;
  place-items:  center;
  width:        2.5rem;
  height:       2.5rem;
  border-radius:50%;
  background:   var(--brand);
  color:        var(--surface);
  font-size:    0.9rem;
}

.main-nav ul,
.site-footer ul {
  display:    flex;
  flex-wrap:  wrap;
  gap:        0.25rem 1rem;
  align-items:center;
  margin:     0;
  padding:    0;
  list-style: none;
}
.main-nav a,
.site-footer a {
  display: inline-block;
  padding: 0.4rem 0.2rem;
  color:   var(--text);
}

/* ── Sections ────────────────────────────────────────────── */
.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section-muted { background: var(--surface-muted); }

/* ── Hero ────────────────────────────────────────────────── */
.hero-grid {
  display:               grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap:                   2rem;
  align-items:           center;
}

.eyebrow {
  margin:         0 0 0.75rem;
  color:          var(--brand);
  font-size:      0.9rem;
  font-weight:    800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1, h2, h3 { margin-top: 0; line-height: 1.15; }
h1 {
  max-width:      720px;
  margin-bottom:  1rem;
  font-size:      clamp(2.6rem, 8vw, 5.5rem);
  letter-spacing: -0.06em;
}
h2 {
  font-size:      clamp(1.8rem, 4vw, 3rem);
  letter-spacing: -0.035em;
}
h3 { font-size: 1.35rem; }

.hero-text {
  max-width: 680px;
  color:     var(--text-muted);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
}

.button-row {
  display:    flex;
  flex-wrap:  wrap;
  gap:        0.9rem;
  margin-top: 2rem;
}

.button {
  display:        inline-flex;
  align-items:    center;
  justify-content:center;
  min-height:     48px;
  padding:        0.8rem 1.1rem;
  border:         2px solid var(--brand);
  border-radius:  999px;
  font-weight:    800;
  text-decoration:none;
}
.button.primary   { background: var(--brand); color: var(--surface); }
.button.secondary { background: transparent;  color: var(--brand); }

/* ── Cards ───────────────────────────────────────────────── */
.hero-card,
.card,
.notice {
  border:       1px solid var(--border);
  border-radius:var(--radius);
  background:   var(--surface);
  box-shadow:   var(--shadow);
}
.hero-card { padding: 1.5rem; }

.check-list,
.contact-list { padding-left: 1.25rem; }
.check-list li + li,
.contact-list li + li { margin-top: 0.45rem; }

.section-heading {
  max-width:     760px;
  margin-bottom: 2rem;
}

.card-grid {
  display:               grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:                   1rem;
}
.card         { padding: 1.35rem; }
.card p       { color: var(--text-muted); }

.text-link {
  font-weight:     800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.notice {
  margin-top:  1.5rem;
  padding:     1rem;
  box-shadow:  none;
  color:       var(--text);
  border-color:var(--border);
}

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.site-footer p { margin: 0; }

/* Footer Link-Buttons */
.footer-links {
  display:       flex;
  gap:           .5rem;
  flex-wrap:     wrap;
  margin-bottom: .5rem;
}
.footer-link-btn {
  display:        inline-flex;
  align-items:    center;
  gap:            .35rem;
  padding:        .45rem .85rem;
  min-height:     44px;
  border:         1px solid var(--border);
  border-radius:  8px;
  font-size:      .82rem;
  color:          var(--text);          /* kein opacity – echter Farbwert */
  text-decoration:none;
  background:     transparent;
}
.footer-link-btn:hover {
  background: var(--surface-muted);
  color:      var(--brand);
}
.footer-link-btn svg { width: 14px; height: 14px; flex-shrink: 0; }

/* Footer-Bodenzeile */
.footer-bottom {
  display:        flex;
  justify-content:space-between;
  align-items:    center;
  flex-wrap:      wrap;
  gap:            .5rem;
  margin-top:     1.25rem;
  padding-top:    1rem;
  border-top:     1px solid var(--border);
  font-size:      .82rem;
  color:          var(--text-muted);    /* kein opacity – echter Farbwert */
}
.footer-bottom nav ul {
  display:    flex;
  gap:        1rem;
  list-style: none;
  padding:    0;
  margin:     0;
}
.footer-bottom nav a {
  color:           var(--text-muted);
  text-decoration: none;
}
.footer-bottom nav a:hover {
  color:           var(--brand);
  text-decoration: underline;
}

/* Kontakt / Link-Buttons im Inhalt */
.link-row {
  display:   flex;
  gap:       .5rem;
  flex-wrap: wrap;
  margin-top:1.25rem;
}
.link-btn {
  display:        inline-flex;
  align-items:    center;
  gap:            .4rem;
  padding:        .45rem .95rem;
  min-height:     44px;
  border:         1px solid var(--border);
  border-radius:  8px;
  font-size:      .82rem;
  color:          var(--text);
  text-decoration:none;
  background:     transparent;
}
.link-btn:hover {
  background: var(--surface-muted);
  color:      var(--brand);
}
.link-btn svg { width: 15px; height: 15px; flex-shrink: 0; }

/* ── Über-mich-spezifisch ────────────────────────────────── */
.about-quote {
  border-left:  3px solid var(--brand);
  border-radius:0;
  padding:      .6rem 1.2rem;
  margin:       1.5rem 0 2rem;
  font-style:   italic;
  color:        var(--text-muted);
  font-size:    1rem;
  line-height:  1.6;
}
.about-quote cite {
  display:    block;
  font-style: normal;
  font-size:  .8rem;
  margin-top: .4rem;
  color:      var(--text-muted);
}

/* Timeline */
.timeline {
  position:    relative;
  padding-left:1.4rem;
  margin:      0 0 2.5rem;
}
.timeline::before {
  content:   '';
  position:  absolute;
  left:      0;
  top:       .6rem;
  bottom:    .6rem;
  width:     1px;
  background:var(--border);
}
.tl-entry          { position: relative; margin-bottom: 1.75rem; }
.tl-entry:last-child { margin-bottom: 0; }
.tl-dot {
  position:    absolute;
  left:        -1.75rem;
  top:         .45rem;
  width:       8px;
  height:      8px;
  border-radius:50%;
  background:  #8ab4f8;
}
.tl-dot.dot-green { background: #639922; }
.tl-dot.dot-gray  { background: var(--border); }

.tl-head {
  display:        flex;
  justify-content:space-between;
  align-items:    flex-start;
  gap:            .75rem;
  flex-wrap:      wrap;
}
.tl-role    { font-weight: 600; font-size: 1rem;  margin: 0 0 .15rem; color: var(--text); }
.tl-company { font-size: .9rem;  color: var(--text-muted); margin: 0 0 .1rem; }
.tl-loc     { font-size: .78rem; color: var(--text-muted); margin: 0; }
.tl-period  { font-size: .78rem; color: var(--text-muted); white-space: nowrap; padding-top: .2rem; }
.tl-tasks   { padding-left: 1rem; margin: .5rem 0 0; }
.tl-tasks li { font-size: .88rem; color: var(--text-muted); margin-bottom: .2rem; line-height: 1.55; }

.tag-row { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .6rem; }
.tag {
  font-size:   .72rem;
  font-weight: 600;
  background:  #EEEDFE;
  color:       #26215C;   /* lila-900 auf lila-50: ~8:1 ✓ */
  padding:     .2rem .65rem;
  border-radius:20px;
}

/* Ausbildung */
.edu-list { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 2.5rem; }
.edu-card {
  background:   var(--surface-muted);
  border:       1px solid var(--border);
  border-radius:10px;
  padding:      .9rem 1.1rem;
  display:      flex;
  gap:          .8rem;
  align-items:  flex-start;
}
.edu-icon   { font-size: 1.25rem; flex-shrink: 0; margin-top: .1rem; }
.edu-title  { font-size: .95rem; font-weight: 600; margin: 0 0 .15rem; color: var(--text); }
.edu-sub    { font-size: .82rem; color: var(--text-muted); margin: 0; }
.edu-period { font-size: .75rem; color: var(--text-muted); margin: .2rem 0 0; }
.edu-note   { font-size: .72rem; color: var(--text-muted); }

/* Skills */
.skills-grid {
  display:               grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap:                   .5rem;
  margin-bottom:         2.5rem;
}
.skill-card {
  background:   var(--surface-muted);
  border:       1px solid var(--border);
  border-radius:8px;
  padding:      .6rem .9rem;
  display:      flex;
  align-items:  center;
  gap:          .6rem;
  font-size:    .85rem;
  color:        var(--text);
}
.sk-icon { font-size: 1rem; flex-shrink: 0; }

/* Sprachen */
.lang-row  { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 2.5rem; }
.lang-item {
  background:   var(--surface-muted);
  border:       1px solid var(--border);
  border-radius:8px;
  padding:      .5rem .9rem;
  font-size:    .88rem;
  font-weight:  500;
  color:        var(--text);
}
.lang-level {
  display:    block;
  font-size:  .72rem;
  font-weight:400;
  margin-top: .1rem;
  color:      var(--text-muted);  /* kein opacity – echter Farbwert */
}

/* Sub-Eyebrow */
.sub-eyebrow {
  font-size:      .7rem;
  font-weight:    600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color:          var(--text-muted);  /* kein opacity:.45 – echter Farbwert */
  margin-bottom:  .8rem;
}

/* ── Externe Links in neuem Tab ──────────────────────────── */
a[target="_blank"]:not(.link-btn):not(.footer-link-btn):not(.button)::after {
  content:  " ↗";
  font-size:.75em;
  opacity:  .6;
}

/* ── Tags im Dunkelmodus ─────────────────────────────────── */
@media (prefers-color-scheme: dark) {
  .tag {
    background: #26215C;
    color:      #CECBF6;  /* lila-100 auf lila-900: ~8:1 ✓ */
  }
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 820px) {
  .header-content,
  .footer-content,
  .main-nav ul {
    align-items:    flex-start;
    flex-direction: column;
  }
  .hero-grid,
  .card-grid { grid-template-columns: 1fr; }
  .main-nav a { padding-block: 0.55rem; }
  .tl-head    { flex-direction: column; gap: .2rem; }
  .skills-grid { grid-template-columns: 1fr 1fr; }
}