:root {
  color-scheme: dark;
  --blue: #1A688B;          /* Markenblau (Logo) – Flächen/Buttons */
  --blue-hover: #2179a0;
  --accent: #5fb0d4;        /* aufgehelltes Markenblau – Text/Links auf dunkel */
  --accent-soft: rgba(26, 104, 139, .22);
  --text: #d9dee2;
  --heading: #f2f4f5;
  --muted: #98a2a9;
  --bg: #121517;
  --bg-alt: #181c1f;
  --surface: #1e2327;
  --border: #2c3338;
  --radius: 10px;
  --max: 1080px;
  --tag-text: #a9d6ea;
  --tag-border: rgba(95,176,212,.25);
  --border-hover: #3d474e;
  --header-bg: rgba(18, 21, 23, .9);
  --hero-glow-1: rgba(26,104,139,.45);
  --hero-glow-2: rgba(26,104,139,.22);
  --placeholder-bg: #5c4a00;
  --placeholder-text: #ffe08a;
}

/* Helles Design */
:root[data-theme="light"] {
  color-scheme: light;
  --blue-hover: #134f6a;
  --accent: #1A688B;
  --accent-soft: #e8f1f5;
  --tag-text: #134f6a;
  --tag-border: #d3e4ec;
  --text: #2b2b2b;
  --heading: #434242;
  --muted: #6b6b6b;
  --bg: #ffffff;
  --bg-alt: #f6f8f9;
  --surface: #ffffff;
  --border: #e2e6e8;
  --border-hover: #c5cdd2;
  --header-bg: rgba(255, 255, 255, .92);
  --hero-glow-1: rgba(26,104,139,.16);
  --hero-glow-2: rgba(26,104,139,.08);
  --placeholder-bg: #fff3cd;
  --placeholder-text: #5c4a00;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  transition: background-color .2s, color .2s;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
}

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

.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: var(--header-bg);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.site-header .logo img { height: 56px; display: block; margin-left: -12px; }
.header-right { display: flex; align-items: center; gap: 28px; }
.nav { display: flex; gap: 28px; }

/* Logo je nach Design */
.logo-on-light { display: none !important; }
:root[data-theme="light"] .site-header .logo-on-light { display: block !important; }
:root[data-theme="light"] .site-header .logo-on-dark { display: none !important; }

/* Theme-Umschalter */
.theme-toggle {
  display: grid; place-items: center;
  width: 40px; height: 40px; padding: 0;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); color: var(--heading); cursor: pointer;
  transition: border-color .15s, color .15s;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-toggle svg { width: 20px; height: 20px; }

/* Sprachumschalter */
.lang-switch {
  display: grid; place-items: center;
  min-width: 40px; height: 40px; padding: 0 10px;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); color: var(--heading);
  font-size: 14px; font-weight: 600; letter-spacing: .04em;
  transition: border-color .15s, color .15s;
}
.lang-switch:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.lang-switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.header-right .lang-switch + .theme-toggle { margin-left: -16px; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: block; }
.nav a { color: var(--muted); font-weight: 500; font-size: 15px; }
.nav a:hover { color: var(--heading); text-decoration: none; }

/* Hero */
.hero {
  background:
    radial-gradient(ellipse at 85% 0%, var(--hero-glow-1) 0%, transparent 60%),
    radial-gradient(ellipse at 0% 100%, var(--hero-glow-2) 0%, transparent 55%),
    var(--bg);
  color: var(--heading);
  padding: 104px 0 96px;
  border-bottom: 1px solid var(--border);
}
.hero h1 { font-size: clamp(2rem, 4.5vw, 3rem); line-height: 1.15; margin: 0 0 16px; }
.hero p.lead { font-size: 1.2rem; max-width: 640px; color: var(--text); margin: 0 0 32px; }
.eyebrow {
  text-transform: uppercase; letter-spacing: .12em; font-size: 13px;
  font-weight: 600; color: var(--accent); margin: 0 0 12px;
}

.btn {
  display: inline-block; padding: 12px 24px; border-radius: 6px;
  font-weight: 600; font-size: 16px; transition: background .15s, color .15s, border-color .15s;
}
.btn:hover { text-decoration: none; }
.btn-light, .btn-primary { background: var(--blue); color: #fff; border: 2px solid var(--blue); }
.btn-light:hover, .btn-primary:hover { background: var(--blue-hover); border-color: var(--blue-hover); }
.btn-outline { border: 2px solid var(--border); color: var(--heading); margin-left: 12px; }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

/* Sections */
section { padding: 80px 0; }
section.alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
section h2 { font-size: 1.9rem; margin: 0 0 8px; color: var(--heading); }
section h2::after {
  content: ""; display: block; width: 48px; height: 4px;
  background: var(--blue); border-radius: 2px; margin-top: 12px;
}
.section-intro { color: var(--muted); max-width: 680px; margin: 16px 0 40px; }

/* About */
.about { display: grid; grid-template-columns: 1fr 280px; gap: 56px; align-items: start; }
.about p { margin: 0 0 16px; }
.facts {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
}
.facts dl { margin: 0; }
.facts .portrait {
  display: block; width: 160px; height: 160px; margin: 0 auto 24px;
  border-radius: 50%; object-fit: cover;
  border: 3px solid var(--accent); background: var(--border);
}
.facts dt { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.facts dd { margin: 2px 0 16px; font-weight: 600; color: var(--heading); }
.facts dd:last-child { margin-bottom: 0; }

/* Cards */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
  transition: border-color .15s;
}
.card:hover { border-color: var(--border-hover); }
.card h3 { margin: 0 0 10px; font-size: 1.15rem; color: var(--heading); }
.card p { margin: 0; color: var(--muted); }
.card .icon {
  width: 44px; height: 44px; border-radius: 8px;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; margin-bottom: 16px;
}
.card .icon svg { width: 24px; height: 24px; }

/* Tech stack */
.stack { margin-top: 48px; }
.stack h3 { font-size: 1.1rem; color: var(--heading); margin: 0 0 16px; }
.stack-groups { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stack-groups h4 {
  margin: 0 0 10px; font-size: 13px; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted); font-weight: 600;
}
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.tags li {
  background: var(--accent-soft); color: var(--tag-text);
  border: 1px solid var(--tag-border);
  font-size: 14px; font-weight: 500; padding: 3px 12px; border-radius: 999px;
}

/* Projects */
.project .meta { font-size: 14px; color: var(--muted); margin: 0 0 12px; }
.project .meta strong { color: var(--accent); font-weight: 600; }
.project ul { margin: 12px 0 16px; padding-left: 20px; color: var(--text); }
.project ul li { margin-bottom: 4px; }
.project ul.tags { padding-left: 0; margin-bottom: 0; }
.project .tags li { font-size: 13px; margin-bottom: 0; }
.project-featured { grid-column: 1 / -1; border-top: 3px solid var(--accent); }
.grid-2 > .project:not(.project-featured):last-child:nth-child(even) { grid-column: 1 / -1; }
.project p.project-link { margin: 16px 0 0; font-size: 15px; font-weight: 500; }

/* Timeline */
.timeline { margin-top: 56px; }
.timeline h3 { font-size: 1.1rem; color: var(--heading); margin: 0 0 20px; }
.tl-item {
  display: grid; grid-template-columns: 140px 1fr; gap: 24px;
  padding: 16px 0; border-top: 1px solid var(--border);
}
.tl-item .when { color: var(--accent); font-weight: 600; }
.tl-item h4 { margin: 0 0 4px; color: var(--heading); }
.tl-item p { margin: 0; color: var(--muted); }
.tl-list { margin: 10px 0 0; padding-left: 20px; color: var(--muted); font-size: 15px; }
.tl-list li { margin-bottom: 4px; }

/* Contact */
.contact { text-align: center; }
.contact h2::after { margin-left: auto; margin-right: auto; }
.contact .section-intro { margin-left: auto; margin-right: auto; }
.contact-list {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 16px;
  list-style: none; padding: 0; margin: 0 0 32px;
}
.contact-list a {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 22px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: var(--heading); font-weight: 500;
}
.contact-list a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.contact-list svg { width: 20px; height: 20px; color: var(--accent); }

/* Footer */
.site-footer { background: #0c0e10; color: var(--muted); padding: 40px 0; font-size: 15px; border-top: 1px solid var(--border); }
.site-footer .container {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px;
}
.site-footer img { height: 32px; display: block; }
.site-footer a { color: var(--text); }
.site-footer a:hover { color: var(--accent); }
:root[data-theme="light"] .site-footer { background: #434242; color: #cfcfcf; border-top: 0; }
:root[data-theme="light"] .site-footer a { color: #fff; }
:root[data-theme="light"] .site-footer a:hover { color: #a9d6ea; }
.site-footer nav { display: flex; gap: 20px; }

/* Legal pages */
.legal { padding: 64px 0 80px; }
.legal .container { max-width: 800px; }
.legal h1 { color: var(--heading); margin-top: 0; }
.legal h2 { font-size: 1.25rem; margin: 32px 0 8px; color: var(--heading); }
.legal h2::after { display: none; }
.legal-note { font-size: 15px; color: var(--muted); border-left: 3px solid var(--blue); padding: 4px 0 4px 12px; }
.placeholder { background: var(--placeholder-bg); color: var(--placeholder-text); padding: 0 4px; border-radius: 3px; }

/* Responsive */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .stack-groups { grid-template-columns: 1fr 1fr; }
  .about { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav { display: none; }
  .grid-3, .grid-2, .stack-groups { grid-template-columns: 1fr; }
  .hero { padding: 64px 0; }
  .btn-outline { margin: 12px 0 0; }
  section { padding: 56px 0; }
  .tl-item { grid-template-columns: 1fr; gap: 4px; }
}
