nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 12px 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Inter', sans-serif;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
}

.nav-links {
    display: flex;
    gap: 24px;
    list-style: none;
}

.nav-links a {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: capitalize;
    color: var(--ink);
    opacity: 0.65;
    /* Dimmer effect */
    padding: 8px 16px;
    /* Increased horizontal padding */
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.nav-links a:hover {
    opacity: 1;
    color: var(--accent);
}

.nav-toggle {
    display: none;
}

.nav-toggle-label {
    display: none;
    cursor: pointer;
    padding: 10px;
    z-index: 100;
}

.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
    display: block;
    background: var(--ink);
    height: 1.5px;
    width: 22px;
    border-radius: 99px;
    position: relative;
    transition: transform 0.3s ease, top 0.3s ease;
}

.nav-toggle-label span::before,
.nav-toggle-label span::after {
    content: '';
    position: absolute;
}

.nav-toggle-label span::before {
    top: -8px;
}

.nav-toggle-label span::after {
    top: 8px;
}

@media (max-width: 768px) {
    nav {
        top: 16px;
        right: 16px;
        left: auto;
        width: 50px;
        height: 50px;
        transform: none;
        padding: 0;
        background: rgba(255, 255, 255, 0.7);
        backdrop-filter: blur(12px) saturate(180%);
        -webkit-backdrop-filter: blur(12px) saturate(180%);
        border: 1px solid rgba(0, 0, 0, 0.1);
        overflow: hidden;
        z-index: 1000;
    }

    /* Expand nav to fill screen when menu toggle is checked */
    nav.nav-open {
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        border-radius: 0;
        background: rgba(255, 255, 255, 0.82);
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        border-color: transparent;
        overflow: visible;
        box-shadow: none;
    }

    .nav-toggle-label {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        inset: 0;
        /* Perfectly center within the circle */
        width: 100%;
        height: 100%;
        z-index: 1001;
        cursor: pointer;
    }

    nav.nav-open .nav-toggle-label {
        top: 16px;
        right: -30px;
        bottom: auto;
        left: auto;
        width: 50px;
        height: 42px;
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        background: rgba(255, 255, 255, 0.75);
        backdrop-filter: blur(32px) saturate(180%);
        -webkit-backdrop-filter: blur(32px) saturate(180%);
        display: none;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 32px;
        z-index: 900;
        padding: 0;
        margin: 0;
    }

    nav.nav-open .nav-links {
        display: flex;
    }

    .nav-links a {
        font-family: 'Inter', sans-serif;
        font-size: 2.2rem;
        /* Much bigger for mobile */
        font-weight: 800;
        letter-spacing: -0.02em;
        /* Tightened space */
        text-transform: capitalize;
        padding: 16px 24px;
        color: var(--ink);
        opacity: 0.8;
    }

    /* Hamburger Animation */
    .nav-toggle:checked~.nav-toggle-label span {
        background: transparent;
    }

    .nav-toggle:checked~.nav-toggle-label span::before {
        top: 0;
        transform: rotate(45deg);
    }

    .nav-toggle:checked~.nav-toggle-label span::after {
        top: 0;
        transform: rotate(-45deg);
    }
}

@media (max-width: 480px) {
    nav {
        top: 12px;
        right: 12px;
        width: 46px;
        height: 46px;
    }

    .nav-links a {
        font-size: 1.7rem;
    }

    nav.nav-open {
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
    }
}
