.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 7%;
    display: flex;
    align-items: center;
    z-index: 100;
    transition: 0.5s ease;
    box-shadow: 0 0.1rem 1rem var(--shadow-color);
    background: var(--bg-color);
}

.logo { 
    width: 150px; 
    margin-right: auto;
}

.logo img{ width: 100%; }
.navbar a {
    position: relative;
    font-size: 1.7rem;
    color: var(--text-color);
    font-weight: 500;
    margin-right: 3.5rem;
}

.navbar a.active::before{
    content: '';
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 100%;
    height: 2px;
    background: var(--main-color);
}

.theme-toggle {
    font-size: 2.2rem;
    color: var(--text-color);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.theme-toggle:hover {
    transform: rotate(30deg);
    color: var(--main-color);
}

.menu-toggle{ display: none; }
.toggle-btns{
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

#darkMode-icon{ color: var(--text-color); }


@media (max-width: 890px){
    .navbar{
        position: fixed;
        bottom: 10px;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        padding: 1.2rem 1rem;
        border-radius: 2rem;
        background: var(--bg-color);
        box-shadow: 0 0.1rem 1rem var(--shadow-color);
    }

    .header{ 
        background: transparent; 
        box-shadow: none; 
    }

    .header.sticky{
        box-shadow: 0 0.1rem 1rem var(--shadow-color);
        background: var(--bg-color);
    }

}


@media (max-width: 650px){
    .menu-toggle{
        display: inline-flex;
        font-size: 2.3rem;
        background: transparent;
        color: var(--text-color);
    }

    .navbar{
        position: fixed;
        right: -100%;
        top: 0;
        transform: none;
        display: none;
        flex-direction: column;
        align-items: start;
        justify-content: start;
        width: 80%;
        height: 100%;
        border-radius: 0;
        padding: 2rem;
        gap: 2px;
    }

    .navbar.active {
        display: flex;
        right: 0;
    }

    .navbar a{
        width: 100%;
        padding: 1rem;
    }

    .navbar a:first-child{ margin-left: 0; }
    #mobile-close{
        position: absolute;
        bottom: 5px;
        left: 0;
        background: var(--danger-color);
        padding: 1rem;
        border-radius: 2px;
        color: white;
    }
}


@media (max-width: 480px){
    .navbar{ 
        left: 0; 
        width: 100%;
    }
}