/* Floating Capsule Header */
header {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    background: rgba(13, 19, 33, 0.7);
    /* More transparent background */
    backdrop-filter: blur(15px);
    /* Stronger blur for glass effect */
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    border-radius: 50px;
    /* Capsule shape */
    z-index: 1000;
    padding: 10px 30px;
    /* Compact padding */
    transition: all 0.3s ease;
}

header.scrolled {
    background: rgba(13, 19, 33, 0.95);
    /* Darker on scroll */
    box-shadow: 0 15px 40px -10px rgba(0, 0, 0, 0.6);
    top: 5px;
    /* Move slightly up */
    padding: 8px 25px;
    /* Slightly smaller */
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links li a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    padding: 5px 0;
    transition: var(--transition);
}

/* Underline Animation */
.nav-links li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

.nav-links li a:hover {
    color: #fff;
}

.nav-links li a:hover::after {
    width: 100%;
}

.nav-links li a.active {
    color: #fff;
}

.nav-links li a.active::after {
    width: 100%;
}

/* Social Icons in Header */
.social-icons {
    display: flex;
    gap: 15px;
    align-items: center;
}

.social-icons a {
    color: var(--text-muted);
    font-size: 1.1rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.social-icons a:hover {
    color: var(--primary);
    background: rgba(56, 189, 248, 0.1);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.menu-toggle {
    display: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
    header {
        width: 95%;
        padding: 10px 20px;
        top: 10px;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(13, 19, 33, 0.98);
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        border-radius: 20px;
        margin-top: 10px;
        border: 1px solid var(--glass-border);
        display: none;
        /* Hidden by default */
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    }

    .nav-links.active {
        display: flex;
    }

    .social-icons {
        display: none;
        /* Hide socials on mobile header usually, or keep if space allows */
    }

    .menu-toggle {
        display: block;
    }
}