/* =========================================================
   Portfolio – Stylesheet
   Theme "Security Blue" (kühles Hellgrau, blauer Akzent, Navy-Schrift)
   ========================================================= */

:root {
  --acc: #1d4ed8;
  --acc2: #0ea5e9;
  --band: #e7ecf3;
  --bg: #f5f7fa;
  --card: #ffffff;
  --ink: #0f1a2e;
  --ink2: #1f2b40;
  --ink3: #3c4a5e;
  --muted: #5d6b7f;
  --warn: #a15c07;
  --ok: #0f7b55;
  --bg-rgb: 245, 247, 250;
  --ink-rgb: 15, 26, 46;

  --serif: 'Space Grotesk', system-ui, sans-serif;
  --sans: 'Instrument Sans', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --gutter: clamp(1.2rem, 5vw, 2.5rem);
  --maxw: 1150px;
}

/* Hero-Zone: helles Blaugrau mit Navy-Schrift */
#home, #statement, #site-header.hero-zone {
  --bg: #e4e9f1;
  --bg-rgb: 228, 233, 241;
  --ink: #0c1628;
  --ink-rgb: 12, 22, 40;
  --ink2: #1a2740;
  --ink3: #2a3850;
  --muted: #44536b;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
}
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--acc); }
::selection { background: var(--acc); color: var(--bg); }
img { max-width: 100%; }

@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes popIn { from { opacity: 0; scale: 0.4; } to { opacity: 1; scale: 1; } }


/* ================= Header ================= */
#site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  background: rgba(var(--bg-rgb), 0.72);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(var(--ink-rgb), 0.08);
  transition: background 0.35s, backdrop-filter 0.35s, border-color 0.35s;
  pointer-events: none;
}
#site-header.scrolled {
  background: transparent;
  backdrop-filter: none; -webkit-backdrop-filter: none;
  border-bottom-color: transparent;
}
#site-header nav {
  display: flex; align-items: center;
  gap: clamp(0.6rem, 2vw, 1.4rem);
  padding: 1.1rem clamp(0.8rem, 3vw, 2rem);
  flex-wrap: nowrap;
}
.navpill {
  pointer-events: auto;
  border-radius: 999px;
  background: transparent;
  border: 1px solid transparent;
  transition: background 0.35s, border-color 0.35s;
}
#site-header.scrolled .navpill {
  background: rgba(var(--bg-rgb), 0.6);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-color: rgba(var(--ink-rgb), 0.14);
}
.navpill.keepborder { border-color: rgba(var(--ink-rgb), 0.25); }
#site-header.scrolled .navpill.keepborder { border-color: rgba(var(--ink-rgb), 0.25); }

.logo {
  font-family: var(--serif); font-size: 1.125rem; letter-spacing: 0.08em;
  color: var(--acc); padding: 0.35rem 0.7rem;
}
#nav-links {
  position: relative;
  display: flex; gap: clamp(0.4rem, 1.2vw, 1rem);
  flex-wrap: nowrap; overflow: hidden; min-width: 0; flex-shrink: 1;
  margin-left: auto; padding: 0.45rem 0.7rem;
}
#nav-links a {
  font-size: clamp(0.6rem, 0.85vw, 0.72rem);
  text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--ink2); white-space: nowrap; flex-shrink: 0;
  border-radius: 999px; padding: 0 0.15rem;
  transition: box-shadow 0.3s, background 0.3s, color 0.2s;
}
#nav-links a:hover { color: var(--acc); }
#nav-links a { position: relative; z-index: 1; }

/* Liquid-Glass-Markierung: gleitet hinter den gehoverten bzw. aktiven Link */
.nav-glass {
  position: absolute; left: 0; top: 0; z-index: 0; pointer-events: none;
  border-radius: 999px; opacity: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.6), rgba(29, 78, 216, 0.12));
  border: 1px solid rgba(29, 78, 216, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 4px 14px -6px rgba(29, 78, 216, 0.45);
  backdrop-filter: blur(6px) saturate(160%); -webkit-backdrop-filter: blur(6px) saturate(160%);
  transition: transform 0.5s cubic-bezier(0.3, 1.35, 0.5, 1), width 0.5s cubic-bezier(0.3, 1.35, 0.5, 1), opacity 0.25s;
}
.nav-glass.no-anim { transition: opacity 0.25s; }
@media (prefers-reduced-motion: reduce) { .nav-glass { transition: opacity 0.2s; } }
/* In der Desktop-Navbar übernimmt das Glas die Aktiv-Markierung */
#site-header #nav-links a.active { box-shadow: none; background: transparent; color: var(--acc); }

#nav-links a.active, #nav-panel a.active {
  box-shadow: 0 0 0 0.35rem rgba(var(--ink-rgb), 0.1), 0 4px 14px rgba(0, 0, 0, 0.35);
  background: rgba(var(--ink-rgb), 0.1);
}
#nav-toggle {
  display: none; align-items: center; gap: 0.4rem; margin-left: auto; cursor: pointer;
  font-family: var(--serif); letter-spacing: 0.08em; font-size: 0.8rem;
  color: var(--ink); padding: 0.45rem 1rem; border-radius: 999px;
  border: 1px solid rgba(var(--ink-rgb), 0.25);
  background: rgba(var(--bg-rgb), 0.6);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  pointer-events: auto; flex-shrink: 0;
}
#nav-cta {
  display: none; align-items: center; gap: 0.4rem; flex-shrink: 0;
  pointer-events: auto; opacity: 0; transition: opacity 0.3s;
}
#nav-cta a {
  display: inline-flex; align-items: center; min-height: 34px; padding: 0 0.95rem;
  border-radius: 999px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.02em; white-space: nowrap;
}
#nav-cta .btn-acc { background: var(--acc); color: #fff; }
#nav-cta .btn-acc:hover { color: #fff; filter: brightness(1.12); }
#nav-cta .btn-ghost {
  border: 1px solid rgba(var(--ink-rgb), 0.35);
  background: rgba(var(--bg-rgb), 0.6);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  color: var(--ink);
}
#nav-cta .btn-ghost:hover { color: var(--acc); }

.lang-switch {
  display: flex; align-items: center; gap: 2px; padding: 3px;
  flex-shrink: 0; white-space: nowrap;
}
.lang-switch button {
  border: none; cursor: pointer; font-family: var(--sans);
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.08em; white-space: nowrap;
  padding: 0.28rem 0.6rem; border-radius: 999px;
  background: transparent; color: var(--muted);
}
.lang-switch button.on { background: var(--ink); color: var(--bg); }

#nav-panel {
  display: none; position: absolute; top: 100%; left: 0; right: 0;
  flex-direction: column;
  padding: 0.6rem clamp(0.8rem, 3vw, 2rem) 1.2rem;
  background: rgba(var(--bg-rgb), 0.96);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(var(--ink-rgb), 0.12);
  pointer-events: auto;
}
#nav-panel.open { display: flex; }
#nav-panel a {
  font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink); padding: 0.85rem 0.2rem;
  border-bottom: 1px solid rgba(var(--ink-rgb), 0.1);
}
#scroll-progress {
  position: absolute; left: 0; bottom: -2px; height: 2px; width: 100%;
  background: var(--acc); transform: scaleX(0); transform-origin: left;
}

@media (max-width: 1039px) {
  #nav-links { display: none; }
  #nav-toggle { display: inline-flex; }
}
@media (max-width: 719px) {
  .lang-switch button { padding: 0.55rem 0.7rem; }
  #nav-toggle { min-height: 38px; }
}

/* ================= 3D-Objekt ================= */
#model3d { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0; }

main { position: relative; z-index: 1; overflow-x: clip; }

/* ================= Hero ================= */
#home { position: relative; height: 240vh; background: var(--bg); }
#hero-stage {
  position: sticky; top: 0; height: 100vh; overflow: hidden;
  display: flex; justify-content: center;
}
#bg-canvas { position: absolute; inset: 0; z-index: 2; pointer-events: none; }

#hero-cta {
  position: absolute; left: 50%; bottom: calc(1.8rem + clamp(2.6rem, 6vh, 3.4rem));
  transform: translateX(-50%); z-index: 6;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.4rem;
  background: rgba(var(--bg-rgb), 0.82);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(var(--ink-rgb), 0.14);
  border-radius: 999px; width: max-content; max-width: calc(100vw - 2rem);
}
#hero-cta a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 1.2rem;
  border-radius: 999px; font-weight: 600; font-size: 0.92rem;
}
#hero-cta .btn-acc { background: var(--acc); color: #fff; }
#hero-cta .btn-acc:hover { color: #fff; filter: brightness(1.1); }
#hero-cta .btn-ghost { border: 1px solid rgba(var(--ink-rgb), 0.35); color: var(--ink); }

#name-marquee {
  position: absolute; top: 50%; left: 0; width: 100%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: clamp(1rem, 3.5vh, 2.5rem);
  z-index: 0; opacity: 0; pointer-events: none; user-select: none;
}
#name-marquee .row { overflow: hidden; }
#name-marquee .track { display: flex; width: max-content; animation: marquee 24s linear infinite; }
#name-marquee .row.rev .track { animation-direction: reverse; }
#name-marquee span {
  font-family: var(--serif); font-size: clamp(4rem, 11vw, 9rem);
  line-height: 0.9; white-space: nowrap; color: var(--ink);
}
#name-marquee span.outline { color: transparent; -webkit-text-stroke: 2px var(--ink); }

#portrait {
  position: absolute; left: 0; right: 0; bottom: 0; margin-inline: auto;
  width: 100vw; height: 100vh; z-index: 1; overflow: hidden; cursor: crosshair;
}
#portrait-layer { position: absolute; inset: 0; transform-origin: 0 0; will-change: transform; }
#portrait-layer img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 22%; filter: contrast(1.03);
}
#portrait-color-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* Sticker */
#stickers { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.sticker {
  position: absolute; opacity: 0;
  animation: popIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) var(--d, 0.3s) forwards;
}
.sticker > div { display: inline-block; animation: floaty var(--fd, 6s) ease-in-out var(--fo, 0s) infinite; }
/* Sticker als Terminal-Chips ("> Rolle") */
.st {
  font-family: var(--mono); font-size: 0.85rem; font-weight: 500; letter-spacing: 0.01em;
  white-space: nowrap; padding: 0.5rem 0.85rem; border-radius: 8px;
  box-shadow: 0 10px 28px -8px rgba(15, 26, 46, 0.28);
}
.st::before { content: '>'; margin-right: 0.6ch; opacity: 0.5; }
.st-blue { background: var(--acc); color: #fff; font-size: 0.95rem; }
.st-white { background: #fff; color: #0f1a2e; border: 1px solid rgba(29, 78, 216, 0.18); }
.st-white::before { color: var(--acc); opacity: 1; }
.st-dark { background: #0f1a2e; color: #e6edf8; }
.st-dark::before { color: #5cc8ff; opacity: 1; }
.st-outline { color: #0f1a2e; border: 1.5px solid #0f1a2e; background: rgba(255, 255, 255, 0.25); box-shadow: none; }
.st-glass {
  color: #0f1a2e; border: 1px solid rgba(15, 26, 46, 0.35); background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); box-shadow: none;
}

/* Terminal-Schriftzug "$ whoami" – steht frei auf dem Foto */
#signature {
  position: absolute; left: 50%; top: 55%;
  transform: translate(-50%, -50%); z-index: 5;
  display: flex; align-items: center; white-space: nowrap;
  font-family: var(--mono); font-weight: 500; font-size: clamp(1.75rem, 5.6vw, 4.15rem); line-height: 1;
  color: var(--acc); letter-spacing: -0.02em;
  text-shadow: 0 1px 18px rgba(255, 255, 255, 0.55);
  opacity: 0; pointer-events: none; user-select: none;
  will-change: transform, opacity;
}
#signature .term-prompt { opacity: 0.55; margin-right: 0.6ch; }
#signature .term-cursor {
  display: inline-block; width: 0.6ch; height: 1em; margin-left: 0.08ch;
  background: currentColor; animation: termBlink 1s step-end infinite;
}
@keyframes termBlink { 50% { opacity: 0; } }

#hero-badge {
  position: absolute; top: 5.2rem; left: 50%; transform: translateX(-50%); z-index: 4;
  display: flex; align-items: center; gap: 0.55rem; margin: 0; padding: 0.5rem 1.1rem;
  border-radius: 999px; background: rgba(var(--bg-rgb), 0.55);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(var(--ink-rgb), 0.25);
  font-size: 0.78rem; letter-spacing: 0.06em; color: var(--ink);
  white-space: nowrap; width: max-content; max-width: 92vw;
}
@media (max-width: 560px) {
  #hero-badge {
    white-space: normal; max-width: calc(100vw - 2rem); text-align: center; justify-content: center;
    line-height: 1.35; font-size: 0.72rem; border-radius: 1.2rem; padding: 0.45rem 0.9rem;
  }
}
@media (hover: none) and (pointer: coarse) {
  #portrait img { filter: none; }
  #hero-cta, #hero-badge, .st-glass { backdrop-filter: none; -webkit-backdrop-filter: none; }
}

/* Schräges Laufband */
#hero-skew {
  position: relative; z-index: 2; background: var(--acc);
  rotate: -1.5deg; scale: 1.05; overflow: hidden; padding: 0.65rem 0; margin: -1rem 0 0;
}
#hero-skew .track { display: flex; width: max-content; animation: marquee 110s linear infinite; }
#hero-skew span {
  font-family: var(--serif); font-size: 1.3rem; letter-spacing: 0.06em;
  color: var(--bg); white-space: nowrap;
}

/* ================= Statement ================= */
#statement {
  margin: -4rem 0 0;
  padding: calc(clamp(5rem, min(26vh, 20vw), 18rem) + 4rem) max(var(--gutter), calc((100% - var(--maxw)) / 2)) clamp(8rem, 20vh, 13rem);
  text-align: center; color: var(--ink);
  background: linear-gradient(to bottom, #e4e9f1 45%, #f5f7fa);
}
#statement p {
  font-family: var(--serif); font-size: clamp(2rem, 5.6vw, 4.2rem);
  line-height: 1.05; margin: 0; text-wrap: balance;
}
#statement p + p { margin-top: 0.4rem; color: var(--muted); }

/* ================= Allgemeine Sektionen ================= */
.section {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(4.5rem, min(22vh, 18vw), 15rem) var(--gutter);
  scroll-margin-top: 4rem;
}
.sec-head {
  display: flex; align-items: baseline; gap: 1rem;
  margin-bottom: clamp(1.5rem, 4vh, 2.5rem);
}
.sec-head h2 {
  font-family: var(--serif); font-weight: 400; font-size: clamp(2.8rem, 8vw, 5.8rem);
  line-height: 1; letter-spacing: -0.01em; margin: 0;
}
.body-text { color: var(--ink3); margin: 0; font-size: 1.125rem; text-wrap: pretty; }
.band {
  background: var(--band);
  box-shadow: 0 0 0 100vmax var(--band);
  clip-path: inset(0 -100vmax);
}

/* ================= Projekte ================= */
#projects .sec-head { margin-bottom: clamp(1.2rem, 3vh, 2rem); }
.project {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(2rem, 5vw, 4rem); align-items: center;
  padding: clamp(3rem, 8vh, 5rem) 0;
  border-top: 1px solid rgba(var(--ink-rgb), 0.12);
}
.project .p-text { display: flex; flex-direction: column; gap: 1.1rem; }
/* Breites Projekt: Text oben, Medium (z. B. Video im Querformat) über die volle Breite */
.project.wide { grid-template-columns: minmax(0, 1fr); gap: clamp(1.6rem, 4vw, 2.6rem); }
.project.wide .p-text .body-text { max-width: 70ch; }
.project.wide .demo-wrap { width: 100%; }

/* Video im kleineren Rahmen (EasyCart): Seitenverhältnis des Videos, nichts abgeschnitten */
.frame.frame-video { aspect-ratio: auto; padding: clamp(8px, 2.5%, 16px); }
.frame.frame-video .frame-inner { height: auto; aspect-ratio: 2522 / 906; background: #fff; }
.frame-video .frame-inner video { object-fit: contain; }

/* Medien ohne Passepartout: abgerundet mit weichem Schatten (wie die Netzplan-Karte) */
.frame.frame-clean {
  padding: 0; background: transparent; border: none; border-radius: 18px; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(15, 26, 46, 0.06), 0 26px 54px -26px rgba(15, 26, 46, 0.45);
}
.frame.frame-clean .frame-inner { box-shadow: none; border-radius: inherit; }

/* Medium breiter als der Text: media-lg leicht, media-xl deutlich */
@media (min-width: 900px) {
  .project.media-lg { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
  .project.media-xl { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); }
}

/* Architekturprinzipien (Projekt 1) */
.principles { display: flex; flex-direction: column; gap: 0.55rem; margin-top: 0.3rem; max-width: 70ch; }
.pr-k { font: 500 0.72rem/1.2 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--acc); }
.principles p { margin: 0; color: var(--ink3); font-size: 0.98rem; }
.principles ul { list-style: none; margin: 0.2rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.principles li {
  font: 500 0.72rem/1 var(--mono); color: var(--ink2); padding: 0.42rem 0.65rem; border-radius: 6px;
  border: 1px solid rgba(29, 78, 216, 0.22); background: rgba(29, 78, 216, 0.05);
}
.p-num {
  font-family: var(--serif); font-size: clamp(2.2rem, 4vw, 3.2rem); line-height: 1;
  color: transparent; -webkit-text-stroke: 2px var(--acc);
}
.project h3 {
  font-family: var(--serif); font-weight: 400; font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  line-height: 1.05; margin: 0;
}
.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em;
  border: 1px solid rgba(var(--ink-rgb), 0.3); border-radius: 999px;
  padding: 0.3rem 0.8rem; color: var(--ink2);
}
.tag.warn { border-color: var(--warn); color: var(--warn); white-space: nowrap; }
.tag.ok { border-color: var(--ok); color: var(--ok); }
.p-meta { color: var(--muted); margin: 0; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; }

/* Passepartout-Rahmen */
.frame {
  aspect-ratio: 4 / 3; background: #fbfaf7; padding: clamp(10px, 4.5%, 26px);
  border: 1px solid rgba(20, 20, 22, 0.08);
  box-shadow: 0 1px 2px rgba(20, 20, 22, 0.06), 0 22px 48px -18px rgba(20, 20, 22, 0.28);
}
.frame-inner {
  width: 100%; height: 100%; overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(20, 20, 22, 0.12), 0 0 0 1px rgba(20, 20, 22, 0.06);
}
.frame-inner img, .frame-inner video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Hinweis über dem Netzplan („Infrastruktur erkunden“) */
.demo-wrap { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; }
.demo-label { display: flex; flex-direction: column; align-items: center; gap: 0.2rem; color: var(--acc); }
.demo-label span { font-family: var(--serif); font-size: clamp(1.3rem, 2.2vw, 1.7rem); letter-spacing: 0.04em; }
/* ================= Motivation ================= */
.lead {
  font-size: clamp(1.3rem, 3vw, 2rem); line-height: 1.35; font-weight: 500;
  max-width: 26ch; margin: 0 0 clamp(2rem, 5vh, 3rem); color: var(--ink);
}
#motivation .body-text { max-width: 70ch; }
#motivation .body-text + .body-text { margin-top: 1.2rem; }

/* ================= Mindset ================= */
#mindset {
  margin-top: clamp(4rem, 10vh, 7rem);
  padding: clamp(3.5rem, min(14vh, 12vw), 10rem) var(--gutter);
  --ink: #eef3fb; --ink-rgb: 238, 243, 251; --muted: #a9b8d0; --acc: #7fb0ff; --band: #0f1f3d;
  color: #eef3fb;
}
.mind-row {
  display: grid; grid-template-columns: clamp(2.5rem, 6vw, 4.5rem) minmax(0, 1fr);
  gap: 1rem; align-items: baseline;
  padding: clamp(1.1rem, 2.6vh, 1.6rem) 0;
  border-top: 1px solid rgba(var(--ink-rgb), 0.12);
}
.mind-row span { font-family: var(--serif); font-size: clamp(1rem, 2vw, 1.3rem); color: var(--acc); letter-spacing: 0.08em; }
.mind-row p { margin: 0; font-size: clamp(1.2rem, 2.6vw, 1.8rem); line-height: 1.3; font-weight: 500; color: var(--ink); text-wrap: pretty; }

/* ================= Erfahrung (horizontal) ================= */
#experience { position: relative; margin-top: clamp(4rem, 10vh, 8rem); height: 400vh; }
#exp-sticky {
  position: sticky; top: 0; height: 100vh; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center;
}
.exp-inner { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
#exp-track {
  display: flex; gap: clamp(1rem, 2.5vw, 1.5rem); width: max-content;
  padding: 0.5rem max(calc((100vw - var(--maxw)) / 2 + clamp(1.2rem, 5vw, 2.5rem)), 1.2rem) 1.5rem;
  will-change: transform;
}
.exp-card {
  position: relative; flex: 0 0 min(420px, 84vw);
  background: var(--card); border: 1px solid rgba(var(--ink-rgb), 0.1);
  border-top: 2px solid rgba(var(--ink-rgb), 0.18);
  padding: clamp(1.6rem, 3vw, 2.4rem);
  display: flex; flex-direction: column; gap: 0.7rem;
}
.exp-card .dot {
  position: absolute; top: -8px; left: clamp(1.6rem, 3vw, 2.4rem);
  width: 14px; height: 14px; border-radius: 50%; background: var(--acc);
  box-shadow: 0 0 0 5px var(--bg);
}
.exp-card .when { font-family: var(--serif); font-size: 1.35rem; color: var(--acc); line-height: 1; letter-spacing: 0.02em; }
.exp-card h3 { font-family: var(--serif); font-weight: 400; font-size: 1.5rem; line-height: 1.15; margin: 0; }
.exp-card .where { text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.75rem; color: var(--muted); }
.exp-card p { color: var(--ink3); margin: 0; font-size: 1.05rem; }
.exp-bar { width: 100%; max-width: var(--maxw); margin: clamp(1rem, 3vh, 2rem) auto 0; padding: 0 var(--gutter); }
.exp-bar .rail { position: relative; height: 1px; background: rgba(var(--ink-rgb), 0.16); }
#exp-progress { position: absolute; left: 0; top: 0; height: 1px; width: 0%; background: var(--acc); }
#exp-progress svg { position: absolute; right: -3px; top: -6px; display: block; }
#exp-track[data-swipe] > .exp-card { opacity: 1 !important; transform: none !important; }

/* ================= Highlights ================= */
#highlights {
  margin-top: clamp(3.5rem, min(14vh, 12vw), 10rem);
  padding: clamp(3.5rem, min(14vh, 12vw), 10rem) var(--gutter);
}
.hl-card {
  background: var(--bg); border: 1px solid rgba(var(--ink-rgb), 0.1);
  padding: clamp(1.4rem, 2.6vw, 2rem); display: flex; flex-direction: column; gap: 0.7rem;
}
.hl-card h3 { font-family: var(--serif); font-weight: 400; font-size: 1.35rem; line-height: 1.15; margin: 0; }
.hl-card p { color: var(--ink3); margin: 0; font-size: 1.05rem; text-wrap: pretty; }
/* Versetzte Collage */
.hl-mosaic { display: flex; align-items: flex-start; gap: clamp(1.5rem, 4vw, 3.5rem); }
.hl-col { display: flex; flex-direction: column; gap: clamp(3rem, 7vw, 5.5rem); min-width: 0; }
.hl-col-l { flex: 1.35; }
.hl-col-r { flex: 1; margin-top: clamp(4rem, 14vw, 11rem); }
.hl-item { margin: 0; position: relative; }
.hl-ph { overflow: hidden; border-radius: 16px; box-shadow: 0 26px 54px -28px rgba(15, 26, 46, 0.5); }
.hl-ph img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); }
.hl-item:hover .hl-ph img { transform: scale(1.04); }
.hl-a .hl-ph { aspect-ratio: 4 / 3; }
.hl-b .hl-ph { aspect-ratio: 4 / 5; }
.hl-c .hl-ph { aspect-ratio: 16 / 10; width: 88%; margin-left: auto; }
/* Karte überlappt das Foto, abwechselnd rechts / links */
.hl-item .hl-card {
  position: relative; z-index: 1; width: min(78%, 420px); margin-top: -4.5rem;
  background: var(--card); border-radius: 14px;
  box-shadow: 0 22px 44px -24px rgba(15, 26, 46, 0.4);
}
.hl-a .hl-card { margin-left: auto; margin-right: -0.5rem; }
.hl-b .hl-card { margin-left: -1.25rem; width: 90%; }
.hl-c .hl-card { margin-left: 0; }
/* reine Textkarten, leicht eingerückt */
.hl-solo { border-radius: 14px; background: transparent; border: 1px solid rgba(var(--ink-rgb), 0.16); }
.hl-d { width: 82%; margin-left: 12%; }
.hl-e { width: 92%; }
.hl-solo::before { content: '//'; font: 500 0.8rem/1 var(--mono); color: var(--acc); letter-spacing: 0.05em; }
@media (max-width: 899px) {
  .hl-mosaic { flex-direction: column; gap: clamp(3rem, 7vw, 5.5rem); }
  .hl-col { display: contents; }
  .hl-col-r { margin-top: 0; }
  .hl-a { order: 1; } .hl-b { order: 2; } .hl-c { order: 3; } .hl-d { order: 4; } .hl-e { order: 5; } .hl-f { order: 6; }
  .hl-b .hl-ph { aspect-ratio: 4 / 3; }
  .hl-c .hl-ph { width: 100%; }
  .hl-item .hl-card, .hl-b .hl-card { width: 88%; margin-top: -2.5rem; margin-left: auto; margin-right: 0; }
  .hl-c .hl-card { margin-left: 0; margin-right: auto; }
  .hl-d, .hl-e { width: 100%; margin-left: 0; }
}

/* ================= Skills & Interessen ================= */
.label { margin: 0 0 0.9rem; text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.75rem; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: clamp(2rem, 5vh, 3rem); }
.chips.big { gap: 0.8rem; }
.chip { font-size: 0.95rem; border: 1px solid rgba(var(--ink-rgb), 0.3); border-radius: 999px; padding: 0.45rem 1.1rem; color: var(--ink); }
.chip-focus { border-color: var(--acc); color: var(--acc); background: rgba(29, 78, 216, 0.06); }
.chip-big {
  font-family: var(--serif); font-size: clamp(1.1rem, 2.5vw, 1.6rem); letter-spacing: 0.04em;
  border: 2px solid var(--ink); border-radius: 999px; padding: 0.5rem 1.2rem;
}
.langs {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px;
  background: rgba(var(--ink-rgb), 0.12); border: 1px solid rgba(var(--ink-rgb), 0.12);
}
.langs > div { background: var(--bg); padding: 1.2rem 1.4rem; display: flex; flex-direction: column; gap: 0.15rem; }
.langs b { font-family: var(--serif); font-weight: 400; font-size: 1.3rem; }
.langs span { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--acc); }

/* Mini-Terminal (Easter Egg) in den Highlights */
.hl-term { display: flex; flex-direction: column; gap: 0.6rem; }
.sec-idx { font: 500 clamp(0.75rem, 1.2vw, 0.9rem)/1 var(--mono); color: var(--acc); letter-spacing: 0.04em; }
.eg-card { border-radius: 14px; }
.eg-body { padding: 1rem 1.15rem 1.15rem; font: 0.82rem/1.6 var(--mono); color: #cdd7e8; min-height: 9.5rem; }
.eg-body p { margin: 0; }
.eg-q { color: #5cc8ff; }
.eg-line { margin-top: 0.5rem !important; color: #e6edf8; }
.eg-p { color: #8fe3b0; }
.eg-cur { display: inline-block; width: 0.55em; height: 1.05em; margin-left: 2px; vertical-align: -0.15em; background: #5cc8ff; animation: termBlink 1s step-end infinite; }
.eg-out { margin-top: 0.35rem; }
.eg-o { color: #b8c5da; }
.eg-o::before { content: '> '; color: #5cc8ff; }
.eg-joke { margin-top: 0.5rem !important; color: #8fa0bd; font-style: italic; }
.eg-btn {
  margin-top: 0.8rem; font: 500 0.75rem/1 var(--mono); letter-spacing: 0.03em; cursor: pointer;
  color: #0b1222; background: #5cc8ff; border: none; border-radius: 6px; padding: 0.5rem 0.8rem;
  transition: filter 0.2s, transform 0.2s;
}
.eg-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.eg-btn.eg-again { background: transparent; color: #8fa0bd; border: 1px solid rgba(255, 255, 255, 0.15); }

/* ================= Auf einen Blick (Venn-Diagramm) ================= */
.vn-body { display: grid; }
@media (min-width: 860px) {
  .vn-body { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
  .vn-body .nm-panel { border-top: none; border-left: 1px solid rgba(255, 255, 255, 0.07); display: flex; flex-direction: column; justify-content: center; padding: 1.6rem 1.8rem; }
}
#venn .nm-panel .nm-chips { margin: 0.9rem 0 0; }
.vn-svg { display: block; width: 100%; height: auto; font-family: var(--sans); cursor: pointer; }
.vn-set { mix-blend-mode: screen; animation: vnFloat 9s ease-in-out infinite; transition: opacity 0.3s; }
.vn-set circle {
  fill: var(--c); fill-opacity: 0.09; stroke: var(--c); stroke-width: 1.4; stroke-dasharray: 6 6;
  animation: vnDash 16s linear infinite; transition: fill-opacity 0.3s, stroke-width 0.3s;
}
.vn-set.on circle { fill-opacity: 0.24; stroke-width: 2.2; stroke-dasharray: none; filter: url(#vn-glow); }
.has-sel .vn-set:not(.on) { opacity: 0.3; }
@keyframes vnDash { to { stroke-dashoffset: -120; } }
@keyframes vnFloat { 50% { transform: translateY(-5px); } }
.vn-lbl { outline: none; transition: opacity 0.3s; }
.has-sel .vn-lbl:not(.on) { opacity: 0.4; }
.vn-big { fill: #f2f6fc; font-size: 17px; font-weight: 600; }
.vn-sub { fill: #8fa0bd; font: 500 9.5px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; }
.vn-pair { fill: #cdd7e8; font: 500 9.5px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; }
.vn-lbl.on .vn-pair, .vn-lbl.on .vn-big, .vn-lbl:focus-visible text { fill: #5cc8ff; }
.vn-core-dot { fill: #0b1222; stroke: #5cc8ff; stroke-width: 1.5; }
.vn-pulse { fill: none; stroke: #5cc8ff; stroke-width: 1.5; transform-box: fill-box; transform-origin: center; animation: nmPulse 2.4s ease-out infinite; }
.vn-core-k { fill: #5cc8ff; font: 500 7.5px var(--mono); }
.vn-core-n { fill: #f2f6fc; font-size: 11px; font-weight: 600; }
.vn-core.on .vn-core-dot { fill: #16264a; }
@media (prefers-reduced-motion: reduce) { .vn-set, .vn-set circle, .vn-pulse { animation: none; } }

/* ================= Kontakt ================= */
#contact { padding: clamp(5rem, min(26vh, 20vw), 19rem) var(--gutter) clamp(3.5rem, min(14vh, 12vw), 10rem); }
/* Hochformat-Foto, etwa so breit wie „LET’S“ (≈ 2,35 × Schriftgröße von .c-big) */
.c-avatar {
  display: block; width: calc(clamp(3rem, 11vw, 9rem) * 2.35); aspect-ratio: 3 / 4; object-fit: cover;
  border-radius: 18px; margin-bottom: 1.8rem;
  box-shadow: 0 0 0 1px rgba(15, 26, 46, 0.06), 0 26px 54px -26px rgba(15, 26, 46, 0.45);
}
.c-kicker { display: block; font-family: var(--serif); color: var(--acc); font-size: clamp(1rem, 2vw, 1.4rem); letter-spacing: 0.1em; margin-bottom: 0.8rem; }
.c-big { display: block; font-family: var(--serif); font-size: clamp(3rem, 11vw, 9rem); line-height: 0.95; color: var(--ink); }
.c-big:hover { color: var(--acc); }
.c-links { display: flex; flex-wrap: wrap; gap: clamp(1rem, 4vw, 3rem); margin-top: clamp(2rem, 5vh, 3rem); }
.c-links a { font-size: clamp(1rem, 2.2vw, 1.3rem); border-bottom: 2px solid var(--acc); padding: 0.7rem 0 0.2rem; }

/* ================= Footer ================= */
footer {
  position: relative; z-index: 1; text-align: center; padding: 2.5rem 2rem;
  color: var(--muted); font-size: 0.8rem; border-top: 1px solid rgba(var(--ink-rgb), 0.08);
}
footer p { margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem 1.2rem; }
footer a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; padding: 0.6rem 0.2rem; }
footer a:hover { color: var(--acc); }

/* ================= Reduced Motion ================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sticker { animation: none; opacity: 1; }
  .sticker > div, #name-marquee .track, #hero-skew .track { animation: none; }
}

/* ================= Interaktiver Netzplan (Projekt 1) ================= */
.nm-card {
  position: relative; width: 100%; border-radius: 22px; overflow: hidden;
  background: #0b1222; color: #e6edf8;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 34px 70px -26px rgba(0, 0, 0, 0.6);
}
.nm-bar {
  display: flex; align-items: center; gap: 0.7rem; padding: 0.7rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  font: 500 0.7rem/1 var(--mono);
  letter-spacing: 0.04em; color: #8798b5;
}
.nm-dots { display: flex; gap: 5px; }
.nm-dots span { width: 9px; height: 9px; border-radius: 50%; background: #2c3b58; }
.nm-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.nm-status { margin-left: auto; display: flex; align-items: center; gap: 0.45rem; color: #5cc8ff; white-space: nowrap; }
.nm-status i { width: 7px; height: 7px; border-radius: 50%; background: #5cc8ff; animation: nmBlink 1.8s ease-in-out infinite; }
@keyframes nmBlink { 50% { opacity: 0.25; } }
.nm-stage {
  padding: 8px;
  background: radial-gradient(rgba(92, 200, 255, 0.08) 1px, transparent 1.3px) 0 0 / 18px 18px;
}
.nm-svg { display: block; width: 100%; height: auto; font-family: var(--sans); }

.nm-node { cursor: pointer; outline: none; transition: opacity 0.3s; }
.nm-node .box { fill: #121c31; stroke: #26375a; stroke-width: 1.2; transition: stroke 0.2s, fill 0.2s; }
.nm-node .box.grp { fill: rgba(21, 29, 24, 0.55); stroke-dasharray: 4 4; }
.nm-node:hover .box, .nm-node:focus-visible .box { stroke: #5cc8ff; }
.nm-node.sel .box { stroke: #5cc8ff; stroke-width: 1.8; fill: #16264a; filter: url(#nm-glow); }
.nm-node.rel .box { stroke: rgba(92, 200, 255, 0.55); }
.nm-ico { fill: none; stroke: #5cc8ff; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.nm-t { fill: #e6edf8; font-size: 13px; font-weight: 600; }
.nm-tc { font-size: 12.5px; }
.nm-s { fill: #8fa0bd; font-size: 10.5px; }
.nm-gt { fill: #b8c5da; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.nm-dl { fill: #8fa0bd; font-size: 10px; }
.nm-tl { fill: #cdd7e8; font-size: 11px; font-weight: 500; }
.nm-edge { fill: none; stroke: #2a3c60; stroke-width: 1.5; transition: stroke 0.3s, opacity 0.3s; }
.nm-edge.on { stroke: #5cc8ff; stroke-width: 2; stroke-dasharray: 6 5; animation: nmFlow 0.8s linear infinite; }
@keyframes nmFlow { to { stroke-dashoffset: -11; } }
.nm-pkt { fill: #5cc8ff; opacity: 0.85; transition: opacity 0.3s; }
.nm-pulse { fill: none; stroke: #5cc8ff; stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: nmPulse 2s ease-out infinite; pointer-events: none; }
@keyframes nmPulse { 0% { opacity: 0.9; transform: scale(1); } 100% { opacity: 0; transform: scale(1.12, 1.35); } }
.has-sel .nm-node:not(.sel):not(.rel) { opacity: 0.3; }
.has-sel .nm-edge:not(.on) { opacity: 0.25; }
.has-sel .nm-pkt { opacity: 0.2; }

.nm-panel {
  position: relative; min-height: 12.5rem; padding: 1.1rem 1.3rem 1.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07); background: #0e1628;
}
.nm-kicker { font: 500 0.68rem/1.2 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: #5cc8ff; }
.nm-panel h4 { font-family: var(--serif); font-weight: 400; font-size: 1.55rem; line-height: 1.1; margin: 0.35rem 2rem 0.6rem 0; color: #f2f6fc; }
.nm-panel h4 small { font-family: var(--sans); font-size: 0.8rem; color: #8fa0bd; margin-left: 0.3rem; }
.nm-panel p { margin: 0; color: #b8c5da; font-size: 0.95rem; line-height: 1.55; }
.nm-panel p + p { margin-top: 0.5rem; }
.nm-panel .nm-mem b { color: #e6edf8; font-weight: 600; }
.nm-panel ul { margin: 0.6rem 0 0; padding-left: 1.1rem; color: #b8c5da; font-size: 0.92rem; line-height: 1.5; }
.nm-panel li::marker { color: #5cc8ff; }
.nm-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.6rem; }
.nm-chip { font-size: 0.66rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; padding: 0.18rem 0.6rem; border-radius: 999px; color: var(--c); border: 1px solid var(--c); }
.nm-close {
  position: absolute; top: 0.8rem; right: 0.9rem; width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15); background: transparent; color: #cdd7e8;
  font-size: 1.1rem; line-height: 1; cursor: pointer;
}
.nm-close:hover { border-color: #5cc8ff; color: #5cc8ff; }
.nm-fade { animation: nmFade 0.35s ease; }
@keyframes nmFade { from { opacity: 0; transform: translateY(6px); } }
@media (max-width: 560px) {
  .nm-s, .nm-dl { display: none; }
  .nm-title { display: none; }
  .nm-panel { min-height: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .nm-edge.on, .nm-pulse, .nm-status i { animation: none; }
}


/* =========================================================
   Security-Look: Blueprint-Raster, Mono-Labels, Abschnittsnummern
   ========================================================= */
body {
  background-image:
    linear-gradient(rgba(29, 78, 216, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 78, 216, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
}
.sec-head h2, .c-big { font-weight: 500; letter-spacing: -0.035em; }
#statement p { letter-spacing: -0.025em; }
#name-marquee span { letter-spacing: -0.03em; font-weight: 500; }
.project h3, .exp-card h3, .hl-card h3 { font-weight: 500; letter-spacing: -0.02em; }
.p-num { font-weight: 500; }

/* Monospace für kleine, technische Beschriftungen */
.tag, .p-meta, .label, .exp-card .where, .c-kicker, .langs span, #hero-badge {
  font-family: var(--mono);
}
.tag, .p-meta, .exp-card .where, .label { letter-spacing: 0.04em; }
#hero-badge { font-size: 0.74rem; letter-spacing: 0.02em; }

/* Abschnittsnummern: 01 / Projekte */
/* Abschnittsnummern als 4-Bit-Binärindex (0000, 0001, …), gesetzt in js/main.js */
.sec-head::before {
  content: attr(data-idx) " /";
  font-family: var(--mono); font-size: clamp(0.75rem, 1.2vw, 0.9rem); font-weight: 500;
  color: var(--acc); letter-spacing: 0.04em; align-self: flex-start; margin-top: 0.8em;
}
