:root {
  --green-moc: #396433;    
  --green-leaf: #22c55e;   
  --pink-pastel: #fbcfe8;  
  --bg-soft: #f0fdf4;      
}

body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg-soft);
}

.nav {
  display: flex;
  justify-content: space-between;
  padding: 20px 50px;
  background: white;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  
}

.logo { color: var(--green-moc); }

.nav ul { display: flex; gap: 25px; list-style: none; }

.nav a { 
  text-decoration: none; 
  color: #333; 
  font-weight: 600; 
}

.nav a:hover, .nav a.active { color: var(--green-leaf); border-bottom: 2px solid var(--pink-pastel); }

/* Home Layout */
.home-hero {
  height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-content {
  display: flex;
  align-items: center;
  gap: 80px;
}

.hero-text h2 { font-size: 3rem; line-height: 1.2; }

.hero-text span { color: var(--green-moc); }

.highlight { color: #db2777;}

.profile-img {
  width: 350px;
  height: 350px;
  border-radius: 50%;
  border: 10px solid white;
  box-shadow: 0 15px 30px rgba(0,0,0,0.1);
  background-color: var(--pink-pastel); 
  object-fit: cover;
}

.social-icons { margin: 25px 0; display: flex; gap: 20px; }

.social-icons i { 
  font-size: 1.8rem; 
  color: var(--green-moc); 
  transition: 0.3s; 
}

.social-icons i:hover { color: #f472b6; transform: translateY(-5px); }

.btn-main {
  padding: 12px 25px;
  background: var(--green-moc);
  color: white;
  text-decoration: none;
  border-radius: 50px;
}

/* Container */
.container {
    max-width: 1100px; 
    margin: 40px auto; 
    padding: 0 20px;
}

.section-title {
    color: var(--green-moc);
    border-bottom: 3px solid var(--pink-pastel);
    display: inline-block;
    margin-bottom: 30px;
}

.about-flex {
    display: flex;
    gap: 40px;
    margin-bottom: 60px;
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.about-meta ul {
    list-style: none;
    padding: 0;
}

.about-meta li {
    margin-bottom: 15px;
    color: var(--green-moc);
}

/* Education */
.timeline {
    border-left: 3px solid var(--pink-pastel);
    padding-left: 30px;
    position: relative;
}

.timeline-item {
    margin-bottom: 40px;
    position: relative;
}

.timeline-dot {
    width: 15px;
    height: 15px;
    background: var(--green-leaf);
    border-radius: 50%;
    position: absolute;
    left: -39px;
    top: 5px;
    border: 3px solid var(--pink-pastel);
}

.timeline-content h3 {
    margin: 0;
    color: var(--green-moc);
}

.timeline-content .date {
    font-weight: bold;
    color: #db2777; 
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.skill-category {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border-top: 5px solid var(--green-moc);
}

.skill-category h3 {
    margin-bottom: 20px;
    color: var(--green-moc);
}

/* Progress Bars */
.skill-item {
    margin-bottom: 15px;
}

.skill-item span {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.progress-bar {
    background: #e5e7eb;
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
}

.progress {
    background: linear-gradient(90deg, var(--green-leaf), var(--pink-pastel));
    height: 100%;
    border-radius: 5px;
    transition: width 1s ease-in-out;
}

/* Tags */
.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    background: var(--green-soft);
    color: var(--green-moc);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
}

.tag.pink {
    background: var(--pink-soft);
    color: #db2777;
}
/* Layout (Stacked Layout) */
.project-item-detail {
    display: flex;
    flex-direction: column; 
    gap: 20px;
    margin-bottom: 80px;
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.project-item-detail.reverse {
    flex-direction: column;
}

.project-image-box, .project-content-box {
    width: 100%; 
}

.main-img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 20px;
}
/* Layout Storyboard */
.project-mini-gallery {
    display: flex;
    flex-direction: column;
    gap: 10px; 
    margin-top: 25px;
}

.gallery-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #ffffff;
    padding: 15px; 
    border-radius: 12px;
    border: 1px solid var(--pink-pastel);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    max-width: 900px; 
    margin: 0 auto;
}

.gallery-item img {
    flex: 0 0 70%; 
    max-width: 680px; 
    height: auto;
    border-radius: 8px;
}

.gallery-info span {
    font-size: 1.1rem; 
    margin-bottom: 5px;
}

.gallery-info p {
    font-size: 0.9rem;
    margin: 0;
}

.tech-tag {
    display: inline-block;
    background-color: var(--pink-pastel); 
    color: var(--green-moc); 
    padding: 5px 10px;
    border-radius: 15px; 
    font-size: 0.85rem;
    font-weight: 600;
    margin-right: 8px; 
    margin-bottom: 8px; 
    border: 1px solid var(--green-leaf); 
}

/* =======================================================
   MOBILE RESPONSIVE (Tối ưu hóa cho màn hình điện thoại)
   ======================================================= */
@media screen and (max-width: 768px) {
    
    /* 1. (Navigation) */
    .nav {
        flex-direction: column; 
        align-items: center;
        padding: 15px;
        gap: 15px;
    }
    
    .nav ul {
        flex-wrap: wrap; 
        justify-content: center;
        padding: 0;
        gap: 15px;
    }

    /* 2. (Hero Section) */
    .home-hero {
        height: auto; 
        padding: 40px 20px;
    }

    .hero-content {
        flex-direction: column-reverse; 
        text-align: center;
        gap: 30px;
    }

    .hero-text {
        display: flex;
        flex-direction: column;
        align-items: center; 
    }

    .hero-text h2 {
        font-size: 2rem; 
    }

    .profile-img {
        width: 220px;
        height: 220px;
        border-width: 6px;
    }

    /* 3.  About */
    .about-flex {
        flex-direction: column; 
        padding: 20px;
    }

    /* 4.Skills  */
    .skills-grid {

        grid-template-columns: 1fr; 
    }

    /* 5. Projects  */
    .project-item-detail {
        padding: 20px; 
    }

    .project-content-box h3 {
        font-size: 1.5rem;
    }

    /* 6. Gallery Project */
    .gallery-item {
        flex-direction: column; 
        text-align: center;
        padding: 15px 10px;
    }

    .gallery-item img {
        flex: auto; 
        width: 100%;
        max-width: 100%;
        margin-bottom: 15px;
    }
}

/* =======================================================
   MOBILE RESPONSIVE 
   ======================================================= */
@media screen and (max-width: 768px) {
    
    /* (Navigation) */
    .nav {
        flex-direction: column; 
        align-items: center;
        padding: 15px;
        gap: 15px;
    }
    
    .nav ul {
        flex-wrap: wrap; 
        justify-content: center;
        padding: 0;
        gap: 15px;
    }

    /* 2.(Hero Section) */
    .home-hero {
        height: auto;
        padding: 40px 20px;
    }

    .hero-content {
        flex-direction: column-reverse; 
        text-align: center;
        gap: 30px;
    }

    .hero-text {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-text h2 {
        font-size: 2rem;
    }

    .profile-img {
        width: 220px;
        height: 220px;
        border-width: 6px;
    }

    /* 3. About  */
    .about-flex {
        flex-direction: column; 
        padding: 20px;
    }

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

    /* 5. Projects*/
    .project-item-detail {
        padding: 20px;
    }

    .project-content-box h3 {
        font-size: 1.5rem;
    }

    /* 6. Gallery dans Project */
    .gallery-item {
        flex-direction: column;
        text-align: center;
        padding: 15px 10px;
    }

    .gallery-item img {
        flex: auto; 
        width: 100%;
        max-width: 100%;
        margin-bottom: 15px;
    }
}
