/* ── Design-Tokens ──
   Zwei Themes über ein Token-Set: Dark (Nachtblau + Sand) ist der Default,
   Light („Papier & Tinte": warmes Papier, Tinten-Text, Messing-Akzent) wird
   über html[data-theme="light"] aktiviert. Ohne JS greift der Fallback über
   prefers-color-scheme weiter unten. Alle Komponenten nutzen ausschließlich
   Tokens — Farben, die auf Screenshots liegen (Drawer-Close, Video-Overlay),
   bleiben bewusst theme-unabhängig dunkel. */

:root {
  color-scheme: dark;
  --bg: #0f1114;
  --bg-elevated: #171a1f;
  --bg-card: #1a1e24;
  --card-rgb: 26, 30, 36;
  --media-bg: #0a0c0e;
  --text: #ece8e1;
  --text-muted: #b0aaa0;
  --border: rgba(236, 232, 225, 0.1);
  --border-strong: rgba(236, 232, 225, 0.22);
  /* Sand-Akzent: als Fläche/Linie (accent-ui) und als lesbarer Text (accent-text). */
  --accent-ui: #d4c4a8;
  --accent-text: #d4c4a8;
  --chip-active-bg: linear-gradient(180deg, #e6d4b0, #d4c4a8);
  --chip-active-text: #1a1712;
  --chip-active-shadow: 0 4px 18px rgba(212, 196, 168, 0.22);
  --focus-ring: #e8c88a;
  --skip-bg: #e8c88a;
  --skip-text: #0f1114;
  --on-accent-btn: #0f1114;
  --name-fill: linear-gradient(115deg, #f6f1e7 0%, #ece8e1 45%, #d4c4a8 100%);
  --annotation: #d9c9a3;
  --ai-badge-text: #b4a0f0;
  --ai-badge-bg: rgba(167, 139, 250, 0.1);
  --ai-badge-border: rgba(167, 139, 250, 0.22);
  --bg-glow-1: rgba(139, 111, 71, 0.18);
  --bg-glow-2: rgba(61, 139, 253, 0.1);
  --aurora-1: rgba(139, 111, 71, 0.5);
  --aurora-2: rgba(61, 139, 253, 0.22);
  --aurora-3: rgba(212, 196, 168, 0.16);
  --aurora-opacity: 0.45;
  --grain-opacity: 0.35;
  --card-lift-shadow: 0 22px 44px rgba(0, 0, 0, 0.42);
  --card-glow-strength: 22%;
  --drawer-shadow: -28px 0 80px rgba(0, 0, 0, 0.5);
  --tab-active-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  --backdrop-bg: rgba(0, 0, 0, 0.55);
  --video-modal-bg: rgba(15, 17, 20, 0.7);
  --video-modal-bg-hover: rgba(15, 17, 20, 0.4);
  --photo-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
  /* Bewusst kantenlos: Inhaltsflächen (Karten, Sheet, Tags) sind scharf,
     nur Bedienelemente (Chips, Buttons) bleiben als Kontrast rund. */
  --radius: 0;
  --radius-sm: 0;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Figtree", system-ui, sans-serif;
  /* Handschrift nur für die eine Annotation im Hero — nirgendwo sonst. */
  --font-hand: "Caveat", "Bradley Hand", cursive;
  --max: 1200px;
  --gap: clamp(1rem, 2.5vw, 1.75rem);
  --drawer-w: min(520px, 100vw);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --scribble-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 8' preserveAspectRatio='none'%3E%3Cpath d='M0 5 C 14 2, 28 7, 42 4 S 70 2, 84 5 S 112 7, 126 4 S 154 2, 168 5 S 186 3, 200 4' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  --about-detail-label: color-mix(in srgb, var(--text) 76%, var(--text-muted));
}

/* Light-Theme „Papier & Tinte". Aktive Bedienelemente invertieren das
   Dark-Prinzip: statt Sand-Flächen mit dunkler Schrift → Tinte-Flächen
   mit Papier-Schrift. Alle Werte sind WCAG-2.1-AA-geprüft (contrast-check). */
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f1e9;
  --bg-elevated: #fdfcf8;
  --bg-card: #faf8f2;
  --card-rgb: 250, 248, 242;
  --media-bg: #e9e4d8;
  --text: #23252c;
  --text-muted: #5d5951;
  --border: rgba(35, 37, 44, 0.13);
  --border-strong: rgba(35, 37, 44, 0.3);
  --accent-ui: #a8854a;
  --accent-text: #75592a;
  --chip-active-bg: linear-gradient(180deg, #2e3038, #23252c);
  --chip-active-text: #f6f2e9;
  --chip-active-shadow: 0 4px 16px rgba(35, 37, 44, 0.24);
  --focus-ring: #7a5a1c;
  --skip-bg: #5c451a;
  --skip-text: #f6f2e9;
  --name-fill: linear-gradient(115deg, #2a2c34 0%, #23252c 45%, #6d5527 100%);
  --annotation: #8a6d3f;
  --ai-badge-text: #55409e;
  --ai-badge-bg: rgba(109, 86, 190, 0.08);
  --ai-badge-border: rgba(109, 86, 190, 0.32);
  --bg-glow-1: rgba(196, 164, 110, 0.16);
  --bg-glow-2: rgba(61, 139, 253, 0.07);
  --aurora-1: rgba(196, 164, 110, 0.4);
  --aurora-2: rgba(61, 139, 253, 0.14);
  --aurora-3: rgba(168, 133, 74, 0.18);
  --aurora-opacity: 0.32;
  --grain-opacity: 0.2;
  --card-lift-shadow: 0 18px 40px rgba(93, 77, 44, 0.16);
  --card-glow-strength: 0%;
  --drawer-shadow: -28px 0 80px rgba(93, 77, 44, 0.28);
  --tab-active-shadow: 0 1px 3px rgba(93, 77, 44, 0.14);
  --backdrop-bg: rgba(46, 40, 28, 0.45);
  --video-modal-bg: rgba(35, 32, 26, 0.58);
  --video-modal-bg-hover: rgba(35, 32, 26, 0.44);
  --photo-shadow: 0 14px 30px rgba(93, 77, 44, 0.2);
}

/* No-JS-Fallback: Systempräferenz hell, bevor das Inline-Script data-theme
   setzen konnte (oder ohne JS). Identische Werte wie html[data-theme="light"]. */
@media (prefers-color-scheme: light) {
  html:not([data-theme]) {
    color-scheme: light;
    --bg: #f4f1e9;
    --bg-elevated: #fdfcf8;
    --bg-card: #faf8f2;
    --card-rgb: 250, 248, 242;
    --media-bg: #e9e4d8;
    --text: #23252c;
    --text-muted: #5d5951;
    --border: rgba(35, 37, 44, 0.13);
    --border-strong: rgba(35, 37, 44, 0.3);
    --accent-ui: #a8854a;
    --accent-text: #75592a;
    --chip-active-bg: linear-gradient(180deg, #2e3038, #23252c);
    --chip-active-text: #f6f2e9;
    --chip-active-shadow: 0 4px 16px rgba(35, 37, 44, 0.24);
    --focus-ring: #7a5a1c;
    --skip-bg: #5c451a;
    --skip-text: #f6f2e9;
    --name-fill: linear-gradient(115deg, #2a2c34 0%, #23252c 45%, #6d5527 100%);
    --annotation: #8a6d3f;
    --ai-badge-text: #55409e;
    --ai-badge-bg: rgba(109, 86, 190, 0.08);
    --ai-badge-border: rgba(109, 86, 190, 0.32);
    --bg-glow-1: rgba(196, 164, 110, 0.16);
    --bg-glow-2: rgba(61, 139, 253, 0.07);
    --aurora-1: rgba(196, 164, 110, 0.4);
    --aurora-2: rgba(61, 139, 253, 0.14);
    --aurora-3: rgba(168, 133, 74, 0.18);
    --aurora-opacity: 0.32;
    --grain-opacity: 0.2;
    --card-lift-shadow: 0 18px 40px rgba(93, 77, 44, 0.16);
    --card-glow-strength: 0%;
    --drawer-shadow: -28px 0 80px rgba(93, 77, 44, 0.28);
    --tab-active-shadow: 0 1px 3px rgba(93, 77, 44, 0.14);
    --backdrop-bg: rgba(46, 40, 28, 0.45);
    --video-modal-bg: rgba(35, 32, 26, 0.58);
    --video-modal-bg-hover: rgba(35, 32, 26, 0.44);
  --photo-shadow: 0 14px 30px rgba(93, 77, 44, 0.2);
  }

  html:not([data-theme]) .card__cta {
    color: var(--accent-cta-light, var(--accent-cta));
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
}

[id] {
  scroll-margin-top: 1rem;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, var(--bg-glow-1), transparent 60%),
    radial-gradient(ellipse 60% 40% at 100% 0%, var(--bg-glow-2), transparent 50%),
    var(--bg);
}

html.drawer-open {
  overflow: hidden;
}

body.drawer-open {
  overflow: hidden;
  position: fixed;
  left: 0;
  right: 0;
  padding-right: var(--scrollbar-width, 0px);
}

/* Sanft driftende Farbflächen hinter dem Inhalt. Rein dekorativ; bei
   prefers-reduced-motion stehen sie still (globale Animation-Bremse). */
.aurora {
  pointer-events: none;
  position: fixed;
  inset: -25%;
  z-index: 0;
  filter: blur(80px);
  opacity: var(--aurora-opacity);
}

.aurora span {
  position: absolute;
  width: 44vmax;
  height: 44vmax;
  border-radius: 50%;
  will-change: transform;
}

.aurora span:nth-child(1) {
  top: 2%;
  left: 12%;
  background: radial-gradient(circle, var(--aurora-1), transparent 65%);
  animation: aurora-drift-a 34s ease-in-out infinite alternate;
}

.aurora span:nth-child(2) {
  top: 8%;
  right: 6%;
  background: radial-gradient(circle, var(--aurora-2), transparent 65%);
  animation: aurora-drift-b 42s ease-in-out infinite alternate;
}

.aurora span:nth-child(3) {
  bottom: 4%;
  left: 34%;
  background: radial-gradient(circle, var(--aurora-3), transparent 65%);
  animation: aurora-drift-a 50s ease-in-out infinite alternate-reverse;
}

@keyframes aurora-drift-a {
  from {
    transform: translate(0, 0) scale(1);
  }
  to {
    transform: translate(9%, 6%) scale(1.12);
  }
}

@keyframes aurora-drift-b {
  from {
    transform: translate(0, 0) scale(1.08);
  }
  to {
    transform: translate(-8%, 9%) scale(0.94);
  }
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  background-size: 180px;
  z-index: 0;
}

.hero,
.work,
.about,
.footer,
.legal {
  position: relative;
  z-index: 1;
}

.sections {
  isolation: isolate;
}

/* ── Skip link (WCAG 2.4.1) ── */

.skip-link {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--skip-text);
  background: var(--skip-bg);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Hero ── */

.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 2.5rem) var(--gap) clamp(2rem, 5vw, 3.25rem);
}

.hero__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: clamp(1.75rem, 5vw, 3rem);
}

.hero__eyebrow {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.hero__controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.hero__title-row {
  /* Geteilte Maße für Name, Pfeil und Foto — daraus rechnet die
     Desktop-Query den Foto-Überhang unter der Namenszeile heraus. */
  --name-size: clamp(2.75rem, 7vw, 4.25rem);
  --arrow-w: clamp(130px, 16vw, 220px);
  --me-photo: clamp(74px, 9.5vw, 106px);
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.25rem 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.hero__name {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--name-size);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.025em;
  /* Alle Gradient-Töne halten in beiden Themes über 6:1 Kontrast (Large Text: 3:1). */
  background: var(--name-fill);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--text);
}

/* ── Annotation: skizzierter Pfeil zur Fotomitte (Signatur-Element).
   Pfeil liegt absolut links, vertikal zentriert am gesamten Link (Foto +
   Notiz); Start in der SVG-Mitte, Spitze leicht nach oben zur Fotomitte.
   Notiz darunter — nur die handgezeichnete Wellenlinie (::after). ── */

.hero__me {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 0.3rem;
  padding-left: calc(var(--arrow-w) + 0.2rem);
  margin-left: clamp(0.5rem, 2vw, 1.5rem);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.hero__me-main {
  position: relative;
  display: flex;
  align-items: center;
}

.hero__arrow {
  position: absolute;
  left: calc(-1 * (var(--arrow-w) + 0.2rem));
  top: 50%;
  width: var(--arrow-w);
  height: auto;
  color: var(--accent-ui);
  opacity: 0.6;
  transform: translateY(-50%);
  pointer-events: none;
}

.hero__arrow-line,
.hero__arrow-head {
  stroke-width: 1.7;
}

.hero__me-frame {
  position: relative;
  display: block;
  flex-shrink: 0;
}

.hero__me-ring {
  position: absolute;
  inset: -9%;
  width: 118%;
  height: 118%;
  color: var(--annotation);
  opacity: 0.7;
  pointer-events: none;
  transform: rotate(-7deg);
}

.hero__me-photo {
  display: block;
  width: var(--me-photo, 96px);
  height: var(--me-photo, 96px);
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--annotation) 60%, transparent);
  transition:
    transform 0.25s var(--ease-out),
    border-color 0.2s ease;
}

.hero__me-note {
  position: static;
  margin-top: 0.45rem;
  white-space: nowrap;
  text-align: center;
  font-family: var(--font-hand);
  font-size: clamp(1.15rem, 1.7vw, 1.4rem);
  font-weight: 500;
  line-height: 1;
  color: var(--accent-text);
  transform: rotate(-3deg);
  text-decoration: none;
  transition: color 0.2s ease, transform 0.25s var(--ease-out);
}

.hero__me-note::after {
  content: "";
  display: block;
  width: 100%;
  height: 6px;
  margin: 0.22rem auto 0;
  background: var(--accent-ui);
  opacity: 0.6;
  transition: opacity 0.2s ease;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 7'%3E%3Cpath d='M1 4.5 C 10 1.5, 18 5.5, 28 3.2 S 46 1.8, 56 4.2 S 68 5.8, 79 3' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 7'%3E%3Cpath d='M1 4.5 C 10 1.5, 18 5.5, 28 3.2 S 46 1.8, 56 4.2 S 68 5.8, 79 3' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
}

.hero__me:hover .hero__me-photo,
.hero__me:focus-visible .hero__me-photo {
  transform: scale(1.06) rotate(2deg);
  border-color: var(--annotation);
}

.hero__me:hover .hero__me-note,
.hero__me:focus-visible .hero__me-note {
  color: var(--text);
  transform: rotate(-1deg) translateY(-1px);
}

.hero__me:hover .hero__me-note::after,
.hero__me:focus-visible .hero__me-note::after {
  opacity: 0.9;
}

.hero__role {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-text);
}

.hero__bio {
  margin: 0 0 1.5rem;
  max-width: 36rem;
  font-size: clamp(1.02rem, 2vw, 1.15rem);
  line-height: 1.6;
  color: var(--text-muted);
}

.hero__bio-detail {
  display: block;
}

.hero__contact-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Gepunktete Linie → durchgezogen bei Hover (Referenz: „Klavier spielen"). */
.about__interest-video,
.about__interest-egg,
.about__interests a,
.footer a,
.legal__back,
.legal a {
  text-decoration: underline dotted;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  text-decoration-color: color-mix(in srgb, var(--accent-ui) 75%, transparent);
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.about__interest-video:hover,
.about__interest-video:focus-visible,
.about__interest-egg:hover,
.about__interest-egg:focus-visible,
.about__interests a:hover,
.about__interests a:focus-visible,
.footer a:hover,
.footer a:focus-visible,
.legal__back:hover,
.legal__back:focus-visible,
.legal a:hover,
.legal a:focus-visible {
  text-decoration-style: solid;
}

.hero__link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s ease;
}

.hero__link > span:not(.sr-only) {
  text-decoration: underline dotted;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
  text-decoration-color: color-mix(in srgb, var(--accent-ui) 75%, transparent);
  transition: text-decoration-color 0.2s ease;
}

.hero__link-icon {
  flex-shrink: 0;
  opacity: 0.72;
  transition: opacity 0.2s ease;
}

.hero__link-external {
  flex-shrink: 0;
  margin-left: -0.1rem;
  opacity: 0.55;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.hero__link:hover,
.hero__link:focus-visible {
  color: var(--accent-text);
}

.hero__link:hover > span:not(.sr-only),
.hero__link:focus-visible > span:not(.sr-only) {
  text-decoration-style: solid;
  text-decoration-color: var(--accent-ui);
}

.hero__link:hover .hero__link-icon,
.hero__link:hover .hero__link-external {
  opacity: 1;
}

.hero__link--external:hover .hero__link-external {
  transform: translate(1px, -1px);
}

.lang-switch {
  display: inline-flex;
  flex-shrink: 0;
  gap: 0.15rem;
  padding: 0.2rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.lang-switch__btn {
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0.35rem 0.6rem;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.lang-switch__btn:hover {
  color: var(--text);
}

.lang-switch__btn.is-active {
  color: var(--text);
  background: color-mix(in srgb, var(--text) 10%, transparent);
}

/* ── Theme-Toggle ── */

.theme-toggle {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.15s var(--ease-out);
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  color: var(--text);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.theme-toggle:active {
  transform: scale(0.96);
}

/* Icon zeigt das Ziel des Klicks: Mond im Light-Theme, Sonne im Dark-Theme. */
.theme-toggle__icon--moon {
  display: none;
}

html[data-theme="light"] .theme-toggle__icon--sun {
  display: none;
}

html[data-theme="light"] .theme-toggle__icon--moon {
  display: block;
}

/* Ohne JS kann der Toggle nichts schalten — dann ausblenden. */
html:not(.js) .theme-toggle {
  display: none;
}

/* ── Work (projects) ── */

/* Sektions-Trennung übernehmen allein die Überschriften-Linien und der
   Weißraum — keine zusätzlichen Voll-Breiten-Linien (Doppelung vermeiden). */
.work {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(2rem, 4vw, 3rem) var(--gap) clamp(2rem, 4vw, 3rem);
}

.work__catalog {
  display: flex;
  flex-direction: column;
}

.catalog-toolbar {
  margin: -0.2rem 0 var(--gap);
}

.section--catalog .section__heading {
  margin-bottom: clamp(0.65rem, 1.5vw, 0.85rem);
}

.section--grid-empty .grid {
  display: none;
}

/* ── About ── */

.about {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(2rem, 4vw, 3rem) var(--gap) clamp(2.5rem, 5vw, 4rem);
}

.about:focus {
  outline: none;
}

.about .section__heading {
  margin-bottom: clamp(1.75rem, 4vw, 2.5rem);
}

.about__personal {
  display: grid;
  grid-template-columns: minmax(180px, 280px) 1fr;
  gap: clamp(1.75rem, 4.5vw, 3.5rem);
  align-items: start;
  margin-bottom: clamp(2.25rem, 5vw, 3.5rem);
}

/* Foto als „an der Pinnwand festgesteckter" Abzug: Pin bleibt fix, das Papier
   schwingt am Aufhängepunkt mit der Maus (siehe app.js). */
.about__photo {
  --swing-angle: -1.6deg;
  position: relative;
  margin: -0.75rem 0.5rem 0 0;
  padding-top: 2.95rem;
  touch-action: pan-y;
}

@media (min-width: 641px) {
  .about__personal-body {
    margin-top: 1.35rem;
  }
}

.about__photo-pin-mount {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 3;
  transform: translateX(-50%) rotate(calc(var(--swing-angle) * -0.09));
  transform-origin: 50% 88%;
  pointer-events: none;
}

.about__photo-pin {
  display: block;
  overflow: visible;
}

.about__photo-pin-shadow {
  transition: opacity 0.2s ease;
}

.about__photo-swing {
  transform-origin: 50% 0;
  transform: rotate(var(--swing-angle));
  will-change: transform;
}

.about__photo-card {
  position: relative;
  padding: 10px 10px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: var(--photo-shadow);
}

/* Einstichstelle der Reißzwecke oben mittig am Papier. */
.about__photo-card::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 50%;
  width: 5px;
  height: 5px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: color-mix(in srgb, var(--text) 18%, var(--bg-elevated));
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.22),
    0 0 0 1px color-mix(in srgb, var(--text) 8%, transparent);
  pointer-events: none;
  z-index: 1;
}

.about__photo-card img {
  display: block;
  width: 100%;
  height: auto;
}

.about__photo-card figcaption {
  margin: 0.55rem 0 0;
  font-family: var(--font-hand);
  font-size: 1.3rem;
  line-height: 1;
  text-align: center;
  color: var(--accent-text);
  transform: rotate(-1deg);
}

.about__intro {
  margin: 0 0 1.75rem;
  max-width: 58ch;
  font-size: clamp(1.04rem, 1.8vw, 1.14rem);
  line-height: 1.7;
  color: var(--text-muted);
}

.about__interests {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 1.02rem;
  line-height: 1.4;
  color: var(--text-muted);
}

.about__interests li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.about__interest-icon {
  flex-shrink: 0;
  color: var(--accent-ui);
  opacity: 0.9;
}

/* Easter-Egg-Auslöser: sieht aus wie die Nachbarn, die gepunktete Linie
   verrät (wie beim Hero-Link), dass sich hier etwas anklicken lässt. */
.about__interest-egg,
.about__interest-video {
  padding: 0;
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

.about__interest-egg:hover,
.about__interest-egg:focus-visible,
.about__interest-video:hover,
.about__interest-video:focus-visible {
  color: var(--accent-text);
}

.about__interests a {
  color: inherit;
}

.about__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: clamp(1.5rem, 4vw, 3.5rem);
}

.about__label {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1rem);
  margin: 0 0 clamp(1rem, 2.5vw, 1.25rem);
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.01em;
  line-height: 1.25;
  text-wrap: balance;
  color: color-mix(in srgb, var(--accent-text) 68%, var(--text-muted));
}

.about__label::after {
  content: "";
  flex: 0 1 auto;
  width: clamp(2rem, 12vw, 3.5rem);
  height: 6px;
  background: var(--accent-ui);
  opacity: 0.24;
  -webkit-mask: var(--scribble-mask) no-repeat center / 100% 100%;
  mask: var(--scribble-mask) no-repeat center / 100% 100%;
}

.about__personal-body .about__label {
  margin-top: 0.15rem;
}

.skill-list {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.skill-list__term {
  font-size: 1rem;
  font-weight: 600;
  color: var(--about-detail-label);
  margin-bottom: 0.2rem;
}

.skill-list__items {
  margin: 0;
  font-size: 1.06rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.skill-list__sep {
  color: color-mix(in srgb, var(--text-muted) 50%, var(--bg));
}

/* Werdegang: durchgehende Skizzenlinie im Wrapper, Knoten zentriert darauf.
   Hohle Ringe maskieren die Linie in der Mitte (var(--bg)). */
.about__timeline-wrap {
  --timeline-rail: 0.875rem;
  --timeline-dot: 12px;
  position: relative;
}

.about__timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}

.about__timeline-line {
  position: absolute;
  left: calc(var(--timeline-rail) / 2);
  top: calc(0.06em + var(--timeline-dot) / 2 + 2px);
  height: calc(100% - 0.12em - var(--timeline-dot) - 2px);
  width: 6px;
  transform: translateX(-50%);
  color: var(--accent-ui);
  opacity: 0.44;
  pointer-events: none;
  z-index: 0;
  overflow: visible;
}

.about__timeline-line path {
  vector-effect: non-scaling-stroke;
}

.about__timeline-item {
  display: grid;
  grid-template-columns: var(--timeline-rail) 1fr;
  column-gap: 0.55rem;
  align-items: start;
  margin: 0;
  padding: 0 0 1.15rem;
  font-size: 1.06rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.about__timeline-item:last-child {
  padding-bottom: 0;
}

.about__timeline-rail {
  grid-column: 1;
  grid-row: 1 / -1;
  display: flex;
  justify-content: center;
  align-items: start;
  padding-top: 0.06em;
}

.about__timeline-period,
.about__timeline-text {
  grid-column: 2;
}

.about__timeline-dot {
  flex: 0 0 auto;
  display: block;
  color: var(--accent-ui);
  position: relative;
  z-index: 1;
}

.about__timeline-dot-mask {
  fill: var(--bg);
}

.about__timeline-period {
  display: block;
  margin-bottom: 0.12rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  color: var(--about-detail-label);
}

.about__timeline-text {
  display: block;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Sections & Grid ── */

.sections {
  margin: 0;
  padding: 0;
}

.section--labeled {
  margin-top: clamp(2.75rem, 5.5vw, 4.25rem);
}

.section--appendix {
  margin-top: clamp(2.5rem, 5vw, 3.75rem);
}

.section--empty {
  display: none;
}

.section__subheading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.75rem, 2vw, 1.1rem);
  margin: 0 0 clamp(1rem, 2.5vw, 1.35rem);
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  font-weight: 400;
  font-style: italic;
  color: color-mix(in srgb, var(--accent-text) 68%, var(--text-muted));
  letter-spacing: -0.01em;
}

.section__subheading::before,
.section__subheading::after {
  content: "";
  flex: 1 1 1.75rem;
  max-width: 3.5rem;
  height: 6px;
  background: var(--accent-ui);
  opacity: 0.24;
  -webkit-mask: var(--scribble-mask) no-repeat center / 100% 100%;
  mask: var(--scribble-mask) no-repeat center / 100% 100%;
}

.section__subheading::after {
  transform: scaleX(-1);
}

.section__heading {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0 0 var(--gap);
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.1rem);
  font-weight: 400;
  font-style: italic;
  color: var(--accent-text);
  letter-spacing: -0.01em;
}

.section__heading::after {
  content: "";
  flex: 1;
  height: 8px;
  min-width: 2.5rem;
  background: var(--accent-ui);
  opacity: 0.32;
  -webkit-mask: var(--scribble-mask) no-repeat center / 100% 100%;
  mask: var(--scribble-mask) no-repeat center / 100% 100%;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: var(--gap);
}

/* ── Cards ── */

.card {
  position: relative;
  z-index: 1;
  /* Theme-abhängige Wahl der lesbaren CTA-Farbe (Werte kommen inline pro Karte). */
  --cta-color: var(--accent-cta, var(--accent));
}

html[data-theme="light"] .card {
  --cta-color: var(--accent-cta-light, var(--accent-cta));
}

/* Scroll-Reveal: nur wenn JS läuft (html.js) werden Karten initial versteckt
   und per IntersectionObserver eingeblendet — ohne JS bleibt alles sichtbar. */
html.js .card {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.6s var(--ease-out),
    transform 0.6s var(--ease-out);
  transition-delay: calc(var(--stagger, 0) * 60ms);
}

html.js .card.is-visible {
  opacity: 1;
  transform: none;
}

.card--hidden {
  display: none;
}

.card__btn {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 0;
  text-align: left;
  text-decoration: none;
  font-family: inherit;
  color: inherit;
  background: var(--bg-elevated);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: color-mix(in srgb, var(--text) 8%, transparent);
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  --lift: 0px;
  transform: perspective(900px) translateY(var(--lift)) rotateX(var(--tilt-y)) rotateY(var(--tilt-x));
  transition:
    transform 0.35s var(--ease-out),
    border-color 0.3s ease,
    box-shadow 0.35s var(--ease-out);
}

.card__btn:hover,
.card__btn:focus-visible,
.card__btn:active {
  --lift: -4px;
  border-color: var(--cta-color);
  box-shadow:
    var(--card-lift-shadow),
    0 0 24px color-mix(in srgb, var(--accent-cta, var(--accent)) var(--card-glow-strength), transparent);
}

/* Cursor-Licht + leichtes 3D-Kippen — folgen derselben Mausposition. */
@media (hover: hover) and (pointer: fine) {
  .card__btn {
    transform-style: preserve-3d;
    will-change: transform;
  }

  .card__btn::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    border-radius: inherit;
    padding: 2px;
    background: radial-gradient(
      220px circle at var(--mx, 50%) var(--my, 50%),
      color-mix(in srgb, var(--cta-color) 62%, transparent),
      transparent 70%
    );
    -webkit-mask:
      linear-gradient(#fff 0 0) content-box,
      linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask:
      linear-gradient(#fff 0 0) content-box,
      linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.35s ease;
  }

  .card__btn:hover::before,
  .card__btn:focus-visible::before {
    opacity: 0.62;
  }
}

@media (prefers-reduced-motion: reduce) {
  .card__btn {
    --tilt-x: 0deg !important;
    --tilt-y: 0deg !important;
    transform: translateY(var(--lift));
  }
}

.card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--media-bg);
  border-bottom: 1px solid var(--border);
}

@media (hover: hover) and (pointer: fine) {
  .card__media::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: radial-gradient(
      260px circle at var(--mx, 50%) var(--my, 50%),
      color-mix(in srgb, var(--cta-color) 14%, rgba(255, 255, 255, 0.1)),
      transparent 62%
    );
    opacity: 0;
    transition: opacity 0.35s ease;
    mix-blend-mode: soft-light;
  }

  .card__btn:hover .card__media::after,
  .card__btn:focus-visible .card__media::after {
    opacity: 1;
  }
}

.card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.card__placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--accent) 25%, var(--media-bg)),
    var(--media-bg) 70%
  );
}

.card__placeholder span {
  font-family: var(--font-display);
  font-size: 3rem;
  font-style: italic;
  color: color-mix(in srgb, var(--accent) 80%, var(--text));
  opacity: 0.7;
}

.card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.45rem;
  padding: 1.2rem 1.3rem 1.3rem;
}

.card__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.67rem;
  font-weight: 400;
  line-height: 1.2;
}

.card__desc {
  margin: 0;
  flex: 1;
  font-size: 1.04rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.25rem;
}

.card__cta {
  display: inline-flex;
  align-items: center;
  margin-top: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--cta-color);
  letter-spacing: 0.02em;
}

.card__cta-label {
  overflow: hidden;
  max-width: 0;
  opacity: 0;
  white-space: nowrap;
  transition:
    max-width 0.4s var(--ease-out),
    opacity 0.28s ease,
    margin-right 0.4s var(--ease-out);
}

.card__btn:hover .card__cta-label,
.card__btn:focus-visible .card__cta-label {
  max-width: 14rem;
  opacity: 1;
  margin-right: 0.35rem;
}

@media (hover: none) {
  .card__cta-label {
    max-width: 14rem;
    opacity: 1;
    margin-right: 0.35rem;
  }
}

.card__cta-arrow {
  display: inline-block;
  flex-shrink: 0;
  transition: transform 0.3s var(--ease-out);
}

.card__btn:hover .card__cta-arrow,
.card__btn:focus-visible .card__cta-arrow {
  transform: translateX(4px);
}

/* ── Tags ── */

.tag {
  display: inline-block;
  padding: 0.28rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  background: color-mix(in srgb, var(--text) 5%, transparent);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.tag--sm {
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
}

.tag--more {
  color: var(--text);
  background: color-mix(in srgb, var(--text) 8%, transparent);
}

/* ── Facet Filter ── */

.facet-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0.55rem;
}

.facet-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.5rem 0.95rem 0.5rem 0.85rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition:
    color 0.2s,
    border-color 0.2s,
    background 0.2s,
    transform 0.15s var(--ease-out);
}

.facet-chip__icon {
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.facet-chip:hover,
.facet-chip:focus-visible {
  color: var(--text);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.facet-chip:active {
  transform: scale(0.97);
}

.facet-chip.is-active {
  color: var(--chip-active-text);
  background: var(--chip-active-bg);
  border-color: transparent;
  font-weight: 600;
  box-shadow: var(--chip-active-shadow);
  position: relative;
}

.facet-chip.is-active .facet-chip__icon {
  opacity: 1;
}

.facet-chip__count {
  display: inline-grid;
  place-items: center;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  background: color-mix(in srgb, var(--text) 6%, transparent);
  border-radius: 999px;
}

.facet-chip.is-active .facet-chip__count {
  color: var(--chip-active-text);
  background: color-mix(in srgb, var(--chip-active-text) 14%, transparent);
}

/* ── Drawer ── */

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  --accent: var(--accent-ui);
  background: var(--backdrop-bg);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.4s var(--ease-out),
    background 0.55s var(--ease-out);
}

.drawer-backdrop--visible {
  opacity: 1;
  pointer-events: auto;
  background:
    radial-gradient(
      ellipse 38% 70% at 100% 50%,
      color-mix(in srgb, var(--accent) 7%, transparent),
      transparent 48%
    ),
    var(--backdrop-bg);
  animation: drawer-backdrop-breathe 7s ease-in-out infinite;
}

@keyframes drawer-backdrop-breathe {
  0%,
  100% {
    background:
      radial-gradient(
        ellipse 38% 70% at 100% 50%,
        color-mix(in srgb, var(--accent) 5%, transparent),
        transparent 48%
      ),
      var(--backdrop-bg);
  }

  50% {
    background:
      radial-gradient(
        ellipse 38% 70% at 100% 50%,
        color-mix(in srgb, var(--accent) 9%, transparent),
        transparent 48%
      ),
      var(--backdrop-bg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .drawer-backdrop--visible {
    animation: none;
    background:
      radial-gradient(
        ellipse 38% 70% at 100% 50%,
        color-mix(in srgb, var(--accent) 7%, transparent),
        transparent 48%
      ),
      var(--backdrop-bg);
  }
}

.drawer-backdrop[hidden],
.drawer[hidden] {
  display: none !important;
  pointer-events: none !important;
}

.drawer:not(.drawer--open) {
  pointer-events: none !important;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 101;
  width: var(--drawer-w);
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  box-shadow:
    var(--drawer-shadow),
    0 0 0 1px color-mix(in srgb, var(--text) 4%, transparent) inset;
  transform: translateX(100%);
  pointer-events: none;
  transition:
    transform 0.45s var(--ease-out),
    border-color 0.5s var(--ease-out),
    box-shadow 0.5s var(--ease-out);
  overflow: hidden;
  /* Projekt-Akzent: im Light-Theme die abgedunkelte, lesbare Variante. */
  --accent-current: var(--accent, var(--accent-ui));
}

html[data-theme="light"] .drawer {
  --accent-current: var(--accent-light, var(--accent, var(--accent-ui)));
}

.drawer--open {
  transform: translateX(0);
  pointer-events: auto;
  border-left-color: color-mix(in srgb, var(--accent-current) 20%, var(--border));
  box-shadow:
    -3px 0 18px color-mix(in srgb, var(--accent-current) 10%, transparent),
    var(--drawer-shadow),
    0 0 0 1px color-mix(in srgb, var(--text) 4%, transparent) inset;
}

.drawer__scroll {
  position: relative;
  z-index: 1;
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: auto;
}

.drawer__hero {
  position: relative;
  flex-shrink: 0;
  isolation: isolate;
}

.drawer__media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--media-bg);
}

.drawer__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transform: scale(1.02);
}

.drawer__media--fallback {
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--accent-current) 35%, var(--media-bg)),
    var(--media-bg) 65%
  );
  min-height: 200px;
}

/* Das Bild bleibt vollflächig unangetastet; nur das untere Viertel läuft mit
   weich abgestuften Stops (angenäherte Ease-Kurve, keine sichtbare Kante)
   in den Sheet-Hintergrund aus. */
.drawer__hero-scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    to top,
    var(--bg-card) 0%,
    rgba(var(--card-rgb), 0.87) 8%,
    rgba(var(--card-rgb), 0.55) 16%,
    rgba(var(--card-rgb), 0.25) 23%,
    rgba(var(--card-rgb), 0.08) 29%,
    transparent 34%
  );
}

.drawer__hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.drawer__hero-overlay:empty {
  display: none;
}

/* Video-Overlay und Close-Button liegen auf dem Screenshot —
   bleiben deshalb in beiden Themes dunkel. */
.drawer__video {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem;
  color: #fff;
  text-decoration: none;
  pointer-events: auto;
  transition: transform 0.2s var(--ease-out);
}

.drawer__video:hover,
.drawer__video:focus-visible {
  transform: scale(1.04);
  outline: none;
}

.drawer__video-play {
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  padding-left: 0.15rem;
  background: rgba(8, 10, 12, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.drawer__video:hover .drawer__video-play,
.drawer__video:focus-visible .drawer__video-play {
  background: rgba(8, 10, 12, 0.72);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
}

.drawer__video-label {
  padding: 0.3rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.55);
  background: rgba(8, 10, 12, 0.45);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.drawer__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(8, 10, 12, 0.42);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
  transition:
    transform 0.2s var(--ease-out),
    background 0.2s ease,
    color 0.2s ease;
}

.drawer__close:hover,
.drawer__close:focus-visible {
  color: #fff;
  background: rgba(8, 10, 12, 0.62);
  transform: scale(1.05);
  outline: none;
}

.drawer__close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.drawer__body {
  position: relative;
  margin-top: -1.5rem;
  padding: 0 1.35rem 2rem;
  z-index: 1;
}

@media (min-width: 641px) {
  .drawer__body {
    padding-left: 1.85rem;
    padding-right: 1.85rem;
  }
}

.drawer__intro {
  margin-bottom: 1.1rem;
}

.drawer__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem 1.25rem;
}

.drawer__title {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4vw, 2.35rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.drawer__title::after {
  content: "";
  display: block;
  width: 2.25rem;
  height: 2px;
  margin-top: 0.55rem;
  background: var(--accent-current);
  border-radius: 999px;
  opacity: 0.9;
}

.drawer__intro-actions {
  flex-shrink: 0;
  padding-top: 0.2rem;
}

.drawer__visit {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.95rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--on-accent-btn);
  text-decoration: none;
  white-space: nowrap;
  background: var(--accent-btn, var(--accent, var(--accent-ui)));
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset;
  transition:
    transform 0.2s var(--ease-out),
    filter 0.2s ease,
    box-shadow 0.2s ease;
}

html[data-theme="light"] .drawer__visit {
  border-color: color-mix(in srgb, var(--accent-btn, var(--accent-ui)) 55%, #23252c);
  box-shadow: none;
}

.drawer__visit svg {
  flex-shrink: 0;
  opacity: 0.72;
  transition:
    transform 0.2s var(--ease-out),
    opacity 0.2s ease;
}

.drawer__visit:hover,
.drawer__visit:focus-visible {
  filter: brightness(1.06);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.16) inset,
    0 4px 14px color-mix(in srgb, var(--accent-current) 35%, transparent);
  transform: translateY(-1px);
  outline: none;
}

.drawer__visit:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.drawer__visit:hover svg,
.drawer__visit:focus-visible svg {
  opacity: 1;
  transform: translate(1px, -1px);
}

.drawer__stats {
  margin-top: 0.65rem;
  margin-bottom: 0;
}

.drawer__stats:empty {
  display: none;
}

.stat-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.stat-inline__item strong {
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.stat-inline__sep {
  opacity: 0.35;
  user-select: none;
}

.drawer__tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1rem;
  padding: 0.2rem;
  background: color-mix(in srgb, var(--text) 4%, transparent);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.drawer__tab {
  flex: 1;
  min-height: 2.75rem;
  padding: 0.5rem 0.65rem;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.2s, background 0.2s;
}

.drawer__tab:hover,
.drawer__tab:focus-visible,
.drawer__tab:active {
  color: var(--text);
  outline: none;
}

.drawer__tab:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: -2px;
}

.drawer__tab--active {
  color: var(--text);
  background: color-mix(in srgb, var(--text) 10%, transparent);
  box-shadow: var(--tab-active-shadow);
}

.drawer__panels {
  margin-bottom: 1.25rem;
}

.drawer__panel {
  animation: fadeUp 0.35s var(--ease-out) both;
}

.drawer__panel[hidden] {
  display: none;
}

.drawer__copy {
  margin-bottom: 1.25rem;
}

.drawer__ai-badge {
  display: inline-flex;
  align-items: center;
  margin-bottom: 0.6rem;
  padding: 0.18rem 0.45rem;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1;
  color: var(--ai-badge-text);
  background: var(--ai-badge-bg);
  border: 1px solid var(--ai-badge-border);
  border-radius: 4px;
}

.drawer__copy .drawer__prose {
  margin-bottom: 0;
}

.drawer__copy .drawer__highlights {
  margin-top: 1rem;
}

.drawer__prose {
  margin-bottom: 1.25rem;
}

.drawer__prose p {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
  line-height: 1.68;
  color: var(--text-muted);
}

.drawer__prose p:last-child {
  margin-bottom: 0;
}

.metric-block--subtle {
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.drawer__desc {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-muted);
}

.drawer__empty {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-style: italic;
}

.drawer__highlights {
  margin: 0 0 1.25rem;
  padding: 0 0 0 1.1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.drawer__highlights li {
  margin-bottom: 0.4rem;
}

.drawer__highlights li::marker {
  color: var(--accent-current);
}

.metric-block {
  margin-bottom: 1.25rem;
}

.metric-block__title {
  margin: 0 0 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.drawer__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.kv-list {
  margin: 0;
}

.kv-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}

.kv-row:last-child {
  border-bottom: none;
}

.kv-row dt {
  color: var(--text-muted);
}

.kv-row dd {
  margin: 0;
  font-weight: 500;
  text-align: right;
}

.coverage-row {
  display: grid;
  grid-template-columns: 5.5rem 1fr 2.5rem;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
  font-size: 0.82rem;
}

.coverage-row__label {
  color: var(--text-muted);
}

.coverage-row__bar {
  height: 6px;
  background: color-mix(in srgb, var(--text) 8%, transparent);
  border-radius: 999px;
  overflow: hidden;
}

.coverage-row__bar span {
  display: block;
  height: 100%;
  background: var(--accent-current);
  border-radius: 999px;
}

.coverage-row__val {
  text-align: right;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.dep-group {
  margin-bottom: 0.55rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.dep-group__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  background: color-mix(in srgb, var(--text) 3%, transparent);
}

.dep-group__title::-webkit-details-marker {
  display: none;
}

.dep-group__count {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
}

.dep-group__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.65rem 0.75rem;
}

.dep-tag {
  padding: 0.2rem 0.5rem;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 0.7rem;
  color: var(--text-muted);
  background: color-mix(in srgb, var(--text) 5%, transparent);
  border: 1px solid var(--border);
}

.drawer__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  padding-top: 0.25rem;
}

.drawer__actions:empty {
  display: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.7rem 1.25rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition:
    background 0.2s,
    border-color 0.2s,
    transform 0.2s;
}

.btn--primary {
  color: var(--on-accent-btn);
  background: var(--accent-btn, var(--accent, var(--accent-ui)));
  border: 1px solid transparent;
}

html[data-theme="light"] .btn--primary {
  border-color: color-mix(in srgb, var(--accent-btn, var(--accent-ui)) 55%, #23252c);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  filter: brightness(1.08);
  outline: none;
  transform: translateY(-1px);
}

.btn--primary:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.btn--ghost {
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  background: color-mix(in srgb, var(--text) 6%, transparent);
  border-color: var(--border-strong);
  outline: none;
}

.btn--ghost:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

/* ── Snake-Easter-Egg (16-Bit-HUD, Canvas über der Seite) ── */

@import url("https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap");

.snake-canvas {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
}

.snake-hud {
  --snake-bg: #10131f;
  --snake-border: #6ecf9a;
  --snake-glow: #b8f5d4;
  --snake-accent: #ffb86b;
  --snake-level: #7ec8a4;
  --snake-pts: #ffd98e;
  --snake-text: #fff8ee;
  --snake-muted: #b8b4a4;

  position: fixed;
  top: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 120;
  font-family: "Press Start 2P", ui-monospace, monospace;
  image-rendering: pixelated;
  white-space: nowrap;
}

.snake-hud__panel {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 0.65rem;
  padding: 0.55rem 0.65rem 0.55rem 0.55rem;
  color: var(--snake-text);
  background:
    linear-gradient(180deg, rgba(184, 245, 212, 0.14) 0%, transparent 38%),
    repeating-linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.2) 0,
      rgba(0, 0, 0, 0.2) 1px,
      transparent 1px,
      transparent 4px
    ),
    var(--snake-bg);
  border: 4px solid var(--snake-border);
  outline: 3px solid #000;
  outline-offset: -7px;
  box-shadow:
    0 0 0 2px #000,
    6px 6px 0 #000,
    inset 0 0 0 2px rgba(255, 255, 255, 0.06),
    0 0 32px rgba(110, 207, 154, 0.55),
    0 0 56px rgba(255, 184, 107, 0.2);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.snake-hud__panel::before,
.snake-hud__panel::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  background: var(--snake-accent);
  box-shadow: 0 0 8px rgba(255, 184, 107, 0.65);
  pointer-events: none;
}

.snake-hud__panel::before {
  top: -3px;
  left: -3px;
}

.snake-hud__panel::after {
  right: -3px;
  bottom: -3px;
}

.snake-hud__crest {
  display: grid;
  place-items: center;
  align-self: center;
  width: 2.8rem;
  padding: 0.35rem 0;
  background: rgba(0, 0, 0, 0.35);
  border: 3px solid color-mix(in srgb, var(--snake-accent) 60%, #000);
  box-shadow: inset 0 0 12px rgba(255, 184, 107, 0.15);
}

.snake-hud__bug {
  font-size: 1.35rem;
  line-height: 1;
  filter: drop-shadow(0 0 6px rgba(255, 184, 107, 0.5));
  animation: snake-bug-bounce 1.2s steps(2) infinite;
}

@keyframes snake-bug-bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2px);
  }
}

.snake-hud--light {
  --snake-bg: #1a1e28;
  --snake-border: #4aab78;
  --snake-glow: #8ee4b4;
  --snake-accent: #e8944a;
}

.snake-hud--light .snake-hud__panel {
  box-shadow:
    0 0 0 2px #000,
    6px 6px 0 #000,
    inset 0 0 0 2px rgba(255, 255, 255, 0.06),
    0 0 32px rgba(74, 171, 120, 0.55),
    0 0 56px rgba(232, 148, 74, 0.22);
}

.snake-hud.is-level-up .snake-hud__panel {
  animation: snake-hud-level 0.52s steps(4) both;
}

@keyframes snake-hud-level {
  0%,
  100% {
    box-shadow:
      0 0 0 2px #000,
      6px 6px 0 #000,
      inset 0 0 0 2px rgba(255, 255, 255, 0.06),
      0 0 32px rgba(110, 207, 154, 0.55);
    transform: scale(1);
  }
  50% {
    box-shadow:
      0 0 0 2px #000,
      6px 6px 0 #000,
      0 0 48px rgba(184, 245, 212, 0.9),
      0 0 72px rgba(255, 184, 107, 0.5);
    transform: scale(1.04);
  }
}

.snake-hud__stats {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
}

.snake-hud__stat {
  display: grid;
  align-content: center;
  gap: 0.45rem;
  min-width: 6.5rem;
  padding: 0.55rem 0.7rem 0.5rem;
  text-align: center;
  background: rgba(0, 0, 0, 0.42);
  border: 3px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.05);
}

.snake-hud__stat--level {
  border-color: color-mix(in srgb, var(--snake-level) 55%, transparent);
  box-shadow: inset 0 0 16px rgba(126, 200, 164, 0.12);
}

.snake-hud__stat--pts {
  border-color: color-mix(in srgb, var(--snake-pts) 50%, transparent);
  box-shadow: inset 0 0 16px rgba(255, 217, 142, 0.1);
}

.snake-hud__label {
  font-size: 11px;
  line-height: 1.3;
  color: var(--snake-muted);
  letter-spacing: 0.06em;
}

.snake-hud__value {
  font-size: 18px;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  text-shadow: 2px 2px 0 #000;
}

.snake-hud__stat--level .snake-hud__value {
  color: var(--snake-level);
  text-shadow:
    2px 2px 0 #000,
    0 0 14px rgba(126, 200, 164, 0.55);
}

.snake-hud__stat--pts .snake-hud__value {
  color: var(--snake-pts);
  text-shadow:
    2px 2px 0 #000,
    0 0 14px rgba(255, 217, 142, 0.45);
}

.snake-hud__close {
  display: grid;
  place-items: center;
  align-self: center;
  width: 2.6rem;
  height: 2.6rem;
  margin-left: 0.05rem;
  padding: 0;
  font-family: inherit;
  font-size: 14px;
  line-height: 1;
  color: var(--snake-accent);
  background: rgba(0, 0, 0, 0.45);
  border: 3px solid color-mix(in srgb, var(--snake-accent) 65%, #000);
  border-radius: 0;
  cursor: pointer;
  box-shadow: 3px 3px 0 #000;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.snake-hud__close:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 #000;
}

.snake-hud__close:hover,
.snake-hud__close:focus-visible {
  color: #fff;
  background: color-mix(in srgb, var(--snake-accent) 35%, #000 65%);
  border-color: var(--snake-accent);
  outline: none;
}

.snake-overlay {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.snake-dialog {
  --snake-bg: #10131f;
  --snake-border: #6ecf9a;
  --snake-glow: #b8f5d4;
  --snake-accent: #ffb86b;
  --snake-level: #7ec8a4;
  --snake-pts: #ffd98e;
  --snake-text: #fff8ee;
  --snake-muted: #b8b4a4;

  width: min(520px, 100%);
  padding: 0;
  font-family: "Press Start 2P", ui-monospace, monospace;
  color: var(--snake-text);
  background: transparent;
  border: none;
  box-shadow: none;
  image-rendering: pixelated;
  animation: snake-dialog-in 0.35s steps(5) both;
}

.snake-dialog__frame {
  padding: 1.25rem 1.35rem 1.35rem;
  background:
    linear-gradient(180deg, rgba(184, 245, 212, 0.12) 0%, transparent 40%),
    repeating-linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.18) 0,
      rgba(0, 0, 0, 0.18) 1px,
      transparent 1px,
      transparent 4px
    ),
    var(--snake-bg);
  border: 5px solid var(--snake-border);
  outline: 3px solid #000;
  outline-offset: -8px;
  box-shadow:
    0 0 0 2px #000,
    8px 8px 0 #000,
    0 0 40px rgba(110, 207, 154, 0.5);
}

.snake-dialog__header {
  display: flex;
  justify-content: center;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
  font-size: 1.1rem;
  line-height: 1;
  opacity: 0.9;
  filter: drop-shadow(0 0 8px rgba(255, 184, 107, 0.45));
}

@keyframes snake-dialog-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.snake-dialog__pixel-title {
  margin: 0 0 1.35rem;
  font-size: clamp(20px, 5.5vw, 26px);
  line-height: 1.45;
  text-align: center;
  color: #ff6b81;
  text-shadow:
    3px 3px 0 #000,
    0 0 16px rgba(255, 107, 129, 0.55);
  letter-spacing: 0.08em;
}

.snake-scoreboard {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
  margin: 0 0 1.25rem;
}

.snake-scoreboard__card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 6.8rem;
  padding: 0.85rem 0.5rem 0.75rem;
  text-align: center;
  background: rgba(0, 0, 0, 0.38);
  border: 3px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.04);
}

.snake-scoreboard__card.is-highlight,
.snake-scoreboard__card--record {
  border-color: color-mix(in srgb, var(--snake-glow) 55%, transparent);
  box-shadow: inset 0 0 12px color-mix(in srgb, var(--snake-glow) 18%, transparent);
}

.snake-scoreboard__label {
  font-size: 11px;
  line-height: 1.3;
  color: var(--snake-muted);
  letter-spacing: 0.06em;
}

.snake-scoreboard__value {
  font-size: clamp(18px, 5.5vw, 22px);
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  color: var(--snake-text);
  text-shadow: 2px 2px 0 #000;
}

.snake-scoreboard__value--level {
  color: var(--snake-level);
  text-shadow:
    2px 2px 0 #000,
    0 0 14px rgba(126, 200, 164, 0.5);
}

.snake-scoreboard__value--best {
  color: var(--snake-pts);
  text-shadow:
    2px 2px 0 #000,
    0 0 14px rgba(255, 217, 142, 0.45);
}

.snake-scoreboard__badge {
  position: absolute;
  top: -0.45rem;
  right: -0.25rem;
  padding: 0.3rem 0.5rem;
  font-size: 10px;
  line-height: 1.2;
  color: #12141c;
  background: var(--snake-glow);
  border: 2px solid #000;
  box-shadow: 2px 2px 0 #000;
  animation: snake-badge-pop 0.45s steps(4) both;
}

@keyframes snake-badge-pop {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.snake-dialog__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.snake-btn {
  min-height: 3.1rem;
  padding: 0.75rem 0.55rem;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.45;
  letter-spacing: 0.02em;
  text-align: center;
  cursor: pointer;
  border: 3px solid transparent;
  border-radius: 0;
  box-shadow: 3px 3px 0 #000;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease, transform 0.1s ease, box-shadow 0.1s ease;
}

.snake-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 #000;
}

.snake-btn--primary {
  color: #0e1018;
  background: var(--snake-glow);
  border-color: color-mix(in srgb, var(--snake-glow) 70%, #fff 30%);
}

.snake-btn--ghost {
  color: var(--snake-accent);
  background: rgba(0, 0, 0, 0.28);
  border-color: color-mix(in srgb, var(--snake-accent) 50%, transparent);
}

.snake-btn--primary:hover,
.snake-btn--primary:focus-visible {
  color: #0e1018;
  background: color-mix(in srgb, var(--snake-glow) 72%, #fff 28%);
  border-color: var(--snake-border);
  outline: none;
}

.snake-btn--ghost:hover,
.snake-btn--ghost:focus-visible {
  color: #fff;
  background: color-mix(in srgb, var(--snake-accent) 35%, #000 65%);
  border-color: var(--snake-accent);
  outline: none;
}

.snake-btn--primary:focus-visible,
.snake-btn--ghost:focus-visible {
  outline: 2px solid var(--snake-glow);
  outline-offset: 3px;
}

/* ── Footer ── */

.footer {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0.75rem;
  padding: calc(2rem + 0.35rem) var(--gap) 2.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--gap);
  right: var(--gap);
  height: 7px;
  background: var(--accent-ui);
  opacity: 0.3;
  pointer-events: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 8' preserveAspectRatio='none'%3E%3Cpath d='M0 5 C 14 2, 28 7, 42 4 S 70 2, 84 5 S 112 7, 126 4 S 154 2, 168 5 S 186 3, 200 4' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 8' preserveAspectRatio='none'%3E%3Cpath d='M0 5 C 14 2, 28 7, 42 4 S 70 2, 84 5 S 112 7, 126 4 S 154 2, 168 5 S 186 3, 200 4' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
}

.footer a {
  color: var(--text);
}

.footer a:hover,
.footer a:focus-visible {
  color: var(--accent-text);
}

.footer a:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
}

.footer__sep {
  opacity: 0.4;
}

/* ── Legal page ── */

.page-legal {
  background: var(--bg);
}

.legal {
  max-width: 42rem;
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4rem) var(--gap);
}

.legal__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

.legal__back {
  display: inline-block;
  margin-bottom: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.legal__back:hover,
.legal__back:focus-visible {
  color: var(--accent-text);
}

.legal__back:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
}

.legal h1 {
  margin: 0 0 2rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 400;
}

.legal h2 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
}

.legal section {
  margin-bottom: 1.75rem;
}

.legal p {
  margin: 0;
  color: var(--text-muted);
}

.legal a {
  color: var(--accent-text);
}

.legal a:hover,
.legal a:focus-visible {
  color: var(--text);
}

/* ── Video modal (YouTube inline, Hugur/MyMind-Stil) ── */

.video-modal[hidden] {
  display: none;
}

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 2rem);
}

.video-modal__backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--video-modal-bg);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  cursor: pointer;
  transition:
    opacity 0.3s ease,
    background-color 0.3s ease;
}

.video-modal--open .video-modal__backdrop {
  opacity: 1;
}

.video-modal__backdrop:hover,
.video-modal:has(.video-modal__top-zone:hover) .video-modal__backdrop {
  background: var(--video-modal-bg-hover);
}

.video-modal__stage {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}

.video-modal__hint {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  margin: 0;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  pointer-events: none;
  opacity: 0;
  transform: translateY(0.15rem);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

.video-modal__top-zone {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 50%;
  z-index: 1;
  width: 100vw;
  height: 100vh;
  transform: translateX(-50%);
  pointer-events: auto;
  cursor: pointer;
}

.video-modal__top-zone:hover .video-modal__hint,
.video-modal--top-hover .video-modal__hint {
  opacity: 1;
  transform: translateY(0);
}

.video-modal__wrap {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: min(1380px, calc(100vw - 2rem), calc(88vh * 16 / 9));
  pointer-events: none;
}

.video-modal--top-hover .video-modal__dialog,
.video-modal:has(.video-modal__top-zone:hover) .video-modal__dialog {
  transform: translateY(0.5rem) scale(0.98);
}

.video-modal__dialog {
  width: 100%;
  padding: 0;
  background: #0a0c0e;
  border: 1px solid color-mix(in srgb, var(--accent-ui) 28%, transparent);
  border-radius: 1rem;
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  overflow: hidden;
  cursor: default;
  pointer-events: auto;
  transform: translateY(16px) scale(0.97);
  opacity: 0;
  transition:
    transform 0.32s var(--ease-out),
    opacity 0.3s ease;
}

.video-modal--open .video-modal__dialog {
  transform: none;
  opacity: 1;
}

.video-modal--open.video-modal--top-hover .video-modal__dialog,
.video-modal--open:has(.video-modal__top-zone:hover) .video-modal__dialog {
  transform: translateY(0.5rem) scale(0.98);
}

.video-modal__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.video-modal__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (min-width: 768px) {
  .video-modal__top-zone {
    display: block;
  }
}

/* ── Animations ── */

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Responsive ── */

@media (max-width: 640px) {
  .hero {
    padding-top: 1rem;
    text-align: center;
  }

  .hero__bar {
    text-align: left;
  }

  .hero__contact-list {
    justify-content: center;
    gap: 0.4rem 1.35rem;
  }

  /* Mobile: zentrierte Hero-Komposition — Name, Foto + Notiz, Rolle, Bio. */
  .hero__title-row {
    flex-direction: column;
    align-items: center;
    gap: 0;
    margin-bottom: 1.25rem;
  }

  .hero__name {
    margin-bottom: 1.15rem;
    font-size: clamp(2.35rem, 11.5vw, 3.1rem);
  }

  .hero__me {
    align-self: center;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    padding: 0;
    margin: 0;
    min-width: 0;
  }

  .hero__arrow {
    display: none;
  }

  .hero__me-main {
    flex-shrink: 0;
  }

  .hero__me-photo {
    width: clamp(92px, 28vw, 118px);
    height: clamp(92px, 28vw, 118px);
  }

  .hero__me-note {
    margin-top: 0;
    font-size: clamp(1.15rem, 4.5vw, 1.35rem);
    text-align: center;
    white-space: nowrap;
    max-width: none;
  }

  .hero__bio {
    margin-left: auto;
    margin-right: auto;
  }

  .sections {
    padding-bottom: 1.5rem;
  }

  .facet-chip {
    font-size: 0.86rem;
  }

  /* Über mich: einheitlicher Mobile-Rhythmus (1.25rem / 1.75rem). */
  .about {
    padding-top: 1.5rem;
    padding-bottom: 1.75rem;
  }

  .about .section__heading {
    margin-bottom: 1.25rem;
  }

  .about__personal {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin-bottom: 1.75rem;
  }

  .about__photo {
    max-width: 220px;
    margin: 0 auto;
    padding-top: 2.65rem;
  }

  .about__intro {
    margin-bottom: 1.25rem;
  }

  .about__label {
    margin-bottom: 0.85rem;
    gap: 0.65rem;
  }

  .about__interests {
    gap: 0.5rem 1rem;
    justify-content: center;
  }

  .about__grid {
    gap: 1.75rem;
  }

  .skill-list {
    gap: 0.95rem;
  }

  .about__timeline-item {
    padding-bottom: 1rem;
  }

  .footer {
    padding-bottom: max(2.5rem, env(safe-area-inset-bottom, 0px));
  }

  .drawer {
    width: 100vw;
    max-width: 100%;
    border-left: none;
    border-top: 1px solid var(--border);
    top: auto;
    bottom: 0;
    height: min(94dvh, 100dvh);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    transform: translateY(100%);
  }

  .drawer--open {
    transform: translateY(0);
    pointer-events: auto;
  }

  .drawer__close {
    top: 0.85rem;
    right: 0.85rem;
  }

  .drawer__head {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .drawer__intro-actions {
    padding-top: 0;
  }

  .drawer__visit {
    align-self: flex-start;
  }

  .drawer__body {
    padding: 0 1.15rem 1.75rem;
  }

  .drawer__actions {
    flex-direction: column;
  }

  .drawer__actions .btn {
    width: 100%;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  /* Snake-Easter-Egg: auf schmalen Viewports nicht spielbar — kein Link-Look. */
  .about__interest-egg {
    text-decoration: none;
    cursor: default;
    pointer-events: none;
  }

  .about__interest-egg .sr-only {
    display: none;
  }
}

@media (min-width: 900px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Solange Name und Annotation nebeneinander stehen (kein Wrap), bestimmt
   das Foto die Zeilenhöhe. Die Formel zieht genau den Überhang
   (0.3rem padding + Foto − Namenshöhe) wieder ab und lässt 0.75rem Luft —
   Rolle und Bio schließen so auf jeder Breite gleich an den Namen an. */
@media (min-width: 641px) {
  .hero__title-row {
    --me-note-stack: 2.35rem;
    margin-bottom: calc(var(--name-size) - var(--me-photo) - var(--me-note-stack) - 0.3rem + 0.75rem);
  }
}

@media (min-width: 1200px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  /* Auftritts-Sequenz sofort im Endzustand (animation-delay würde sonst weiter greifen). */
  .about__photo-pin-mount {
    transform: translateX(-50%);
  }

  .drawer.drawer--open {
    transform: none;
  }

  .drawer:not(.drawer--open) {
    display: none;
  }

  @media (max-width: 640px) {
    .drawer.drawer--open {
      transform: none;
    }
  }
}
