nav {
    background-color: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(8px);
    position: fixed;
    height: var(--nav-height);
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: grid;
    place-items: center;
}

.nav-content {
    width: min(1280px, 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
}

.nav-links {
    display: flex;
    gap:1rem;
}

nav a {
    color: white;
    text-decoration: none;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.25rem;
}

.mobile-menu {
    position: fixed;
    inset: 0;
    margin: 0 0 0 auto;
    width: min(320px, 100%);
    height: 100%;
    max-height: 100%;
    z-index: 200;
    border: none;
    padding: 0;
    background-color: var(--color-dark);
    color: white;

    translate: 100% 0;
    transition:
        translate 0.3s ease,
        display 0.3s allow-discrete,
        overlay 0.3s allow-discrete;
}

.mobile-menu[open] {
    translate: 0 0;
}

@starting-style {
    .mobile-menu[open] {
        translate: 100% 0;
    }
}

.mobile-menu::backdrop {
    background: rgba(0, 0, 0, 0);
    transition:
        background 0.3s ease,
        display 0.3s allow-discrete,
        overlay 0.3s allow-discrete;
}

.mobile-menu[open]::backdrop {
    background: rgba(0, 0, 0, 0.6);
}

@starting-style {
    .mobile-menu[open]::backdrop {
        background: rgba(0, 0, 0, 0);
    }
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-menu-link {
    text-decoration: none;
    color: white;
    font-size: 1.1rem;
}

.mobile-menu-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.25rem;
}

.mobile-menu-links {
    display: flex;
    flex-direction: column;
    padding: 1rem 0;
}

.mobile-menu-links a {
    color: white;
    text-decoration: none;
    padding: 0.875rem 1.5rem;
    font-size: 1.1rem;
    transition: background 0.15s;
}

.mobile-menu-links a:hover {
    background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hamburger {
        display: flex;
    }
}
