/* ==========================================================================
   print.css — print stylesheet for resume.html

   Produces a clean, professional, ink-friendly rendering of the resume when
   printed or saved to PDF. Overrides the dark screen theme with black-on-white
   type, sets a deliberate typographic hierarchy, strips browser chrome
   (headers/footers, links, navigation) and enforces sensible page breaks.
   ========================================================================== */

/* --- Page setup --------------------------------------------------------- */

/*
 * The generous top/bottom margin gives the resume room to breathe and, because
 * we rely on @page margins rather than the browser's default header/footer
 * region, it also suppresses the URL/title/date headers and footers that most
 * browsers print by default. For extra measure, the @top-center / @bottom-center
 * margin boxes below are explicitly emptied where supported.
 */
@page {
    size: letter;
    margin: 0.55in 0.5in 0.6in;

    @top-center {
        content: "";
    }
    @bottom-center {
        content: "";
    }
    @top-right {
        content: "";
    }
    @bottom-right {
        content: "";
    }
}

:root {
    --ink: #1a1a1a;
    --ink-muted: #4a4a4a;
    --ink-subtle: #6b6b6b;
    --rule: #999;
    --accent: #0b6fa4;
    --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --serif: Georgia, "Times New Roman", Times, serif;
}

html,
body {
    background: #fff !important;
    color: var(--ink);
    font-family: var(--sans);
    font-size: 10pt;
    line-height: 1.35;
}

/* Hide anything not meant for paper */
.no-print,
.skip-link,
::-webkit-scrollbar,
::-webkit-scrollbar-track,
::-webkit-scrollbar-thumb {
    display: none !important;
}

/* --- Layout ------------------------------------------------------------- */

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

.card {
    background: #fff;
    border: 0;
    border-radius: 0;
    padding: 0;
    margin-top: 0;
    box-shadow: none;
}

.card:hover {
    border-color: transparent;
}

.section {
    margin-top: 0.9rem;
}

/* --- Header ------------------------------------------------------------- */

.resume-header {
    border-bottom: 0;
    padding-bottom: 0;
    margin-bottom: 0.9rem;
    text-align: center;
}

.resume-header h1 {
    font-family: var(--serif);
    font-size: 24pt;
    font-weight: 700;
    margin: 0 0 0.15rem;
    letter-spacing: 0.03em;
    color: var(--ink);
    line-height: 1.1;
}

.resume-title {
    color: var(--ink-muted);
    font-weight: 600;
    margin: 0 0 0.55rem;
    font-size: 12.5pt;
    letter-spacing: 0.01em;
}

.resume-contact {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem 1.1rem;
    color: var(--ink-muted);
    font-size: 9.5pt;
    padding-top: 0.55rem;
    border-top: 1.5px solid var(--ink);
}

/* Show URLs for links that point off-page so a printed reader can still
   follow contact details and profiles. */
.resume-contact a,
a[href^="http"],
a[href^="mailto"] {
    color: var(--ink);
    text-decoration: none;
}

.resume-contact a::after,
a[href^="http"]::after,
a[href^="mailto"]::after {
    content: " (" attr(href) ")";
    font-size: 8.5pt;
    color: var(--ink-subtle);
}

/* --- Typography --------------------------------------------------------- */

.section-title {
    font-family: var(--sans);
    font-size: 10.5pt;
    color: var(--ink);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
    margin-bottom: 0.5rem;
    padding-bottom: 0.2rem;
    border-bottom: 1px solid var(--rule);
}

.card h3,
.card h4 {
    color: var(--ink);
    margin: 0 0 0.15rem;
}

.card .resume-role {
    font-size: 11.5pt;
    margin-top: 0;
    margin-bottom: 0.1rem;
    font-weight: 600;
}

.card .resume-period {
    color: var(--ink-subtle);
    font-size: 9.5pt;
    font-weight: 400;
    margin: 0 0 0.45rem;
    font-style: italic;
}

.card p {
    color: var(--ink);
    font-size: 9.75pt;
    margin-bottom: 0.5rem;
    text-align: justify;
    hyphens: auto;
}

.card p:last-child {
    margin-bottom: 0;
}

.resume-list {
    margin: 0;
    padding-left: 1.15rem;
    color: var(--ink);
}

.resume-list li {
    margin-bottom: 0.28rem;
    font-size: 9.75pt;
}

.resume-list li::marker {
    color: var(--accent);
}

.resume-list li:last-child {
    margin-bottom: 0;
}

.resume-list strong {
    color: var(--ink);
}

/* --- Page breaks -------------------------------------------------------- */

/* Keep role/period/section headings attached to the content that follows. */
.resume-role,
.resume-period,
.section-title,
.card h3,
.card h4 {
    break-after: avoid;
    page-break-after: avoid;
}

/* Also keep the first part of a job card together with its role heading when
   the card is forced to break across pages. */
.card {
    orphans: 3;
    widows: 3;
}

/* Keep each job card together. If it cannot fit in the remaining space, start
   it on a fresh page rather than split it mid-card. This assumes each card is
   shorter than a full page — the smaller type + tighter spacing above are what
   guarantee that for the long BlankFactor entry. */
.card {
    break-inside: avoid;
    page-break-inside: avoid;
    break-before: auto;
    page-break-before: auto;
}

.resume-list li {
    break-inside: avoid;
    page-break-inside: avoid;
}

/* Allow individual bullets inside an oversized card to break, so a single
   especially long bullet doesn't itself force a large gap. */
.card .resume-list li {
    break-inside: auto;
    page-break-inside: auto;
}

/* --- Print color adjustment -------------------------------------------- */

* {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}
