/* QuillResume resume + cover letter templates.
   One markup (built by render.js and build.py), templates are pure CSS classes.
   Every template is single-column, real text, standard headings -> ATS-safe. */

.page {
  --accent: #1f4e79;
  --fs: 10.5pt;
  width: 8.5in; min-height: 11in;
  padding: 0.6in 0.65in;
  background: #fff; color: #1d1d1f;
  font-size: var(--fs); line-height: 1.38;
  box-sizing: border-box;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
  overflow-wrap: anywhere;
}
.page.a4 { width: 210mm; min-height: 297mm; }
.page *, .page *::before, .page *::after { box-sizing: border-box; }
.page h1, .page h2, .page h3, .page p, .page ul { margin: 0; padding: 0; }
.page a { color: inherit; text-decoration: none; }

.rs-head { margin-bottom: 0.9em; }
.rs-name { font-size: 2.15em; line-height: 1.1; font-weight: 700; letter-spacing: -0.01em; }
.rs-title { font-size: 1.12em; margin-top: 0.15em; color: #444; }
.rs-contact { margin-top: 0.45em; font-size: 0.93em; color: #333; display: flex; flex-wrap: wrap; gap: 0 0.5em; }
.rs-contact span:not(:last-child)::after { content: "|"; margin-left: 0.5em; color: #999; }

.rs-sec { margin-top: 0.95em; }
.rs-h { font-size: 0.98em; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.45em; break-after: avoid; page-break-after: avoid; }
.rs-summary { white-space: pre-line; }

.rs-item { margin-top: 0.6em; }
.rs-row { break-after: avoid; page-break-after: avoid; break-inside: avoid; }
.rs-item:first-of-type { margin-top: 0; }
.rs-row { display: flex; justify-content: space-between; gap: 1em; align-items: baseline; }
.rs-l { min-width: 0; }
.rs-r { text-align: right; white-space: nowrap; font-size: 0.93em; color: #444; }
.rs-role { font-weight: 700; }
.rs-org { display: inline; }
.rs-role + .rs-org::before { content: ", "; font-weight: 400; }
.rs-loc { display: block; }
.rs-desc { margin-top: 0.2em; white-space: pre-line; }
.rs-bul { margin: 0.25em 0 0 1.15em !important; }
.rs-bul li { margin-top: 0.12em; padding-left: 0.1em; break-inside: avoid; }

.rs-skills { display: flex; flex-wrap: wrap; gap: 0.3em 0.55em; list-style: none; margin: 0 !important; }
.rs-skills li + li::before { content: "•"; margin-right: 0.55em; color: #888; }
.rs-skillgroup { margin-top: 0.2em; }
.rs-skillgroup b { font-weight: 700; }

/* ---------- cover letter ---------- */
.cl-body { margin-top: 1.4em; font-size: 1.02em; line-height: 1.5; }
.cl-date { margin-bottom: 1.2em; }
.cl-to { margin-bottom: 1.2em; white-space: pre-line; }
.cl-body p { margin-bottom: 0.85em; white-space: pre-line; }
.cl-sign { margin-top: 1.4em; white-space: pre-line; }

/* =========================== TEMPLATES =========================== */

/* 1. Classic: serif, centered header, ruled headings */
.t-classic { font-family: Georgia, "Times New Roman", Times, serif; }
.t-classic .rs-head { text-align: center; }
.t-classic .rs-contact { justify-content: center; }
.t-classic .rs-h { border-bottom: 1px solid #222; padding-bottom: 0.15em; color: #111; }

/* 2. Modern: sans, accent headings, left accent bar */
.t-modern { font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
.t-modern .rs-head { border-left: 5px solid var(--accent); padding-left: 0.8em; }
.t-modern .rs-name { color: var(--accent); }
.t-modern .rs-h { color: var(--accent); border-bottom: 2px solid color-mix(in srgb, var(--accent) 25%, #fff); padding-bottom: 0.15em; }
.t-modern .rs-org { color: #333; }

/* 3. Minimal: airy, no rules, small caps headings */
.t-minimal { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; color: #222; }
.t-minimal .rs-name { font-weight: 300; font-size: 2.4em; letter-spacing: 0.01em; }
.t-minimal .rs-title { color: #666; }
.t-minimal .rs-h { font-weight: 600; font-size: 0.85em; letter-spacing: 0.18em; color: #777; margin-bottom: 0.6em; }
.t-minimal .rs-sec { margin-top: 1.25em; }
.t-minimal .rs-contact span:not(:last-child)::after { content: "·"; }

/* 4. Executive: serif, heavy name rule, accent small caps */
.t-executive { font-family: Cambria, Georgia, "Times New Roman", serif; }
.t-executive .rs-head { border-bottom: 3px double var(--accent); padding-bottom: 0.6em; }
.t-executive .rs-name { font-size: 2.3em; letter-spacing: 0.02em; text-transform: uppercase; }
.t-executive .rs-h { color: var(--accent); font-variant: small-caps; text-transform: none; font-size: 1.15em; letter-spacing: 0.05em; }
.t-executive .rs-role { font-variant: small-caps; font-size: 1.05em; }

/* 5. Compact: dense, fits lots on one page */
.page.t-compact { padding: 0.45in 0.5in; line-height: 1.28; font-family: Calibri, Carlito, "Segoe UI", Arial, sans-serif; }
.t-compact .rs-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1em; border-bottom: 2px solid var(--accent); padding-bottom: 0.4em; margin-bottom: 0.5em; }
.t-compact .rs-name { font-size: 1.9em; }
.t-compact .rs-contact { flex-direction: column; align-items: flex-end; text-align: right; margin: 0; gap: 0; }
.t-compact .rs-contact span:not(:last-child)::after { content: none; }
.t-compact .rs-sec { margin-top: 0.6em; }
.t-compact .rs-h { color: var(--accent); margin-bottom: 0.25em; }
.t-compact .rs-item { margin-top: 0.4em; }

/* 6. Technical: mono headings, skill tags */
.t-technical { font-family: "Segoe UI", Roboto, Arial, sans-serif; }
.t-technical .rs-name { font-family: Consolas, "SFMono-Regular", Menlo, monospace; letter-spacing: -0.02em; }
.t-technical .rs-title { color: var(--accent); font-family: Consolas, Menlo, monospace; font-size: 1em; }
.t-technical .rs-h { font-family: Consolas, Menlo, monospace; text-transform: none; letter-spacing: 0; color: var(--accent); font-size: 1.05em; }
.t-technical .rs-h::before { content: "# "; color: #999; }
.t-technical .rs-skills { gap: 0.3em; }
.t-technical .rs-skills li { border: 1px solid #c9ced6; border-radius: 3px; padding: 0.05em 0.45em; font-size: 0.92em; background: #f5f7fa; }
.t-technical .rs-skills li + li::before { content: none; }

/* 7. Elegant: centered serif headings between lines */
.t-elegant { font-family: "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif; }
.t-elegant .rs-head { text-align: center; }
.t-elegant .rs-name { font-weight: 400; font-size: 2.4em; letter-spacing: 0.06em; }
.t-elegant .rs-title { font-style: italic; color: var(--accent); }
.t-elegant .rs-contact { justify-content: center; }
.t-elegant .rs-h { display: flex; align-items: center; gap: 0.8em; font-weight: 400; letter-spacing: 0.2em; color: var(--accent); }
.t-elegant .rs-h::before, .t-elegant .rs-h::after { content: ""; flex: 1; border-top: 1px solid #bbb; }

/* 8. Bold: solid accent header band */
.t-bold { font-family: "Segoe UI", Roboto, Arial, sans-serif; }
.t-bold .rs-head { background: var(--accent); color: #fff; margin: -0.6in -0.65in 1em; padding: 0.5in 0.65in 0.4in; }
.t-bold .rs-title, .t-bold .rs-contact { color: rgba(255,255,255,0.9); }
.t-bold .rs-contact span:not(:last-child)::after { color: rgba(255,255,255,0.6); }
.t-bold .rs-h { color: var(--accent); font-size: 1.05em; }
.t-bold .rs-h::after { content: ""; display: block; width: 2.2em; height: 3px; background: var(--accent); margin-top: 0.2em; }

/* 9. Timeline: dates in a left column */
.t-timeline { font-family: "Segoe UI", Roboto, Arial, sans-serif; }
.t-timeline .rs-name { color: var(--accent); }
.t-timeline .rs-h { border-bottom: 1px solid #ccc; padding-bottom: 0.15em; }
.t-timeline .rs-item { display: grid; grid-template-columns: 8.5em 1fr; column-gap: 1em; }
.t-timeline .rs-row { display: contents; }
.t-timeline .rs-r { grid-column: 1; grid-row: 1 / span 3; text-align: left; white-space: normal; color: var(--accent); font-weight: 600; }
.t-timeline .rs-loc { font-weight: 400; color: #666; }
.t-timeline .rs-l, .t-timeline .rs-bul, .t-timeline .rs-desc { grid-column: 2; }

/* 10. Simple: plain Arial, maximum ATS safety */
.t-simple { font-family: Arial, Helvetica, sans-serif; }
.t-simple .rs-h { border-bottom: 1px solid #000; }
.t-simple .rs-name { font-size: 1.9em; }

/* ---------- print ---------- */
@media print {
  .page { width: auto !important; min-height: 0 !important; box-shadow: none !important; transform: none !important; }
}
