.navbar {
    position: fixed;
    width: 100%;
    top: 20px;
    left: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
    background-color: rgba(255, 255, 255, 0.7);
    color: var(--mono-dark);
    font-weight: 500;
    font-size: 1.1rem;
}

.navbar-logo {
    font-size: 1.2rem;
    font-weight: 400;
}

.navbar-menu {
    list-style: none;
}

.hamburger {
    position: relative;
    width: 30px;
    height: 24px;
    display: none;
    cursor: pointer;
    z-index: 1100;
}

.hamburger .bar {
    position: absolute;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--mono-dark);
    border-radius: 2px;
    transition:
        all 0.3s ease-in-out,
        background-color 0.3s ease-in-out;
    transform-origin: center;
}

.hamburger.scrolled .bar {
    background-color: var(--mono-dark);
}

.hamburger.active .bar {
    background-color: var(--mono-dark);
}

/* расположение до клика */
.hamburger .bar:nth-child(1) {
    top: 0;
}

.hamburger .bar:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
}

.hamburger .bar:nth-child(3) {
    bottom: 0;
}

/* трансформация в крестик */
.hamburger.active .bar:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
    top: 50%;
    transform: translateY(-50%) rotate(-45deg);
}

/* Navbar */
@media (min-width: 601px) {
    .navbar {
        background-color: var(--mono-dark);
        color: var(--mono-light);
        transition:
            background-color 0.7s ease-in-out,
            color 0.7s ease-in-out;
    }

    /* Когда добавится класс .scrolled — фон станет полупрозрачным */
    .navbar.scrolled {
        background-color: rgba(255, 255, 255, 0.8);
        color: var(--mono-dark);
    }

    .hamburger {
        display: none !important;
    }

    .navbar-menu {
        position: static !important;
        top: auto !important;
        flex-direction: row !important;
        width: auto !important;
        display: flex !important;
        transition: none;
    }

    .navbar-item {
        margin-left: 32px;
    }
}

@media (max-width: 600px) {
    .hamburger {
        display: block;
    }

    .navbar-logo,
    .navbar-menu {
        display: none;
    }

    .navbar {
        background-color: rgba(0, 0, 0, 0) !important;
    }

    /* Полноэкранное меню */
    .navbar-menu.fullscreen {
        display: flex;
        position: fixed;
        top: -120%;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: rgba(255, 255, 255, 0.97);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: top 0.4s ease-in-out;
        z-index: 1000;
    }

    /* Когда меню активно, выезжает вниз */
    .navbar-menu.fullscreen.active {
        top: 0;
    }

    .navbar-item {
        margin: 1.5rem 0;
    }

    .navbar-link {
        font-size: 1.5rem;
        color: var(--mono-dark);
    }

    /* Заблокировать прокрутку всего документа, когда меню открыто */
    body.no-scroll {
        overflow: hidden;
        height: 100vh;
    }
}