/* ========== NAVBAR CORE STYLES ========== */

.nav-link.active {
    color: #3fff8b;
    border-bottom: 2px solid #3fff8b;
}

.nav-link {
    transition: all 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #3fff8b;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* ========== RESPONSIVE FIXES FOR NAVBAR ========== */

/* Tablet screens */
@media (max-width: 1024px) {
    nav .max-w-7xl {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }
    
    nav .text-xl.font-black {
        font-size: 1.1rem !important;
    }
}

/* Mobile screens */
@media (max-width: 768px) {
    nav .max-w-7xl {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        height: 4rem !important;
    }
    
    /* Logo text - prevent overflow */
    nav .text-xl.font-black {
        font-size: 0.9rem !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 50%;
    }
    
    /* Hide desktop navigation */
    nav .hidden.md\:flex {
        display: none !important;
    }
    
    /* Mobile menu button - show */
    .mobile-menu-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        background: transparent;
        border: none;
        cursor: pointer;
        z-index: 1000;
    }
    
    /* Hire Me button adjustments */
    nav button.signature-gradient {
        padding: 0.5rem 1rem !important;
        font-size: 0.75rem !important;
        white-space: nowrap;
    }
    
    /* Terminal icon */
    nav .material-symbols-outlined {
        font-size: 1.25rem !important;
        padding: 0.5rem !important;
    }
    
    /* Right side container */
    nav .flex.items-center.space-x-4 {
        gap: 0.5rem !important;
    }
}

/* Small mobile devices (<=480px) */
@media (max-width: 480px) {
    nav .max-w-7xl {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }
    
    /* Logo - smaller font */
    nav .text-xl.font-black {
        font-size: 0.75rem !important;
        max-width: 40%;
    }
    
    /* Hire Me button - compact */
    nav button.signature-gradient {
        padding: 0.4rem 0.75rem !important;
        font-size: 0.7rem !important;
    }
    
    /* Terminal icon - smaller */
    nav .material-symbols-outlined {
        font-size: 1.1rem !important;
        padding: 0.4rem !important;
    }
}

/* ========== MOBILE MENU OVERLAY ========== */

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(12, 14, 17, 0.95);
    backdrop-filter: blur(20px);
    z-index: 100;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.mobile-menu-overlay.open {
    transform: translateX(0);
}

.mobile-menu-overlay .menu-items {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 2rem;
}

.mobile-menu-overlay .menu-items a {
    font-size: 1.5rem;
    font-family: monospace;
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s ease;
}

.mobile-menu-overlay .menu-items a:hover,
.mobile-menu-overlay .menu-items a.active {
    color: #3fff8b;
}

.mobile-menu-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    z-index: 101;
}

/* Hide mobile menu button on desktop */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: #3fff8b;
    cursor: pointer;
    padding: 0.5rem;
}

/* Prevent body scroll when mobile menu is open */
body.menu-open {
    overflow: hidden;
}

/* ========== ADDITIONAL MOBILE OPTIMIZATIONS ========== */

@media (max-width: 640px) {
    /* Improve touch targets */
    .mobile-menu-btn,
    nav .material-symbols-outlined,
    nav button {
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Better text contrast */
    nav .text-slate-400 {
        color: #cbd5e1;
    }
    
    /* Active link indicator for mobile */
    .mobile-menu-overlay .menu-items a.active {
        color: #3fff8b;
        font-weight: bold;
        border-left: 3px solid #3fff8b;
        padding-left: 1rem;
    }
    
    /* Make close button larger for touch */
    .mobile-menu-close {
        top: 1rem;
        right: 1rem;
        width: 48px;
        height: 48px;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.1);
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .mobile-menu-close:hover {
        background: rgba(255, 255, 255, 0.2);
    }
}

/* Landscape mode fixes */
@media (max-width: 768px) and (orientation: landscape) {
    nav .max-w-7xl {
        height: 3.5rem !important;
    }
    
    .mobile-menu-overlay .menu-items {
        gap: 1rem !important;
    }
    
    .mobile-menu-overlay .menu-items a {
        font-size: 1.2rem !important;
    }
}

/* ========== ANIMATIONS ========== */

@keyframes slideIn {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(100%);
    }
}

.mobile-menu-overlay {
    animation: slideOut 0.3s ease forwards;
}

.mobile-menu-overlay.open {
    animation: slideIn 0.3s ease forwards;
}