/* ==========================================================================
   Homepage Dr. Matthias Ehlenz — style.css
   Keine externen Abhängigkeiten (Fonts, CDNs) → datenschutzfreundlich.
   ========================================================================== */

:root {
  --bg: #fafaf9;
  --bg-alt: #ffffff;
  --text: #1c1e26;
  --text-soft: #4b5060;
  --muted: #6e7385;
  --accent: #4f46e5;
  --accent-soft: #eef0ff;
  --accent-2: #0d9488;
  --border: #e4e4e7;
  --hero-bg: #12142b;
  --hero-text: #f4f4ff;
  --hero-soft: #b8bce0;
  --card-shadow: 0 1px 3px rgba(20, 22, 40, .07), 0 8px 24px -12px rgba(20, 22, 40, .12);
  --radius: 14px;
  --maxw: 62rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161f;
    --bg-alt: #1b1e2b;
    --text: #e8e9f0;
    --text-soft: #b6b9c9;
    --muted: #8d92a6;
    --accent: #8b8ffb;
    --accent-soft: #23264a;
    --accent-2: #2dd4bf;
    --border: #2b2e40;
    --card-shadow: 0 1px 3px rgba(0, 0, 0, .4);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 1.03rem;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

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

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }

/* ---------- Header / Navigation ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--hero-bg) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.4rem;
}

.brand {
  color: var(--hero-text);
  font-weight: 650;
  letter-spacing: .02em;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; color: #fff; }
.brand .dr { color: var(--hero-soft); font-weight: 400; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 8px;
  color: var(--hero-text);
  font: inherit;
  padding: .3rem .7rem;
  cursor: pointer;
}

.site-nav ul {
  display: flex;
  gap: .25rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.site-nav a {
  display: block;
  padding: .45rem .7rem;
  border-radius: 8px;
  color: var(--hero-soft);
  font-size: .92rem;
  font-weight: 500;
}
.site-nav a:hover { color: #fff; background: rgba(255, 255, 255, .09); text-decoration: none; }

.site-nav .lang a {
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 999px;
  padding: .3rem .75rem;
  margin-left: .35rem;
  font-weight: 650;
}

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; width: 100%; }
  .site-nav.open { display: block; padding-bottom: .75rem; }
  .site-nav ul { flex-direction: column; }
  .site-header .wrap { flex-wrap: wrap; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  background: var(--hero-bg);
  color: var(--hero-text);
  overflow: hidden;
}

.hero-sphere {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .5;
  pointer-events: none;
}

.hero .wrap {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2.5rem;
  align-items: center;
  padding-top: 4rem;
  padding-bottom: 4.5rem;
}

.hero-portrait {
  width: 168px;
  height: 168px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, .35);
  box-shadow: 0 12px 40px -8px rgba(0, 0, 0, .55);
}

.hero h1 {
  margin: 0 0 .3rem;
  font-size: clamp(1.9rem, 4.5vw, 2.7rem);
  line-height: 1.15;
  letter-spacing: -.01em;
}

.hero .role {
  margin: 0 0 1rem;
  color: var(--hero-soft);
  font-size: 1.05rem;
}

.hero .claim {
  margin: 0 0 1.5rem;
  max-width: 38rem;
  font-size: 1.12rem;
  color: #dcdff5;
}
.hero .claim em { color: #fff; font-style: normal; font-weight: 600; }

.hero-links { display: flex; flex-wrap: wrap; gap: .6rem; }

.hero-links a {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .5rem .95rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .28);
  color: var(--hero-text);
  font-size: .92rem;
  font-weight: 500;
  transition: background .15s ease;
}
.hero-links a:hover { background: rgba(255, 255, 255, .12); text-decoration: none; }
.hero-links a.primary { background: var(--accent); border-color: transparent; }
.hero-links a.primary:hover { background: #6159f0; }

@media (max-width: 680px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: center; padding-top: 3rem; }
  .hero-portrait { margin: 0 auto; }
  .hero .claim { margin-inline: auto; }
  .hero-links { justify-content: center; }
}

/* ---------- Sections ---------- */

section { padding: 3.5rem 0 1rem; }

section > .wrap > h2 {
  font-size: 1.55rem;
  letter-spacing: -.01em;
  margin: 0 0 .4rem;
}

.kicker {
  display: block;
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--accent);
  margin-bottom: .5rem;
}

.lead { color: var(--text-soft); max-width: 46rem; margin-top: 0; }
.lead p { margin: 0 0 1rem; }
.lead p:last-child { margin-bottom: 0; }

/* ---------- Cards ---------- */

.grid {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  margin-top: 1.6rem;
}

.card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--card-shadow);
}

.card h3 { margin: 0 0 .35rem; font-size: 1.08rem; }
.card p { margin: 0; color: var(--text-soft); font-size: .95rem; }

.card .tag {
  display: inline-block;
  margin-bottom: .6rem;
  padding: .12rem .6rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: .74rem;
  font-weight: 650;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.card--focus { border-top: 3px solid var(--accent); }

/* ---------- Facts row ---------- */

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 1rem;
  margin: 2rem 0 .5rem;
}

.fact {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
}

.fact strong { display: block; font-size: 1.5rem; color: var(--accent); letter-spacing: -.02em; }
.fact span { font-size: .85rem; color: var(--muted); }

/* ---------- Timeline (Vita) ---------- */

.timeline { list-style: none; margin: 1.8rem 0 0; padding: 0; position: relative; }

.timeline::before {
  content: "";
  position: absolute;
  left: .45rem;
  top: .4rem;
  bottom: .4rem;
  width: 2px;
  background: var(--border);
}

.timeline li {
  position: relative;
  padding: 0 0 1.5rem 2.2rem;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .42rem;
  width: .95rem;
  height: .95rem;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--accent);
}

.timeline .when {
  font-size: .82rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.timeline h3 { margin: .1rem 0 .2rem; font-size: 1.05rem; }
.timeline p { margin: 0; color: var(--text-soft); font-size: .95rem; }

/* ---------- Publications ---------- */

.publist { list-style: none; margin: 1.6rem 0 0; padding: 0; }

.publist li {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent-2);
  border-radius: 10px;
  padding: .85rem 1.1rem;
  margin-bottom: .8rem;
  font-size: .95rem;
}

.publist .venue { color: var(--muted); font-size: .86rem; display: block; margin-top: .15rem; }

.pub-more { margin-top: 1.2rem; }

/* Full publication list page */
.pubpage h2 { margin-top: 2.5rem; font-size: 1.35rem; }
.pubpage ol { padding-left: 1.4rem; }
.pubpage ol li { margin-bottom: .85rem; color: var(--text-soft); }
.pubpage ol li strong { color: var(--text); }
.pubpage .self { font-weight: 650; color: var(--text); }

/* ---------- Inline lists ---------- */

.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.chips li {
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  padding: .3rem .85rem;
  font-size: .86rem;
  font-weight: 550;
}

.plainlist { margin: 1rem 0 0; padding-left: 1.2rem; color: var(--text-soft); }
.plainlist li { margin-bottom: .45rem; }

/* ---------- Two-column ---------- */

.cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
  gap: 2rem;
  margin-top: 1.4rem;
}

/* ---------- Contact ---------- */

.contact-box {
  margin-top: 1.6rem;
  background: var(--hero-bg);
  color: var(--hero-text);
  border-radius: var(--radius);
  padding: 2rem 2.2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
}

.contact-box p { margin: 0; color: var(--hero-soft); max-width: 30rem; }
.contact-box strong { color: #fff; }

/* ---------- Footer ---------- */

.site-footer {
  margin-top: 3.5rem;
  border-top: 1px solid var(--border);
  padding: 1.5rem 0 2rem;
  font-size: .88rem;
  color: var(--muted);
}

.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .8rem; }
.site-footer a { color: var(--muted); text-decoration: underline; }
.site-footer a:hover { color: var(--accent); }

/* ---------- Subpages ---------- */

.subpage-main { padding-top: 2.5rem; }
.subpage-main h1 { font-size: 1.8rem; letter-spacing: -.01em; }
.backlink { display: inline-block; margin-bottom: 1.5rem; font-size: .9rem; }

@media print {
  .site-header, .hero-links, .site-footer { display: none; }
  body { background: #fff; color: #000; }
}
