/* ===== Theme Enhancements: Background & Header ===== */

/* 1. Layered Background System */
body {
    position: relative;
    /* Ensure body doesn't scroll with fixed background if needed, 
     but usually pattern scrolls or is fixed. Let's make it fixed for premium feel. */
}

/* Base Gradient Layer (Fixed) */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background:
        radial-gradient(circle at 15% 50%, rgba(255, 107, 53, 0.08) 0%, transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(0, 217, 163, 0.08) 0%, transparent 25%),
        radial-gradient(circle at 50% 50%, rgba(13, 13, 13, 1) 100%);
    pointer-events: none;
}

/* Dot Pattern Overlay (Fixed) */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
    pointer-events: none;
}


/* 2. Redesigned Header/Navbar */
/* 2. Quantum Command Bar (Header/Navbar) */
nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1100px;
    padding: 10px 40px;
    background: rgba(10, 15, 20, 0.85);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(0, 217, 163, 0.2);
    /* Tech border */
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Clip-path for "Tech Cut" corners */
    clip-path: polygon(20px 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%, 0 20px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Holographic animated border effect */
nav::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), var(--secondary), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.5;
    pointer-events: none;
    animation: holo-border-flow 4s linear infinite;
}

@keyframes holo-border-flow {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 200% 50%;
    }
}

/* Scanner Light Beam */
nav::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: skewX(-20deg);
    animation: scanner-sweep 6s infinite ease-in-out;
    pointer-events: none;
}

@keyframes scanner-sweep {

    0%,
    80% {
        left: -100%;
    }

    100% {
        left: 200%;
    }
}

nav:hover {
    transform: translateX(-50%) translateY(2px) scale(1.01);
    background: rgba(10, 15, 20, 0.95);
    border-color: var(--primary);
    box-shadow: 0 0 30px rgba(0, 217, 163, 0.15);
}

nav:hover::before {
    opacity: 1;
}

/* Logo Styling */
.logo {
    font-size: 1.6rem;
    font-weight: 800;
    text-decoration: none;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 1px;
    text-shadow: 0 0 20px rgba(255, 107, 53, 0.2);
}

.logo:hover {
    filter: drop-shadow(0 0 8px rgba(0, 217, 163, 0.5));
}

/* Navigation Links - Tech Tab Style */
.nav-links {
    display: flex;
    gap: 5px;
    /* Tighter gap for tabs */
    list-style: none;
    background: rgba(255, 255, 255, 0.03);
    padding: 5px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    position: relative;
    padding: 8px 18px;
    border-radius: 20px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 1;
    overflow: hidden;
}

/* Link Hover: Bracket Reveal & Glow */
.nav-links a::before {
    content: '[';
    position: absolute;
    left: 5px;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
    color: var(--primary);
}

.nav-links a::after {
    content: ']';
    position: absolute;
    right: 5px;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    color: var(--secondary);
}

.nav-links a:hover,
.nav-links a.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 15px rgba(0, 217, 163, 0.1);
}

.nav-links a:hover::before,
.nav-links a.active::before {
    opacity: 1;
    transform: translateX(0);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    opacity: 1;
    transform: translateX(0);
}

/* Header Cat (Hanging) */
.header-cat {
    position: fixed;
    top: 90px;
    /* Hanging below nav */
    right: 14%;
    /* Moved to Right Side */
    width: 60px;
    height: 100px;
    z-index: 1010;
    pointer-events: none;
    transform-origin: top center;
    animation: cat-swing 3s ease-in-out infinite;
}

.cat-body {
    width: 50px;
    height: 70px;
    background: #1a1a1a;
    border-radius: 25px;
    position: relative;
    border: 2px solid rgba(255, 107, 53, 0.3);
    /* Coral border */
}

.cat-head {
    width: 40px;
    height: 35px;
    background: #1a1a1a;
    border-radius: 20px;
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    border: 2px solid rgba(255, 107, 53, 0.3);
    z-index: 2;
}

.cat-ear {
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 12px solid var(--primary);
    position: absolute;
    top: -8px;
}

.cat-ear.left {
    left: 2px;
    transform: rotate(-15deg);
}

.cat-ear.right {
    right: 2px;
    transform: rotate(15deg);
}

.cat-eye {
    width: 8px;
    height: 8px;
    background: var(--secondary);
    border-radius: 50%;
    position: absolute;
    top: 10px;
    box-shadow: 0 0 10px var(--secondary);
    animation: cat-blink 4s infinite;
}

.cat-eye.left {
    left: 8px;
}

.cat-eye.right {
    right: 8px;
}

.cat-paw {
    width: 12px;
    height: 20px;
    background: #fbfcfa;
    border-radius: 10px;
    position: absolute;
    top: -10px;
    z-index: 0;
}

.cat-paw.left {
    left: 5px;
}

.cat-paw.right {
    right: 5px;
}

.cat-tail {
    width: 8px;
    height: 40px;
    background: #1a1a1a;
    border: 2px solid rgba(255, 107, 53, 0.3);
    border-radius: 4px;
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform-origin: top center;
    animation: tail-wag 2s ease-in-out infinite alternate;
}

@keyframes cat-swing {

    0%,
    100% {
        transform: rotate(3deg);
    }

    50% {
        transform: rotate(-3deg);
    }
}

@keyframes tail-wag {
    0% {
        transform: translateX(-50%) rotate(15deg);
    }

    100% {
        transform: translateX(-50%) rotate(-15deg);
    }
}

@keyframes cat-blink {

    0%,
    48%,
    52%,
    100% {
        transform: scaleY(1);
    }

    50% {
        transform: scaleY(0.1);
    }
}

/* Mobile Toggle */
.menu-toggle {
    display: none;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
    nav {
        padding: 15px 20px;
        width: 95%;
        border-radius: 12px;
    }

    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(13, 13, 13, 0.95);
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: center;
        padding: 30px;
        gap: 20px;
        border-radius: 12px;
        margin-top: 10px;
        border: 1px solid rgba(255, 255, 255, 0.05);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease;
    }

    .nav-links.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}