/* =============================================================================
   CORE STYLES - Shared across all pages
   Contains: Reset, Typography, Buttons, Navigation, Footer, Common Utilities
   ============================================================================= */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #ffffff;
    background: linear-gradient(135deg, #0c1426 0%, #1a1f36 25%, #2d1b69 50%, #11998e 75%, #0c1426 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    overflow-x: hidden;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: #ffffff;
    position: relative;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    background: linear-gradient(45deg, #64ffda, #00bcd4, #3f51b5);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientText 3s ease-in-out infinite;
}

@keyframes gradientText {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #64ffda, #00bcd4);
    border-radius: 2px;
    box-shadow: 0 0 20px rgba(100, 255, 218, 0.6);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 2px;
    background: linear-gradient(45deg, #64ffda, #00bcd4, #3f51b5);
    border-radius: inherit;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    -webkit-mask-composite: xor;
}

.btn-primary {
    background: rgba(100, 255, 218, 0.1);
    color: #64ffda;
    border: 1px solid rgba(100, 255, 218, 0.3);
    box-shadow: 0 8px 32px rgba(100, 255, 218, 0.2);
}

.btn-primary:hover {
    background: rgba(100, 255, 218, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(100, 255, 218, 0.4);
    color: #ffffff;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #64ffda;
    transform: translateY(-2px);
    border-color: rgba(100, 255, 218, 0.3);
}

/* Enhanced Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(25px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    transition: all 0.4s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.navbar.scrolled {
    background: rgba(10, 10, 10, 0.98);
    border-bottom-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(30px);
}

.nav-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-logo i {
    font-size: 1.5rem;
    color: #64ffda;
}

.nav-logo h1 {
    background: linear-gradient(135deg, #60a5fa, #34d399, #64ffda);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #ffffff;
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
    white-space: nowrap;
    animation: logoGradient 3s ease-in-out infinite;
}

@keyframes logoGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.2rem;
    margin: 0;
    padding: 0;
    flex-wrap: nowrap;
    overflow: hidden;
}

.nav-item {
    position: relative;
}

/* Navigation Links */
.nav-link {
    display: block;
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.6rem 0.8rem;
    border-radius: 6px;
    background: transparent;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #64ffda;
    transition: width 0.3s ease;
}

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

.nav-link:hover {
    color: #64ffda;
    background: rgba(100, 255, 218, 0.1);
    border-color: rgba(100, 255, 218, 0.2);
}

.nav-link:visited {
    color: #ffffff;
}

.nav-link:link {
    color: #ffffff;
}

.nav-link.active {
    background: rgba(100, 255, 218, 0.1);
    border-color: rgba(100, 255, 218, 0.3);
    color: #64ffda;
}

.nav-link.active::before {
    width: 100%;
}

.nav-link.active:hover {
    color: #64ffda;
}

@keyframes logoSlideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Hamburger Menu (Hidden on Desktop) */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.hamburger .bar {
    width: 25px;
    height: 3px;
    background: #ffffff;
    margin: 3px 0;
    transition: all 0.4s ease;
    border-radius: 2px;
}

.hamburger:hover {
    background: rgba(100, 255, 218, 0.1);
    border-color: rgba(100, 255, 218, 0.3);
}

.hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
    background: #64ffda;
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

.hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
    background: #64ffda;
}

/* Active Navigation Indicator - Removed to match reference design */

/* Navigation Focus States for Accessibility */
.nav-link:focus {
    outline: 2px solid rgba(52, 211, 153, 0.5);
    outline-offset: 2px;
    background: rgba(52, 211, 153, 0.1);
}

.hamburger:focus {
    outline: 2px solid rgba(96, 165, 250, 0.5);
    outline-offset: 2px;
}

/* Dark mode navigation enhancements */
@media (prefers-color-scheme: dark) {
    .navbar {
        background: rgba(5, 5, 5, 0.95);
    }
    
    .nav-menu {
        background: rgba(255, 255, 255, 0.02);
        border-color: rgba(255, 255, 255, 0.06);
    }
    
    .nav-link {
        background: rgba(255, 255, 255, 0.02);
        border-color: rgba(255, 255, 255, 0.04);
    }
}

/* Enhanced Footer */
.footer {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    color: white;
    padding: 4rem 0 2rem;
    position: relative;
    overflow: hidden;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 25% 25%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(52, 211, 153, 0.1) 0%, transparent 50%);
    z-index: 0;
}

.footer .container {
    position: relative;
    z-index: 1;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-info h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #60a5fa, #34d399);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-info p {
    color: #cbd5e1;
    line-height: 1.6;
    font-size: 1rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.5rem 0;
    position: relative;
    font-weight: 500;
}

.footer-links a::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #60a5fa, #34d399);
    transition: width 0.3s ease;
}

.footer-links a:hover {
    color: #60a5fa;
    transform: translateX(10px);
}

.footer-links a:hover::before {
    width: 100%;
}

.footer-social {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #cbd5e1;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.footer-social a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.4s ease;
}

.footer-social a:hover::before {
    transform: scale(1);
}

.footer-social a:hover {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.8), rgba(6, 182, 212, 0.8));
    transform: translateY(-5px) scale(1.1);
    box-shadow: 
        0 15px 35px rgba(59, 130, 246, 0.3),
        0 0 30px rgba(6, 182, 212, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
    color: #94a3b8;
}

/* Particle Background System */
.particle-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(100, 255, 218, 0.6);
    border-radius: 50%;
    animation: float 20s infinite linear;
    opacity: 0;
}

.particle:nth-child(odd) {
    background: rgba(0, 188, 212, 0.4);
    animation-duration: 25s;
}

.particle:nth-child(3n) {
    background: rgba(63, 81, 181, 0.3);
    animation-duration: 30s;
    width: 3px;
    height: 3px;
}

@keyframes float {
    0% {
        transform: translateY(100vh) translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-10vh) translateX(100px) rotate(360deg);
        opacity: 0;
    }
}

/* Glassmorphism Cards */
.glass-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.glass-card:hover::before {
    left: 100%;
}

.glass-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(100, 255, 218, 0.3);
}

/* 3D Elements */
.element-3d {
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
}

.element-3d:hover {
    transform: rotateX(5deg) rotateY(5deg) translateZ(20px);
}

/* Glowing Elements */
.glow {
    position: relative;
}

.glow::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    background: inherit;
    filter: blur(20px);
    opacity: 0.5;
    z-index: -1;
}

/* =============================================================================
   RESPONSIVE DESIGN - Mobile, Tablet, Laptop, Desktop
   ============================================================================= */

/* Medium Mobile Navigation (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .navbar {
        display: flex !important;
        position: fixed !important;
        top: 0 !important;
        width: 100% !important;
        background: rgba(10, 10, 10, 0.98) !important;
        backdrop-filter: blur(30px) !important;
        z-index: 1000 !important;
    }

    .nav-container {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        padding: 0.75rem 15px !important;
    }

    .nav-logo {
        display: flex !important;
        opacity: 1 !important;
        visibility: visible !important;
        padding: 0.5rem 1rem !important;
        margin-left: 1rem !important;
    }

    .nav-logo h1,
    .nav-logo h2 {
        font-size: 1.2rem !important;
        margin: 0 !important;
        color: #ffffff !important;
        background: linear-gradient(135deg, #60a5fa, #34d399, #64ffda) !important;
        background-size: 200% 200% !important;
        -webkit-background-clip: text !important;
        background-clip: text !important;
        -webkit-text-fill-color: transparent !important;
    }

    .hamburger {
        display: flex !important;
        opacity: 1 !important;
        visibility: visible !important;
        cursor: pointer !important;
        background: rgba(255, 255, 255, 0.05) !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        border-radius: 8px !important;
        padding: 0.5rem !important;
    }

    .nav-menu {
        position: fixed !important;
        left: -100% !important;
        top: 70px !important;
        flex-direction: column !important;
        background: rgba(10, 10, 10, 0.98) !important;
        backdrop-filter: blur(30px) !important;
        width: 100% !important;
        text-align: center !important;
        transition: all 0.4s ease !important;
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2) !important;
        border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
        padding: 2rem 1rem !important;
        gap: 1rem !important;
        border-radius: 0 !important;
        border-left: none !important;
        border-right: none !important;
        z-index: 999 !important;
        margin: 0 !important;
        justify-content: flex-start !important;
    }

    .nav-menu::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: 
            radial-gradient(circle at 30% 20%, rgba(96, 165, 250, 0.1) 0%, transparent 50%),
            radial-gradient(circle at 70% 80%, rgba(52, 211, 153, 0.1) 0%, transparent 50%);
        z-index: -1;
    }

    .nav-menu.active {
        left: 0;
        transform: translateX(0);
    }

    .nav-item {
        margin: 0.25rem 0;
        width: 100%;
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
    }

    .nav-link {
        padding: 1rem 2rem !important;
        display: block !important;
        font-size: 1.1rem !important;
        width: 100% !important;
        border-radius: 6px !important;
        margin: 0.25rem 0 !important;
        background: transparent !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        transition: all 0.3s ease !important;
        text-transform: none !important;
        letter-spacing: normal !important;
    }

    .nav-link:hover {
        background: rgba(100, 255, 218, 0.1) !important;
        border-color: rgba(100, 255, 218, 0.3) !important;
        transform: none !important;
        box-shadow: none !important;
        color: #64ffda !important;
    }

    .nav-link.active {
        background: rgba(100, 255, 218, 0.1) !important;
        border-color: rgba(100, 255, 218, 0.3) !important;
        color: #64ffda !important;
        box-shadow: none !important;
    }

    .nav-link.active:hover {
        transform: none !important;
        box-shadow: none !important;
        color: #64ffda !important;
    }

    .nav-link::after {
        display: none; /* Remove bottom border on mobile */
    }

    .hamburger {
        display: flex !important;
        cursor: pointer;
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateX(0) !important;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 8px;
        padding: 0.5rem;
        transition: all 0.3s ease;
    }

    /* Mobile hamburger enhanced styles */
    .hamburger.active {
        background: rgba(96, 165, 250, 0.15);
        border-color: rgba(96, 165, 250, 0.3);
        box-shadow: 0 8px 20px rgba(96, 165, 250, 0.2);
        transform: translateY(-1px);
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
        transform: scale(0);
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
        background: #60a5fa;
        box-shadow: 0 0 10px rgba(96, 165, 250, 0.5);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
        background: #60a5fa;
        box-shadow: 0 0 10px rgba(96, 165, 250, 0.5);
    }

    /* Logo adjustments for mobile */
    .nav-logo {
        padding: 0.5rem 1rem; /* Maintain some padding on mobile */
        margin-left: 1rem; /* Reduced left margin for mobile */
        margin-right: 0.5rem; /* Reduced right margin for mobile */
    }

    .nav-logo h1,
    .nav-logo h2 {
        font-size: 1.3rem; /* Slightly larger for mobile visibility */
    }

    /* Container adjustments */
    .nav-container {
        padding: 0.75rem 15px;
        gap: 2rem; /* Reduced gap for mobile to save space */
    }

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

    /* Add overlay effect when menu is open */
    body.nav-open::after {
        content: '';
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(5px);
        z-index: 998;
        animation: fadeIn 0.3s ease;
    }

    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }
}

/* Small Mobile Navigation (320px - 480px) */
@media (max-width: 480px) {
    .navbar {
        display: flex !important;
        position: fixed !important;
        top: 0 !important;
        width: 100% !important;
        background: rgba(10, 10, 10, 0.98) !important;
        backdrop-filter: blur(30px) !important;
        z-index: 1000 !important;
    }

    .nav-container {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        padding: 0.5rem 10px !important;
    }

    .nav-logo {
        display: flex !important;
        opacity: 1 !important;
        visibility: visible !important;
        padding: 0.25rem 0.5rem !important;
        margin-left: 0.5rem !important;
    }

    .nav-logo h1,
    .nav-logo h2 {
        font-size: 2.5rem !important;
        margin: 0 !important;
        color: #ffffff !important;
        background: linear-gradient(135deg, #60a5fa, #34d399, #64ffda) !important;
        background-size: 200% 200% !important;
        -webkit-background-clip: text !important;
        background-clip: text !important;
        -webkit-text-fill-color: transparent !important;
    }

    .hamburger {
        display: flex !important;
        opacity: 1 !important;
        visibility: visible !important;
        margin-right: 0.5rem !important;
    }

    .nav-menu {
        position: fixed !important;
        left: -100% !important;
        top: 60px !important;
        width: 100% !important;
        height: calc(100vh - 60px) !important;
        background: rgba(10, 10, 10, 0.98) !important;
        backdrop-filter: blur(30px) !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        align-items: center !important;
        padding: 2rem 1rem !important;
        gap: 1rem !important;
        transition: left 0.3s ease !important;
        z-index: 999 !important;
    }

    .nav-menu.active {
        left: 0 !important;
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        transform: translateX(0) !important;
        position: fixed !important;
        z-index: 9999 !important;
        pointer-events: auto !important;
    }
    
    .nav-menu:not(.active) {
        left: -100% !important;
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        transform: translateX(-100%) !important;
        pointer-events: none !important;
    }

    .nav-item {
        width: 100% !important;
        max-width: 300px !important;
    }

    .nav-link {
        display: block !important;
        width: 100% !important;
        padding: 1rem 2rem !important;
        text-align: center !important;
        color: #ffffff !important;
        text-decoration: none !important;
        background: rgba(255, 255, 255, 0.05) !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        border-radius: 12px !important;
        transition: all 0.3s ease !important;
    }

    .nav-link:hover,
    .nav-link.active {
        background: rgba(96, 165, 250, 0.15) !important;
        border-color: rgba(96, 165, 250, 0.3) !important;
        transform: translateY(-2px) !important;
    }
}

/* Mobile First - Base Mobile Styles (320px - 767px) */
@media (max-width: 767px) {
    .container {
        padding: 0 15px;
        max-width: 100%;
    }

    /* Typography */
    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    h4 { font-size: 1.25rem; }

    /* Navigation */
    .nav-container {
        padding: 0.75rem 15px;
    }

    .nav-logo h1,
    .nav-logo h2 {
        font-size: 1.25rem;
    }

    /* Buttons */
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
        gap: 6px;
    }

    /* Cards and Sections */
    .glass-card {
        padding: 1.5rem;
        border-radius: 15px;
    }

    /* Grid Layouts */
    .projects-grid,
    .positions-grid,
    .cert-grid,
    .achievements-grid,
    .activities-grid,
    .internships-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    /* Contact Section */
    .contact-content {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    .contact-item {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
        gap: 1rem;
    }

    .contact-form {
        padding: 2rem;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr !important;
        gap: 2rem;
        text-align: center;
    }

    .footer-links {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .footer-social {
        justify-content: center;
    }

    /* Activities */
    .activities-content {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    /* Hide large decorative elements on mobile */
    .particle-bg {
        display: none;
    }

    /* Adjust spacing */
    section {
        padding: 60px 0 !important;
    }
}

/* Additional Mobile Optimizations */
@media (max-width: 767px) {
    /* Prevent horizontal scroll */
    html, body {
        overflow-x: hidden;
        width: 100%;
    }

    /* Improve touch targets */
    .nav-link,
    .btn,
    .social-icon,
    .footer-social a {
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Better form experience on mobile */
    .form-group input,
    .form-group textarea {
        font-size: 16px; /* Prevents zoom on iOS */
        border-radius: 8px;
    }

    /* Stack content vertically */
    .hero-content,
    .about-content,
    .internships-timeline {
        display: flex;
        flex-direction: column;
    }

    /* Better spacing for mobile */
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }

    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    /* Mobile-friendly cards */
    .project-card,
    .position-card,
    .cert-card,
    .achievement-card,
    .activity-category {
        margin-bottom: 1rem;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    }

    /* Improve readability */
    p, li {
        font-size: 1rem;
        line-height: 1.6;
    }

    /* Mobile navigation improvements */
    .nav-menu.active {
        z-index: 9999;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }

    /* Better mobile tables */
    .timeline,
    .activities-content {
        overflow-x: auto;
    }
}

/* iPhone specific optimizations */
@media only screen 
    and (device-width: 375px) 
    and (device-height: 812px) 
    and (-webkit-device-pixel-ratio: 3) {
    /* iPhone X/11/12 safe areas */
    .navbar {
        padding-top: env(safe-area-inset-top);
    }

    .nav-menu.active {
        top: calc(70px + env(safe-area-inset-top));
    }
}

/* Tablet specific optimizations */
@media (min-width: 768px) and (max-width: 1024px) {
    /* Better use of tablet screen space */
    .container {
        max-width: 95%;
    }

    /* Optimal grid for tablets */
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    /* Tablet navigation */
    .nav-menu {
        gap: 1.25rem;
    }

    .nav-link {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    /* Better card sizing for tablets */
    .glass-card {
        padding: 2rem;
    }
}

/* Laptop optimizations */
@media (min-width: 1025px) and (max-width: 1440px) {
    .container {
        max-width: 1140px;
    }

    /* Optimal spacing for laptops */
    section {
        padding: 100px 0;
    }

    /* Grid optimizations */
    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem;
    }

    .positions-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

/* 4K and large desktop optimizations */
@media (min-width: 1441px) {
    .container {
        max-width: 1400px;
    }

    /* Larger text for better readability on large screens */
    .section-title {
        font-size: 3rem;
    }

    /* More spacing on large screens */
    section {
        padding: 140px 0;
    }

    /* Larger cards */
    .glass-card {
        padding: 3rem;
    }
}

/* Print styles */
@media print {
    .navbar,
    .hamburger,
    .particle-bg,
    .footer,
    .btn {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    .glass-card {
        background: white !important;
        border: 1px solid #ccc !important;
        box-shadow: none !important;
    }

    section {
        padding: 20px 0 !important;
        page-break-inside: avoid;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .particle-bg,
    .floating-symbols {
        display: none;
    }

    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .glass-card {
        border-width: 2px;
        border-color: #fff;
    }

    .btn {
        border-width: 2px;
    }

    .nav-link:hover,
    .nav-link.active {
        background: #fff;
        color: #000;
    }
}

/* DEBUGGING STYLES - Ensure navigation is always visible */
.navbar {
    display: flex !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 10000 !important;
    background: rgba(10, 10, 10, 0.95) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.nav-container {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0.75rem 20px !important;
}

.nav-logo {
    display: flex !important;
    align-items: center !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.hamburger {
    z-index: 10001 !important;
}

/* Force visibility on all screen sizes */
@media screen {
    .navbar,
    .nav-container,
    .nav-logo,
    .hamburger {
        display: flex !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
}

/* Right side navigation elements */
.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Theme Toggle Button */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.theme-toggle:hover {
    background: rgba(100, 255, 218, 0.1);
    border-color: rgba(100, 255, 218, 0.3);
    color: #64ffda;
}

.theme-toggle i {
    transition: transform 0.3s ease;
}

.theme-toggle:hover i {
    transform: rotate(180deg);
}

/* Theme toggle for mobile */
    .theme-toggle {
        display: none !important;
    }

/* =============================================================================
   FIXED MOBILE NAVIGATION - Clean and Simple
   ============================================================================= */

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .nav-menu.active {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(10, 10, 10, 0.98);
        backdrop-filter: blur(30px);
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding: 2rem 1rem;
        gap: 1rem;
        z-index: 999;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-menu.active .nav-item {
        width: 100%;
        max-width: 300px;
    }

    .nav-menu.active .nav-link {
        width: 100%;
        text-align: center;
        padding: 1rem 2rem;
        border: 1px solid rgba(255, 255, 255, 0.1);
        margin: 0.25rem 0;
    }

    .nav-logo h1 {
        font-size: 1.2rem;
    }

    .nav-right {
        gap: 0.5rem;
    }

    .theme-toggle {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
}

/* =============================================================================
   RESPONSIVE NAVIGATION FOR ALL SCREEN SIZES
   ============================================================================= */

/* Large Desktop (1400px+) */
@media (min-width: 1400px) {
    .nav-container {
        max-width: 1200px;
        padding: 1rem 2rem;
    }
    
    .nav-menu {
        gap: 2rem;
    }
    
    .nav-link {
        font-size: 1rem;
        padding: 0.75rem 1rem;
    }
    
    .nav-logo h1 {
        font-size: 1.5rem;
    }
}

/* Standard Desktop (1200px - 1399px) */
@media (min-width: 1200px) and (max-width: 1399px) {
    .nav-container {
        max-width: 1100px;
        padding: 1rem 1.5rem;
    }
    
    .nav-menu {
        gap: 1.5rem;
    }
    
    .nav-link {
        font-size: 0.95rem;
        padding: 0.7rem 0.9rem;
    }
}

/* Medium Desktop (1024px - 1199px) */
@media (min-width: 1025px) and (max-width: 1199px) {
    .nav-container {
        padding: 1rem 1rem;
    }
    
    .nav-menu {
        gap: 1rem;
    }
    
    .nav-link {
        font-size: 0.9rem;
        padding: 0.6rem 0.7rem;
    }
    
    .nav-logo h1 {
        font-size: 1.2rem;
    }
}

/* Small Desktop/Large Tablet (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .nav-container {
        padding: 1rem 0.8rem;
    }
    
    .nav-menu {
        gap: 0.8rem;
    }
    
    .nav-link {
        font-size: 0.85rem;
        padding: 0.5rem 0.6rem;
    }
    
    .nav-logo h1 {
        font-size: 1.1rem;
    }
    
    .nav-right {
        gap: 0.5rem;
    }
    
    .theme-toggle {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
}

/* Hide hamburger menu on desktop and larger tablets */
@media (min-width: 769px) {
    .hamburger {
        display: none !important;
    }
    
    .nav-menu {
        display: flex !important;
        position: static !important;
        flex-direction: row !important;
        background: transparent !important;
        backdrop-filter: none !important;
        width: auto !important;
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
        left: auto !important;
        top: auto !important;
        transform: none !important;
    }
}

/* Viewport-based responsive navigation to prevent overflow */
@media (max-width: 1200px) {
    .nav-container {
        padding: 1rem 0.5rem;
    }
    
    .nav-menu {
        gap: clamp(0.5rem, 2vw, 1.5rem);
    }
    
    .nav-link {
        font-size: clamp(0.75rem, 2vw, 0.9rem);
        padding: clamp(0.4rem, 1vw, 0.6rem) clamp(0.5rem, 1.5vw, 0.8rem);
    }
    
    .nav-logo h1 {
        font-size: clamp(1rem, 3vw, 1.3rem);
    }
}

/* Force navigation to fit in smaller viewports */
@media (max-width: 1024px) {
    .nav-container {
        padding: 1rem 0.25rem;
    }
    
    .nav-menu {
        gap: clamp(0.3rem, 1.5vw, 1rem);
    }
    
    .nav-link {
        font-size: clamp(0.7rem, 1.8vw, 0.85rem);
        padding: clamp(0.3rem, 0.8vw, 0.5rem) clamp(0.4rem, 1.2vw, 0.6rem);
    }
    
    .nav-logo h1 {
        font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    }
    
    .theme-toggle {
        width: clamp(32px, 8vw, 36px);
        height: clamp(32px, 8vw, 36px);
        font-size: clamp(0.8rem, 2vw, 1rem);
    }
}

/* Additional mobile navigation fixes */
@media (max-width: 768px) {
    .nav-menu.active {
        left: 0 !important;
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        transform: translateX(0) !important;
        position: fixed !important;
        z-index: 9999 !important;
        pointer-events: auto !important;
    }
    
    .nav-menu:not(.active) {
        left: -100% !important;
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        transform: translateX(-100%) !important;
        pointer-events: none !important;
    }
    
    /* Prevent body scroll when menu is open */
    body.nav-open {
        overflow: hidden !important;
        position: fixed !important;
        width: 100% !important;
    }
    
    /* Ensure hamburger stays clickable */
    .hamburger {
        z-index: 10000 !important;
        pointer-events: auto !important;
        position: relative !important;
    }
    
    /* Ensure nav items are clickable */
    .nav-item {
        pointer-events: auto !important;
        position: relative !important;
        z-index: 1000 !important;
    }
    
    .nav-link {
        pointer-events: auto !important;
        position: relative !important;
        z-index: 1000 !important;
        user-select: none !important;
        -webkit-user-select: none !important;
        -webkit-touch-callout: none !important;
    }
}
