/* ── Fonts (lokal gehostet) ── */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/Inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/Inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg:        #0a0a0f;
  --bg-card:   #12121a;
  --bg-hover:  #1a1a2e;
  --border:    #1e1e32;
  --text:      #e4e4ed;
  --text-dim:  #8888a0;
  --accent:    #6c63ff;
  --accent2:   #00d4aa;
  --accent3:   #ff6b6b;
  --radius:    12px;
  --shadow:    0 4px 24px rgba(0,0,0,.4);
}
html { scroll-behavior: smooth; overflow-x: hidden; scrollbar-gutter: stable; }
body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-wrap: break-word;
}
a { color: var(--accent2); text-decoration: none; transition: color .2s; }
a:hover { color: #fff; }

/* ── Layout ── */
.container { max-width: 1000px; margin: 0 auto; padding: 0 24px; }

/* ── Header / Hero ── */
header {
  padding: 80px 24px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.avatar {
  width: 120px; height: 120px;
  border-radius: 50%;
  display: inline-block;
  padding: 3px;
  margin-bottom: 20px;
  background: var(--accent);
}
.avatar img {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: 63% 29%;
  display: block;
}
header h1 {
  font-size: 2.8rem; font-weight: 800;
  letter-spacing: -.02em;
}
header .subtitle {
  font-size: 1.15rem; color: var(--text-dim);
  margin-top: 8px; font-weight: 400;
}
header .motto {
  margin-top: 12px;
  font-size: .95rem; color: var(--accent2);
  font-style: italic;
}
.print-only { display: none; }
.header-links {
  margin-top: 24px;
  display: flex; gap: 16px; justify-content: center; flex-wrap: wrap;
}
.header-links a, .header-links button {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 18px;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: .9rem; font-weight: 500;
  transition: all .25s;
}
.header-links button {
  background: none;
  color: inherit;
  font-family: inherit;
  cursor: pointer;
}
.header-links button:disabled {
  opacity: .6;
  cursor: wait;
}
.header-links a:hover, .header-links button:hover {
  border-color: var(--accent);
  background: var(--bg-hover);
  transform: translateY(-2px);
}

/* ── Sections ── */
section { padding: 48px 0; }
section h2 {
  font-size: 1.5rem; font-weight: 700;
  margin-bottom: 28px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  position: relative;
}
section h2::after {
  content: '';
  position: absolute; left: 0; bottom: -1px;
  width: 48px; height: 2px;
  background: var(--accent);
}

/* ── About ── */
.about-text {
  color: var(--text-dim);
  font-size: 1.1rem;
  max-width: 720px;
  line-height: 1.9;
  letter-spacing: .01em;
  font-weight: 350;
  padding: 0 2px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  opacity: .96;
}

/* ── Experience ── */
.timeline { position: relative; padding-left: 32px; }
.timeline::before {
  content: '';
  position: absolute; left: 8px; top: 8px; bottom: 8px;
  width: 2px;
  background: var(--border);
}
.timeline-item {
  position: relative; z-index: 1;
  margin-bottom: 36px;
  padding: 20px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all .25s;
}
.timeline-item:hover {
  border-color: var(--accent);   /* traegt den Hover, falls der Leuchtrahmen entfaellt */
  box-shadow: var(--shadow);
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -28px; top: 24px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg);
}
.timeline-item .date {
  font-size: .82rem; color: var(--accent2);
  font-weight: 600; margin-bottom: 4px;
}
.timeline-item h3 { font-size: 1.1rem; font-weight: 600; }
.timeline-item .company {
  font-size: .92rem; color: var(--text-dim); margin-bottom: 8px;
}
.timeline-item p { color: var(--text-dim); font-size: .92rem; line-height: 1.7; }
.timeline-item ul {
  margin-top: 8px; padding-left: 20px;
  color: var(--text-dim); font-size: .9rem;
}
.timeline-item ul li { margin-bottom: 4px; }

/* ── Education ── */
.edu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.edu-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: all .25s;
}
.edu-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}
.edu-card .date { font-size: .82rem; color: var(--accent2); font-weight: 600; }
.edu-card h3 { font-size: 1rem; font-weight: 600; margin: 4px 0; }
.edu-card .school { font-size: .88rem; color: var(--text-dim); }
.edu-card .details {
  font-size: .82rem; color: var(--text-dim);
  margin-top: 6px; line-height: 1.5;
}

/* ── Skills ── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.skill-group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.skill-group h4 {
  font-size: .82rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--accent2); margin-bottom: 10px;
}
.skill-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.skill-tag {
  padding: 4px 12px;
  border-radius: 100px;
  font-size: .82rem;
  background: rgba(108,99,255,.1);
  border: 1px solid rgba(108,99,255,.2);
  color: var(--text);
  transition: border-color .2s, background .2s;
}
.skill-tag:hover {
  background: rgba(108,99,255,.2);
  border-color: var(--accent);
}

/* ── Certifications ── */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.cert-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .9rem;
  border-left: 3px solid var(--accent);
  transition: all .2s;
}
.cert-item:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

/* ── Languages ── */
.lang-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}
.lang-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  transition: all .2s;
}
.lang-item:hover {
  border-color: var(--accent);
}
.lang-item .lang-name {
  font-weight: 600; font-size: .95rem;
}
.lang-item .lang-level {
  font-size: .82rem; color: var(--accent2); font-weight: 600;
}
.lang-item .lang-desc {
  font-size: .82rem; color: var(--text-dim); margin-top: 2px;
}

/* ── Projects ── */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: all .25s;
}
.project-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.project-card h3 { font-size: 1rem; font-weight: 600; }
.project-card h3 a { color: var(--text); transition: color .2s; }
.project-card h3 a:hover { color: var(--accent2); }
.project-card .desc {
  font-size: .88rem; color: var(--text-dim);
  margin: 6px 0 10px; line-height: 1.6;
}
.project-card .tech-stack {
  display: flex; flex-wrap: wrap; gap: 4px;
}
.project-card .tech-stack span {
  font-size: .75rem; padding: 2px 8px;
  border-radius: 4px;
  background: rgba(255,255,255,.04);
  color: var(--text-dim);
}

/* ── Projekt-Netzkarte ── */
/* Offen und randlos über die volle Fensterbreite; --col-left/--col-w setzt portfolio.js */
.pf {
  position: relative;
  width: 100vw; margin-left: calc(50% - 50vw);
  --col-left: 24px; --col-w: 952px;
  padding-bottom: 8px;
}
.pf-stage {
  position: relative; height: 560px; min-width: 0;
  touch-action: pan-y; -webkit-user-select: none; user-select: none;
}
.pf-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.pf-node {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.pf[data-state="scene"] .pf-node { display: none; }
.pf-panel {
  position: absolute; z-index: 2;
  display: flex; flex-direction: column; gap: 10px; align-content: flex-start;
}
.pf[data-state="map"] .pf-panel { display: none; }
/* Projekt: Text rechts neben der Animation, ohne Kasten */
.pf[data-state="scene"] .pf-panel {
  left: calc(var(--col-left) + var(--col-w) - 320px); width: 320px;
  top: 280px; transform: translateY(-50%);
}
.pf-eyebrow { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--accent2); font-weight: 600; }
.pf-title { font-size: 1.25rem; font-weight: 700; outline: none; }
.pf-status {
  align-self: flex-start; font-size: .75rem; font-weight: 600; color: #ffb454;
  border: 1px solid rgba(255,180,84,.4); border-radius: 6px; padding: 2px 8px;
}
.pf-text { font-size: .9rem; line-height: 1.7; color: var(--text-dim); }
.pf-panel .tech-stack { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.pf-panel .tech-stack span {
  font-size: .75rem; padding: 2px 8px; border-radius: 4px;
  background: rgba(255,255,255,.04); color: var(--text-dim);
}
.pf-link { font-size: .85rem; }
.pf-back {
  align-self: flex-start; background: none; border: 1px solid var(--border); border-radius: 100px;
  color: var(--text); font: inherit; font-size: .8rem; padding: 5px 12px; cursor: pointer;
  transition: border-color .2s;
}
.pf-back:hover { border-color: var(--accent); }
html.pf-on .pf-list { display: none; }
@media (max-width: 900px) {
  .pf { padding-bottom: 0; }
  .pf-stage { height: 540px; }
  .pf-panel, .pf[data-state="map"] .pf-panel, .pf[data-state="scene"] .pf-panel {
    position: static; transform: none;
    width: auto; margin: 8px var(--col-left) 0;
  }
}
@media (max-width: 480px) { .pf-stage { height: 520px; } }

/* ── Footer ── */
footer {
  text-align: center;
  padding: 40px 0 32px;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: .85rem;
}
footer .legal-toggle {
  background: none; border: 0; font-family: inherit;
  display: inline-block;
  margin-top: 12px;
  font-size: .8rem;
  color: var(--text-dim);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--border);
  transition: color .2s;
}
footer .legal-toggle:hover { color: var(--accent2); }
footer .legal-section {
  display: none;
  margin-top: 20px;
  padding: 20px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: left;
  font-size: .82rem;
  line-height: 1.7;
}
footer .legal-section.show { display: block; }
footer .legal-section h3 {
  font-size: .9rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}
footer .legal-section p { margin-bottom: 6px; }
footer .legal-section p:last-child { margin-bottom: 0; }
footer .legal-section a { color: var(--accent2); }
footer .legal-section a:hover { color: #fff; }

/* ── Navigation ── */
html { scroll-padding-top: 68px; }
#site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 52px;
  padding: 0 16px;
  background: rgba(10,10,15,0);
  border-bottom: 1px solid transparent;
  transition: transform .35s cubic-bezier(.2,.8,.3,1), background .3s, border-color .3s;
}
#site-nav.is-scrolled { background: rgba(10,10,15,.94); border-bottom-color: var(--border); }
#site-nav.is-hidden { transform: translateY(-100%); }
.nav-links { display: flex; gap: 2px; margin-left: auto; }
#site-nav .nav-brand {
  display: inline-flex; align-items: center; gap: 8px;
  flex-shrink: 0;
  color: var(--text); font-weight: 700; font-size: .92rem; letter-spacing: -.01em;
  padding: 6px 4px;
}
.nav-mark {
  width: 14px; height: 14px; border: 2px solid var(--accent); border-radius: 3px;
  position: relative;
}
.nav-mark::after {
  content: ''; position: absolute; inset: 3px; background: var(--accent2); border-radius: 1px;
}
.nav-links a {
  position: relative;
  font-size: .84rem;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--text-dim);
  white-space: nowrap;
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--text); background: var(--bg-hover); }
.nav-links a.is-active, .nav-links a[aria-current="page"] { color: var(--text); }
.nav-links a.is-active::after, .nav-links a[aria-current="page"]::after {
  content: ''; position: absolute; left: 12px; right: 12px; bottom: 2px;
  height: 2px; border-radius: 2px; background: var(--accent);
}
.nav-toggle {
  display: none;
  margin-left: auto;
  width: 40px; height: 40px;
  background: none; border: 1px solid var(--border); border-radius: 8px;
  cursor: pointer; position: relative;
}
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
  position: absolute; left: 50%; width: 18px; height: 2px; margin-left: -9px;
  background: var(--text); border-radius: 2px;
  transition: transform .25s, opacity .2s;
}
.nav-toggle-bar { top: 50%; margin-top: -1px; }
.nav-toggle-bar::before, .nav-toggle-bar::after { content: ''; left: 0; margin-left: 0; }
.nav-toggle-bar::before { transform: translateY(-6px); }
.nav-toggle-bar::after { transform: translateY(6px); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: rotate(45deg); background: var(--text); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: rotate(-45deg); background: var(--text); }
.nav-toggle:focus-visible, .nav-links a:focus-visible, #site-nav .nav-brand:focus-visible {
  outline: 2px solid var(--accent2); outline-offset: 2px;
}

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    margin: 0; padding: 8px 12px 14px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .2s, transform .2s, visibility 0s .2s;
  }
  #site-nav.is-open { background: var(--bg); border-bottom-color: var(--border); }
  #site-nav.is-open .nav-links { opacity: 1; visibility: visible; transform: none; transition: opacity .2s, transform .2s; }
  .nav-links a { font-size: 1rem; padding: 13px 8px; border-radius: 6px; }
  .nav-links a.is-active::after, .nav-links a[aria-current="page"]::after {
    left: 0; right: auto; top: 12px; bottom: 12px; width: 3px; height: auto;
  }
}

/* Sprungleiste auf der Über-mich-Seite */
.subnav {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 4px 0 8px;
}
.subnav a {
  font-size: .82rem; font-weight: 500; color: var(--text-dim);
  padding: 6px 14px; border: 1px solid var(--border); border-radius: 100px;
  transition: color .2s, border-color .2s;
}
.subnav a:hover { color: var(--text); border-color: var(--accent); }
@media print { .subnav, #site-nav { display: none !important; } }

/* ── Padding für fixed Nav ── */
body { padding-top: 52px; }

/* ── Hero-Intro: Warp-Tunnel als Canvas in nativer Auflösung ──
   Standardmäßig aus; ein Skript im <head> setzt splash-active (kein Intro ohne JS). */
#hero-splash {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  transition: opacity .8s ease-out;
}
html.splash-active #hero-splash, #hero-splash.hide { display: block; }
#hero-splash canvas { display: block; width: 100%; height: 100%; }
#hero-splash.hide { opacity: 0; pointer-events: none; }
/* Übergang: die Seite fliegt aus dem Tunnel heran, solange er noch sichtbar ist */
html.intro-run nav, html.intro-run header, html.intro-run main, html.intro-run footer {
  transform-origin: 50% 0;
  transition: opacity 1.1s ease, transform 1.4s cubic-bezier(.16, .84, .3, 1);
}
html.intro-run #site-nav {
  transition: opacity 1.1s ease, transform 1.4s cubic-bezier(.16, .84, .3, 1), background .3s, border-color .3s;
}
html.intro-hold nav, html.intro-hold header, html.intro-hold main, html.intro-hold footer {
  opacity: 0;
  transform: scale(1.06);
}
html.splash-active, html.splash-active body { overflow: hidden; }
@media (prefers-reduced-motion: reduce) {
  #hero-splash { display: none !important; }
}

/* ── Print ── */
@media print {
  /* Sonst kann der Druck-Snapshot mitten in einer Farb-/Opacity-Transition
     (Breathing Glow, Scroll-Reveal, ...) entstehen und Karten wirken blass. */
  * { animation: none !important; transition: none !important; }
  nav { display: none; }
  .print-only { display: block; }
  header .subtitle { color: #333; }
  header .motto { color: #444; }
  body { padding-top: 0; background: #fff; color: #111; }
  header::before { display: none; }
  header { padding: 32px 24px 20px; }
  header h1 {
    color: #111 !important;
    -webkit-text-fill-color: #111 !important;
    background: none !important;
    -webkit-background-clip: initial !important;
    background-clip: initial !important;
  }
  .avatar {
    width: 80px; height: 80px;
    box-shadow: none;
    background: none;
    border: 2px solid #999;
    animation: none;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .about-text, .timeline-item p,
  .timeline-item ul, .timeline-item .company,
  .edu-card .school, .cert-item span,
  .project-card .desc, .project-card .tech-stack span,
  .lang-item .lang-desc { color: #333; }
  .project-card h3 a { color: #111; }
  .timeline-item, .edu-card, .skill-group,
  .cert-item, .project-card, .lang-item {
    background: #f5f5f5;
    border-color: #ddd;
    box-shadow: none;
  }
  .skill-tag { background: #e8e8ff; border-color: #ccc; color: #222; }
  .timeline-item:hover, .edu-card:hover,
  .cert-item:hover, .project-card:hover { transform: none; box-shadow: none; }
  .timeline::before { background: #999; }
  .timeline-item::before { background: #6c63ff; border-color: #fff; }
  .legal-toggle { display: none; }
  footer .legal-section { display: block !important; border-color: #ddd; background: #f5f5f5; }
  footer .legal-section p, footer .legal-section h3 { color: #333; }
  section { padding: 24px 0; page-break-inside: avoid; }
  section h2 { color: #111; }
  .header-links a { border-color: #ddd; }
  footer { border-top-color: #ddd; color: #666; }
  .date { color: #6c63ff !important; }
  .skill-group h4 { color: #6c63ff !important; }
  .lang-item .lang-level { color: #6c63ff !important; }
  .pdf-download-btn { display: none !important; }
  /* Scroll-Reveal ist beim Drucken irrelevant -- alles sofort sichtbar,
     auch wenn die Sektion nie ins Sichtfeld gescrollt wurde. */
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ── Verfügbar-Badge ── */
.badge-available {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 22px;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: .82rem; font-weight: 600;
  background: rgba(0,212,170,.08);
  border: 1px solid rgba(0,212,170,.3);
  color: var(--accent2);
}
.badge-available .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent2);
}

/* ── Scroll Reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .5s ease, transform .5s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Sprachbalken ── */
.lang-item .lang-bar {
  height: 3px;
  margin-top: 8px;
  background: var(--accent);
  transition: width .8s ease;
  width: 0;
}
.lang-item.visible .lang-bar { width: var(--pct); }

/* ── Scroll-Fortschritt ── */
#progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  background: var(--accent);
  z-index: 200;
  width: 0;
}



/* ── Responsive Overflow Safeguards ── */
.about-text, .timeline-item, .timeline-item p, .timeline-item ul,
.edu-card, .edu-card .details, .edu-card .school, .skill-group,
.cert-item, .lang-item, .lang-item .lang-desc, .project-card,
.project-card .desc, footer .legal-section, footer .legal-section p {
  overflow-wrap: break-word;
  word-break: break-word;
}
.cert-item > div { min-width: 0; }


/* ── Responsive ── */
@media (max-width: 640px) {
  header h1 { font-size: 1.7rem; }
  header { padding: 60px 24px 32px; }
  .avatar { width: 96px; height: 96px; padding: 2px; }
  .subtitle { font-size: .95rem; }
  section { padding: 28px 0; }
  .timeline { padding-left: 22px; }
  .timeline-item { padding: 16px 18px; }
  .timeline-item::before { left: -18px; width: 10px; height: 10px; }
  .timeline-item h3 { font-size: 1rem; }
  .skills-grid { grid-template-columns: 1fr 1fr; }
  .lang-grid { grid-template-columns: 1fr 1fr; }
  .header-links a { padding: 8px 14px; font-size: .82rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .lang-item .lang-bar { transition: none; }
}
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  header h1 { font-size: 1.4rem; }
  header { padding: 52px 16px 24px; }
  .avatar { width: 80px; height: 80px; margin-bottom: 14px; }
  .subtitle { font-size: .85rem; }
  section { padding: 24px 0; }
  section h2 { font-size: 1.2rem; margin-bottom: 20px; }
  .timeline-item { margin-bottom: 24px; }
  .skills-grid { grid-template-columns: 1fr; }
  .lang-grid { grid-template-columns: 1fr; }
  .header-links { gap: 10px; }
  .header-links a { padding: 6px 12px; font-size: .78rem; }
  .cert-grid { grid-template-columns: 1fr; }
  .project-grid { grid-template-columns: 1fr; }
  .edu-grid { grid-template-columns: 1fr; }
}
@media (max-width: 380px) {
  .container { padding: 0 12px; }
  .skills-grid, .lang-grid, .cert-grid,
  .project-grid, .edu-grid { grid-template-columns: 1fr; }
  .timeline-item { padding: 14px 13px; }
  section h2 { font-size: 1.1rem; }
}

/* ── Landingpage ── */
header.hero {
  text-align: left;
  padding: 0;
  min-height: min(calc(88vh - 52px), 820px);
  display: flex; align-items: center;
  overflow: visible;
}
header.hero .container { width: 100%; padding-top: 72px; padding-bottom: 72px; }
.hero-eyebrow {
  font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent2); margin-bottom: 18px;
}
header.hero h1 {
  font-size: clamp(1.9rem, 7.9vw, 4.6rem);
  line-height: 1.02; letter-spacing: -.035em; font-weight: 800;
  max-width: 14ch;
}
.hero-lead {
  margin-top: 22px; max-width: 56ch;
  font-size: clamp(1.02rem, 1.6vw, 1.2rem); line-height: 1.7; color: var(--text-dim);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 11px 22px; border-radius: 8px; border: 1px solid var(--border);
  color: var(--text); font-weight: 600; font-size: .92rem;
  transition: border-color .2s, background .2s, color .2s;
}
.btn:hover { border-color: var(--accent); color: var(--text); background: var(--bg-hover); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: #7d75ff; border-color: #7d75ff; color: #fff; }

.sec-lead { color: var(--text-dim); margin: -12px 0 24px; max-width: 64ch; }

.svc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 16px;
}
.svc-card {
  display: flex; flex-direction: column; gap: 10px;
  padding: 22px;
  background: rgba(18,18,26,.82);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .25s, transform .25s;
}
.svc-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.svc-icon { width: 30px; height: 30px; color: var(--accent2); }
.svc-card h3 { font-size: 1.05rem; font-weight: 700; color: var(--text); }
.svc-card p { font-size: .9rem; line-height: 1.65; color: var(--text-dim); }
.svc-cta { border-style: dashed; justify-content: center; }
.svc-cta:hover { color: inherit; }
.svc-cta-arrow { color: var(--accent2); font-size: 1.3rem; }

.teaser {
  display: flex; gap: 24px; align-items: center;
  padding: 24px; border: 1px solid var(--border); border-radius: var(--radius);
  background: rgba(18,18,26,.82);
}
.teaser-img {
  width: 96px; height: 96px; flex-shrink: 0;
  border-radius: 50%; object-fit: cover; object-position: 63% 29%;
  border: 2px solid var(--accent);
}
section h2.teaser-title { font-size: 1.2rem; margin-bottom: 6px; padding-bottom: 0; border-bottom: 0; }
section h2.teaser-title::after { display: none; }
.teaser p { color: var(--text-dim); font-size: .95rem; line-height: 1.7; }
.teaser-link { display: inline-block; margin-top: 10px; font-weight: 600; font-size: .92rem; }

.contact-mail {
  display: inline-block;
  font-size: clamp(1.4rem, 4.4vw, 2.6rem); font-weight: 800; letter-spacing: -.03em;
  color: var(--text); overflow-wrap: anywhere;
  border-bottom: 2px solid var(--accent); padding-bottom: 4px;
}
.contact-mail:hover { color: var(--accent2); border-color: var(--accent2); }
.contact-links { display: flex; gap: 12px; margin-top: 22px; }
.contact-links a {
  padding: 8px 18px; border: 1px solid var(--border); border-radius: 100px; font-size: .9rem; font-weight: 500;
}
.contact-links a:hover { border-color: var(--accent); color: var(--text); }

/* Karten auf der Startseite leicht transparent, damit der Schaltkreis dezent durchscheint */

/* ── Platinen-Effekt (Klick in den Hintergrund) ── */
#circuit-fx {
  position: fixed; inset: 0; z-index: -1;
  pointer-events: none; opacity: 0;
  --x: 50%; --y: 40%; --r: 0px;
  -webkit-mask-image: radial-gradient(circle at var(--x) var(--y), #000 0, rgba(0,0,0,.55) calc(var(--r) * .55), transparent var(--r));
          mask-image: radial-gradient(circle at var(--x) var(--y), #000 0, rgba(0,0,0,.55) calc(var(--r) * .55), transparent var(--r));
}
#circuit-fx img, #circuit-fx video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block;
}
#circuit-fx video { mix-blend-mode: screen; }

@media (max-width: 760px) {
  .teaser { flex-direction: column; align-items: flex-start; }
  header.hero { min-height: min(calc(78vh - 52px), 640px); }
  header.hero .container { padding-top: 48px; padding-bottom: 48px; }
  nav .nav-brand { font-size: .82rem; }
}
@media print {
  #circuit-fx, #hero-splash { display: none !important; }
}

/* ── Leistungen: Probenfächer ──
   Drehpunkt unten links (--px/--py = Mitte der Bohrung). Die Blätter liegen in fester
   Reihenfolge zwischen 0° und --spread; ein gewähltes Blatt klappt auf --out nach außen. */
.fan-wrap { position: relative; }
.fan-stage {
  --h: 420px; --w: 56px; --n: 8; --spread: 54deg; --out: 87deg;
  --px: 72px; --py: 44px;
  position: relative; height: calc(var(--h) + 36px); min-width: 0;
}
.fan-strip {
  /* Echte Blätter aus eloxiertem Aluminium (Higgsfield-Aufnahmen), per 9-Slice auf Länge gebracht */
  --a: calc(var(--i) * var(--spread) / (var(--n) - 1));
  --img: url('assets/fan-violet.webp');
  position: absolute;
  left: calc(var(--px) - var(--w) / 2);
  bottom: calc(var(--py) - var(--w) * .45);
  width: var(--w); height: var(--h);
  padding: 0; cursor: pointer; text-align: center;
  background: none;
  border-style: solid; border-color: transparent;
  border-image-source: var(--img);
  border-image-slice: 100 0 220 0 fill;
  border-image-width: calc(var(--w) * .4167) 0 calc(var(--w) * .9167) 0;
  border-image-repeat: stretch;
  border-width: 0;
  transform-origin: 50% calc(100% - var(--w) * .45);
  transform: rotate(-2deg);
  filter: drop-shadow(-3px 4px 4px rgba(0,0,0,.5)) brightness(.94);
  display: flex; flex-direction: column; align-items: center;
  transition: transform .9s cubic-bezier(.2,.8,.2,1) calc(var(--i) * 70ms), filter .3s;
}
.fan-strip:nth-child(3n+2) { --img: url('assets/fan-teal.webp'); }
.fan-strip:nth-child(3n) { --img: url('assets/fan-amber.webp'); }
.fan-stage.is-open .fan-strip { transform: rotate(var(--a)); }
.fan-stage.is-ready .fan-strip { transition: transform .7s cubic-bezier(.2,.8,.2,1), filter .3s; }
.fan-stage.is-ready .fan-strip:not(.is-sel):hover,
.fan-stage.is-ready .fan-strip:not(.is-sel):focus-visible {
  transform: rotate(calc(var(--a) + 2deg));
  filter: drop-shadow(-4px 6px 6px rgba(0,0,0,.55)) brightness(1.06);
}
.fan-stage.is-open .fan-strip.is-sel {
  transform: rotate(var(--out));
  filter: drop-shadow(-2px 10px 10px rgba(0,0,0,.6)) brightness(1.08);
}
.fan-strip:focus-visible { outline: none; }
.fan-strip:focus-visible::after {
  content: ''; position: absolute; inset: -5px; border-radius: 14px;
  border: 2px solid var(--accent2); pointer-events: none;
}
/* Lasergravur: legt das blanke Aluminium frei, daher hell mit feiner Schattenkante */
.fan-cap {
  flex: none; width: 100%; padding-top: calc(var(--w) * .34);
  display: flex; align-items: center; justify-content: center;
  color: rgba(238,238,244,.94);
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.55));
}
.fan-cap svg { width: calc(var(--w) * .46); height: calc(var(--w) * .46); stroke-width: 2; color: inherit; }
.fan-name {
  align-self: flex-start; margin-left: calc(var(--w) * .16);
  display: flex; align-items: center; min-height: 0;
  writing-mode: vertical-rl; transform: rotate(180deg);
  margin-top: 14px;
  font-size: .82rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap;
  color: rgba(238,238,244,.94);
  text-shadow: 0 1px 1px rgba(0,0,0,.55), 0 0 1px rgba(0,0,0,.4);
}
.fan-pivot {
  position: absolute; left: var(--px); bottom: var(--py); z-index: 30;
  width: calc(var(--w) * .62); height: calc(var(--w) * .62);
  transform: translate(-50%, 50%);
  background: url('assets/fan-pivot.webp') center / contain no-repeat;
  filter: drop-shadow(0 3px 4px rgba(0,0,0,.7));
  pointer-events: none;
}
/* Text erscheint nur bei Auswahl, im freien Bereich rechts oberhalb des ausgeklappten Blatts */
.fan-detail {
  position: absolute; top: 0; right: 0; bottom: 120px;
  left: calc(var(--px) + var(--h) * .81 + 40px);
  display: flex; flex-direction: column; justify-content: center; gap: 12px;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .35s, transform .35s, visibility 0s .35s;
}
.fan-wrap.has-sel .fan-detail {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity .4s .25s, transform .4s .25s;
}
.fan-detail.swap > * { animation: fanSwap .45s cubic-bezier(.2,.8,.2,1) both; }
.fan-detail.swap > *:nth-child(2) { animation-delay: .05s; }
.fan-detail.swap > *:nth-child(3) { animation-delay: .1s; }
@keyframes fanSwap { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.fan-num { font-size: .78rem; font-weight: 700; letter-spacing: .12em; color: var(--accent2); }
.fan-detail h3 { font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.12; letter-spacing: -.02em; font-weight: 800; }
.fan-detail p { color: var(--text-dim); font-size: 1rem; line-height: 1.75; max-width: 46ch; }
.fan-detail .btn { align-self: flex-start; margin-top: 4px; }
html.fan-on .svc-grid {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
@media (max-width: 900px) {
  .fan-stage { --h: 330px; --w: 46px; --px: 56px; --py: 38px; }
  .fan-name { font-size: .7rem; letter-spacing: .08em; }
  .fan-detail h3 { font-size: 1.4rem; }
}
@media (max-width: 640px) {
  .fan-stage { --h: 270px; --w: 40px; --px: 40px; --py: 34px; --spread: 48deg; --out: 86deg; }
  .fan-name { font-size: .64rem; letter-spacing: .06em; margin-top: 10px; }
  .fan-detail { position: static; min-height: 210px; margin-top: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .fan-strip, .fan-stage.is-ready .fan-strip, .fan-detail, .fan-wrap.has-sel .fan-detail { transition: none; }
  .fan-detail.swap > * { animation: none; }
}
