

#navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 5%;
    background: rgba(10, 10, 10, 0.5); /*0.5 is transparency */
    backdrop-filter: blur(20px);
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid rgba(196, 255, 0, 0.1);
}

nav.scrolled {
    background: rgba(10, 10, 10, 0.95);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: var(--content-max-width);
    margin: 0 auto;
}



/* Logo Styling */
.logo {
    height: 3rem;
    font-size: 2rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    transition: all 0.4s ease;
    filter: none;
    flex-shrink: 0;
    margin-right: 0;
    padding-left: 0;
}

.logo-img {
    height: 100%;
    display: block;
    filter: none;
}

/* Desktop Links */
.nav-links {
    display: flex;
    list-style: none;
    gap: 3rem;
    margin-left: auto;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    padding: 0.5rem 1rem;
    border-radius: 25px;
}

.nav-links a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    /* Replaced var(--accent-gradient) with your specified linear-gradient */
    background: linear-gradient(rgb(160, 115, 238) -11.11%, rgb(110, 37, 237) 100%);

    border-radius: 25px;
    transform: scale(0);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.nav-links a:hover::before {
    transform: scale(1);
}

.nav-links a:hover {
    color: #ffffff;
    /* Text color changes */
    transform: translateY(-3px);
    box-shadow: var(--shadow-neon);

    /* ADDED: Gradient applied to the element's background box */
    background: linear-gradient(rgb(160, 115, 238) -11.11%, rgb(110, 37, 237) 100%);
}

/* -------------------------------------------------------
       MOBILE MENU STYLES 
       ------------------------------------------------------- */

/* Hamburger Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--accent-color);
    margin: 3px 0;
    transition: 0.3s ease-in-out;
    border-radius: 2px;
}

/* Hamburger menu animation */
.menu-toggle.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Mobile Menu Links Container */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    transform: translateY(-100%);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.active {
    transform: translateY(0);
}

.mobile-menu a {
    color: var(--text-primary);
    font-size: 2rem;
    font-weight: 700;
    text-decoration: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.active a {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu.active a:nth-child(1) {
    transition-delay: 0.2s;
}

.mobile-menu.active a:nth-child(2) {
    transition-delay: 0.3s;
}

.mobile-menu.active a:nth-child(3) {
    transition-delay: 0.4s;
}

.mobile-menu.active a:nth-child(4) {
    transition-delay: 0.5s;
}

.mobile-menu.active a:nth-child(5) {
    transition-delay: 0.6s;
}

.hamburger {
    display: none;
    cursor: pointer;
    z-index: 1001;
    position: relative;
    padding: 0.5rem;
}

.hamburger input {
    display: none;
}

.hamburger svg {
    height: 2.5rem;
    width: 2.5rem;
    display: block;
    transition: transform 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

.line {
    fill: none;
    stroke: #fff;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 3;
    transition: stroke-dasharray 600ms cubic-bezier(0.4, 0, 0.2, 1),
                stroke-dashoffset 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

.line-top-bottom {
    stroke-dasharray: 12 63;
}

.hamburger input:checked + svg {
    transform: rotate(-45deg);
}

.hamburger input:checked + svg .line-top-bottom {
    stroke-dasharray: 20 300;
    stroke-dashoffset: -32.42;
}


/* -------------------------------------------------------
       MOBILE RESPONSIVENESS AND SIZE REDUCTION 💥
       ------------------------------------------------------- */
@media (max-width: 768px) {

    /* 1. Reduce Navbar Height and Padding */
    #navbar {
        padding: 1rem 5%;
        /* Smaller vertical padding */
    }

    /* 2. Reduce Logo Size Proportional to the new navbar height */
    .logo {
        height: 2rem;
        /* Reduced from 3rem */
    }

    /* 4. Reduce Mobile Menu Item Font Size and Spacing */
    .mobile-menu a {
        font-size: 1.5rem;
        /* Reduced from 2rem */
        gap: 1.5rem;
        /* Reduced gap for a more compact list */
    }

    /* Hide desktop nav links on mobile */
    .nav-links {
        display: none;
    }

    /* Show mobile menu toggle button */
    .menu-toggle {
        display: flex;
    }

    /* Also include hover overrides to keep mobile menu links functional */
    .nav-links a:hover,
    .nav-links a:hover::before {
        transform: none !important;
        box-shadow: none !important;
        color: inherit !important;
        background: inherit !important;
    }

    .hamburger {
        display: block; /* Make it visible on mobile */
    }
    
    .hamburger svg {
        height: 2rem;
        width: 2rem;
    }
}

@media (hover: none) and (pointer: coarse) {
    .nav-links a:hover {
        color: var(--text-primary) !important;
        transform: none !important;
        box-shadow: none !important;
    }

    .nav-links a:hover::before {
        transform: scale(0) !important;
    }
}

.no-scroll {
    overflow: hidden;
    height: 100vh;
    width: 100%;
    position: fixed;
    left: 0;
}