/*
 * Resume/CV template designs — Classic, Modern, Minimal (resumes) and
 * Academic, Executive, Compact (CVs).
 *
 * Loaded only by builder.php (the unified resume+CV builder) — not
 * bundled into app.css, so template CSS can grow independently of the
 * site-wide sheet.
 *
 * These rules style the live in-browser preview (#resume-preview). They
 * are a close visual match to what PdfService.php renders server-side for
 * the actual downloaded PDF, but are NOT the same code: the PDF path uses
 * an HTML <table> for Modern's two-column layout because Dompdf has no
 * CSS Grid support and only partial/unreliable flexbox support. Here, in
 * a real browser, flexbox is the right (and "modern") tool for the job —
 * so the two implementations deliberately diverge for reliability on
 * each side, while landing on the same design.
 */

.resume-sheet { position: relative; }
.resume-sheet .clear { clear: both; }
.resume-sheet .photo { width: 72px; height: 88px; object-fit: cover; float: right; margin-left: 14px; }

.resume-sheet .rs-cols { display: block; }
.resume-sheet .rs-main, .resume-sheet .rs-side { display: block; }

/* ---------- Classic: single column, serif, traditional ---------- */
.resume-sheet.tpl-classic { font-family: Georgia, 'Times New Roman', serif; }
.resume-sheet.tpl-classic h1 { letter-spacing: 0.5px; }
.resume-sheet.tpl-classic h3 { font-style: italic; color: var(--ink-soft); font-weight: 400; }
.resume-sheet.tpl-classic h4 {
    text-transform: uppercase; letter-spacing: 1.5px;
    border-bottom: 1.5px solid var(--ink); padding-bottom: 3px; color: var(--ink);
}
.resume-sheet.tpl-classic .photo { border: 1px solid var(--ink); }

/* ---------- Minimal: single column, grayscale, generous whitespace ---------- */
.resume-sheet.tpl-minimal { font-family: var(--font-body, sans-serif); }
.resume-sheet.tpl-minimal h1 { font-weight: 300; letter-spacing: 0.5px; }
.resume-sheet.tpl-minimal h3 { color: var(--muted); font-weight: 400; }
.resume-sheet.tpl-minimal h4 {
    text-transform: uppercase; letter-spacing: 2px; font-size: 0.72rem; font-weight: 600;
    color: var(--muted); border-bottom: 1px solid var(--line);
}
.resume-sheet.tpl-minimal .entry-dates { color: var(--muted); opacity: 0.7; }
.resume-sheet.tpl-minimal .photo { border-radius: 50%; width: 76px; height: 76px; }

/* ---------- Modern: colored header band + real two-column layout ----------
   .rs-main (Summary/Experience) and .rs-side (Skills/Education) sit in DOM
   order main-then-side so Classic/Minimal (display:block) stack them in the
   right reading order with zero extra CSS. Modern turns .rs-cols into a
   flex row and uses `order` to pull .rs-side visually to the left, without
   touching the DOM. */
.resume-sheet.tpl-modern { font-family: var(--font-body, sans-serif); }
.resume-sheet.tpl-modern .rs-head {
    background: linear-gradient(135deg, rgba(217,136,73,0.16), rgba(217,136,73,0.06));
    margin: -20px -22px 16px; padding: 20px 22px 16px; border-radius: var(--radius-md) var(--radius-md) 0 0;
}
.resume-sheet.tpl-modern h1 { color: var(--accent); letter-spacing: -0.3px; }
.resume-sheet.tpl-modern h3 { color: var(--muted); font-weight: 600; }
.resume-sheet.tpl-modern h4 {
    text-transform: uppercase; letter-spacing: 1px; font-size: 0.78rem;
    color: #fff; background: var(--accent); padding: 4px 10px; border: none;
}
.resume-sheet.tpl-modern .entry-dates { color: var(--accent); }
.resume-sheet.tpl-modern .photo {
    border: 3px solid #fff; box-shadow: 0 0 0 1px var(--accent);
    border-radius: 50%; width: 84px; height: 84px;
}
.resume-sheet.tpl-modern .rs-cols { display: flex; gap: 18px; align-items: flex-start; }
.resume-sheet.tpl-modern .rs-main { flex: 1 1 64%; order: 2; }
.resume-sheet.tpl-modern .rs-side { flex: 1 1 33%; order: 1; }
.resume-sheet.tpl-modern .rs-side > div {
    background: rgba(217,136,73,0.08); border-radius: var(--radius-sm, 6px); padding: 10px 12px; margin-bottom: 10px;
}
.resume-sheet.tpl-modern .rs-side .entry-dates { float: none; display: block; }

/* ---------- CV templates ----------
   All three stay single-column (rs-cols left as display:block, same as
   Classic/Minimal) — CVs run longer than resumes and often spill onto a
   second page; a two-column layout coordinating a page break mid-sidebar
   is a much harder problem than a single flowing column, so it's skipped
   here on purpose, matching PdfService.php's CV templates. */

/* Academic — the CV's free default. Centered, formal, double rule. */
.resume-sheet.tpl-academic { font-family: Georgia, 'Times New Roman', serif; }
.resume-sheet.tpl-academic .rs-head {
    text-align: center; border-bottom: 3px double var(--ink); padding-bottom: 12px; margin-bottom: 14px;
}
.resume-sheet.tpl-academic .photo { float: none; display: inline-block; margin: 0 0 8px; border-radius: 0; }
.resume-sheet.tpl-academic h1 { text-transform: uppercase; letter-spacing: 1px; }
.resume-sheet.tpl-academic h3 { font-style: italic; color: var(--ink-soft); font-weight: 400; }
.resume-sheet.tpl-academic .contact-line { color: var(--ink-soft); }
.resume-sheet.tpl-academic h4 {
    text-align: center; text-transform: uppercase; letter-spacing: 2px;
    border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); padding: 4px 0;
}
.resume-sheet.tpl-academic .entry-dates { font-style: italic; color: var(--ink-soft); }

/* Executive — bold sans-serif, deep navy accent, left-rule "tab" headers. */
.resume-sheet.tpl-executive { font-family: var(--font-body, sans-serif); }
.resume-sheet.tpl-executive .rs-head { border-bottom: 4px solid #1f3a5f; padding-bottom: 12px; margin-bottom: 14px; }
.resume-sheet.tpl-executive h1 { font-weight: 700; text-transform: uppercase; color: #1f3a5f; }
.resume-sheet.tpl-executive h3 { color: #3d5875; font-weight: 600; }
.resume-sheet.tpl-executive h4 {
    text-transform: uppercase; letter-spacing: 1.5px; color: #1f3a5f;
    border-left: 4px solid #1f3a5f; border-bottom: none; padding: 2px 0 2px 8px;
}
.resume-sheet.tpl-executive .entry-main { font-weight: 700; }
.resume-sheet.tpl-executive .entry-dates { color: #1f3a5f; font-weight: 600; }
.resume-sheet.tpl-executive .photo { border: 3px solid #1f3a5f; border-radius: 4px; }

/* Compact — small type, tight spacing, thin hairlines. */
.resume-sheet.tpl-compact { font-family: var(--font-body, sans-serif); font-size: 0.86rem; }
.resume-sheet.tpl-compact .rs-head { border-bottom: 1px solid #999; padding-bottom: 8px; margin-bottom: 8px; }
.resume-sheet.tpl-compact h1 { font-size: 1.3rem; }
.resume-sheet.tpl-compact h3 { font-size: 0.92rem; color: var(--muted); }
.resume-sheet.tpl-compact .contact-line { font-size: 0.8rem; }
.resume-sheet.tpl-compact h4 {
    font-size: 0.78rem; text-transform: uppercase; letter-spacing: 1px; color: var(--muted);
    border-bottom: 1px solid var(--line); padding-bottom: 2px; margin-top: 10px;
}
.resume-sheet.tpl-compact .entry-block { margin-bottom: 6px; }
.resume-sheet.tpl-compact .entry-dates { font-size: 0.78rem; color: var(--muted); }
.resume-sheet.tpl-compact .photo { width: 64px; height: 78px; }
