/* css/layout.css - THE CRYSTAL MOTHERSHIP */

.cyber-nav {
    position: fixed;
    top: -100px; /* Start hidden */
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    
    /* Compact width */
    max-width: 1100px; 
    
    height: 80px; 
    z-index: 1000;
    pointer-events: none;
    animation: navDeploy 1s cubic-bezier(0.19, 1, 0.22, 1) forwards;
    animation-delay: 0.5s;
}

.nav-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    pointer-events: auto;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.6));
}

/* --- THE GLASS WINGS --- */
.nav-group.left {
    flex: 1;
    height: 50px; /* Slightly taller for balance */
    margin-top: 8px; 
    margin-right: -25px; 
    
    /* 1. SUPER GLASS: More transparent, higher blur */
    background: rgba(10, 11, 26, 0.6); 
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    
    /* Brighter Rim */
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-right: none;
    
    border-radius: 60px 0 0 60px; /* More organic curve */
    
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding-right: 4rem;
    gap: 3rem;
    transition: all 0.3s ease;
}

.nav-group.right {
    flex: 1;
    height: 50px;
    margin-top: 8px;
    margin-left: -25px; 
    
    /* 1. SUPER GLASS */
    background: rgba(10, 11, 26, 0.6);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-left: none;
    
    border-radius: 0 60px 60px 0;
    
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding-left: 4rem;
    gap: 3rem;
    transition: all 0.3s ease;
}

/* Hover: The glass gets slightly clearer */
.nav-group:hover {
    background: rgba(10, 11, 26, 0.75);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.05);
}

/* --- THE CENTER COMMAND (BIGGER) --- */
.nav-center {
    position: relative;
    width: 240px; /* 2. WIDER to hold big logo */
    height: 70px; 
    z-index: 10;
    
    clip-path: polygon(0 0, 100% 0, 85% 100%, 15% 100%);
    
    /* Solid Dark Core (keeps logo readable) */
    background: #05060f; 
    
    display: flex;
    justify-content: center;
    align-items: center;
    padding-bottom: 5px;
}

/* Eerie Glow (Unchanged) */
.nav-center::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 20%;
    width: 60%;
    height: 3px;
    background: var(--primary);
    border-radius: 10px;
    box-shadow: 
        0 0 10px var(--primary),
        0 0 30px var(--primary),
        0 0 60px rgba(236, 246, 116, 0.4); 
    animation: eeriePulse 4s infinite ease-in-out;
}

/* 2. BIGGER LOGO */
.console-logo img {
    height: 42px; /* Increased from 28px */
    width: auto;
    filter: brightness(1.2);
    transition: transform 0.3s ease;
}

.console-logo:hover img {
    transform: scale(1.05);
    filter: drop-shadow(0 0 20px rgba(236, 246, 116, 0.4));
}

/* --- Typography --- */
.nav-link {
    font-family: var(--font-heading);
    font-size: 0.8rem; 
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5); /* Better readability on glass */
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0%;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
    box-shadow: 0 0 10px var(--primary);
}

.nav-link:hover { color: #fff; }
.nav-link:hover::after { width: 100%; }

/* --- CTA Button --- */
.nav-cta {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 0.5rem 1.4rem; 
    border-radius: 50px;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
}
.nav-cta:hover { 
    background: var(--primary); 
    color: #000; 
    box-shadow: 0 0 25px var(--primary);
}

/* --- HAMBURGER --- */
.mobile-toggle { display: none; }

/* --- ANIMATIONS --- */
@keyframes navDeploy {
    0% { top: -100px; opacity: 0; }
    100% { top: 10px; opacity: 1; }
}

@keyframes eeriePulse {
    0% { opacity: 0.5; box-shadow: 0 0 10px var(--primary); filter: hue-rotate(0deg); }
    50% { opacity: 1; box-shadow: 0 0 25px var(--primary), 0 0 50px rgba(236, 246, 116, 0.6); filter: hue-rotate(-10deg); }
    100% { opacity: 0.5; box-shadow: 0 0 10px var(--primary); filter: hue-rotate(0deg); }
}

/* Mobile */
/* css/layout.css - MOBILE NAV FINAL FIX */

@media (max-width: 1024px) {

    /* 1. THE MAIN WRAPPER - NUCLEAR RESET */
    .cyber-nav {
        position: fixed;
        top: 0;
        left: 0 !important; /* Force to left edge */
        width: 100vw !important; /* Force full viewport width */
        height: auto; 
        z-index: 9999;
        padding: 0;
        margin: 0;
        pointer-events: none;
        
        /* KILL THE DESKTOP CENTER SHIFT */
        transform: none !important; 
        max-width: none !important;
        right: auto !important;
        bottom: auto !important;
    }

    /* 2. THE MENU CAPSULE */
    .nav-container {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 80px; /* Header Height */
        
        background: transparent;
        border: none;
        border-radius: 0;
        
        overflow: hidden; 
        transition: height 0.4s cubic-bezier(0.16, 1, 0.3, 1), background 0.4s ease;
        pointer-events: auto;
        
        display: flex;
        flex-direction: column;
        /* Ensure items stack at the top, don't stretch them */
        justify-content: flex-start; 
    }

    /* Active State */
    .nav-container.active {
        height: 100vh;
        background: rgba(5, 6, 12, 0.98); /* Solid Void */
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }

    /* 3. HEADER ROW */
    .nav-center {
        position: absolute;
        top: 0;
        left: 20px;
        height: 80px;
        display: flex;
        align-items: center;
        z-index: 50;
        
        /* Reset styles */
        width: auto;
        background: transparent;
        clip-path: none;
        transform: none;
        border: none;
    }
    
    .console-logo img { 
        height: 45px; /* Bigger Logo */
        width: auto; 
    }
    .nav-center::after { display: none; }

    .mobile-toggle {
        position: absolute;
        top: 0;
        right: 20px;
        height: 80px;
        width: 60px;
        display: flex;
        align-items: center;
        justify-content: center;
        
        color: var(--primary);
        font-size: 1.8rem;
        background: transparent;
        border: none;
        cursor: pointer;
        z-index: 50;
    }

    /* 4. THE LINKS (Un-stretched) */
    .nav-group.left, .nav-group.right {
        position: relative;
        z-index: 40;
        display: flex;
        flex-direction: column;
        width: 100%;
        padding: 0 40px;
        
        /* STOP FLEX STRETCHING */
        flex: initial !important; 
        height: auto !important;
        
        background: transparent;
        border: none;
        margin: 0; 
        
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.3s ease, transform 0.3s ease;
        pointer-events: none;
    }

    /* Reveal when active */
    .nav-container.active .nav-group.left {
        margin-top: 100px; /* Clear the header */
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
        transition-delay: 0.1s;
    }

    .nav-container.active .nav-group.right {
        margin-top: 0; /* Sit directly under the left group */
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
        transition-delay: 0.2s;
    }

/* 5. LINK STYLING (The "Force Feed" Update) */
.nav-link {
    display: block;
    font-family: var(--font-heading);
    font-size: 2rem;
    color: rgba(255,255,255,0.5);
    
    padding: 20px 0;
    margin: 0;
    
    /* 1. Base Border */
    border-bottom: 1px solid rgba(255,255,255,0.15);
    
    text-align: left;
    width: 100%;
    line-height: 1;
}

/* 2. THE NUCLEAR OVERRIDE */
/* This specifically targets the "Last Item" (Work) and forces the line back */
.nav-group .nav-link:last-child {
    border-bottom: 1px solid rgba(255,255,255,0.15) !important;
}

.nav-link:hover, .nav-link:active {
    color: var(--primary);
    border-bottom-color: var(--primary) !important; /* Force color on hover too */
    padding-left: 10px;
}
.nav-link::after { display: none; }

/* THE SCROLL STATE (Blurry Header) */
.nav-container.scrolled {
    /* Glassy Background */
    background: rgba(5, 6, 12, 0.7); 
    
    /* The Blur Effect */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    
    /* Subtle Separation Line */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    
    /* Slight Shadow for Depth */
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

/* CRITICAL: Ensure the OPEN menu stays solid/dark regardless of scroll */
.nav-container.active {
    background: rgba(5, 6, 12, 0.98) !important;
    backdrop-filter: blur(20px) !important;
    border-bottom: none; /* No line when full screen */
}

    /* 6. CTA BUTTON */
    .nav-cta {
        display: block;
        margin-top: 40px;
        padding: 20px;
        text-align: center;
        width: 100%;
        font-size: 1rem;
        border: 1px solid var(--primary);
        color: var(--primary);
        background: rgba(236, 246, 116, 0.05);
        border-radius: 0;
    }
}