/* ============================================
   MARADOX — New Design System
   Color Scheme: Neon Mint & Hot Magenta
   ============================================ */

/* ---- Variables ---- */
:root {
    --primary: #00ffb4;
    --secondary: #ff0080;
    --accent: #00c8ff;
    --accent2: #00ffb4;
    --dark: #020b0d;
    --dark2: #061614;
    --dark3: #0a201c;
    --card-bg: rgba(255, 255, 255, 0.03);
    --border: rgba(0, 255, 180, 0.25);
    --text-muted: rgba(255, 255, 255, 0.7);
    --gradient-main: linear-gradient(135deg, #00ffb4, #ff0080);
    --gradient-accent: linear-gradient(135deg, #00c8ff, #00ffb4);
    --glow-primary: 0 0 30px rgba(0, 255, 180, 0.4);
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
}

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

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
    background-color: var(--dark);
    color: #fff;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.7;
    overflow-x: hidden;
}

::selection { background: rgba(0, 255, 180, 0.4); color: #fff; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--dark); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

/* ---- Typography ---- */
.gradient-text {
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text-accent {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mono-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(0, 255, 180, 0.4);
    margin-bottom: 0.8rem;
}

/* ---- Navbar ---- */
.navbar-maradox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.2rem 0;
    transition: all 0.4s ease;
    background: transparent;
}

.navbar-maradox.scrolled {
    background: rgba(2, 11, 13, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 0.8rem 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

.navbar-brand-logo {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.brand-logo-img {
    height: 28px;
    width: auto;
}

.nav-link-custom {
    color: rgba(255, 255, 255, 0.6);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    padding: 0.4rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    transition: color 0.2s ease, background 0.2s ease;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.nav-link-custom .nav-slash {
    color: rgba(0, 255, 180, 0.35);
    transition: color 0.2s ease;
}

.nav-link-custom:hover {
    color: #fff;
    background: rgba(0, 255, 180, 0.08);
}

.nav-link-custom:hover .nav-slash {
    color: var(--primary);
}

.nav-link-custom.active {
    color: var(--primary);
}

.nav-link-custom.active .nav-slash {
    color: var(--primary);
}

.navbar-toggler-custom {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 0.3rem;
}

.navbar-toggler-custom span {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.navbar-toggler-custom.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.navbar-toggler-custom.active span:nth-child(2) {
    opacity: 0;
}

.navbar-toggler-custom.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

#mobileMenu {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.4s ease;
}

#mobileMenu.show {
    max-height: 400px;
}

.mobile-menu-inner {
    background: rgba(0, 20, 15, 0.95);
    border: 1px solid rgba(0, 255, 180, 0.2);
    border-radius: 10px;
    margin-top: 15px;
    overflow: hidden;
}

.mobile-terminal-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(0, 255, 180, 0.1);
}

.mobile-terminal-dots {
    display: flex;
    gap: 6px;
}

.mobile-terminal-dots .dot-red,
.mobile-terminal-dots .dot-yellow,
.mobile-terminal-dots .dot-green {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.mobile-terminal-dots .dot-red { background: #ff5f57; }
.mobile-terminal-dots .dot-yellow { background: #febc2e; }
.mobile-terminal-dots .dot-green { background: #28c840; }

.mobile-terminal-title {
    color: rgba(0, 255, 180, 0.4);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    margin-left: 6px;
}

.mobile-terminal-body {
    padding: 14px 16px;
    font-family: var(--font-mono);
}

.mobile-terminal-cmd {
    color: rgba(0, 255, 180, 0.5);
    font-size: 0.72rem;
    margin-bottom: 10px;
}

.mobile-nav-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 255, 180, 0.06);
    text-decoration: none;
    transition: background 0.2s ease;
}

.mobile-nav-item:last-of-type {
    border-bottom: none;
}

.mobile-nav-num {
    color: var(--primary);
    font-size: 0.72rem;
    width: 28px;
    flex-shrink: 0;
}

.mobile-nav-label {
    color: #fff;
    font-size: 0.88rem;
    flex: 1;
    min-width: 0;
    letter-spacing: 0.5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-nav-anchor {
    color: rgba(0, 255, 180, 0.25);
    font-size: 0.68rem;
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: auto;
}

.mobile-nav-item:active {
    background: rgba(0, 255, 180, 0.05);
}

.mobile-terminal-cursor {
    color: rgba(0, 255, 180, 0.4);
    font-size: 0.72rem;
    margin-top: 10px;
}

.blink-cursor {
    animation: cursor-blink 1s step-end infinite;
}

/* ---- Sections ---- */
.section-spacing {
    padding-top: 6rem;
    padding-bottom: 6rem;
}

.section-header {
    margin-bottom: 3rem;
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.15;
    margin-bottom: 0.75rem;
}

.section-title .dimmed {
    color: rgba(255, 255, 255, 0.45);
}

.section-subtitle {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.55);
    max-width: 500px;
    line-height: 1.7;
}

.section-subtitle.centered {
    margin-left: auto;
    margin-right: auto;
}

/* ---- Hero ---- */
#hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
}

.hero-gradient-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.hero-gradient-orb-1 {
    width: 600px;
    height: 600px;
    top: -10%;
    left: -5%;
    background: radial-gradient(circle, rgba(0, 255, 180, 0.15) 0%, transparent 70%);
}

.hero-gradient-orb-2 {
    width: 500px;
    height: 500px;
    bottom: -10%;
    right: -5%;
    background: radial-gradient(circle, rgba(255, 0, 128, 0.12) 0%, transparent 70%);
}

.hero-content {
    position: relative;
    z-index: 2;
    padding-top: 8rem;
    padding-bottom: 4rem;
}

.hero-breadcrumb {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: rgba(0, 255, 180, 0.4);
    letter-spacing: 0.25em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 900;
    line-height: 1.05;
    margin-bottom: 1.2rem;
}

.hero-ai-comment {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(0.9rem, 2vw, 1.2rem);
    color: var(--primary);
    margin-bottom: 1.2rem;
    min-height: 1.6em;
    text-shadow: 0 0 20px rgba(0, 255, 180, 0.3);
}
.hero-ai-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: var(--primary);
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: aiCursorBlink 0.6s step-end infinite;
}
@keyframes aiCursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.hero-subtitle {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.7;
    margin-bottom: 2rem;
    max-width: 440px;
}

.hero-actions {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

/* ---- Buttons ---- */
.btn-primary-custom {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: var(--dark);
    padding: 0.65rem 1.6rem;
    border-radius: 8px;
    font-weight: 800;
    font-size: 0.9rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 0 20px rgba(0, 255, 180, 0.3);
}

.btn-primary-custom:hover {
    color: var(--dark);
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(0, 255, 180, 0.5);
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid rgba(0, 255, 180, 0.25);
    color: rgba(0, 255, 180, 0.7);
    padding: 0.65rem 1.6rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.btn-ghost:hover {
    border-color: rgba(0, 255, 180, 0.5);
    color: #00ffb4;
    background: rgba(0, 255, 180, 0.04);
}

/* ---- Code Card ---- */
.code-card {
    background: rgba(0, 20, 15, 0.7);
    border: 1px solid rgba(0, 255, 180, 0.15);
    border-radius: 10px;
    padding: 1.2rem;
    font-family: var(--font-mono);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    margin-bottom: 1rem;
    /* Reserve space for 5 code lines so typewriter doesn't shift layout */
    min-height: 12rem;
    box-shadow: 0 0 30px rgba(0, 255, 180, 0.05);
}

.code-card-dots {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 0.8rem;
}

.code-card-dots span {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.code-card-dots span:nth-child(1) { background: #ff5f57; }
.code-card-dots span:nth-child(2) { background: #febc2e; }
.code-card-dots span:nth-child(3) { background: #28c840; }

.code-line {
    color: rgba(255, 255, 255, 0.3);
    line-height: 1.7;
    white-space: pre;
    font-size: 0.8rem;
}

.code-line .kw  { color: #ff0080; }
.code-line .fn  { color: #00c8ff; }
.code-line .cls { color: #00ffb4; }
.code-line .par { color: #ff0080; }
.code-line .str { color: #ffd866; }
.code-line .num { color: #ff9e64; }
.code-line .cmt { color: rgba(255,255,255,0.25); font-style: italic; }
.code-line .cmt { color: rgba(255, 255, 255, 0.15); }

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 20, 15, 0.6);
    border: 1px solid rgba(40, 200, 64, 0.35);
    border-radius: 6px;
    padding: 0.35rem 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.7);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #28c840;
    box-shadow: 0 0 6px rgba(40, 200, 64, 0.7);
    animation: blink 2s ease-in-out infinite;
}

/* ---- Kompetenz Cards ---- */
.kompetenz-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 0;
    height: 100%;
    transition: transform 0.25s ease, border-color 0.25s ease;
    overflow: hidden;
}

.kompetenz-card:hover {
    transform: translateY(-4px);
}

.kompetenz-card.purple {
    background: rgba(0, 255, 180, 0.03);
    border-color: rgba(0, 255, 180, 0.15);
}

.kompetenz-card.purple:hover {
    border-color: rgba(0, 255, 180, 0.4);
}

.kompetenz-card.cyan {
    background: rgba(255, 0, 128, 0.03);
    border-color: rgba(255, 0, 128, 0.15);
}

.kompetenz-card.cyan:hover {
    border-color: rgba(255, 0, 128, 0.4);
}

.kompetenz-card.green {
    background: rgba(0, 200, 255, 0.03);
    border-color: rgba(0, 200, 255, 0.15);
}

.kompetenz-card.green:hover {
    border-color: rgba(0, 200, 255, 0.4);
}

/* ---- Process Header ---- */
.process-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.2);
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.08em;
}

.process-pid {
    color: rgba(255, 255, 255, 0.3);
}

.process-status {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    font-size: 0.55rem;
}

.status-led {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #00ffb4;
    box-shadow: 0 0 6px rgba(0, 255, 180, 0.6);
    animation: led-blink 2s ease-in-out infinite;
}

.kompetenz-card.cyan .status-led {
    background: #ff0080;
    box-shadow: 0 0 6px rgba(255, 0, 128, 0.6);
}

.kompetenz-card.green .status-led {
    background: #00c8ff;
    box-shadow: 0 0 6px rgba(0, 200, 255, 0.6);
}

@keyframes led-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ---- Card Boot Terminal ---- */
.card-boot-terminal {
    padding: 1rem 1.2rem;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.2);
    line-height: 1.8;
    display: none;
    min-height: 200px;
}

.kompetenz-card.booting .card-boot-terminal {
    display: block;
}

.kompetenz-card.booting .card-body-inner {
    display: none;
}

.card-boot-terminal .boot-line {
    opacity: 0;
    transition: opacity 0.15s ease;
}

.card-boot-terminal .boot-line.visible {
    opacity: 1;
}

.card-boot-terminal .boot-ok {
    color: #00ffb4;
}

.kompetenz-card.cyan .card-boot-terminal .boot-ok {
    color: #ff0080;
}

.kompetenz-card.green .card-boot-terminal .boot-ok {
    color: #00c8ff;
}

/* ---- Card Body Inner ---- */
.card-body-inner {
    padding: 1.2rem 1.2rem 1.4rem;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.kompetenz-card.booted .card-body-inner {
    opacity: 1;
}

/* ---- Card Metrics ---- */
.card-metrics {
    margin-bottom: 0.7rem;
}

.metric-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
    font-family: var(--font-mono);
    font-size: 0.58rem;
}

.metric-label {
    color: rgba(255, 255, 255, 0.25);
    min-width: 2.5rem;
    text-transform: uppercase;
}

.metric-bar {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    overflow: hidden;
}

.metric-fill {
    height: 100%;
    width: 0%;
    border-radius: 2px;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.kompetenz-card.purple .metric-fill { background: #00ffb4; box-shadow: 0 0 6px rgba(0, 255, 180, 0.4); }
.kompetenz-card.cyan .metric-fill   { background: #ff0080; box-shadow: 0 0 6px rgba(255, 0, 128, 0.4); }
.kompetenz-card.green .metric-fill  { background: #00c8ff; box-shadow: 0 0 6px rgba(0, 200, 255, 0.4); }

.metric-val {
    color: rgba(255, 255, 255, 0.35);
    min-width: 2.2rem;
    text-align: right;
}

/* ---- Sparkline ---- */
.card-sparkline {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    margin-bottom: 0.4rem;
    line-height: 1;
}

.kompetenz-card.purple .card-sparkline { color: rgba(0, 255, 180, 0.35); }
.kompetenz-card.cyan .card-sparkline   { color: rgba(255, 0, 128, 0.35); }
.kompetenz-card.green .card-sparkline  { color: rgba(0, 200, 255, 0.35); }

/* ---- Uptime ---- */
.card-uptime {
    font-family: var(--font-mono);
    font-size: 0.58rem;
    color: rgba(255, 255, 255, 0.2);
    margin-bottom: 0.9rem;
}

.uptime-clock {
    color: rgba(255, 255, 255, 0.35);
}

/* ---- Card Tags ---- */
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.kompetenz-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.6rem;
}

.kompetenz-desc {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    line-height: 1.6;
    margin-bottom: 0.8rem;
}

/* ---- Circuit SVG ---- */
.circuit-svg {
    position: absolute;
    top: -2rem;
    left: -2rem;
    width: calc(100% + 4rem);
    height: calc(100% + 4rem);
    pointer-events: none;
    z-index: 0;
    overflow: visible;
}

#processRow {
    position: relative;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

#processRow > .col-md-4 {
    position: relative;
    z-index: 1;
}

.tech-tag {
    display: inline-block;
    font-size: 0.62rem;
    font-family: var(--font-mono);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.5);
    margin: 0.2rem 0.2rem 0.2rem 0;
}

@media (max-width: 767.98px) {
    /* More breathing room on mobile */
    .container {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .hero-content {
        padding-top: 4rem;
        padding-bottom: 2rem;
    }

    .section-spacing {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    /* Stacked cards on mobile */
    .row.kompetenz-scroll {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .row.kompetenz-scroll > * {
        max-width: 100%;
        width: 100%;
        padding: 0;
    }
}

/* ---- Terminal ---- */
.terminal {
    background: #010a08;
    border: 1px solid rgba(0, 255, 180, 0.15);
    border-radius: 12px;
    overflow: hidden;
}

/* Terminal wrapper: fade in only, no translateY shift */
.reveal:has(.terminal) {
    transform: none;
}

.reveal:has(.terminal).visible {
    transform: none;
}

.terminal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
}

.terminal-dots {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.terminal-dots span {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.terminal-dots span:nth-child(1) { background: #ff5f57; }
.terminal-dots span:nth-child(2) { background: #febc2e; }
.terminal-dots span:nth-child(3) { background: #28c840; }

.terminal-title {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.2);
    letter-spacing: 0.08em;
}

.terminal-status {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: #28c840;
    letter-spacing: 0.08em;
}

.terminal-body {
    padding: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    line-height: 1.9;
    overflow-x: auto;
}

.terminal-prompt {
    color: rgba(0, 255, 180, 0.4);
}

.terminal-cmd {
    color: #00ffb4;
}

.terminal-output {
    color: rgba(255, 255, 255, 0.5);
    margin: 0.5rem 0 0.5rem 1rem;
}

.tree-branch      { color: #00ffb4; }
.tree-branch-warn { color: #ff0080; }
.tree-label       { color: #fff; }
.box-cyan         { color: #00c8ff; }
.box-purple       { color: #00ffb4; }
.box-pink         { color: #ff0080; }

.terminal-cursor {
    display: inline-block;
    width: 2px;
    height: 1.2em;
    background: #00ffb4;
    vertical-align: text-bottom;
    animation: blink 1s step-end infinite;
}

.terminal-line {
    opacity: 0;
    transition: opacity 0.15s ease;
}

.terminal-line.visible {
    opacity: 1;
}

.terminal-static .terminal-line {
    opacity: 1;
}

/* ---- Man Page Style ---- */
.manpage-content {
    margin: 0;
    padding: 0;
}

.man-header {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.2);
    text-align: center;
    margin-bottom: 1.5rem;
    letter-spacing: 0.05em;
}

.man-section {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    color: #00ffb4;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 1.5rem 0 0.5rem;
}

.man-body {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.9;
    margin-left: 1.5rem;
    margin-bottom: 0.3rem;
}

.man-body.man-dim {
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.6rem;
}

.man-flag {
    color: rgba(0, 200, 255, 0.6);
}

.manpage .terminal-output {
    margin: 0;
    padding: 0;
}

@media (max-width: 767.98px) {
    .terminal-body {
        font-size: 0.62rem;
        padding: 1rem;
    }

    /* Prevent iOS auto-zoom on input focus (requires >= 16px) */
    input, textarea, select {
        font-size: 16px !important;
    }
}

/* ---- Contact ---- */
/* ---- Contact Terminal ---- */
.contact-terminal {
    background: #010a08;
    border: 1px solid rgba(0, 255, 180, 0.12);
    border-radius: 12px;
    max-width: 560px;
    margin: 0 auto;
    overflow: hidden;
}

.contact-terminal-body {
    padding: 1.2rem 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.3);
    min-height: 250px;
    max-height: 400px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,255,180,0.15) transparent;
}

.contact-terminal-body .ct-line {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.contact-terminal-body .ct-line.visible {
    opacity: 1;
}

.contact-terminal-body .ct-prompt {
    color: rgba(0, 255, 180, 0.5);
}

.contact-terminal-body .ct-cmd {
    color: #00ffb4;
}

.contact-terminal-body .ct-ok {
    color: #00ffb4;
}

.contact-terminal-body .ct-warn {
    color: #ff0080;
}

.contact-terminal-body .ct-key {
    color: rgba(255, 255, 255, 0.15);
    font-size: 0.6rem;
    letter-spacing: 0.05em;
}

.contact-email-line {
    margin: 0.6rem 0;
}

.contact-email-line a {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease, text-shadow 0.2s ease;
    text-shadow: 0 0 10px rgba(0, 255, 180, 0.3);
}

.contact-email-line a:hover {
    color: #66ffd0;
    text-shadow: 0 0 20px rgba(0, 255, 180, 0.5);
}

.contact-coords {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.2);
    letter-spacing: 0.08em;
}

.contact-terminal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding: 0.5rem 1.5rem;
    background: rgba(0, 0, 0, 0.2);
}

.contact-meta {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.contact-meta-item {
    font-family: var(--font-mono);
    font-size: 0.55rem;
    color: rgba(255, 255, 255, 0.2);
    letter-spacing: 0.08em;
}

.meta-label {
    color: rgba(255, 255, 255, 0.1);
    margin-right: 0.3rem;
}

.contact-conn-status {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 0.05em;
}

.contact-conn-status.connected {
    color: #00ffb4;
}

/* Contact Idle Screen */
.contact-idle {
    display: flex;
    flex-direction: column;
}

.ct-idle-spacer {
    height: 0.8rem;
}

.ct-idle-link {
    color: var(--primary);
    text-decoration: none;
    transition: text-shadow 0.2s ease;
}

.ct-idle-link:hover {
    text-shadow: 0 0 8px rgba(0, 255, 180, 0.4);
    color: var(--primary);
}

.ct-idle-prompt {
    color: rgba(255, 255, 255, 0.35);
}

.ct-key-hint {
    color: var(--primary);
    border: 1px solid rgba(0, 255, 180, 0.3);
    border-radius: 3px;
    padding: 0.1rem 0.4rem;
    font-size: 0.68rem;
}

/* Idle connection status */
.contact-conn-status.ct-idle {
    color: rgba(255, 255, 255, 0.3);
}

/* ---- Contact Terminal Input ---- */
.ct-input-line {
    display: flex;
    align-items: center;
    gap: 0;
}

.ct-input-line .ct-prompt {
    flex-shrink: 0;
}

.ct-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: #fff;
    caret-color: #00ffb4;
    padding: 0;
    line-height: 1.9;
}

.ct-input::placeholder {
    color: rgba(255, 255, 255, 0.1);
}

.ct-input-textarea {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: #fff;
    caret-color: #00ffb4;
    padding: 0;
    line-height: 1.9;
    resize: none;
    height: 1.9em;
    overflow: hidden;
}

.ct-input-textarea::placeholder {
    color: rgba(255, 255, 255, 0.1);
}

.ct-user-answer {
    color: #fff;
}

.ct-sending {
    color: rgba(0, 255, 180, 0.5);
}

.ct-success {
    color: #00ffb4;
    text-shadow: 0 0 8px rgba(0, 255, 180, 0.4);
}

.ct-error {
    color: #ff0080;
    text-shadow: 0 0 8px rgba(255, 0, 128, 0.4);
}

/* ---- Ransom Note Letters ---- */
.ransom {
    display: inline;
}

.ransom-letter {
    display: inline-block;
    padding: 0.05em 0.12em;
    margin: 0 0.02em;
    border-radius: 2px;
    line-height: 1;
    vertical-align: baseline;
}

.ransom-letter.r1 {
    background: rgba(255, 0, 128, 0.15);
    border: 1px solid rgba(255, 0, 128, 0.3);
    color: #fff;
    font-family: 'Georgia', serif;
    font-size: 1.15em;
    transform: rotate(-4deg);
    font-weight: 900;
}

.ransom-letter.r2 {
    background: rgba(0, 255, 180, 0.12);
    border: 1px solid rgba(0, 255, 180, 0.25);
    color: #00ffb4;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    transform: rotate(3deg);
    font-weight: 400;
    text-transform: uppercase;
}

.ransom-letter.r3 {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    font-family: 'Times New Roman', serif;
    font-size: 1.05em;
    transform: rotate(-2deg) translateY(-1px);
    font-style: italic;
}

.ransom-letter.r4 {
    background: rgba(0, 200, 255, 0.12);
    border: 1px solid rgba(0, 200, 255, 0.25);
    color: #00c8ff;
    font-family: 'Arial Black', sans-serif;
    font-size: 0.85em;
    transform: rotate(5deg) translateY(1px);
    font-weight: 900;
}

.ransom-letter.r5 {
    background: rgba(255, 0, 128, 0.1);
    border: 1px solid rgba(255, 0, 128, 0.2);
    color: #ff0080;
    font-family: 'Georgia', serif;
    font-size: 1.1em;
    transform: rotate(-3deg);
    font-weight: 700;
}

.contact-location {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.25);
    margin-top: 0.6rem;
    font-family: var(--font-mono);
}

/* ---- Footer ---- */
.site-footer {
    border-top: 1px solid rgba(0, 255, 180, 0.15);
    padding: 2rem 0 1.5rem;
    margin-top: 4rem;
}

/* ---- Footer Stats Bar ---- */
.footer-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    justify-content: center;
}

.footer-stat {
    font-family: var(--font-mono);
    font-size: 0.58rem;
    color: rgba(255, 255, 255, 0.45);
    letter-spacing: 0.06em;
}

.footer-stat-label {
    color: rgba(255, 255, 255, 0.25);
    margin-right: 0.35rem;
}

.footer-hash {
    color: rgba(0, 255, 180, 0.3);
}

/* ---- Binary Clock ---- */
.footer-binary-clock {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
    font-family: var(--font-mono);
}

.binary-clock-label {
    font-size: 0.5rem;
    color: rgba(255, 255, 255, 0.1);
    letter-spacing: 0.1em;
}

.binary-clock-digits {
    font-size: 0.6rem;
    color: rgba(0, 255, 180, 0.25);
    letter-spacing: 0.12em;
    cursor: pointer;
    transition: color 0.2s ease, text-shadow 0.2s ease;
}

.binary-clock-digits:hover {
    color: rgba(0, 255, 180, 0.5);
    text-shadow: 0 0 8px rgba(0, 255, 180, 0.3);
}

.binary-clock-digits.decimal {
    color: rgba(255, 255, 255, 0.35);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    font-size: 0.8rem;
    font-family: var(--font-mono);
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--primary);
}

/* ---- Terminal Exit ---- */
.footer-terminal-exit {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    margin-bottom: 0.8rem;
    color: rgba(255, 255, 255, 0.15);
}

.footer-prompt {
    color: rgba(0, 255, 180, 0.3);
}

.footer-exit-cmd {
    color: rgba(255, 255, 255, 0.25);
}

.footer-cursor {
    color: rgba(0, 255, 180, 0.5);
    animation: cursor-blink 1s step-end infinite;
}

@keyframes cursor-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.footer-copyright {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.1);
    letter-spacing: 0.05em;
}

/* ---- Scroll Reveal ---- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.15s; }
.reveal-delay-2 { transition-delay: 0.3s; }

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

    .reveal {
        opacity: 1;
        transform: none;
    }

    .terminal-line {
        opacity: 1;
        transform: none;
    }
}

/* ---- Glitch Text (hero title, plays once on load) ---- */
.hero-title {
    animation: glitch-flash 2.5s 0.3s ease-out both;
}

@keyframes glitch-flash {
    0%   { opacity: 0; transform: none; text-shadow: none; }
    2%   { opacity: 1; }
    /* Wave 1 — heavy */
    5%   { text-shadow: -6px 0 #ff0080, 6px 0 #00ffb4; transform: skewX(-5deg) translateX(-4px); }
    7%   { text-shadow: 6px 0 #00c8ff, -6px 0 #ff0080; transform: skewX(4deg) translateX(4px); }
    9%   { text-shadow: none; transform: none; }
    10%  { opacity: 0.6; }
    11%  { opacity: 1; }
    /* Wave 2 — medium */
    18%  { text-shadow: -5px 0 #ff0080, 5px 0 #00ffb4; transform: skewX(-3deg) translateX(-3px); }
    20%  { text-shadow: 4px 0 #00ffb4, -3px 0 #ff0080; transform: skewX(2deg) translateX(2px); }
    22%  { text-shadow: none; transform: none; }
    24%  { opacity: 0.4; }
    25%  { opacity: 1; }
    /* Wave 3 — heavy burst */
    32%  { text-shadow: -8px 0 #ff0080, 8px 0 #00ffb4; transform: skewX(-6deg) translateX(-6px); }
    33%  { text-shadow: 7px 0 #00c8ff, -5px 0 #ff0080; transform: skewX(5deg) translateX(5px); }
    35%  { text-shadow: -3px 0 #ff0080, 3px 0 #00ffb4; transform: skewX(-2deg); }
    37%  { text-shadow: none; transform: none; }
    /* Wave 4 — settling */
    50%  { text-shadow: -3px 0 #ff0080, 3px 0 #00ffb4; transform: translateX(-2px); }
    52%  { text-shadow: 2px 0 #00c8ff, -2px 0 #ff0080; transform: translateX(2px); }
    54%  { text-shadow: none; transform: none; }
    /* Wave 5 — subtle flicker */
    70%  { text-shadow: -1px 0 #ff0080, 1px 0 #00c8ff; }
    72%  { text-shadow: none; }
    85%  { text-shadow: -1px 0 #ff0080, 1px 0 #00ffb4; opacity: 0.9; }
    87%  { text-shadow: none; opacity: 1; }
    100% { text-shadow: none; transform: none; opacity: 1; }
}

/* ---- Periodic Glitch Burst (after intro) ---- */
.hero-title.glitch-burst {
    animation: glitch-burst 0.4s ease-out !important;
}

@keyframes glitch-burst {
    0%, 100% { text-shadow: none; transform: none; }
    15% { text-shadow: -5px 0 #ff0080, 5px 0 #00ffb4; transform: skewX(-3deg) translateX(-3px); }
    30% { text-shadow: 4px 0 #00c8ff, -3px 0 #ff0080; transform: skewX(2deg) translateX(2px); }
    50% { text-shadow: -3px 0 #ff0080, 3px 0 #00ffb4; transform: skewX(-1deg); }
    70% { text-shadow: none; transform: none; opacity: 0.7; }
    85% { opacity: 1; }
}

/* ---- Binary Title (Kontakt) ---- */
.binary-title {
    font-family: var(--font-mono) !important;
    letter-spacing: 0.15em;
    color: var(--primary);
    text-shadow: 0 0 20px rgba(0, 255, 180, 0.3);
    font-size: clamp(1.4rem, 3.5vw, 2.4rem) !important;
}

.binary-title .bit-flip {
    color: var(--secondary);
    text-shadow: 0 0 10px rgba(255, 0, 128, 0.5);
}

/* ---- Animated Gradient Border (Kompetenz Cards) ---- */
@property --gradient-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

.kompetenz-card {
    position: relative;
}

.kompetenz-card::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 13px;
    padding: 1px;
    background: conic-gradient(from var(--gradient-angle), #00ffb4, #ff0080, #00c8ff, #00ffb4);
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    animation: rotate-border 3s linear infinite;
    pointer-events: none;
}

.kompetenz-card:hover::before {
    opacity: 1;
}

.kompetenz-card:hover {
    border-color: transparent;
}

/* ---- Parallax Orb 3 ---- */
.hero-gradient-orb-3 {
    width: 400px;
    height: 400px;
    top: 40%;
    left: 50%;
    background: radial-gradient(circle, rgba(0, 200, 255, 0.08) 0%, transparent 65%);
}

/* ---- Magnetic Buttons ---- */
.btn-primary-custom,
.btn-ghost {
    will-change: transform;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

/* ---- CRT Scanlines ---- */
.crt-scanlines {
    position: fixed;
    inset: 0;
    z-index: 9990;
    pointer-events: none;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0px,
        transparent 3px,
        rgba(0, 0, 0, 0.12) 3px,
        rgba(0, 0, 0, 0.12) 4px
    );
}

/* ---- Noise Overlay ---- */
.noise-overlay {
    position: fixed;
    inset: -50%;
    width: 200%;
    height: 200%;
    z-index: 9991;
    pointer-events: none;
    background-size: 150px 150px;
    opacity: 0.035;
    animation: noise-shift 0.15s steps(8) infinite;
}

@keyframes noise-shift {
    0%   { transform: translate(0, 0); }
    12%  { transform: translate(-5%, -10%); }
    25%  { transform: translate(10%, 5%); }
    37%  { transform: translate(-15%, -5%); }
    50%  { transform: translate(5%, 15%); }
    62%  { transform: translate(-10%, 10%); }
    75%  { transform: translate(15%, -10%); }
    87%  { transform: translate(-5%, 5%); }
    100% { transform: translate(0, 0); }
}

/* ---- Vignette ---- */
.vignette-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9989;
    pointer-events: none;
    background: radial-gradient(ellipse at center, transparent 45%, rgba(0, 0, 0, 0.65) 100%);
}

/* ---- Screen Tear ---- */
.screen-tear {
    position: fixed;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 9995;
    pointer-events: none;
    opacity: 0;
}

.screen-tear.active {
    opacity: 1;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(0, 255, 180, 0.25) 20%,
        rgba(255, 0, 128, 0.15) 50%,
        rgba(0, 200, 255, 0.2) 80%,
        transparent 100%
    );
    box-shadow: 0 0 8px rgba(0, 255, 180, 0.3), 0 -1px 0 rgba(255, 0, 128, 0.1), 0 1px 0 rgba(0, 200, 255, 0.1);
}

/* ---- Section Flicker ---- */
.flicker-active {
    animation: section-flicker 0.2s ease-out !important;
}

@keyframes section-flicker {
    0%   { opacity: 1; }
    15%  { opacity: 0.3; }
    30%  { opacity: 0.85; }
    45%  { opacity: 0.2; }
    60%  { opacity: 0.9; }
    75%  { opacity: 0.4; }
    100% { opacity: 1; }
}

/* ---- System Messages ---- */
.system-msg {
    position: fixed;
    z-index: 9996;
    font-family: var(--font-mono);
    font-size: 0.55rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
    white-space: nowrap;
}

.system-msg.visible {
    opacity: 1;
}

.system-msg.msg-mint {
    color: rgba(0, 255, 180, 0.35);
    text-shadow: 0 0 8px rgba(0, 255, 180, 0.2);
}

.system-msg.msg-magenta {
    color: rgba(255, 0, 128, 0.3);
    text-shadow: 0 0 8px rgba(255, 0, 128, 0.15);
}

.system-msg.msg-cyan {
    color: rgba(0, 200, 255, 0.3);
    text-shadow: 0 0 8px rgba(0, 200, 255, 0.15);
}

/* ---- White Rabbit Easter Egg ---- */
.white-rabbit {
    position: fixed;
    z-index: 9999;
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    line-height: 1.15;
    color: #00ffb4;
    opacity: 0;
    pointer-events: auto;
    cursor: pointer;
    text-shadow: 0 0 6px rgba(0, 255, 180, 0.6), 0 0 15px rgba(0, 255, 180, 0.3);
    margin: 0;
    padding: 0.5rem;
    white-space: pre;
    background: none;
    border: none;
    overflow: hidden;
    width: auto;
}

.white-rabbit.caught {
    animation: rabbit-glitch 0.15s steps(2) 6;
    color: #ff0080;
    text-shadow: 0 0 10px rgba(255, 0, 128, 0.8), 0 0 25px rgba(255, 0, 128, 0.4);
}

@keyframes rabbit-glitch {
    0% { transform: translate(0, 0) skewX(0); }
    25% { transform: translate(-3px, 2px) skewX(5deg); }
    50% { transform: translate(3px, -1px) skewX(-3deg); }
    75% { transform: translate(-2px, -2px) skewX(2deg); }
    100% { transform: translate(0, 0) skewX(0); }
}

.knock-cursor,
.knock-cursor * {
    cursor: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'><text y='28' font-size='28'>🤜</text></svg>") 16 16, pointer !important;
}

.knock-flash {
    position: fixed;
    z-index: 10001;
    font-family: var(--font-mono);
    font-weight: 900;
    color: var(--primary);
    text-shadow: 0 0 30px rgba(0, 255, 180, 0.6), 0 0 60px rgba(0, 255, 180, 0.3);
    letter-spacing: 0.15em;
    pointer-events: none;
    white-space: nowrap;
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.15s ease-out, transform 0.3s ease-out;
}

.rabbit-quote {
    position: fixed;
    z-index: 10000;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: rgba(0, 255, 180, 0);
    text-shadow: 0 0 12px rgba(0, 255, 180, 0.5);
    letter-spacing: 0.1em;
    pointer-events: none;
    white-space: nowrap;
    transition: color 0.4s ease, transform 0.4s ease;
    transform: translateY(0);
}

.rabbit-quote.visible {
    color: rgba(0, 255, 180, 0.7);
    transform: translateY(-10px);
}

.rabbit-quote.fade {
    color: rgba(0, 255, 180, 0);
    transform: translateY(-25px);
}

.rabbit-trail {
    position: fixed;
    z-index: 9998;
    width: 8rem;
    height: 2px;
    opacity: 0;
    pointer-events: none;
}

.rabbit-msg {
    position: fixed;
    z-index: 9999;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: rgba(0, 255, 180, 0);
    text-shadow: 0 0 10px rgba(0, 255, 180, 0.5);
    letter-spacing: 0.15em;
    transform: translateX(-50%);
    pointer-events: none;
    transition: color 0.4s ease;
    white-space: nowrap;
}

.rabbit-msg.visible {
    color: rgba(0, 255, 180, 0.5);
}

/* ---- Pulsing Glow ---- */
.brand-logo-img {
    animation: pulse-brand 4s ease-in-out infinite;
}

@keyframes pulse-brand {
    0%, 100% { filter: drop-shadow(0 0 8px rgba(0, 255, 180, 0.3)); }
    50% { filter: drop-shadow(0 0 16px rgba(0, 255, 180, 0.55)) drop-shadow(0 0 40px rgba(0, 255, 180, 0.12)); }
}

.btn-primary-custom {
    animation: pulse-btn 3s ease-in-out infinite;
}

@keyframes pulse-btn {
    0%, 100% { box-shadow: 0 0 20px rgba(0, 255, 180, 0.3); }
    50% { box-shadow: 0 0 35px rgba(0, 255, 180, 0.5), 0 0 60px rgba(0, 255, 180, 0.12); }
}

.status-badge {
    animation: pulse-badge 3.5s ease-in-out infinite;
}

@keyframes pulse-badge {
    0%, 100% { box-shadow: none; }
    50% { box-shadow: 0 0 12px rgba(40, 200, 64, 0.15); }
}

.terminal {
    animation: pulse-terminal 5s ease-in-out infinite;
}

@keyframes pulse-terminal {
    0%, 100% { box-shadow: none; }
    50% { box-shadow: 0 0 25px rgba(0, 255, 180, 0.06), inset 0 0 30px rgba(0, 255, 180, 0.02); }
}

/* ---- Keyframes ---- */
@keyframes blink {
    50% { opacity: 0; }
}

@keyframes rotate-border {
    to { --gradient-angle: 360deg; }
}
