/* Thiết lập chung */
body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f4f7f6; /* Màu nền nhẹ nhàng */
    color: #333;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 20px;
}

/* Header của CV (Giống phần trên của card YouTube) */
.cv-header {
    background-color: #1a1a1a; /* Nền tối giống YouTube */
    color: #fff;
    padding-bottom: 20px; /* Thêm padding để ảnh đại diện không chạm mép dưới */
    position: relative; /* Để ảnh đại diện có thể nằm đè lên ảnh bìa */
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.cv-header .cover-image {
    width: 100%;
    height: 300px; /* Chiều cao của ảnh bìa */
    overflow: hidden; /* Đảm bảo ảnh không tràn ra ngoài */
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #333; /* Màu nền khi ảnh chưa load hoặc ảnh không đầy đủ */
}

.cv-header .cover-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Đảm bảo ảnh đầy đủ khung mà không bị méo */
    display: block;
}

.cv-header .header-content {
    position: relative; /* Để các phần tử bên trong có thể căn chỉnh */
    margin-top: -80px; /* Đẩy nội dung lên trên ảnh bìa một chút */
    text-align: center;
    z-index: 2; /* Đảm bảo nội dung nằm trên ảnh bìa */
}

.cv-header .profile-pic {
    width: 150px;
    height: 150px;
    border-radius: 50%; /* Bo tròn ảnh đại diện */
    object-fit: cover;
    border: 5px solid #fff; /* Viền trắng nổi bật */
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
    margin-bottom: 15px;
    display: block; /* Để margin auto hoạt động */
    margin-left: auto;
    margin-right: auto;
}

.cv-header h1 {
    margin: 10px 0 5px;
    font-size: 2.8em;
    font-weight: 700;
    color: #fff; /* Chữ trắng trên nền đen */
}

.cv-header .tagline {
    font-size: 1.4em;
    font-weight: 300;
    opacity: 0.9;
    margin-bottom: 20px;
    color: #ccc; /* Chữ xám nhạt */
}

.cv-header .contact-info p {
    margin: 5px 0;
    font-size: 0.9em;
    color: #eee;
}

.cv-header .contact-info a {
    color: #a2d2ff; /* Màu xanh nhạt cho link */
    text-decoration: none;
    transition: color 0.3s ease;
}

.cv-header .contact-info a:hover {
    color: #f0f0f0;
}

/* Main Content Sections (Vẫn giữ style chuyên nghiệp) */
.main-content {
    padding-top: 30px;
}

.section {
    background-color: #fff;
    padding: 30px;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.section h2 {
    color: #2c3e50;
    font-size: 2em;
    margin-top: 0;
    margin-bottom: 20px;
    border-bottom: 3px solid #e74c3c; /* Màu đỏ nổi bật cho tiêu đề */
    padding-bottom: 10px;
    display: inline-block;
}

/* Text formatting */
p {
    margin-bottom: 1em;
    font-size: 1.1em;
}

ul {
    list-style-type: disc;
    margin-left: 20px;
    margin-bottom: 1em;
}

ul li {
    margin-bottom: 8px;
}

a {
    color: #e74c3c; /* Màu link mặc định */
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #c0392b;
}

/* Specific for personal info in About Me */
.personal-info {
    background-color: #f9f9f9;
    padding: 15px 20px;
    border-radius: 5px;
    margin-bottom: 20px;
    border-left: 5px solid #3498db; /* Viền xanh nổi bật */
}

.personal-info h3 {
    margin-top: 0;
    color: #2c3e50;
    font-size: 1.3em;
    margin-bottom: 10px;
}

.personal-info ul {
    list-style-type: none; /* Bỏ dấu đầu dòng mặc định */
    padding: 0;
    margin: 0;
}

.personal-info ul li {
    margin-bottom: 5px;
    font-size: 1em;
}

/* Objective section */
.objective-item {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #eee;
}

.objective-item:last-child {
    border-bottom: none;
}

.objective-item h3 {
    font-size: 1.5em;
    color: #34495e;
    margin-bottom: 10px;
}

/* Job/Education Item */
.job-item, .edu-item {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #eee;
}

.job-item:last-child, .edu-item:last-child {
    border-bottom: none;
}

.job-item h3, .edu-item h3 {
    margin: 0 0 5px;
    font-size: 1.5em;
    color: #34495e;
}

.period {
    font-style: italic;
    color: #777;
    margin-bottom: 10px;
    display: block;
}

/* Skills */
.skills-category {
    margin-bottom: 20px;
}

.skills-category h3 {
    font-size: 1.3em;
    color: #34495e;
    margin-bottom: 10px;
}

.skill-list {
    list-style-type: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
}

.skill-list li {
    background-color: #e8f5fb;
    color: #2c3e50;
    padding: 8px 15px;
    margin: 0 10px 10px 0;
    border-radius: 20px;
    font-size: 0.95em;
    font-weight: 600;
    white-space: nowrap;
}

/* Footer */
.footer {
    background-color: #2c3e50;
    color: #fff;
    text-align: center;
    padding: 20px 0;
    margin-top: 30px;
    font-size: 0.9em;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .cv-header .cover-image {
        height: 200px;
    }
    .cv-header .header-content {
        margin-top: -60px;
    }
    .cv-header .profile-pic {
        width: 120px;
        height: 120px;
    }
    .cv-header h1 {
        font-size: 2.2em;
    }
    .cv-header .tagline {
        font-size: 1.2em;
    }
    .section h2 {
        font-size: 1.8em;
    }
    .job-item h3, .edu-item h3, .objective-item h3 {
        font-size: 1.3em;
    }
    .skill-list li {
        margin: 0 8px 8px 0;
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    .cv-header .cover-image {
        height: 150px;
    }
    .cv-header .header-content {
        margin-top: -50px;
    }
    .cv-header .profile-pic {
        width: 100px;
        height: 100px;
    }
    .cv-header h1 {
        font-size: 1.8em;
    }
    .cv-header .tagline {
        font-size: 1em;
    }
    .container {
        padding: 15px;
    }
    .section {
        padding: 20px;
    }
    .skill-list {
        justify-content: center;
    }
}