/* =========================================================
   CV PDF EXPORT
   ========================================================= */

#cv-template {
    display: none;
}

.cv-document,
.cv-document * {
    box-sizing: border-box;
}

.cv-document {
    width: 210mm;
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 10mm;
    background: #ffffff !important;
    color: #374151 !important;
    color-scheme: only light !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    font-family: "Arimo", Arial, Helvetica, sans-serif !important;
    font-size: 8.1pt;
    font-weight: 400;
    line-height: 1.52;
}

    /*
 * html2pdf does not paginate the semantic CV directly anymore.
 * main.js first creates physical A4 .cv-page elements, then html2pdf
 * only rasterizes those already-paginated pages.
 */
    .cv-document.cv-paged-document {
        width: 210mm !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
        background: #ffffff !important;
        background-color: #ffffff !important;
    }

.cv-page {
    width: 210mm;
    height: 296.8mm;
    min-height: 296.8mm;
    max-height: 296.8mm;
    margin: 0;
    padding: 10mm;
    overflow: hidden;
    background: #ffffff !important;
    background-color: #ffffff !important;
    color: #374151 !important;
    color-scheme: only light !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    box-sizing: border-box;
}

    .cv-page + .cv-page {
        margin-top: 0;
    }

/* =========================================================
   HEADER
   ========================================================= */

.cv-header {
    display: block !important;
    margin: 0 0 12pt 0;
    padding: 0 0 8pt 0;
    border-bottom: 1.5pt solid #155e75;
    background: transparent !important;
}

.cv-identity {
    display: block;
}

    .cv-name,
    .cv-identity h1 {
        margin: 0 !important;
        padding: 0 !important;
        color: #111827 !important;
        font-size: 21pt !important;
        font-weight: 700 !important;
        line-height: 1.08 !important;
        letter-spacing: 0;
    }

.cv-role {
    margin-top: 4pt;
    color: #155e75 !important;
    font-size: 11.25pt;
    font-weight: 700;
    line-height: 1.2;
}

.cv-contact-line {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
    margin-top: 8pt;
    color: #4b5563 !important;
    font-size: 7.875pt;
    font-weight: 400;
    line-height: 1.2;
}

    .cv-contact-line > * {
        display: inline-block;
        color: #4b5563 !important;
        text-decoration: none !important;
        white-space: nowrap;
    }

        .cv-contact-line > *:not(:last-child)::after {
            content: "|";
            display: inline-block;
            margin: 0 7pt;
            color: #9ca3af;
            font-weight: 400;
        }

/* =========================================================
   SECTIONS
   ========================================================= */

.cv-section {
    display: block;
    margin: 0;
    padding: 0;
    background: transparent !important;
}

    .cv-section + .cv-section {
        margin-top: 13pt;
    }

.cv-section-title {
    display: block;
    margin: 0 0 8pt 0 !important;
    padding: 0 0 5pt 0 !important;
    border-bottom: 0.75pt solid #d1d5db;
    color: #111827 !important;
    font-size: 9.375pt !important;
    font-weight: 700 !important;
    line-height: 1.15;
    letter-spacing: 0.25pt;
    text-transform: uppercase;
}

/* =========================================================
   SUMMARY
   ========================================================= */

.cv-summary-section {
    margin-top: 0;
}

.cv-summary-text {
    margin: 0 !important;
    padding: 0 !important;
    color: #374151 !important;
    font-size: 8.625pt !important;
    font-weight: 400;
    line-height: 1.56;
    text-align: left;
    white-space: pre-line;
}

/* =========================================================
   EXPERIENCE
   ========================================================= */

.cv-experience-list {
    display: block;
}

.cv-experience-item {
    display: block !important;
    position: relative;
    margin: 0;
    padding: 0;
}

    .cv-experience-item + .cv-experience-item {
        margin-top: 10.5pt;
    }

.cv-item-heading {
    display: flex !important;
    align-items: baseline;
    justify-content: space-between;
    width: 100%;
    margin: 0;
    padding: 0;
    gap: 12pt;
}

.cv-item-title {
    margin: 0 !important;
    padding: 0 !important;
    color: #111827 !important;
    font-size: 9.375pt !important;
    font-weight: 700 !important;
    line-height: 1.2;
}

.cv-item-period {
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
    color: #6b7280 !important;
    font-size: 7.875pt !important;
    font-weight: 700 !important;
    line-height: 1.2;
    white-space: nowrap;
}

.cv-item-company {
    margin-top: 2.5pt;
    color: #155e75 !important;
    font-size: 8.25pt !important;
    font-weight: 700 !important;
    line-height: 1.2;
}

.cv-item-desc {
    margin: 6pt 0 0 0 !important;
    padding: 0 !important;
    color: #374151 !important;
    font-size: 8.1pt !important;
    font-weight: 400;
    line-height: 1.52;
    text-align: left;
    white-space: pre-line;
}

/* =========================================================
   TECHNICAL SKILLS
   ========================================================= */

.cv-skills-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    column-gap: 16.5pt;
    width: 100%;
}

.cv-skill-group {
    min-width: 0;
}

.cv-skill-label {
    margin: 0 0 5pt 0;
    color: #374151 !important;
    font-size: 7.875pt !important;
    font-weight: 700 !important;
    line-height: 1.2;
}

.cv-skill-list {
    display: block;
    color: #374151 !important;
    font-size: 7.875pt !important;
    font-weight: 400;
    line-height: 1.85;
}

.cv-skill-item {
    display: inline !important;
    margin: 0;
    padding: 0;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #374151 !important;
    font-size: 7.875pt !important;
    font-weight: 400 !important;
    white-space: normal;
}

    .cv-skill-item:not(:last-child)::after {
        content: " • ";
        margin: 0 4pt;
        color: #9ca3af;
    }

/* =========================================================
   EDUCATION
   ========================================================= */

.cv-education-list {
    display: block;
}

.cv-education-item {
    display: block;
    margin: 0;
    padding: 0;
}

    .cv-education-item + .cv-education-item {
        margin-top: 8pt;
    }

    .cv-education-item .cv-item-company {
        margin-top: 2pt;
    }

/* =========================================================
   CERTIFICATES
   ========================================================= */

.cv-cert-list {
    display: block;
}

.cv-cert-item {
    display: block;
    margin: 0;
    padding: 0;
}

    .cv-cert-item + .cv-cert-item {
        margin-top: 7pt;
    }

    .cv-cert-title,
    .cv-cert-item strong {
        display: block;
        color: #111827 !important;
        font-size: 8.1pt !important;
        font-weight: 700 !important;
        line-height: 1.25;
    }

    .cv-cert-company,
    .cv-cert-item span {
        display: block;
        margin-top: 2pt;
        color: #6b7280 !important;
        font-size: 7.5pt !important;
        font-weight: 400 !important;
        line-height: 1.25;
    }

/* =========================================================
   PDF EXPORT OVERRIDES
   ========================================================= */

.cv-document.cv-pdf-export,
.cv-document.cv-pdf-export .cv-page,
.cv-document.cv-pdf-export .cv-header,
.cv-document.cv-pdf-export .cv-section,
.cv-document.cv-pdf-export .cv-experience-list,
.cv-document.cv-pdf-export .cv-experience-item,
.cv-document.cv-pdf-export .cv-skills-grid,
.cv-document.cv-pdf-export .cv-skill-group,
.cv-document.cv-pdf-export .cv-education-list,
.cv-document.cv-pdf-export .cv-education-item,
.cv-document.cv-pdf-export .cv-cert-list,
.cv-document.cv-pdf-export .cv-cert-item {
    background-color: #ffffff !important;
}

    .cv-document.cv-pdf-export .cv-header,
    .cv-document.cv-pdf-export .cv-section,
    .cv-document.cv-pdf-export .cv-experience-list,
    .cv-document.cv-pdf-export .cv-experience-item,
    .cv-document.cv-pdf-export .cv-skills-grid,
    .cv-document.cv-pdf-export .cv-skill-group,
    .cv-document.cv-pdf-export .cv-education-list,
    .cv-document.cv-pdf-export .cv-education-item,
    .cv-document.cv-pdf-export .cv-cert-list,
    .cv-document.cv-pdf-export .cv-cert-item {
        background: transparent !important;
    }

    .cv-document.cv-pdf-export .cv-name,
    .cv-document.cv-pdf-export .cv-item-title,
    .cv-document.cv-pdf-export .cv-section-title,
    .cv-document.cv-pdf-export .cv-cert-title {
        color: #111827 !important;
    }

    .cv-document.cv-pdf-export .cv-role,
    .cv-document.cv-pdf-export .cv-item-company,
    .cv-document.cv-pdf-export a {
        color: #155e75 !important;
    }

    .cv-document.cv-pdf-export .cv-summary-text,
    .cv-document.cv-pdf-export .cv-item-desc,
    .cv-document.cv-pdf-export .cv-skill-label,
    .cv-document.cv-pdf-export .cv-skill-item {
        color: #374151 !important;
    }

    .cv-document.cv-pdf-export .cv-item-period,
    .cv-document.cv-pdf-export .cv-cert-company,
    .cv-document.cv-pdf-export .cv-contact-line,
    .cv-document.cv-pdf-export .cv-contact-line span {
        color: #6b7280 !important;
    }

/* =========================================================
   NORMAL BROWSER PRINT
   ========================================================= */

@media print {
    @page {
        size: A4 portrait;
        margin: 0;
    }

    html,
    body {
        margin: 0 !important;
        padding: 0 !important;
        background: #ffffff !important;
    }

    .cv-document.cv-paged-document {
        width: 210mm !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .cv-page {
        width: 210mm !important;
        height: 297mm !important;
        min-height: 297mm !important;
        max-height: 297mm !important;
        padding: 10mm !important;
        page-break-after: always;
        break-after: page;
    }

        .cv-page:last-child {
            page-break-after: auto;
            break-after: auto;
        }
}

/* =========================================================
   iOS SAFARI PDF MEASUREMENT FIX
   ========================================================= */

#cv-pdf-render-wrapper {
    -webkit-text-size-adjust: none !important;
    text-size-adjust: none !important;
}

    #cv-pdf-render-wrapper .cv-document,
    #cv-pdf-render-wrapper .cv-page {
        -webkit-text-size-adjust: none !important;
        text-size-adjust: none !important;
    }


/* =========================================================
   Compatibility shim (added for the redesign)
   The original page inherited these global rules from the legacy
   theme (reset.css + main.css). html2pdf renders a clone that lives
   outside #cv-pdf-render-wrapper, so they are pinned on .cv-document
   to keep the downloaded CV identical to the previous one.
   ========================================================= */
.cv-document h1,
.cv-document h2,
.cv-document h3,
.cv-document h4,
.cv-document h5,
.cv-document h6 {
    color: #eee;
    font-family: "Poppins", Helvetica, sans-serif;
    font-weight: 600;
    margin: 0;
}

.cv-document h1 { font-size: 32px; }
.cv-document h2 { font-size: 27px; }
.cv-document h3 { font-size: 21px; }
.cv-document h4 { font-size: 18px; }
.cv-document h5 { font-size: 16px; }
.cv-document h6 { font-size: 14px; }

.cv-document a {
    text-decoration: none;
}

.cv-document p {
    margin: 0 0 10px;
}

.cv-document ul,
.cv-document ol {
    padding: 0;
    margin: 0;
}

/* html2canvas mis-splits text that starts with "." (e.g. ".NET Geliştiricisi")
   and draws the words on top of each other. Keeping the role on one run fixes it. */
.cv-role-text {
    white-space: nowrap;
}
