header {
    display: none;
}

@media (max-width: 850px) {

    header {
        display: flex;
        justify-content: flex-end;
        padding: 20px;
        position: fixed;
        top: 0;
        right: 0;
        z-index: 100; /* Higher z-index to be above the overlay */

        width: 100vw;
        background-color: var(--color-background);
    }

    #burger-menu {
        cursor: pointer;
        display: flex;
        flex-direction: column;
        gap: 5px;
        z-index: 101; /* Even higher z-index for the burger icon */
    }

    #burger-menu span {
        display: block;
        width: 30px;
        height: 4px;
        background-color: black;
        border-radius: 2px;
        transition: all 0.3s ease-in-out;
    }

    #mobile-nav {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: #F2EFE5;
        z-index: 99; /* Below header and burger icon */
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        padding: 20px; /* Add some padding */
        box-sizing: border-box;
    }

    #mobile-nav.active {
        display: flex;
    }

    #burger-menu.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    #burger-menu.active span:nth-child(2) {
        opacity: 0;
    }

    #burger-menu.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    .navigation-box {
        list-style: none; /* Remove bullet points */
        padding: 0;
        margin: 20px 0; /* Add margin for spacing */
        display: flex;
        flex-direction: column;
        align-items: stretch !important;
        width: 100%; /* Make list take full width */ /* Limit overall width for readability */
        border-radius: 15px;
        overflow: hidden;
        gap: 0 !important;
        /* border: 1px solid #ddd; */
        box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.1);
    }



    .navigation-box li {
        width: 100%;
        text-align: left;
    }

    .navigation-box a:first-of-type {
        border-radius: 15px 15px 0px 0px;
    }

    .navigation-box a:last-of-type {
        border-radius: 0px 0px 15px 15px;
    }

    .navigation-box a {
        display: block; /* Make the whole area clickable */
        padding: 15px 20px; /* Large touch target */
        background-color: white;

        /* Borders */
        border-left: 1px solid #ddd; border-right: 1px solid #ddd;
        border-top: .5px solid #ddd; border-bottom: .5px solid #ddd; 
        text-decoration: none;
        color: #333;
        font-size: 20px; /* Readable font size */
        font-weight: 500;
        transition: background-color 0.2s ease, transform 0.2s ease, border-color .2s ease;
    }

    .navigation-box a:hover,
    .navigation-box a:focus {
        background-color: var(--color-primary);
        border-color: var(--color-primary);
        color: white !important;
        outline: none; /* Remove default focus outline */
    }

    .navigation-box a.nav-link-active {
        color: var(--color-secondary);
    }

    .homelab-box {
        align-items: stretch;
        margin-top: 30px; /* Spacing from navigation */
        gap: 0px;
        width: 100%;
    }

    .homelab-title {
        padding: 10px;
    }

    .homelab-box a {
        padding: 15px 20px; /* Standard button-like styling */
        background-color: white;
        border-top: .5px solid #ddd; border-bottom: .5px solid #ddd;
        border-left: 1px solid #ddd; border-right: 1px solid #ddd;
        font-size: 18px;
        text-align: left;
        width: 100%; /* Ensure wide buttons */
        box-sizing: border-box;
        transition: background-color 0.2s ease, transform 0.2s ease, border-color .2s ease;

        text-decoration: none; 
        color: initial;
        font-weight: 500;
    }

    .homelab-box a:first-of-type {
        border-radius: 15px 15px 0px 0px;
    }

    .homelab-box a:last-of-type {
        border-radius: 0px 0px 15px 15px;
    }

    .homelab-box a:hover,
    .homelab-box a:focus {
        background-color: var(--color-primary);
        color: white;
        border-color: var(--color-primary);
        outline: none;
    }

    /* Overlay effect for content when nav is active */
    body.nav-active #content {
        filter: blur(5px);
        pointer-events: none; /* Prevent interaction with content behind */
        transition: filter 0.3s ease;
    }

    nav .btn {
        
        width: 100%;
        box-sizing: border-box;
        padding: 15px 0px;
        text-decoration: none;

    }

    nav .btn:hover {
        transform: scale(1);
    }

    #mobile-nav-social-icons {
    
        height: 32px;
        gap: 15px;
        margin-top: 25px;

    }
}
