
/* =========================================
   Print-specific styles (for the PDF)
   ========================================= */

@media print {

    /* A4 page configuration */
    @page {
        size: A4;
        margin: 15mm 17mm;
    }

    /* Base document styling */
    html,
    body {
        background: white !important;
        color: #222 !important;
        font-family: Arial, Helvetica, sans-serif;
        font-size: 9.5pt;
        line-height: 1.4;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Remove website-specific decoration */
    *,
    *::before,
    *::after {
        box-shadow: none !important;
        text-shadow: none !important;
    }

    /* Hide interactive elements */
    button,
    nav,
    .download-cv,
    .social-icons,
    .read-more,
    .read-less,
    footer {
        display: none !important;
    }

    /* Ensure collapsible content is always visible */
    details.collapsible {
        display: block !important;
    }

    details.collapsible > summary {
        display: none !important;
    }

    .collapsible-content {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        height: auto !important;
        overflow: visible !important;
        transition: none !important;
    }


    details > summary {
        display: none !important;
    }

    /* Remove unnecessary container constraints */
    .container {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Headings */
    h1 {
        font-size: 22pt;
        margin-bottom: 4pt;
    }

    h2 {
        font-size: 14pt;
        margin-top: 14pt;
        margin-bottom: 8pt;
        border-bottom: 1px solid #ccc;
        padding-bottom: 3pt;
    }

    h3 {
        font-size: 11pt;
        margin-top: 10pt;
        margin-bottom: 3pt;
    }

    h4 {
        font-size: 10pt;
        margin-bottom: 3pt;
    }

    /* Paragraphs */
    p {
        margin-top: 0;
        margin-bottom: 6pt;
    }

    /* Lists */
    ul {
        padding-left: 18pt;
        margin-top: 3pt;
        margin-bottom: 6pt;
    }

    li {
        margin-bottom: 3pt;
    }

    /* Links */
    a {
        color: #222 !important;
        text-decoration: none !important;
    }

    /* Avoid awkward page breaks */
    h1, h2, h3, h4 {
        break-after: avoid;
        page-break-after: avoid;
    }

    li {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    /* Preserve colours when printing */
    * {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    /* Remove horizontal separators between CV sections */
    hr {
        display: none !important;
    }

    /* Reduce spacing between CV sections */
    .resume-section {
        min-height: auto !important;
        padding: 15px 0 !important;
    }

    /* Reduce spacing between section headings and content */
    .resume-section-content {
        width: 100%;
    }
}
