:root {
  --bg: #f7f5f1;
  --bg-accent: #eef2f7;
  --card: #ffffff;
  --text: #1c2430;
  --muted: #5d6878;
  --accent: #1f5498;
  --accent-2: #0f7d7a;
  --warm: #b26a1f;
  --accent-soft: #e7eef8;
  --border: #e5e2db;
  --code-bg: #f0ede7;
  --shadow: 0 1px 2px rgba(28, 36, 48, 0.04), 0 12px 32px -16px rgba(28, 36, 48, 0.18);
  --shadow-lift: 0 2px 4px rgba(28, 36, 48, 0.05), 0 20px 44px -18px rgba(31, 84, 152, 0.28);
  --serif: ui-serif, "Iowan Old Style", "Palatino", "New York", "Times New Roman", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1218;
    --bg-accent: #101722;
    --card: #161d28;
    --text: #e9ecf1;
    --muted: #97a2b2;
    --accent: #7db0e8;
    --accent-2: #5fc4bf;
    --warm: #e0a458;
    --accent-soft: #1b2a3e;
    --border: #242e3c;
    --code-bg: #101620;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px -16px rgba(0, 0, 0, 0.5);
    --shadow-lift: 0 2px 4px rgba(0, 0, 0, 0.35), 0 20px 44px -18px rgba(125, 176, 232, 0.25);
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background:
    radial-gradient(1100px 500px at 85% -100px, var(--bg-accent), transparent 70%),
    var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent); color: #fff; }
a { transition: color 0.18s ease; }

.wrap { max-width: 880px; margin: 0 auto; padding: 0 20px 32px; }

/* ---------- Navigation ---------- */
nav.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
  padding: 16px 0; margin-bottom: 36px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
nav.top .brand {
  font-family: var(--serif); font-weight: 700; font-size: 1.15rem;
  color: var(--text); text-decoration: none; letter-spacing: -0.01em;
}
nav.top .brand:hover { color: var(--accent); }
nav.top .links { display: flex; gap: 4px; margin-left: auto; }
nav.top a.nl {
  color: var(--muted); text-decoration: none; font-size: 0.93rem; font-weight: 500;
  padding: 5px 13px; border-radius: 999px;
}
nav.top a.nl:hover { color: var(--accent); background: var(--accent-soft); }
nav.top a.nl.active { color: var(--accent); background: var(--accent-soft); font-weight: 700; }

/* ---------- Hero ---------- */
header.hero {
  position: relative; overflow: hidden;
  display: flex; gap: 36px; align-items: center; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--border); border-radius: 22px;
  padding: 44px 40px;
  box-shadow: var(--shadow);
}
header.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(420px 260px at 108% -20%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%),
    radial-gradient(340px 240px at -8% 115%, color-mix(in srgb, var(--accent-2) 10%, transparent), transparent 70%);
}
.hero .foto-ring {
  position: relative; flex-shrink: 0;
  padding: 5px; border-radius: 50%;
  background: conic-gradient(from 210deg, var(--accent), var(--accent-2), var(--warm), var(--accent));
}
.hero img {
  display: block; width: 150px; height: 150px; border-radius: 50%; object-fit: cover;
  border: 4px solid var(--card);
}
.hero h1 {
  font-family: var(--serif); font-size: clamp(2rem, 5vw, 2.7rem);
  letter-spacing: -0.02em; line-height: 1.12;
}
.hero .role {
  display: inline-block; margin-top: 6px;
  font-size: 1.02rem; font-weight: 650; letter-spacing: 0.01em;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .meta { color: var(--muted); margin-top: 8px; font-size: 0.95rem; }
.hero .meta a { color: var(--accent); text-decoration: none; }
.hero .meta a:hover { text-decoration: underline; }
.intro { margin-top: 16px; color: var(--muted); max-width: 570px; }
.hero .motto {
  margin-top: 18px; font-family: var(--serif); font-style: italic;
  font-size: 1.12rem; color: var(--text);
}
.hero .motto span { color: var(--warm); }
.hero .actions { margin-top: 22px; display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  display: inline-block; text-decoration: none; font-weight: 600; font-size: 0.92rem;
  padding: 9px 20px; border-radius: 999px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.btn.primary {
  color: #fff; background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 6px 18px -8px var(--accent);
}
.btn.primary:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -8px var(--accent); }
.btn.ghost { color: var(--accent); border: 1.5px solid var(--border); background: var(--card); }
.btn.ghost:hover { border-color: var(--accent); transform: translateY(-2px); }

/* ---------- Sections ---------- */
section { margin-top: 52px; }
h2.sec {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--serif); font-size: 1.45rem; font-weight: 700;
  letter-spacing: -0.01em; margin-bottom: 20px;
}
h2.sec::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--border), transparent);
}
.sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 20px; }
.sec-head h2.sec { margin-bottom: 0; flex: 1; }
.sec-head > a { color: var(--muted); font-size: 0.9rem; text-decoration: none; white-space: nowrap; font-weight: 500; }
.sec-head > a:hover { color: var(--accent); }

/* ---------- Timeline (Werdegang) ---------- */
.timeline { position: relative; padding-left: 26px; }
.timeline::before {
  content: ""; position: absolute; left: 7px; top: 10px; bottom: 10px; width: 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2), transparent);
  border-radius: 2px; opacity: 0.45;
}
.timeline .item { position: relative; }
.timeline .item::before {
  content: ""; position: absolute; left: -25px; top: 26px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--card); border: 3px solid var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 15%, transparent);
}

/* ---------- Cards ---------- */
.item {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 22px 26px; margin-bottom: 14px;
  box-shadow: var(--shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.item:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.item .head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: baseline; }
.item h3 { font-size: 1.1rem; letter-spacing: -0.01em; }
.item h3 a { color: var(--text); text-decoration: none; }
.item h3 a::after { content: " →"; opacity: 0; margin-left: 2px; transition: opacity 0.18s ease; }
.item:hover h3 a { color: var(--accent); }
.item:hover h3 a::after { opacity: 1; }
.item .when {
  color: var(--accent); font-size: 0.82rem; font-weight: 600; white-space: nowrap;
  background: var(--accent-soft); padding: 3px 12px; border-radius: 999px;
}
.item .org { color: var(--muted); font-size: 0.92rem; margin-top: 3px; }
.item ul { margin: 12px 0 0 18px; font-size: 0.95rem; }
.item ul li { margin-bottom: 5px; }
.item ul li::marker { color: var(--accent); }
.item p.desc { color: var(--muted); font-size: 0.95rem; margin-top: 8px; }
.item .tags { margin-top: 14px; display: flex; gap: 7px; flex-wrap: wrap; }
.item .tags span {
  font-size: 0.78rem; font-weight: 600; color: var(--accent-2);
  background: color-mix(in srgb, var(--accent-2) 12%, transparent);
  padding: 3px 12px; border-radius: 999px;
}
.item a.ext { color: var(--accent); text-decoration: none; font-size: 0.92rem; font-weight: 650; }
.item a.ext:hover { text-decoration: underline; }

/* ---------- Zertifikate ---------- */
.certs { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.cert {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 18px; font-size: 0.9rem;
  border-left: 3px solid var(--accent-2);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.cert:hover { transform: translateY(-2px); }
.cert b { display: block; }
.cert span { color: var(--muted); font-size: 0.83rem; }

/* ---------- Kontakt ---------- */
.contact-card {
  position: relative; overflow: hidden;
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 24px 28px; display: flex; gap: 12px 36px; flex-wrap: wrap; font-size: 0.98rem;
  box-shadow: var(--shadow);
}
.contact-card::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 4px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
}
.contact-card a { color: var(--accent); text-decoration: none; font-weight: 650; }
.contact-card a:hover { text-decoration: underline; }

/* ---------- Seitentitel ---------- */
.page-title {
  font-family: var(--serif); font-size: clamp(1.8rem, 4.5vw, 2.4rem);
  letter-spacing: -0.02em; margin-bottom: 6px;
}
.page-sub { color: var(--muted); margin-bottom: 32px; max-width: 620px; }

/* ---------- Artikel ---------- */
article.post {
  background: var(--card); border: 1px solid var(--border); border-radius: 22px;
  padding: 44px; box-shadow: var(--shadow);
}
article.post .post-meta {
  color: var(--muted); font-size: 0.88rem; margin-bottom: 18px;
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
}
article.post .post-meta::before {
  content: ""; width: 26px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
article.post h1 {
  font-family: var(--serif); font-size: clamp(1.6rem, 4vw, 2.2rem);
  letter-spacing: -0.02em; line-height: 1.22; margin-bottom: 10px;
}
.prose { font-size: 1.02rem; }
.prose > p:first-of-type::first-letter {
  font-family: var(--serif); font-size: 3.1em; font-weight: 700;
  float: left; line-height: 0.85; padding: 6px 10px 0 0;
  color: var(--accent);
}
.prose h2 {
  font-family: var(--serif); font-size: 1.42rem; margin: 34px 0 12px;
  letter-spacing: -0.01em;
}
.prose h3 { font-size: 1.1rem; margin: 26px 0 8px; }
.prose p { margin: 13px 0; }
.prose ul, .prose ol { margin: 13px 0 13px 22px; }
.prose li { margin-bottom: 6px; }
.prose li::marker { color: var(--accent); }
.prose a { color: var(--accent); text-underline-offset: 3px; }
.prose strong { color: var(--text); }
.prose blockquote {
  border-left: 3px solid var(--warm); padding: 10px 20px; margin: 20px 0;
  color: var(--text); background: color-mix(in srgb, var(--warm) 7%, transparent);
  border-radius: 0 12px 12px 0;
  font-family: var(--serif); font-style: italic; font-size: 1.05em;
}
.prose blockquote p { margin: 4px 0; }
.prose code {
  background: var(--code-bg); border: 1px solid var(--border);
  padding: 1px 6px; border-radius: 6px; font-size: 0.86em;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.prose pre {
  background: var(--code-bg); border: 1px solid var(--border); border-radius: 12px;
  padding: 16px 20px; overflow-x: auto; margin: 16px 0;
}
.prose pre code { background: none; border: none; padding: 0; }
.prose hr { border: none; border-top: 1px solid var(--border); margin: 28px 0; }
.prose table { border-collapse: collapse; margin: 16px 0; width: 100%; font-size: 0.93rem; }
.prose th, .prose td { border: 1px solid var(--border); padding: 9px 14px; text-align: left; }
.prose th { background: var(--accent-soft); font-family: var(--serif); }

/* ---------- Footer ---------- */
footer.bottom {
  margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--border);
  color: var(--muted); font-size: 0.82rem;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}
footer.bottom a { color: var(--muted); }
footer.bottom a:hover { color: var(--accent); }

/* ---------- Scroll-Reveal ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.55s ease, transform 0.55s ease; }
  .reveal.in { opacity: 1; transform: none; }
}

/* ---------- Section- & Item-Icons ---------- */
h2.sec svg { width: 1.35rem; height: 1.35rem; flex-shrink: 0; color: var(--accent); }
.page-title { display: flex; align-items: center; gap: 12px; }
.page-title svg { width: 1.5rem; height: 1.5rem; flex-shrink: 0; color: var(--accent); }
.item .head h3 { display: flex; align-items: center; gap: 9px; }
.item .head h3 svg { width: 1.15em; height: 1.15em; flex-shrink: 0; color: var(--accent); }
article.post h1 { display: flex; align-items: center; gap: 12px; }
article.post h1 svg { width: 1.15em; height: 1.15em; flex-shrink: 0; color: var(--accent); }

@media (max-width: 560px) {
  header.hero { padding: 30px 24px; gap: 24px; }
  article.post { padding: 28px 22px; }
  nav.top .links { margin-left: 0; }
  .timeline { padding-left: 22px; }
  .timeline .item::before { left: -21px; }
}
