﻿/* =========================================================
   HOME CV - WEB
========================================================= */
* {
    box-sizing: border-box;
}
.cv-page {
    width: 100%;
    min-height: 100vh;
    background: #f5f5f5;
    padding: 25px;
    box-sizing: border-box;
}
.cv-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 300px 1fr;
    background: #ffffff;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}
/* =========================================================
   LEFT SIDEBAR
========================================================= */
.cv-sidebar {
    background: #17191a;
    color: #ffffff;
    padding: 28px 22px;
    box-sizing: border-box;
}
/* =========================================================
   PROFILE
========================================================= */
.cv-profile {
    text-align: center;
    padding-bottom: 16px;
}
.cv-avatar {
    width: 155px;
    height: 155px;
    margin: 0 auto 12px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #f8a9bd;
    background: #ffffff;
}
    .cv-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
.cv-avatar-empty {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    color: #999999;
    font-size: 48px;
}
.cv-name {
    margin: 0;
    color: #f8a9bd;
    font-size: 26px;
    line-height: 1.15;
    font-weight: 800;
}
.cv-job-title {
    margin: 5px 0 0;
    color: #ffffff;
    font-size: 15px;
    line-height: 1.25;
}
/* =========================================================
   DECORATIVE LINE
========================================================= */
.cv-sidebar-line {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 12px 0;
}
    .cv-sidebar-line::before,
    .cv-sidebar-line::after {
        content: "";
        flex: 1;
        height: 1px;
        background: #f8a9bd;
    }
    .cv-sidebar-line span {
        color: #f8a9bd;
        font-size: 14px;
    }
/* =========================================================
   CONTACT
========================================================= */
.cv-contact {
    margin-bottom: 14px;
}
.cv-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 7px;
    font-size: 12px;
    line-height: 1.35;
}
.cv-contact-icon {
    width: 23px;
    height: 23px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8a9bd;
    color: #17191a;
    border-radius: 50%;
    font-size: 11px;
}
.cv-contact-item a {
    color: #ffffff;
    text-decoration: none;
    word-break: break-word;
}
/* =========================================================
   SIDEBAR SECTION
========================================================= */
.cv-sidebar-section {
    margin-top: 15px;
}
.cv-sidebar-title {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 8px;
    color: #f8a9bd;
    font-size: 16px;
    line-height: 1.2;
    font-weight: 800;
}
.cv-sidebar-title-icon {
    font-size: 15px;
}
/* =========================================================
   INTRODUCTION / MỤC TIÊU
========================================================= */
.cv-introduction {
    color: #eeeeee;
    font-size: 12px;
    line-height: 1.45;
    white-space: pre-line;
}
/* =========================================================
   SKILLS - KỸ NĂNG
========================================================= */
.cv-skill {
    margin-bottom: 9px;
}
    .cv-skill:last-child {
        margin-bottom: 0;
    }
.cv-skill-name {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 3px;
    color: #ffffff;
    font-size: 11px;
    line-height: 1.2;
}
.cv-skill-bar {
    width: 100%;
    height: 5px;
    background: #555;
    overflow: hidden;
    border-radius: 3px;
}
.cv-skill-progress {
    height: 100%;
/*    background: #f8a9bd;*/
    background: #e88aa5;
    border-radius: 3px;
}
/* =========================================================
   LANGUAGE - NGÔN NGỮ
========================================================= */
.cv-language {
    margin-bottom: 8px;
}
    .cv-language:last-child {
        margin-bottom: 0;
    }
.cv-language-name {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    color: #ffffff;
    font-size: 11px;
    line-height: 1.2;
}
.cv-language-level {
    margin-top: 2px;
    color: #dddddd;
    font-size: 9.5px;
    line-height: 1.2;
}
.cv-language-bar {
    width: 100%;
    height: 4px;
    margin-top: 3px;
    background: #eeeeee;
    overflow: hidden;
    border-radius: 3px;
}
.cv-language-progress {
    height: 100%;
    background: #f8a9bd;
    border-radius: 3px;
}
/* =========================================================
   SOCIAL LINKS
========================================================= */
.cv-social {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 7px;
}
.cv-social-icon {
    width: 23px;
    height: 23px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 50%;
    background: #f8a9bd;
    color: #17191a;
    font-size: 10px;
    font-weight: 700;
}
.cv-social a {
    color: #ffffff;
    text-decoration: none;
    font-size: 11px;
    line-height: 1.2;
    word-break: break-all;
}
    .cv-social a:hover {
        color: #f8a9bd;
    }
/* =========================================================
   RIGHT CONTENT
========================================================= */
.cv-content {
    background: #ffffff;
    padding: 30px 38px;
    box-sizing: border-box;
}
/* =========================================================
   SECTION
========================================================= */
.cv-section {
    margin-bottom: 22px;
}
    .cv-section:last-child {
        margin-bottom: 0;
    }
/* =========================================================
   SECTION TITLE
========================================================= */
.cv-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.cv-section-icon {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 50%;
    background: #f8a9bd;
    color: #17191a;
    font-size: 14px;
}
.cv-section-title h2 {
    margin: 0;
    color: #17191a;
    font-size: 17px;
    line-height: 1.1;
    font-weight: 800;
    white-space: nowrap;
}
.cv-section-line {
    flex: 1;
    height: 1px;
    background: #f8a9bd;
    position: relative;
}
    .cv-section-line::after {
        content: "";
        position: absolute;
        right: 0;
        top: 50%;
        width: 5px;
        height: 5px;
        transform: translateY(-50%);
        background: #f8a9bd;
        border-radius: 50%;
    }
/* =========================================================
   EDUCATION
========================================================= */
.cv-education-item {
    margin-bottom: 11px;
    padding-left: 27px;
    position: relative;
}
    .cv-education-item::before {
        content: "";
        position: absolute;
        left: 7px;
        top: 5px;
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: #f8a9bd;
        border: 1px solid #17191a;
    }
.cv-item-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}
.cv-item-title {
    margin: 0;
    color: #17191a;
    font-size: 13px;
    line-height: 1.2;
    font-weight: 800;
}
.cv-item-time {
    flex-shrink: 0;
    color: #333333;
    font-size: 10px;
    line-height: 1.2;
    font-weight: 600;
}
.cv-item-subtitle {
    margin: 2px 0;
    color: #e66f91;
    font-size: 11px;
    line-height: 1.2;
    font-weight: 700;
}
.cv-item-description {
    margin-top: 3px;
    color: #333333;
    font-size: 10.5px;
    line-height: 1.35;
    white-space: pre-line;
}
/* =========================================================
   EXPERIENCE
========================================================= */
.cv-experience-item {
    margin-bottom: 11px;
    padding-bottom: 8px;
    border-bottom: 1px dashed #f8a9bd;
}
    .cv-experience-item:last-child {
        border-bottom: none;
        margin-bottom: 0;
        padding-bottom: 0;
    }
.cv-experience-role {
    color: #17191a;
    font-size: 13px;
    line-height: 1.2;
    font-weight: 800;
}
.cv-company {
    margin-top: 2px;
    color: #e66f91;
    font-size: 11px;
    line-height: 1.2;
    font-weight: 700;
}
/* =========================================================
   DESCRIPTION LIST
========================================================= */
.cv-description-list {
    margin: 4px 0 0;
    padding-left: 15px;
}
    .cv-description-list li {
        margin-bottom: 2px;
        color: #333333;
        font-size: 10px;
        line-height: 1.3;
    }
/* =========================================================
   PROJECT
========================================================= */
.cv-project-item {
    padding: 8px 10px;
    margin-bottom: 7px;
    border-left: 3px solid #f8a9bd;
    background: #fff7f9;
}
.cv-project-title {
    margin: 0;
    color: #17191a;
    font-size: 13px;
    line-height: 1.2;
    font-weight: 800;
}
.cv-project-role {
    margin-top: 2px;
    color: #e66f91;
    font-size: 10px;
    line-height: 1.2;
    font-weight: 700;
}
.cv-project-tech {
    margin-top: 3px;
    color: #555555;
    font-size: 9.5px;
    line-height: 1.25;
}
.cv-project-links {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 5px;
}
    .cv-project-links a {
        padding: 3px 6px;
        border: 1px solid #f8a9bd;
        border-radius: 4px;
        color: #333333;
        text-decoration: none;
        font-size: 8px;
        line-height: 1;
        font-weight: 600;
    }
        .cv-project-links a:hover {
            background: #f8a9bd;
        }
.cv-project-image {
    width: 100%;
    max-width: 220px;
    max-height: 90px;
    margin-top: 5px;
    object-fit: cover;
    border-radius: 5px;
}
/* =========================================================
   CERTIFICATE
========================================================= */
.cv-certificate-item {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px solid #eeeeee;
}
.cv-certificate-name {
    color: #17191a;
    font-size: 10px;
    line-height: 1.2;
    font-weight: 700;
}
.cv-certificate-org {
    margin-top: 2px;
    color: #e66f91;
    font-size: 9px;
    line-height: 1.2;
}
.cv-certificate-date {
    flex-shrink: 0;
    color: #555555;
    font-size: 9px;
    line-height: 1.2;
}
.cv-certificate-link {
    display: inline-block;
    margin-top: 2px;
    color: #e66f91;
    text-decoration: none;
    font-size: 8.5px;
}
/* =========================================================
   EMPTY
========================================================= */
.cv-empty {
    color: #999999;
    font-size: 10px;
    font-style: italic;
}
/* =========================================================
   RESPONSIVE
========================================================= */
@media (max-width: 1000px) {
    .cv-page {
        padding: 15px;
    }
    .cv-container {
        grid-template-columns: 270px 1fr;
    }
    .cv-sidebar {
        padding: 25px 18px;
    }
    .cv-content {
        padding: 25px;
    }
    .cv-avatar {
        width: 140px;
        height: 140px;
    }
    .cv-name {
        font-size: 23px;
    }
}
@media (max-width: 768px) {
    .cv-page {
        padding: 0;
    }
    .cv-container {
        display: block;
        box-shadow: none;
    }
    .cv-sidebar {
        padding: 25px 20px;
    }
    .cv-content {
        padding: 25px 20px;
    }
    .cv-avatar {
        width: 145px;
        height: 145px;
    }
    .cv-item-top {
        display: block;
    }
    .cv-item-time {
        display: block;
        margin-top: 3px;
    }
    .cv-section-title {
        gap: 7px;
    }
        .cv-section-title h2 {
            font-size: 17px;
        }
    .cv-section-line {
        display: none;
    }
}
@media (max-width: 480px) {
    .cv-sidebar {
        padding: 22px 16px;
    }
    .cv-content {
        padding: 22px 15px;
    }
    .cv-name {
        font-size: 22px;
    }
    .cv-job-title {
        font-size: 14px;
    }
    .cv-section-title h2 {
        font-size: 16px;
    }
    .cv-section-icon {
        width: 28px;
        height: 28px;
        font-size: 13px;
    }
}
/* =========================================================
   PRINT BUTTON
========================================================= */
.cv-print-button {
    position: fixed;
    top: 20px;
    right: 25px;
    z-index: 9999;
}
    .cv-print-button button {
        padding: 10px 16px;
        background: #222222;
        color: #ffffff;
        border: 1px solid #222222;
        border-radius: 7px;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        transition: 0.2s ease;
    }
        .cv-print-button button:hover {
            background: #e99aae;
            color: #222222;
        }
/* =========================================================
   PRINT / PDF - A4 FULL PAGE
========================================================= */
@media print {
    @page {
        size: A4 portrait;
        margin: 0 !important;
    }
    /* =====================================================
       RESET TOÀN BỘ
    ===================================================== */
    html,
    body {
        width: 210mm !important;
        height: 297mm !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        background: #fff !important;
    }
    body {
        display: block !important;
        position: static !important;
        transform: none !important;
        zoom: 1 !important;
    }
    /* =====================================================
       ẨN NÚT IN
    ===================================================== */
    .cv-print-button {
        display: none !important;
    }
    /* =====================================================
       QUAN TRỌNG:
       RESET CÁC CONTAINER CỦA LAYOUT
    ===================================================== */
    main,
    .container,
    .container-fluid,
    .row {
        width: auto !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        transform: none !important;
    }
    /* =====================================================
       CV PAGE
    ===================================================== */
    .cv-page {
        display: block !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 210mm !important;
        min-width: 210mm !important;
        max-width: 210mm !important;
        height: 297mm !important;
        min-height: 297mm !important;
        max-height: 297mm !important;
        margin: 0 !important;
        padding: 0 !important;
        transform: none !important;
        transform-origin: top left !important;
        zoom: 1 !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }
    /* =====================================================
       CV CONTAINER
    ===================================================== */
    .cv-container {
        display: grid !important;
        grid-template-columns: 63mm 147mm !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 210mm !important;
        min-width: 210mm !important;
        max-width: 210mm !important;
        height: 297mm !important;
        min-height: 297mm !important;
        max-height: 297mm !important;
        margin: 0 !important;
        padding: 0 !important;
        transform: none !important;
        transform-origin: top left !important;
        zoom: 1 !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
        box-shadow: none !important;
        break-inside: avoid !important;
        page-break-inside: avoid !important;
    }
    /* =====================================================
       SIDEBAR
    ===================================================== */
    .cv-sidebar {
        width: 63mm !important;
        min-width: 63mm !important;
        max-width: 63mm !important;
        height: 297mm !important;
        margin: 0 !important;
        padding: 5mm 4.5mm !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
        background: #17191a !important;
        color: #fff !important;
    }
    /* =====================================================
       CONTENT
    ===================================================== */
    .cv-content {
        width: 147mm !important;
        min-width: 147mm !important;
        max-width: 147mm !important;
        height: 297mm !important;
        margin: 0 !important;
        padding: 5mm !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
        background: #fff !important;
    }
    /* =====================================================
       RESET FLEX / FLOAT
    ===================================================== */
    .cv-page,
    .cv-container,
    .cv-sidebar,
    .cv-content {
        float: none !important;
        flex: none !important;
        align-self: auto !important;
        justify-self: auto !important;
        right: auto !important;
        bottom: auto !important;
        inset-inline-start: 0 !important;
    }
    /* =====================================================
       KHÔNG SCALE
    ===================================================== */
    .cv-page,
    .cv-container {
        transform: none !important;
        zoom: 1 !important;
    }
    /* =====================================================
       GIỮ MÀU
    ===================================================== */
    *,
    *::before,
    *::after {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    /* =========================================================
   PRINT FIX - FULL CONTENT + CERTIFICATE 2 CỘT
========================================================= */
    /* =========================================================
   1. GIẢM KHOẢNG CÁCH ĐỂ KHÔNG BỊ CẮT PHẦN DƯỚI
========================================================= */
    .cv-section {
        margin-bottom: 3mm !important;
        break-inside: avoid !important;
        page-break-inside: avoid !important;
    }
    .cv-section-title {
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        gap: 5px !important;
        margin-bottom: 2mm !important;
        min-width: 0 !important;
        break-after: avoid !important;
        page-break-after: avoid !important;
    }
    /* =========================================================
   2. ĐƯỜNG GẠCH HỒNG CẠNH TIÊU ĐỀ
========================================================= */
    .cv-section-line {
        display: block !important;
        flex: 1 1 auto !important;
        width: auto !important;
        min-width: 10px !important;
        height: 0 !important;
        border-top: 1px solid #f8a9bd !important;
        background: transparent !important;
        opacity: 1 !important;
        visibility: visible !important;
        position: relative !important;
    }
        /* Chấm tròn cuối đường gạch */
        .cv-section-line::after {
            content: "" !important;
            display: block !important;
            position: absolute !important;
            right: -1px !important;
            top: -3px !important;
            width: 4px !important;
            height: 4px !important;
            background: #f8a9bd !important;
            border-radius: 50% !important;
            opacity: 1 !important;
            visibility: visible !important;
        }
    /* =========================================================
   3. CERTIFICATE - LUÔN 2 CỘT
========================================================= */
    .cv-certificates-grid {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
        grid-auto-flow: row !important;
        column-gap: 5mm !important;
        row-gap: 0 !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }
    /* =========================================================
   TỪNG CHỨNG CHỈ
========================================================= */
    .cv-certificate-item {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto !important;
        align-items: start !important;
        gap: 3px !important;
        min-width: 0 !important;
        width: 100% !important;
        padding: 2mm 1mm !important;
        margin: 0 !important;
        border-bottom: 1px dashed #dddddd !important;
        box-sizing: border-box !important;
        break-inside: avoid !important;
        page-break-inside: avoid !important;
    }
    /* =========================================================
   NỘI DUNG CHỨNG CHỈ
========================================================= */
    .cv-certificate-content {
        min-width: 0 !important;
        width: 100% !important;
        overflow: hidden !important;
    }
    .cv-certificate-name {
        color: #17191a !important;
        font-size: 10px !important;
        line-height: 1.1 !important;
        font-weight: 700 !important;
        word-break: normal !important;
    }
    .cv-certificate-org {
        margin-top: 1px !important;
        color: #e66f91 !important;
        font-size: 8.5px !important;
        line-height: 1.1 !important;
    }
    .cv-certificate-date {
        flex-shrink: 0 !important;
        white-space: nowrap !important;
        color: #555555 !important;
        font-size: 8px !important;
        line-height: 1.1 !important;
    }
    /* =========================================================
   LINK CHỨNG CHỈ
========================================================= */
    .cv-certificate-link {
        display: inline-block !important;
        margin-top: 1px !important;
        color: #e66f91 !important;
        font-size: 7.5px !important;
        line-height: 1 !important;
        text-decoration: none !important;
    }
    /* =========================================================
   4. GIẢM KHOẢNG CÁCH CÁC PHẦN
   ĐỂ HIỂN THỊ HẾT TRONG 1 TRANG
========================================================= */
    .cv-education-item {
        margin-bottom: 2.5mm !important;
    }
    .cv-experience-item {
        margin-bottom: 2.5mm !important;
        padding-bottom: 1.5mm !important;
    }
    .cv-project-item {
        padding: 2.5mm 3mm !important;
        margin-bottom: 1.5mm !important;
    }
    /* =========================================================
   5. GIẢM CHIỀU CAO TEXT
========================================================= */
    .cv-item-description {
        line-height: 1.15 !important;
    }
    .cv-description-list li {
        line-height: 1.1 !important;
        margin-bottom: 0 !important;
    }
    .cv-project-item .cv-item-description {
        line-height: 1.1 !important;
    }
    /* =========================================================
   6. PROJECT GỌN HƠN
========================================================= */
    .cv-project-title {
        font-size: 11px !important;
    }
    .cv-project-role {
        margin-top: 0 !important;
        font-size: 9.5px !important;
    }
    .cv-project-tech {
        margin-top: 0 !important;
        font-size: 9px !important;
    }
    .cv-project-links {
        margin-top: 1.5px !important;
    }
    /* =========================================================
   7. GIẢM KHOẢNG CÁCH TIÊU ĐỀ
========================================================= */
    .cv-section-title h2 {
        font-size: 13.5px !important;
        line-height: 1 !important;
    }
    .cv-section-icon {
        width: 17px !important;
        height: 17px !important;
        font-size: 10px !important;
    }
    /* =========================================================
   8. ĐẢM BẢO KHÔNG CẮT CERTIFICATE
========================================================= */
    .cv-certificates-grid,
    .cv-certificate-item {
        overflow: visible !important;
    }
    /* =========================================================
   9. ĐẢM BẢO ĐƯỜNG HỒNG ĐƯỢC IN
========================================================= */
    .cv-section-line,
    .cv-section-line::after {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}