/* The home project's own styles, layered over the theme.
 *
 * Two jobs: the curated cards' repository link, and printing the CV. The
 * theme already hides the site chrome when printing; what is left here is
 * what only this site knows -- that /cv/ is a document somebody prints, so
 * it has to come out of a printer as one plain column with nothing around
 * it and no page breaks in the middle of an entry.
 */

/* === The curated project cards === */

.project-repo {
    display: inline-block;
    margin-top: 0.35rem;
    font-size: 0.85rem;
}

/* The CV page carries its Person entity in an empty element, which the SEO
 * tag builder reads and the reader never sees. */
.cv-person {
    display: none;
}

/* === Printing === */

@media print {
    /* The theme hides the sidebar, the table of contents, the search UI,
     * the theme toggle and the site footer. The page's own footer -- edit
     * links, page metadata, previous/next -- is chrome too when the page is
     * a document being printed, and so is anything left of the header. */
    .page-footer,
    .page-meta,
    .version-picker,
    .locale-picker,
    .version-badge,
    .external-badge,
    .site-header,
    .header,
    .footer,
    .topbar-actions,
    .version-notice {
        display: none !important;
    }

    /* One column, edge to edge: no sidebar gutter to leave room for. */
    .layout,
    .layout.layout--narrow {
        display: block;
    }

    .content,
    .layout.layout--narrow .content {
        max-width: 100%;
        margin: 0;
        padding: 0;
    }

    /* A CV is read as prose on paper; the theme's habit of printing every
     * href after its link turns a page of links into a page of URLs. The
     * addresses that matter (the email, the profiles) are the link text. */
    a[href]::after {
        content: none !important;
    }

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

    /* An entry that straddles a page break is unreadable: keep each heading
     * with what follows it, and each block whole. */
    h1, h2, h3 {
        break-after: avoid;
        page-break-after: avoid;
    }

    h2 {
        border: none;
        margin-top: 1.2rem;
    }

    li, p, .api-entry {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    /* The photo is an identity mark on paper, not a hero image. */
    .content img {
        max-width: 3.5cm;
        float: right;
        margin: 0 0 0.5rem 1rem;
    }

    body {
        font-size: 10.5pt;
        line-height: 1.35;
    }

    @page {
        margin: 1.4cm;
    }
}
