/* style.css */
:root {
    --primary-color: #0B77BE; /* Màu đỏ hiện đại */
    --hover-color: #025083;
    --text-color: #333;
    --bg-color: #f8f9fa;
    --white: #ffffff;
    --gray: #6c757d;
    --shadow: 0 4px 6px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img, video, iframe { max-width: 100%; display: block; }

/* --- HEADER & NAV --- */
header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary-color);
}

.hamburger { display: none; cursor: pointer; font-size: 1.5rem; }

/* --- GENERAL LAYOUT --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 5%;
    min-height: 80vh;
}

.section-title {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    color: var(--primary-color);
}

/* --- PORTFOLIO (HOME) --- */
.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1.5rem;
    border: 2px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    cursor: pointer;
    border-radius: 25px;
    font-weight: 600;
    transition: var(--transition);
}

.filter-btn.active, .filter-btn:hover {
    background: var(--primary-color);
    color: var(--white);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.portfolio-item {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
}

.portfolio-item:hover {
    transform: translateY(-5px);
}

.portfolio-thumb {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background-color: #ddd; /* Placeholder color */
}

.portfolio-info {
    padding: 1rem;
}

.portfolio-info h3 { margin-bottom: 0.5rem; }
.portfolio-info p { color: var(--gray); font-size: 0.9rem; }

/* --- PROJECT DETAIL --- */
.project-header {
    border-bottom: 1px solid #ddd;
    padding-bottom: 1rem;
}

.meta-info {
    display: flex;
    gap: 2rem;
    color: var(--gray);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.media-container {
    margin-bottom: 2rem;
    border-radius: 8px;
    overflow: hidden;
    display: block;
    justify-content: center;
}

.pdf-viewer {
    width: 100%;
    height: 500px;
    border: none;
}

.project-desc {
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

.project-nav {
    display: flex;
    justify-content: space-between;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
}
.nav-btn:hover { color: var(--primary-color); }

/* --- CONTACT --- */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info div { margin-bottom: 1.5rem; }
.contact-info i { color: var(--primary-color); margin-right: 10px; }

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form input, .contact-form textarea {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    outline: none;
}

.contact-form input:focus, .contact-form textarea:focus {
    border-color: var(--primary-color);
}

.submit-btn {
    padding: 10px 20px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

.submit-btn:hover { background: var(--hover-color); }

/* --- FOOTER --- */
footer {
    text-align: center;
    padding: 1.5rem;
    background: #222;
    color: #fff;
    margin-top: 2rem;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .nav-links {
        position: absolute;
        top: 60px;
        right: -100%;
        background: var(--white);
        flex-direction: column;
        width: 100%;
        text-align: center;
        padding: 2rem;
        box-shadow: var(--shadow);
    }
    .nav-links.active { right: 0; }
    .hamburger { display: block; }
    .contact-wrapper { grid-template-columns: 1fr; }
    .meta-info { flex-direction: column; gap: 0.5rem; }
}

/* --- CV / RESUME STYLES --- */

/* Header nút download */
.cv-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 2px solid #eee;
    padding-bottom: 1rem;
}

.btn-download {
    background: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 0.9rem;
    transition: var(--transition);
}

.btn-download:hover {
    background: var(--hover-color);
}

/* Bố cục Grid 2 cột */
.cv-wrapper {
    display: grid;
    grid-template-columns: 300px 1fr; /* Cột trái 300px, Cột phải phần còn lại */
    gap: 3rem;
}

/* Sidebar (Cột trái) */
.cv-sidebar {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    height: fit-content;
}

.avatar-box {
    width: 150px;
    height: 150px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--primary-color);
}

.avatar-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-section {
    text-align: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 1.5rem;
}

.my-name { font-size: 1.5rem; color: #333; margin-bottom: 5px; }
.my-role { color: var(--primary-color); font-weight: 600; font-size: 0.9rem; text-transform: uppercase; }

.cv-section-box { margin-bottom: 2rem; }
.cv-section-box h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #333;
}
.cv-section-box h3 i { color: var(--primary-color); }

/* Contact List */
.contact-list li {
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: #555;
    word-break: break-all;
}
.contact-list i { width: 20px; color: var(--gray); }

/* Skills Tags */
.skill-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-tags span {
    background: #eee;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #333;
}

/* Main Content (Cột phải) */
.cv-heading {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 1.5rem;
    border-left: 5px solid var(--primary-color);
    padding-left: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cv-block { margin-bottom: 3rem; }

/* Timeline Styles */
.timeline-item {
    display: flex;
    gap: 20px;
    margin-bottom: 2rem;
    position: relative;
}

.timeline-item .time {
    min-width: 120px;
    font-weight: bold;
    color: var(--gray);
    font-size: 0.9rem;
    padding-top: 5px;
}

.timeline-item .content {
    border-left: 2px solid #ddd;
    padding-left: 20px;
    padding-bottom: 10px;
    flex: 1;
}

.timeline-item .content h4 { font-size: 1.2rem; color: #222; margin-bottom: 5px; }
.timeline-item .content .company {
    display: block;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 10px;
}
.timeline-item .content ul {
    list-style-type: disc;
    margin-left: 20px;
    margin-top: 10px;
    color: #555;
}

/* Responsive cho CV */
@media (max-width: 768px) {
    .cv-wrapper { grid-template-columns: 1fr; }
    .cv-header-top { flex-direction: column; gap: 1rem; align-items: flex-start; }
    .timeline-item { flex-direction: column; gap: 5px; }
    .timeline-item .content { border-left: none; padding-left: 0; border-top: 2px solid #ddd; padding-top: 10px; }
    .section-title { text-align: center !important; width: 100%; }
}

/* --- CSS CHO LOGO CÔNG TY TRONG CV --- */

.job-header {
    display: flex;
    align-items: center; /* Căn giữa theo chiều dọc */
    gap: 15px; /* Khoảng cách giữa logo và text */
    margin-bottom: 10px;
}

.company-logo {
    width: 50px;       /* Kích thước logo cố định */
    height: 50px;
    object-fit: contain; /* Đảm bảo logo không bị méo */
    background: #fff;    /* Nền trắng cho logo (nếu logo png trong suốt) */
    border: 1px solid #eee; /* Viền mỏng cho gọn */
    border-radius: 6px;  /* Bo góc nhẹ */
    padding: 2px;        /* Khoảng đệm nhỏ bên trong */
    flex-shrink: 0;      /* Ngăn logo bị co lại trên màn hình nhỏ */
}

.job-title-group h4 {
    font-size: 1.2rem;
    color: #222;
    margin-bottom: 2px;
    line-height: 1.2;
}

.job-title-group .company {
    display: block;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.95rem;
}

/* Responsive: Trên mobile vẫn giữ logo bên cạnh text */
@media (max-width: 480px) {
    .company-logo {
        width: 40px;
        height: 40px;
    }
    .job-title-group h4 {
        font-size: 1.1rem;
    }
}