:root {
  --bg: #fbfbfc;
  --bg-alt: #f1f1f5;
  --text: #181820;
  --text-muted: #5f6070;
  --border: #dedee6;
  --accent: #414678;
  --accent-ink: #ffffff;
  --accent-soft: #ebecf4;
  --max-width: 880px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(251, 251, 252, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__brand {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.02em;
  color: var(--text);
}
.nav__brand span { color: var(--accent); }
.nav__brand:hover { text-decoration: none; }
.nav__right { display: flex; align-items: center; gap: 22px; }
.nav__links { display: flex; gap: 28px; }
.nav__lang {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.03em;
}
/* Segmented control, not muted metadata: at 13px in --text-muted the labels
   read as disabled next to an 18px colour flag. Full-contrast text plus a
   filled pill on the active one carries the state without relying on colour. */
.nav__lang a {
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 7px;
}
.nav__lang a[aria-current="true"] {
  background: var(--accent-soft);
  color: var(--accent);
}
/* Inline SVG, not emoji: Windows ships no country-flag glyphs, so an emoji
   flag renders as the bare letters "DE"/"US" in Chrome on Windows. */
.nav__lang .flag {
  display: block;
  border-radius: 1px;
  /* hairline ring so the white stripes of the US flag stay visible on --bg */
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
}
.nav__lang a:hover { background: var(--bg-alt); text-decoration: none; }
.nav__lang a[aria-current="true"]:hover { background: var(--accent-soft); }
.nav__links a {
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 500;
}
.nav__links a:hover { color: var(--text); text-decoration: none; }

/* Hero */
.hero { padding: 96px 24px 72px; }
.hero__inner { max-width: var(--max-width); margin: 0 auto; }
.hero__eyebrow {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.hero__title {
  margin: 0 0 20px;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.1;
  font-weight: 800;
}
.hero__title span { color: var(--accent); }
.hero__tagline {
  max-width: 560px;
  font-size: 19px;
  color: var(--text-muted);
  margin: 0 0 36px;
}
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
}
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { opacity: 0.9; }
.btn--ghost { border-color: var(--border); color: var(--text); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

/* Sections */
.section { padding: 64px 24px; }
.section--alt { background: var(--bg-alt); }
.section__inner { max-width: var(--max-width); margin: 0 auto; }
.section__inner--narrow { max-width: 620px; }
.section__title {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 32px;
}

/* About */
.about__grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 40px;
  align-items: start;
}
.about__photo {
  width: 200px;
  height: 200px;
  border-radius: 16px;
  object-fit: cover;
  display: block;
  border: 1px solid var(--border);
  background: var(--accent-soft);
}
.about__text p { margin: 0 0 16px; color: var(--text-muted); }
.about__text p:last-child { margin-bottom: 0; }

.about__quote {
  margin: 24px 0 0;
  padding: 4px 0 4px 18px;
  border-left: 3px solid var(--accent);
  color: var(--text);
  font-size: 17px;
  font-style: italic;
}

/* CV */
.cv__block { margin-bottom: 40px; }
.cv__block:last-child { margin-bottom: 0; }
.cv__heading {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 20px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}
.cv__entry { margin-bottom: 24px; }
.cv__entry:last-child { margin-bottom: 0; }
.cv__entry-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.cv__role { font-weight: 700; font-size: 16px; }
.cv__dates { font-size: 14px; color: var(--text-muted); white-space: nowrap; }
.cv__org { margin: 2px 0 8px; color: var(--accent); font-weight: 600; font-size: 14px; }
.cv__list { margin: 0; padding-left: 20px; color: var(--text-muted); }
.cv__list li { margin-bottom: 4px; }

.cv__list--certs { columns: 2; column-gap: 40px; }
.cv__list--certs li { break-inside: avoid; margin-bottom: 8px; }
.cv__list--certs .is-pending { color: var(--accent); font-weight: 600; }

.cv__pills {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.cv__pills li {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
}

.cv__meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.cv__meta-item h4 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
}
.cv__meta-item .cv__list { font-size: 14px; }

/* Contact */
.contact__text { color: var(--text-muted); font-size: 17px; }
.contact__links {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 17px;
  font-weight: 600;
}

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 28px 24px; }
.footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  font-size: 14px;
  color: var(--text-muted);
}

/* Mobile */
@media (max-width: 640px) {
  /* Two rows on mobile: brand above, links + language below. German labels
     ("Uber mich", "Lebenslauf") overflow a single row at 375px and collide
     with the brand - this is language-proof rather than tuned to English. */
  .nav__inner { flex-wrap: wrap; row-gap: 10px; padding: 14px 20px; }
  .nav__right { width: 100%; justify-content: space-between; gap: 12px; }
  .nav__links { gap: 16px; }
  .nav__links a { font-size: 14px; white-space: nowrap; }
  .nav__lang { font-size: 13px; }
  .hero { padding: 64px 20px 48px; }
  .about__grid { grid-template-columns: 1fr; }
  .about__photo { width: 140px; height: 140px; }
  .cv__list--certs { columns: 1; }
  .cv__meta { grid-template-columns: 1fr; gap: 24px; }
  /* 20 pills at 375px otherwise land ~1 per row (16 rows, 12 of them single).
     Tighter type/padding gets it to 12 rows and saves ~300px of scroll. */
  .cv__pills { gap: 8px; }
  .cv__pills li { font-size: 12.5px; padding: 6px 12px; }
}
