@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
}

.navbar {
    width: 100%;
    height: 48px;

    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;

    padding: 0 28px;

    background: #000;
    color: #fff;

    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
}

.navbar-logo {
    justify-self: start;
    display: flex;
    align-items: center;
}

.navbar-logo img {
    width: 45px;
    height: 45px;
    object-fit: contain;
}

.navbar-links {
    display: flex;
    align-items: center;
    gap: 56px;
}

.navbar-links a {
    position: relative;

    color: #e8e8e8;
    text-decoration: none;

    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 400;

    transition: color 0.2s ease;
}

.navbar-links a:hover {
    color: #fff;
}

.navbar-links a::after {
    content: "";

    position: absolute;
    left: 50%;
    bottom: -6px;

    width: 0;
    height: 1px;

    background: #fff;

    transform: translateX(-50%);
    transition: width 0.25s ease;
}

.navbar-links a:hover::after {
    width: 100%;
}

.theme-button {
    justify-self: end;

    width: 23px;
    height: 23px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: none;
    border-radius: 50%;

    background: #fff;

    font-size: 13px;
    cursor: pointer;
}

.theme-button img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.burger-button {
    display: none;

    width: 28px;
    height: 22px;

    flex-direction: column;
    justify-content: space-between;

    background: none;
    border: none;

    cursor: pointer;
}

.burger-button span {
    width: 100%;
    height: 2px;

    background: #fff;
    border-radius: 2px;
}


@media (max-width: 650px) {

    .navbar {
        height: 55px;

        display: flex;
        align-items: center;

        padding: 0 18px;
    }

    .navbar-logo {
        margin-right: auto;
    }

    .navbar-logo img {
        width: 42px;
        height: 42px;
    }

    .navbar-actions {
        margin-left: auto;
    }

    .navbar-links {
        position: absolute;

        top: 55px;
        left: 0;

        width: 100%;

        display: flex;
        flex-direction: column;

        gap: 0;

        background: #000000;

        opacity: 0;
        visibility: hidden;

        transform: translateY(-10px);

        transition:
            opacity 0.3s ease,
            transform 0.3s ease,
            visibility 0.3s ease;
    }

    .navbar-links.active {
        opacity: 1;
        visibility: visible;

        transform: translateY(0);
    }

    .navbar-links a {
        width: 100%;

        padding: 18px;

        text-align: center;

        font-size: 15px;

        border-top: 1px solid #222222;
    }

    .burger-button {
        display: flex;
        margin-left: 15px;
    }


    /* BURGER → X */

    .burger-button.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .burger-button.active span:nth-child(2) {
        opacity: 0;
    }

    .burger-button.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
}