/* ============================================
   RESPONSIVE — Dev Davda Portfolio
   Breakpoints: 480, 768, 1024, 1280, 1440, 1920+
   ============================================ */

/* ─── Ultra-wide screens (1920px+) ─── */
@media (min-width: 1920px) {
    :root {
        --section-padding-y: 10rem;
    }
    .container {
        max-width: 1600px;
    }
    .hero-title {
        font-size: 9rem;
    }
}

/* ─── Large Desktop (1440px+) ─── */
@media (min-width: 1440px) {
    .skills-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .tech-grid {
        grid-template-columns: repeat(8, 1fr);
    }
}

/* ─── Desktop (1280px) ─── */
@media (max-width: 1280px) {
    .hero-title {
        font-size: clamp(3rem, 7vw, 6rem);
    }
    .about-grid {
        gap: var(--space-8);
    }
}

/* ─── Small Desktop / Laptop (1024px) ─── */
@media (max-width: 1024px) {
    :root {
        --section-padding-y: 5rem;
    }

    .hero-content {
        padding: 0 var(--space-6);
    }
    .hero-title {
        font-size: clamp(2.5rem, 6vw, 5rem);
    }
    .hero-subtitle {
        font-size: 1.1rem;
    }
    .hero-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }

    .about-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .about-image-wrapper {
        justify-self: center;
        max-width: 300px;
    }
    .about-stats {
        justify-content: center;
    }

    .skills-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .tech-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    .projects-grid {
        grid-template-columns: 1fr;
        max-width: 600px;
        margin: 0 auto;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

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

/* ─── Tablet (768px) ─── */
@media (max-width: 768px) {
    :root {
        --section-padding-y: 4rem;
        --section-padding-x: 1.5rem;
    }

    /* Navigation - Mobile */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 400px;
        height: 100vh;
        background: rgba(5, 5, 16, 0.97);
        backdrop-filter: blur(30px);
        -webkit-backdrop-filter: blur(30px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: var(--space-6);
        transition: right 0.5s var(--ease-out-expo);
        z-index: calc(var(--z-navbar) - 1);
        border-left: 1px solid rgba(0, 212, 255, 0.1);
    }
    .nav-menu.active {
        right: 0;
    }
    .nav-menu a {
        font-size: 1.3rem;
    }
    .nav-toggle {
        display: flex !important;
    }
    .nav-resume-btn {
        display: none;
    }

    /* Hero */
    .hero-content {
        padding: 0 var(--space-4);
    }
    .hero-title {
        font-size: clamp(2rem, 10vw, 3.5rem);
        letter-spacing: -0.02em;
    }
    .hero-subtitle {
        font-size: 1rem;
    }
    .hero-description {
        font-size: 0.95rem;
    }
    .hero-buttons {
        gap: var(--space-3);
    }
    .hero-buttons .btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.85rem;
    }
    .hero-social {
        gap: var(--space-4);
    }
    #hero-canvas {
        opacity: 0.3;
    }

    /* About */
    .about-grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }
    .about-image-wrapper {
        width: 220px;
        height: 220px;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Timeline */
    .timeline::before {
        display: none !important;
    }
    .timeline-line {
        left: 20px;
    }
    .timeline-item {
        padding-left: 60px;
        padding-right: 0;
    }
    .timeline-item:nth-child(even) {
        padding-left: 60px;
        padding-right: 0;
    }
    .timeline-dot {
        left: 12px !important;
        right: auto !important;
    }
    .timeline-content {
        text-align: left;
    }

    /* Skills */
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-4);
    }

    /* Tech */
    .tech-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: var(--space-4);
    }

    /* Education */
    .education-timeline {
        padding-left: 30px;
    }

    /* Certifications */
    .cert-grid {
        grid-template-columns: 1fr;
    }

    /* Achievements */
    .achievements-grid {
        grid-template-columns: 1fr;
    }

    /* Contact */
    .contact-info-grid {
        grid-template-columns: 1fr;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    /* Section headings */
    .section-heading {
        margin-bottom: var(--space-8);
    }
    .section-heading h2 {
        font-size: clamp(1.8rem, 5vw, 2.5rem);
    }

    /* Custom cursor - disable on touch */
    .custom-cursor,
    .cursor-follower {
        display: none !important;
    }
}

/* ─── Mobile (480px) ─── */
@media (max-width: 480px) {
    :root {
        --section-padding-y: 3rem;
        --section-padding-x: 1rem;
    }

    .hero-title {
        font-size: clamp(1.8rem, 12vw, 2.8rem);
    }
    .hero-subtitle {
        font-size: 0.9rem;
    }
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    .hero-buttons .btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-3);
    }
    .stat-card {
        padding: var(--space-4);
    }
    .stat-number {
        font-size: 1.8rem;
    }

    .skills-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-3);
    }
    .skill-card {
        padding: var(--space-4);
    }

    .tech-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-3);
    }

    .timeline-item {
        padding-left: 45px;
    }
    .timeline::before {
        left: 15px;
    }
    .timeline-dot {
        left: 8px !important;
        width: 16px;
        height: 16px;
    }

    .project-card {
        padding: var(--space-4);
    }

    .modal-content {
        padding: var(--space-4);
        margin: var(--space-4);
        max-height: 85vh;
    }

    .contact-form {
        padding: var(--space-4);
    }

    .nav-menu {
        width: 100%;
        max-width: 100%;
    }

    .section-heading h2 {
        font-size: clamp(1.5rem, 8vw, 2rem);
    }
}

/* ─── Landscape Mobile ─── */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        min-height: auto;
        padding: var(--space-6) 0;
    }
    .hero-title {
        font-size: 2.5rem;
    }
    .preloader {
        padding: var(--space-4);
    }
    #hero-canvas {
        opacity: 0.2;
    }
}

/* ─── Print Styles ─── */
@media print {
    .preloader,
    .custom-cursor,
    .cursor-follower,
    .scroll-progress,
    .navbar,
    #hero-canvas,
    .particles-container,
    .aurora-bg,
    .noise-overlay,
    .back-to-top,
    .nav-toggle {
        display: none !important;
    }

    body {
        background: white !important;
        color: #333 !important;
    }

    section {
        page-break-inside: avoid;
        padding: 1rem 0 !important;
    }

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

    a {
        color: #333 !important;
        text-decoration: underline;
    }

    .hero-title {
        color: #111 !important;
        text-shadow: none !important;
    }

    * {
        animation: none !important;
        transition: none !important;
    }
}

/* ─── High Contrast / Accessibility ─── */
@media (forced-colors: active) {
    .glass-card {
        border: 2px solid ButtonText;
    }
    .btn {
        border: 2px solid ButtonText;
    }
}

/* ─── Touch Device Adjustments ─── */
@media (hover: none) and (pointer: coarse) {
    .hover-lift:hover {
        transform: none;
    }
    .hover-scale:hover {
        transform: none;
    }
    .custom-cursor,
    .cursor-follower {
        display: none !important;
    }
    .skill-card:hover,
    .tech-item:hover,
    .project-card:hover {
        transform: none;
    }
}
