/* ═══════════════════════════════════════════════════════════════
   TECH PORTFOLIO — Sören / AMDRyzen
   Cyber-HUD Design: Netzwerk-Canvas, Terminal, Glitch & Scramble
   ═══════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────────
   Design Tokens (Dark = Standard)
   ───────────────────────────────────────────────────────────────── */
:root,
[data-theme="dark"] {
    --bg-primary: #05070d;
    --bg-secondary: #080c16;
    --bg-card: rgba(11, 17, 31, 0.88);
    --bg-glass: rgba(8, 12, 22, 0.78);
    --bg-terminal: #060a13;

    --text-primary: #e6f1ff;
    --text-secondary: #8fa3bf;
    --text-muted: #56657d;

    --accent-primary: #00e5ff;
    --accent-secondary: #39ff88;
    --accent-tertiary: #ff2bd6;
    --accent-soft: rgba(0, 229, 255, 0.08);
    --accent-glow: rgba(0, 229, 255, 0.35);

    --border: rgba(0, 229, 255, 0.13);
    --border-strong: rgba(0, 229, 255, 0.5);
    --grid-line: rgba(0, 229, 255, 0.045);

    --gradient-primary: linear-gradient(90deg, #00e5ff 0%, #39ff88 100%);
    --gradient-hot: linear-gradient(90deg, #00e5ff 0%, #7c5cff 50%, #ff2bd6 100%);

    --font-main: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;

    --shadow-soft: 0 4px 30px rgba(0, 0, 0, 0.4);
    --shadow-strong: 0 20px 60px rgba(0, 0, 0, 0.55);
    --shadow-glow: 0 0 0 1px var(--border-strong), 0 0 30px rgba(0, 229, 255, 0.18);

    --radius: 6px;
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-snap: cubic-bezier(0.7, 0, 0.2, 1);

    --net-rgb: 0, 229, 255;
    --scanline-opacity: 0.35;
    color-scheme: dark;
}

[data-theme="light"] {
    --bg-primary: #eef2f7;
    --bg-secondary: #e4eaf2;
    --bg-card: rgba(255, 255, 255, 0.9);
    --bg-glass: rgba(246, 249, 252, 0.85);
    --bg-terminal: #0a0f1a;

    --text-primary: #0b1220;
    --text-secondary: #3c4b63;
    --text-muted: #6b7a90;

    --accent-primary: #0077cc;
    --accent-secondary: #00955a;
    --accent-tertiary: #d4148f;
    --accent-soft: rgba(0, 119, 204, 0.08);
    --accent-glow: rgba(0, 119, 204, 0.25);

    --border: rgba(0, 70, 140, 0.14);
    --border-strong: rgba(0, 119, 204, 0.55);
    --grid-line: rgba(0, 70, 140, 0.06);

    --gradient-primary: linear-gradient(90deg, #0077cc 0%, #00955a 100%);
    --gradient-hot: linear-gradient(90deg, #0077cc 0%, #6a3cff 50%, #d4148f 100%);

    --shadow-soft: 0 4px 24px rgba(10, 30, 60, 0.07);
    --shadow-strong: 0 20px 50px rgba(10, 30, 60, 0.14);
    --shadow-glow: 0 0 0 1px var(--border-strong), 0 10px 30px rgba(0, 119, 204, 0.14);

    --net-rgb: 0, 100, 180;
    --scanline-opacity: 0;
    color-scheme: light;
}

/* ─────────────────────────────────────────────────────────────────
   Reset & Base
   ───────────────────────────────────────────────────────────────── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-main);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    cursor: none;
    -webkit-font-smoothing: antialiased;
}

::selection {
    background: var(--accent-primary);
    color: var(--bg-primary);
}

a { color: inherit; text-decoration: none; cursor: none; }
button { cursor: none; font: inherit; }

.accent-mono {
    font-family: var(--font-mono);
    color: var(--accent-primary);
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb {
    background: var(--border);
    border: 2px solid var(--bg-primary);
    border-radius: 2px;
}
::-webkit-scrollbar-thumb:hover { background: var(--accent-primary); }

/* ─────────────────────────────────────────────────────────────────
   Boot Screen
   ───────────────────────────────────────────────────────────────── */
.loader {
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    font-family: var(--font-mono);
    transition: opacity 0.6s var(--ease-out), visibility 0.6s, clip-path 0.8s var(--ease-snap);
    clip-path: inset(0 0 0 0);
}

body.loaded .loader {
    opacity: 0;
    visibility: hidden;
    clip-path: inset(0 0 100% 0);
}

.loader-content {
    width: min(460px, calc(100vw - 40px));
}

.loader-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
}

.loader-text {
    font-family: var(--font-main);
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.loader-badge,
.logo-badge {
    font-family: var(--font-mono);
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    box-shadow: 0 0 12px var(--accent-soft), inset 0 0 12px var(--accent-soft);
}

.boot-log {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    line-height: 1.7;
    color: var(--text-secondary);
    min-height: 9.5em;
    margin-bottom: 18px;
    white-space: pre-wrap;
}

.boot-log .ok { color: var(--accent-secondary); }
.boot-log .info { color: var(--accent-primary); }

.loader-bar {
    width: 100%;
    height: 6px;
    border: 1px solid var(--border);
    padding: 1px;
}

.loader-progress {
    width: 0%;
    height: 100%;
    background: var(--gradient-primary);
    box-shadow: 0 0 12px var(--accent-glow);
    -webkit-mask: repeating-linear-gradient(90deg, #000 0 6px, transparent 6px 8px);
            mask: repeating-linear-gradient(90deg, #000 0 6px, transparent 6px 8px);
    transition: width 0.15s linear;
}

.loader-percent {
    margin-top: 10px;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: right;
}

/* ─────────────────────────────────────────────────────────────────
   Scroll Progress
   ───────────────────────────────────────────────────────────────── */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient-hot);
    transform-origin: left;
    transform: scaleX(0);
    z-index: 200;
    box-shadow: 0 0 10px var(--accent-glow);
}

/* ─────────────────────────────────────────────────────────────────
   Custom Cursor (Crosshair + Koordinaten)
   ───────────────────────────────────────────────────────────────── */
.cursor-main,
.cursor-follower {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    will-change: transform;
}

.cursor-main {
    width: 6px;
    height: 6px;
    background: var(--accent-primary);
    z-index: 9999;
    margin: -3px 0 0 -3px;
    box-shadow: 0 0 10px var(--accent-primary);
    transition: width 0.2s, height 0.2s, margin 0.2s, opacity 0.2s;
}

.cursor-follower {
    width: 36px;
    height: 36px;
    margin: -18px 0 0 -18px;
    z-index: 9998;
    transition: width 0.25s var(--ease-out), height 0.25s var(--ease-out), margin 0.25s var(--ease-out);
    /* Vier Eck-Klammern */
    background:
        linear-gradient(var(--accent-primary), var(--accent-primary)) top left / 8px 1px,
        linear-gradient(var(--accent-primary), var(--accent-primary)) top left / 1px 8px,
        linear-gradient(var(--accent-primary), var(--accent-primary)) top right / 8px 1px,
        linear-gradient(var(--accent-primary), var(--accent-primary)) top right / 1px 8px,
        linear-gradient(var(--accent-primary), var(--accent-primary)) bottom left / 8px 1px,
        linear-gradient(var(--accent-primary), var(--accent-primary)) bottom left / 1px 8px,
        linear-gradient(var(--accent-primary), var(--accent-primary)) bottom right / 8px 1px,
        linear-gradient(var(--accent-primary), var(--accent-primary)) bottom right / 1px 8px;
    background-repeat: no-repeat;
}

.cursor-coords {
    position: absolute;
    top: calc(100% + 6px);
    left: calc(100% + 6px);
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--accent-primary);
    white-space: nowrap;
    opacity: 0.7;
    letter-spacing: 0.04em;
}

.cursor-main.hover { transform: scale(0.7); }

.cursor-follower.hover {
    width: 56px;
    height: 56px;
    margin: -28px 0 0 -28px;
    animation: cursorSpin 3s linear infinite;
}

.cursor-follower.hover .cursor-coords { opacity: 0; }

.cursor-follower.click {
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
}

@keyframes cursorSpin {
    to { rotate: 90deg; }
}

/* ─────────────────────────────────────────────────────────────────
   Background Layers
   ───────────────────────────────────────────────────────────────── */
.net-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.bg-grid {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridDrift 30s linear infinite;
}

@keyframes gridDrift {
    to { background-position: 60px 60px; }
}

.bg-scanlines {
    position: fixed;
    inset: 0;
    z-index: 9990;
    pointer-events: none;
    opacity: var(--scanline-opacity);
    background: repeating-linear-gradient(
        to bottom,
        transparent 0,
        transparent 2px,
        rgba(0, 0, 0, 0.25) 3px,
        transparent 4px
    );
    mix-blend-mode: multiply;
}

.bg-vignette {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: radial-gradient(ellipse at center, transparent 40%, var(--bg-primary) 110%);
}

/* HUD Overlay */
.hud {
    position: fixed;
    inset: 0;
    z-index: 90;
    pointer-events: none;
}

.hud-corner {
    position: absolute;
    width: 18px;
    height: 18px;
    border-color: var(--border-strong);
    border-style: solid;
    border-width: 0;
    opacity: 0.6;
}

.hud-corner.tl { top: 12px; left: 12px; border-top-width: 1px; border-left-width: 1px; }
.hud-corner.tr { top: 12px; right: 12px; border-top-width: 1px; border-right-width: 1px; }
.hud-corner.bl { bottom: 12px; left: 12px; border-bottom-width: 1px; border-left-width: 1px; }
.hud-corner.br { bottom: 12px; right: 12px; border-bottom-width: 1px; border-right-width: 1px; }

.hud-readout {
    position: absolute;
    bottom: 18px;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    text-transform: uppercase;
}

.hud-readout.left { left: 40px; }
.hud-readout.right { right: 190px; }
.hud-sep { color: var(--accent-primary); opacity: 0.6; margin: 0 6px; }
#hud-section { color: var(--accent-primary); }

/* ─────────────────────────────────────────────────────────────────
   Navigation
   ───────────────────────────────────────────────────────────────── */
.nav {
    position: fixed;
    top: 20px;
    right: 30px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 26px;
    padding: 8px 8px 8px 22px;
    background: var(--bg-glass);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    animation: navSlideDown 0.8s var(--ease-out) 0.2s backwards;
}

body:not(.loaded) .nav,
body:not(.loaded) .nav-logo { animation-play-state: paused; }

@keyframes navSlideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.nav-logo {
    position: fixed;
    top: 26px;
    left: 30px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.06em;
    z-index: 101;
    animation: navSlideDown 0.8s var(--ease-out) 0.3s backwards;
}

.logo-prompt {
    font-family: var(--font-mono);
    color: var(--accent-primary);
    animation: blink 1.1s steps(1) infinite;
}

.logo-text { color: var(--text-primary); }

.nav-menu { display: flex; gap: 22px; }

.nav-link {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
    position: relative;
    padding: 5px 0;
    transition: color 0.25s ease;
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
}

.nav-num {
    color: var(--accent-primary);
    font-size: 0.65rem;
    opacity: 0.7;
}

.nav-link:hover,
.nav-link.active { color: var(--text-primary); }

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--accent-primary);
    box-shadow: 0 0 8px var(--accent-primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s var(--ease-out);
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
    transform-origin: left;
}

.nav-cta {
    position: relative;
    font-family: var(--font-mono);
    background: var(--accent-primary);
    color: var(--bg-primary);
    padding: 9px 18px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    overflow: hidden;
    transition: box-shadow 0.3s ease, background 0.3s ease;
}

.nav-cta:hover {
    box-shadow: 0 0 24px var(--accent-glow);
}

.btn-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
    animation: btnShine 3.5s ease-in-out infinite;
}

@keyframes btnShine {
    0% { left: -100%; }
    40%, 100% { left: 140%; }
}

/* ─────────────────────────────────────────────────────────────────
   Hero
   ───────────────────────────────────────────────────────────────── */
.hero {
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 120px 50px 100px;
    position: relative;
    z-index: 2;
}

.hero-inner {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 60px;
    align-items: center;
}

.hero-content { position: relative; z-index: 10; }
.hero-inner > * { min-width: 0; }

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 7px 14px;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 28px;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-secondary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-secondary);
    animation: dotPulse 1.6s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.hero-title {
    font-size: clamp(2.8rem, 7vw, 5.6rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.02;
    margin-bottom: 28px;
}

.title-line {
    display: block;
    overflow: hidden;
    padding-bottom: 0.06em;
}

.title-sub {
    font-size: 0.42em;
    font-weight: 500;
    letter-spacing: 0;
    color: var(--text-secondary);
    margin-top: 10px;
}

.word {
    display: inline-block;
    position: relative;
    opacity: 0;
    transform: translateY(105%);
    animation: wordReveal 0.9s var(--ease-out) forwards;
    animation-delay: calc(0.25s + var(--delay, 0) * 0.09s);
}

body:not(.loaded) .word,
body:not(.loaded) .reveal-up,
body:not(.loaded) .reveal-scale { animation-play-state: paused; }

@keyframes wordReveal {
    to { opacity: 1; transform: translateY(0); }
}

/* Glitch-Name */
.glitch {
    color: var(--accent-primary);
    text-shadow: 0 0 30px var(--accent-glow);
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.85;
}

.glitch::before {
    color: var(--accent-tertiary);
    animation: glitchA 4s steps(1) infinite 1.5s;
    clip-path: inset(0 0 100% 0);
}

.glitch::after {
    color: var(--accent-secondary);
    animation: glitchB 4s steps(1) infinite 1.5s;
    clip-path: inset(0 0 100% 0);
}

@keyframes glitchA {
    0%, 86%, 100% { clip-path: inset(0 0 100% 0); transform: none; }
    87% { clip-path: inset(10% 0 60% 0); transform: translate(-4px, 0); }
    89% { clip-path: inset(55% 0 20% 0); transform: translate(4px, 0); }
    91% { clip-path: inset(30% 0 45% 0); transform: translate(-3px, 0); }
    93% { clip-path: inset(75% 0 5% 0); transform: translate(2px, 0); }
}

@keyframes glitchB {
    0%, 86%, 100% { clip-path: inset(0 0 100% 0); transform: none; }
    88% { clip-path: inset(65% 0 10% 0); transform: translate(4px, 0); }
    90% { clip-path: inset(15% 0 70% 0); transform: translate(-4px, 0); }
    92% { clip-path: inset(40% 0 35% 0); transform: translate(3px, 0); }
}

.hero-subtitle {
    font-family: var(--font-mono);
    font-size: clamp(0.95rem, 1.8vw, 1.15rem);
    color: var(--text-secondary);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 38px;
}

.subtitle-prefix { color: var(--text-muted); }

.rotating-text {
    color: var(--accent-secondary);
    font-weight: 500;
    min-height: 1.6em;
}

.rotate-item { display: none; }
.rotate-item.active { display: inline; }
.rotating-text.typing .rotate-item { display: none; }

.caret {
    display: inline-block;
    color: var(--accent-primary);
    margin-left: 2px;
    animation: blink 1s steps(1) infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 28px;
    background: var(--accent-soft);
    border: 1px solid var(--border-strong);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
    transition: background 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
}

.hero-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent-primary);
    transform: translateX(-101%);
    transition: transform 0.45s var(--ease-snap);
    z-index: -1;
}

.hero-cta { z-index: 0; }

.hero-cta:hover {
    color: var(--bg-primary);
    box-shadow: 0 0 30px var(--accent-glow);
}

.hero-cta:hover::before { transform: translateX(0); }

.hero-cta.ghost {
    background: transparent;
    border-color: var(--border);
}

.cta-bracket {
    color: var(--accent-primary);
    transition: transform 0.35s var(--ease-out), color 0.3s;
}

.hero-cta:hover .cta-bracket { color: var(--bg-primary); }
.hero-cta:hover .cta-bracket.left { transform: translateX(-4px); }
.hero-cta:hover .cta-bracket.right { transform: translateX(4px); }

.cta-glow { display: none; }

/* Reveal (Hero) */
.reveal-up {
    opacity: 0;
    transform: translateY(30px);
    animation: revealUp 0.9s var(--ease-out) forwards;
    animation-delay: 0.3s;
}

.reveal-up[data-delay="400"] { animation-delay: 0.6s; }
.reveal-up[data-delay="600"] { animation-delay: 0.8s; }
.reveal-up[data-delay="1000"] { animation-delay: 1.3s; }

@keyframes revealUp {
    to { opacity: 1; transform: translateY(0); }
}

.reveal-scale {
    opacity: 0;
    clip-path: inset(0 0 100% 0);
    animation: revealScan 1s var(--ease-snap) forwards;
    animation-delay: 0.7s;
}

@keyframes revealScan {
    to { opacity: 1; clip-path: inset(-40px -40px -40px -40px); }
}

/* ─────────────────────────────────────────────────────────────────
   Terminal
   ───────────────────────────────────────────────────────────────── */
.terminal {
    position: relative;
    background: var(--bg-terminal);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow-strong), 0 0 60px rgba(0, 229, 255, 0.08);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: #c9d6e8;
    overflow: hidden;
    transform: perspective(1400px) rotateY(-6deg) rotateX(3deg);
    transition: transform 0.6s var(--ease-out);
}

.terminal:hover {
    transform: perspective(1400px) rotateY(0) rotateX(0);
}

.terminal-bar {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 11px 14px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(0, 229, 255, 0.1);
}

.t-dot { width: 11px; height: 11px; border-radius: 50%; }
.t-dot.red { background: #ff5f57; }
.t-dot.yellow { background: #febc2e; }
.t-dot.green { background: #28c840; }

.terminal-title {
    flex: 1;
    text-align: center;
    font-size: 0.72rem;
    color: #6b7d96;
}

.terminal-status {
    font-size: 0.65rem;
    color: #39ff88;
    opacity: 0.7;
}

.terminal-body {
    padding: 18px 20px 22px;
    min-height: 360px;
    line-height: 1.75;
    white-space: pre-wrap;
    word-break: break-word;
}

.terminal-body .t-line { display: block; }
.terminal-body .t-prompt { color: #39ff88; }
.terminal-body .t-path { color: #00e5ff; }
.terminal-body .t-cmd { color: #e6f1ff; }
.terminal-body .t-out { color: #8fa3bf; }
.terminal-body .t-key { color: #00e5ff; }
.terminal-body .t-str { color: #39ff88; }
.terminal-body .t-num { color: #ff9e64; }
.terminal-body .t-hot { color: #ff2bd6; }
.terminal-body .caret { color: #00e5ff; }

.terminal-scan {
    position: absolute;
    left: 0;
    right: 0;
    height: 80px;
    top: -80px;
    background: linear-gradient(to bottom, transparent, rgba(0, 229, 255, 0.06), transparent);
    animation: termScan 6s linear infinite;
    pointer-events: none;
}

@keyframes termScan {
    to { top: 100%; }
}

/* Scroll Hint */
.scroll-hint {
    position: absolute;
    bottom: 36px;
    left: 50%;
    translate: -50% 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.scroll-line {
    width: 1px;
    height: 46px;
    background: linear-gradient(to bottom, transparent, var(--accent-primary));
    position: relative;
    overflow: hidden;
}

.scroll-line::after {
    content: '';
    position: absolute;
    left: 0;
    top: -20px;
    width: 1px;
    height: 20px;
    background: var(--text-primary);
    animation: scrollDrop 1.8s var(--ease-snap) infinite;
}

@keyframes scrollDrop {
    to { top: 100%; }
}

/* ─────────────────────────────────────────────────────────────────
   Marquee
   ───────────────────────────────────────────────────────────────── */
.marquee-section,
.testimonials-section {
    padding: 18px 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    overflow: hidden;
    position: relative;
    z-index: 2;
}

.marquee { display: flex; overflow: hidden; }

.marquee-content {
    display: flex;
    gap: 36px;
    animation: marquee 40s linear infinite;
    white-space: nowrap;
    padding-right: 36px;
}

.marquee.reverse .marquee-content { animation-direction: reverse; }

.marquee-content span {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.marquee-content .star {
    color: var(--accent-primary);
    opacity: 0.8;
}

.testimonial-item {
    text-transform: none !important;
    letter-spacing: 0.02em !important;
}

@keyframes marquee {
    to { transform: translateX(-50%); }
}

/* ─────────────────────────────────────────────────────────────────
   Sections Common
   ───────────────────────────────────────────────────────────────── */
section { scroll-margin-top: 90px; }

.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
}

.section-header { margin-bottom: 56px; }
.section-header.center { text-align: center; }

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    margin-bottom: 14px;
}

.section-label::before {
    content: '';
    width: 7px;
    height: 7px;
    background: var(--accent-primary);
    box-shadow: 0 0 8px var(--accent-primary);
    animation: blink 1.4s steps(1) infinite;
}

.section-title,
.contact-title {
    font-size: clamp(2rem, 5vw, 3.4rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.scramble-wait { opacity: 0; }
.scramble .scr { color: var(--accent-primary); font-family: var(--font-mono); font-weight: 500; }

/* HUD-Ecken für Karten */
.card-corners {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 3;
}

.card-corners::before,
.card-corners::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    border: 0 solid var(--accent-primary);
    transition: width 0.4s var(--ease-out), height 0.4s var(--ease-out), opacity 0.3s;
    opacity: 0.55;
}

.card-corners::before {
    top: 0;
    left: 0;
    border-top-width: 2px;
    border-left-width: 2px;
}

.card-corners::after {
    bottom: 0;
    right: 0;
    border-bottom-width: 2px;
    border-right-width: 2px;
}

.tilt-card:hover .card-corners::before,
.tilt-card:hover .card-corners::after {
    width: 40px;
    height: 40px;
    opacity: 1;
}

/* Maus-Spotlight */
.card-shine {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.35s ease;
    background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), var(--accent-soft), transparent 45%);
    z-index: 0;
}

.tilt-card:hover .card-shine { opacity: 1; }

.tilt-card {
    /* bewusst kein preserve-3d / backdrop-filter: zusammen mit der 3D-Neigung
       lassen GPU-Browser die Karte sonst beim Hover verschwinden */
    transform-style: flat;
}

/* Gemeinsame Karten-Basis */
.project-card,
.stat-card,
.github-stat-card,
.repo-card,
.service-card,
.contact-link,
.skill-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    position: relative;
    transition: border-color 0.3s ease, box-shadow 0.4s ease, background 0.3s ease;
}

.project-card:hover,
.stat-card:hover,
.github-stat-card:hover,
.repo-card:hover,
.service-card:hover,
.contact-link:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-glow);
}

/* ─────────────────────────────────────────────────────────────────
   Work / Projects
   ───────────────────────────────────────────────────────────────── */
.work {
    padding: 130px 0;
    position: relative;
    z-index: 2;
}

/* Hauptprojekt Kernhosting */
.featured-card {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 48px;
    align-items: center;
    padding: 46px;
    margin-bottom: 24px;
    background:
        linear-gradient(135deg, var(--accent-soft), transparent 55%),
        var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 40px rgba(0, 229, 255, 0.06);
    transition: border-color 0.3s ease, box-shadow 0.4s ease;
}

.featured-card:hover { box-shadow: var(--shadow-glow); }

.featured-card > *:not(.card-shine):not(.card-corners) { position: relative; z-index: 1; min-width: 0; }

.featured-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

.featured-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--accent-secondary);
    border: 1px solid var(--border);
    padding: 3px 10px;
    border-radius: 3px;
}

.featured-title {
    font-size: clamp(2.4rem, 5vw, 3.6rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.05;
    margin: 16px 0 16px;
}

.featured-title .accent-mono {
    font-weight: 700;
    text-shadow: 0 0 24px var(--accent-glow);
}

.featured-desc {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.75;
    max-width: 540px;
}

.featured-list {
    list-style: none;
    margin: 24px 0 30px;
    display: grid;
    gap: 10px;
}

.featured-list li {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 0.95rem;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--border);
}

.featured-list .accent-mono { font-size: 0.75rem; }

/* Server-Rack (Deko) */
.rack {
    background: var(--bg-terminal);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 16px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: #8fa3bf;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rack-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    margin-bottom: 4px;
    border-bottom: 1px solid rgba(0, 229, 255, 0.1);
    letter-spacing: 0.1em;
    color: #56657d;
}

.rack-live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #39ff88;
}

.rack-unit {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(0, 229, 255, 0.08);
    border-radius: 3px;
}

.led {
    width: 6px;
    height: 6px;
    border-radius: 1px;
    background: #39ff88;
    box-shadow: 0 0 6px #39ff88;
    animation: ledBlink 1.3s steps(1) infinite;
}

.led.d1 { animation-duration: 0.7s; }
.led.d2 { animation-duration: 1.9s; background: #00e5ff; box-shadow: 0 0 6px #00e5ff; }
.led.d3 { animation-duration: 0.45s; }
.led.d4 { animation-duration: 2.4s; background: #00e5ff; box-shadow: 0 0 6px #00e5ff; }

@keyframes ledBlink {
    50% { opacity: 0.25; }
}

.rack-name {
    color: #c9d6e8;
    margin-left: 6px;
    flex: 1;
}

.rack-load {
    width: 42%;
    height: 5px;
    background: rgba(0, 229, 255, 0.08);
    overflow: hidden;
}

.rack-load i {
    display: block;
    height: 100%;
    width: calc(var(--l) * 100%);
    background: linear-gradient(90deg, #00e5ff, #39ff88);
    transform-origin: left;
    animation: rackLoad 3.2s ease-in-out infinite alternate;
}

.rack-unit:nth-child(3) .rack-load i { animation-delay: -1.1s; }
.rack-unit:nth-child(4) .rack-load i { animation-delay: -2.3s; }
.rack-unit:nth-child(5) .rack-load i { animation-delay: -0.6s; }
.rack-unit:nth-child(6) .rack-load i { animation-delay: -1.8s; }

@keyframes rackLoad {
    from { transform: scaleX(0.55); }
    to { transform: scaleX(1); }
}

.rack-traffic {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 46px;
    margin-top: 6px;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 229, 255, 0.1);
}

.rack-traffic span {
    flex: 1;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 229, 255, 0.55), rgba(0, 229, 255, 0.08));
    transform-origin: bottom;
    animation: traffic 1.6s ease-in-out infinite alternate;
}

.rack-traffic span:nth-child(3n) { animation-duration: 1.1s; }
.rack-traffic span:nth-child(3n+1) { animation-duration: 2.1s; animation-delay: -0.7s; }
.rack-traffic span:nth-child(4n) { animation-delay: -1.3s; }
.rack-traffic span:nth-child(5n) { animation-duration: 0.9s; }

@keyframes traffic {
    from { transform: scaleY(0.15); }
    to { transform: scaleY(1); }
}

.projects {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.project-card {
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    overflow: hidden;
}

.project-card > *:not(.card-shine):not(.card-corners) { position: relative; z-index: 1; }

.project-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.project-visual {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--accent-soft);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.project-icon {
    width: 28px;
    height: 28px;
    color: var(--accent-primary);
    transition: transform 0.5s var(--ease-out);
}

.project-card:hover .project-visual {
    border-color: var(--accent-primary);
    box-shadow: 0 0 20px var(--accent-soft), inset 0 0 14px var(--accent-soft);
}

.project-card:hover .project-icon { transform: scale(1.1); }

.project-id {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    margin-right: 56px;
    margin-top: 4px;
}

.project-tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--accent-secondary);
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.project-tag::before { content: '> '; opacity: 0.6; }

.project-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 6px 0 8px;
    letter-spacing: -0.02em;
    transition: color 0.3s ease;
}

.project-card:hover .project-title { color: var(--accent-primary); }

.project-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.project-tech,
.service-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.project-tech span,
.service-features span {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 5px 10px;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.project-card:hover .project-tech span,
.service-card:hover .service-features span {
    border-color: var(--border-strong);
    color: var(--accent-primary);
}

.project-link,
.repo-link {
    position: absolute !important;
    top: 26px;
    right: 26px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-secondary);
    background: var(--bg-glass);
    z-index: 4 !important;
    transition: all 0.35s var(--ease-out);
}

.project-link svg,
.repo-link svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    transition: transform 0.3s ease;
}

.project-card:hover .project-link,
.repo-card:hover .repo-link {
    color: var(--bg-primary);
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    box-shadow: 0 0 18px var(--accent-glow);
}

.project-link:hover svg,
.repo-link:hover svg { transform: translate(2px, -2px); }

/* ─────────────────────────────────────────────────────────────────
   About
   ───────────────────────────────────────────────────────────────── */
.about {
    padding: 130px 0;
    background: linear-gradient(to bottom, transparent, var(--bg-secondary) 15%, var(--bg-secondary) 85%, transparent);
    position: relative;
    z-index: 2;
}

.about-grid {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 70px;
    align-items: start;
}

.about-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin: 22px 0;
    line-height: 1.8;
}

.highlight-text {
    color: var(--text-primary);
    font-weight: 600;
    background: linear-gradient(to top, var(--accent-soft) 40%, transparent 40%);
    padding: 0 2px;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 36px;
}

.skill-item {
    padding: 18px 20px;
}

.skill-item:hover { border-color: var(--border-strong); }

.skill-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 12px;
}

.skill-name {
    font-size: 0.92rem;
    font-weight: 500;
}

.skill-value {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--accent-primary);
}

.skill-bar {
    width: 100%;
    height: 8px;
    background: var(--accent-soft);
    -webkit-mask: repeating-linear-gradient(90deg, #000 0 5px, transparent 5px 7px);
            mask: repeating-linear-gradient(90deg, #000 0 5px, transparent 5px 7px);
}

.skill-progress {
    height: 100%;
    width: 0;
    background: var(--gradient-primary);
    transition: width 1.6s var(--ease-out);
}

.about-stats {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.stat-card {
    padding: 28px 30px;
    overflow: hidden;
}

.stat-key {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.stat-key::before { content: '$ '; color: var(--accent-secondary); }

.stat-number {
    font-family: var(--font-mono);
    font-size: 3.4rem;
    font-weight: 700;
    color: var(--accent-primary);
    text-shadow: 0 0 24px var(--accent-glow);
    line-height: 1;
    display: inline-block;
}

.stat-text {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-mono);
    font-size: 3.4rem;
    font-weight: 700;
    line-height: 1;
    color: var(--accent-secondary);
    text-shadow: 0 0 24px rgba(57, 255, 136, 0.35);
}

.stat-text::before {
    content: '';
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent-secondary);
    box-shadow: 0 0 14px var(--accent-secondary);
    animation: dotPulse 1.6s ease-in-out infinite;
}

.stat-number::after {
    content: '+';
    font-size: 0.55em;
    color: var(--accent-secondary);
    margin-left: 2px;
}

.stat-label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 10px;
    display: block;
}

/* ─────────────────────────────────────────────────────────────────
   GitHub Stats
   ───────────────────────────────────────────────────────────────── */
.github-stats {
    padding: 130px 0;
    position: relative;
    z-index: 2;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 70px;
}

.github-stat-card {
    padding: 28px 24px;
    text-align: left;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.stat-icon-wrapper {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.stat-svg {
    width: 20px;
    height: 20px;
    color: var(--accent-primary);
}

.github-stat-card:hover .stat-icon-wrapper {
    border-color: var(--accent-primary);
    box-shadow: 0 0 16px var(--accent-soft);
}

.stat-value {
    font-family: var(--font-mono);
    font-size: 2.6rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    min-height: 44px;
    display: flex;
    align-items: center;
}

.github-stat-card:hover .stat-value { color: var(--accent-primary); }

.loading-spinner {
    display: inline-block;
    width: 22px;
    height: 22px;
    border: 2px solid var(--border);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spinner 0.7s linear infinite;
}

.loading-spinner.large { width: 38px; height: 38px; }

@keyframes spinner { to { transform: rotate(360deg); } }

.top-repos { margin-top: 20px; }

.repos-title {
    font-family: var(--font-mono);
    font-size: 1.05rem;
    font-weight: 500;
    margin-bottom: 26px;
    color: var(--text-secondary);
}

.repos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 18px;
}

.loading-repos {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 50px 20px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.repo-card {
    padding: 24px 26px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.repo-card > *:not(.card-shine):not(.card-corners) { position: relative; z-index: 1; }

.repo-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-right: 50px;
}

.repo-icon {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.repo-card:hover .repo-icon { color: var(--accent-primary); }

.repo-name {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    word-break: break-word;
    transition: color 0.3s ease;
}

.repo-card:hover .repo-name { color: var(--accent-primary); }

.repo-description {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
    min-height: 40px;
}

.repo-stats {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: auto;
}

.repo-stat { display: flex; align-items: center; gap: 5px; }
.repo-stat svg { width: 14px; height: 14px; }

.repo-language { display: inline-flex; align-items: center; gap: 6px; color: var(--text-secondary); }

.language-dot {
    width: 9px;
    height: 9px;
    border-radius: 2px;
    background: var(--accent-primary);
}

.repo-link { top: 20px; right: 20px; width: 36px; height: 36px; }

.github-error {
    text-align: center;
    padding: 40px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-secondary);
    grid-column: 1 / -1;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
}

.github-error svg {
    width: 44px;
    height: 44px;
    color: var(--accent-tertiary);
    margin-bottom: 16px;
}

/* ─────────────────────────────────────────────────────────────────
   Services
   ───────────────────────────────────────────────────────────────── */
.services {
    padding: 130px 0;
    position: relative;
    z-index: 2;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.service-card {
    padding: 44px 32px 36px;
    overflow: hidden;
}

.service-card > *:not(.card-shine):not(.card-corners) { position: relative; z-index: 1; }

.service-number {
    position: absolute !important;
    top: 18px;
    right: 22px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.service-icon {
    width: 54px;
    height: 54px;
    margin-bottom: 26px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--accent-soft);
    transition: all 0.4s var(--ease-out);
}

.service-icon svg {
    width: 26px;
    height: 26px;
    stroke: var(--accent-primary);
}

.service-card:hover .service-icon {
    border-color: var(--accent-primary);
    box-shadow: 0 0 22px var(--accent-soft), inset 0 0 14px var(--accent-soft);
}

.service-card h3 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 12px;
    transition: color 0.3s ease;
}

.service-card:hover h3 { color: var(--accent-primary); }

.service-card p {
    font-size: 0.93rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 22px;
}

/* ─────────────────────────────────────────────────────────────────
   Contact
   ───────────────────────────────────────────────────────────────── */
.contact {
    padding: 140px 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    position: relative;
    z-index: 2;
    overflow: hidden;
}

.contact-bg-effects {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.contact-gradient {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 900px;
    height: 900px;
    translate: -50% -50%;
    background: radial-gradient(circle, var(--accent-soft) 0%, transparent 60%);
}

.radar {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 760px;
    height: 760px;
    translate: -50% -50%;
    border-radius: 50%;
    opacity: 0.5;
    background:
        radial-gradient(circle, transparent 24.6%, var(--border) 25%, transparent 25.4%),
        radial-gradient(circle, transparent 49.6%, var(--border) 50%, transparent 50.4%),
        radial-gradient(circle, transparent 74.6%, var(--border) 75%, transparent 75.4%),
        linear-gradient(var(--border), var(--border)) center / 100% 1px no-repeat,
        linear-gradient(var(--border), var(--border)) center / 1px 100% no-repeat;
    border: 1px solid var(--border);
    overflow: hidden;
}

.radar-sweep {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(from 0deg, transparent 0deg, transparent 300deg, var(--accent-glow) 360deg);
    animation: radarSpin 5s linear infinite;
    opacity: 0.6;
}

@keyframes radarSpin { to { transform: rotate(360deg); } }

.contact-content {
    position: relative;
    max-width: 680px;
    margin: 0 auto;
    text-align: center;
    z-index: 1;
}

.contact-header { margin-bottom: 46px; }

.contact-title { margin: 14px 0 18px; }

.contact-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 24px;
    text-align: left;
    overflow: hidden;
}

.contact-link > *:not(.card-shine) { position: relative; z-index: 1; }

.contact-link-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 4px;
    flex-shrink: 0;
    transition: all 0.35s var(--ease-out);
}

.contact-link-icon svg {
    width: 22px;
    height: 22px;
    stroke: var(--accent-primary);
    fill: none;
}

.contact-link-icon svg[fill="currentColor"] {
    fill: var(--accent-primary);
    stroke: none;
}

.contact-link:hover .contact-link-icon {
    border-color: var(--accent-primary);
    box-shadow: 0 0 18px var(--accent-soft);
}

.contact-link-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.contact-link-label {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.16em;
}

.contact-link-value {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.contact-link:hover .contact-link-value { color: var(--accent-primary); }

.contact-link-arrow {
    opacity: 0.3;
    transform: translateX(-8px);
    transition: all 0.4s var(--ease-out);
}

.contact-link-arrow svg {
    width: 22px;
    height: 22px;
    stroke: var(--accent-primary);
}

.contact-link:hover .contact-link-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* ─────────────────────────────────────────────────────────────────
   Footer
   ───────────────────────────────────────────────────────────────── */
.footer {
    padding: 34px 0 40px;
    background: var(--bg-primary);
    border-top: 1px solid var(--border);
    position: relative;
    z-index: 2;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.footer-copy,
.footer-love {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ─────────────────────────────────────────────────────────────────
   Scroll Reveal (Scan-In)
   ───────────────────────────────────────────────────────────────── */
/* Hinweis: kein clip-path im Startzustand – ein komplett weggeclipptes
   Element meldet der IntersectionObserver nie als sichtbar. */
.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition:
        transform 0.8s var(--ease-out),
        border-color 0.3s ease,
        box-shadow 0.4s ease,
        background 0.3s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
    animation: revealFlicker 0.6s steps(1) backwards;
}

/* Kurzes "Einschalt-Flackern" wie ein Monitor */
@keyframes revealFlicker {
    0%   { opacity: 0; }
    15%  { opacity: 0.7; }
    30%  { opacity: 0.15; }
    45%  { opacity: 0.9; }
    60%  { opacity: 0.4; }
    75%  { opacity: 1; }
}

/* ─────────────────────────────────────────────────────────────────
   Skip Link & Focus
   ───────────────────────────────────────────────────────────────── */
.skip-link {
    position: fixed;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-primary);
    color: var(--bg-primary);
    font-family: var(--font-mono);
    padding: 10px 20px;
    font-weight: 700;
    z-index: 10001;
    transition: top 0.3s ease;
}

.skip-link:focus { top: 0; }

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 3px;
}

/* ─────────────────────────────────────────────────────────────────
   Theme Toggle
   ───────────────────────────────────────────────────────────────── */
.theme-toggle {
    position: fixed;
    bottom: 26px;
    right: 30px;
    width: 46px;
    height: 46px;
    border-radius: 4px;
    background: var(--bg-glass);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--border);
    color: var(--accent-primary);
    z-index: 1000;
    display: grid;
    place-items: center;
    transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s var(--ease-out);
}

.theme-toggle:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 0 20px var(--accent-soft);
}

.theme-toggle-icon {
    position: relative;
    width: 20px;
    height: 20px;
}

.theme-toggle .sun,
.theme-toggle .moon {
    position: absolute;
    inset: 0;
    width: 20px;
    height: 20px;
    transition: opacity 0.3s, transform 0.4s var(--ease-out);
}

.theme-toggle .sun { opacity: 1; transform: none; }
.theme-toggle .moon { opacity: 0; transform: rotate(-90deg) scale(0.5); }
[data-theme="dark"] .theme-toggle .sun { opacity: 0; transform: rotate(90deg) scale(0.5); }
[data-theme="dark"] .theme-toggle .moon { opacity: 1; transform: none; }

body.theme-transition,
body.theme-transition *:not(.reveal):not(.word) {
    transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease !important;
}

/* ─────────────────────────────────────────────────────────────────
   Mobile Hamburger
   ───────────────────────────────────────────────────────────────── */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 38px;
    height: 38px;
    background: transparent;
    border: none;
    padding: 8px;
    z-index: 102;
    cursor: pointer;
}

.hamburger-line {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--accent-primary);
    transition: all 0.3s var(--ease-out);
}

.nav-toggle.active .hamburger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active .hamburger-line:nth-child(2) { opacity: 0; }
.nav-toggle.active .hamburger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─────────────────────────────────────────────────────────────────
   Responsive
   ───────────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .hero-inner { grid-template-columns: 1fr; gap: 50px; }
    .terminal { transform: none; max-width: 620px; width: 100%; }
    .featured-card { grid-template-columns: 1fr; gap: 34px; }
    .about-grid { grid-template-columns: 1fr; gap: 50px; }
    .about-stats { flex-direction: row; flex-wrap: wrap; }
    .stat-card { flex: 1; min-width: 170px; }
    .services-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    body { cursor: auto; }
    a, button { cursor: pointer; }
    .cursor-main, .cursor-follower, .hud { display: none; }

    .nav {
        top: 14px;
        right: 14px;
        padding: 6px;
        gap: 8px;
        /* backdrop-filter würde das fixed Drawer-Menü an die Nav binden */
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: var(--bg-primary);
    }
    .nav-logo { top: 22px; left: 18px; font-size: 0.95rem; }
    .nav-logo .logo-badge { display: none; }
    .nav-toggle { display: flex; }

    .nav-menu {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: -100%;
        width: min(300px, 85vw);
        height: 100vh;
        height: 100dvh;
        background: var(--bg-primary);
        border-left: 1px solid var(--border);
        padding: 100px 30px 30px;
        gap: 6px;
        transition: right 0.45s var(--ease-snap);
        box-shadow: -20px 0 40px rgba(0, 0, 0, 0.35);
    }

    .nav-menu.active { right: 0; }

    .nav-menu .nav-link {
        font-size: 1.05rem;
        padding: 14px 0;
        border-bottom: 1px solid var(--border);
    }

    .nav-cta { padding: 8px 14px; font-size: 0.75rem; }

    .hero { padding: 110px 18px 110px; }
    .hero-badge { font-size: 0.65rem; max-width: 100%; }
    .hero-title { font-size: clamp(2.6rem, 13vw, 4rem); }
    .terminal-body { min-height: 300px; font-size: 0.72rem; padding: 14px; }
    .terminal-status { display: none; }

    .section-container { padding: 0 18px; }
    .work, .about, .github-stats, .services { padding: 90px 0; }
    .contact { padding: 100px 0; }
    .projects { grid-template-columns: 1fr; }
    .featured-card { padding: 26px 20px; }
    .stat-text { font-size: 2.6rem; }
    .skills-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .github-stat-card { padding: 20px 16px; }
    .stat-value { font-size: 2rem; }
    .repos-grid { grid-template-columns: 1fr; }
    .radar { width: 520px; height: 520px; }
    .footer-content { flex-direction: column; gap: 12px; text-align: center; }
    .theme-toggle { bottom: 18px; right: 18px; }
}

@media (max-width: 420px) {
    .stats-grid { grid-template-columns: 1fr; }
    .hero-cta { padding: 13px 20px; }
}

/* ─────────────────────────────────────────────────────────────────
   Interaktives Terminal
   ───────────────────────────────────────────────────────────────── */
.terminal .terminal-body {
    max-height: 440px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 229, 255, 0.3) transparent;
}

.terminal.interactive { cursor: text; }

.terminal.focused {
    border-color: rgba(0, 229, 255, 0.55);
    box-shadow: var(--shadow-strong), 0 0 0 1px rgba(0, 229, 255, 0.25), 0 0 60px rgba(0, 229, 255, 0.15);
}

.terminal:not(.focused) .terminal-body .t-line:last-child .caret { opacity: 0.35; animation: none; }

.terminal-body a {
    color: #00e5ff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.terminal-body b { color: #e6f1ff; }

.terminal-input {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 1px;
    height: 1px;
    opacity: 0;
    border: 0;
    padding: 0;
    font-size: 16px; /* verhindert Zoom auf iOS */
    pointer-events: none;
}

/* ─────────────────────────────────────────────────────────────────
   GitHub Activity Log
   ───────────────────────────────────────────────────────────────── */
.activity { margin-top: 70px; }

.activity-log {
    background: var(--bg-terminal);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: #c9d6e8;
    overflow: hidden;
}

.activity-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(0, 229, 255, 0.1);
    font-size: 0.68rem;
    color: #56657d;
    letter-spacing: 0.06em;
}

.activity-list {
    list-style: none;
    padding: 10px 0;
}

.activity-list li {
    display: flex;
    align-items: baseline;
    gap: 14px;
    padding: 7px 16px;
    animation: logIn 0.5s var(--ease-out) backwards;
}

.activity-list li:hover { background: rgba(0, 229, 255, 0.04); }

@keyframes logIn {
    from { opacity: 0; transform: translateX(-12px); }
}

.activity-time { color: #56657d; white-space: nowrap; }

.activity-tag {
    min-width: 68px;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #00e5ff;
}

.activity-tag.tag-push,
.activity-tag.tag-update { color: #39ff88; }
.activity-tag.tag-create,
.activity-tag.tag-release { color: #ff9e64; }
.activity-tag.tag-star { color: #febc2e; }
.activity-tag.tag-delete { color: #ff5f57; }
.activity-tag.tag-pr,
.activity-tag.tag-issue,
.activity-tag.tag-comment { color: #ff2bd6; }

.activity-text { flex: 1; min-width: 0; word-break: break-word; }
.activity-text a { color: #e6f1ff; }
.activity-text a:hover { color: #00e5ff; text-decoration: underline; }
.activity-text b { color: #00e5ff; font-weight: 500; }

.activity-empty {
    color: #56657d;
    animation: none !important;
}

/* ─────────────────────────────────────────────────────────────────
   Command Palette
   ───────────────────────────────────────────────────────────────── */
kbd {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    padding: 2px 6px;
    border: 1px solid var(--border);
    border-bottom-width: 2px;
    border-radius: 3px;
    color: var(--text-secondary);
    background: var(--bg-glass);
}

.palette-btn {
    position: fixed;
    bottom: 26px;
    right: 86px;
    height: 46px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--bg-glass);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--border);
    border-radius: 4px;
    z-index: 1000;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.palette-btn:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 0 20px var(--accent-soft);
}

.palette {
    position: fixed;
    inset: 0;
    z-index: 9500;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 14vh 16px 16px;
}

.palette[hidden] { display: none; }

.palette-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 4, 8, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.palette-box {
    position: relative;
    width: min(580px, 100%);
    background: var(--bg-primary);
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    box-shadow: var(--shadow-strong), 0 0 50px rgba(0, 229, 255, 0.12);
    overflow: hidden;
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
    transition: opacity 0.2s ease, transform 0.25s var(--ease-out);
}

.palette.open .palette-backdrop { opacity: 1; }
.palette.open .palette-box { opacity: 1; transform: none; }

.palette-search {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
}

.palette-search input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: 0;
    outline: 0;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.95rem;
    cursor: text;
}

.palette-search input::placeholder { color: var(--text-muted); }

.palette-list {
    list-style: none;
    max-height: 340px;
    overflow-y: auto;
    padding: 8px;
}

.palette-group {
    padding: 10px 10px 4px;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.palette-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 4px;
    font-size: 0.92rem;
    color: var(--text-secondary);
    border-left: 2px solid transparent;
}

.palette-item.active {
    background: var(--accent-soft);
    color: var(--text-primary);
    border-left-color: var(--accent-primary);
}

.palette-hint {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--accent-primary);
    opacity: 0.8;
}

.palette-empty {
    padding: 18px 12px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.palette-foot {
    display: flex;
    gap: 18px;
    padding: 10px 18px;
    border-top: 1px solid var(--border);
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-muted);
}

.palette-foot kbd { margin-right: 3px; }

/* ─────────────────────────────────────────────────────────────────
   Toast & Matrix
   ───────────────────────────────────────────────────────────────── */
.toast {
    position: fixed;
    left: 50%;
    bottom: 30px;
    z-index: 9600;
    padding: 12px 18px;
    background: var(--bg-primary);
    border: 1px solid var(--border-strong);
    border-radius: 4px;
    box-shadow: var(--shadow-strong), 0 0 30px var(--accent-soft);
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--text-primary);
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, 20px);
    transition: opacity 0.3s ease, transform 0.35s var(--ease-out);
}

.toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

.matrix {
    position: fixed;
    inset: 0;
    z-index: 9800;
    background: #000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s;
}

.matrix.active {
    opacity: 0.92;
    visibility: visible;
}

@media (max-width: 768px) {
    .palette-btn { display: none; }
    .activity-list li { flex-wrap: wrap; gap: 4px 10px; }
    .activity-text { flex-basis: 100%; }
    .activity-bar span:last-child { display: none; }
    .terminal .terminal-body { max-height: 380px; }
}

/* ─────────────────────────────────────────────────────────────────
   Reduced Motion
   ───────────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .loader, .net-canvas, .cursor-main, .cursor-follower, .terminal-scan { display: none !important; }
    .glitch::before, .glitch::after { display: none; }
    body { cursor: auto; }
    a, button { cursor: pointer; }
}

/* Footer-Link (Impressum) */
.footer-link {
    color: var(--text-secondary);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: var(--border-strong);
    transition: color 0.2s;
}

.footer-link:hover { color: var(--accent-primary); }
