﻿/*TRANG CHỦ*/
@media screen and (max-width: 480px) {
    /* 1. Reset & General Layout */
    html, body {
        position: relative !important;
        width: 100% !important;
        overflow-x: hidden !important;
    }
    h1 {
        font-size: 1.5rem;
        white-space: normal;
    }
    h2, .about-title, .skills-title, .project-title, .exp-heading, .contact-heading, .centered-heading {
        font-size: 1.5rem !important;
        text-align: center;
        margin-bottom: 25px;
    }

        .centered-heading::before, .centered-heading::after {
            display: none;
        }

    /* 2. Navigation - Ẩn link, chỉ giữ Logo trung tâm */
    .menu-links {
        display: none !important;
    }

    .menu {
        justify-content: center !important;
        padding: 10px 0 !important;
        width: 95% !important;
        top: 10px !important;
    }

    .logo {
        font-size: 1rem !important;
        letter-spacing: 1px;
    }

    /* 3. Hero Section */
    .hero-section {
        padding: 80PX 15PX 40PX 15PX !important;
        min-height: 100vh;
        display: flex !important;
        flex-direction: column-reverse;
        align-items: center !important;
        justify-content: flex-start !important;
        box-sizing: border-box !important;
        text-align: center;
    }
        .hero-section p,
        .hero-subtitle {
            margin-top: 20px !important; 
            line-height: 1.5 !important;
            font-size: 0.95rem !important;
            text-align: center !important;
            width: 90% !important;
            margin-left: auto !important;
            margin-right: auto !important;
            display: block !important;
            transform: translateZ(0);
            backface-visibility: hidden;
        }
        .hero-section h1 {
            width: 100% !important;
            max-width: 100vw !important;
            height: 3rem !important;
            overflow: hidden !important;
            text-align: center !important;
            margin: 10px 0 !important;
            display: flex !important;
            justify-content: center !important;
            align-items: center !important;
        }
    .name-highlight {
        white-space: pre;
        font-size: 1.5rem !important;
        display: inline !important;
        min-height: 2rem;
    }
    .iconMXHcontact {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
}

/* PHẦN KINH NGHIỆM VÀ HOẠT ĐỘNG */
@media screen and (max-width: 480px) {
    .skills-grid {
        display: grid !important;
        grid-template-columns: 1fr !important; 
        gap: 20px !important;
        padding: 0 15px !important;
    }
    .skill-card {
        display: flex !important;
        flex-direction: row !important; 
        align-items: center !important;
        padding: 20px !important;
        width: 100% !important;
        box-sizing: border-box !important;
        text-align: left !important; 
    }
    .skill-header {
        display: flex !important;
        align-items: center !important;
        gap: 15px !important;
        margin-bottom: 0 !important; 
    }
    .skill-icon-box {
        min-width: 50px !important;
        height: 50px !important;
        font-size: 1.5rem !important;
    }
    .skill-tags {
        justify-content: flex-start !important;
        gap: 8px !important;
    }
    .skill-content {
        flex: 1;
    }
        .skill-content h3 {
            font-size: 1.2rem !important;
            margin: 0 0 5px 0 !important;
        }

    .skill-desc {
        font-size: 0.9rem !important;
        margin: 0 !important;
        line-height: 1.4 !important;
    }
    .progress-vertical-wrapper {
        display: none !important;
    }
    .timeline {
        padding-left: 10px !important;
        padding-right: 5px !important;
        position: relative !important;
        margin: 20px 0 !important;
    }
        .timeline::before {
            left: 2px !important;
            width: 1px !important;
        }
    .timeline-item {
        display: block !important;
        width: 100% !important;
        margin-bottom: 30px !important;
    }
    .exp-dot {
        left: 2px !important;
        top: 25px !important;
        width: 8px !important;
        height: 8px !important;
        transform: translateX(-50%) !important;
    }
    .exp-card {
        width: 100% !important;
        margin-left: 0 !important;
        padding: 15px !important;
        background: rgba(17, 34, 64, 0.9) !important;
        border-radius: 10px !important;
        box-sizing: border-box !important;
    }
        .exp-card h3 {
            font-size: 1.15rem !important;
            line-height: 1.3 !important;
        }
        .exp-card h3, .exp-company, .exp-mota {
            width: 100% !important;
            text-align: left !important;
        }
    .exp-mota, .exp-chitiet li {
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
    }
    .exp-date {
        font-size: 0.8rem !important;
        padding: 4px 12px !important;
        margin-bottom: 10px !important;
        display: inline-flex !important;
        width: fit-content !important;
    }
}

/* PHẦN MỀM VÀ CÔNG CỤ*/
@media screen and (max-width: 480px) {
    .appEXP-section {
        height: auto !important;
        padding: 60px 0 !important;
        overflow: hidden !important;
    }
    .appEXP-heading {
        text-align: center !important;
        justify-content: center !important;
        margin-bottom: 40px !important;
        font-size: 1.5rem !important;
        position: relative !important;
        left: 0 !important;
        transform: none !important;
    }
    .software-marquee-container {
        display: flex !important;
        flex-direction: column !important;
        gap: 20px !important;
        width: 100% !important;
        overflow: hidden !important;
        position: relative !important;
    }
    .marquee-row {
        display: flex !important;
        width: max-content !important;
        gap: 20px !important;
        will-change: transform;
        padding: 5px 0;
    }
    .software-progress,
    .software-item span,
    .software-item::after,
    .software-item::before {
        display: none !important;
    }
    .software-item {
        position: static !important;
        transform: none !important;
        pointer-events: none; 
    }
    .software-card {
        width: 70px !important;
        height: 70px !important;
        border: 1px solid #acd2e1 !important;
        border-radius: 15px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-shrink: 0 !important;
        box-shadow: 0 4px 10px #acd2e1 !important;
        margin: 5px 0;
    }
        .software-card img {
            width: 40px !important;
            height: 40px !important;
            object-fit: contain !important;
        }

    /* Animation chạy trái: dịch chuyển từ 0 đến -50% của tổng chiều dài hàng đã nhân đôi */
    .marquee-left {
        animation: scroll-left 10s linear infinite !important;
    }

    /* Animation chạy phải: dịch chuyển ngược lại */
    .marquee-right {
        animation: scroll-right 10s linear infinite !important;
    }

    @keyframes scroll-left {
        0% {
            transform: translateX(0);
        }

        100% {
            transform: translateX(-50%);
        }
    }

    @keyframes scroll-right {
        0% {
            transform: translateX(-50%);
        }

        100% {
            transform: translateX(0);
        }
    }
}

/* PHẦN DỰ ÁN */
@media screen and (max-width: 480px) {
    .project-grid {
        grid-template-columns: 1fr !important;
        padding: 0 15px;
    }

    .project-btns {
        grid-template-columns: 1fr !important;
    }
    .testimonial-card {
        width: 280px !important;
    }
}

/* PHẦN LIÊN HỆ */
@media screen and (max-width: 480px) {
    .contact-heading {
        text-align: center !important;
        justify-content: center !important;
    }
    .contact-grid {
        flex-direction: column !important;
    }

    .info-card {
        flex-direction: column !important;
        padding: 20px !important;
    }

    .info-right {
        border-left: none !important;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding: 20px 0 0 0 !important;
        margin-top: 15px;
    }

    .info-item p {
        word-break: break-all;
        font-size: 0.85rem;
    }
    .nut-GuiMail {
        display: flex !important;
        justify-content: center !important; 
        align-items: center !important; 
        width: 100% !important; 
        margin: 20px 0 !important; 
    }
    #contact .nut-contact {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 12px 25px !important;
    }
        #contact .nut-contact i {
            margin-right: 10px !important;
        }
    #contact .iconMXH {
        justify-content: center !important;
        align-items: center !important;
    }
}

/* PHẦN HỌC TẬP */
@media screen and (max-width: 480px) {
    .edu-awards-layout {
        grid-template-columns: 1fr !important;
        padding: 0 15px;
    }

    .school-header {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    .h2 {
        justify-content: center !important;
        align-items: center !important;
    }
}

/* PHẦN ABOUT ME */
@media screen and (max-width: 480px) {
    .about-modern {
        padding: 40px 0 !important;
    }
    .about-title {
        font-size: 1.5rem !important;
        text-align: center !important;
        justify-content: center !important;
    }
    .about-wrapper {
        flex-direction: column !important;
        gap: 20px !important;
    }

    .image-circle {
        width: 220px !important;
        height: 220px !important;
        margin: 0 auto;
    }

    .floating-tags {
        display: none; /* Tránh gây rối mắt và lỗi tràn viền */
    }

    .about-description {
        font-size: 0.95rem;
        text-align: center;
    }

    .about-stats {
        justify-content: center;
        gap: 10px !important;
        flex-wrap: wrap;
    }

    .stat-item {
        flex: 1 1 30%;
    }
}