/* =====================================================
   RESPONSIVE / MOBILE STYLES
   Thứ tự: Hamburger menu -> Tablet (1024px) -> Mobile (700px) -> Small mobile (420px)
===================================================== */

/* =====================================================
   HAMBURGER BUTTON (ẩn mặc định trên desktop)
===================================================== */

.hamburger{

    display:none;

    flex-direction:column;

    justify-content:center;

    align-items:center;

    gap:5px;

    width:42px;

    height:42px;

    border:none;

    border-radius:12px;

    background:transparent;

    cursor:pointer;

    z-index:1100;

}

.hamburger span{

    display:block;

    width:24px;

    height:3px;

    border-radius:3px;

    background:#4C5140;

    transition:.3s;

}

body.dark .hamburger span{

    background:#F0EDDD;

}

.hamburger.active span:nth-child(1){

    transform:translateY(8px) rotate(45deg);

}

.hamburger.active span:nth-child(2){

    opacity:0;

}

.hamburger.active span:nth-child(3){

    transform:translateY(-8px) rotate(-45deg);

}

/* =====================================================
   TABLET (<=1024px)
===================================================== */

@media(max-width:1024px){

    .hero{

        flex-direction:column;

        text-align:center;

        gap:50px;

    }

    .hero-button{

        justify-content:center;

    }

    .stats{

        grid-template-columns:repeat(2,1fr);

    }

    .overview-grid{

        grid-template-columns:repeat(2,1fr);

    }

    .glass-circle,
    .avatar{

        width:320px;

        height:320px;

    }

}

/* =====================================================
   MOBILE (<=700px)
===================================================== */

@media(max-width:700px){

    body{

        padding-top:110px;

    }

    /* ---------- NAV ---------- */

    nav{

        top:12px;

        width:90%;

        padding:14px 20px;

    }

    nav.scrolled{

        padding:12px 20px;

    }

    .logo{

        font-size:26px;

    }

    .hamburger{

        display:flex;

    }

    .nav-menu{

        position:absolute;

        top:calc(100% + 12px);

        left:0;

        right:0;

        flex-direction:column;

        gap:0;

        background:rgba(255,255,255,.9);

        backdrop-filter:blur(20px);

        border:1px solid rgba(255,255,255,.5);

        border-radius:22px;

        box-shadow:0 20px 45px rgba(0,0,0,.15);

        padding:10px;

        max-height:0;

        overflow:hidden;

        opacity:0;

        pointer-events:none;

        transition:max-height .35s ease, opacity .3s ease;

        display:flex;

    }

    .nav-menu.show{

        max-height:400px;

        opacity:1;

        pointer-events:auto;

    }

    .nav-menu li{

        width:100%;

    }

    .nav-menu a{

        display:block;

        padding:14px 16px;

        border-radius:14px;

        font-size:17px;

    }

    .nav-menu a:hover{

        background:rgba(255,92,168,.08);

    }

    .nav-menu a::after{

        display:none;

    }

    body.dark .nav-menu{

        background:rgba(30,30,40,.92);

    }

    /* ---------- HERO ---------- */

    .hero{

        margin:40px auto;

        padding:20px;

        gap:35px;

    }

    .hero-tag{

        font-size:14px;

    }

    .hero h1{

        font-size:42px;

    }

    .hero h2{

        font-size:26px;

    }

    .description{

        font-size:17px;

        line-height:1.7;

    }

    .hero-button{

        flex-direction:column;

        width:100%;

        gap:15px;

    }

    .btn,
    .btn2{

        text-align:center;

        width:100%;

        padding:16px 20px;

    }

    .glass-circle,
    .avatar{

        width:230px;

        height:230px;

    }

    /* ---------- OVERVIEW / STATS ---------- */

    .overview{

        margin:80px auto;

    }

    .overview-grid{

        grid-template-columns:1fr;

        gap:20px;

    }

    .section-description{

        font-size:16px;

    }

    .stats{

        grid-template-columns:1fr 1fr;

        gap:15px;

        margin:50px auto;

    }

    .stat{

        padding:22px;

    }

    .stat h2{

        font-size:32px;

    }

    /* ---------- ABOUT ---------- */

    .about-page{

        margin:20px auto 40px;

        gap:35px;

        padding:15px;

    }

    .about-right h1{

        font-size:38px;

    }

    .about-right p{

        font-size:16px;

    }

    .info-card{

        padding:20px;

    }

    /* ---------- PROJECTS ---------- */

    .projects{

        margin:60px auto;

        padding:15px;

    }

    .projects h1,
    .projects-page h1{

        font-size:34px;

    }

    .project-grid{

        grid-template-columns:1fr;

        gap:24px;

        margin-top:40px;

    }

    .project-card{

        border-radius:20px;

    }

    .project-card img{

        height:200px;

    }

    .project-content{

        padding:24px;

    }

    .project-content h2{

        font-size:22px;

    }

    .status{

        font-size:13px;

        padding:7px 16px;

    }

    .project-info{

        flex-wrap:wrap;

        gap:10px 20px;

    }

    .btn-project{

        width:100%;

        text-align:center;

    }

    /* ---------- TASK PAGES ---------- */

    .task-hero{

        padding-top:20px;

        padding-bottom:50px;

    }

    .task-hero h1{

        font-size:32px;

    }

    .task-hero p{

        font-size:16px;

    }

    .task-box{

        padding:24px;

    }

    .task-content{

        padding:15px;

        gap:22px;

    }

    .pdf-preview iframe,
    .pdf-frame{

        height:420px;

    }

    .portfolio-table th,
    .portfolio-table td{

        padding:10px;

        font-size:14px;

    }

    /* ---------- CONTACT ---------- */

    .contact-page{

        margin:20px auto 40px;

        padding:15px;

    }

    .contact-card{

        padding:22px;

    }

    .contact-form{

        max-width:100%;

    }

    /* ---------- GALLERY / TIMELINE ---------- */

    .gallery{

        grid-template-columns:1fr;

    }

    .timeline-item{

        flex-direction:column;

    }

    .timeline::before{

        display:none;

    }

    /* ---------- REFLECTION ---------- */

    .reflect-stats{

        grid-template-columns:1fr 1fr;

        gap:15px;

    }

    /* ---------- FOOTER ---------- */

    footer{

        margin-top:70px;

        padding:50px 6% 30px;

    }

    .footer-container{

        grid-template-columns:1fr;

        gap:35px;

        text-align:center;

    }

    .footer-links{

        align-items:center;

    }

    /* ---------- BACK TO TOP ---------- */

    #backToTop,
    #topBtn{

        right:16px;

        bottom:16px;

        width:48px;

        height:48px;

        font-size:20px;

    }

}

/* =====================================================
   SMALL MOBILE (<=420px)
===================================================== */

@media(max-width:420px){

    .hero h1{

        font-size:34px;

    }

    .hero h2{

        font-size:22px;

    }

    .glass-circle,
    .avatar{

        width:180px;

        height:180px;

    }

    .stats{

        grid-template-columns:1fr;

    }

    .reflect-stats{

        grid-template-columns:1fr;

    }

    .task-navigation{

        flex-direction:column;

        align-items:center;

    }

    .about-right h1{

        font-size:30px;

    }

    .task-hero h1{

        font-size:26px;

    }

    .projects h1,
    .projects-page h1{

        font-size:28px;

    }
}
