/* ══════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
   ══════════════════════════════════════════ */

/* ── Tablet Large (≤ 1200px) ── */
@media (max-width: 1200px) {
    nav { padding: 1rem 6%; }

    .hero     { padding: 80px 6% 0; gap: 2rem; }
    .about    { padding: 4rem 6% !important; }
    .skills   { padding: 4rem 6% !important; }
    .projects { padding: 4rem 6% !important; }
    .contact  { padding: 4rem 6% 2rem !important; }

    .profile-circle       { width: clamp(340px, 38vw, 480px); height: clamp(340px, 38vw, 480px); }
    .profile-circle img   { width: clamp(290px, 33vw, 420px); height: clamp(290px, 33vw, 420px); }
    .profile-circle::before { width: clamp(385px, 43vw, 540px); height: clamp(385px, 43vw, 540px); }
    .profile-circle::after  { width: clamp(415px, 46vw, 580px); height: clamp(415px, 46vw, 580px); }
}

/* ── Tablet (≤ 992px) ── */
@media (max-width: 992px) {
    nav { padding: 1rem 5%; }

    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 90px 6% 3rem;
        min-height: auto;
        gap: 2rem;
        align-items: center;
    }
    .hero-content  { order: 2; }
    .hero-image    { order: 1; justify-content: center !important; padding-right: 0 !important; margin-top: 0; }
    .btn-group     { justify-content: center; }
    .social-links  { justify-content: center; }

    .profile-circle       { width: clamp(220px, 48vw, 320px); height: clamp(220px, 48vw, 320px); }
    .profile-circle img   { width: clamp(188px, 41vw, 275px); height: clamp(188px, 41vw, 275px); }
    .profile-circle::before { width: clamp(250px, 55vw, 365px); height: clamp(250px, 55vw, 365px); }
    .profile-circle::after  { width: clamp(275px, 60vw, 395px); height: clamp(275px, 60vw, 395px); }

    .about    { padding: 4rem 5% !important; }
    .skills   { padding: 4rem 5% !important; }
    .projects { padding: 4rem 5% !important; }
    .contact  { padding: 4rem 5% 2rem !important; }
    section   { padding: 4rem 5% !important; }

    .skills-row-3col { grid-template-columns: 1fr 1fr; }
    .contact-layout  { grid-template-columns: 1fr; }
    .about-two-col   { grid-template-columns: 1fr 1fr; }
    .projects-grid   { grid-template-columns: 1fr 1fr; }
}

/* ── Mobile Large (≤ 768px) ── */
@media (max-width: 768px) {

    /* Navigation: hamburger */
    nav { padding: 0.9rem 5%; position: fixed; top: 0; width: 100%; z-index: 1000; }
    .nav-right { gap: 0.75rem; }

    nav ul {
        display: none;
        position: fixed;
        top: 58px; left: 0; right: 0;
        background: var(--bg-nav);
        flex-direction: column;
        gap: 0;
        padding: 0.5rem 0 1rem;
        border-bottom: 1px solid var(--border-card);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        z-index: 999;
        box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    }

    nav ul.mobile-open { display: flex; }
    nav ul li { width: 100%; }
    nav ul li a { display: block; padding: 0.85rem 5%; font-size: 1rem; border-bottom: 1px solid var(--border-card); font-weight: 600; }
    nav ul li:last-child a { border-bottom: none; }

    .hamburger {
        display: flex;
        flex-direction: column;
        gap: 5px;
        cursor: pointer;
        padding: 4px;
        background: none;
        border: none;
        z-index: 1001;
    }

    .hamburger span { display: block; width: 22px; height: 2px; background: var(--text-primary); border-radius: 2px; transition: all 0.3s ease; }
    .hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .hamburger.active span:nth-child(2) { opacity: 0; }
    .hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    /* Hero */
    .hero { grid-template-columns: 1fr; text-align: center; padding: 80px 5% 2.5rem; min-height: auto; gap: 1.5rem; align-items: center; }
    .hero-content { order: 2; padding-bottom: 2rem; }
    .hero-image   { order: 1; justify-content: center !important; padding-right: 0 !important; padding-top: 5rem; }
    .hero-content p:first-child { font-size: 0.85rem !important; margin-bottom: .2rem !important; margin-top: 2rem !important; }
    .hero-content h1 { font-size: 2.1rem; margin-bottom: 0.4rem; }
    .hero-content h2 { font-size: 1.2rem; margin-bottom: 1rem; justify-content: center; }
    .hero-content p  { font-size: 0.95rem; margin-bottom: 1.5rem; line-height: 1.7; }
    .btn-group   { justify-content: center; gap: 0.8rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
    .btn         { padding: 0.65rem 1.4rem; font-size: 0.9rem; }
    .social-links { justify-content: center; gap: 0.75rem; }

    .profile-circle       { width: 190px; height: 190px; }
    .profile-circle img   { width: 162px; height: 162px; }
    .profile-circle::before { width: 215px; height: 215px; }
    .profile-circle::after  { width: 238px; height: 238px; }

    /* Sections */
    section     { padding: 3rem 5% !important; }
    .about      { padding: 3rem 5% !important; }
    .skills     { padding: 3rem 5% !important; }
    .projects   { padding: 3rem 5% !important; }
    .contact    { padding: 3rem 5% 1.5rem !important; }
    section h2  { font-size: 2rem; margin-bottom: 2rem; }

    /* About */
    .about-bio-box  { padding: 1.4rem 1.2rem; font-size: 0.95rem; text-align: left; }
    .about-two-col  { grid-template-columns: 1fr; gap: 1rem; }
    .about-card     { padding: 1.4rem 1.2rem; margin-bottom: 1rem; }
    .about-card h3  { font-size: 1.2rem; margin-bottom: 1rem; }
    .about-details-list li { font-size: 0.9rem; word-break: break-word; }

    .experience-item { flex-direction: column; gap: 0.6rem; }
    .exp-year   { align-self: flex-start; margin-left: 0; font-size: 0.82rem; }
    .exp-left h4 { font-size: 1rem; }
    .exp-left ul { font-size: 0.9rem; }
    .exp-role    { font-size: 0.9rem; }

    .tag-group {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.6rem;
    }

    .about-tag {
        text-align: center;
        justify-content: center;
    }

    .soft-skills-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
    }

    .soft-skill-tag {
        text-align: center;
        justify-content: center;
    }

        /* Timeline mobile fix */
    .timeline {
        padding-left: 1.2rem;
    }

    .timeline-dot {
        left: -1.6rem;
        width: 10px;
        height: 10px;
    }

    .timeline-card {
        padding: 0.7rem 0.8rem;
    }

    .timeline-header {
        flex-wrap: wrap;
        gap: 0.4rem;
    }

    .timeline-year {
        font-size: 0.72rem;
    }

    .timeline-header h4 {
        font-size: 0.85rem;
        width: 100%;
        order: 2;
        padding-right: 1.5rem;
    }

    .timeline-year {
        order: 1;
    }

    .timeline-company {
        order: 3;
        font-size: 0.75rem;
        width: 100%;
    }

    .timeline-arrow {
        order: 4;
        position: absolute;
        right: 0.8rem;
        top: 0.8rem;
    }

    .timeline-card {
        position: relative;
    }

    /* Skills */
    .skills-row-3col { grid-template-columns: 1fr; gap: 1rem; }
    .skills-block    { padding: 1.4rem 1.2rem; }
    .skills-section-title { font-size: 1.1rem; }
    .tech-icons-grid { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 0.8rem; }
    .tech-icon-card  { padding: 1rem 0.6rem; border-radius: 0.8rem; }
    .tech-icon-card svg,
    .tech-icon-card img { width: 38px; height: 38px; }
    .tech-icon-label { font-size: 0.68rem; }
    .soft-skills-grid { gap: 0.5rem; }
    .soft-skill-tag   { font-size: 0.82rem; padding: 0.35rem 0.75rem; }

    /* Projects */
    .projects-grid { grid-template-columns: 1fr; gap: 1.2rem; }
    .project-img-wrapper img { height: 180px; }
    .project-content  { padding: 1rem 1.2rem; }
    .project-content h3 { font-size: 1rem; }
    .project-content p  { font-size: 0.9rem; }
    .tag              { font-size: 0.8rem; }
    .project-footer   { padding: 0.6rem 1.2rem 0.8rem; }

    /* Contact */
    .contact-layout  { grid-template-columns: 1fr; gap: 1rem; }
    .contact-card    { padding: 1.2rem 1.2rem; }
    .contact-card h3 { font-size: 1.1rem; }
    .contact-right-stack { gap: 0.9rem; }
    .contact-info-list li  { font-size: 0.9rem; word-break: break-word; }
    .social-online-list li a { font-size: 0.9rem; word-break: break-word; }
    .contact-form input,
    .contact-form textarea { font-size: 0.95rem; }
    .btn-send { padding: 0.75rem; }

    /* Project Detail */
    .detail-body { grid-template-columns: 1fr; gap: 1.5rem; }
    #project-detail-page nav.detail-top-nav { padding: 0.9rem 5%; }
    #project-detail-page nav.detail-top-nav ul { display: none; }
    .detail-back-row  { padding: 1rem 5%; }
    .detail-content   { padding: 1.5rem 5% 3rem; }
    .detail-header-box { padding: 1.4rem 1.2rem; }
    .detail-header-box h1 { font-size: 1.4rem; }
}

/* ── Mobile Small (≤ 480px) ── */
@media (max-width: 480px) {
    nav { padding: 0.8rem 4%; }
    .logo-text { font-size: 0.85rem; }

    .hero { padding: 90px 4% 2rem; gap: 1.2rem; }
    .hero-content h1 { font-size: 1.75rem; }
    .hero-content h2 { font-size: 1rem; }
    .hero-content p  { font-size: 0.9rem; }
    .btn { padding: 0.6rem 1.1rem; font-size: 0.85rem; }

    .profile-circle       { width: clamp(155px, 55vw, 200px); height: clamp(155px, 55vw, 200px); }
    .profile-circle img   { width: clamp(132px, 47vw, 170px); height: clamp(132px, 47vw, 170px); }
    .profile-circle::before { width: clamp(176px, 62vw, 226px); height: clamp(176px, 62vw, 226px); }
    .profile-circle::after  { width: clamp(195px, 68vw, 248px); height: clamp(195px, 68vw, 248px); }

    section   { padding: 2.5rem 4% !important; }
    .about    { padding: 2.5rem 4% !important; }
    .skills   { padding: 2.5rem 4% !important; }
    .projects { padding: 2.5rem 4% !important; }
    .contact  { padding: 2.5rem 4% 1rem !important; }
    section h2 { font-size: 1.75rem; }

    .about-bio-box { padding: 1.2rem 1rem; font-size: 0.9rem; }
    .about-card    { padding: 1.2rem 1rem; }
    .skills-block  { padding: 1.2rem 1rem; }
    .contact-card  { padding: 1rem 1rem; }

    .tech-icons-grid { grid-template-columns: repeat(auto-fill, minmax(65px, 1fr)); gap: 0.65rem; }
    .tech-icon-card svg,
    .tech-icon-card img { width: 32px; height: 32px; }

    .projects-grid { gap: 1rem; }
    .project-img-wrapper img { height: 160px; }

    .contact-info-list li    { font-size: 0.85rem; }
    .social-online-list li a { font-size: 0.82rem; }
}

/* ── Very Small (≤ 360px) ── */
@media (max-width: 360px) {
    .hero-content h1 { font-size: 1.55rem; }
    .btn-group { gap: 0.6rem; }
    .btn { padding: 0.55rem 0.9rem; font-size: 0.82rem; }

    .profile-circle         { width: 140px; height: 140px; }
    .profile-circle img     { width: 118px; height: 118px; }
    .profile-circle::before { width: 158px; height: 158px; }
    .profile-circle::after  { width: 175px; height: 175px; }
}
/* ── Back to Top – Mobile ── */
@media (max-width: 480px) {
    #back-to-top {
        bottom: 1.2rem;
        right: 1.2rem;
        width: 38px;
        height: 38px;
        font-size: 0.95rem;
    }
    #copy-toast {
        bottom: 4.5rem;
        right: 1.2rem;
    }
}
