/* ============================================================
   SHAKIL PORTFOLIO — Responsive Styles
   ============================================================ */

/* ===== LAPTOPS & TABLETS (1024px) ===== */
@media screen and (max-width: 1024px) {
    .hero-container {
        gap: 40px;
    }

    .hero-img-box {
        width: 300px;
        height: 300px;
    }

    .about-container {
        gap: 40px;
    }

    .section-title {
        font-size: 2.2rem;
    }

    .portfolio-container {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

/* ===== TABLETS (768px) ===== */
@media screen and (max-width: 768px) {
    html,
    body {
        width: 100%;
        overflow-x: clip;
    }

    .section {
        padding: 70px 0;
    }

    .section-title {
        font-size: 2rem;
    }

    .section-subtitle {
        margin-bottom: 40px;
    }

    /* ---- Navbar ---- */
    .navbar {
        width: 100%;
        overflow: clip;
    }

    .nav-container {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .nav-actions {
        flex-shrink: 0;
        gap: 12px;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: 0;
        width: min(300px, 100vw);
        max-width: 100vw;
        height: 100vh;
        background: var(--glass-bg);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-left: 1px solid var(--glass-border);
        padding: 80px 30px 30px;
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1001;
    }

    .nav-menu.active {
        transform: translateX(0);
    }

    .nav-list {
        flex-direction: column;
        gap: 25px;
    }

    .nav-link {
        font-size: 1.1rem;
        opacity: 0;
        transform: translateX(20px);
        transition: opacity 0.4s ease, transform 0.4s ease;
    }

    .nav-menu.active .nav-link {
        opacity: 1;
        transform: translateX(0);
    }

    .nav-menu.active .nav-link:nth-child(1) { transition-delay: 0.1s; }
    .nav-menu.active .nav-link:nth-child(2) { transition-delay: 0.15s; }
    .nav-menu.active .nav-link:nth-child(3) { transition-delay: 0.2s; }
    .nav-menu.active .nav-link:nth-child(4) { transition-delay: 0.25s; }
    .nav-menu.active .nav-link:nth-child(5) { transition-delay: 0.3s; }
    .nav-menu.active .nav-link:nth-child(6) { transition-delay: 0.35s; }

    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .nav-close {
        display: block;
    }

    /* ---- Hero ---- */
    .hero {
        padding: 100px 0 60px;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .hero-content {
        order: 2;
    }

    .hero-image {
        order: 1;
        width: 100%;
        max-width: 100%;
        overflow: visible;
    }

    .hero-description {
        margin: 0 auto 30px;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-social {
        justify-content: center;
    }

    .hero-img-box {
        width: 250px;
        height: 250px;
    }

    .hero-photo-group {
        width: min(250px, calc(100vw - 110px));
        height: min(250px, calc(100vw - 110px));
    }

    .scroll-indicator {
        display: none;
    }

    /* ---- About ---- */
    .about-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .about-img-box {
        margin: 0 auto;
    }

    .about-info {
        grid-template-columns: 1fr;
        text-align: left;
    }

    /* ---- Skills ---- */
    .skills-container {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }

    /* ---- Portfolio ---- */
    .portfolio-filter {
        gap: 10px;
    }

    .filter-btn {
        padding: 8px 18px;
        font-size: 0.85rem;
    }

    /* ---- Services ---- */
    .services-container {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    /* ---- Contact ---- */
    .contact-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .contact-form .btn {
        width: 100%;
        justify-content: center;
    }

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

    /* ---- Toast on mobile ---- */
    .toast-container {
        left: 20px;
        right: 20px;
    }

    .toast {
        max-width: 100%;
    }

    /* ---- Back to top ---- */
    .back-to-top {
        width: 42px;
        height: 42px;
        bottom: 20px;
        right: 20px;
    }
}

/* ===== MOBILE (480px) ===== */
@media screen and (max-width: 480px) {
    .section {
        padding: 50px 0;
    }

    .section-title {
        font-size: 1.7rem;
    }

    .section-subtitle {
        font-size: 0.95rem;
        margin-bottom: 30px;
    }

    .container {
        padding: 0 15px;
        max-width: 100%;
        min-width: 0;
    }

    .nav-container {
        padding-left: 15px;
        padding-right: 15px;
    }

    .logo {
        font-size: 1.65rem;
    }

    .theme-toggle {
        width: 38px;
        height: 38px;
    }

    .nav-toggle {
        width: 38px;
        height: 38px;
        padding: 0;
        font-size: 1.45rem;
    }

    /* ---- Hero ---- */
    .hero {
        padding: 80px 0 40px;
    }

    .hero-greeting {
        font-size: 0.95rem;
    }

    .hero-description {
        font-size: 0.95rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 12px;
    }

    .hero-buttons .btn {
        width: 100%;
        text-align: center;
    }

    .hero-img-box {
        width: 200px;
        height: 200px;
    }

    .hero-photo-group {
        width: min(220px, calc(100vw - 120px));
        height: min(220px, calc(100vw - 120px));
    }

    .float-badge {
        width: 34px;
        height: 34px;
        font-size: 1rem;
    }

    .badge-wordpress,
    .badge-php {
        right: -7%;
    }

    .badge-laravel {
        right: -2%;
    }

    .badge-mysql {
        left: -4%;
    }

    .status-pill {
        right: -8%;
        max-width: calc(100vw - 120px);
        padding: 5px 10px 5px 8px;
        font-size: 0.8rem;
    }

    /* ---- About ---- */
    .about-content h3 {
        font-size: 1.4rem;
    }

    .about-content p {
        font-size: 0.95rem;
    }

    .about-info {
        padding: 15px;
    }

    .info-item {
        flex-direction: column;
        gap: 3px;
    }

    /* ---- Skills ---- */
    .skills-container {
        grid-template-columns: 1fr;
    }

    .skill-card {
        padding: 25px 20px;
    }

    /* ---- Portfolio ---- */
    .portfolio-container {
        grid-template-columns: 1fr;
    }

    .portfolio-filter {
        flex-wrap: wrap;
    }

    .filter-btn {
        padding: 7px 15px;
        font-size: 0.8rem;
    }

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

    .service-card {
        padding: 30px 20px;
    }

    /* ---- Contact ---- */
    .contact-item {
        padding: 15px;
    }

    .form-group input,
    .form-group textarea {
        padding: 14px 16px;
        font-size: 0.9rem;
    }

    .contact-form .btn {
        min-width: 100%;
    }

    /* ---- Nav mobile ---- */
    .nav-menu {
        width: 100%;
    }
}

/* ===== SMALL MOBILE (360px) ===== */
@media screen and (max-width: 360px) {
    .hero-img-box {
        width: 170px;
        height: 170px;
    }

    .hero-photo-group {
        width: 190px;
        height: 190px;
    }

    .nav-actions {
        gap: 8px;
    }

    .section-title {
        font-size: 1.5rem;
    }
}

/* ===== CORE STACK RESPONSIVE ===== */
@media screen and (max-width: 1024px) {
    .core-stack-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media screen and (max-width: 768px) {
    .core-stack-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .core-card {
        padding: 16px 10px 12px;
    }

    .core-card-name {
        font-size: 0.75rem;
    }
}

@media screen and (max-width: 480px) {
    .core-stack-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .tech-marquee {
        margin-bottom: 30px;
    }

    .toolbox-tabs {
        gap: 6px;
    }

    .toolbox-tab {
        padding: 6px 12px;
        font-size: 0.75rem;
    }

    .chip {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

/* ===== DISABLE HEAVY EFFECTS ON TOUCH ===== */
@media (hover: none) and (pointer: coarse) {
    .custom-cursor {
        display: none !important;
    }

    #particle-canvas {
        display: none !important;
    }

    [data-tilt] {
        transform: none !important;
    }
}

/* ===== MOBILE POLISH: ABOUT INFO + CONTACT CARDS ===== */
@media screen and (max-width: 480px) {
    .about-info {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
        text-align: left;
    }

    .info-item {
        display: grid;
        grid-template-columns: 38px 1fr;
        align-items: center;
        gap: 10px 12px;
        padding: 14px 16px;
        border-radius: var(--radius);
        background: rgba(255, 255, 255, 0.025);
    }

    .info-item i {
        grid-row: 1 / span 2;
        width: 38px;
        height: 38px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background: rgba(99, 102, 241, 0.12);
        font-size: 1rem;
    }

    .info-label,
    .info-value {
        min-width: 0;
        line-height: 1.25;
    }

    .info-value {
        overflow-wrap: anywhere;
    }

    .contact-card-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .contact-card {
        min-height: 84px;
        padding: 16px;
        align-items: center;
        justify-content: flex-start;
        text-align: left;
    }

    .contact-card-icon {
        width: 48px;
        height: 48px;
        margin: 0;
        flex: 0 0 48px;
    }

    .contact-card-body {
        min-width: 0;
    }

    .contact-card-label,
    .contact-card-value {
        white-space: normal;
        overflow-wrap: anywhere;
        word-break: normal;
    }

    .contact-card-label {
        font-size: 0.8rem;
        letter-spacing: 0.05em;
    }
}

@media screen and (max-width: 360px) {
    .info-item {
        grid-template-columns: 34px 1fr;
        padding: 12px 14px;
    }

    .info-item i {
        width: 34px;
        height: 34px;
    }

    .contact-card {
        min-height: 78px;
        padding: 14px;
    }

    .contact-card-icon {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
    }
}
