/* ============================================================
   Rendered resume documents (template previews + examples)
   ============================================================ */
.cv-doc {
  --cv-accent: #263348;
  --cv-font: 'Orion Serif', Georgia, 'Times New Roman', serif;
  font-family: var(--cv-font);
  color: #1c1c22;
  background: #ffffff;
  border: 1px solid #e2e2e6;
  border-radius: 6px;
  box-shadow: 0 18px 45px rgba(28, 28, 34, .12);
  padding: clamp(26px, 3.6vw, 46px) clamp(26px, 3.8vw, 52px);
  font-size: 14px;
  line-height: 1.5;
  max-width: 820px;
  margin-inline: auto;
}
.cv-doc.is-compact { font-size: 11px; padding: 20px 22px; box-shadow: 0 8px 22px rgba(28,28,34,.10); }
.cv-doc * { box-sizing: border-box; }
.cv-doc h1, .cv-doc h2, .cv-doc h3 { margin: 0; }
.cv-doc .cv-job-title { margin: 0; }
.cv-doc .cv-side-title { font-weight: 800; }

/* Header */
.cv-name { font-size: 2.05em; font-weight: 800; letter-spacing: -.02em; color: var(--cv-accent); line-height: 1.05; }
.cv-headline { font-size: 1.02em; font-weight: 600; color: #3a3a46; margin: .28em 0 0; letter-spacing: .01em; }
.cv-contact { font-size: .82em; color: #4c4c58; margin: .7em 0 0; line-height: 1.7; }
.cv-sep { color: #b6b6c0; padding: 0 .45em; }
.cv-head-centered { text-align: center; border-bottom: 2px solid var(--cv-accent); padding-bottom: 1em; margin-bottom: 1.4em; }
.cv-head-left { border-bottom: 2px solid var(--cv-accent); padding-bottom: 1em; margin-bottom: 1.4em; }
.cv-head-band { background: var(--cv-accent); color: #fff; margin: calc(-1 * clamp(26px, 3.6vw, 46px)) calc(-1 * clamp(26px, 3.8vw, 52px)) 1.5em; padding: 1.5em clamp(26px, 3.8vw, 52px); display: flex; flex-wrap: wrap; gap: .6em 1.4em; align-items: flex-end; justify-content: space-between; }
.cv-head-band .cv-name { color: #fff; }
.cv-head-band .cv-headline { color: rgba(255,255,255,.85); }
.cv-head-band .cv-contact { color: rgba(255,255,255,.92); }
.cv-head-band .cv-sep { color: rgba(255,255,255,.5); }
.cv-norules .cv-head-left, .cv-norules .cv-head-centered { border-bottom: 0; padding-bottom: .3em; }

/* Blocks */
.cv-block { margin: 0 0 1.35em; }
.cv-block:last-child { margin-bottom: 0; }
.cv-section-title { font-size: .78em; text-transform: uppercase; letter-spacing: .16em; color: var(--cv-accent); font-weight: 800; margin-bottom: .7em; padding-bottom: .3em; border-bottom: 1px solid color-mix(in srgb, var(--cv-accent) 35%, #e2e2e6); }
.cv-norules .cv-section-title { border-bottom: 0; padding-bottom: 0; }
.cv-summary p { margin: 0; color: #33333d; }

/* Job / project / education entries */
.cv-job, .cv-project, .cv-edu { margin-bottom: 1em; }
.cv-job:last-child, .cv-project:last-child, .cv-edu:last-child { margin-bottom: 0; }
.cv-job-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1em; }
.cv-job-title { display: block;  font-size: 1.02em; font-weight: 700; color: #1c1c22; }
.cv-org { margin: .12em 0 0; font-size: .9em; color: var(--cv-accent); font-weight: 600; }
.cv-dates { font-size: .8em; color: #6a6a76; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cv-bullets { margin: .5em 0 0; padding-left: 1.05em; }
.cv-bullets li { margin-bottom: .3em; color: #33333d; }
.cv-bullets.cv-flat li { margin-bottom: .18em; }
.cv-project-desc { margin: .4em 0 0; color: #33333d; }
.cv-edu-details { margin: .35em 0 0; color: #44444f; font-size: .93em; }
.cv-skill-row { margin: 0 0 .35em; color: #33333d; }
.cv-skill-row strong { color: var(--cv-accent); }

/* Sidebar archetype */
.cv-archetype-sidebar { display: grid; grid-template-columns: 34% 1fr; padding: 0; overflow: hidden; }
.cv-archetype-sidebar .cv-side { background: color-mix(in srgb, var(--cv-accent) 92%, #000); color: #fff; padding: 30px 24px; }
.cv-archetype-sidebar .cv-name { color: #fff; font-size: 1.7em; }
.cv-archetype-sidebar .cv-headline { color: rgba(255,255,255,.85); }
.cv-archetype-sidebar .cv-side-section { margin-top: 1.4em; }
.cv-archetype-sidebar .cv-side-section .cv-side-title { font-size: .72em; text-transform: uppercase; letter-spacing: .14em; color: rgba(255,255,255,.72); margin-bottom: .5em; border-bottom: 1px solid rgba(255,255,255,.25); padding-bottom: .3em; }
.cv-side-line { margin: 0 0 .5em; font-size: .86em; color: rgba(255,255,255,.95); line-height: 1.45; }
.cv-side-line strong { color: #fff; }
.cv-archetype-sidebar .cv-main { padding: 30px 28px; }
.cv-archetype-sidebar.is-compact .cv-side { padding: 18px 14px; }
.cv-archetype-sidebar.is-compact .cv-main { padding: 18px 16px; }

/* Academic (dense, publication-friendly) */
.cv-archetype-academic { font-size: 13px; }
.cv-archetype-academic .cv-section-title { border-bottom: 1px solid var(--cv-accent); }

@media (max-width: 640px) {
  .cv-archetype-sidebar { grid-template-columns: 1fr; }
  .cv-job-head { flex-direction: column; gap: .1em; }
}

/* Page wrapper for full-size example display */
.cv-stage { background: linear-gradient(180deg, #f4f4f8, #eeeff4); border-radius: 16px; padding: clamp(16px, 3vw, 40px); }

/* Template grid thumbnails (kept compact: cropped preview with a soft fade) */
.template-visual, .gallery-thumb { position: relative; overflow: hidden; padding: 14px; background: linear-gradient(180deg, #f1f2f7, #e8e9f0); }
.template-visual { height: 246px; }
.gallery-thumb { height: 224px; }
.template-visual::after, .gallery-thumb::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 52px; background: linear-gradient(180deg, rgba(232, 233, 240, 0), #e8e9f0); pointer-events: none; }
.template-visual .cv-doc, .gallery-thumb .cv-doc { box-shadow: 0 6px 16px rgba(28, 28, 34, .09); }
.template-visual .cv-doc.is-compact, .gallery-thumb .cv-doc.is-compact { font-size: 9px; padding: 12px 14px; }
.template-visual .cv-name, .gallery-thumb .cv-name { font-size: 1.7em; }
.template-card { transition: transform .25s ease, box-shadow .25s ease; }
.template-card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(28, 28, 34, .14); }
.template-caption { display: flex; align-items: center; justify-content: space-between; gap: .4rem .8rem; flex-wrap: wrap; padding: .7rem .9rem .85rem; }
.template-caption h3 { margin: 0; font-size: .95rem; }
.template-cat { flex-basis: 100%; font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0; }
.template-grid { grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 1.1rem; }
@media (max-width: 700px) { .template-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .template-grid { grid-template-columns: 1fr; } }

/* Landing template band: three tidy columns, smaller cards */
.templates-band .template-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 1040px; margin-inline: auto; }
@media (max-width: 820px) { .templates-band .template-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .templates-band .template-grid { grid-template-columns: 1fr; } }

