* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'poppins', sans-serif;
}

body {
    color: #ededed;
    background: black;
    scroll-behavior: smooth;
    overflow-x: clip;
}

html {
    scroll-behavior: smooth;
    overflow-x: clip;
}

.header {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 10%;
    background: black;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.logo {
    position: relative;
    font-size: 25px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    animation: slideRight 0.5s ease forwards;
}

.logo:hover {
    color: #0ef;
}

.navbar a {
    display: inline-block;
    font-size: 25px;
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    margin-left: 35px;
    transition: .3s;
    opacity: 0;
    animation: slideTop .5s ease forwards;
    animation-delay: calc(0.1s * var(--i));
    position: relative;
    text-decoration: none;
}

.navbar a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    bottom: -6px;
    left: 0;
    background-color: #0ef;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease-out;
}

.navbar a:hover::after {
    transform: scaleX(1);
}

.navbar a:hover {
    color: #0ef;
}

.last-text p {
    width: 100%;
    text-align: center;
    padding: 25px 0;
    background: rgb(7, 85, 91);
    font-weight: 300;
    margin-top: 70px;
}

.top {
    position: fixed;
    bottom: 2.1rem;
    left: 2.1rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    z-index: 1000;
}

.top.active {
    opacity: 1;
    visibility: visible;
}

.top i {
    color: #000000;
    background: #0ef;
    font-size: 20px;
    padding: 10px;
    border-radius: 0.5rem;
}





@keyframes slideRight {
    0% {
        transform: translateX(-100px);
        opacity: 0;
    }

    100% {
        transform: translateX(0px);
        opacity: 1;
    }
}

@keyframes slideLeft {
    0% {
        transform: translateX(100px);
        opacity: 0;
    }

    100% {
        transform: translateX(0px);
        opacity: 1;
    }
}

@keyframes slideTop {
    0% {
        transform: translateY(100px);
        opacity: 0;
    }

    100% {
        transform: translateY(0px);
        opacity: 1;
    }
}

@keyframes slideBottom {
    0% {
        transform: translateY(-100px);
        opacity: 0;
    }

    100% {
        transform: translateY(0px);
        opacity: 1;
    }
}

#menu-icon {
    font-size: 3rem;
    color: #ededed;
    display: none;
    cursor: pointer;
}

@media (max-width: 768px) {
    .header {
        padding: 15px 5%;
    }

    #menu-icon {
        display: block;
        z-index: 10001;
        /* Must be higher than navbar (10000) */
    }

    .navbar {
        position: fixed;
        top: 0;
        bottom: 0;
        right: -100%;
        /* Start off-screen to the right */
        width: 60%;
        /* Cover 60% of the screen */
        max-width: 300px;
        padding: 80px 20px;
        background: rgb(15, 15, 15);
        /* Dark background */
        border-left: .1rem solid rgba(255, 255, 255, .1);
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
        transition: right 0.15s ease-out;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        z-index: 10000;
        overflow-y: auto;
    }

    .navbar.active {
        right: 0;
        /* Slide in from the right */
    }

    .navbar a {
        display: block;
        font-size: 20px;
        margin: 1.5rem 0;
        text-align: left;
        /* Disable desktop animation initially */
        opacity: 0;
        animation: none;
    }

    /* Trigger animation only when the menu is open */
    .navbar.active a {
        animation: slideLeft 0.3s ease forwards;
        animation-delay: calc(0.1s * var(--i));
    }

    .navbar a::after {
        display: none;
    }

}

.menu-overlay {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}