/* ========================
    GENERAL STYLES
   ======================== */
:root {
    --primary-color: #6C63FF; /* Tím nhạt hiện đại */
    --secondary-color: #FF6B6B; /* Đỏ san hô */
    --accent-color: #00BFFF; /* Xanh da trời sáng */
    --bg-light: #fdfdff; /* Nền trắng hơi ngả xám */
    --bg-dark: #2c3e50; /* Nền tối cho footer, header khi cuộn */
    --text-color-dark: #333;
    --text-color-light: #fdfdff;
    --border-radius-soft: 8px;
    --shadow-subtle: 0 4px 15px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.15);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif; /* Font hiện đại, tải từ Google Fonts */
    margin: 0;
    padding: 0;
    background-color: var(--bg-light);
    color: var(--text-color-dark);
    line-height: 1.6;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased; /* Làm mịn chữ */
    -moz-osx-font-smoothing: grayscale; /* Làm mịn chữ */
}

/* Thêm font Inter từ Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 1rem;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.8rem; }

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-color);
}

section {
    padding: 6rem 2rem; /* Tăng padding để có thêm không gian */
    /*max-width: 1200px;
    margin: 0 auto;*/
}

/* ========================
    HEADER & NAVIGATION
   ======================== */
.header {
    background-color: rgba(44, 62, 80, 0.7);
    backdrop-filter: blur(8px);
    color: var(--text-color-light);
    padding: 1.2rem 2rem;
    position: fixed; /* Thay đổi thành fixed */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: background-color 0.4s ease, box-shadow 0.4s ease;
}

.header.scrolled {
    background-color: rgba(44, 62, 80, 0.9);
    box-shadow: var(--shadow-subtle);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /*max-width: 1200px;
    margin: 0 auto;*/
}

.logo {
    color: var(--text-color-light);
    text-decoration: none;
    font-size: 1.8rem;
    font-weight: 700;
}

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

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

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

.nav-links a::after { /* Hiệu ứng gạch chân khi hover */
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after { /* Active link style */
    width: 100%;
}

/* ========================
    HERO SECTION (HOMEPAGE)
   ======================== */
.hero-section {
    height: 100vh; /* Chiếm toàn bộ chiều cao màn hình */
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('../images/background.jpg') no-repeat center center / cover;
    background-position: center;
    background-size: cover;
    background-attachment: fixed; /* Hiệu ứng parallax */
    color: var(--text-color-light);
    margin: 0;
    padding: 0;
    position: relative;
    overflow: hidden; /* Che đi phần overflow của hiệu ứng */
}

.hero-content {
    animation: fadeInScale 1s ease-out forwards; /* Hiệu ứng xuất hiện */
    opacity: 0;
    transform: scale(0.9);
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.hero-content h1 {
    font-size: 4rem; /* Lớn hơn */
    color: var(--text-color-light);
    margin-bottom: 1rem;
    line-height: 1.2;
    text-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.hero-content p {
    font-size: 1.3rem;
    max-width: 600px;
    margin: 0 auto 2rem;
    color: rgba(255,255,255,0.9);
}

/* Style gốc cho tất cả các nút */
.cta-button {
    display: inline-block;
    padding: 12px 2424px;
    font-size: 1rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
    text-align: center;
    border-radius: 30px;
    background: linear-gradient(135deg, #6a11cb, #ff5f6d);
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    transition: transform 0.2s, box-shadow 0.2s;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

/* Container căn giữa nút Khám phá */
.cta-main-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

/* Nút Khám phá – mở rộng chiều ngang */
.cta-button.cta-main {
    display: block;
    width: 100%;           /* chiếm full chiều ngang */
    max-width: 600px;      /* giới hạn trên PC */
    padding: 15px 0;       /* padding dọc nhiều hơn */
    font-size: 1.2rem;
    border-radius: 50px;   /* bo tròn 2 đầu */
}

/* ========================
    PROJECTS SECTION
   ======================== */
.projects-section {
    background-color: var(--bg-light);
}

.projects-section h2 {
    color: var(--primary-color);
    margin-bottom: 3rem;
}

.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.project-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius-soft);
    box-shadow: var(--shadow-subtle);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: left;
    text-decoration: none;
    color: inherit;
    display: block;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.project-card:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-hover);
}

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

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

.project-card-content {
    padding: 1.5rem;
}

.project-card h3 {
    margin: 0 0 0.75rem;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.project-card p {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 1rem;
}

/* ========================
    PROJECT DETAIL PAGE
   ======================== */
.project-detail-section {
    padding-top: 8rem; /* Đảm bảo nội dung không bị header che */
}

.project-detail-section h2 {
    margin-bottom: 3rem;
}

.project-content {
    display: flex;
    gap: 3rem;
    flex-wrap: wrap;
    align-items: flex-start;
}

.project-content img {
    flex: 2; /* Chiếm nhiều không gian hơn */
    min-width: 400px;
    max-height: 500px;
    object-fit: cover;
    border-radius: var(--border-radius-soft);
    box-shadow: var(--shadow-subtle);
}

.project-description {
    flex: 1;
    min-width: 300px;
    padding-right: 1rem;
}

.project-description p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    line-height: 1.7;
    color: #444;
}

.project-description ul {
    list-style: none;
    padding: 0;
    margin-top: 1.5rem;
}

.project-description ul li {
    background-color: #e8f0fe;
    color: var(--primary-color);
    padding: 0.7rem 1rem;
    margin-bottom: 0.8rem;
    border-radius: var(--border-radius-soft);
    font-weight: 500;
    display: flex;
    align-items: center;
}

.project-description ul li::before {
    content: '🚀'; /* Icon đẹp mắt */
    margin-right: 10px;
}

.project-buttons {
    margin-top: 4rem;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

/* ========================
    ABOUT SECTION
   ======================== */
.about-section {
    padding-top: 8rem;
    text-align: center;
}

.about-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
}

.profile-pic {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid var(--primary-color);
    box-shadow: var(--shadow-hover);
    transition: transform 0.3s ease;
}

.profile-pic:hover {
    transform: scale(1.05);
}

.about-text {
    text-align: left;
    max-width: 800px;
    line-height: 1.7;
    font-size: 1.1rem;
}

.about-text h2 {
    margin-bottom: 1.5rem;
    font-size: 3rem;
}

.about-text p {
    margin-bottom: 1rem;
    color: #555;
}

.about-text strong {
    color: var(--primary-color);
}

/* ========================
    CALL-TO-ACTION BUTTONS (Hero Section)
   ======================== */
.cta-container {
    display: flex;
    flex-wrap: wrap; /* Các thẻ sẽ xuống dòng khi không đủ chỗ trên một dòng */
    gap: 20px; /* Khoảng cách giữa các thẻ */
    justify-content: space-evenly; /* Căn đều các thẻ */
    max-width: 800px; /* Giới hạn chiều rộng */
    margin: 0 auto; /* Canh giữa */
}

.cta-button {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: var(--text-color-light);
    padding: 1.2rem 2.8rem;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
    display: inline-block;
    box-shadow: var(--shadow-subtle);
    width: calc(50% - 10px); /* Mỗi thẻ chiếm 50% chiều rộng */
    box-sizing: border-box; /* Đảm bảo padding không ảnh hưởng đến kích thước */
}

.cta-button:hover {
    transform: translateY(-7px);
    box-shadow: var(--shadow-hover);
    opacity: 0.9;
}

/* ========================
    CONTACT SECTION
   ======================== */
.contact-section {
    padding-top: 8rem;
    text-align: center;
}

.contact-section p {
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    color: #555;
}

.contact-form {
    display: flex;
    flex-direction: column;
    max-width: 600px;
    margin: 0 auto;
    text-align: left;
    background-color: var(--card-bg);
    padding: 2.5rem;
    border-radius: var(--border-radius-soft);
    box-shadow: var(--shadow-subtle);
}

.contact-form label {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1rem;
}

.contact-form input, .contact-form textarea {
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius-soft);
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-form input:focus, .contact-form textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.2);
    outline: none;
}

.contact-form textarea {
    resize: vertical; /* Cho phép thay đổi kích thước theo chiều dọc */
    min-height: 120px;
}

.contact-form button {
    margin-top: 2.5rem;
    padding: 1.2rem;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    color: var(--text-color-light);
    border: none;
    border-radius: var(--border-radius-soft);
    cursor: pointer;
    font-weight: 700;
    font-size: 1.1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: var(--shadow-subtle);
}

.contact-form button:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    opacity: 0.95;
}

/* ========================
    FOOTER
   ======================== */
.footer {
    position: ralative;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(44, 62, 80, 0.9);
    backdrop-filter: blur(8px);
    color: var(--text-color-light);
    text-align: center;
    padding: 1rem;
    font-size: 0.95rem;
    z-index: 1000;
}

/*.footer a {
    color: var(--accent-color);
}*/

.footer p {
    margin: 0;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}

/* ========================
    RESPONSIVE DESIGN
   ======================== */
@media (max-width: 992px) {
    .hero-content h1 {
        font-size: 3rem;
    }
    h2 {
        font-size: 2rem;
    }
    .project-content img {
        min-width: unset;
        width: 100%;
    }
    .project-content, .about-content {
        flex-direction: column;
        align-items: center;
    }
    .project-description {
        padding-right: 0;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 1rem;
    }
    .navbar {
        flex-direction: column;
        gap: 1rem;
    }
    .nav-links {
        gap: 1rem;
    }
    .hero-content h1 {
        font-size: 2.5rem;
    }
    .hero-content p {
        font-size: 1.1rem;
    }
    .cta-button {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
    section {
        padding: 4rem 1.5rem;
    }
    h2 {
        font-size: 1.8rem;
    }
    .projects-container {
        grid-template-columns: 1fr;
    }
    .profile-pic {
        width: 180px;
        height: 180px;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/*test*/
main {
    padding-top: 120px;
}
section {
    padding-top: 60px;
    padding-bottom: 60px;
    color: inherit;
}
