@media screen and (max-width: 820px) {
    .site-nav,
    .navbar,
    .nav-container {
        position: relative;
        width: 44px;
        min-height: 44px;
        overflow: visible;
    }

    .nav-container .checkbox {
        position: absolute;
        display: block;
        width: 44px;
        height: 44px;
        top: 0;
        right: 0;
        left: auto;
        z-index: 1004;
        opacity: 0;
        cursor: pointer;
        margin: 0;
    }

    .nav-container .hamburger-lines {
        position: absolute;
        top: 10px;
        right: 6px;
        left: auto;
        z-index: 1003;
        display: flex;
        width: 30px;
        height: 24px;
        flex-direction: column;
        justify-content: space-between;
        pointer-events: none;
    }

    .nav-container .hamburger-lines .line {
        display: block;
        width: 100%;
        height: 3px;
        border-radius: 10px;
        background: #fff;
        transition: transform .28s ease, opacity .2s ease;
    }

    .nav-container .hamburger-lines .line1 {
        transform-origin: 0 0;
    }

    .nav-container .hamburger-lines .line3 {
        transform-origin: 0 100%;
    }

    .navbar .menu-items {
        position: absolute;
        top: 52px;
        right: 0;
        left: auto;
        z-index: 1002;
        display: none;
        width: min(310px, calc(100vw - 32px));
        padding: 10px;
        margin: 0;
        border: 1px solid rgba(255,255,255,.14);
        border-radius: 16px;
        background: rgba(8, 20, 31, .98);
        box-shadow: 0 18px 42px rgba(0,0,0,.35);
        backdrop-filter: blur(12px);
        transform: none;
    }

    .navbar .menu-items ul {
        display: grid;
        gap: 7px;
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .navbar .menu-items li {
        display: block;
        margin: 0;
        padding: 0;
    }

    .navbar .menu-items li a {
        display: block;
        width: 100%;
        padding: 13px 15px;
        border-radius: 11px;
        background: rgba(255,255,255,.07);
        color: #fff;
        font-size: 13px;
        line-height: 1.25;
        text-align: left;
    }

    .navbar .menu-items li a:hover,
    .navbar .menu-items li a:focus {
        background: rgba(255,255,255,.14);
        color: #fff;
    }

    .nav-container input[type="checkbox"]:checked ~ .menu-items {
        display: block;
    }

    .nav-container input[type="checkbox"]:checked ~ .hamburger-lines .line1 {
        transform: rotate(45deg) translate(2px, -1px);
    }

    .nav-container input[type="checkbox"]:checked ~ .hamburger-lines .line2 {
        opacity: 0;
    }

    .nav-container input[type="checkbox"]:checked ~ .hamburger-lines .line3 {
        transform: rotate(-45deg) translate(2px, 1px);
    }
}

@media screen and (min-width: 821px) {
    .nav-container .checkbox,
    .nav-container .hamburger-lines {
        display: none;
    }

    .navbar .menu-items {
        display: block;
    }
}
