
/* Mobile Optimization */
@media (max-width: 480px) {
    .universe-core {
        width: 80px;
        height: 80px;
        margin-bottom: 20px;
    }

    .scan-title {
        font-size: 0.8rem;
        letter-spacing: 2px; /* Prevent text clipping on narrow screens */
        text-align: center;
    }

    .status-bar {
        width: 180px; /* Shorter bar for small screens */
        height: 8px;
    }

    .terminal-bracket {
        font-size: 1.2rem;
    }

    .data-grid {
        font-size: 0.5rem;
        padding: 0 10px;
    }

    .loader-sub {
        font-size: 0.7rem;
        text-align: center;
    }
}

/* Extra small devices / Foldables */
@media (max-width: 320px) {
    .status-bar {
        width: 140px;
    }
    
    .scan-title {
        font-size: 0.7rem;
        letter-spacing: 1px;
    }
}


/* ================= 1. DESKTOP NAV (Only shows above 769px) ================= */
@media screen and (min-width: 769px) {

    .menu-toggle,
    .system-status,
    .mobile-socials,
    .asteroid-field {
        display: none !important;
    }

    .nav-links {
        display: flex;
        gap: 30px;
        align-items: center;
        font-family: 'JetBrains Mono', monospace;
        font-size: 8px;
        letter-spacing: 2px;
    }

    /* Hide the mobile-only containers on desktop */
    .main-menu-links {
        display: flex;
        align-items: center;
        gap: 20px;

    }
}

/* ================= 2. MOBILE HUD (Only shows below 768px) ================= */
@media screen and (max-width: 768px) {

      html,
    body {
        overflow-x: hidden;
    }

    /* Hide desktop-only elements */
    .nav-links span {
        display: none;
    }

    .menu-toggle {
        display: block;
        cursor: pointer;
        z-index: 1001;
    }

   
    .nav-links.is-active {
        left: 0;
        display: flex !important;
        /* Ensure it shows when active */
    }



    .main-menu-links {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 15px;
        margin-top: 130px;
        width: 100%;
        z-index: 2;
    }


    /* HIDE SOCIAL HUB WHEN MENU IS OPEN */
    #mobile-menu.is-active~.tech-social-hub {
        display: none !important;
    }


      /* Hide desktop pipes */

    .menu-toggle .bar {
        display: block;
        width: 25px;
        height: 2px;
        margin: 5px auto;
        background-color: #00d9ff;
        transition: all 0.3s ease-in-out;
        box-shadow: 0 0 5px #00d9ff;
    }

    /* Hamburger Animation to X */
    #mobile-menu.is-active .bar:nth-child(2) {
        opacity: 0;
    }

    #mobile-menu.is-active .bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    #mobile-menu.is-active .bar:nth-child(3) {
        transform: translateY(-7px) rotate(-135deg);
    }





    .nav-links {
        position: fixed;
        top: 0;
        left: -100%;
        width: 75%;
        height: 100dvh;
        backdrop-filter: blur(10px);

        display: flex !important;
        flex-direction: column !important;

        /* --- ALIGNMENT FIX --- */
        justify-content: flex-start !important;
        /* Pushes content to top */
        align-items: center;
        padding: 60px 0 40px 0;
        /* More padding at top for logo/status */

        transition: 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
        z-index: 1000;
        border-right: 1px solid rgba(0, 217, 255, 0.15);
        overflow: hidden;

        /* --- THE COSMIC BACKGROUND (Stars + SVG Clouds + Moon) --- */
        background:
            radial-gradient(circle at 85% 10%, rgba(0, 217, 255, 0.1) 0%, transparent 20%),
            url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" opacity="0.15"><path fill="%2300d9ff" d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96z"/></svg>'),
            url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%"><circle cx="20%" cy="30%" r="1" fill="%23fff" opacity="0.3"/><circle cx="70%" cy="20%" r="1" fill="%23fff" opacity="0.3"/><circle cx="40%" cy="80%" r="1.5" fill="%23fff" opacity="0.4"/></svg>'),
            /* 4. The Deep Space Gradient */
            radial-gradient(circle at 50% 50%, rgba(5, 5, 5, 0.98) 0%, rgba(0, 0, 0, 1) 100%);

        background-repeat: no-repeat, repeat, repeat, no-repeat;
        background-size: 150px 150px, 200px 100px, cover, cover;
        background-position: top right, 20% 15%, center, center;
        background-blend-mode: screen, overlay, overlay, normal;
    }

    .nav-links.is-active {
        left: 0;
        box-shadow: 10px 0 30px rgba(0, 217, 255, 0.1);
    }
    
    .nav-links a {
        font-size: 16px;
        letter-spacing: 2px;
        color: rgba(255, 255, 255, 0.6);
        margin: 10px 0;
        text-decoration: none;
        transition: all 0.3s ease;
    }

    .nav-links a:hover {
        color: #00d9ff;
        text-shadow: 0 0 10px rgba(0, 217, 255, 0.8);
    }


    /* 3. STATUS LOG & LINKS */
    .system-status {
        width: 80%;
        font-size: 8px;
        letter-spacing: 2px;
        color: rgba(0, 217, 255, 0.3);
        display: flex;
        flex-direction: column;
        gap: 5px;
        align-items: center;
        border-bottom: 1px dashed rgba(0, 217, 255, 0.05);
        padding-bottom: 15px;
    }



    .mobile-socials {
        margin-top: auto !important;
        padding-bottom: 80px !important;
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        z-index: 5;
    }

    .divider {
        width: 60%;
        height: 1px;
        background: rgba(0, 217, 255, 0.1);
        position: relative;
        margin-bottom: 30px;
    }

    /* THIS IS THE PART THAT WAS MISSING */
    .divider span {
        position: absolute;
        top: -10px;
        /* Aligns perfectly on top of the line */
        left: 40%;
        transform: translateX(-50%);
        background: #000;
        /* Matches your galaxy background */
        padding: 0 10px;
        font-size: 8px;
        color: #ffaa00;
        letter-spacing: 2px;
        text-transform: uppercase;
        display: block;
        /* Ensures it stays visible */
        z-index: 2;

    }

    .social-icons {
        display: flex;
        gap: 30px;
    }

    .social-icons a {
        border: none;
        font-size: 20px;
        color: rgba(255, 255, 255, 0.5);
        transition: all 0.3s ease;
    }

    .social-icons a:hover {
        color: #ffaa00;
        text-shadow: 0 0 15px #ffaa00;
    }

    /* 6. ANIMATIONS */
    @keyframes engineBlast {
        0% {
            transform: translateY(-150px) rotate(10deg);
            opacity: 0;
        }

        10% {
            opacity: 1;
        }

        90% {
            opacity: 1;
        }

        100% {
            transform: translateY(110vh) rotate(10deg);
            opacity: 0;
        }
    }

}


/* --- UNIVERSAL RESPONSIVE OVERRIDES --- */

/* Tablets & Small Laptops (iPad, etc.) */
@media (max-width: 1024px) {
    .full-name {
        font-size: 7vw; /* Keeps name on one line */
        white-space: nowrap; 
    }
    
    .button-space {
        gap: 25px;
    }
}

/* Mobile Devices (Realme, Oppo, iPhone, etc.) */
@media (max-width: 768px) {
    /* 1. Alignment Shift */
    .identity-wrapper {
        margin-top: -10vh; /* Moves it up for better thumb-reach */
        width: 100%;
        padding: 0 10px;
    }

    /* 2. Force Name on One Line */
    .full-name {
        font-size: 2.5rem; /* Adjusted so it fits any phone width in one row */
        white-space: nowrap; 
        letter-spacing: -1px;
        display: block; 
    }

    .logo-initials {
        font-size: 1rem;
        letter-spacing: 10px;
    }

    /* 3. Fix Typing Jump */
    .build-engine {
        min-height: 60px; /* Locked space so buttons don't move */
        margin-top: 15px;
        font-size: 13px;
    }

    /* 4. Buttons: One below the other, Bigger size */
    .button-space {
        flex-direction: column; /* Stacks them */
        gap: 20px;
        width: 100%;
        max-width: 280px; /* Standardizes width for all phones */
        margin-top: 20px;
    }

    .liquid-btn {
        width: 100%;
        padding: 22px 0; /* Bigger vertical size */
        font-size: 12px;
        text-align: center;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .glass-fill {
        /* Slightly normalize shape for mobile so text stays centered */
        border-radius: 50% 20% 50% 20% / 20% 50% 20% 50%;
    }

  
}

/* Extra Small Screens (iPhone SE, small Realme) */
@media (max-width: 380px) {
    .full-name {
        font-size: 1.9rem; /* Shrinks just enough to avoid horizontal scroll */
    }
    
    .button-space {
        max-width: 240px;
    }
}


/* --- CORRECTED RESPONSIVE STYLES (768px and below) --- */
@media (max-width: 768px) {

    .calm-horizon {
        padding: 40px 20px;
        align-items: flex-start;
    }

    /* 🌙 Moon spacing - moved inward from the edge */
    .cinematic-moon {
        width: 60px;
        height: 60px;
        box-shadow: 10px 10px 0 0 rgba(255, 255, 255, 1);
    }

    /* 📍 Location stays at the far left edge */
    .top-hud-group {
        align-items: flex-start;
        text-align: left;
        width: 100%;
        margin-bottom: 20px;
    }

    /* 👋 Hello shifts to a left-center spot */
    .about_section_name {
        font-size: 3.3rem;
        /* margin-top: 30px !important; */
        align-self: flex-start;
        margin-left: 10%;
        /* Pushes it away from the hard left edge */
    }

    .cat-o {
        width: 45px;
        height: 45px;
    }

    /* 🛠️ THE FIX: Stacks J-container on top and Bio on the bottom */
    .about-content-wrapper {
        flex-direction: column;
        /* Stacks everything vertically */
        align-items: flex-start;
        /* Aligns everything to the left */
        gap: 35px;
        width: 100%;
        max-width: 100%;
    }

    /* 🐈 J, Cat, and Buttons grouping */
    .j-container {
        flex-direction: row;
        align-items: center;
        gap: 45px;
        width: auto;
    }

    .big-j {
        font-size: 10rem;
    }

    .sitting-cat {
        width: 160px;
        bottom: 15px;
        left: 25px;
    }

    /* Buttons stack vertically next to the J */
    .quick-actions-sidebar {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .sidebar-btn {
        font-size: 0.8rem;
        padding: 5px 0;
        text-align: left;
    }

    .career-content {
        width: 100%;
        max-width: 100%;
        padding-bottom: 20px !important;
        /* 🛠️ Adds that 30px clean space at the very bottom */
    }

   
    .code-line {
        text-align: left;
        margin-bottom: 5px;
    }

    .code-line:hover {
        transform: translateX(5px);
    }

    .status-card,
    .intern-content {
        width: 85%;
        padding: 30px 20px;
    }
}

/* --- EXTRA SMALL SCREENS (Phones under 400px) --- */
@media (max-width: 400px) {

    .calm-horizon {
        padding: 30px 15px;
    }

    .cinematic-moon {
        top: 20px;
        right: 30px;
        width: 45px;
        height: 45px;
    }

    .about_section_name {
        font-size: 2.2rem;
        margin-left: 5%;
    }

    /* Shrink J & Cat on super tight screens */
    .big-j {
        font-size: 7rem;
    }

    .sitting-cat {
        width: 100px;
        bottom: 6px;
        left: 10px;
    }


    .sidebar-btn {
        font-size: 0.7rem;
        letter-spacing: 1px;
    }

  
}


/* --- EXTRA SMALL SCREENS (Phones under 400px) --- */
@media (max-width: 400px) {

    .calm-horizon {
        padding: 30px 15px;
    }

    /* 🌙 Moon pushes inward so it doesn't touch the edge */
    .cinematic-moon {
        top: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        box-shadow: 6px 6px 0 0 rgba(255, 255, 255, 1);
    }

    /* 📍 Location stays far left edge */
    .top-hud-group {
        align-items: flex-start;
        text-align: left;
    }

    /* 👋 Hello pushed down a bit and centered-left */
    .about_section_name {
        font-size: 2.2rem;
        margin-left: 5%;
        margin-top: 25px;
        /* Pushed down from the location HUD */
    }

    /* 🛠️ Stacks everything vertically */
    .about-content-wrapper {
        flex-direction: column;
        align-items: flex-start;

    }

    /* 🐈 J, Cat, and buttons in a row above text */
    .j-container {
        flex-direction: row;
        align-items: center;
        gap: 20px;
    }

 
  
    .sidebar-btn {
        font-size: 0.7rem;
        letter-spacing: 1px;
    }

    
}













/* Enable cursor on mobile but make it small */
@media (max-width: 768px) {
    body {
        cursor: auto;
        /* Show default so users don't get lost */
        overflow-x: hidden;
    }

    .cursor,
    .cursor-follower {
        display: block;
        /* Keep it visible for the "cool" factor */
        opacity: 0.7;
    }

    .name {
        font-size: 2.2rem;
        /* Shrink for mobile screens */
    }

    .role {
        font-size: 1rem;
    }

    .desc {
        font-size: 0.9rem;
        padding: 0 20px;
    }

    .card {
        width: 90%;
        margin: 0 auto;
    }
}




@media screen and (max-width: 768px) {
    .sky-container {
        position: absolute;
        inset: 0;
        overflow: hidden;
        z-index: -1;
        background: radial-gradient(circle at 50% 100%, #050a15 0%, #000 100%);
    }

    /* 1. THE METEOR (FIREBALL) */
    .meteor {
        position: absolute;
        width: 3px;
        height: 3px;
        background: #fff;
        border-radius: 50%;
        box-shadow: 0 0 15px #fff, 0 0 30px #00d9ff, 0 0 50px #8c00ff;
        animation: meteorSlide 15s linear infinite;
        opacity: 0;
    }

    .meteor::after {
        content: "";
        position: absolute;
        top: 50%;
        right: 0;
        transform: translateY(-50%);
        width: 120px;
        height: 1px;
        /* Fading gas tail */
        background: linear-gradient(to left, rgba(0, 217, 255, 0.8), rgba(140, 0, 255, 0.2), transparent);
        filter: blur(1px);
    }

    @keyframes meteorSlide {
        0% {
            bottom: -10%;
            left: -10%;
            opacity: 0;
        }

        5% {
            opacity: 1;
        }

        90% {
            opacity: 1;
        }

        100% {
            bottom: 110%;
            left: 80%;
            opacity: 0;
        }
    }

    .tech-moon {
        position: absolute;
        top: 10%;
        right: 10%;
        width: 60px;
        height: 60px;
        border-radius: 50%;
        box-shadow: 15px 15px 0 0 #00d9ff;
        opacity: 0.4;
        filter: blur(1px);
    }

    /* 3. TWINKLING STARS BACKGROUND */
    .star-field {
        position: absolute;
        width: 200%;
        height: 200%;
        background-image:
            radial-gradient(1px 1px at 20px 30px, #fff, rgba(0, 0, 0, 0)),
            radial-gradient(1px 1px at 40px 70px, #00d9ff, rgba(0, 0, 0, 0)),
            radial-gradient(1px 1px at 50px 160px, #fff, rgba(0, 0, 0, 0)),
            radial-gradient(1px 1px at 90px 40px, #8c00ff, rgba(0, 0, 0, 0));
        background-size: 200px 200px;
        animation: starsSlowMove 100s linear infinite;
        opacity: 0.4;
    }

    @keyframes starsSlowMove {
        from {
            transform: translateY(0);
        }

        to {
            transform: translateY(-500px);
        }
    }
}







@media screen and (max-width: 768px) {
    .cosmic-horizon {
        position: absolute;
        inset: 0;
        overflow: hidden;
        z-index: -1;
        background: linear-gradient(to bottom, #000 0%, #050a15 70%, #0a1a2f 100%);
    }

    /* 1. TWINKLING STARS */
    .star-field {
        position: absolute;
        width: 100%;
        height: 100%;
        background-image:
            radial-gradient(1px 1px at 10% 20%, #fff, transparent),
            radial-gradient(1.5px 1.5px at 50% 40%, #00d9ff, transparent),
            radial-gradient(1px 1px at 80% 15%, #fff, transparent);
        background-size: 250px 250px;
        opacity: 0.3;
        animation: twinkle 4s ease-in-out infinite alternate;
    }


    .clouds {
        position: absolute;
        width: 200px;
        height: 100px;
        background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="%2300d9ff" d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96z"/></svg>');
        background-repeat: no-repeat;
        background-size: contain;
        opacity: 0.13;
        filter: blur(4px);
        z-index: -2;
    }

    /* Individual Cloud Variations */
    .cloud-1 {
        top: 15%;
        animation: cloudDrift 90s linear infinite;
    }

    .cloud-2 {
        top: 25%;
        animation: cloudDrift 120s linear infinite;
        animation-delay: -20s;
    }

    .cloud-3 {
        top: 10%;
        animation: cloudDrift 150s linear infinite;
        animation-delay: -50s;
    }

    @keyframes cloudDrift {
        0% {
            left: -60%;
        }

        100% {
            left: 120%;
        }
    }

    /* 3. THE MOON */
    .tech-moon {
        position: absolute;
        top: 8%;
        right: 12%;
        width: 50px;
        height: 50px;
        border-radius: 50%;
        box-shadow: 12px 12px 0 0 rgba(0, 217, 255, 0.7);
        /* Low transparency moon */
    }

    /* 4. THE SLOW MOVING STONE (Meteor) */
    .shooting-stone {
        position: absolute;
        width: 4px;
        height: 4px;
        background: rgba(255, 255, 255, 0.8);
        border-radius: 50%;
        box-shadow: 0 0 15px #00d9ff;
        animation: cosmicTravel 25s ease-in-out infinite;
        opacity: 0.4;
    }


    @media screen and (max-width: 768px) {
        .ocean-container {
            position: absolute;
            bottom: 0;
            width: 100%;
            height: 15dvh;
            opacity: 0.3;
            /* Slightly more visible as requested */
            overflow: hidden;
            z-index: -1;
        }

        .wave {
            position: absolute;
            bottom: 0;
            width: 400%;
            /* Wider for smoother movement */
            height: 80%;
            background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%2300d9ff" d="M0,160L48,176C96,192,192,224,288,213.3C384,203,480,149,576,149.3C672,149,768,203,864,218.7C960,235,1056,213,1152,186.7C1248,160,1344,128,1392,112L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
            background-size: 25% 100%;
            animation: waveMove 20s linear infinite;
        }

        .wave2 {
            bottom: 10px;
            opacity: 0.6;
            filter: blur(2px);
            /* Soft aesthetic shade */
            animation: waveMove 25s linear infinite reverse;
        }

        /* Added a 3rd layer for extra depth */
        .wave3 {
            position: absolute;
            bottom: -20px;
            width: 400%;
            height: 110%;
            background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%238c00ff" d="M0,160L48,176C96,192,192,224,288,213.3C384,203,480,149,576,149.3C672,149,768,203,864,218.7C960,235,1056,213,1152,186.7C1248,160,1344,128,1392,112L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
            background-size: 25% 100%;
            opacity: 0.2;
            animation: waveMove 35s linear infinite;
        }

        @keyframes waveMove {
            from {
                transform: translateX(0);
            }

            to {
                transform: translateX(-50%);
            }
        }
    }

}




