/* Formal Modern Editorial Résumé — Jerome Robbins (robbins.ca/jerome/cv)
 * 1:1 WYSIWYG US Letter architecture (8.5in × 11in = 816px × 1056px):
 * Page 1 (French) + Page 2 (English), identical proportions & colors on screen and in PDF.
 */

@font-face {
    font-family: "Geist";
    src: url("/composeResources/tregz.robbins.generated.resources/font/geist_regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Geist";
    src: url("/composeResources/tregz.robbins.generated.resources/font/geist_medium.ttf") format("truetype");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Geist";
    src: url("/composeResources/tregz.robbins.generated.resources/font/geist_semibold.ttf") format("truetype");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Geist";
    src: url("/composeResources/tregz.robbins.generated.resources/font/geist_bold.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Geist Mono";
    src: url("/composeResources/tregz.robbins.generated.resources/font/geist_mono_regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Geist Mono";
    src: url("/composeResources/tregz.robbins.generated.resources/font/geist_mono_medium.ttf") format("truetype");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Instrument Serif";
    src: url("/composeResources/tregz.robbins.generated.resources/font/instrument_serif_regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Instrument Serif";
    src: url("/composeResources/tregz.robbins.generated.resources/font/instrument_serif_italic.ttf") format("truetype");
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

:root {
    color-scheme: light;
    --cream: #F5F2EC;
    --cream-2: #ECE8DF;
    --paper: #FBF9F4;
    --ink: #16140F;
    --ink-2: #3A362D;
    --ink-3: #6B6557;
    --accent: #C9583A;
    --rule: rgba(22, 20, 15, 0.13);
    --rule-strong: rgba(22, 20, 15, 0.24);
    --sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    --serif: "Instrument Serif", Georgia, serif;
}

*, *::before, *::after {
    box-sizing: border-box;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

html, body {
    margin: 0;
    padding: 0;
    background: var(--cream);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 12px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* Optional single-language screen filter (print always outputs both pages: FR then EN) */
@media screen {
    html[data-view="fr"] .sheet-wrap-en {
        display: none !important;
    }

    html[data-view="en"] .sheet-wrap-fr {
        display: none !important;
    }
}

/* Top action bar (screen only) */
.toolbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(245, 242, 236, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--rule);
}

.toolbar-inner {
    max-width: 850px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.toolbar-left,
.toolbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid var(--rule-strong);
    background: transparent;
    color: var(--ink-2);
    font-family: var(--sans);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.pill-btn:hover {
    background: var(--cream-2);
    color: var(--ink);
}

.pill-btn-primary {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--paper);
}

.pill-btn-primary:hover {
    background: #2b271f;
    color: #fff;
}

.lang-switch {
    display: inline-flex;
    border: 1px solid var(--rule-strong);
    border-radius: 999px;
    padding: 2px;
    background: var(--paper);
}

.lang-btn {
    border: 0;
    background: transparent;
    color: var(--ink-3);
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.05em;
    padding: 5px 10px;
    border-radius: 999px;
    cursor: pointer;
}

.lang-btn[aria-pressed="true"] {
    background: var(--ink);
    color: var(--paper);
}

/* Two-sheet US Letter desk layout (816px × 1056px = 8.5in × 11in at 96dpi) */
.page-wrap {
    padding: 28px 16px 64px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

.sheet-wrap {
    width: 100%;
    max-width: 816px;
}

.sheet-badge {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-3);
    margin: 0 0 8px 4px;
}

.sheet {
    width: 100%;
    min-height: 1056px;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 12px;
    box-shadow: 0 18px 48px rgba(22, 20, 15, 0.06);
    padding: 32px 46px;
    display: flex;
    flex-direction: column;
}

.sheet > div {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

/* Header */
.cv-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    padding-bottom: 10px;
    border-bottom: 1.5px solid var(--ink);
}

.identity {
    flex: 1 1 auto;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: var(--mono);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--ink-3);
    margin-bottom: 4px;
}

.eyebrow-dot {
    width: 6.5px;
    height: 6.5px;
    border-radius: 50%;
    background: var(--accent);
    display: inline-block;
}

.name {
    font-family: var(--sans);
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.08;
    margin: 0 0 4px;
    color: var(--ink);
}

.headline {
    margin: 0;
    font-size: 13.8px;
    font-weight: 400;
    color: var(--ink-2);
    line-height: 1.35;
}

.headline em {
    font-family: var(--serif);
    font-style: italic;
    font-size: 16.2px;
    color: var(--accent);
    font-weight: 400;
}

.contact-list {
    list-style: none;
    margin: 0;
    padding: 0;
    text-align: right;
    font-family: var(--mono);
    font-size: 10.6px;
    line-height: 1.58;
    color: var(--ink-2);
    flex-shrink: 0;
}

.contact-list a {
    color: var(--ink);
    text-decoration: none;
    border-bottom: 1px solid var(--rule-strong);
}

.contact-list a:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* Summary & Sections — flex-grow distributes any vertical slack evenly across the 11in sheet */
.summary {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 7.5px 0;
    border-bottom: 1px solid var(--rule);
}

.summary p {
    margin: 0;
    font-size: 11.8px;
    line-height: 1.43;
    color: var(--ink-2);
}

.cv-section {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 7.5px 0;
    border-bottom: 1px solid var(--rule);
}

.cv-section:last-child {
    flex: 0 0 auto;
    border-bottom: 0;
    padding-top: 8.5px;
    padding-bottom: 0;
}

.section-grid {
    display: grid;
    grid-template-columns: 128px 1fr;
    gap: 20px;
    align-items: start;
}

.section-label {
    margin: 0;
    padding-top: 2px;
    font-family: var(--mono);
    font-size: 9.8px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.11em;
    color: var(--ink-3);
}

.section-num {
    display: block;
    color: var(--accent);
    margin-bottom: 2px;
    font-size: 9.2px;
}

/* Entries */
.entries {
    display: flex;
    flex-direction: column;
    gap: 6.5px;
}

.entries-compact {
    gap: 4.5px;
}

.entry {
    break-inside: avoid;
    page-break-inside: avoid;
}

.entry-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 14px;
    margin-bottom: 1.5px;
}

.entry-role {
    margin: 0;
    font-size: 12.8px;
    font-weight: 600;
    letter-spacing: -0.012em;
    color: var(--ink);
}

.entry-period {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--ink-3);
    white-space: nowrap;
}

.entry-org {
    margin: 0 0 3px;
    font-size: 11.4px;
    font-weight: 500;
    color: var(--accent);
}

.entry-org:last-child {
    margin-bottom: 0;
}

.entry-org .org-loc {
    color: var(--ink-3);
    font-weight: 400;
}

.entry-org a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid rgba(201, 88, 58, 0.35);
}

.entry-org a:hover {
    border-bottom-color: var(--accent);
}

.entry-bullets {
    margin: 0;
    padding-left: 15px;
    color: var(--ink-2);
    font-size: 11.5px;
    line-height: 1.38;
}

.entry-bullets li {
    margin-bottom: 2px;
}

.entry-bullets li:last-child {
    margin-bottom: 0;
}

/* Skills matrix */
.skills-table {
    display: flex;
    flex-direction: column;
    gap: 4.5px;
}

.skill-row {
    display: grid;
    grid-template-columns: 122px 1fr;
    gap: 12px;
    align-items: baseline;
    font-size: 11.5px;
}

.skill-cat {
    font-family: var(--mono);
    font-size: 9.8px;
    color: var(--ink-3);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.skill-items {
    color: var(--ink);
    font-weight: 500;
    line-height: 1.4;
}

.skill-items span {
    color: var(--ink-2);
    font-weight: 400;
}

/* Footer row inside each sheet */
.meta-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 20px;
    font-size: 11.5px;
    color: var(--ink-2);
}

.meta-inline strong {
    color: var(--ink);
    font-weight: 600;
}

/* Responsive mobile view */
@media screen and (max-width: 700px) {
    .sheet {
        min-height: 0;
        padding: 26px 20px;
        border-radius: 10px;
    }

    .cv-header {
        flex-direction: column;
        gap: 14px;
    }

    .contact-list {
        text-align: left;
    }

    .section-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .entry-head {
        flex-wrap: wrap;
        gap: 3px 12px;
    }

    .skill-row {
        grid-template-columns: 1fr;
        gap: 2px;
    }
}

/* 1:1 Full-Bleed US Letter Print — Identical to the 816×1056 screen sheet!
 * @page margin: 0 suppresses browser URL/date headers & footers automatically
 * and lets the warm editorial --paper background, colors, underlines, and
 * padding render identically to the screen preview.
 */
@page {
    size: letter portrait;
    margin: 0;
}

@media print {
    html, body {
        background: var(--paper) !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .toolbar,
    .sheet-badge {
        display: none !important;
    }

    .page-wrap {
        padding: 0 !important;
        margin: 0 !important;
        gap: 0 !important;
        display: block !important;
    }

    .sheet-wrap {
        display: block !important;
        width: 8.5in !important;
        max-width: 8.5in !important;
        margin: 0 !important;
        padding: 0 !important;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .sheet-wrap-en {
        break-before: page;
        page-break-before: always;
    }

    .sheet {
        width: 8.5in !important;
        height: 11in !important;
        min-height: 11in !important;
        max-height: 11in !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        background: var(--paper) !important;
        padding: 32px 46px !important;
        overflow: hidden !important;
    }
}
