/*== NAV ==*/
nav {
    display: flex;
    flex-direction: row;
    position: fixed;
    top: 0;
    right: -100%;
    bottom: 0;
    width: 100%;
    overflow: hidden;
    /*-webkit-overflow-scrolling: touch;*/
    transition: 0.8s ease;
    z-index: 1000;
}

.inner {
    width: 50%;
    padding: 15vmin;
}

.inner ul {
    padding: 0;
    width: 100%;
    height: 100%;
    display: grid;
    align-content: flex-start;
    justify-content: flex-start;
    gap: 1rem;
}

.inner ul li {
    border-bottom: 1px solid rgba(40, 40, 40, 0.075);
}

.inner li a {
    font-weight: 400;
    color: var(--inv);
    height: 100%;
    /*text-shadow: 0px 0px 3px rgba(46, 46, 46, 0.35);*/
}

/*.home #navArea .inner li a {
    text-shadow: 0px 0px 3px rgba(46, 46, 46, 0.85);
}*/

#navArea .inner li a::before {
    bottom: 0;
}

#navArea .inner li a:hover {
    text-shadow: 1px 1px 2px var(--inv);
}

.home #navArea .inner li a::before:hover {
    background: var(--text);
}

.home #navArea .inner li a:hover {
    text-shadow: 0 0px 0px var(--text);
}

nav .noise {
    display: block;
    background-image: linear-gradient(to right, #878787, #2d2d2d);
}

.home .inner .noise {
    background-image: linear-gradient(to right, rgba(46, 46, 46, 0.75) 30%, var(--text) 100%);
}

.home nav .noise:nth-last-child {
    background: rgba(120, 120, 110, 0.5);
    backdrop-filter: blur(40px);
}

/* .toggle_btn styles */
.toggle_btn {
    display: block;
    position: fixed;
    top: 0;
    right: 8rem;
    width: 40px;
    height: 80px;
    transition: all 1.3s;
    cursor: pointer;
    z-index: 1002;
    transform: translate(0, 0);
}

.toggle_btn span {
    display: block;
    position: absolute;
    width: 40px;
    height: 2px;
    bottom: 20px;
    background: var(--inv);
    overflow: hidden;
    z-index: 1000;
    opacity: 0.7;
}

.home .toggle_btn span {
    background: #c0c0c0;
}

.toggle_btn span::before {
    content: "";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--text) 100%);
    animation: scroll-left 2s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
    background-size: 200% 100%;
    transition: all 2s;
    animation-delay: 2s;
    animation-duration: 3.5s;
}

@keyframes scroll-left {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/*== OPEN ==*/
.open nav {
    right: 0;
    backdrop-filter: blur(20px);
    background-color: rgba(220, 220, 210, 0.5);
    mix-blend-mode: hard-light;
}

.home .open nav {
    background: rgba(180, 180, 170, 0.5);
}

.open .toggle_btn {
    transition: all 1s ease;
}

.open .toggle_btn span {
    width: 100%;
    height: 2px;
    z-index: 1000;
    transition: all 1s ease;
}

.toggle_btn span:nth-child(1) {
    transition: all 1s ease;
}

.open .toggle_btn span:nth-child(1) {
    transform: translate(310%, 0);
    transition: all 1s ease;
    opacity: .5;
}

.toggle_btn span:nth-child(2) {
    top: 0;
    animation-delay: 0.56s;
    transform: translate(0%, 0%) rotate(90deg);
    transition: all 1s ease;
    opacity: 1;
}

.open .toggle_btn span:nth-child(2) {
    top: 72.5%;
    transform: translate(0%, 0%) rotate(90deg);
    transition: all 1s ease;
    opacity: 1;
}

.toggle_btn span:nth-child(3) {
    transform: translate(320%, 0);
    transition: all 1s ease;
    animation-delay: 0.56s;
    opacity: 1;
}

.open .toggle_btn span:nth-child(3) {
    transform: translate(0%, 0%) rotate(0deg);
    transition: all 1s ease;
    opacity: 1;
}

/* Mask */
#mask {
    display: none;
    right: -100%;
    top: 0;
    transition: 0.8s ease;
}

#mask hr {
    background: #999;
}

.open #mask {
    display: block;
    position: relative;
    top: 0;
    right: 0%;
    padding-left: 2rem;
    width: 50%;
    background: rgba(0, 15, 15, 0.75);
    backdrop-filter: blur(5px);
    cursor: pointer;
    transition: all 1s ease;
    animation: menu-left 1s ease;
    /*z-index: 998;*/
}

.home .open #mask {
    background: rgba(0, 0, 0, 0.95);
}

@keyframes menu-left {
    0% {
        transform: translateX(200%);
    }

    100% {
        transform: translateX(0%);
    }
}

#mask p {
    font-weight: 500;
    font-size: clamp(1.2em, calc(1.2em + 0.5vw), 1.4em);
    position: relative;
    margin-top: 50vmin;
    text-shadow: 0px 0px 1px rgba(246, 246, 246, 0.85);
}

.open #mask ul {
    position: relative;
    width: auto;
    height: 400px;
    margin-top: 1rem;
    padding: 0.5rem;
    overflow: hidden scroll;
    box-shadow: inset 0 0px 7px rgba(0, 0, 0, 0.9);
    border-bottom: 1px solid rgba(46, 46, 46, 0.55);
}

.open #mask li {
    font-weight: 400;
    width: auto;
    color: #ddd;
    margin-top: 3em;
    padding: 0.25rem;
    border-bottom: 1px solid;
    letter-spacing: 0.02rem;
    mix-blend-mode: hard-light;
}

.open #mask li:nth-child(1) {
    margin-top: 0;
}


@media screen and (min-width: 1299px) {
    .inner li a {
        font-size: 1.6rem;
    }

    .inner ul li:nth-of-type(5) {
        margin-top: 10vmin;
    }

    .inner li:nth-of-type(n+5) a {
        font-size: 1.2rem;
    }

}

@media screen and (max-width: 599px) {
    nav .noise {
        display: block;
        background-image: linear-gradient(to right, #878787, #000);
    }
    .toggle_btn {
        height: 35px;
    }

    nav {
        flex-direction: column;
    }

    .inner {
        width: 100%;
        min-height: 65svh;
        padding: 2.5rem 2.5rem 0;
    }

    .inner ul {
        gap: 0.5rem;
    }

    .inner ul li:nth-of-type(5) {
        margin-top: 10vmin;
    }

    .inner li a {
        font-size: 1.8rem;
        font-weight: 400;
    }

    .inner li:nth-of-type(n+5) a {
        font-size: 1.2rem;
    }

    .toggle_btn {
        height: 70px;
        right: 1.5rem;
    }

    nav ::-webkit-scrollbar {
        display: none;
    }

    .open nav {
        overflow-y: scroll;
    }

    .open #mask {
        width: 100%;
        height: auto;
        min-height: 85vh;
        padding: 0.5rem;
    }

    #mask p {
        font-size: 1.2rem;
        margin-top: 3rem;
    }

    .open #mask ul {
        width: auto;
        height: 60svh;
        min-height: 350px;
        left: 0;
    }

    .open #mask li {
        font-size: 0.85rem;
    }

    .toggle_btn span {
        bottom: 30px;
        background: #c0c0c0;
    }

    .toggle_btn span:nth-child(2) {
        top: -10%;
    }

    .open .toggle_btn span:nth-child(2) {
        top: 52.5%;
    }
}