/* ==========================================================================
   Aurora — persönliche Webseite
   Farben der Aurora (--a1, --a2, --a3) kommen aus dem Admin-Bereich.
   ========================================================================== */

@font-face {
    font-family: "Inter";
    src: url("../fonts/inter.woff2") format("woff2");
    font-weight: 100 900;
    font-display: swap;
}
@font-face {
    font-family: "Space Grotesk";
    src: url("../fonts/space-grotesk.woff2") format("woff2");
    font-weight: 300 700;
    font-display: swap;
}

:root {
    --a1: #8b5cf6;
    --a2: #22d3ee;
    --a3: #f472b6;
    --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-display: "Space Grotesk", var(--font);
    --radius: 24px;
    --radius-sm: 14px;
    --ease: cubic-bezier(.22, 1, .36, 1);
    --max: 1180px;
    --gutter: clamp(16px, 4vw, 40px);
    --grad: linear-gradient(120deg, var(--a1), var(--a2) 55%, var(--a3));

    /* dunkel (Standard) */
    --bg: #07060d;
    --text: #f4f2ff;
    --muted: rgba(232, 228, 255, .64);
    --faint: rgba(232, 228, 255, .55); /* ≥ 4,5:1 Kontrast (WCAG AA) */
    --glass: rgba(255, 255, 255, .045);
    --glass-strong: rgba(255, 255, 255, .08);
    --border: rgba(255, 255, 255, .1);
    --border-strong: rgba(255, 255, 255, .2);
    --shadow: 0 30px 80px -30px rgba(0, 0, 0, .7);
    --aurora-opacity: .55;
    --grain-opacity: .07;
    color-scheme: dark;
}

:root[data-theme="light"] {
    --bg: #f6f4fb;
    --text: #15121f;
    --muted: rgba(21, 18, 31, .66);
    --faint: rgba(21, 18, 31, .6); /* ≥ 4,5:1 Kontrast (WCAG AA) */
    --glass: rgba(255, 255, 255, .55);
    --glass-strong: rgba(255, 255, 255, .8);
    --border: rgba(21, 18, 31, .08);
    --border-strong: rgba(21, 18, 31, .16);
    --shadow: 0 30px 70px -35px rgba(60, 40, 120, .35);
    --aurora-opacity: .32;
    --grain-opacity: .04;
    color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: 90px;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    transition: background-color .5s var(--ease), color .5s var(--ease);
}

img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.08; letter-spacing: -.02em; margin: 0; }
::selection { background: color-mix(in srgb, var(--a1) 55%, transparent); color: #fff; }

.icon { width: 1.15em; height: 1.15em; flex: none; }

.skip-link {
    position: fixed; left: 16px; top: -60px; z-index: 1000;
    background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px;
    text-decoration: none; transition: top .2s;
}
.skip-link:focus { top: 16px; }

:focus-visible { outline: 2px solid var(--a2); outline-offset: 3px; border-radius: 8px; }

/* ---------- Aurora-Hintergrund ---------- */

.aurora {
    position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none;
    opacity: var(--aurora-opacity);
    transition: opacity .6s var(--ease);
}
.blob {
    position: absolute; border-radius: 50%; filter: blur(90px);
    width: 52vmax; height: 52vmax; will-change: transform;
}
.b1 { background: var(--a1); top: -22vmax; left: -12vmax; animation: drift1 26s var(--ease) infinite alternate; }
.b2 { background: var(--a2); top: 10vh; right: -22vmax; width: 44vmax; height: 44vmax; animation: drift2 32s var(--ease) infinite alternate; }
.b3 { background: var(--a3); bottom: -26vmax; left: 18vw; width: 46vmax; height: 46vmax; animation: drift3 29s var(--ease) infinite alternate; opacity: .7; }
.b4 { background: var(--a1); bottom: 10vh; right: 10vw; width: 24vmax; height: 24vmax; animation: drift2 21s var(--ease) infinite alternate-reverse; opacity: .6; }

@keyframes drift1 { to { transform: translate(18vw, 22vh) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-22vw, 18vh) scale(.85); } }
@keyframes drift3 { to { transform: translate(-14vw, -24vh) scale(1.2); } }

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

/* ---------- Eigener Mauszeiger ---------- */

.cursor { display: none; }
html.cursor-on .cursor { display: block; }
html.cursor-on, html.cursor-on * { cursor: none !important; }
html.cursor-on input, html.cursor-on textarea { cursor: text !important; }

.cursor-dot, .cursor-ring {
    position: fixed; top: 0; left: 0; z-index: 9999; pointer-events: none;
    border-radius: 50%; transform: translate3d(-100px, -100px, 0);
}
.cursor-dot {
    width: 8px; height: 8px; margin: -4px 0 0 -4px;
    background: var(--text);
    transition: opacity .2s, width .3s var(--ease), height .3s var(--ease), margin .3s var(--ease);
}
.cursor-ring {
    width: 38px; height: 38px; margin: -19px 0 0 -19px;
    border: 1.5px solid color-mix(in srgb, var(--text) 45%, transparent);
    display: grid; place-items: center;
    transition: width .35s var(--ease), height .35s var(--ease), margin .35s var(--ease),
                background-color .35s var(--ease), border-color .35s var(--ease), opacity .3s;
}
.cursor-label {
    font-size: 12px; font-weight: 600; letter-spacing: .04em; color: #fff;
    opacity: 0; transform: scale(.6); transition: opacity .25s, transform .35s var(--ease);
    white-space: nowrap;
}
.cursor.is-hover .cursor-ring {
    width: 64px; height: 64px; margin: -32px 0 0 -32px;
    background: color-mix(in srgb, var(--a1) 22%, transparent);
    border-color: color-mix(in srgb, var(--a1) 70%, transparent);
}
.cursor.is-hover .cursor-dot { width: 4px; height: 4px; margin: -2px 0 0 -2px; }
.cursor.is-view .cursor-ring {
    width: 92px; height: 92px; margin: -46px 0 0 -46px;
    background: var(--grad); border-color: transparent;
    box-shadow: 0 10px 40px -10px var(--a1);
}
.cursor.is-view .cursor-label { opacity: 1; transform: none; }
.cursor.is-view .cursor-dot { opacity: 0; }
.cursor.is-text .cursor-ring { width: 4px; height: 30px; margin: -15px 0 0 -2px; border-radius: 4px; background: var(--a2); border-color: transparent; }
.cursor.is-text .cursor-dot { opacity: 0; }
.cursor.is-down .cursor-ring { width: 28px; height: 28px; margin: -14px 0 0 -14px; }
.cursor.is-hidden .cursor-dot, .cursor.is-hidden .cursor-ring { opacity: 0; }

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

.nav {
    position: fixed; top: 14px; left: 50%; z-index: 50;
    width: min(var(--max), calc(100% - 2 * var(--gutter)));
    transform: translateX(-50%);
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 10px 10px 10px 14px; border-radius: 999px;
    border: 1px solid transparent;
    transition: background-color .4s, border-color .4s, backdrop-filter .4s, box-shadow .4s, transform .5s var(--ease);
}
.nav.scrolled {
    background: color-mix(in srgb, var(--bg) 60%, transparent);
    border-color: var(--border);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    box-shadow: var(--shadow);
}
.nav.hide { transform: translate(-50%, -120%); }
.nav-logo { text-decoration: none; }
.logo-mark {
    display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px;
    background: var(--grad); color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 15px;
    box-shadow: 0 8px 24px -8px var(--a1);
}
.nav-links { display: flex; gap: 4px; }
.nav-links a {
    text-decoration: none; font-size: 15px; color: var(--muted);
    padding: 8px 14px; border-radius: 999px; transition: color .25s, background-color .25s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--glass-strong); }
.nav-actions { display: flex; align-items: center; gap: 6px; }

.icon-btn {
    display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none;
    border-radius: 50%; border: 1px solid var(--border); background: var(--glass);
    cursor: pointer; transition: background-color .25s, border-color .25s, transform .3s var(--ease);
}
.icon-btn:hover { background: var(--glass-strong); border-color: var(--border-strong); }
.icon-btn:active { transform: scale(.92); }

.theme-toggle { position: relative; overflow: hidden; }
.theme-toggle .ti { position: absolute; inset: 0; display: grid; place-items: center; transition: transform .5s var(--ease), opacity .3s; opacity: 0; transform: translateY(100%) rotate(-90deg); }
:root[data-theme-pref="system"] .ti-system,
:root[data-theme-pref="dark"] .ti-dark,
:root[data-theme-pref="light"] .ti-light { opacity: 1; transform: none; }

.lang-toggle {
    display: inline-flex; align-items: center; height: 40px; padding: 4px; gap: 2px;
    border-radius: 999px; border: 1px solid var(--border); background: var(--glass);
    text-decoration: none; font-size: 12px; font-weight: 600; letter-spacing: .05em;
}
.lang-toggle span { padding: 5px 9px; border-radius: 999px; color: var(--faint); transition: .25s; }
.lang-toggle span.on { background: var(--text); color: var(--bg); }

.nav-burger { display: none; }

/* ---------- Buttons ---------- */

.btn {
    --mx: 0px; --my: 0px;
    position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    padding: 14px 24px; border-radius: 999px; border: 1px solid transparent;
    font-weight: 600; font-size: 16px; text-decoration: none; cursor: pointer;
    transform: translate(var(--mx), var(--my));
    transition: transform .4s var(--ease), box-shadow .3s, background-color .3s, border-color .3s;
}
.btn-primary {
    background: var(--grad); background-size: 160% 160%; color: #fff;
    box-shadow: 0 12px 36px -12px var(--a1), inset 0 1px 0 rgba(255, 255, 255, .25);
    animation: gradShift 6s ease infinite;
}
.btn-primary:hover { box-shadow: 0 18px 48px -12px var(--a1), inset 0 1px 0 rgba(255, 255, 255, .3); }
.btn-ghost { background: var(--glass); border-color: var(--border); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.btn-ghost:hover { background: var(--glass-strong); border-color: var(--border-strong); }
.btn .icon { transition: transform .35s var(--ease); }
.btn:hover .icon { transform: translateX(3px); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .7; pointer-events: none; }

@keyframes gradShift { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

.grad-text {
    background: var(--grad); background-size: 200% 100%;
    -webkit-background-clip: text; background-clip: text; color: transparent;
    animation: gradShift 8s ease infinite;
}

/* ---------- Glas-Karten mit Spotlight ---------- */

.glass {
    background: var(--glass);
    border: 1px solid var(--border);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
}
.card {
    --sx: 50%; --sy: 50%;
    position: relative; border-radius: var(--radius); padding: clamp(20px, 3vw, 30px);
    overflow: hidden; isolation: isolate;
    box-shadow: var(--shadow);
}
[data-spotlight]::before {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: radial-gradient(420px circle at var(--sx) var(--sy), color-mix(in srgb, var(--a1) 18%, transparent), transparent 60%);
    opacity: 0; transition: opacity .4s;
}
[data-spotlight]::after {
    content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
    background: radial-gradient(300px circle at var(--sx) var(--sy), color-mix(in srgb, var(--a2) 70%, transparent), transparent 70%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
    opacity: 0; transition: opacity .4s;
}
[data-spotlight]:hover::before, [data-spotlight]:hover::after { opacity: 1; }

.card-label {
    display: flex; align-items: center; gap: 8px; margin: 0 0 12px;
    font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--faint);
}
.card-big { font-family: var(--font-display); font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 600; margin: 0; line-height: 1.1; }
.card-mid { font-size: 1.15rem; font-weight: 500; margin: 0; }
.card-sub { display: flex; align-items: center; gap: 6px; margin: 10px 0 0; color: var(--muted); font-size: 15px; font-variant-numeric: tabular-nums; }

/* ---------- Abschnitte ---------- */

main { position: relative; }
.section {
    width: min(var(--max), calc(100% - 2 * var(--gutter)));
    margin: 0 auto; padding: clamp(70px, 11vw, 130px) 0 0;
}
.section-head { margin-bottom: clamp(28px, 4vw, 48px); }
.section-head h2 { font-size: clamp(2.2rem, 5.5vw, 4rem); }
.kicker {
    display: inline-flex; align-items: center; gap: 10px; margin: 0 0 14px;
    font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
    color: var(--a2);
}
.kicker::before { content: ""; width: 26px; height: 2px; border-radius: 2px; background: var(--grad); }
.muted { color: var(--muted); }

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

.hero {
    position: relative; min-height: 100svh;
    display: grid; align-items: center;
    width: min(var(--max), calc(100% - 2 * var(--gutter)));
    margin: 0 auto; padding: 120px 0 90px;
}
.hero-inner { display: grid; grid-template-columns: 1.25fr .85fr; align-items: center; gap: clamp(32px, 6vw, 80px); }
.status-pill {
    display: inline-flex; align-items: center; gap: 10px; margin: 0 0 26px;
    padding: 7px 16px 7px 12px; border-radius: 999px; font-size: 14px; font-weight: 500;
    background: var(--glass); border: 1px solid var(--border); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.pulse { position: relative; width: 9px; height: 9px; border-radius: 50%; background: #34d399; }
.pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #34d399; animation: ping 2s cubic-bezier(0, 0, .2, 1) infinite; }
@keyframes ping { 75%, 100% { transform: scale(2.6); opacity: 0; } }

.hero-hi { font-size: clamp(1.1rem, 2vw, 1.35rem); font-weight: 500; margin: 0 0 12px; color: var(--muted); }
.hero-hi .grad-text { font-weight: 700; }
.hero-title { font-size: clamp(2.7rem, 7vw, 5.6rem); font-weight: 700; letter-spacing: -.035em; line-height: 1; }
.hero-title .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.hero-title .w > span { display: inline-block; transform: translateY(105%); transition: transform 1s var(--ease); transition-delay: calc(var(--i) * 70ms + 150ms); }
.hero-title.in .w > span, html:not(.js) .hero-title .w > span { transform: none; }
.hero-role { margin: 22px 0 8px; font-family: var(--font-display); font-size: clamp(1.05rem, 1.8vw, 1.3rem); font-weight: 500; }
.hero-tagline { margin: 0; max-width: 34em; color: var(--muted); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 34px 0 30px; }

.socials { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0; }
.social {
    --mx: 0px; --my: 0px;
    display: grid; place-items: center; width: 46px; height: 46px; border-radius: 15px;
    background: var(--glass); border: 1px solid var(--border); color: var(--text);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    transform: translate(var(--mx), var(--my));
    transition: transform .4s var(--ease), background-color .3s, border-color .3s, color .3s;
}
.social:hover { background: var(--glass-strong); border-color: var(--border-strong); color: var(--a2); }
.social .icon { width: 20px; height: 20px; }

.hero-visual { display: grid; place-items: center; }
.portrait {
    --rx: 0deg; --ry: 0deg;
    position: relative; width: min(100%, 400px); aspect-ratio: 1;
    transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
    transition: transform .6s var(--ease);
}
.portrait-ring {
    position: absolute; inset: -14px; border-radius: 50%;
    background: conic-gradient(from 0deg, var(--a1), var(--a2), var(--a3), var(--a1));
    filter: blur(2px); animation: spin 9s linear infinite;
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
}
.portrait::before {
    content: ""; position: absolute; inset: 8%; border-radius: 50%; z-index: -1;
    background: conic-gradient(from 90deg, var(--a1), var(--a2), var(--a3), var(--a1));
    filter: blur(60px); opacity: .7; animation: spin 14s linear infinite reverse;
}
@keyframes spin { to { transform: rotate(1turn); } }
.portrait img, .portrait-fallback {
    width: 100%; height: 100%; border-radius: 50%; object-fit: cover;
    border: 1px solid var(--border-strong);
}
.portrait-fallback {
    display: grid; place-items: center;
    background: radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--a2) 55%, transparent), transparent 55%),
                radial-gradient(circle at 75% 80%, color-mix(in srgb, var(--a3) 55%, transparent), transparent 55%),
                linear-gradient(135deg, var(--a1), color-mix(in srgb, var(--a1) 40%, #000));
    color: #fff; font-family: var(--font-display); font-size: clamp(4rem, 10vw, 7rem); font-weight: 700; letter-spacing: -.04em;
}
.portrait-badge {
    position: absolute; left: -6%; bottom: 10%;
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 16px; border-radius: 999px; font-size: 14px; font-weight: 500;
    box-shadow: var(--shadow); animation: float 6s ease-in-out infinite;
}
@keyframes float { 50% { transform: translateY(-10px); } }

.scroll-hint {
    position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); text-decoration: none;
}
.scroll-hint .icon { animation: bob 2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(6px); } }

/* ---------- Bento ---------- */

.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.bento-about { grid-column: span 4; grid-row: span 2; }
.bento-location, .bento-now { grid-column: span 2; }
.bento-interests, .bento-skills { grid-column: span 3; }
.bento .bento-interests.wide { grid-column: 1 / -1; }
.prose { font-size: clamp(1.05rem, 1.6vw, 1.22rem); line-height: 1.7; }
.prose p { margin: 0 0 1em; }
.prose p:last-child { margin-bottom: 0; }
.prose a { color: var(--a2); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose strong { font-weight: 650; }
.prose h2 { font-size: 1.5rem; margin: 1.6em 0 .5em; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 1.2em; }

.chips, .tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.chips li {
    padding: 8px 14px; border-radius: 999px; font-size: 15px;
    background: var(--glass-strong); border: 1px solid var(--border);
    transition: transform .3s var(--ease), border-color .3s;
}
.chips li:hover { transform: translateY(-2px); border-color: var(--a1); }

.marquee {
    overflow: hidden; margin: 0 calc(-1 * clamp(20px, 3vw, 30px));
    -webkit-mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
    mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track { display: flex; gap: 12px; width: max-content; animation: marquee 22s linear infinite; padding: 4px 0; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
    padding: 10px 18px; border-radius: 14px; font-family: var(--font-display); font-weight: 600; font-size: 1.05rem;
    background: var(--glass-strong); border: 1px solid var(--border); white-space: nowrap;
}
@keyframes marquee { to { transform: translateX(calc(-50% - 6px)); } }

/* ---------- Projekte ---------- */

.projects { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 18px; }
.project {
    --rx: 0deg; --ry: 0deg;
    display: flex; flex-direction: column; padding: 0; text-decoration: none; color: inherit;
    transform: perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry));
    transition: transform .6s var(--ease), border-color .3s;
}
.project:hover { border-color: var(--border-strong); }
.project-media { aspect-ratio: 16 / 10; overflow: hidden; border-bottom: 1px solid var(--border); }
.project-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.project:hover .project-media img { transform: scale(1.05); }
.project-placeholder {
    width: 100%; height: 100%; display: grid; place-items: center;
    background: radial-gradient(circle at 20% 20%, color-mix(in srgb, var(--a2) 60%, transparent), transparent 50%),
                radial-gradient(circle at 80% 90%, color-mix(in srgb, var(--a3) 60%, transparent), transparent 50%),
                var(--a1);
    filter: hue-rotate(var(--h));
    transition: transform .8s var(--ease);
}
.project:hover .project-placeholder { transform: scale(1.05); }
.project-placeholder span { font-family: var(--font-display); font-size: 5rem; font-weight: 700; color: rgba(255, 255, 255, .9); text-shadow: 0 10px 40px rgba(0, 0, 0, .25); }
.project-body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.project-body h3 { font-size: 1.45rem; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.project-body p { margin: 0; color: var(--muted); }
.project-arrow {
    display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; flex: none;
    border: 1px solid var(--border); transition: transform .4s var(--ease), background-color .3s;
}
.project:hover .project-arrow { transform: rotate(45deg); background: var(--grad); color: #fff; border-color: transparent; }
.tags { margin-top: auto; padding-top: 6px; }
.tags li { font-size: 13px; padding: 4px 11px; border-radius: 999px; color: var(--muted); border: 1px solid var(--border); }

/* ---------- Werdegang ---------- */

.timeline-wrap { position: relative; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 46px; display: grid; gap: 18px; }
.timeline-line { position: absolute; left: 14px; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; background: var(--border); }
.timeline-progress { position: absolute; inset: 0; border-radius: inherit; background: var(--grad); transform-origin: top; transform: scaleY(var(--p, 0)); }
.timeline-item { position: relative; }
.timeline-dot {
    position: absolute; left: -39px; top: 30px; width: 16px; height: 16px; border-radius: 50%;
    background: var(--bg); border: 2px solid var(--a1); box-shadow: 0 0 0 5px color-mix(in srgb, var(--a1) 20%, transparent);
}
.timeline-period { margin: 0 0 6px; font-size: 14px; font-weight: 600; color: var(--a2); font-variant-numeric: tabular-nums; }
.timeline-item h3 { font-size: 1.35rem; }
.timeline-place { display: flex; align-items: center; gap: 6px; margin: 6px 0 0; font-size: 15px; color: var(--faint); }
.timeline-item .card p:last-child:not(.timeline-place):not(.timeline-period) { margin: 10px 0 0; color: var(--muted); }

/* ---------- Kontakt ---------- */

.contact { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(28px, 5vw, 64px); padding: clamp(24px, 5vw, 56px); }
.contact-title { font-size: clamp(2.4rem, 6vw, 4.2rem); margin-bottom: 18px; }
.mail-box { margin: 30px 0 24px; }
.mail-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mail-row a { font-family: var(--font-display); font-size: clamp(1.15rem, 2.2vw, 1.5rem); font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.mail-row a:hover { color: var(--a2); }

.contact-form { display: grid; gap: 14px; align-content: start; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.field { position: relative; display: block; }
.field input, .field textarea {
    width: 100%; padding: 24px 18px 10px; border-radius: var(--radius-sm);
    background: var(--glass); border: 1px solid var(--border); color: var(--text);
    font: inherit; font-size: 16px; resize: vertical;
    transition: border-color .25s, background-color .25s, box-shadow .25s;
}
.field textarea { min-height: 150px; }
.field span {
    position: absolute; left: 19px; top: 17px; color: var(--faint); pointer-events: none;
    transform-origin: left top; transition: transform .25s var(--ease), color .25s;
}
.field input:focus, .field textarea:focus {
    outline: none; border-color: var(--a1); background: var(--glass-strong);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--a1) 18%, transparent);
}
.field input:focus + span, .field input:not(:placeholder-shown) + span,
.field textarea:focus + span, .field textarea:not(:placeholder-shown) + span {
    transform: translateY(-10px) scale(.78); color: var(--a2);
}
.form-note { margin: 0; font-size: 13px; color: var(--faint); }
.form-note a { color: var(--muted); }
.form-status { margin: 0; min-height: 1.5em; font-size: 15px; font-weight: 500; }
.form-status.ok { color: #34d399; }
.form-status.err { color: #fb7185; }

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

.footer {
    width: min(var(--max), calc(100% - 2 * var(--gutter)));
    margin: clamp(60px, 10vw, 120px) auto 0; padding: 28px 0 40px;
    border-top: 1px solid var(--border);
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px;
    font-size: 14px; color: var(--faint);
}
.footer p { margin: 0; }
.footer nav { display: flex; gap: 18px; }
.footer a { text-decoration: none; color: var(--muted); }
.footer a:hover { color: var(--text); }

/* ---------- Scroll-Animationen ---------- */

html.js .reveal { opacity: 0; transform: translateY(28px); filter: blur(6px); transition: opacity 1s var(--ease), transform 1s var(--ease), filter 1s var(--ease); transition-delay: var(--d, 0ms); }
html.js .reveal.in { opacity: 1; transform: none; filter: none; }

/* ---------- Link-Seite ---------- */

.page-links main { min-height: 100svh; display: grid; place-items: start center; padding: 28px var(--gutter) 40px; }
.lp { width: min(100%, 560px); display: flex; flex-direction: column; align-items: center; }
.lp-top { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 28px; }
.lp-top-right { display: flex; gap: 6px; }
.lp-avatar { position: relative; width: 112px; height: 112px; margin-bottom: 18px; }
.lp-avatar .portrait-ring { inset: -8px; }
.lp-avatar img, .lp-avatar .portrait-fallback { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; font-size: 2.6rem; }
.lp h1 { font-size: clamp(1.7rem, 6vw, 2.2rem); text-align: center; }
.lp-role { margin: 6px 0 0; color: var(--muted); text-align: center; font-weight: 500; }
.lp-bio { margin: 12px 0 0; text-align: center; color: var(--muted); max-width: 30em; }
.lp-socials { justify-content: center; margin: 22px 0 0; }
.lp-list { list-style: none; width: 100%; padding: 0; margin: 30px 0 0; display: grid; gap: 12px; }
.lp-link {
    --sx: 50%; --sy: 50%;
    position: relative; isolation: isolate; overflow: hidden;
    display: flex; align-items: center; gap: 14px;
    padding: 16px 18px; border-radius: 20px; min-height: 64px;
    text-decoration: none; color: var(--text); font-weight: 600;
    transition: transform .35s var(--ease), border-color .3s, background-color .3s;
}
.lp-link:hover { transform: translateY(-2px) scale(1.01); border-color: var(--border-strong); background: var(--glass-strong); }
.lp-link:active { transform: scale(.98); }
.lp-link-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; flex: none; background: var(--glass-strong); border: 1px solid var(--border); }
.lp-link-icon .icon { width: 19px; height: 19px; }
.lp-link-label { flex: 1; text-align: center; padding-right: 38px; }
.lp-link .lp-go { position: absolute; right: 18px; opacity: 0; transform: translateX(-6px); transition: .35s var(--ease); }
.lp-link:hover .lp-go { opacity: 1; transform: none; }
.lp-link.featured { border: 1px solid transparent; background: linear-gradient(var(--bg), var(--bg)) padding-box, var(--grad) border-box; }
.lp-link.featured::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: var(--grad); opacity: .16;
}
.lp-link.featured .lp-link-icon { background: var(--grad); color: #fff; border-color: transparent; }
.lp-link.featured { box-shadow: 0 16px 50px -20px var(--a1); }
.lp-foot { margin-top: 34px; display: flex; flex-direction: column; align-items: center; gap: 12px; font-size: 14px; color: var(--faint); }
.lp-foot a { color: var(--muted); text-decoration: none; }
.lp-foot a:hover { color: var(--text); }
.lp-foot nav { display: flex; gap: 16px; }
.toast {
    position: fixed; left: 50%; bottom: 24px; z-index: 60; transform: translate(-50%, 140%);
    padding: 12px 20px; border-radius: 999px; font-weight: 600; font-size: 15px;
    background: var(--text); color: var(--bg); box-shadow: var(--shadow);
    transition: transform .45s var(--ease);
}
.toast.show { transform: translate(-50%, 0); }

/* ---------- Rechtliche Seiten ---------- */

.page-legal main { width: min(820px, calc(100% - 2 * var(--gutter))); margin: 0 auto; padding: 40px 0 0; }
.legal-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 40px; gap: 10px; }
.legal-top div { display: flex; gap: 6px; }
.legal-back { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--muted); font-weight: 500; }
.legal-back:hover { color: var(--text); }
.page-legal h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); margin-bottom: 30px; }
.page-legal .prose { font-size: 1.02rem; }
.page-legal .footer { width: 100%; }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
    .hero-inner { grid-template-columns: 1fr; text-align: left; }
    .hero-visual { order: -1; }
    .portrait { width: min(62vw, 280px); }
    .bento { grid-template-columns: repeat(2, 1fr); }
    .bento-about { grid-column: span 2; grid-row: auto; }
    .bento-location, .bento-now { grid-column: span 1; }
    .bento-interests, .bento-skills { grid-column: span 2; }
    .contact { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    body { font-size: 16px; }
    .nav { padding: 8px 8px 8px 10px; }
    .nav-burger { display: inline-grid; }
    .nav-links {
        position: absolute; top: calc(100% + 10px); left: 0; right: 0;
        flex-direction: column; padding: 10px; border-radius: 24px;
        background: color-mix(in srgb, var(--bg) 88%, transparent);
        border: 1px solid var(--border); box-shadow: var(--shadow);
        backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
        opacity: 0; transform: translateY(-10px) scale(.98); pointer-events: none;
        transition: opacity .3s, transform .4s var(--ease);
    }
    .nav-links a { padding: 14px 16px; font-size: 17px; }
    .nav.open .nav-links { opacity: 1; transform: none; pointer-events: auto; }
    .nav.open { background: color-mix(in srgb, var(--bg) 70%, transparent); border-color: var(--border); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
    .hero { padding-top: 100px; }
    .bento { grid-template-columns: 1fr; }
    .bento > * { grid-column: auto !important; }
    .portrait-badge { left: 50%; bottom: -14px; transform: translateX(-50%); animation: none; white-space: nowrap; }
    .footer { flex-direction: column; }
    .blob { filter: blur(70px); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
    html { scroll-behavior: auto; }
    html.js .reveal { opacity: 1; transform: none; filter: none; }
    .hero-title .w > span { transform: none; }
}

@media print {
    .aurora, .grain, .cursor, .nav, .scroll-hint, .contact-form { display: none !important; }
}

/* Im hellen Modus die Akzent-Texte etwas abdunkeln (bessere Lesbarkeit) */
:root[data-theme="light"] .kicker,
:root[data-theme="light"] .timeline-period { color: color-mix(in srgb, var(--a2) 55%, #000); }

/* Eigenes Logo statt Initialen */
.logo-mark.has-img { background: none; box-shadow: none; overflow: hidden; }
.logo-mark.has-img img { width: 100%; height: 100%; object-fit: contain; }

/* ---------- Blog ---------- */

.section-head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 18px; }
.post-card { display: flex; flex-direction: column; padding: 0; text-decoration: none; color: inherit; transition: transform .5s var(--ease), border-color .3s; }
.post-card:hover { transform: translateY(-4px); border-color: var(--border-strong); }
.post-cover { aspect-ratio: 16 / 9; overflow: hidden; border-bottom: 1px solid var(--border); }
.post-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.post-card:hover .post-cover img { transform: scale(1.05); }
.post-body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.post-body h2, .post-body h3 { font-size: 1.4rem; }
.post-meta { margin: 0; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.post-excerpt { margin: 0; color: var(--muted); }

.blog-wrap { width: min(var(--max), calc(100% - 2 * var(--gutter))); margin: 0 auto; padding: 130px 0 0; }
.blog-head h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); }
.blog-head .muted { max-width: 36em; margin: 14px 0 0; }
.feed-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; font-size: 14px; color: var(--muted); text-decoration: none; }
.feed-link:hover { color: var(--text); }
.blog-empty { display: grid; gap: 18px; justify-items: start; max-width: 640px; }
.blog-empty p { margin: 0; font-size: 1.1rem; }

.post { width: min(760px, 100%); margin: 0 auto; }
.post-back { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); text-decoration: none; font-weight: 500; margin-bottom: 30px; }
.post-back:hover { color: var(--text); }
.draft-note { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 12px; margin: 0 0 24px; background: color-mix(in srgb, var(--a3) 16%, transparent); border: 1px solid color-mix(in srgb, var(--a3) 40%, transparent); font-size: 15px; }
.post-head h1 { font-size: clamp(2.2rem, 6vw, 3.8rem); margin: 10px 0 0; }
.post-lead { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--muted); margin: 18px 0 0; line-height: 1.55; }
.post-head .tags { margin-top: 18px; }
.post-hero { margin: 36px 0 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.post-hero img { width: 100%; }
.post-content { margin-top: 40px; font-size: 1.12rem; line-height: 1.8; }
.post-content h2 { font-size: 1.7rem; margin: 2em 0 .6em; }
.post-content h3 { font-size: 1.3rem; margin: 1.6em 0 .5em; }
.prose em { font-style: italic; }
.prose code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em; padding: 2px 6px; border-radius: 6px; background: var(--glass-strong); border: 1px solid var(--border); }
.prose blockquote { margin: 1.4em 0; padding: 4px 0 4px 20px; border-left: 3px solid; border-image: var(--grad) 1; color: var(--muted); font-size: 1.08em; }
.prose blockquote p { margin: 0; }
.prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .35em; }
.post-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--border); }
.post-author { display: flex; align-items: center; gap: 12px; }
.post-author strong { display: block; }
.post-author small { color: var(--muted); }
.post-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 30px; }
.post-pager a { display: grid; gap: 4px; text-decoration: none; color: inherit; padding: 18px 22px; }
.post-pager .next { text-align: right; grid-column: 2; }
.post-pager small { color: var(--muted); }
@media (max-width: 640px) { .post-pager { grid-template-columns: 1fr; } .post-pager .next { grid-column: auto; } }

/* ---------- Lebenslauf ---------- */

.cv-link { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 22px; font-weight: 600; text-decoration: none; color: var(--text); }
.cv-link:hover { color: var(--a2); }

/* ---------- ⌘K-Befehlspalette ---------- */

.cmdk-trigger { width: auto; padding: 0 10px; gap: 6px; border-radius: 999px; display: inline-flex; }
.cmdk-trigger kbd, .cmdk kbd { font: 600 11px var(--font); letter-spacing: .04em; color: var(--muted); padding: 2px 6px; border-radius: 6px; border: 1px solid var(--border); background: var(--glass); }
.cmdk { position: fixed; inset: 0; z-index: 200; display: grid; justify-items: center; align-items: start; padding: min(14vh, 120px) 16px 16px; }
.cmdk[hidden] { display: none; }
.cmdk-backdrop { position: absolute; inset: 0; background: color-mix(in srgb, var(--bg) 55%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fadeIn .2s ease; }
.cmdk-panel { position: relative; width: min(620px, 100%); border-radius: 22px; box-shadow: var(--shadow), 0 0 0 1px var(--border); background: color-mix(in srgb, var(--bg) 82%, transparent); overflow: hidden; animation: pop .3s var(--ease); }
.cmdk-search { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.cmdk-search .icon { color: var(--muted); }
.cmdk-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--text); font: 500 17px var(--font); }
.cmdk-search input::placeholder { color: var(--faint); }
.cmdk-list { list-style: none; margin: 0; padding: 8px; max-height: min(52vh, 420px); overflow-y: auto; }
.cmdk-group { padding: 10px 12px 6px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.cmdk-item { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; cursor: pointer; color: var(--text); }
.cmdk-item .icon { width: 18px; height: 18px; color: var(--muted); }
.cmdk-item span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmdk-item small { color: var(--faint); font-size: 12px; }
.cmdk-item[aria-selected="true"] { background: var(--glass-strong); box-shadow: inset 2px 0 0 var(--a1); }
.cmdk-item[aria-selected="true"] .icon { color: var(--a2); }
.cmdk-empty { margin: 0; padding: 22px; text-align: center; color: var(--muted); }
.cmdk-hint { margin: 0; padding: 10px 18px; border-top: 1px solid var(--border); font-size: 12px; color: var(--faint); }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(-10px) scale(.98); } }
@media (max-width: 760px) { .cmdk-trigger kbd, .cmdk-hint { display: none; } .cmdk-trigger { width: 40px; padding: 0; justify-content: center; } }
@media (hover: none) { .cmdk-trigger kbd { display: none; } }

/* ---------- Easter Egg ---------- */

.egg-canvas { position: fixed; inset: 0; z-index: 300; pointer-events: none; }
html.egg-party .aurora { opacity: 1; filter: saturate(1.6); }
html.egg-party .blob { animation-duration: 3s !important; }

/* ---------- Wartungsmodus ---------- */

.page-maintenance main.maint { min-height: 100svh; display: grid; grid-template-rows: auto 1fr auto; justify-items: center; padding: 20px var(--gutter) 28px; }
.maint-top { justify-self: end; display: flex; gap: 6px; }
.maint-card { align-self: center; width: min(560px, 100%); display: flex; flex-direction: column; align-items: center; text-align: center; padding: clamp(30px, 6vw, 52px); animation: pop .8s var(--ease); }
.maint-card .status-pill { margin: 6px 0 14px; }
.maint-name { margin: 0 0 6px; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.maint-card h1 { font-size: clamp(2rem, 6vw, 3rem); }
.maint-card .muted { margin: 16px 0 0; max-width: 30em; }
.maint-socials { justify-content: center; margin-top: 24px; }
.maint-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 26px; }
.maint-foot { display: flex; gap: 18px; font-size: 14px; }
.maint-foot a { color: var(--muted); text-decoration: none; }
.maint-foot a:hover { color: var(--text); }
.maint-banner {
    position: fixed; left: 50%; bottom: 16px; z-index: 90; transform: translateX(-50%);
    display: inline-flex; align-items: center; gap: 10px; padding: 9px 16px; border-radius: 999px;
    background: var(--text); color: var(--bg); font-size: 13px; font-weight: 600; text-decoration: none; box-shadow: var(--shadow); white-space: nowrap;
}
.maint-banner .pulse { background: #f59e0b; }
.maint-banner .pulse::after { background: #f59e0b; }
@media (max-width: 520px) { .maint-banner { white-space: normal; text-align: center; width: calc(100% - 32px); justify-content: center; } }

/* ---------- Bilder im Text ---------- */

.rich-figure { margin: 2em 0; }
.rich-figure img { width: 100%; border-radius: var(--radius-sm); border: 1px solid var(--border); box-shadow: var(--shadow); }
.rich-figure figcaption { margin-top: 10px; font-size: 14px; color: var(--muted); text-align: center; }

/* ---------- Werdegang: Animation beim Scrollen ---------- */

/* Leuchtende Spitze, die beim Scrollen die Zeitleiste entlangwandert */
.timeline-comet {
    position: absolute; left: 50%; top: calc(var(--p, 0) * 100%);
    width: 12px; height: 12px; border-radius: 50%; transform: translate(-50%, -50%);
    background: #fff; opacity: 0; transition: opacity .4s;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--a2) 55%, transparent), 0 0 18px 4px var(--a2), 0 0 42px 10px color-mix(in srgb, var(--a1) 60%, transparent);
}
.tl-moving .timeline-comet { opacity: 1; }
.timeline-progress { box-shadow: 0 0 12px color-mix(in srgb, var(--a2) 60%, transparent); }

/* Punkt füllt sich, sobald die Leuchtspur ihn erreicht */
.timeline-dot { transition: background-color .5s var(--ease), box-shadow .5s var(--ease), transform .7s cubic-bezier(.34, 1.56, .64, 1); }
.timeline-dot.passed { background: var(--grad); border-color: transparent; box-shadow: 0 0 0 5px color-mix(in srgb, var(--a2) 25%, transparent), 0 0 18px var(--a2); }

/* Verbindungslinie Punkt → Karte */
.timeline-connector {
    position: absolute; left: -23px; top: 37px; width: 23px; height: 2px; border-radius: 2px;
    background: linear-gradient(90deg, var(--a1), var(--a2)); transform-origin: left;
}

/* Lichtreflex über die Karte */
.tl-shine {
    position: absolute; inset: 0; z-index: 2; pointer-events: none; border-radius: inherit;
    background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .22) 50%, transparent 65%);
    background-size: 250% 100%; background-position: 130% 0; opacity: 0;
}
:root[data-theme="light"] .tl-shine { background-image: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .85) 50%, transparent 65%); }

/* Ablauf: Punkt ploppt auf → Linie zeichnet sich → Karte wischt von links herein → Inhalt folgt → Lichtreflex */
html.js .tl-wipe .timeline-item.reveal { opacity: 1; filter: none; transform: none; transition: none; }
html.js .tl-wipe .timeline-item .timeline-dot { transform: scale(0); }
html.js .tl-wipe .timeline-item .timeline-connector { transform: scaleX(0); transition: transform .5s var(--ease) .25s; }
html.js .tl-wipe .timeline-item .card {
    opacity: 0; transform: translateX(-60px);
    -webkit-mask-image: linear-gradient(90deg, #000 42%, transparent 58%); mask-image: linear-gradient(90deg, #000 42%, transparent 58%);
    -webkit-mask-size: 260% 100%; mask-size: 260% 100%;
    -webkit-mask-position: 100% 0; mask-position: 100% 0;
    transition: opacity .6s var(--ease) .35s, transform 1.1s var(--ease) .35s, -webkit-mask-position 1.3s var(--ease) .35s, mask-position 1.3s var(--ease) .35s;
}
html.js .tl-wipe .timeline-item .card > :not(.tl-shine) { opacity: 0; transform: translateX(-18px); transition: opacity .7s var(--ease), transform .8s var(--ease); }

html.js .tl-wipe .timeline-item.in .timeline-dot { transform: scale(1); }
html.js .tl-wipe .timeline-item.in .timeline-dot::after {
    content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid var(--a2);
    animation: tlRipple 1.2s var(--ease) .1s both;
}
html.js .tl-wipe .timeline-item.in .timeline-connector { transform: scaleX(1); }
html.js .tl-wipe .timeline-item.in .card { opacity: 1; transform: none; -webkit-mask-position: 0 0; mask-position: 0 0; }
html.js .tl-wipe .timeline-item .card.tl-done { -webkit-mask-image: none; mask-image: none; }
html.js .tl-wipe .timeline-item.in .card > :not(.tl-shine) { opacity: 1; transform: none; }
html.js .tl-wipe .timeline-item.in .card > :nth-child(2) { transition-delay: .55s; }
html.js .tl-wipe .timeline-item.in .card > :nth-child(3) { transition-delay: .65s; }
html.js .tl-wipe .timeline-item.in .card > :nth-child(4) { transition-delay: .75s; }
html.js .tl-wipe .timeline-item.in .card > :nth-child(5) { transition-delay: .85s; }
html.js .tl-wipe .timeline-item.in .tl-shine { animation: tlShine 1.4s ease-out 1s both; }

@keyframes tlRipple { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(3.2); opacity: 0; } }
@keyframes tlShine { 0% { opacity: 1; background-position: 130% 0; } 100% { opacity: 1; background-position: -30% 0; } }

@media (prefers-reduced-motion: reduce) {
    html.js .tl-wipe .timeline-item .timeline-dot, html.js .tl-wipe .timeline-item .timeline-connector,
    html.js .tl-wipe .timeline-item .card, html.js .tl-wipe .timeline-item .card > * { opacity: 1 !important; transform: none !important; -webkit-mask-image: none; mask-image: none; }
    .timeline-comet, .tl-shine { display: none; }
}

/* ---------- Werdegang als Scroll-Story (horizontal) ---------- */
/* Der Abschnitt bleibt stehen (sticky), die Stationen bewegen sich je nach Scrollposition von rechts nach links.
   Die Höhe des Abschnitts setzt main.js – sie bestimmt, wie lange man „durchscrollen“ muss. */

.journey-h { position: relative; margin-top: clamp(40px, 8vw, 90px); }
.jh-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.jh-head { width: min(var(--max), calc(100% - 2 * var(--gutter))); margin: 0 auto; display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }
.jh-head h2 { font-size: clamp(2.2rem, 5.5vw, 4rem); }
.jh-counter { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: clamp(2.4rem, 6vw, 4.5rem); line-height: 1; font-variant-numeric: tabular-nums;
    background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.jh-counter small { font-size: .4em; margin-left: 6px; color: var(--faint); -webkit-text-fill-color: var(--faint); }
.jh-viewport { width: 100%; margin-top: clamp(24px, 5vh, 56px); }
.jh-track { position: relative; width: max-content; padding: 64px 0 24px; will-change: transform; }
.jh-list { display: flex; gap: clamp(28px, 6vw, 96px); list-style: none; margin: 0; padding: 0; }

/* Zeitleiste oben mit Fortschritt */
.jh-rail { position: absolute; left: 0; right: 0; top: 30px; height: 2px; border-radius: 2px; background: var(--border); }
.jh-rail-fill { position: absolute; inset: 0; border-radius: inherit; background: var(--grad); transform-origin: left; transform: scaleX(var(--fill, 0));
    box-shadow: 0 0 14px color-mix(in srgb, var(--a2) 70%, transparent); }
.jh-rail::after { content: ""; position: absolute; left: calc(var(--fill, 0) * 100%); top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: #fff;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--a2) 55%, transparent), 0 0 18px 4px var(--a2); }

/* Einzelne Station: --s = Abstand zur Bildmitte (-1 links … 0 Mitte … 1 rechts), --a = Betrag davon */
.jh-item { --s: 1; --a: 1; position: relative; width: min(460px, 78vw); flex: none; perspective: 1200px; }
.jh-dot { position: absolute; top: -40px; left: 30px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 2px solid var(--a1);
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--a1) 18%, transparent); transition: background-color .4s, box-shadow .4s, transform .5s cubic-bezier(.34, 1.56, .64, 1); }
.jh-item.passed .jh-dot { background: var(--grad); border-color: transparent; transform: scale(1.2); box-shadow: 0 0 0 6px color-mix(in srgb, var(--a2) 25%, transparent), 0 0 20px var(--a2); }
.jh-year { position: absolute; right: 8px; top: -18px; z-index: 0; font-family: var(--font-display); font-weight: 700; font-size: clamp(4.5rem, 11vw, 8.5rem); line-height: .8;
    color: transparent; -webkit-text-stroke: 1.5px color-mix(in srgb, var(--text) 22%, transparent); pointer-events: none;
    transform: translate3d(calc(var(--s) * 60px), 0, 0); opacity: calc(1 - var(--a) * .7); }
.jh-card { position: relative; z-index: 1; min-height: 230px; display: flex; flex-direction: column; gap: 6px; transform-style: preserve-3d;
    transform: translate3d(0, calc(var(--a) * 36px), 0) rotateY(calc(var(--s) * -22deg)) scale(calc(1 - var(--a) * .14));
    opacity: calc(1 - var(--a) * .65); filter: blur(calc(var(--a) * 2px)); }
.jh-card h3 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); margin-top: 2px; }
.jh-card .timeline-period { font-size: 15px; }
.jh-text { margin: 8px 0 0; color: var(--muted); }
.jh-item.is-focus .jh-card { border-color: color-mix(in srgb, var(--a2) 45%, transparent);
    box-shadow: var(--shadow), 0 0 0 1px color-mix(in srgb, var(--a2) 25%, transparent), 0 20px 60px -20px color-mix(in srgb, var(--a1) 70%, transparent); }

.jh-hint { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); margin: 0; display: flex; align-items: center; gap: 6px;
    font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); transition: opacity .4s; }
.jh-hint .icon { animation: bob 2s ease-in-out infinite; }
.journey-h.jh-end .jh-hint { opacity: 0; }

/* Ohne JavaScript oder mit „Bewegung reduzieren“: normale Liste untereinander */
.journey-h:not(.jh-ready) { width: min(var(--max), calc(100% - 2 * var(--gutter))); margin-left: auto; margin-right: auto; padding-top: clamp(70px, 11vw, 130px); }
.journey-h:not(.jh-ready) .jh-sticky { position: static; height: auto; overflow: visible; }
.journey-h:not(.jh-ready) .jh-head { width: 100%; }
.journey-h:not(.jh-ready) .jh-track { width: auto; padding-top: 10px; }
.journey-h:not(.jh-ready) .jh-list { flex-direction: column; gap: 18px; }
.journey-h:not(.jh-ready) .jh-item { width: auto; }
.journey-h:not(.jh-ready) .jh-rail, .journey-h:not(.jh-ready) .jh-dot, .journey-h:not(.jh-ready) .jh-year,
.journey-h:not(.jh-ready) .jh-hint, .journey-h:not(.jh-ready) .jh-counter { display: none; }
.journey-h:not(.jh-ready) .jh-card { transform: none; opacity: 1; filter: none; min-height: 0; }

@media (max-width: 760px) {
    .jh-head { flex-direction: row; align-items: flex-end; }
    .jh-card { min-height: 200px; }
}

/* ---------- Animation: Entschlüsseln-Effekt (Schalter im Admin) ---------- */
.hero-title .dc { display: inline-block; text-align: center; }
.hero-title .dc.scramble { color: var(--a2); opacity: .8; text-shadow: 0 0 18px color-mix(in srgb, var(--a2) 60%, transparent); }

/* ---------- Animation: Kreiswelle beim Farbschema-Wechsel (Schalter im Admin) ---------- */
html.theme-wave, html.theme-wave * { transition: none !important; }
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { z-index: 2; }

/* ---------- Animation: Projekte als Kartenstapel (Schalter im Admin) ---------- */
.projects-stack { display: block; }
.stack-item { position: sticky; top: calc(110px + var(--i) * 22px); margin-bottom: 16vh; }
.stack-item:last-child { margin-bottom: 0; }
.projects-stack .project {
    --cover: 0; --depth: 0;
    display: grid; grid-template-columns: 1.1fr 1fr; min-height: min(60vh, 440px);
    background: linear-gradient(var(--glass), var(--glass)), color-mix(in srgb, var(--bg) 90%, transparent);
    transform-origin: 50% 0;
    transform: scale(calc(1 - var(--cover) * (.04 + var(--depth) * .015)));
    filter: brightness(calc(1 - var(--cover) * .4)) saturate(calc(1 - var(--cover) * .3));
    box-shadow: 0 -18px 50px -24px rgba(0, 0, 0, .55), var(--shadow);
    transition: border-color .3s;
}
.projects-stack .project:hover { border-color: var(--border-strong); }
.projects-stack .project-media { aspect-ratio: auto; height: 100%; min-height: 240px; border-bottom: 0; border-right: 1px solid var(--border); }
.projects-stack .project-body { padding: clamp(24px, 4vw, 48px); justify-content: center; gap: 14px; }
.projects-stack .project-body h3 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
.projects-stack .project-body p { font-size: 1.05rem; }
.stack-no { position: absolute; z-index: 3; right: clamp(18px, 3vw, 34px); bottom: clamp(14px, 2.4vw, 26px); pointer-events: none;
    font-family: var(--font-display); font-weight: 700; font-size: clamp(2.6rem, 6vw, 4.4rem); line-height: 1;
    color: transparent; -webkit-text-stroke: 1.5px color-mix(in srgb, var(--text) 30%, transparent); }
@media (max-width: 760px) {
    .stack-item { top: calc(84px + var(--i) * 14px); margin-bottom: 10vh; }
    .projects-stack .project { grid-template-columns: 1fr; min-height: 0; }
    .projects-stack .project-media { aspect-ratio: 16 / 10; min-height: 0; border-right: 0; border-bottom: 1px solid var(--border); }
}
@media (prefers-reduced-motion: reduce) {
    .stack-item { position: static; margin-bottom: 18px; }
    .projects-stack .project { transform: none; filter: none; }
}
