/* You can poke around this CSS if you want to customize your formatting / styling further */
/* You can even import custom fonts! */

/* ATS-safe: using standard system fonts instead of external web fonts */

/* ---------- Improved print / page-break rules ---------- */

/* Page sizing */
@page {
    size: A4;
    margin: 0.4in 0.35in;
}

/* Resume font & sizing (scoped to .resume-page to avoid polluting app UI) */
.resume-page {
    font-family: Calibri, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    font-size: 11pt;
    font-weight: 400;
    line-height: 1.3;
}

/* ===== Print rules - natural flow with margins on all pages ===== */
@media print {
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    html {
        margin: 0 !important;
        padding: 0 !important;
        background: white !important;
    }

    body {
        margin: 0.4in 0.35in !important;
        /* Body margins work on all pages */
        padding: 0 !important;
        background: white !important;
        font-family: Calibri, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
        font-size: 11pt;
    }

    #resume-content {
        margin: 0 !important;
        padding: 0 !important;
        background: white !important;
    }

    .resume-page {
        width: 100%;
        padding: 0 !important;
        /* Remove padding, use body margins instead */
        box-shadow: none !important;
        min-height: auto;
        max-height: none;
    }

    ul,
    ol {
        margin: 0;
        padding-left: 20px;
    }

    h1 {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    .page-number {
        display: none;
    }

    /* ── Page-break hints (Phase 7) ── */
    /* Never break immediately after a heading — keep heading with its content */
    .resume-page h2 { break-after: avoid; page-break-after: avoid; }
    .resume-page h3 { break-after: avoid; page-break-after: avoid; }

    /* The bullet list paired with an h3 should not orphan on the next page */
    .resume-page h3 + ul,
    .resume-page h3 + p {
        break-before: avoid;
        page-break-before: avoid;
    }

    /* Avoid splitting individual list items across pages */
    .resume-page li {
        break-inside: avoid;
        page-break-inside: avoid;
        orphans: 2;
        widows: 2;
    }

    /* Section headings should not appear alone at the bottom of a page */
    .resume-page h2 + * {
        break-before: avoid;
        page-break-before: avoid;
    }

    /* Avoid orphaning the contact header row */
    .resume-page .section.headerInfo {
        break-after: avoid;
        page-break-after: avoid;
    }
}

/* Page break visualization for screen */
@media screen {
    #resume-content {
        background: var(--surface-app, #e0e0e0);
        padding: 20px;
        display: flex;
        flex-wrap: wrap;
        gap: 20px;
        justify-content: center;
    }

    .resume-page {
        width: 8.30in;
        padding: 0.4in 0.35in;
        margin: 20px auto;
        background: white;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        box-sizing: border-box;
        position: relative;
        flex-shrink: 0;
    }

    .page-number {
        position: absolute;
        bottom: 0.3in;
        right: 0.5in;
        font-size: 9pt;
        color: #666;
    }
}

.resume-page p {
    text-align: justify;
}

.resume-page .spacer {
    margin: 0px auto;
}

/* styling content (scoped) */
.resume-page h1,
.resume-page h2,
.resume-page h3,
.resume-page h4,
.resume-page p,
.resume-page a,
.resume-page li {
    color: black;
}

.resume-page h1 {
    color: #000000;
    text-align: center;
    font-size: 20pt;
    font-weight: 700;
    margin: 0;
    padding: 0;
    margin-top: -0.05in;
}

.resume-page h2 {
    border-bottom: 1.5px solid #000000;
    color: #000000;
    text-transform: uppercase;
    font-size: 12pt;
    font-weight: 700;
    padding: 0;
    margin: 0;
    margin-bottom: 3pt;
    margin-top: 6pt;
    letter-spacing: 0.5pt;
}

.resume-page h3,
.resume-page h4 {
    margin: 0;
    margin-left: 0.1in;
}

.resume-page h3 {
    display: flex;
    font-size: 11pt;
    font-weight: 700;
    padding: 0;
    margin: 0;
    margin-left: 0 !important;
    justify-content: space-between;
}

.resume-page .indent {
    margin-left: 0.1in;
}

.resume-page .tech-stack {
    font-style: normal;
    font-weight: normal;
}

.resume-page h4 {
    display: flex;
    font-size: 10.5pt;
    font-weight: 400;
    font-style: italic;
    padding: 0;
    margin: 0;
    margin-left: 0 !important;
    justify-content: space-between;
}

.resume-page p {
    margin: 0;
    padding: 0;
}

.resume-page a {
    color: black;
    text-decoration: none;
}

.resume-page .headerInfo a {
    color: #000000;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.resume-page ul {
    margin: 0 !important;
    padding: 0;
    padding-left: 14px !important;
    padding-right: 15px;
    font-size: 11pt;
}

.resume-page ul>li {
    margin: 0;
    padding: 0;
    margin-bottom: 1pt;
}


/* header info - paragraph after h1 */
.resume-page h1 + p {
    text-align: center;
    margin: 3pt 0 0 0;
    font-size: 10pt;
}

.resume-page h1 + p a {
    color: #000000;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ---------- Optional: only use for SHORT jobs that should never split ---------- */
/* Uncomment and add class="experience-entry" to specific short job sections if needed */
/*
@media print {
  .experience-entry {
    page-break-inside: avoid;
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
  }
}
*/