/* Responsive Design System */

/* Tablet & Smaller Laptops (max-width: 1024px) */
@media (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }

    .glitch-text {
        font-size: 10vw;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .about-info {
        padding: 32px;
    }

    .identity-panels {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .strength-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .map-container-wrapper {
        min-height: 500px;
    }

    .connection-matrix {
        grid-template-columns: 1fr 1fr; /* Keep 2x2 */
    }
}

/* Mobile Devices (max-width: 768px) */
@media (max-width: 768px) {
    /* Hide Custom Cursor only on actual touch interactions if handled by JS */
    .cursor, .cursor-follower {
        opacity: 0;
        pointer-events: none;
    }

    /* Reset Cursor */
    /* Handled by body cursor: none and JS */

    /* Navbar */
    .navbar {
        padding: 20px;
    }

    .logo {
        font-size: 1.2rem;
    }

    /* Hero Section */
    .hero-text {
        margin-top: -50px; /* Visual balance */
    }

    .glitch-text {
        font-size: 15vw; /* Larger relative to screen width */
    }

    .subtitle {
        font-size: 1rem;
        letter-spacing: 2px;
    }

    .hero-footer {
        flex-direction: column;
        align-items: center;
        gap: 15px;
        bottom: 20px;
        padding: 0 20px;
    }

    .scroll-indicator {
        display: flex; /* Show on mobile */
    }

    .scroll-indicator span {
        font-size: 0; /* Hide default text */
    }

    .scroll-indicator span::before {
        content: "SCROLL UP"; /* Mobile specific text */
        font-size: 0.8rem;
        display: block;
    }

    /* Marquee */
    .marquee-section {
        margin: 30px 0;
        padding: 40px 0;
    }

    .marquee-content {
        font-size: 2.5rem;
    }

    .marquee-separator {
        margin: 0 15px;
        font-size: 2rem;
    }

    /* About & Identity */
    .about-section {
        padding: 60px 20px;
    }

    .large-text {
        font-size: 2.2rem;
        line-height: 1.1;
    }

    .about-info {
        padding: 24px;
        gap: 24px;
    }

    .identity-card {
        padding: 24px;
        gap: 24px;
    }

    .identity-panels {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .id-module {
        padding: 20px;
    }

    .map-container-wrapper {
        min-height: 400px;
    }

    .map-hud {
        padding: 20px;
        gap: 15px;
    }

    .hud-topbar h4 {
        font-size: 1.4rem;
    }

    .hud-status {
        font-size: 0.8rem;
    }

    .hud-footer {
        padding: 12px 15px;
        gap: 10px;
    }

    .hud-chip {
        font-size: 0.7rem;
        padding: 6px 10px;
    }

    .code-font {
        font-size: 0.65rem !important;
    }

    .map-visual {
        min-height: 350px;
    }

    .map-overlay-panel {
        position: relative;
        width: 100%;
        right: auto;
        bottom: auto;
        margin-top: 15px;
        padding: 15px;
        backdrop-filter: none;
        background: rgba(0, 0, 0, 0.4);
    }

    /* Projects */
    .work-section {
        padding: 60px 20px;
    }

    .project-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px; /* Reduced padding for mobile */
        gap: 15px;
        background: rgba(255, 255, 255, 0.05);
        border-color: rgba(255, 255, 255, 0.2);
    }

    .project-item:hover {
        padding-left: 20px; /* No shift */
        background: rgba(255, 255, 255, 0.05);
    }

    .project-header {
        width: 100%;
        flex-wrap: wrap; /* Allow wrapping */
        gap: 10px;
        margin-bottom: 10px;
    }

    .project-num {
        order: 1;
        font-size: 0.9rem;
    }

    .project-cat {
        order: 2;
        margin-left: auto; /* Push to right */
        font-size: 0.7rem;
    }

    .project-title {
        order: 3;
        width: 100%; /* Full width on new line */
        font-size: 1.8rem;
        margin-top: 5px;
        text-align: left;
    }

    .project-details {
        text-align: left;
        width: 100%;
        font-size: 0.9rem;
    }

    .tech-tags {
        margin-top: 10px;
    }

    .tech-tags span {
        margin-left: 0;
        margin-right: 10px;
        display: inline-block;
    }

    /* Contact */
    .contact-section {
        padding: 60px 20px;
    }

    .contact-title {
        font-size: 1.5rem; /* Reduced to fit mobile screens */
        margin-bottom: 40px;
        word-wrap: break-word;
    }

    .connection-matrix {
        grid-template-columns: 1fr; /* Stack vertically on mobile */
        gap: 15px;
    }
    
    .matrix-item {
        padding: 20px; /* Comfortable touch target */
    }

    .footer {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .footer-left, .footer-right {
        justify-content: center;
        width: 100%;
        font-size: 0.7rem;
        display: flex; /* Ensure flex for centering */
    }
}

/* Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
    .glitch-text {
        font-size: 13vw; /* Reduced to prevent overflow on small screens */
    }
    
    .matrix-item {
        padding: 15px;
    }
    
    .matrix-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}
