/* ------------------------------------------------------------------
   PD Dr. med. Felix Semmler: Portfolio
   Palette:  paper #FBFAF8 · ink #1C2B33 · petrol #2C7A73
             mist #E7EDEC · soft #5C6B72
------------------------------------------------------------------- */

@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("fonts/bricolage-grotesque.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter.woff2") format("woff2");
}

:root {
  --paper: #FBFAF8;
  --ink: #1C2B33;
  --petrol: #2C7A73;
  --petrol-dark: #1F5A54;
  --mist: #E7EDEC;
  --soft: #5C6B72;
  --line: #DDE2E1;
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 62rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

a { color: var(--petrol-dark); }
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--petrol);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Platzhalter-Markierung: auffällig, damit nichts vergessen wird */
.ph {
  background: #FFF3D6;
  border-bottom: 1px dashed #C9A227;
  padding: 0 0.15em;
  border-radius: 2px;
  font-style: normal;
}

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

header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.3s ease;
}
header.scrolled { box-shadow: 0 2px 16px rgba(28, 43, 51, 0.08); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.5rem;
  max-width: 62rem;
  margin: 0 auto;
}

.mark {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}

nav.main-nav {
  display: flex;
  gap: 1.4rem;
  flex-wrap: wrap;
}

nav.main-nav a {
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--soft);
  position: relative;
}
nav.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  height: 2px;
  width: 100%;
  background: var(--petrol);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
nav.main-nav a:hover { color: var(--petrol-dark); }
nav.main-nav a:hover::after { transform: scaleX(1); }

.lang {
  font-size: 0.85rem;
  white-space: nowrap;
}
.lang a { text-decoration: none; color: var(--soft); }
.lang .active { font-weight: 600; color: var(--ink); }

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

.hero {
  position: relative;
  overflow: hidden;
  padding: 5.5rem 0 4.5rem;
  border-bottom: 1px solid var(--line);
}

/* Perzentilkurven: pädiatrisches Motiv, dezent im Hintergrund */
.curves {
  position: absolute;
  inset: auto 0 0 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2.5rem;
  align-items: center;
}

.eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--petrol-dark);
  font-weight: 600;
  margin-bottom: 0.9rem;
}

h1 {
  font-family: var(--display);
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.hero .roles {
  margin-top: 1.2rem;
  font-size: 1.15rem;
  color: var(--soft);
  max-width: 32rem;
}

.portrait {
  width: 13rem;
  height: 16rem;
  border-radius: 8rem 8rem 6px 6px; /* Bogen oben: ruhige, eigene Form */
  background: var(--mist);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 0.85rem;
  color: var(--soft);
  padding: 1rem;
}
.portrait img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

/* ---------- Sektionen ---------- */

section {
  padding: 4rem 0;
  border-bottom: 1px solid var(--line);
}
section:last-of-type { border-bottom: none; }

h2 {
  font-family: var(--display);
  font-size: clamp(1.6rem, 3.5vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 1.8rem;
}

h3 {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

section p + p { margin-top: 0.9rem; }

/* ---------- Timeline (Werdegang) ---------- */

.timeline {
  list-style: none;
  border-left: 2px solid var(--mist);
  padding-left: 1.6rem;
  display: grid;
  gap: 1.6rem;
}

.timeline li { position: relative; }

.timeline li::before {
  content: "";
  position: absolute;
  left: -2.05rem;
  top: 0.45rem;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--petrol);
}

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

footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0 3rem;
  font-size: 0.85rem;
  color: var(--soft);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
footer a { color: var(--soft); }

/* ---------- Rechtsseiten (Impressum, Datenschutz, Disclaimer) ---------- */

.legal {
  padding: 3.5rem 0;
  max-width: 44rem;
}
.legal h1 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin-bottom: 1.8rem;
}
.legal h2 {
  font-size: 1.25rem;
  margin: 2rem 0 0.6rem;
}
.legal p + p { margin-top: 0.9rem; }
.legal .back { display: inline-block; margin-top: 2.5rem; }

.disclaimer-box {
  background: #FFF3D6;
  border: 1px solid #C9A227;
  border-radius: 10px;
  padding: 1.2rem 1.5rem;
  margin: 1.5rem 0;
}

.btn-disclaimer {
  display: inline-block;
  background: #C9A227;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.8rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
}
.btn-disclaimer:hover { background: #A8871F; }

/* ---------- Animationen (nur ohne reduced-motion) ---------- */

@media (prefers-reduced-motion: no-preference) {
  @keyframes rise {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: none; }
  }

  /* Hero-Ladesequenz, gestaffelt */
  .hero .eyebrow,
  .hero h1,
  .hero .roles,
  .hero .portrait {
    animation: rise 0.7s cubic-bezier(0.22, 0.7, 0.3, 1) backwards;
  }
  .hero .eyebrow  { animation-delay: 0.10s; }
  .hero h1        { animation-delay: 0.20s; }
  .hero .roles    { animation-delay: 0.32s; }
  .hero .portrait { animation-delay: 0.45s; }

  /* Perzentilkurven zeichnen sich (pathLength="1" im SVG) */
  @keyframes draw { to { stroke-dashoffset: 0; } }
  .curves path {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: draw 1.8s ease-out forwards;
  }
  .curves path:nth-child(1) { animation-delay: 0.3s; }
  .curves path:nth-child(2) { animation-delay: 0.5s; }
  .curves path:nth-child(3) { animation-delay: 0.7s; }

  /* Scroll-Reveals (Klasse .reveal setzt script.js) */
  .reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 0.7, 0.3, 1);
  }
  .reveal.visible { opacity: 1; transform: none; }

  /* Timeline-Punkte poppen nach dem Reveal */
  .timeline li.reveal::before {
    transform: scale(0);
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) 0.25s;
  }
  .timeline li.reveal.visible::before { transform: scale(1); }
}

/* ---------- Mobil ---------- */

@media (max-width: 44rem) {
  .hero-inner { grid-template-columns: 1fr; }
  .portrait { width: 10rem; height: 12.5rem; }
  nav.main-nav { display: none; } /* Anker-Nav auf Mobil entbehrlich, Seite ist kurz */
  section { padding: 3rem 0; }
}
