/* Digital-Clock */

/* style/nav.css */

/* Global Box Sizing */
nav {
    position: fixed; /* fixed on top */
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    background-color: hsla(0, 0%, 0%, 0.3);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid hsla(0, 0%, 100%, 0.1);
    padding: 0 2rem;
    z-index: 100;
}

/* Nav Links */
nav ul {
    grid-column: 2;
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 3rem;
}

/* Nav Links Mobile */
nav li {
    margin: 0;
    padding: 0;
}

/* Nav Link Styles */
nav a {
    color: hsl(0, 0%, 85%);
    text-decoration: none;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
    padding: 0.5rem 1.2rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    user-select: none;
}

/* Hover and Active States */
nav a:hover,
nav a[aria-current="page"] {
    background-color: hsla(0, 0%, 100%, 0.2);
    color: hsl(0, 0%, 100%);
}

/* Hide hamburger by default */
nav button {
    display: none;
    background: none;
    border: none;
}

/* Format Toggle Switch */
@media (max-width: 600px) {
    
    /* Nav layout for mobile */
    nav {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        padding: 0 1rem;
    }

    /* Show hamburger on mobile */
    nav button {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        position: fixed;
        top: 15px;
        left: 15px;
        z-index: 102;
        cursor: pointer;
    }

    /* Hamburger Icon */
    nav button img {
        width: 28px;
        height: 28px;
        display: block;
    }

    /* Mobile dropdown menu */
    nav ul {
        position: fixed;
        top: 65px; /* below hamburger */
        left: 15px;
        min-width: 120px;
        max-width: calc(100vw - 30px);
        max-height: calc(100vh - 80px);
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        background-color: hsla(0, 0%, 0%, 0.92);
        backdrop-filter: blur(12px);
        padding: 0.5rem 1rem;
        border-radius: 8px;
        transform: translateY(-10px);
        opacity: 0;
        pointer-events: none;
        transition: all 0.25s ease;
        overflow-y: auto;
        z-index: 101;
    }

    /* Show menu when active */
    nav ul.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    /* Mobile nav links */
    nav a {
        font-size: 1rem;
        width: auto;
        text-align: left;
        padding: 0.5rem 1rem;
    }
}