/* ═══════════════════════════════════════════════════
   RESPONSIVE STYLES — All Breakpoints
   ═══════════════════════════════════════════════════ */

/* ─── EXTRA LARGE DESKTOPS (1400px+) ─── */
@media (min-width: 1400px) {
    .hero-title { font-size: 5.5rem; }
    .hero-image-wrapper { width: 380px; height: 380px; }
    .services-grid { gap: 2rem; }
    .projects-grid { gap: 2rem; }
}

/* ─── LARGE DESKTOPS (1200px - 1399px) ─── */
@media (max-width: 1399px) {
    .footer-top { gap: 2rem; }
}

/* ─── LAPTOPS / SMALL DESKTOPS (992px - 1199px) ─── */
@media (max-width: 1199px) {
    .hero-image-wrapper { width: 300px; height: 300px; }
    .services-grid { grid-template-columns: repeat(3, 1fr); gap: 1rem; }
    .service-card { padding: 2rem 1.5rem; }
    .about-grid { gap: 3rem; }
    .footer-top { grid-template-columns: 1.2fr 1fr 1fr 1fr; gap: 1.5rem; }
}

/* ─── TABLETS LANDSCAPE (768px - 991px) ─── */
@media (max-width: 991px) {
    /* Navigation - Mobile Menu */
    .nav-links {
        display: none;
        flex-direction: column;
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(10, 10, 15, 0.97);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        justify-content: center;
        align-items: center;
        gap: 1.8rem;
        z-index: 1001;
        padding: 0;
    }
    .nav-links.mobile-open { display: flex; }
    [data-theme="light"] .nav-links.mobile-open {
        background: rgba(245, 245, 248, 0.97);
    }
    .nav-links li { list-style: none; }
    .nav-links a {
        font-size: 1.4rem !important;
        letter-spacing: 0.03em;
    }
    .nav-cta { font-size: 1rem !important; padding: 0.7rem 2rem !important; }
    .menu-toggle { display: flex; }

    /* Hero */
    .hero { padding: 100px 0 60px; }
    .hero-visual {
        display: flex;
        justify-content: center;
        margin-top: 3rem;
    }
    .hero-image-wrapper { width: 260px; height: 260px; }
    .floating-shape { display: none; }
    .hero-stats { gap: 2rem; }

    /* About */
    .about-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    .about-image-frame { max-width: 360px; margin: 0 auto; }
    .about-highlights { grid-template-columns: 1fr 1fr 1fr; }

    /* Services */
    .services-grid { grid-template-columns: 1fr 1fr; }

    /* Projects */
    .projects-grid { grid-template-columns: 1fr 1fr; }

    /* Contact */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    /* Footer */
    .footer-top { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

/* ─── TABLETS PORTRAIT (576px - 767px) ─── */
@media (max-width: 767px) {
    /* Hero */
    .hero { padding: 90px 0 50px; min-height: auto; }
    .hero-title { font-size: 2.4rem; margin-bottom: 1rem; }
    .hero-desc { font-size: 0.95rem; margin-bottom: 2rem; }
    .hero-badge { font-size: 0.7rem; padding: 0.35rem 1rem; margin-bottom: 1.2rem; }
    .hero-image-wrapper { width: 220px; height: 220px; }
    .hero-stats { gap: 1.5rem; margin-top: 2.5rem; }
    .hero-stat h3 { font-size: 1.8rem; }
    .hero-stat p { font-size: 0.68rem; }

    /* Section common */
    .section-title { font-size: 1.8rem; }
    .section-subtitle { font-size: 0.9rem; }

    /* About */
    #about { padding: 5rem 0; }
    .about-image-frame { max-width: 300px; }
    .about-highlights { grid-template-columns: 1fr 1fr; }
    .about-text p { font-size: 0.9rem; }
    .about-exp-badge { bottom: 20px; right: 0; }
    .exp-ring { width: 85px; height: 85px; }
    .exp-ring-text strong { font-size: 1.3rem; }

    /* Skills */
    #skills { padding: 5rem 0; }
    .skills-grid { grid-template-columns: 1fr 1fr; gap: 1rem; }

    /* Services */
    #services { padding: 5rem 0; }
    .services-grid { grid-template-columns: 1fr; }
    .service-card { padding: 2rem 1.5rem; }

    /* Projects */
    #projects { padding: 5rem 0; }
    .projects-grid { grid-template-columns: 1fr; }
    .project-thumb { height: 180px; }

    /* Experience */
    #experience { padding: 5rem 0; }

    /* Contact */
    #contact { padding: 5rem 0; }
    .form-row-custom { grid-template-columns: 1fr; }

    /* Footer */
    .footer-top { grid-template-columns: 1fr; gap: 2rem; }
    .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }

    /* Marquee */
    .marquee-item { font-size: 1.1rem; }
}

/* ─── MOBILE LARGE (480px - 575px) ─── */
@media (max-width: 575px) {
    .container { padding-left: 20px; padding-right: 20px; }

    .hero { padding: 85px 0 40px; }
    .hero-title { font-size: 2rem; }
    .hero-desc { font-size: 0.88rem; max-width: 100%; }
    .hero-actions { flex-direction: column; gap: 0.8rem; }
    .btn-primary-custom, .btn-outline-custom {
        width: 100%;
        justify-content: center;
        padding: 0.8rem 1.5rem;
    }
    .hero-stats { gap: 1.2rem; }
    .hero-stat h3 { font-size: 1.5rem; }
    .hero-image-wrapper { width: 200px; height: 200px; }
    .hero-image-border { inset: -6px; }

    /* About */
    .about-image-frame { max-width: 260px; }
    .about-highlights { grid-template-columns: 1fr; }
    .about-highlight { padding: 0.7rem 0.9rem; }

    /* Skills */
    .skills-grid { grid-template-columns: 1fr; }
    .skill-category { padding: 1.5rem; }

    /* Projects */
    .project-thumb { height: 160px; }
    .project-info { padding: 1.2rem; }
    .project-info h3 { font-size: 1rem; }
    .project-info p { font-size: 0.8rem; }

    /* Timeline */
    .timeline { padding-left: 1.5rem; }
    .timeline-item { padding-left: 1.5rem; }
    .timeline-dot { left: -1.5rem; }
    .timeline-item h3 { font-size: 1.05rem; }

    /* Contact */
    .contact-info-card { padding: 0.85rem 1rem; }
    .contact-info-card .icon { width: 40px; height: 40px; }
    .contact-info-card a, .contact-info-card p { font-size: 0.82rem; }

    /* Marquee */
    .marquee-item { font-size: 0.95rem; gap: 2rem; }
    .marquee-track { gap: 2rem; }

    /* Section labels */
    .section-label { font-size: 0.65rem; }
    .section-title { font-size: 1.6rem; }

    /* Scroll top */
    .scroll-top { width: 40px; height: 40px; bottom: 1.5rem; right: 1.5rem; font-size: 0.85rem; }
}

/* ─── MOBILE SMALL (360px - 479px) ─── */
@media (max-width: 479px) {
    .container { padding-left: 16px; padding-right: 16px; }

    .nav-brand { font-size: 1.3rem; }
    .theme-toggle-track { width: 44px; height: 24px; padding: 0 5px; }
    .theme-toggle-thumb { width: 18px; height: 18px; }
    [data-theme="light"] .theme-toggle-thumb { left: calc(100% - 21px); }
    .theme-icon-dark, .theme-icon-light { font-size: 0.55rem; }
    .navbar-custom { padding: 1rem 0; }

    .hero { padding: 80px 0 30px; }
    .hero-title { font-size: 1.7rem; letter-spacing: -0.03em; }
    .hero-desc { font-size: 0.82rem; line-height: 1.65; margin-bottom: 1.5rem; }
    .hero-badge { font-size: 0.65rem; padding: 0.3rem 0.8rem; }
    .hero-stats { flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }
    .hero-stat { min-width: 80px; }
    .hero-stat h3 { font-size: 1.3rem; }
    .hero-stat p { font-size: 0.6rem; letter-spacing: 0.06em; }
    .hero-image-wrapper { width: 180px; height: 180px; }

    .section-title { font-size: 1.4rem; }
    .section-subtitle { font-size: 0.82rem; }

    .about-image-frame { max-width: 220px; }
    .about-text p { font-size: 0.85rem; line-height: 1.7; }
    .exp-ring { width: 75px; height: 75px; }
    .exp-ring-text strong { font-size: 1.1rem; }
    .exp-ring-text span { font-size: 0.5rem; }

    .skill-category { padding: 1.3rem; }
    .skill-category h3 { font-size: 1rem; }
    .skill-tag { font-size: 0.7rem; padding: 0.25rem 0.6rem; }

    .service-card { padding: 1.5rem 1.2rem; }
    .service-card h3 { font-size: 1.05rem; }
    .service-card p { font-size: 0.82rem; }
    .service-number { font-size: 2.5rem; }

    .project-thumb { height: 140px; }
    .project-tech span { font-size: 0.62rem; padding: 0.18rem 0.5rem; }

    .timeline-item h3 { font-size: 0.95rem; }
    .timeline-item h4 { font-size: 0.8rem; }
    .timeline-item p { font-size: 0.78rem; }
    .timeline-date { font-size: 0.65rem; }

    .contact-form .form-control { padding: 0.7rem 0.85rem; font-size: 0.82rem; }
    .contact-form .form-label { font-size: 0.72rem; }
    .btn-submit { padding: 0.8rem; font-size: 0.82rem; }

    .footer-brand p { font-size: 0.78rem; }
    .footer-links-group h5 { font-size: 0.82rem; }
    .footer-links-group a { font-size: 0.78rem; }
    .footer-bottom p { font-size: 0.72rem; }
}

/* ─── EXTRA SMALL (below 360px) ─── */
@media (max-width: 359px) {
    .container { padding-left: 12px; padding-right: 12px; }
    .hero-title { font-size: 1.5rem; }
    .hero-desc { font-size: 0.78rem; }
    .hero-image-wrapper { width: 150px; height: 150px; }
    .hero-stat h3 { font-size: 1.1rem; }
    .section-title { font-size: 1.25rem; }
    .nav-links a { font-size: 1.1rem !important; }
    .filter-btn { padding: 0.35rem 1rem; font-size: 0.72rem; }
}

/* ─── LANDSCAPE MODE FIX ─── */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 80px 0 40px;
    }
    .hero-visual { display: none; }
    .hero-stats { margin-top: 1.5rem; }
    .hero-stat h3 { font-size: 1.5rem; }
    .nav-links.mobile-open { gap: 1rem; }
    .nav-links.mobile-open a { font-size: 1rem !important; }
}

/* ─── HIGH DPI / RETINA ─── */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-image { image-rendering: -webkit-optimize-contrast; }
}

/* ─── PREFERS REDUCED MOTION ─── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .reveal { opacity: 1; transform: none; }
    .hero-badge, .hero-title, .hero-desc, .hero-actions, .hero-stats, .hero-visual {
        opacity: 1; transform: none;
    }
    .marquee-track { animation: none; }
    .particle { display: none; }
    .cursor-dot, .cursor-ring { display: none; }
}

/* ─── TOUCH DEVICE ADJUSTMENTS ─── */
@media (hover: none) and (pointer: coarse) {
    .cursor-dot, .cursor-ring { display: none !important; }
    .service-card:hover::after { display: none; }
    .service-arrow { opacity: 1; transform: translateX(0); }
    .project-thumb-overlay { opacity: 0.6; }
    .project-link-btn { transform: scale(1); }
    .skill-category:hover { transform: none; }
    .service-card:hover { transform: none; }
    .project-card:hover { transform: none; }
    .contact-info-card:hover { transform: none; }
    .about-highlight:hover { transform: none; }
}

/* ─── PRINT STYLES ─── */
@media print {
    .loader, .cursor-dot, .cursor-ring, .particles-container,
    .navbar-custom, .scroll-top, .hero-bg-grid, .hero-glow,
    .hero-glow-2, .marquee-section { display: none !important; }
    body { background: white; color: black; }
    .section-title { color: black; }
    * { box-shadow: none !important; }
}
