/* ============================================================
   CvKit templates - every design theme for the rendered CV.
   The renderer (cv-render.js) emits one .cv-page element with:
     .tpl-<id>       template theme (below)
     .cvfont-*       font pairing        .cvdense-*  spacing density
     .cvsize-a4/letter                   --cv-accent accent color
   The same markup is styled by every theme, so switching
   templates is instant and lossless.
   ============================================================ */

/* ---------- base page ---------- */

.cv-page {
  --cv-ink: #1c1a17;
  --cv-muted: #6b6459;
  --cv-line: #ddd6ca;
  --cv-bg: #ffffff;
  --cv-side-bg: transparent;
  --cv-side-ink: var(--cv-ink);
  --cv-pad: 46px;
  --cv-fs: 13.5px;
  --cv-gap: 1.15em;
  box-sizing: border-box;
  width: 794px;
  min-height: 1123px;
  padding: var(--cv-pad);
  background: var(--cv-bg);
  color: var(--cv-ink);
  font-size: var(--cv-fs);
  line-height: 1.45;
  overflow-wrap: break-word;
}
.cv-page.cvsize-letter { width: 816px; min-height: 1056px; }
.cv-page * { box-sizing: border-box; margin: 0; }
.cv-page img { max-width: 100%; }

/* densities */
.cv-page.cvdense-compact { --cv-fs: 12px; --cv-gap: 0.75em; --cv-pad: 36px; }
.cv-page.cvdense-relaxed { --cv-fs: 14.5px; --cv-gap: 1.6em; --cv-pad: 54px; }

/* font pairings (headings = name + section headings) */
.cv-page.cvfont-serif { font-family: Georgia, 'Times New Roman', serif; }
.cv-page.cvfont-sans { font-family: -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; }
.cv-page.cvfont-mixed { font-family: -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; }
.cv-page.cvfont-mixed .cv-name, .cv-page.cvfont-mixed .cv-h { font-family: Georgia, 'Times New Roman', serif; }
.cv-page.cvfont-duo { font-family: Georgia, 'Times New Roman', serif; }
.cv-page.cvfont-duo .cv-name, .cv-page.cvfont-duo .cv-h { font-family: -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; }

/* ---------- shared structure ---------- */

.cv-head { display: flex; align-items: center; gap: 1.4em; margin-bottom: 0.9em; }
.cv-headtext { flex: 1; min-width: 0; }
.cv-name { font-size: 2.3em; line-height: 1.12; font-weight: 700; }
.cv-title { font-size: 1.08em; color: var(--cv-accent); margin-top: 0.25em; }
.cv-photo { flex: none; }
.cv-photo img {
  width: 86px; height: 86px; object-fit: cover;
  border-radius: 50%; display: block;
}

.cv-contact {
  display: flex; flex-wrap: wrap; gap: 0.3em 1.15em;
  font-size: 0.93em; color: var(--cv-muted);
  padding-bottom: 0.9em; margin-bottom: 1.1em;
  border-bottom: 1px solid var(--cv-line);
}

.cv-sec { margin-bottom: var(--cv-gap); }
.cv-h {
  font-size: 1.02em; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.09em;
  color: var(--cv-accent);
  margin-bottom: 0.55em;
}
.cv-entry { margin-bottom: calc(var(--cv-gap) * 0.72); }
.cv-entry:last-child { margin-bottom: 0; }
.cv-entry-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1em; }
.cv-entry-main { font-weight: 700; }
.cv-dates { flex: none; font-size: 0.88em; color: var(--cv-muted); }
.cv-entry-sub { display: flex; gap: 0.9em; font-size: 0.95em; color: var(--cv-muted); }
.cv-entry-sub .cv-org { font-style: italic; }
.cv-desc { margin-top: 0.3em; }
.cv-desc p { margin-bottom: 0.35em; }
.cv-desc p:last-child { margin-bottom: 0; }
.cv-bullets { padding-inline-start: 1.15em; }
.cv-bullets li { margin-bottom: 0.22em; }

/* skills */
.cv-skills { display: flex; flex-wrap: wrap; gap: 0.5em 1.4em; }
.cv-skill { display: flex; align-items: center; gap: 0.6em; min-width: 40%; flex: 1 1 40%; }
.cv-skill--plain { min-width: 0; flex: 0 0 auto; }
.cv-skill-name { font-size: 0.97em; }
.cv-bar {
  flex: 1; height: 5px; border-radius: 3px;
  background: color-mix(in srgb, var(--cv-accent) 16%, transparent);
  overflow: hidden; min-width: 60px;
}
.cv-bar i { display: block; height: 100%; background: var(--cv-accent); border-radius: 3px; }

/* languages */
.cv-langs { display: flex; flex-direction: column; gap: 0.3em; }
.cv-lang { display: flex; justify-content: space-between; gap: 1em; }
.cv-lang-level { color: var(--cv-muted); font-size: 0.92em; }

/* two-column layouts */
.cv-cols { display: grid; gap: 2.2em; align-items: start; }
.cv-cols--left { grid-template-columns: 31% 1fr; }
.cv-cols--right { grid-template-columns: 1fr 31%; }
.cv-cols--left .cv-sidezone { order: -1; }
.cv-sidezone .cv-contact {
  display: flex; flex-direction: column; gap: 0.45em;
  border-bottom: 1px solid var(--cv-line);
}
.cv-sidezone .cv-skills { flex-direction: column; gap: 0.55em; }
.cv-sidezone .cv-skill { min-width: 0; }

/* ============================================================
   Themes
   ============================================================ */

/* --- Classic: centered serif dignity --- */
.tpl-classic .cv-head { flex-direction: column; text-align: center; gap: 0.5em; margin-bottom: 0.5em; }
.tpl-classic .cv-contact { justify-content: center; border-bottom: none; padding-bottom: 0.6em; }
.tpl-classic .cv-headtext { width: 100%; }
.tpl-classic .cv-name { letter-spacing: 0.01em; }
.tpl-classic .cv-title { color: var(--cv-muted); }
.tpl-classic .cv-sec-summary { border-top: 3px double var(--cv-ink); padding-top: 1em; }
.tpl-classic .cv-h { color: var(--cv-ink); border-bottom: 1px solid var(--cv-line); padding-bottom: 0.3em; }

/* --- Executive: firm rules, understated --- */
.tpl-executive .cv-name { font-variant: small-caps; letter-spacing: 0.05em; }
.tpl-executive .cv-contact { border-top: 3px solid var(--cv-ink); border-bottom: 1px solid var(--cv-ink); padding-top: 0.6em; }
.tpl-executive .cv-h { color: var(--cv-ink); font-size: 0.95em; letter-spacing: 0.16em; }
.tpl-executive .cv-entry-main { font-variant: small-caps; font-size: 1.04em; }
.tpl-executive .cv-dates { font-weight: 700; color: var(--cv-ink); }

/* --- Modern: bold sans, accent strokes --- */
.tpl-modern .cv-name { font-size: 2.6em; letter-spacing: -0.015em; }
.tpl-modern .cv-title { font-weight: 700; }
.tpl-modern .cv-h { position: relative; padding-bottom: 0.4em; }
.tpl-modern .cv-h::after {
  content: ""; position: absolute; inset-inline-start: 0; bottom: 0;
  width: 2.2em; height: 3px; background: var(--cv-accent); border-radius: 2px;
}
.tpl-modern .cv-photo img { border-radius: 14px; }
.tpl-modern .cv-contact { border-bottom: none; padding-bottom: 0.4em; }

/* --- Minimal: air and hairlines --- */
.tpl-minimal { --cv-line: #e8e3d8; }
.tpl-minimal .cv-name { font-weight: 400; font-size: 2.5em; }
.tpl-minimal .cv-title { color: var(--cv-muted); }
.tpl-minimal .cv-h { color: var(--cv-muted); font-size: 0.82em; font-weight: 400; letter-spacing: 0.22em; }
.tpl-minimal .cv-entry-main { font-weight: 600; }
.tpl-minimal .cv-sec { border-top: 1px solid var(--cv-line); padding-top: calc(var(--cv-gap) * 0.7); }
.tpl-minimal .cv-bar { background: #eee9df; }

/* --- Sidebar: dark accent column --- */
.tpl-sidebar { padding: 0; display: flex; flex-direction: column; }
.tpl-sidebar > * { padding-inline: var(--cv-pad); }
.tpl-sidebar .cv-head {
  padding-top: var(--cv-pad); padding-bottom: 1.1em; margin-bottom: 0;
  background: var(--cv-accent); color: #fdfcf9;
}
.tpl-sidebar .cv-title { color: rgba(253, 252, 249, 0.85); }
.tpl-sidebar .cv-cols { flex: 1; gap: 0; padding-inline: 0; }
/* the page paints the column, so it always reaches the bottom edge */
.tpl-sidebar { background: linear-gradient(to right, var(--cv-accent) 31%, var(--cv-bg) 31%); }
[dir="rtl"] .tpl-sidebar { background: linear-gradient(to left, var(--cv-accent) 31%, var(--cv-bg) 31%); }
.tpl-sidebar .cv-mainzone { padding: 1.2em var(--cv-pad) var(--cv-pad); }
.tpl-sidebar .cv-sidezone {
  background: var(--cv-accent); color: #fdfcf9;
  padding: 1.2em 1.6em var(--cv-pad);
  align-self: stretch;
}
.tpl-sidebar .cv-sidezone .cv-h { color: #fdfcf9; border-bottom: 1px solid rgba(255,255,255,0.35); padding-bottom: 0.3em; }
.tpl-sidebar .cv-sidezone .cv-contact,
.tpl-sidebar .cv-sidezone .cv-lang-level { color: rgba(253,252,249,0.85); border-color: transparent; }
.tpl-sidebar .cv-sidezone .cv-bar { background: rgba(255,255,255,0.25); }
.tpl-sidebar .cv-sidezone .cv-bar i { background: #fdfcf9; }
.tpl-sidebar .cv-photo img { border: 3px solid rgba(255, 255, 255, 0.85); }
.tpl-sidebar .cv-mainzone { padding-top: 1.4em; }

/* --- Panel: soft side column --- */
.tpl-panel .cv-sidezone {
  background: #f4f1ea; border-radius: 10px;
  padding: 1.3em 1.4em; align-self: stretch;
}
.tpl-panel .cv-h { font-size: 0.95em; }
.tpl-panel .cv-photo img { border-radius: 12px; }

/* --- Band: full-width accent header --- */
.tpl-band { padding-top: 0; }
.tpl-band .cv-head {
  background: var(--cv-accent); color: #ffffff;
  margin: 0 calc(-1 * var(--cv-pad)) 0;
  padding: 2em var(--cv-pad) 1.6em;
}
.tpl-band .cv-title { color: rgba(255,255,255,0.88); }
.tpl-band .cv-contact {
  background: color-mix(in srgb, var(--cv-accent) 88%, black);
  color: rgba(255,255,255,0.92);
  margin: 0 calc(-1 * var(--cv-pad)) 1.4em;
  padding: 0.7em var(--cv-pad); border-bottom: none;
}
.tpl-band .cv-photo img { border: 3px solid rgba(255,255,255,0.85); }

/* --- Compact: maximum signal per page --- */
.tpl-compact { --cv-fs: 12px; --cv-gap: 0.8em; --cv-pad: 34px; }
.tpl-compact .cv-name { font-size: 2em; }
.tpl-compact .cv-h {
  display: inline-block; font-size: 0.9em;
  border-bottom: 2px solid var(--cv-accent); padding-bottom: 0.15em;
}
.tpl-compact .cv-contact { padding-bottom: 0.5em; margin-bottom: 0.7em; }
.tpl-compact .cv-skills { gap: 0.35em 1em; }
.tpl-compact .cv-skill { min-width: 30%; flex-basis: 30%; }

/* --- Timeline: dotted career line --- */
.tpl-timeline .cv-sec-experience .cv-entry,
.tpl-timeline .cv-sec-education .cv-entry {
  position: relative;
  padding-inline-start: 1.5em;
  border-inline-start: 2px solid color-mix(in srgb, var(--cv-accent) 35%, transparent);
  margin-inline-start: 0.35em;
  padding-bottom: 0.2em;
}
.tpl-timeline .cv-sec-experience .cv-entry::before,
.tpl-timeline .cv-sec-education .cv-entry::before {
  content: ""; position: absolute;
  inset-inline-start: -6px; top: 0.35em;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--cv-accent);
}

/* --- ATS: machine-readable plainness --- */
.tpl-ats { --cv-line: #999999; --cv-muted: #444444; }
.tpl-ats .cv-title, .tpl-ats .cv-h { color: var(--cv-ink); }
.tpl-ats .cv-h { letter-spacing: 0.05em; border-bottom: 1px solid var(--cv-ink); padding-bottom: 0.25em; }
.tpl-ats .cv-bar { display: none; }
.tpl-ats .cv-skill { min-width: 0; flex: 0 0 auto; }
.tpl-ats .cv-skill-name::after { content: ","; }
.tpl-ats .cv-skill:last-child .cv-skill-name::after { content: ""; }
.tpl-ats .cv-entry-sub .cv-org { font-style: normal; }

/* --- Elegant: centered small caps and fine rules --- */
.tpl-elegant .cv-head { flex-direction: column; text-align: center; gap: 0.4em; }
.tpl-elegant .cv-headtext { width: 100%; }
.tpl-elegant .cv-name { font-weight: 400; font-variant: small-caps; letter-spacing: 0.12em; }
.tpl-elegant .cv-title { letter-spacing: 0.2em; text-transform: uppercase; font-size: 0.85em; }
.tpl-elegant .cv-contact { justify-content: center; border-bottom: 1px solid var(--cv-accent); }
.tpl-elegant .cv-h {
  display: flex; align-items: center; gap: 0.8em;
  font-weight: 400; font-variant: small-caps; letter-spacing: 0.18em; text-transform: none;
}
.tpl-elegant .cv-h::before, .tpl-elegant .cv-h::after {
  content: ""; flex: 1; height: 1px; background: var(--cv-line);
}

/* --- Mono: for people who live in editors --- */
.tpl-mono .cv-name, .tpl-mono .cv-h, .tpl-mono .cv-dates, .tpl-mono .cv-contact {
  font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, monospace;
}
.tpl-mono .cv-name { font-size: 2em; }
.tpl-mono .cv-h { text-transform: none; letter-spacing: 0; }
.tpl-mono .cv-h::before { content: "// "; color: var(--cv-muted); }
.tpl-mono .cv-contact { border-bottom: 1px dashed var(--cv-line); }
.tpl-mono .cv-bar { border-radius: 0; }
.tpl-mono .cv-bar i { border-radius: 0; }

/* --- Duo: accent-edged headings, quiet side column --- */
.tpl-duo .cv-h {
  border-inline-start: 4px solid var(--cv-accent);
  padding-inline-start: 0.55em;
}
.tpl-duo .cv-sidezone { border-inline-start: 1px solid var(--cv-line); padding-inline-start: 1.6em; align-self: stretch; }
.tpl-duo .cv-name { font-size: 2.5em; }

/* --- Paper: the *Kit house look --- */
.tpl-paper { --cv-bg: #f7f1e3; --cv-ink: #2f2a24; --cv-muted: #59503f; --cv-line: #d8cfba; }
.tpl-paper { border: 2px solid var(--cv-ink); box-shadow: inset 0 0 0 6px var(--cv-bg), inset 0 0 0 7px var(--cv-line); }
.tpl-paper .cv-h { color: var(--cv-ink); }
.tpl-paper .cv-h::after { content: ""; display: block; width: 3em; border-bottom: 2px solid var(--cv-accent); margin-top: 0.25em; }
.tpl-paper .cv-contact { border-bottom: 2px solid var(--cv-ink); }
.tpl-paper .cv-photo img { border-radius: 10px; border: 2px solid var(--cv-ink); }

/* ============================================================
   Print: only the CV, at natural size, with backgrounds kept
   ============================================================ */

@media print {
  /* the page box comes from @page (margin 0) in builder.js; the sheet must
     be at least one full page tall so dark pages and sidebar columns keep
     their background all the way down, not just as far as the text goes */
  .cv-page {
    width: auto !important;
    min-height: 297mm !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .cv-page.cvsize-letter { min-height: 11in !important; }
  .cv-entry { break-inside: avoid; }
  .cv-h { break-after: avoid; }
  .cv-head { break-after: avoid; }
}

/* ============================================================
   Extended theme collection
   ============================================================ */

/* --- Slate --- */
/* --- Slate: cool graphite calm, one thin accent rail --- */
.tpl-slate {
  --cv-ink: #232c33;
  --cv-muted: #54626d;
  --cv-line: #d6dce0;
  --cv-bg: #ffffff;
  border-inline-start: 6px solid var(--cv-accent);
}

/* sans identity where it counts; body text follows the user's pairing */
.tpl-slate .cv-name, .tpl-slate .cv-h {
  font-family: -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}
.tpl-slate .cv-name { font-size: 2.25em; letter-spacing: -0.012em; }
.tpl-slate .cv-title {
  font-size: 0.9em; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.18em;
  margin-top: 0.5em;
}

/* contact: hairline-divided row */
.tpl-slate .cv-contact { gap: 0.35em 0; padding-bottom: 1em; }
.tpl-slate .cv-c { padding-inline-end: 1.05em; }
.tpl-slate .cv-c + .cv-c { border-inline-start: 1px solid var(--cv-line); padding-inline-start: 1.05em; }

/* headings: quiet ink caps with a trailing hairline to the margin */
.tpl-slate .cv-h {
  display: flex; align-items: center; gap: 0.8em;
  font-size: 0.84em; letter-spacing: 0.17em;
  color: var(--cv-ink);
  margin-bottom: 0.7em;
}
.tpl-slate .cv-h::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--cv-accent) 0 14px, var(--cv-line) 14px);
}
[dir="rtl"] .tpl-slate .cv-h::after {
  background: linear-gradient(-90deg, var(--cv-accent) 0 14px, var(--cv-line) 14px);
}

/* entries */
.tpl-slate .cv-entry-main { font-weight: 600; }
.tpl-slate .cv-entry-sub .cv-org { font-style: normal; color: var(--cv-ink); }
.tpl-slate .cv-dates {
  font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, monospace;
  font-size: 0.8em; letter-spacing: 0.02em;
}
.tpl-slate .cv-bullets li::marker { color: var(--cv-accent); }

/* squared, engineered skill bars */
.tpl-slate .cv-bar { height: 3px; border-radius: 0; background: color-mix(in srgb, var(--cv-accent) 22%, white); }
.tpl-slate .cv-bar i { border-radius: 0; }

/* --- Swiss --- */
/* ============================================================
   Swiss - International Style: a strict typographic grid with
   section headings hung in a margin column, a massive flush
   left name over one heavy rule, red reserved for the margin
   headings. Hierarchy from scale and weight alone.
   ============================================================ */

.tpl-swiss {
  --cv-ink: #131313;
  --cv-muted: #575757;
  --cv-line: #dedede;
  --sw-col: 9.5em;
  --sw-gap: 1.6em;
}
.tpl-swiss .cv-name, .tpl-swiss .cv-h, .tpl-swiss .cv-title {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* masthead */
.tpl-swiss .cv-head {
  display: block;
  border-bottom: 5px solid var(--cv-ink);
  padding-bottom: 1.3em;
  margin-bottom: 0;
}
.tpl-swiss .cv-name {
  font-size: 3.4em;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}
.tpl-swiss .cv-title {
  color: var(--cv-ink);
  font-weight: 500;
  font-size: 0.98em;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-top: 0.7em;
}

/* contact indented onto the content column */
.tpl-swiss .cv-contact {
  font-size: 1em;
  border-bottom: none;
  padding: 1.1em 0 0;
  padding-inline-start: calc(var(--sw-col) + var(--sw-gap));
  margin-bottom: 2.1em;
  gap: 0.35em 1.5em;
}
.tpl-swiss .cv-c { font-size: 0.85em; letter-spacing: 0.01em; }

/* the grid: headings live in the margin column */
.tpl-swiss .cv-sec {
  display: grid;
  grid-template-columns: var(--sw-col) 1fr;
  column-gap: var(--sw-gap);
  margin-bottom: calc(var(--cv-gap) * 1.35);
}
.tpl-swiss .cv-sec > :not(.cv-h) { grid-column: 2; min-width: 0; }
.tpl-swiss .cv-h {
  grid-row: 1;
  font-size: 0.8em;
  letter-spacing: 0.16em;
  margin-bottom: 0;
  padding-top: 0.3em;
}

/* entries */
.tpl-swiss .cv-entry { margin-bottom: calc(var(--cv-gap) * 0.9); }
.tpl-swiss .cv-entry-main { font-weight: 700; }
.tpl-swiss .cv-dates { font-variant-numeric: tabular-nums; }
.tpl-swiss .cv-entry-sub .cv-org { font-style: normal; }
.tpl-swiss .cv-bullets { list-style: square; padding-inline-start: 1.1em; }

/* meters: square, ink; red stays typographic */
.tpl-swiss .cv-bar {
  height: 3px; border-radius: 0;
  background: color-mix(in srgb, var(--cv-ink) 16%, transparent);
}
.tpl-swiss .cv-bar i { border-radius: 0; background: var(--cv-ink); }

/* languages: levels align on their own column */
.tpl-swiss .cv-lang { justify-content: flex-start; gap: 0; }
.tpl-swiss .cv-lang-name { flex: 0 0 9em; }

/* --- Metro --- */
/* --- Metro: solid signage blocks. Accent heading rectangles
   bleed off the start edge; ink title plate; full-bleed gray
   contact strip; hard corners everywhere. --- */

.tpl-metro {
  --cv-ink: #161b1e;
  --cv-muted: #4b555c;
  --cv-line: #d8dcdf;
}
.tpl-metro .cv-name, .tpl-metro .cv-h {
  font-family: -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* masthead: accent chip, heavy name, ink title plate */
.tpl-metro .cv-head { display: block; margin-bottom: 1.1em; }
.tpl-metro .cv-head::before {
  content: ""; display: block;
  width: 3em; height: 0.55em;
  background: var(--cv-accent);
  margin-bottom: 1em;
}
.tpl-metro .cv-name { font-size: 2.7em; font-weight: 800; letter-spacing: -0.02em; line-height: 1.04; }
.tpl-metro .cv-title {
  display: inline-block;
  background: var(--cv-ink); color: #ffffff;
  padding: 0.34em 0.85em;
  margin-top: 0.75em;
  font-size: 0.84em; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.16em;
}

/* contact: full-bleed gray strip with accent square stops */
.tpl-metro .cv-contact {
  background: color-mix(in srgb, var(--cv-ink) 6%, transparent);
  margin-inline: calc(-1 * var(--cv-pad));
  padding: 0.7em var(--cv-pad);
  border-bottom: none;
  margin-bottom: 1.5em;
  gap: 0.35em 1.1em;
  font-size: 0.9em;
}
.tpl-metro .cv-c:not(:first-child)::before {
  content: ""; display: inline-block;
  width: 0.35em; height: 0.35em;
  background: var(--cv-accent);
  margin-inline-end: 1.1em;
  vertical-align: 0.12em;
}

/* headings: solid accent tiles running from the page edge */
.tpl-metro .cv-sec { margin-bottom: calc(var(--cv-gap) * 1.2); }
.tpl-metro .cv-h {
  display: inline-block;
  background: var(--cv-accent); color: #ffffff;
  font-size: 0.8em; letter-spacing: 0.17em;
  padding: 0.5em 1.1em 0.45em;
  padding-inline-start: var(--cv-pad);
  margin-inline-start: calc(-1 * var(--cv-pad));
  margin-bottom: 0.9em;
}

/* entries */
.tpl-metro .cv-entry-main { font-weight: 700; }
.tpl-metro .cv-entry-sub .cv-org { font-style: normal; font-weight: 600; color: var(--cv-ink); }
.tpl-metro .cv-dates {
  background: color-mix(in srgb, var(--cv-ink) 8%, transparent);
  padding: 0.12em 0.55em;
  font-size: 0.8em; font-weight: 600; color: var(--cv-ink);
  font-variant-numeric: tabular-nums;
}
.tpl-metro .cv-bullets { list-style: square; padding-inline-start: 1.05em; }
.tpl-metro .cv-bullets li::marker { color: var(--cv-accent); }

/* meters: squared, tiled into five segments */
.tpl-metro .cv-bar {
  position: relative; height: 0.5em; border-radius: 0;
  background: color-mix(in srgb, var(--cv-ink) 15%, transparent);
}
.tpl-metro .cv-bar i { border-radius: 0; }
.tpl-metro .cv-bar::after {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(to right, transparent 0 calc(20% - 2px), var(--cv-bg) calc(20% - 2px) 20%);
}
[dir="rtl"] .tpl-metro .cv-bar::after {
  background: repeating-linear-gradient(to left, transparent 0 calc(20% - 2px), var(--cv-bg) calc(20% - 2px) 20%);
}

/* languages: levels align on their own column */
.tpl-metro .cv-lang { justify-content: flex-start; gap: 1.5em; }
.tpl-metro .cv-lang-name { flex: 0 0 10em; font-weight: 600; }
.tpl-metro .cv-lang-level { text-transform: uppercase; font-size: 0.78em; letter-spacing: 0.08em; align-self: center; }

/* --- Aero --- */
/* --- Aero: weightless sky; every section floats in a soft rounded panel --- */
.tpl-aero {
  --cv-ink: #22313d;
  --cv-muted: #4c6172;
  --cv-line: color-mix(in srgb, var(--cv-accent) 22%, white);
  --aero-deep: color-mix(in srgb, var(--cv-accent) 72%, black);
  --aero-tint: color-mix(in srgb, var(--cv-accent) 7%, white);
  background: linear-gradient(180deg, color-mix(in srgb, var(--cv-accent) 12%, white), var(--cv-bg) 330px);
}

/* head floats on the sky wash */
.tpl-aero .cv-head { gap: 1.5em; margin-bottom: 1em; }
.tpl-aero .cv-name { font-weight: 600; font-size: 2.5em; letter-spacing: -0.01em; }
.tpl-aero .cv-title { color: var(--aero-deep); font-weight: 600; margin-top: 0.3em; }
.tpl-aero .cv-photo img { border: 4px solid #ffffff; box-shadow: 0 0 0 1px var(--cv-line); }

/* contact: little white pill chips */
.tpl-aero .cv-contact {
  border-bottom: none; gap: 0.45em 0.5em;
  padding-bottom: 0; margin-bottom: 1.5em;
}
.tpl-aero .cv-c {
  background: #ffffff; border: 1px solid var(--cv-line);
  border-radius: 999px; padding: 0.22em 0.85em;
}

/* sections: barely-tinted rounded panels with generous padding */
.tpl-aero .cv-sec {
  background: var(--aero-tint);
  border: 1px solid color-mix(in srgb, var(--cv-accent) 14%, white);
  border-radius: 16px;
  padding: 1.1em 1.35em 1.2em;
}

/* headings: a small accent pill leads each panel */
.tpl-aero .cv-h {
  display: flex; align-items: center; gap: 0.6em;
  color: var(--aero-deep);
  font-size: 0.88em; letter-spacing: 0.14em;
  margin-bottom: 0.65em;
}
.tpl-aero .cv-h::before {
  content: ""; flex: none;
  width: 1.5em; height: 0.45em; border-radius: 999px;
  background: var(--cv-accent);
}

/* entries: dates ride in white pills */
.tpl-aero .cv-dates {
  background: #ffffff; border-radius: 999px;
  padding: 0.14em 0.8em;
  font-size: 0.8em; font-weight: 600; color: var(--aero-deep);
}
.tpl-aero .cv-entry-sub .cv-org { font-style: normal; }
.tpl-aero .cv-bullets li::marker { color: var(--cv-accent); }

/* languages: friendly white chips */
.tpl-aero .cv-langs { flex-direction: row; flex-wrap: wrap; gap: 0.5em; }
.tpl-aero .cv-lang {
  background: #ffffff; border: 1px solid var(--cv-line);
  border-radius: 999px; padding: 0.22em 0.9em;
  justify-content: flex-start; gap: 0.55em;
}

/* soft rounded meters */
.tpl-aero .cv-bar { height: 6px; background: color-mix(in srgb, var(--cv-accent) 24%, white); }

/* --- Pulse --- */
/* --- Pulse: understated energy; haloed beat-dots lead each
   heading, dotted beat-lines separate sections, and skills read
   as five beats (solid = level, ring = headroom). --- */

.tpl-pulse {
  --cv-ink: #26221d;
  --cv-muted: #665e52;
  --cv-line: #ddd5c8;
  --pl-beats: radial-gradient(circle, color-mix(in srgb, var(--cv-accent) 55%, transparent) 1.3px, transparent 1.9px);
}

/* masthead: the name signs off with an accent beat */
.tpl-pulse .cv-name { font-size: 2.35em; letter-spacing: -0.01em; }
.tpl-pulse .cv-name::after {
  content: ""; display: inline-block;
  width: 0.16em; height: 0.16em; border-radius: 50%;
  background: var(--cv-accent);
  margin-inline-start: 0.1em;
}
.tpl-pulse .cv-title { font-weight: 600; }

/* contact rides on a dotted beat-line */
.tpl-pulse .cv-contact {
  border-bottom: none;
  background: var(--pl-beats) bottom / 9px 3px repeat-x;
  padding-bottom: 1.05em; margin-bottom: 1.2em;
}

/* dotted separators keep the page rhythm */
.tpl-pulse .cv-sec + .cv-sec {
  background: var(--pl-beats) top / 9px 3px repeat-x;
  padding-top: calc(var(--cv-gap) * 0.8);
}

/* headings: a pulse dot with a soft halo */
.tpl-pulse .cv-h {
  display: flex; align-items: center; gap: 0.65em;
  color: var(--cv-ink);
  font-size: 0.86em; letter-spacing: 0.16em;
  margin-bottom: 0.7em;
}
.tpl-pulse .cv-h::before {
  content: ""; flex: none;
  width: 0.55em; height: 0.55em; border-radius: 50%;
  background: var(--cv-accent);
  box-shadow: 0 0 0 0.3em color-mix(in srgb, var(--cv-accent) 16%, transparent);
}

/* entries */
.tpl-pulse .cv-entry-main { font-weight: 700; }
.tpl-pulse .cv-dates { font-variant-numeric: tabular-nums; }
.tpl-pulse .cv-entry-sub .cv-org { font-style: normal; }
.tpl-pulse .cv-bullets { list-style: none; padding-inline-start: 1.1em; }
.tpl-pulse .cv-bullets li { position: relative; }
.tpl-pulse .cv-bullets li::before {
  content: ""; position: absolute;
  inset-inline-start: -1.1em; top: 0.5em;
  width: 0.32em; height: 0.32em; border-radius: 50%;
  background: var(--cv-accent);
}

/* languages: dotted leaders carry the beat across the row */
.tpl-pulse .cv-lang { background: var(--pl-beats) center / 9px 3px repeat-x; }
.tpl-pulse .cv-lang-name { background: var(--cv-bg); padding-inline-end: 0.6em; }
.tpl-pulse .cv-lang-level { background: var(--cv-bg); padding-inline-start: 0.6em; }

/* skills: five beats; solid dots filled, rings for the rest */
.tpl-pulse .cv-skill { justify-content: space-between; }
.tpl-pulse .cv-bar {
  flex: none; width: 5em; min-width: 0;
  height: 0.7em; border-radius: 0;
  background:
    radial-gradient(circle, transparent 0.115em, var(--cv-accent) 0.135em 0.21em, transparent 0.245em)
    0 0 / 1em 100%;
}
.tpl-pulse .cv-bar i {
  border-radius: 0;
  background: radial-gradient(circle, var(--cv-accent) 0.235em, transparent 0.27em) 0 0 / 1em 100%;
}

/* --- Facet --- */
/* --- Facet: angular contemporary. A cut-gem masthead of layered
   accent planes with a diagonal edge; below it everything stays
   flat and sharp: parallelogram section tags, diamond contact
   stops, skewed meters. --- */

.tpl-facet {
  --cv-ink: #211d27;
  --cv-muted: #5c5666;
  --cv-line: #ddd8e2;
  --facet-deep: color-mix(in srgb, var(--cv-accent) 60%, black);
  padding-top: 0;
}

/* masthead: full-bleed faceted planes, bottom edge cut on the bias */
.tpl-facet .cv-head {
  margin: 0 calc(-1 * var(--cv-pad)) 1.3em;
  padding: 2.3em var(--cv-pad) 2.8em;
  color: #ffffff;
  background:
    linear-gradient(108deg,
      color-mix(in srgb, var(--cv-accent) 86%, black) 0 67%,
      color-mix(in srgb, var(--cv-accent) 50%, white) 67% 69%,
      transparent 69%),
    var(--facet-deep);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 2.1em), 0 100%);
}
[dir="rtl"] .tpl-facet .cv-head {
  background:
    linear-gradient(252deg,
      color-mix(in srgb, var(--cv-accent) 86%, black) 0 67%,
      color-mix(in srgb, var(--cv-accent) 50%, white) 67% 69%,
      transparent 69%),
    var(--facet-deep);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% - 2.1em));
}
.tpl-facet .cv-name { font-size: 2.55em; font-weight: 800; letter-spacing: -0.015em; line-height: 1.06; }
.tpl-facet .cv-title {
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.88em; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.2em;
  margin-top: 0.6em;
}

/* portrait: square with one facet-cut corner */
.tpl-facet .cv-photo img {
  border-radius: 0;
  clip-path: polygon(0 0, 100% 0, 100% 68%, 68% 100%, 0 100%);
}
[dir="rtl"] .tpl-facet .cv-photo img {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 32% 100%, 0 68%);
}

/* contact: flat row with rotated-square stops */
.tpl-facet .cv-contact {
  border-bottom: none;
  padding-bottom: 0; margin-bottom: 1.5em;
  gap: 0.35em 0.9em; font-size: 0.9em;
}
.tpl-facet .cv-c + .cv-c::before {
  content: ""; display: inline-block;
  width: 0.32em; height: 0.32em;
  background: var(--cv-accent);
  transform: rotate(45deg);
  margin-inline-end: 0.9em;
  vertical-align: 0.12em;
}

/* headings: sharp parallelogram tags */
.tpl-facet .cv-h {
  display: inline-block;
  background: var(--facet-deep); color: #ffffff;
  font-size: 0.78em; letter-spacing: 0.17em;
  padding: 0.45em 1.35em 0.4em;
  clip-path: polygon(0.7em 0, 100% 0, calc(100% - 0.7em) 100%, 0 100%);
  margin-bottom: 0.75em;
}
[dir="rtl"] .tpl-facet .cv-h {
  clip-path: polygon(0 0, calc(100% - 0.7em) 0, 100% 100%, 0.7em 100%);
}

/* entries: flat, firm hierarchy */
.tpl-facet .cv-entry-main { font-weight: 700; }
.tpl-facet .cv-entry-sub .cv-org { font-style: normal; font-weight: 600; color: var(--cv-ink); }
.tpl-facet .cv-dates { font-variant-numeric: tabular-nums; font-weight: 600; }
.tpl-facet .cv-bullets li::marker { color: var(--cv-accent); }

/* meters: skewed into slim parallelograms */
.tpl-facet .cv-bar {
  height: 0.5em; border-radius: 0;
  background: color-mix(in srgb, var(--cv-accent) 16%, white);
  transform: skewX(-18deg);
}
.tpl-facet .cv-bar i { border-radius: 0; }
[dir="rtl"] .tpl-facet .cv-bar { transform: skewX(18deg); }

/* languages: compact inline pairs */
.tpl-facet .cv-langs { flex-direction: row; flex-wrap: wrap; gap: 0.4em 1.9em; }
.tpl-facet .cv-lang { justify-content: flex-start; gap: 0.55em; }
.tpl-facet .cv-lang-name { font-weight: 600; }

/* --- Charter --- */
/* --- Charter: engraved legal stationery. A double hairline
   frame encloses the page; centered small-caps letterhead with
   a fine-print contact band ruled top and bottom; sections are
   numbered in roman numerals like articles of a deed. --- */

.tpl-charter {
  --cv-ink: #26221c;
  --cv-muted: #5f584c;
  --cv-line: #d3ccbf;
  --ch-frame: color-mix(in srgb, var(--cv-accent) 60%, white);
  position: relative;
  counter-reset: chsec;
  border: 1px solid var(--ch-frame);
  padding: calc(var(--cv-pad) + 10px);
}
.tpl-charter::before {
  content: ""; position: absolute; inset: 8px;
  border: 1px solid color-mix(in srgb, var(--cv-accent) 34%, white);
  pointer-events: none;
}

/* letterhead */
.tpl-charter .cv-head { flex-direction: column; text-align: center; gap: 0.3em; margin-bottom: 0.7em; }
.tpl-charter .cv-headtext { width: 100%; }
.tpl-charter .cv-name {
  font-weight: 700; font-variant: small-caps;
  font-size: 2.05em; letter-spacing: 0.16em;
  padding-inline-start: 0.16em; /* optically recenter the letterspaced line */
}
.tpl-charter .cv-title {
  font-size: 0.82em; text-transform: uppercase; letter-spacing: 0.3em;
  color: var(--cv-accent); margin-top: 0.5em;
  padding-inline-start: 0.3em;
}
.tpl-charter .cv-contact {
  justify-content: center; gap: 0.3em 0.6em;
  font-size: 0.88em; letter-spacing: 0.02em;
  border-top: 1px solid var(--cv-line); border-bottom: 1px solid var(--cv-line);
  padding-block: 0.55em; margin-bottom: 1.4em;
}
.tpl-charter .cv-c:not(:first-child)::before {
  content: "\00B7"; margin-inline-end: 0.6em;
  color: color-mix(in srgb, var(--cv-muted) 55%, transparent);
}

/* numbered articles */
.tpl-charter .cv-sec { counter-increment: chsec; }
.tpl-charter .cv-h {
  display: flex; align-items: center; gap: 0.7em;
  color: var(--cv-ink); text-transform: none;
  font-variant: small-caps; font-weight: 600;
  font-size: 1.06em; letter-spacing: 0.13em;
}
.tpl-charter .cv-h::before {
  content: counter(chsec, upper-roman) ".";
  color: var(--cv-accent); letter-spacing: 0.04em;
}
.tpl-charter .cv-h::after { content: ""; flex: 1; height: 1px; background: var(--cv-line); }

/* body */
.tpl-charter .cv-entry-main { font-weight: 700; }
.tpl-charter .cv-dates {
  font-variant: small-caps; letter-spacing: 0.05em;
  color: var(--cv-muted);
}
.tpl-charter .cv-bullets { list-style: none; padding-inline-start: 1.15em; }
.tpl-charter .cv-bullets li { position: relative; }
.tpl-charter .cv-bullets li::before {
  content: "\00A7"; position: absolute;
  inset-inline-start: -1.15em; color: var(--cv-muted); font-size: 0.88em;
}

/* meters: square hairline ledgers */
.tpl-charter .cv-bar {
  height: 3px; border-radius: 0;
  background: color-mix(in srgb, var(--cv-accent) 20%, transparent);
}
.tpl-charter .cv-bar i { border-radius: 0; }

/* --- Ledger --- */
/* ============================================================
   Ledger: a banker's account book. Folio-numbered headings,
   a ruled register band for contact details, dates set in a
   fixed tabular column behind a hairline, and a fine rule
   closing every entry. Muted green-and-ink, precise, calm.
   ============================================================ */

.tpl-ledger {
  --cv-ink: #20231e;
  --cv-muted: color-mix(in srgb, var(--cv-accent) 30%, #4a4a44);
  --cv-line: color-mix(in srgb, var(--cv-accent) 24%, #ddd9cc);
  --cv-bg: color-mix(in srgb, var(--cv-accent) 3%, #fefdf9);
  --led-deep: color-mix(in srgb, var(--cv-accent) 88%, #12140f);
  counter-reset: led;
}

/* masthead */
.tpl-ledger .cv-head { margin-bottom: 0.7em; }
.tpl-ledger .cv-name { font-size: 2.2em; letter-spacing: 0.01em; }
.tpl-ledger .cv-title {
  color: var(--led-deep);
  font-size: 0.86em; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.22em;
  margin-top: 0.45em;
}

/* contact: the register band, closed by a double rule */
.tpl-ledger .cv-contact {
  background: color-mix(in srgb, var(--cv-accent) 11%, white);
  border-top: 1px solid var(--cv-ink);
  border-bottom: 3px double var(--cv-ink);
  padding: 0.5em 0.8em;
  margin-bottom: 1.25em;
  font-size: 0.85em;
  font-variant-numeric: tabular-nums;
}

/* headings: folio number + account title over a firm rule */
.tpl-ledger .cv-h {
  counter-increment: led;
  color: var(--led-deep);
  font-size: 0.88em; letter-spacing: 0.15em;
  border-bottom: 1px solid var(--cv-ink);
  padding-bottom: 0.35em; margin-bottom: 0.7em;
}
.tpl-ledger .cv-h::before {
  content: counter(led, decimal-leading-zero);
  display: inline-block;
  color: var(--cv-muted);
  font-variant-numeric: tabular-nums;
  margin-inline-end: 0.75em;
}

/* every entry sits on its own fine ruled line */
.tpl-ledger .cv-entry {
  border-bottom: 1px solid var(--cv-line);
  padding-bottom: 0.55em;
}
.tpl-ledger .cv-sec-summary .cv-desc,
.tpl-ledger .cv-skills {
  border-bottom: 1px solid var(--cv-line);
  padding-bottom: 0.7em;
}

/* dates: a fixed, lightly shaded column cell with its own
   rule, like a ledger's date column; tabular figures keep
   the years in register */
.tpl-ledger .cv-entry-head { gap: 1.2em; }
.tpl-ledger .cv-dates {
  flex: 0 0 8.2em;
  text-align: start;
  background: color-mix(in srgb, var(--cv-accent) 9%, white);
  border-inline-start: 1px solid color-mix(in srgb, var(--cv-accent) 45%, #cfcabc);
  padding-block: 0.15em;
  padding-inline: 0.7em 0.5em;
  font-variant-numeric: tabular-nums;
  color: var(--led-deep);
}
.tpl-ledger .cv-entry-sub .cv-org {
  font-style: normal; font-variant: small-caps; letter-spacing: 0.05em;
}

/* skills: square-ended rules, no lozenges */
.tpl-ledger .cv-bar { height: 4px; border-radius: 0; background: color-mix(in srgb, var(--cv-accent) 24%, white); }
.tpl-ledger .cv-bar i { border-radius: 0; background: var(--led-deep); }

/* languages: dotted ledger leaders */
.tpl-ledger .cv-langs { gap: 0.4em; }
.tpl-ledger .cv-lang { border-bottom: 1px dotted var(--cv-line); padding-bottom: 0.3em; }
.tpl-ledger .cv-lang-level { color: var(--led-deep); font-variant-numeric: tabular-nums; }

/* --- Consul --- */
/* --- Consul: diplomatic stationery. Centered letterhead over a
   thin-thick-thin state rule, wide margins, letterspaced centered
   headings with a short accent underline, diamond marks, and a
   mirrored closing rule sealing the foot of the page. --- */

.tpl-consul {
  --cv-ink: #262120;
  --cv-muted: #61574d;
  --cv-line: #ddd4c8;
  --co-rule: linear-gradient(to bottom,
    var(--cv-ink) 0 1px, transparent 1px 3px,
    var(--cv-accent) 3px 6px, transparent 6px 8px,
    var(--cv-ink) 8px 9px);
  position: relative;
  padding: calc(var(--cv-pad) + 12px) calc(var(--cv-pad) + 30px) calc(var(--cv-pad) + 30px);
}
/* closing rule inside the bottom margin */
.tpl-consul::after {
  content: ""; position: absolute;
  inset-inline: calc(var(--cv-pad) + 30px);
  bottom: calc(var(--cv-pad) * 0.55);
  height: 9px; background: var(--co-rule);
}

/* letterhead */
.tpl-consul .cv-head { flex-direction: column; text-align: center; gap: 0; margin-bottom: 0; }
.tpl-consul .cv-headtext { width: 100%; }
.tpl-consul .cv-name::before {
  content: "\25C6"; display: block;
  font-size: 0.3em; letter-spacing: 0;
  color: var(--cv-accent); margin-bottom: 1.3em;
}
.tpl-consul .cv-name { font-weight: 400; font-size: 2.3em; letter-spacing: 0.05em; }
.tpl-consul .cv-title {
  text-transform: uppercase; letter-spacing: 0.32em; font-size: 0.8em;
  margin-top: 0.75em; padding-inline-start: 0.32em;
}
.tpl-consul .cv-head::after { content: ""; align-self: stretch; height: 9px; margin-top: 1.2em; background: var(--co-rule); }

/* contact band between the state rule and a hairline */
.tpl-consul .cv-contact {
  justify-content: center; gap: 0.3em 0.55em;
  font-size: 0.86em; letter-spacing: 0.04em;
  border-bottom: 1px solid var(--cv-line);
  padding-block: 0.7em; margin-bottom: 1.5em;
}
.tpl-consul .cv-c:not(:first-child)::before {
  content: "\25C6"; font-size: 0.45em; vertical-align: 0.3em;
  color: color-mix(in srgb, var(--cv-accent) 55%, white);
  margin-inline-end: 0.55em;
}

/* centered letterspaced headings */
.tpl-consul .cv-sec { margin-bottom: calc(var(--cv-gap) * 1.2); }
.tpl-consul .cv-h {
  text-align: center; color: var(--cv-ink);
  font-weight: 600; font-size: 0.87em;
  letter-spacing: 0.34em; padding-inline-start: 0.34em;
  margin-bottom: 0.9em;
}
.tpl-consul .cv-h::after {
  content: ""; display: block; width: 2.8em; height: 1px;
  margin: 0.55em auto 0; background: var(--cv-accent);
}

/* the profile reads as a formal note */
.tpl-consul .cv-sec-summary .cv-desc p {
  text-align: center; font-style: italic;
  max-width: 82%; margin-inline: auto;
}

/* entries */
.tpl-consul .cv-dates { font-size: 0.8em; text-transform: uppercase; letter-spacing: 0.09em; }
.tpl-consul .cv-bullets { list-style: none; padding-inline-start: 1.25em; }
.tpl-consul .cv-bullets li { position: relative; }
.tpl-consul .cv-bullets li::before {
  content: "\25C6"; position: absolute;
  inset-inline-start: -2.3em; top: 0.8em;
  font-size: 0.52em; color: var(--cv-accent);
}

/* meters: flat hairline ledgers */
.tpl-consul .cv-bar { height: 4px; border-radius: 0; background: color-mix(in srgb, var(--cv-accent) 18%, transparent); }
.tpl-consul .cv-bar i { border-radius: 0; }

/* --- Heritage --- */
/* --- Heritage: letterpress letterhead. Full-caps tracked name
   held between a thin-over-thick opening rule and a thick-over-thin
   closing rule, hairline separators in the contact line, section
   headings in letterspaced caps between double hairlines, caps
   dates. All type and rules, not one ornament. --- */

.tpl-heritage {
  --cv-bg: #fdfbf5;
  --cv-ink: #241f19;
  --cv-muted: #675e50;
  --cv-line: #ddd5c5;
  --hg-deep: color-mix(in srgb, var(--cv-accent) 74%, #241f19);
  --hg-rule: color-mix(in srgb, var(--cv-accent) 45%, #cfc6b4);
}

/* letterhead plate */
.tpl-heritage .cv-head { flex-direction: column; text-align: center; gap: 0; margin-bottom: 0.55em; }
.tpl-heritage .cv-head::before {
  content: ""; align-self: stretch; height: 6px; margin-bottom: 1.2em;
  background: linear-gradient(to bottom, var(--hg-deep) 0 1px, transparent 1px 4px, var(--hg-deep) 4px 6px);
}
.tpl-heritage .cv-headtext { width: 100%; }
.tpl-heritage .cv-name {
  font-size: 2.05em; font-weight: 400; line-height: 1.25;
  text-transform: uppercase; letter-spacing: 0.26em; padding-inline-start: 0.26em;
}
.tpl-heritage .cv-title {
  color: var(--hg-deep); font-size: 0.76em; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.34em; padding-inline-start: 0.34em;
  margin-top: 0.7em;
}

/* contact line with hairline separators, closed by a scotch rule */
.tpl-heritage .cv-contact {
  justify-content: center; column-gap: 0; row-gap: 0.25em;
  font-size: 0.85em; letter-spacing: 0.02em;
  border-bottom: none; padding-bottom: 0; margin-bottom: 1.4em;
}
.tpl-heritage .cv-c { padding-inline: 1em; border-inline-start: 1px solid var(--cv-line); }
.tpl-heritage .cv-c:first-child { border-inline-start: none; }
.tpl-heritage .cv-contact::after {
  content: ""; width: 100%; height: 6px; margin-top: 0.95em;
  background: linear-gradient(to bottom, var(--hg-deep) 0 2px, transparent 2px 5px, var(--hg-deep) 5px 6px);
}

/* letterspaced caps headings between double hairlines */
.tpl-heritage .cv-h {
  display: flex; align-items: center; gap: 1.1em;
  color: var(--cv-ink); font-size: 0.8em; font-weight: 600;
  letter-spacing: 0.32em; padding-inline-start: 0.32em;
  margin-bottom: 0.8em;
}
.tpl-heritage .cv-h::before, .tpl-heritage .cv-h::after {
  content: ""; flex: 1; height: 0; border-top: 3px double var(--hg-rule);
}

/* a centered statement for the profile */
.tpl-heritage .cv-sec-summary .cv-desc { text-align: center; font-style: italic; padding-inline: 2em; }

/* entries: caps dates, square markers */
.tpl-heritage .cv-dates { font-size: 0.74em; text-transform: uppercase; letter-spacing: 0.14em; padding-top: 0.15em; }
.tpl-heritage .cv-bullets { list-style: square; }
.tpl-heritage .cv-bullets li::marker { color: var(--hg-deep); }

/* skills as fine engraved gauges */
.tpl-heritage .cv-bar { height: 3px; border-radius: 0; background: color-mix(in srgb, var(--cv-accent) 24%, transparent); }
.tpl-heritage .cv-bar i { border-radius: 0; background: var(--hg-deep); }
.tpl-heritage .cv-lang-level { text-transform: uppercase; font-size: 0.74em; letter-spacing: 0.14em; }

/* --- Folio --- */
/* --- Folio: a literary book page. Quiet title-page head,
   chapter-like section openings beneath an asterism, justified
   prose with generous leading, italic accent organizations and
   a drop cap opening the summary. For writers and editors. --- */

.tpl-folio {
  --cv-bg: #fffdf6;
  --cv-ink: #262019;
  --cv-muted: #695e50;
  --cv-line: #e0d8c8;
  --fo-deep: color-mix(in srgb, var(--cv-accent) 72%, var(--cv-ink));
  line-height: 1.62;
  --cv-gap: 1.5em;
  padding-inline: calc(var(--cv-pad) + 18px);
}

/* title page */
.tpl-folio .cv-head { flex-direction: column; text-align: center; gap: 0.3em; margin-bottom: 0.4em; padding-top: 0.5em; }
.tpl-folio .cv-headtext { width: 100%; }
.tpl-folio .cv-name { font-weight: 400; font-size: 2.55em; line-height: 1.15; letter-spacing: 0.015em; }
.tpl-folio .cv-title { font-style: italic; font-size: 1.06em; color: var(--fo-deep); margin-top: 0.3em; }
.tpl-folio .cv-contact {
  justify-content: center; gap: 0.3em 0.75em;
  border-bottom: none; font-size: 0.9em;
  padding-bottom: 0.3em; margin-bottom: 0.5em;
}
.tpl-folio .cv-c:not(:first-child)::before { content: "\00B7"; margin-inline-end: 0.75em; color: var(--cv-accent); }

/* chapter openings */
.tpl-folio .cv-sec { margin-bottom: calc(var(--cv-gap) * 1.1); }
.tpl-folio .cv-h {
  text-align: center; text-transform: none;
  font-style: italic; font-weight: 400;
  font-size: 1.28em; letter-spacing: 0.02em;
  color: var(--cv-ink); margin-bottom: 0.65em;
}
.tpl-folio .cv-h::before {
  content: "\2042"; display: block;
  font-style: normal; font-size: 0.6em;
  color: var(--cv-accent); margin-bottom: 0.35em;
}

/* prose: justified, book leading, drop cap on the opening */
.tpl-folio .cv-desc p { text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
.tpl-folio .cv-sec-summary .cv-desc p:first-child::first-letter {
  float: inline-start;
  font-size: 2.8em; line-height: 0.9;
  padding-inline-end: 0.12em;
  color: var(--fo-deep);
}

/* entries */
.tpl-folio .cv-entry { margin-bottom: calc(var(--cv-gap) * 0.78); }
.tpl-folio .cv-dates { font-style: italic; font-size: 0.9em; }
.tpl-folio .cv-entry-sub { gap: 0.55em; }
.tpl-folio .cv-org { color: var(--fo-deep); }
.tpl-folio .cv-loc::before { content: "\00B7"; margin-inline-end: 0.55em; }
.tpl-folio .cv-bullets { padding-inline-start: 1.3em; }
.tpl-folio .cv-bullets li::marker { color: var(--cv-accent); }

/* skills and languages, kept quiet */
.tpl-folio .cv-bar { height: 2px; border-radius: 0; background: color-mix(in srgb, var(--cv-accent) 26%, #e9e2d2); }
.tpl-folio .cv-bar i { border-radius: 0; background: var(--fo-deep); }
.tpl-folio .cv-skill { gap: 0.8em; }
.tpl-folio .cv-lang-level { font-style: italic; }

/* --- Inkbrush --- */
/* --- Inkbrush: expressive brush strokes over a calm body --- */
.tpl-inkbrush {
  --cv-bg: #fcfaf4;
  --cv-ink: #2a241f;
  --cv-muted: #675c51;
  --cv-line: #e6decd;
  --ib-deep: color-mix(in srgb, var(--cv-accent) 70%, black);
  --ib-wash: color-mix(in srgb, var(--cv-accent) 26%, transparent);
  --ib-dir: to right;
  --ib-flip: 1;
  --ib-rough: polygon(0 32%, 6% 8%, 18% 26%, 30% 0, 44% 20%, 58% 6%, 71% 24%, 84% 2%, 94% 18%, 100% 8%, 100% 62%, 93% 92%, 80% 70%, 66% 100%, 52% 76%, 38% 98%, 25% 72%, 12% 95%, 4% 70%, 0 90%);
  position: relative; z-index: 0;
}
[dir="rtl"] .tpl-inkbrush { --ib-dir: to left; --ib-flip: -1; }

/* header: big name over a light wash, one long drying stroke below */
.tpl-inkbrush .cv-head { margin-bottom: 0.5em; }
.tpl-inkbrush .cv-name {
  font-size: 2.75em; line-height: 1.05; letter-spacing: -0.015em;
  position: relative; z-index: 0;
}
.tpl-inkbrush .cv-name::before {
  content: ""; position: absolute; z-index: -1;
  inset-inline-start: -0.18em; bottom: 0.02em;
  width: 5.6em; height: 0.42em;
  background: linear-gradient(var(--ib-dir), var(--ib-wash), color-mix(in srgb, var(--cv-accent) 12%, transparent) 70%, transparent);
  border-radius: 48% 52% 70% 30% / 85% 65% 75% 95%;
  transform: skew(calc(var(--ib-flip) * -24deg)) rotate(calc(var(--ib-flip) * -1.6deg));
}
.tpl-inkbrush .cv-title { font-style: italic; font-size: 1.12em; margin-top: 0.3em; }
.tpl-inkbrush .cv-headtext::after {
  content: ""; display: block; height: 0.5em; margin-top: 0.75em;
  background: linear-gradient(var(--ib-dir), var(--ib-deep), var(--cv-accent) 40%, color-mix(in srgb, var(--cv-accent) 55%, transparent) 80%, transparent 98%);
  clip-path: var(--ib-rough);
  transform: rotate(calc(var(--ib-flip) * -0.6deg));
}
.tpl-inkbrush .cv-contact { border-bottom: none; padding-bottom: 0.3em; margin-bottom: 1.15em; font-size: 0.9em; }

/* headings: quiet italic ink, loud brush underline dragging past the word */
.tpl-inkbrush .cv-h {
  width: fit-content;
  font-size: 1.26em; font-style: italic; text-transform: none;
  letter-spacing: 0.01em; color: var(--cv-ink);
  margin-bottom: 0.55em;
}
.tpl-inkbrush .cv-h::after {
  content: ""; display: block; height: 0.38em; margin-top: 0.16em;
  width: calc(100% + 1.6em);
  background: linear-gradient(var(--ib-dir), var(--cv-accent), var(--cv-accent) 55%, color-mix(in srgb, var(--cv-accent) 45%, transparent) 85%, transparent);
  clip-path: var(--ib-rough);
  transform: rotate(calc(var(--ib-flip) * -1.2deg));
}

/* body stays calm; dates in a scribe's italic */
.tpl-inkbrush .cv-dates { font-style: italic; }

/* bullets: small flicked ink ticks */
.tpl-inkbrush .cv-bullets { list-style: none; padding-inline-start: 1.05em; }
.tpl-inkbrush .cv-bullets li { position: relative; }
.tpl-inkbrush .cv-bullets li::before {
  content: ""; position: absolute; inset-inline-start: -1.05em; top: 0.5em;
  width: 0.5em; height: 0.24em;
  background: color-mix(in srgb, var(--cv-accent) 80%, black);
  border-radius: 55% 45% 60% 40% / 55% 60% 40% 45%;
  transform: skew(calc(var(--ib-flip) * -28deg)) rotate(calc(var(--ib-flip) * -4deg));
}

/* skill bars: slanted strokes with pooling ink */
.tpl-inkbrush .cv-bar {
  height: 0.42em; border-radius: 0.3em 0.1em 0.35em 0.12em;
  transform: skew(calc(var(--ib-flip) * -16deg));
  background: color-mix(in srgb, var(--cv-accent) 14%, transparent);
}
.tpl-inkbrush .cv-bar i { background: linear-gradient(var(--ib-dir), var(--ib-deep), var(--cv-accent)); border-radius: inherit; }

/* --- Curator --- */
/* --- Curator: museum wall label. A tiny letterspaced caps
   eyebrow with a square accent plinth mark sits above the name,
   which hangs like an artwork title in light italic; tombstone
   entries with tiny caps metadata, hairline trails after the
   labels, 2px gauges, gallery-white calm. --- */

.tpl-curator {
  --cv-bg: #fdfdfb;
  --cv-ink: #232019;
  --cv-muted: #6a6254;
  --cv-line: #e7e2d6;
  --cu-deep: color-mix(in srgb, var(--cv-accent) 62%, var(--cv-ink));
  padding: calc(var(--cv-pad) + 18px) calc(var(--cv-pad) + 24px);
}

/* the label: eyebrow caps above, artwork-title name below */
.tpl-curator .cv-head { margin-bottom: 0.6em; padding-top: 0.9em; }
.tpl-curator .cv-headtext { display: flex; flex-direction: column-reverse; }
.tpl-curator .cv-name {
  font-size: 3em; font-weight: 400; font-style: italic;
  line-height: 1.12;
}
.tpl-curator .cv-title {
  display: flex; align-items: center; gap: 0.8em;
  margin: 0 0 1.6em;
  font-size: 0.72em; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.34em;
  color: var(--cu-deep);
}
.tpl-curator .cv-title::before {
  content: ""; flex: none; width: 0.62em; height: 0.62em;
  background: var(--cv-accent);
}

/* materials line */
.tpl-curator .cv-contact {
  border-bottom: none; padding-bottom: 0; margin-bottom: 2.6em;
  gap: 0.4em 1.7em; font-size: 0.82em; letter-spacing: 0.05em;
}

/* tiny caps labels on a hairline trail */
.tpl-curator .cv-sec { margin-bottom: calc(var(--cv-gap) * 1.4); }
.tpl-curator .cv-h {
  display: flex; align-items: center; gap: 1.1em;
  font-size: 0.7em; font-weight: 600;
  letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--cv-ink); margin-bottom: 1.6em;
}
.tpl-curator .cv-h::after { content: ""; flex: 1; height: 1px; background: var(--cv-line); }

/* tombstone entries */
.tpl-curator .cv-entry { margin-bottom: calc(var(--cv-gap) * 0.95); }
.tpl-curator .cv-entry-main { font-style: italic; font-weight: 600; font-size: 1.08em; }
.tpl-curator .cv-dates {
  font-size: 0.72em; text-transform: uppercase;
  letter-spacing: 0.18em; color: var(--cv-muted);
}
.tpl-curator .cv-entry-sub {
  margin-top: 0.35em; gap: 1.5em;
  font-size: 0.72em; text-transform: uppercase;
  letter-spacing: 0.17em; color: var(--cv-muted);
}
.tpl-curator .cv-entry-sub .cv-org { font-style: normal; }
.tpl-curator .cv-desc { margin-top: 0.55em; }
.tpl-curator .cv-desc p { line-height: 1.55; }
.tpl-curator .cv-bullets { list-style: square; padding-inline-start: 1.2em; }
.tpl-curator .cv-bullets li { margin-bottom: 0.3em; }
.tpl-curator .cv-bullets li::marker { color: var(--cv-accent); }
.tpl-curator .cv-sec-summary .cv-desc p { font-size: 1.05em; line-height: 1.6; }

/* hairline gauges */
.tpl-curator .cv-skills { gap: 0.8em 2.2em; }
.tpl-curator .cv-skill-name { font-size: 0.92em; }
.tpl-curator .cv-bar {
  height: 2px; border-radius: 0;
  background: color-mix(in srgb, var(--cv-ink) 30%, transparent);
}
.tpl-curator .cv-bar i { border-radius: 0; background: var(--cu-deep); }

.tpl-curator .cv-langs { gap: 0.45em; }
.tpl-curator .cv-lang-level {
  font-size: 0.72em; text-transform: uppercase;
  letter-spacing: 0.17em; color: var(--cv-muted);
}

/* --- Mosaic --- */
/* --- Mosaic: soft tinted heading chips, warm and organized --- */

.tpl-mosaic {
  --cv-bg: #fffdf8;
  --cv-ink: #2c2823;
  --cv-muted: #5d5548;
  --cv-line: #e7e0d2;
  --tile: var(--cv-accent);
}

/* masthead: one soft rounded card */
.tpl-mosaic .cv-head {
  background: color-mix(in srgb, var(--cv-accent) 15%, white);
  border-radius: 18px;
  padding: 1.35em 1.5em;
  margin-bottom: 1em;
}
.tpl-mosaic .cv-name { font-size: 2.25em; }
.tpl-mosaic .cv-title {
  color: color-mix(in srgb, var(--cv-accent) 72%, black);
  font-weight: 600;
}
.tpl-mosaic .cv-photo img {
  width: 92px; height: 92px;
  border-radius: 16px;
  border: 3px solid #ffffff;
}
/* signature strip of mosaic tiles under the title */
.tpl-mosaic .cv-headtext::after {
  content: ""; display: block;
  width: 0.7em; height: 0.7em; border-radius: 0.22em;
  margin-top: 0.9em;
  background: var(--cv-accent);
  box-shadow:
    0.95em 0 0 color-mix(in srgb, var(--cv-accent) 35%, #d9a616),
    1.9em 0 0 color-mix(in srgb, var(--cv-accent) 35%, #cf5b28),
    2.85em 0 0 color-mix(in srgb, var(--cv-accent) 35%, #2e7fb0),
    3.8em 0 0 color-mix(in srgb, var(--cv-accent) 35%, #b8465f);
}
[dir="rtl"] .tpl-mosaic .cv-headtext::after {
  box-shadow:
    -0.95em 0 0 color-mix(in srgb, var(--cv-accent) 35%, #d9a616),
    -1.9em 0 0 color-mix(in srgb, var(--cv-accent) 35%, #cf5b28),
    -2.85em 0 0 color-mix(in srgb, var(--cv-accent) 35%, #2e7fb0),
    -3.8em 0 0 color-mix(in srgb, var(--cv-accent) 35%, #b8465f);
}

/* contact: a row of small pills */
.tpl-mosaic .cv-contact {
  border-bottom: none;
  padding-bottom: 0; margin-bottom: 1.5em;
  gap: 0.45em; font-size: 0.9em;
}
.tpl-mosaic .cv-c {
  background: color-mix(in srgb, var(--cv-accent) 6%, white);
  border: 1px solid color-mix(in srgb, var(--cv-accent) 30%, white);
  border-radius: 999px;
  padding: 0.3em 0.9em;
}

/* each section gets its own accent-derived tile hue */
.tpl-mosaic .cv-sec-experience { --tile: color-mix(in srgb, var(--cv-accent) 35%, #cf5b28); }
.tpl-mosaic .cv-sec-education { --tile: color-mix(in srgb, var(--cv-accent) 35%, #d9a616); }
.tpl-mosaic .cv-sec-skills { --tile: color-mix(in srgb, var(--cv-accent) 35%, #2e7fb0); }
.tpl-mosaic .cv-sec-languages { --tile: color-mix(in srgb, var(--cv-accent) 35%, #b8465f); }
.tpl-mosaic .cv-sec-projects { --tile: color-mix(in srgb, var(--cv-accent) 35%, #0e8a7d); }
.tpl-mosaic .cv-sec-certs,
.tpl-mosaic .cv-sec-custom { --tile: color-mix(in srgb, var(--cv-accent) 35%, #7f57c2); }

/* heading chips */
.tpl-mosaic .cv-h {
  display: inline-flex; align-items: center; gap: 0.55em;
  font-size: 0.8em; letter-spacing: 0.13em;
  background: color-mix(in srgb, var(--tile) 26%, white);
  color: color-mix(in srgb, var(--tile) 65%, black);
  padding: 0.5em 1.05em;
  border-radius: 999px;
  margin-bottom: 0.75em;
}
.tpl-mosaic .cv-h::before {
  content: ""; flex: none;
  width: 0.62em; height: 0.62em;
  border-radius: 0.22em;
  background: var(--tile);
}

/* content picks up its section hue in small doses */
.tpl-mosaic .cv-dates { color: color-mix(in srgb, var(--tile) 55%, black); }
.tpl-mosaic .cv-bullets li::marker { color: color-mix(in srgb, var(--tile) 85%, black); }
.tpl-mosaic .cv-bar { background: color-mix(in srgb, var(--tile) 22%, white); }
.tpl-mosaic .cv-bar i { background: var(--tile); }

/* --- Aurora --- */
/* --- Aurora: first light. A pastel dawn sky mixed from the accent
   crowns the page; below, a calm column with fading rules. --- */

.tpl-aurora {
  --cv-ink: #292432;
  --cv-muted: #5b5468;
  --cv-line: #e5e1ea;
  --au-deep: color-mix(in srgb, var(--cv-accent) 66%, black);
  --au-dawn: color-mix(in srgb, var(--cv-accent) 14%, #ffe3cb);
  --au-rose: color-mix(in srgb, var(--cv-accent) 24%, #ffd9e4);
  --au-sky: color-mix(in srgb, var(--cv-accent) 46%, white);
  --au-hi: color-mix(in srgb, var(--cv-accent) 30%, white);
  --au-lo: color-mix(in srgb, var(--cv-accent) 9%, white);
  padding-top: 0;
}

/* masthead: edge-to-edge dawn sky on a rounded horizon */
.tpl-aurora .cv-head {
  margin: 0 calc(-1 * var(--cv-pad)) 1.1em;
  padding: 2.8em var(--cv-pad) 2.5em;
  border-radius: 0 0 34px 34px;
  box-shadow: 0 14px 26px -18px color-mix(in srgb, var(--cv-accent) 50%, transparent);
  background:
    radial-gradient(130% 95% at 16% 122%, var(--au-dawn), transparent 58%),
    radial-gradient(80% 120% at 58% -35%, var(--au-rose), transparent 60%),
    radial-gradient(110% 140% at 94% -35%, var(--au-sky), transparent 64%),
    linear-gradient(170deg, var(--au-hi), var(--au-lo));
}
[dir="rtl"] .tpl-aurora .cv-head {
  background:
    radial-gradient(130% 95% at 84% 122%, var(--au-dawn), transparent 58%),
    radial-gradient(80% 120% at 42% -35%, var(--au-rose), transparent 60%),
    radial-gradient(110% 140% at 6% -35%, var(--au-sky), transparent 64%),
    linear-gradient(190deg, var(--au-hi), var(--au-lo));
}
.tpl-aurora .cv-name { font-size: 2.45em; letter-spacing: -0.01em; }
.tpl-aurora .cv-title { color: var(--au-deep); font-weight: 600; margin-top: 0.35em; }

/* portrait: squircle ringed in morning white */
.tpl-aurora .cv-photo img {
  width: 92px; height: 92px;
  border-radius: 30%;
  border: 3px solid rgba(255,255,255,0.92);
  box-shadow: 0 8px 20px color-mix(in srgb, var(--cv-accent) 28%, transparent);
}

/* contact: quiet line, round accent stops */
.tpl-aurora .cv-contact {
  border-bottom: none;
  padding-bottom: 0; margin-bottom: 1.7em;
  gap: 0.3em 0.75em;
}
.tpl-aurora .cv-c + .cv-c::before {
  content: ""; display: inline-block;
  width: 0.32em; height: 0.32em; border-radius: 50%;
  background: color-mix(in srgb, var(--cv-accent) 60%, white);
  margin-inline-end: 0.75em;
  vertical-align: 0.14em;
}

/* headings: caps over a rule fading like early light */
.tpl-aurora .cv-h {
  position: relative;
  color: var(--au-deep);
  font-size: 0.86em; letter-spacing: 0.16em;
  padding-bottom: 0.5em; margin-bottom: 0.7em;
}
.tpl-aurora .cv-h::after {
  content: ""; position: absolute; inset-inline-start: 0; bottom: 0;
  width: 100%; height: 3px; border-radius: 2px;
  background: linear-gradient(to right, var(--cv-accent), color-mix(in srgb, var(--cv-accent) 24%, white) 45%, transparent 88%);
}
[dir="rtl"] .tpl-aurora .cv-h::after {
  background: linear-gradient(to left, var(--cv-accent), color-mix(in srgb, var(--cv-accent) 24%, white) 45%, transparent 88%);
}

/* entries: gentle hierarchy, no hard boxes */
.tpl-aurora .cv-dates { color: var(--au-deep); font-weight: 600; font-size: 0.85em; font-variant-numeric: tabular-nums; }
.tpl-aurora .cv-entry-sub .cv-org { font-style: normal; font-weight: 600; }
.tpl-aurora .cv-bullets li::marker { color: var(--cv-accent); }

/* meters: rounded, filled dawn-to-accent */
.tpl-aurora .cv-bar { height: 6px; background: color-mix(in srgb, var(--cv-accent) 18%, white); }
.tpl-aurora .cv-bar i { background: linear-gradient(to right, color-mix(in srgb, var(--cv-accent) 52%, #ff9e6e), var(--cv-accent)); }
[dir="rtl"] .tpl-aurora .cv-bar i { background: linear-gradient(to left, color-mix(in srgb, var(--cv-accent) 52%, #ff9e6e), var(--cv-accent)); }

/* --- Verse --- */
/* --- Verse: editorial poetry. The whole text block sits on a
   deep hanging indent; section headings hang back in the start
   margin as right-aligned lowercase italics, like marginalia in
   a book of verse. Asterisk footnote bullets, italic dates, a
   quiet ivory page. No grids, no heavy rules; whitespace only. --- */

.tpl-verse {
  --cv-bg: #fcfaf4;
  --cv-ink: #262119;
  --cv-muted: #615a4c;
  --cv-line: #e1dac9;
  --v-m: calc(var(--cv-fs) * 11); /* hanging margin, px so it matches everywhere */
}

/* masthead: the name alone breaks the indent, like a poem title */
.tpl-verse .cv-head { display: block; margin-bottom: 1.15em; }
.tpl-verse .cv-name { font-size: 2.85em; font-weight: 400; line-height: 1.06; letter-spacing: -0.01em; }
.tpl-verse .cv-title {
  font-style: italic; font-size: 1.12em;
  color: var(--cv-accent);
  margin-top: 0.45em; padding-inline-start: var(--v-m);
}

/* colophon line of contact details, ruled only over the text column */
.tpl-verse .cv-contact {
  margin-inline-start: var(--v-m); margin-bottom: 1.7em;
  border-block: 1px solid var(--cv-line);
  padding: 0.5em 0; gap: 0.3em 1.3em;
  font-size: 0.9em;
}

/* the hanging indent: content indented, headings out in the margin */
.tpl-verse .cv-sec {
  position: relative;
  padding-inline-start: var(--v-m);
  min-height: 2.2em;
  margin-bottom: calc(var(--cv-gap) * 1.25);
}
.tpl-verse .cv-h {
  position: absolute; inset-inline-start: 0; top: 0.05em;
  width: calc(var(--v-m) - var(--cv-fs) * 1.6);
  text-align: end;
  font-style: italic; font-weight: 400; text-transform: lowercase;
  font-size: 1.06em; letter-spacing: 0.01em; line-height: 1.3;
  color: var(--cv-accent); margin-bottom: 0;
}
.tpl-verse .cv-h::after {
  content: ""; display: block;
  width: 1.6em; height: 1px;
  margin-block-start: 0.42em; margin-inline-start: auto;
  background: color-mix(in srgb, var(--cv-accent) 60%, transparent);
}

/* body detailing */
.tpl-verse .cv-sec-summary .cv-desc p { font-size: 1.05em; line-height: 1.55; }
.tpl-verse .cv-dates { font-style: italic; }
.tpl-verse .cv-langs { flex-direction: row; flex-wrap: wrap; gap: 0.35em 2.4em; }
.tpl-verse .cv-lang { justify-content: flex-start; gap: 0.55em; }
.tpl-verse .cv-lang-level { font-style: italic; }
.tpl-verse .cv-bullets { list-style: none; padding-inline-start: 1.1em; }
.tpl-verse .cv-bullets li { position: relative; }
.tpl-verse .cv-bullets li::before {
  content: "*"; position: absolute;
  inset-inline-start: -1.1em; top: 0.12em;
  color: var(--cv-accent);
}

/* meters: hairline rules, not gauges */
.tpl-verse .cv-bar { height: 2px; border-radius: 0; background: color-mix(in srgb, var(--cv-accent) 28%, var(--cv-bg)); }
.tpl-verse .cv-bar i { border-radius: 0; }

/* --- Collage --- */
/* --- Collage: paper scraps. Two slightly rotated accent-tinted
   blocks layered behind the header, a taped snapshot photo, and
   section headings as glued-on cut-out labels. Playful, tidy. --- */

.tpl-collage {
  --cv-bg: #fdfbf6;
  --cv-ink: #26221c;
  --cv-muted: #5f574a;
  --cv-line: #e3dccb;
  --cg-deep: color-mix(in srgb, var(--cv-accent) 58%, black);
  --cg-tint: color-mix(in srgb, var(--cv-accent) 20%, white);
  --cg-flip: 1;
  position: relative;
}
[dir="rtl"] .tpl-collage { --cg-flip: -1; }

/* header: text pasted over two overlapping paper scraps */
.tpl-collage .cv-head {
  position: relative; z-index: 0;
  padding: 1.5em 1.7em 1.3em;
  margin: 0.4em 0.3em 1.1em;
}
.tpl-collage .cv-head::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--cg-tint);
  transform: rotate(calc(var(--cg-flip) * -1.1deg));
  box-shadow: 0 2px 7px rgba(40, 32, 12, 0.14);
}
.tpl-collage .cv-head::after {
  content: ""; position: absolute; z-index: -2;
  top: -0.8em; inset-inline-end: -1em;
  width: 46%; height: 92%;
  background: color-mix(in srgb, var(--cv-accent) 55%, white);
  transform: rotate(calc(var(--cg-flip) * 2.6deg));
  box-shadow: 0 2px 6px rgba(40, 32, 12, 0.12);
}
.tpl-collage .cv-name { font-size: 2.45em; }
.tpl-collage .cv-title { color: var(--cg-deep); font-weight: 700; letter-spacing: 0.02em; }

/* the photo: a white-bordered snapshot, tilted and taped down */
.tpl-collage .cv-photo { position: relative; }
.tpl-collage .cv-photo img {
  width: 96px; height: 96px; border-radius: 2px;
  border: 5px solid #ffffff;
  box-shadow: 0 3px 8px rgba(40, 32, 12, 0.22);
  transform: rotate(calc(var(--cg-flip) * -2.4deg));
}
.tpl-collage .cv-photo::after {
  content: ""; position: absolute; z-index: 1;
  top: -7px; inset-inline-start: 26px;
  width: 48px; height: 15px;
  background: color-mix(in srgb, var(--cv-accent) 48%, white);
  opacity: 0.8;
  transform: rotate(calc(var(--cg-flip) * -5deg));
  box-shadow: 0 1px 2px rgba(40, 32, 12, 0.12);
}

.tpl-collage .cv-contact {
  margin: 0 0.4em 1.2em;
  border-bottom: 1px dashed color-mix(in srgb, var(--cv-accent) 45%, var(--cv-line));
}

/* headings: little cut-out labels, glued at alternating tilts */
.tpl-collage .cv-h {
  display: inline-block;
  padding: 0.22em 0.7em;
  background: var(--cg-tint);
  color: var(--cg-deep);
  font-size: 0.92em; letter-spacing: 0.12em;
  border-radius: 1px;
  box-shadow: 0 1px 3px rgba(40, 32, 12, 0.13);
  transform: rotate(calc(var(--cg-flip) * -0.9deg));
  margin-bottom: 0.7em;
}
.tpl-collage .cv-sec:nth-of-type(even) .cv-h {
  transform: rotate(calc(var(--cg-flip) * 0.9deg));
}
.tpl-collage .cv-sec { padding-inline: 0.4em; }

.tpl-collage .cv-entry-main { color: var(--cv-ink); }
.tpl-collage .cv-dates {
  font-size: 0.82em; font-weight: 700; color: var(--cg-deep);
  letter-spacing: 0.04em;
}

/* square-cut bars, like strips of paper */
.tpl-collage .cv-bar, .tpl-collage .cv-bar i { border-radius: 0; }
.tpl-collage .cv-bar {
  height: 7px;
  background: color-mix(in srgb, var(--cv-accent) 22%, white);
}

/* --- Air --- */
/* --- Air: the quietest CV in the room. No rules, no boxes;
   structure is whitespace alone. Very wide margins, a light
   name under one small accent breath mark, micro letterspaced
   caps headings, the summary running as an unlabeled lede,
   hairline tick bullets and 2px gauges. Maximum calm. --- */

.tpl-air {
  --cv-bg: #fffefb;
  --cv-ink: #23201b;
  --cv-muted: #6e675c;
  --cv-line: #eae6de;
  --air-deep: color-mix(in srgb, var(--cv-accent) 52%, var(--cv-ink));
  padding: calc(var(--cv-pad) + 2.6em) calc(var(--cv-pad) + 3.4em) calc(var(--cv-pad) + 1.2em);
  line-height: 1.6;
}

/* head: light name, one small accent mark breathing above it */
.tpl-air .cv-head { margin-bottom: 1.5em; }
.tpl-air .cv-name { font-weight: 400; font-size: 2.15em; letter-spacing: 0.015em; }
.tpl-air .cv-name::before {
  content: ""; display: block;
  width: 1.3em; height: 2px;
  background: var(--cv-accent);
  margin-bottom: 0.7em;
}
.tpl-air .cv-title {
  text-transform: uppercase; font-size: 0.7em;
  letter-spacing: 0.38em; color: var(--air-deep);
  margin-top: 0.95em;
}

/* contact: a whisper line, no rule beneath */
.tpl-air .cv-contact {
  border-bottom: none; padding-bottom: 0; margin-bottom: 3.2em;
  font-size: 0.8em; letter-spacing: 0.03em; gap: 0.5em 2em;
}

/* sections: separated by space alone; micro caps headings */
.tpl-air .cv-sec { margin-bottom: calc(var(--cv-gap) * 1.85); }
.tpl-air .cv-h {
  font-size: 0.64em; font-weight: 600;
  letter-spacing: 0.44em; color: var(--cv-muted);
  margin-bottom: 1.9em;
}

/* summary becomes an unlabeled lede paragraph */
.tpl-air .cv-sec-summary .cv-h { display: none; }
.tpl-air .cv-sec-summary .cv-desc p { font-size: 1.05em; line-height: 1.75; max-inline-size: 34em; }

/* entries: hierarchy from weight and space only */
.tpl-air .cv-entry { margin-bottom: calc(var(--cv-gap) * 1.05); }
.tpl-air .cv-entry-main { font-weight: 600; }
.tpl-air .cv-dates { font-size: 0.76em; letter-spacing: 0.06em; }
.tpl-air .cv-entry-sub { font-size: 0.92em; margin-top: 0.12em; }
.tpl-air .cv-entry-sub .cv-org { font-style: normal; }
.tpl-air .cv-desc { margin-top: 0.45em; }

/* bullets: tiny hairline ticks instead of discs */
.tpl-air .cv-bullets { padding-inline-start: 0; }
.tpl-air .cv-bullets li { list-style: none; position: relative; padding-inline-start: 1.2em; margin-bottom: 0.3em; }
.tpl-air .cv-bullets li::before {
  content: ""; position: absolute;
  inset-inline-start: 0; top: 0.78em;
  width: 0.5em; height: 1px;
  background: var(--air-deep);
}

/* skills: short quiet gauges trailing each name, whitespace keeps the row */
.tpl-air .cv-skills { gap: 0.65em 2.2em; }
.tpl-air .cv-skill-name { font-size: 0.92em; }
.tpl-air .cv-bar {
  flex: 0 0 4.6em; min-width: 0; height: 2px; border-radius: 0;
  background: color-mix(in srgb, var(--cv-ink) 16%, transparent);
}
.tpl-air .cv-bar i { border-radius: 0; background: var(--air-deep); }

/* languages */
.tpl-air .cv-langs { gap: 0.45em; }
.tpl-air .cv-lang-level { font-size: 0.85em; letter-spacing: 0.03em; }

/* --- Spine --- */
/* --- Spine: one continuous hairline down the start edge, a node
   at every section; everything else is bare typography. --- */

.tpl-spine {
  position: relative;
  --cv-line: #e6e1d6;
  padding-inline-start: calc(var(--cv-pad) + 26px);
}
/* the spine itself: full page height, hairline */
.tpl-spine::before {
  content: ""; position: absolute; top: 0; bottom: 0;
  inset-inline-start: var(--cv-pad);
  width: 1px;
  background: color-mix(in srgb, var(--cv-accent) 55%, transparent);
}

/* head: quiet type, an open ring where the spine begins */
.tpl-spine .cv-head { position: relative; margin-bottom: 0.45em; }
.tpl-spine .cv-head::before {
  content: ""; position: absolute;
  inset-inline-start: -31px; top: 0.9em;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--cv-bg);
  border: 2px solid var(--cv-accent);
}
.tpl-spine .cv-name { font-weight: 400; font-size: 2.3em; letter-spacing: 0.01em; }
.tpl-spine .cv-title { color: var(--cv-muted); }

.tpl-spine .cv-contact {
  border-bottom: none; padding-bottom: 0;
  margin-bottom: 1.5em; font-size: 0.9em;
  gap: 0.3em 0.55em;
}
.tpl-spine .cv-c + .cv-c::before {
  content: "\00b7"; margin-inline-end: 0.55em;
  color: color-mix(in srgb, var(--cv-muted) 55%, transparent);
}

/* sections: a solid node on the spine at each heading */
.tpl-spine .cv-sec { margin-bottom: calc(var(--cv-gap) * 1.15); }
.tpl-spine .cv-h {
  position: relative;
  font-size: 0.78em; font-weight: 600; letter-spacing: 0.24em;
  margin-bottom: 0.75em;
}
.tpl-spine .cv-h::before {
  content: ""; position: absolute;
  inset-inline-start: -30px; top: 0.26em;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--cv-accent);
}

.tpl-spine .cv-entry-main { font-weight: 600; }
.tpl-spine .cv-dates { letter-spacing: 0.02em; }

/* thin, square skill bars keep the hairline language */
.tpl-spine .cv-bar {
  height: 2px; border-radius: 0;
  background: color-mix(in srgb, var(--cv-accent) 18%, transparent);
}
.tpl-spine .cv-bar i { border-radius: 0; }

/* --- Typo --- */
/* --- Typo: hierarchy from scale, weight and letterspacing alone ---
   No rules, no boxes, no bars. A poster-size masthead, micro-tracked
   section labels, interpunct-separated metadata, and a large lede in
   place of a labeled profile. Accent: the title line + list markers. */

.tpl-typo .cv-head { margin-bottom: 1.5em; }
.tpl-typo .cv-name {
  font-size: 3.6em; line-height: 1.02;
  letter-spacing: -0.025em; text-transform: uppercase;
}
.tpl-typo .cv-title {
  text-transform: uppercase; font-size: 0.8em;
  letter-spacing: 0.42em; font-weight: 700; margin-top: 0.9em;
}
.tpl-typo .cv-contact {
  border-bottom: none; padding-bottom: 0; margin-bottom: 2.2em;
  gap: 0.3em 0.7em; font-size: 0.88em; letter-spacing: 0.02em;
}
.tpl-typo .cv-c + .cv-c::before { content: "\00B7"; margin-inline-end: 0.7em; }

.tpl-typo .cv-sec { margin-bottom: calc(var(--cv-gap) * 1.35); }
.tpl-typo .cv-h {
  color: var(--cv-ink); font-size: 0.72em;
  letter-spacing: 0.38em; margin-bottom: 1.1em;
}
.tpl-typo .cv-sec-summary .cv-h { display: none; }
.tpl-typo .cv-sec-summary .cv-desc p {
  font-size: 1.18em; line-height: 1.5; max-width: 36em;
}

.tpl-typo .cv-entry { margin-bottom: calc(var(--cv-gap) * 0.85); }
.tpl-typo .cv-dates {
  text-transform: uppercase; font-size: 0.78em;
  letter-spacing: 0.09em; font-variant-numeric: tabular-nums;
}
.tpl-typo .cv-bullets { padding-inline-start: 1.05em; }
.tpl-typo .cv-bullets li::marker { color: var(--cv-accent); }

.tpl-typo .cv-bar { display: none; }
.tpl-typo .cv-skills { gap: 0.35em 0.7em; }
.tpl-typo .cv-skill { min-width: 0; flex: 0 0 auto; gap: 0.7em; font-weight: 600; }
.tpl-typo .cv-skill + .cv-skill::before {
  content: "\00B7"; color: var(--cv-muted); font-weight: 400;
}
.tpl-typo .cv-langs { flex-direction: row; flex-wrap: wrap; gap: 0.35em 0.7em; }
.tpl-typo .cv-lang { justify-content: flex-start; gap: 0.6em; }
.tpl-typo .cv-lang + .cv-lang::before {
  content: "\00B7"; color: var(--cv-muted);
}

/* --- Quiet --- */
/* --- Quiet: monochrome restraint. The whole page lives in
   neutral grays; the accent is spent exactly once, on the name.
   One solid hairline closes the head, dotted gray leaders
   whisper between role and date, and everything else is
   whitespace and small tracked caps. --- */

.tpl-quiet {
  --cv-ink: #2e2e2e;
  --cv-muted: #6c6c6c;
  --cv-line: #dfdfdf;
  --cv-bg: #ffffff;
  --q-dot: #bdbdbd;
  padding: calc(var(--cv-pad) + 16px) calc(var(--cv-pad) + 20px);
  line-height: 1.55;
}

/* head: the page's single note of color */
.tpl-quiet .cv-head { margin-bottom: 1.15em; }
.tpl-quiet .cv-name {
  font-weight: 400; font-size: 2.6em;
  letter-spacing: 0; color: var(--cv-accent);
}
.tpl-quiet .cv-name::after { content: "."; }
/* the closing dot misplaces beside Latin names in RTL; drop it there */
[dir="rtl"] .tpl-quiet .cv-name::after { content: ""; }
.tpl-quiet .cv-title {
  color: var(--cv-muted); text-transform: uppercase;
  font-size: 0.74em; letter-spacing: 0.32em; margin-top: 0.75em;
}

.tpl-quiet .cv-contact {
  color: var(--cv-muted); font-size: 0.88em; gap: 0.3em 1.35em;
  padding-bottom: 1.1em; margin-bottom: 1.6em;
  border-bottom: 1px solid var(--cv-line);
}

/* sections: tiny gray caps, no rules, generous air */
.tpl-quiet .cv-sec { margin-bottom: calc(var(--cv-gap) * 1.3); }
.tpl-quiet .cv-h {
  color: var(--cv-muted); font-weight: 400;
  font-size: 0.74em; letter-spacing: 0.32em; margin-bottom: 0.85em;
}

/* entries: dotted leader from role to date */
.tpl-quiet .cv-entry { margin-bottom: calc(var(--cv-gap) * 0.85); }
.tpl-quiet .cv-entry-head { gap: 0.8em; }
.tpl-quiet .cv-entry-head::before {
  content: ""; order: 2; flex: 1 1 2em;
  border-bottom: 1px dotted var(--q-dot);
}
.tpl-quiet .cv-dates { order: 3; color: var(--cv-muted); }
.tpl-quiet .cv-entry-main { font-weight: 600; }
.tpl-quiet .cv-entry-sub { font-size: 0.92em; }
.tpl-quiet .cv-entry-sub .cv-org { font-style: normal; }
.tpl-quiet .cv-desc { margin-top: 0.4em; }
.tpl-quiet .cv-bullets { padding-inline-start: 1.05em; }
.tpl-quiet .cv-bullets li::marker { color: #9a9a9a; }

/* skills: slim gray gauges, no color */
.tpl-quiet .cv-bar { height: 2px; border-radius: 0; background: #e7e7e7; }
.tpl-quiet .cv-bar i { border-radius: 0; background: #7f7f7f; }

/* languages: the same dotted leaders */
.tpl-quiet .cv-lang { align-items: baseline; gap: 0.8em; }
.tpl-quiet .cv-lang::before {
  content: ""; order: 2; flex: 1 1 2em;
  border-bottom: 1px dotted var(--q-dot);
}
.tpl-quiet .cv-lang-level { order: 3; }

/* --- Split --- */
/* --- Split: the header divides into a name half and a contact
   half around a central accent spine, with a quiet accent tint
   bleeding full-width behind both. The body stays single column;
   each section rule restates the split: accent segment, hairline. --- */

.tpl-split {
  --cv-ink: #1f2429;
  --cv-muted: #525c65;
  --cv-line: #d7dce1;
  --split-tint: color-mix(in srgb, var(--cv-accent) 8%, white);
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-content: start;
  padding-top: 0;
}
.tpl-split .cv-sec { grid-column: 1 / -1; min-width: 0; }

/* name half: set flush against the central spine */
.tpl-split .cv-head {
  grid-row: 1; grid-column: 1;
  display: flex; flex-direction: column; justify-content: center;
  align-items: stretch;
  text-align: end;
  background: var(--split-tint);
  margin: 0 0 1.7em;
  margin-inline-start: calc(-1 * var(--cv-pad));
  padding-block: 2.4em 2.1em;
  padding-inline: var(--cv-pad) 1.7em;
}
.tpl-split .cv-name { font-size: 2.5em; line-height: 1.08; letter-spacing: -0.01em; }
.tpl-split .cv-title {
  color: color-mix(in srgb, var(--cv-accent) 72%, black);
  text-transform: uppercase; letter-spacing: 0.18em;
  font-size: 0.8em; font-weight: 600; margin-top: 0.6em;
}

/* contact half: stacked on the far side of the spine */
.tpl-split .cv-contact {
  grid-row: 1; grid-column: 2;
  display: flex; flex-direction: column; justify-content: center;
  gap: 0.5em;
  background: var(--split-tint);
  border-bottom: none;
  border-inline-start: 4px solid var(--cv-accent);
  margin: 0 0 1.7em;
  margin-inline-end: calc(-1 * var(--cv-pad));
  padding-block: 2.4em 2.1em;
  padding-inline: 1.7em var(--cv-pad);
  font-size: 0.9em;
}

/* if no contact was entered, the name half takes the full width */
.tpl-split .cv-head:not(:has(+ .cv-contact)) {
  grid-column: 1 / -1;
  margin-inline-end: calc(-1 * var(--cv-pad));
  padding-inline-end: var(--cv-pad);
  text-align: center;
}

/* section rule: an accent segment, then a hairline */
.tpl-split .cv-h {
  display: flex; align-items: center; gap: 0.75em;
  color: var(--cv-ink); font-size: 0.92em; letter-spacing: 0.15em;
}
.tpl-split .cv-h::after {
  content: ""; flex: 1; height: 2px;
  background: linear-gradient(to right, var(--cv-accent) 0 2.6em, var(--cv-line) 2.6em);
}
[dir="rtl"] .tpl-split .cv-h::after {
  background: linear-gradient(to left, var(--cv-accent) 0 2.6em, var(--cv-line) 2.6em);
}

.tpl-split .cv-dates { font-variant-numeric: tabular-nums; }

/* --- Rail --- */
/* --- Rail: transit-style scanning. A slim accent rail along the
   top edge, a full-height hairline track carrying a narrow right
   rail (contact, skills, languages split by hairlines), square
   station markers on headings and tabular pill dates. --- */

.tpl-rail {
  --cv-ink: #1d2129;
  --cv-muted: #545e6e;
  --cv-line: #d9dde3;
  --rail-deep: color-mix(in srgb, var(--cv-accent) 62%, black);
  --rail-sans: -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  border-top: 6px solid var(--cv-accent);
  display: flex; flex-direction: column;
}

/* masthead: modern sans, tracked caps title, hairline base */
.tpl-rail .cv-name, .tpl-rail .cv-title, .tpl-rail .cv-h,
.tpl-rail .cv-dates, .tpl-rail .cv-contact,
.tpl-rail .cv-lang-level { font-family: var(--rail-sans); }
.tpl-rail .cv-name { font-size: 2.45em; font-weight: 800; letter-spacing: -0.02em; }
.tpl-rail .cv-title {
  font-size: 0.8em; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.24em;
  color: var(--rail-deep); margin-top: 0.55em;
}
.tpl-rail .cv-head {
  border-bottom: 1px solid var(--cv-line);
  padding-bottom: 1.1em; margin-bottom: 1.35em;
}

/* headings: letterspaced caps behind a square station marker */
.tpl-rail .cv-h {
  display: flex; align-items: center; gap: 0.65em;
  font-size: 0.8em; letter-spacing: 0.2em;
  color: var(--cv-ink); margin-bottom: 0.75em;
}
.tpl-rail .cv-h::before {
  content: ""; flex: none; width: 0.62em; height: 0.62em;
  background: var(--cv-accent);
}

/* entries: pill dates on a tabular track */
.tpl-rail .cv-dates {
  font-size: 0.76em; font-weight: 600; letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--rail-deep);
  background: color-mix(in srgb, var(--cv-accent) 9%, white);
  padding: 0.2em 0.7em; border-radius: 2px;
}
.tpl-rail .cv-entry-sub .cv-org { font-style: normal; font-weight: 600; }
.tpl-rail .cv-bullets { list-style: square; }
.tpl-rail .cv-bullets li::marker { color: var(--cv-accent); }

/* the rail: narrow end column on a full-height hairline track */
.tpl-rail .cv-cols { flex: 1; }
.tpl-rail .cv-cols--right { grid-template-columns: 1fr 26%; gap: 0 1.9em; }
.tpl-rail .cv-sidezone {
  align-self: stretch;
  border-inline-start: 1px solid var(--cv-line);
  padding-inline-start: 1.6em;
  font-size: 0.92em;
}
.tpl-rail .cv-sidezone .cv-contact {
  border-bottom: none; padding-bottom: 0; margin-bottom: 1.15em;
  gap: 0.55em; overflow-wrap: anywhere;
}
.tpl-rail .cv-sidezone .cv-sec {
  border-top: 1px solid var(--cv-line);
  padding-top: 1.05em; margin-bottom: 1.15em;
}
.tpl-rail .cv-sidezone .cv-h { font-size: 0.76em; }

/* meters: flat squared rails, stacked for aligned scanning */
.tpl-rail .cv-bar, .tpl-rail .cv-bar i { border-radius: 0; }
.tpl-rail .cv-bar { height: 4px; background: color-mix(in srgb, var(--cv-accent) 20%, white); }
.tpl-rail .cv-sidezone .cv-skill { display: block; }
.tpl-rail .cv-sidezone .cv-skill .cv-bar { display: block; margin-top: 0.3em; }
.tpl-rail .cv-lang { align-items: baseline; }
.tpl-rail .cv-lang-level {
  font-size: 0.72em; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
}

/* --- Cascade --- */
/* --- Cascade: warm layered tints stepping down the page; a
   deeper header band spills into a soft 12% start-side rail. --- */

.tpl-cascade {
  --cv-bg: #fdfcf8;
  --cv-ink: #2b2823;
  --cv-muted: #5e574b;
  --cv-line: #e2dbcd;
  --cas-rail: color-mix(in srgb, var(--cv-accent) 12%, #fdfcf8);
  --cas-band: color-mix(in srgb, var(--cv-accent) 22%, #fdfcf8);
  --cas-step: color-mix(in srgb, var(--cv-accent) 40%, #fdfcf8);
  --cas-deep: color-mix(in srgb, var(--cv-accent) 58%, #2b2823);
  padding: 0;
  display: flex; flex-direction: column;
  background: linear-gradient(to right, var(--cas-rail) 31%, var(--cv-bg) 31%);
}
[dir="rtl"] .tpl-cascade {
  background: linear-gradient(to left, var(--cas-rail) 31%, var(--cv-bg) 31%);
}

/* header: deepest layer, two steps off its lower edge; photo
   centers over the rail, name aligns with the main column */
.tpl-cascade .cv-head {
  margin-bottom: 0;
  padding: calc(var(--cv-pad) * 0.85) var(--cv-pad) 2em;
  background: linear-gradient(to bottom,
    var(--cas-band) calc(100% - 1em),
    var(--cas-step) calc(100% - 1em) calc(100% - 0.5em),
    color-mix(in srgb, var(--cv-accent) 56%, var(--cv-bg)) calc(100% - 0.5em));
}
.tpl-cascade .cv-head:has(.cv-photo) { padding-inline-start: 0; gap: 0; }
.tpl-cascade .cv-photo { flex: 0 0 31%; display: flex; justify-content: center; }
.tpl-cascade .cv-head:has(.cv-photo) .cv-headtext { padding-inline-start: 2.1em; }
.tpl-cascade .cv-name { font-size: 2.35em; }
.tpl-cascade .cv-title { color: var(--cas-deep); font-weight: 600; margin-top: 0.3em; }
.tpl-cascade .cv-photo img {
  border: 3px solid var(--cv-bg);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--cv-accent) 45%, transparent);
}

/* columns sit flush on the painted rail */
.tpl-cascade .cv-cols { flex: 1; gap: 0; }
.tpl-cascade .cv-mainzone {
  padding-block: 1.7em var(--cv-pad);
  padding-inline: 2.1em var(--cv-pad);
  min-width: 0;
}
.tpl-cascade .cv-sidezone {
  padding-block: 1.7em var(--cv-pad);
  padding-inline: 2.1em 1.5em;
  min-width: 0;
}

/* heading tabs: soft pills with one settled corner */
.tpl-cascade .cv-h {
  display: inline-block;
  font-size: 0.84em; letter-spacing: 0.13em;
  color: var(--cas-deep);
  background: color-mix(in srgb, var(--cv-accent) 13%, var(--cv-bg));
  padding: 0.35em 1em;
  border-radius: 999px;
  border-end-start-radius: 5px;
  margin-bottom: 0.8em;
}
.tpl-cascade .cv-sidezone .cv-h {
  background: var(--cv-bg);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--cv-accent) 30%, transparent);
}

/* summary floats as its own soft layer */
.tpl-cascade .cv-sec-summary {
  background: color-mix(in srgb, var(--cv-accent) 7%, var(--cv-bg));
  border-radius: 12px;
  border-end-start-radius: 4px;
  padding: 1em 1.2em 1.1em;
}
.tpl-cascade .cv-sec-summary .cv-h { background: var(--cv-bg); }

/* rail contact: droplet markers */
.tpl-cascade .cv-sidezone .cv-contact {
  color: var(--cv-ink);
  padding-bottom: 1em; margin-bottom: 1.2em;
  border-bottom: 1px solid color-mix(in srgb, var(--cv-accent) 32%, transparent);
}
.tpl-cascade .cv-c { display: flex; align-items: flex-start; gap: 0.55em; }
.tpl-cascade .cv-c::before {
  content: ""; flex: none;
  width: 0.5em; height: 0.5em;
  margin-block-start: 0.42em;
  background: var(--cv-accent);
  border-radius: 999px;
  border-start-start-radius: 0;
}

/* meters: white tracks read as cut-outs in the tinted rail */
.tpl-cascade .cv-sidezone .cv-bar {
  height: 6px; background: var(--cv-bg);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cv-accent) 22%, transparent);
}
.tpl-cascade .cv-lang-level { color: var(--cv-muted); }

/* --- Tuxedo --- */
/* --- Tuxedo: black tie. An ivory shirt-front masthead sits over a
   near-black dinner-jacket column, joined by a gold satin seam;
   diamond shirt studs pin each heading. --- */

.tpl-tuxedo {
  --cv-ink: #1d1b20;
  --cv-muted: #5f5a50;
  --cv-line: #ddd6c8;
  --tux-coat: #17161b;
  --tux-shirt: #f5f1e6;
  --tux-glint: color-mix(in srgb, var(--cv-accent) 55%, white);
  --tux-deep: color-mix(in srgb, var(--cv-accent) 68%, black);
  position: relative;
  padding: 0;
  display: flex; flex-direction: column;
  background: linear-gradient(to right,
    var(--tux-coat) 0 calc(31% - 3px),
    var(--cv-accent) calc(31% - 3px) 31%,
    var(--cv-bg) 31%);
}
[dir="rtl"] .tpl-tuxedo {
  background: linear-gradient(to left,
    var(--tux-coat) 0 calc(31% - 3px),
    var(--cv-accent) calc(31% - 3px) 31%,
    var(--cv-bg) 31%);
}

/* masthead: the shirt front */
.tpl-tuxedo .cv-head {
  background: var(--cv-bg);
  margin: 0;
  padding: var(--cv-pad) var(--cv-pad) 1.3em;
  border-top: 4px double var(--cv-accent);
  border-bottom: 5px solid var(--tux-coat);
}
.tpl-tuxedo .cv-name { font-weight: 400; font-size: 2.5em; letter-spacing: 0.015em; }
.tpl-tuxedo .cv-title {
  color: var(--tux-deep);
  text-transform: uppercase; letter-spacing: 0.24em;
  font-size: 0.78em; font-weight: 600; margin-top: 0.6em;
}
.tpl-tuxedo .cv-photo img {
  border: 4px solid var(--tux-coat);
  box-shadow: 0 0 0 1px var(--cv-accent);
}

/* headings: diamond stud, tracked caps */
.tpl-tuxedo .cv-h {
  display: flex; align-items: center; gap: 0.7em;
  font-size: 0.86em; letter-spacing: 0.2em;
  margin-bottom: 0.7em;
}
.tpl-tuxedo .cv-h::before {
  content: ""; flex: none; width: 0.5em; height: 0.5em;
  background: var(--cv-accent); transform: rotate(45deg);
}

/* columns: the jacket and the page */
.tpl-tuxedo .cv-cols { flex: 1; gap: 0; }
.tpl-tuxedo .cv-sidezone {
  color: color-mix(in srgb, var(--tux-shirt) 92%, var(--tux-coat));
  padding-block: 1.7em var(--cv-pad);
  padding-inline: 1.7em;
}
.tpl-tuxedo .cv-sidezone .cv-h {
  color: var(--tux-glint);
  border-bottom: 1px solid color-mix(in srgb, var(--cv-accent) 45%, transparent);
  padding-bottom: 0.45em;
}
.tpl-tuxedo .cv-sidezone .cv-h::before { background: var(--tux-glint); }
.tpl-tuxedo .cv-sidezone .cv-contact {
  color: inherit; font-size: 0.9em; gap: 0.55em;
  border-bottom: 1px solid color-mix(in srgb, var(--cv-accent) 45%, transparent);
  padding-bottom: 1.2em; margin-bottom: 1.4em;
}
.tpl-tuxedo .cv-sidezone .cv-bar { background: color-mix(in srgb, var(--tux-shirt) 28%, transparent); }
.tpl-tuxedo .cv-sidezone .cv-bar i { background: var(--tux-glint); }
.tpl-tuxedo .cv-sidezone .cv-lang-level { color: color-mix(in srgb, var(--tux-shirt) 64%, var(--tux-coat)); }

.tpl-tuxedo .cv-mainzone {
  padding-block: 1.7em var(--cv-pad);
  padding-inline: 2em var(--cv-pad);
}
.tpl-tuxedo .cv-mainzone .cv-h { color: var(--cv-ink); }
.tpl-tuxedo .cv-mainzone .cv-h::after { content: ""; flex: 1; height: 1px; background: var(--cv-line); }
.tpl-tuxedo .cv-dates { color: var(--tux-deep); font-weight: 600; font-size: 0.84em; letter-spacing: 0.04em; }
.tpl-tuxedo .cv-bullets li::marker { color: var(--tux-deep); }
.tpl-tuxedo .cv-sec-summary .cv-desc { font-style: italic; }

/* --- Impact --- */
/* --- Impact: poster name on a full-bleed ink plate ---
   The name is knocked out white at enormous scale on a near-black
   masthead sealed by a thick accent bar; everything below runs small,
   tight and precise, with numbered micro-headings and square markers. */

.tpl-impact { --cv-ink: #181510; --cv-muted: #5c5347; --cv-line: #d9d2c5; }
.tpl-impact { font-size: calc(var(--cv-fs) * 0.97); line-height: 1.4; counter-reset: impsec; }

/* masthead plate */
.tpl-impact .cv-head {
  display: block;
  background: var(--cv-ink);
  margin: calc(-1 * var(--cv-pad)) calc(-1 * var(--cv-pad)) 0;
  padding: var(--cv-pad) var(--cv-pad) 1.6em;
  border-bottom: 8px solid var(--cv-accent);
}
.tpl-impact .cv-name {
  font-size: 6em; line-height: 0.96; font-weight: 900;
  text-transform: uppercase; letter-spacing: -0.03em;
  color: #fdfcf8;
}
.tpl-impact .cv-title {
  margin-top: 1em; font-size: 0.82em; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.42em;
  color: color-mix(in srgb, var(--cv-accent) 44%, white);
}

/* contact: one precise uppercase strip */
.tpl-impact .cv-contact {
  border-bottom: 2px solid var(--cv-ink);
  padding: 0.9em 0 0.85em; margin-bottom: 1.7em;
  font-size: 0.84em; font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--cv-ink); gap: 0.5em 1.2em;
}
.tpl-impact .cv-c::before {
  content: ""; display: inline-block;
  width: 0.5em; height: 0.5em;
  background: var(--cv-accent); margin-inline-end: 0.55em;
}

/* numbered micro-headings with a trailing rule */
.tpl-impact .cv-sec { counter-increment: impsec; margin-bottom: calc(var(--cv-gap) * 1.2); }
.tpl-impact .cv-h {
  display: flex; align-items: baseline; gap: 0.8em;
  color: var(--cv-ink); font-size: 0.78em;
  letter-spacing: 0.3em; margin-bottom: 1em;
}
.tpl-impact .cv-h::before {
  content: counter(impsec, decimal-leading-zero);
  color: var(--cv-accent); letter-spacing: 0.04em;
}
.tpl-impact .cv-h::after { content: ""; flex: 1; height: 2px; background: var(--cv-line); align-self: center; }

/* entries: heavy leads, engraved dates */
.tpl-impact .cv-entry-main { font-weight: 800; }
.tpl-impact .cv-dates {
  font-weight: 700; font-size: 0.78em;
  letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--cv-muted);
}
.tpl-impact .cv-entry-sub { font-size: 0.92em; }
.tpl-impact .cv-entry-sub .cv-org { font-style: normal; font-weight: 600; color: var(--cv-ink); }
.tpl-impact .cv-bullets { list-style: square; }
.tpl-impact .cv-bullets li::marker { color: var(--cv-accent); }

/* skills and languages: squared, no softness */
.tpl-impact .cv-bar, .tpl-impact .cv-bar i { border-radius: 0; }
.tpl-impact .cv-bar { height: 7px; background: color-mix(in srgb, var(--cv-ink) 12%, transparent); }
.tpl-impact .cv-skill-name, .tpl-impact .cv-lang-name { font-weight: 600; }

/* the accent bar returns to close the page */
.tpl-impact { border-bottom: 8px solid var(--cv-accent); }

/* --- Marker --- */
/* --- Marker: highlighter swipes behind the name and headings ---
   The accent never colors text; it lives in translucent tilted
   bands the ink sits on, so any picked accent stays readable. */

.tpl-marker {
  --cv-ink: #221f1a;
  --cv-muted: #615a4d;
  --cv-line: #e2dccd;
  --mk-dir: to right;
  --mk-flip: 1;
  --mk-hi: color-mix(in srgb, var(--cv-accent) 58%, transparent);
  --mk-lo: color-mix(in srgb, var(--cv-accent) 30%, transparent);
  --mk-deep: color-mix(in srgb, var(--cv-accent) 72%, black);
  position: relative;
}
[dir="rtl"] .tpl-marker { --mk-dir: to left; --mk-flip: -1; }

/* masthead: big ink name over one wide swipe */
.tpl-marker .cv-head { margin-bottom: 0.7em; }
.tpl-marker .cv-name {
  width: fit-content; position: relative; z-index: 0;
  font-size: 2.8em; line-height: 1.08;
  font-weight: 800; letter-spacing: -0.01em;
}
.tpl-marker .cv-name::before {
  content: ""; position: absolute; z-index: -1;
  inset-inline: -0.16em -0.55em;
  top: 0.4em; bottom: -0.03em;
  background: linear-gradient(var(--mk-dir), var(--mk-hi), var(--mk-hi) 55%, var(--mk-lo));
  border-radius: 0.4em 0.14em 0.34em 0.2em / 0.5em 0.34em 0.44em 0.4em;
  transform: rotate(calc(var(--mk-flip) * -1.2deg));
}
.tpl-marker .cv-title {
  color: var(--cv-ink); font-weight: 700;
  font-size: 0.95em; text-transform: uppercase; letter-spacing: 0.14em;
  margin-top: 0.55em;
}

.tpl-marker .cv-contact {
  border-bottom: 2px solid var(--cv-ink);
  padding-bottom: 0.75em; margin-bottom: 1.3em;
  font-size: 0.9em; font-weight: 600; gap: 0.3em 1.05em;
}

/* headings: uppercase ink, band swiped past the word */
.tpl-marker .cv-sec { margin-bottom: calc(var(--cv-gap) * 1.1); }
.tpl-marker .cv-h {
  width: fit-content; position: relative; z-index: 0;
  color: var(--cv-ink); font-size: 1.04em; font-weight: 800;
  letter-spacing: 0.08em; margin-bottom: 0.7em;
}
.tpl-marker .cv-h::before {
  content: ""; position: absolute; z-index: -1;
  inset-inline: -0.4em -1.2em;
  top: 0.22em; bottom: -0.18em;
  background: linear-gradient(var(--mk-dir), var(--mk-hi), var(--mk-hi) 45%, var(--mk-lo) 88%, transparent);
  border-radius: 0.45em 0.15em 0.5em 0.2em / 0.55em 0.4em 0.35em 0.5em;
  transform: rotate(calc(var(--mk-flip) * -1.4deg));
}
/* every other swipe tilts the other way, like a real hand */
.tpl-marker section:nth-of-type(even) .cv-h::before {
  transform: rotate(calc(var(--mk-flip) * 1deg));
}

/* entries: heavy leads, calm ink body */
.tpl-marker .cv-entry-main { font-weight: 700; }
.tpl-marker .cv-dates { font-weight: 600; font-variant-numeric: tabular-nums; }
.tpl-marker .cv-entry-sub .cv-org { font-style: normal; font-weight: 600; }

/* bullets: short flicked marker ticks */
.tpl-marker .cv-bullets { list-style: none; padding-inline-start: 1.15em; }
.tpl-marker .cv-bullets li { position: relative; }
.tpl-marker .cv-bullets li::before {
  content: ""; position: absolute;
  inset-inline-start: -1.15em; top: 0.52em;
  width: 0.62em; height: 0.26em;
  border-radius: 0.22em 0.36em 0.26em 0.4em;
  background: var(--mk-deep);
  transform: rotate(calc(var(--mk-flip) * -4deg));
}

/* skills: nib-cut strokes, slanted ends like a chisel tip */
.tpl-marker .cv-skill-name, .tpl-marker .cv-lang-name { font-weight: 600; }
.tpl-marker .cv-bar {
  height: 0.5em; border-radius: 2px;
  background: color-mix(in srgb, var(--cv-accent) 20%, transparent);
  transform: skew(calc(var(--mk-flip) * -18deg));
}
.tpl-marker .cv-bar i {
  border-radius: 2px;
  background: linear-gradient(var(--mk-dir), var(--mk-deep), color-mix(in srgb, var(--cv-accent) 88%, black));
}

/* --- Console --- */
/* --- Console: dark terminal header (chrome dots, prompt name with
   block cursor, mono contact) over a light command-chip body. --- */

.tpl-console {
  --cv-ink: #1b211f;
  --cv-muted: #576561;
  --cv-line: #d9e0dd;
  --con-mono: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, monospace;
  --con-dark: color-mix(in srgb, var(--cv-accent) 14%, #0e1513);
  --con-bright: color-mix(in srgb, var(--cv-accent) 45%, white);
  --con-d1: 28px; --con-d2: 48px; --con-d3: 68px;
  padding-top: 0;
}
[dir="rtl"] .tpl-console {
  --con-d1: calc(100% - 28px); --con-d2: calc(100% - 48px); --con-d3: calc(100% - 68px);
}

/* terminal window head */
.tpl-console .cv-head {
  flex-direction: column; align-items: stretch; gap: 0.35em;
  margin: 0 calc(-1 * var(--cv-pad)) 0;
  padding: 0 var(--cv-pad) 0.7em;
  background: var(--con-dark); color: #f2f6f4;
}
.tpl-console .cv-head::before {
  content: ""; height: 30px;
  margin: 0 calc(-1 * var(--cv-pad)) 0.9em;
  background:
    radial-gradient(circle at var(--con-d1) 50%, #ff5f56 0 5px, transparent 6px),
    radial-gradient(circle at var(--con-d2) 50%, #febc2e 0 5px, transparent 6px),
    radial-gradient(circle at var(--con-d3) 50%, #28c840 0 5px, transparent 6px),
    color-mix(in srgb, var(--cv-accent) 8%, #090e0d);
}
.tpl-console .cv-name { font-family: var(--con-mono); font-size: 1.8em; }
.tpl-console .cv-name::before { content: "\276F"; color: var(--con-bright); margin-inline-end: 0.35em; }
.tpl-console .cv-name::after {
  content: ""; display: inline-block;
  width: 0.48em; height: 0.85em; margin-inline-start: 0.22em;
  background: var(--con-bright);
}
.tpl-console .cv-title { font-family: var(--con-mono); font-size: 0.95em; color: var(--con-bright); margin-top: 0; }
.tpl-console .cv-title::before { content: "# "; color: rgba(242, 246, 244, 0.55); }

/* contact continues the terminal */
.tpl-console .cv-contact {
  margin: 0 calc(-1 * var(--cv-pad)) 1.6em;
  padding: 0.1em var(--cv-pad) 1.1em;
  background: var(--con-dark);
  border-bottom: 3px solid var(--cv-accent);
  color: #b9c6c2;
  font-family: var(--con-mono); font-size: 0.8em;
  gap: 0.35em 0.9em;
}
.tpl-console .cv-c:not(:last-child)::after { content: "|"; color: rgba(185, 198, 194, 0.45); margin-inline-start: 0.9em; }

/* headings as highlighted command lines */
.tpl-console .cv-h {
  font-family: var(--con-mono); text-transform: none; letter-spacing: 0.02em; font-size: 0.9em; color: var(--cv-ink);
  background: color-mix(in srgb, var(--cv-accent) 10%, transparent);
  padding: 0.32em 0.65em; border-radius: 3px;
  margin-bottom: 0.7em;
}
.tpl-console .cv-h::before { content: "$ "; color: var(--cv-accent); font-weight: 700; }

/* mono metadata over the light body */
.tpl-console .cv-dates { font-family: var(--con-mono); font-size: 0.8em; }
.tpl-console .cv-dates::before { content: "["; }
.tpl-console .cv-dates::after { content: "]"; }
.tpl-console .cv-entry-sub .cv-org { font-style: normal; }
.tpl-console .cv-entry-sub .cv-org::before { content: "@"; color: var(--cv-accent); }
.tpl-console .cv-sec-summary .cv-desc {
  border-inline-start: 3px solid color-mix(in srgb, var(--cv-accent) 35%, transparent);
  padding-inline-start: 0.9em;
}
.tpl-console .cv-bullets { list-style: square; }
.tpl-console .cv-bullets li::marker { color: var(--cv-accent); }

/* segmented block meters */
.tpl-console .cv-bar {
  height: 8px; border-radius: 0;
  background: repeating-linear-gradient(90deg,
    color-mix(in srgb, var(--cv-accent) 28%, transparent) 0 5px, transparent 5px 8px);
}
.tpl-console .cv-bar i {
  border-radius: 0;
  background: repeating-linear-gradient(90deg, var(--cv-accent) 0 5px, transparent 5px 8px);
}
.tpl-console .cv-lang-level { font-family: var(--con-mono); font-size: 0.82em; }

/* --- Noir --- */
/* ============================================================
   Noir - dark mode CV: a deep near-black page, light text,
   neon-glow headings. Built for creative and tech roles.
   ============================================================ */

.tpl-noir {
  --cv-bg: #14110c;
  --cv-ink: #ece7dc;
  --cv-muted: #b4ab9b;
  --cv-line: #3b352a;
  background-color: var(--cv-bg);
  background-image: radial-gradient(ellipse 72% 26% at 22% 0%,
    color-mix(in srgb, var(--cv-accent) 17%, transparent), transparent 72%);
}
[dir="rtl"] .tpl-noir {
  background-image: radial-gradient(ellipse 72% 26% at 78% 0%,
    color-mix(in srgb, var(--cv-accent) 17%, transparent), transparent 72%);
}

/* ---- head: crisp name, neon title, glowing portrait ---- */
.tpl-noir .cv-name { font-size: 2.55em; color: #f8f4ea; }
.tpl-noir .cv-name::first-letter { color: color-mix(in srgb, var(--cv-accent) 75%, white); }
.tpl-noir .cv-title {
  text-transform: uppercase; letter-spacing: 0.24em; font-size: 0.86em;
  margin-top: 0.55em;
  color: color-mix(in srgb, var(--cv-accent) 60%, white);
  text-shadow: 0 0 14px color-mix(in srgb, var(--cv-accent) 65%, transparent);
}
.tpl-noir .cv-photo img {
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--cv-accent) 65%, transparent);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--cv-accent) 15%, transparent),
    0 0 26px color-mix(in srgb, var(--cv-accent) 30%, transparent);
}

/* ---- contact strip with accent slash dividers ---- */
.tpl-noir .cv-contact { font-size: 0.9em; letter-spacing: 0.02em; }
.tpl-noir .cv-c + .cv-c::before {
  content: "/";
  color: color-mix(in srgb, var(--cv-accent) 75%, transparent);
  margin-inline-end: 0.7em;
}

/* ---- glowing section headings: lit core, accent halo, fading rule ---- */
.tpl-noir .cv-h {
  display: flex; align-items: center; gap: 0.7em;
  font-size: 0.85em; letter-spacing: 0.26em;
  color: color-mix(in srgb, var(--cv-accent) 58%, white);
  text-shadow: 0 0 15px color-mix(in srgb, var(--cv-accent) 75%, transparent);
  margin-bottom: 0.75em;
}
.tpl-noir .cv-h::before {
  content: ""; flex: none; width: 8px; height: 8px; border-radius: 2px;
  background: var(--cv-accent);
  box-shadow: 0 0 10px color-mix(in srgb, var(--cv-accent) 85%, transparent);
}
.tpl-noir .cv-h::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(to right,
    color-mix(in srgb, var(--cv-accent) 55%, transparent),
    color-mix(in srgb, var(--cv-accent) 6%, transparent));
}
[dir="rtl"] .tpl-noir .cv-h::after {
  background: linear-gradient(to left,
    color-mix(in srgb, var(--cv-accent) 55%, transparent),
    color-mix(in srgb, var(--cv-accent) 6%, transparent));
}

/* ---- entries: bright role lines, terminal-style dates ---- */
.tpl-noir .cv-entry-main { color: #f8f4ea; }
.tpl-noir .cv-dates {
  font-family: ui-monospace, 'Cascadia Code', Menlo, Consolas, monospace;
  font-size: 0.8em;
  color: color-mix(in srgb, var(--cv-accent) 55%, white);
}
.tpl-noir .cv-bullets li::marker { color: var(--cv-accent); }

/* ---- skills: outlined tracks that stay visible on the dark page ---- */
.tpl-noir .cv-bar {
  height: 8px; border-radius: 4px;
  background: color-mix(in srgb, var(--cv-accent) 14%, #292319);
  border: 1px solid color-mix(in srgb, var(--cv-accent) 32%, transparent);
}
.tpl-noir .cv-bar i {
  background: var(--cv-accent);
  box-shadow: 0 0 8px color-mix(in srgb, var(--cv-accent) 80%, transparent);
}
.tpl-noir .cv-lang-name { color: #f8f4ea; }
