/* Everforest Color Palette */
:root {
    /* Dark Theme */
    --bg0: #2d353b;
    --bg1: #343f44;
    --bg2: #3d484d;
    --bg3: #475258;
    --bg4: #4f585e;
    --bg5: #56635f;
    --bg-red: #4c3743;
    --bg-visual: #493b40;
    --bg-yellow: #45443c;
    --bg-green: #3c4841;
    --bg-blue: #384b55;
    
    /* Foreground */
    --fg: #d3c6aa;
    --red: #e67e80;
    --orange: #e69875;
    --yellow: #dbbc7f;
    --green: #a7c080;
    --blue: #7fbbb3;
    --aqua: #83c092;
    --purple: #d699b6;
    --grey0: #7a8478;
    --grey1: #859289;
    --grey2: #9da9a0;
    
    /* Accent colors */
    --primary: var(--green);
    --secondary: var(--blue);
    --accent: var(--yellow);
    --highlight: var(--aqua);
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, var(--bg0) 0%, var(--bg1) 100%);
    color: var(--fg);
    line-height: 1.6;
    min-height: 100vh;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg1);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--highlight);
}

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

/* Header */
header {
    background: rgba(45, 53, 59, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--bg2);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.logo:hover {
    color: var(--highlight);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--fg);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: var(--grey1);
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    color: var(--primary);
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    min-height: 55vh;         
    display: flex;
    align-items: flex-start;   
    justify-content: center;
    text-align: center;
    background: linear-gradient(
        135deg,
        var(--bg0) 0%,
        var(--bg1) 50%,
        var(--bg2) 100%
    );
    position: relative;
    overflow: hidden;

    /* CHỈ chỉnh 2 dòng này */
    padding-top: 7rem;
    padding-bottom: 2rem;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(167, 192, 128, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(127, 187, 179, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(219, 188, 127, 0.1) 0%, transparent 50%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 1s ease;
}

.hero-description {
    font-size: 1.3rem;
    margin-bottom: 3rem;
    color: var(--grey1);
    line-height: 1.8;
    animation: fadeInUp 1s ease 0.4s both;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--highlight) 100%);
    color: var(--bg0);
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(167, 192, 128, 0.3);
    animation: fadeInUp 1s ease 0.8s both;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(167, 192, 128, 0.4);
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-indicator i {
    font-size: 2rem;
    color: var(--primary);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* Main content */
main {
    padding: 6rem 0;
}

/* Project Filters */
.project-filters {
    text-align: center;
    margin-top: 5rem;   /* ⬅️ tạo khoảng thở với hero */
    margin-bottom: 3rem;
}

.project-filters h2 {
    font-size: 2.2rem;  /* trước ~2rem */
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.filters-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.filter-btn {
    background: var(--bg2);
    border: 2px solid var(--bg3);
    color: var(--fg);
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary);
    color: var(--bg0);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(167, 192, 128, 0.3);
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.project-card {
    background: var(--bg1);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--bg3);
    position: relative;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--highlight), var(--accent));
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: var(--primary);
}


.project-image-feature {
    position: relative;
    overflow: hidden;
    align-items: center;
    height: 750px; 
}

.project-image-feature img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* align-items: center; */
    transition: transform 0.3s ease;
}

.project-card:hover .project-image-feature img {
    transform: scale(1.05);
}

.project-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(167, 192, 128, 0.9), rgba(127, 187, 179, 0.9));
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg0);
    font-weight: 600;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-content {
    padding: 2rem;
}

.project-header {
    margin-bottom: 1rem;
}

.project-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--fg);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.project-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.project-title a:hover {
    color: var(--primary);
}

.featured-badge {
    background: linear-gradient(135deg, var(--red), var(--orange));
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 2;
}

.impact-highlight {
    background: linear-gradient(135deg, var(--bg-green), var(--primary));
    color: var(--fg);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin: 1rem 0;
    font-weight: 500;
    border-left: 4px solid var(--primary);
}

.project-description {
    color: var(--grey1);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1.5rem 0;
}

.tech-tag {
    background: var(--bg3);
    color: var(--fg);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    border: 1px solid var(--primary);
    transition: all 0.3s ease;
}

.tech-tag:hover {
    background: var(--primary);
    color: var(--bg0);
    transform: translateY(-2px);
}

/* Specific tech tag colors */
.tech-tag.python { border-color: var(--yellow); }
.tech-tag.sql { border-color: var(--blue); }
.tech-tag.ml { border-color: var(--purple); }
.tech-tag.web { border-color: var(--orange); }

.tech-tag.python:hover { background: var(--yellow); }
.tech-tag.sql:hover { background: var(--blue); }
.tech-tag.ml:hover { background: var(--purple); }
.tech-tag.web:hover { background: var(--orange); }

.project-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--bg2);
    border-radius: 12px;
    border: 1px solid var(--bg3);
}

.project-stat {
    text-align: center;
    flex: 1;
}

.stat-number {
    font-weight: 700;
    color: var(--primary);
    display: block;
    font-size: 1.2rem;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--grey1);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.project-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.project-btn {
    flex: 1;
    text-align: center;
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--highlight) 100%);
    color: var(--bg0);
}

.btn-secondary {
    background: var(--bg3);
    color: var(--fg);
    border: 1px solid var(--bg4);
}

.project-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-secondary:hover {
    background: var(--bg4);
    border-color: var(--primary);
}

/* Featured project - larger card */
.featured-project {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    max-width: 100%;
}

.featured-project .project-image {
    height: 300px;
}

.featured-project .project-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Contact */
.contact {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--bg0), var(--bg1));
    border-top: 1px solid var(--bg2);
}

.contact .section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.contact-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.contact-card {
    background: var(--bg1);
    border: 1px solid var(--bg3);
    border-radius: 14px;
    padding: 1.5rem;
    text-decoration: none;
    color: var(--fg);
    transition: all 0.3s ease;
}

.contact-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

.contact-card.muted {
    cursor: default;
}

.contact-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--grey1);
    margin-bottom: 0.5rem;
}

.contact-value {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--fg);
}

/* Signature */
.contact-signature {
    margin-top: 3rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--grey1);
    font-style: italic;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Footer */
footer {
    background: var(--bg0);
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--bg2);
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-form {
    background: var(--bg1);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid var(--bg3);
}

.contact-form h3 {
    color: var(--fg);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    color: var(--grey1);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: var(--bg2);
    border: 1px solid var(--bg3);
    border-radius: 8px;
    color: var(--fg);
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(167, 192, 128, 0.1);
}

.submit-btn {
    background: linear-gradient(135deg, var(--primary), var(--highlight));
    color: var(--bg0);
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(167, 192, 128, 0.3);
}

.contact-info {
    display: grid;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg1);
    border-radius: 15px;
    border: 1px solid var(--bg3);
    transition: all 0.3s ease;
}

.contact-item:hover {
    border-color: var(--primary);
    transform: translateX(5px);
}

.contact-item i {
    color: var(--primary);
    font-size: 1.5rem;
    width: 40px;
    text-align: center;
}

.contact-item div h4 {
    color: var(--fg);
    margin-bottom: 0.5rem;
}

.contact-item div p {
    color: var(--grey1);
}

.contact-item a {
    color: var(--grey1);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--bg2);
    color: var(--grey1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .featured-project {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .nav-links {
        display: none;
    }
    
    .filters-container {
        flex-direction: column;
        align-items: center;
    }
    
    .project-stats {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Loading animation for project cards */
.project-card {
    opacity: 0;
    animation: slideInLeft 0.6s ease forwards;
}

.project-card:nth-child(1) { animation-delay: 0.1s; }
.project-card:nth-child(2) { animation-delay: 0.2s; }
.project-card:nth-child(3) { animation-delay: 0.3s; }
.project-card:nth-child(4) { animation-delay: 0.4s; }
.project-card:nth-child(5) { animation-delay: 0.5s; }
.project-card:nth-child(6) { animation-delay: 0.6s; }