/* =========================================
   📱 MOBILE RESPONSIVENESS & ACCESSIBILITY
   ========================================= */

@media (max-width: 900px) {
    /* Hide heavy background effects on mobile for better performance and layout */
    .edge-light { display: none; }

    .hero-section {
        flex-direction: column;
        text-align: center;
        gap: 40px;
        padding: 110px 20px 80px 20px;
        min-height: 100vh;
        justify-content: center;
    }

    /* CRITICAL FIX: Remove fixed 600px width so text fits the screen */
    .content {
        width: 100%;
        max-width: 100%;
    }

    .profile-card {
        width: 220px;
        height: 220px;
        margin-bottom: 30px;
    }

    .hi {
        font-size: 2rem;
    }

    .navindu, .vishvanath {
        font-size: 2.8rem;
        white-space: normal; /* Allow wrapping if needed */
    }

    .vishvanath {
        padding-left: 0;
        display: block;
        margin-top: 5px;
    }

    /* Clean up the Amoeba/Venom shape into a standard card for mobile */
    .amoeba-container {
        padding: 40px 24px;
        border-radius: 24px; /* Stop the morphing animation shape */
        animation: none; /* Save mobile battery/CPU */
    }

    .venom-tendril, .venom-drip {
        display: none; /* Hide the weird floating blobs on mobile */
    }

    .about-section {
        justify-content: center;
        padding: 80px 16px;
        min-height: auto;
        background-size: cover;
    }

    .venom-wrap {
        max-width: 100%;
        width: 100%;
    }

    .posts-section,
    .projects-section {
        padding: 80px 16px;
    }

    .posts-grid,
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .post-card.featured {
        grid-column: span 1;
    }

    /* Push contact content up so the bottom social bar doesn't cover the send button */
    .contact-section {
        padding: 80px 16px 120px 16px;
        min-height: auto;
    }

    .contact-container { 
        padding: 32px 24px; 
    }

    /* Bottom Social Bar Fixes */
    .social-sidebar {
        left: 0;
        right: 0;
        top: auto;
        bottom: 0;
        transform: none;
        flex-direction: row;
        justify-content: center;
        gap: 30px;
        padding: 14px 0;
        background: var(--surface-glass);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        border-top: 1px solid var(--border);
        z-index: 600;
    }
    .social-line { display: none; }

    /* Top Navigation Fixes */
    .main-nav {
        top: 12px;
        right: 12px;
        left: 12px;
        justify-content: space-between;
        padding: 8px 12px 8px 16px;
    }
    .nav-toggle { display: flex; }
    .nav-links {
        position: absolute;
        top: calc(100% + 12px);
        right: 0;
        left: auto;
        width: auto;
        min-width: 160px;
        flex-direction: column;
        align-items: flex-end;
        gap: 16px;
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: 18px;
        padding: 20px 24px;
        box-shadow: 0 15px 35px var(--shadow);
        opacity: 0;
        transform: translateY(-10px);
        pointer-events: none;
        transition: opacity 0.25s ease, transform 0.25s ease;
    }
    .nav-links.open {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    /* Hide dot-nav on mobile as it's too small to tap */
    .dot-nav { display: none; }
}

@media (max-width: 600px) {
    .hi { font-size: 1.8rem; }
    .navindu, .vishvanath { font-size: 2.4rem; }
    .amoeba-container h2,
    .section-head h2 { font-size: 1.8rem; }
    .contact-container h2 { font-size: 1.8rem; }
    .send-btn { font-size: 1.1rem; }
        /* Modern Footer Mobile Fixes */
    .site-footer {
        padding: 50px 16px 100px 16px; /* 100px bottom padding clears the fixed mobile social bar */
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* =========================================
   ♿ REDUCED MOTION
   ========================================= */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.15s !important;
        scroll-behavior: auto !important;
    }
    .bulb-assembly {
        transform: translateY(0) !important;
        opacity: 1 !important;
    }
    .edge-light,
    .grid-plane {
        animation: none !important;
    }
}