/* CV page: floating "Download PDF" button (screen) + print-optimized layout.
   Loaded only on /cv/ via `page.extra.stylesheets`. */

/* ---- Screen: floating download button ---- */
@media screen {
    .cv-download {
        position: absolute;
        top: 0;
        right: 0;
        display: inline-flex;
        align-items: center;
        gap: 0.4em;
        padding: 0.4em 0.9em;
        font: inherit;
        font-size: 0.85rem;
        line-height: 1.2;
        color: var(--text-color);
        background: var(--background-color);
        border: 1px solid var(--text-color);
        border-radius: 4px;
        cursor: pointer;
        transition: color 0.2s ease, background-color 0.2s ease;
    }

    .cv-download::before {
        content: "\2913"; /* ⤓ down arrow to bar */
        font-size: 1em;
    }

    .cv-download:hover,
    .cv-download:focus-visible {
        color: var(--background-color);
        background: var(--text-color);
    }

    /* Anchor the button to the article so `position: absolute` is relative to it. */
    main article {
        position: relative;
    }
}

/* ---- Print: strip site chrome, tidy the page ---- */
@media print {
    header,
    footer,
    #skip-link,
    #button-container,
    .article-title,
    .meta,
    .cv-download {
        display: none !important;
    }

    html,
    body {
        background: #fff !important;
        color: #000 !important;
        font-size: 11pt;
    }

    .content {
        max-width: none;
        margin: 0;
        padding: 0;
    }

    a {
        color: #000 !important;
        text-decoration: none;
    }

    /* Plain-text links: do not append the URL. */

    /* Keep each role / section block together across page breaks. */
    .body h2,
    .body h3 {
        break-after: avoid;
        page-break-after: avoid;
    }

    .body h3 + p,
    .body h2 + p {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    @page {
        margin: 1.5cm 1.6cm;
    }
}
