.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
}

.navbar.scrolled {
    background: var(--navbar-bg); /* Use solid background for consistency */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid var(--border-color);
    padding: 0.8rem 5%;
}

.logo img {
    height: 50px; /* Increased size slightly */
    width: 50px; /* Force square for circle */
    border-radius: 50%; /* Perfect circle */
    object-fit: cover;
    border: 2px solid var(--primary-color); /* Added a border to make it pop */
    transition: var(--transition-smooth);
}

.logo:hover img {
    transform: scale(1.1);
}

.menu-list {
    display: flex;
    gap: 2.5rem;
}

.menu-list li a {
    color: var(--navbar-text);
    font-weight: 500;
    font-size: 1rem;
    position: relative;
    padding: 0.5rem 0;
    transition: var(--transition-smooth);
}

.menu-list li a i {
    margin-right: 5px;
    font-size: 0.9rem;
}

.menu-list li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--brand-gradient);
    transition: var(--transition-smooth);
}

.menu-list li a:hover::after,
.menu-list li a.active::after {
    width: 100%;
}

.menu-list li a:hover,
.menu-list li a.active {
    color: var(--primary-color);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.theme-toggle {
    background: var(--secondary-background);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-size: 1.1rem;
}

.theme-toggle:hover {
    background: var(--primary-color);
    color: white;
    transform: rotate(15deg);
}

.icon-bars {
    display: none;
    font-size: 1.5rem;
    color: var(--text-main);
    cursor: pointer;
}

@media (max-width: 768px) {
    .icon-bars {
        display: block;
    }

    .menu-list {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: var(--background-color);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: 0.4s ease-in-out;
        box-shadow: var(--shadow-xl);
    }

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

    .nav-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: var(--transition-smooth);
    }

    .nav-backdrop.active {
        opacity: 1;
        visibility: visible;
    }

    .nav-actions {
        gap: 1rem;
    }
}
