/**
 * Generador de currículums (CV) en PDF ultra limpio
 * Estilos de las 5 plantillas profesionales para el lienzo A4
 */

/* ============================================================
   Variables dinámicas del documento (inyectadas o sobreescritas)
   ============================================================ */
.cv-paper {
  --primary-color: #1e3a8a;
  --secondary-color: #475569;
  --text-dark: #1e293b;
  --text-light: #64748b;
  --bg-sidebar: #f8fafc;
  --border-light: #e2e8f0;
  
  --font-body: 'Inter', sans-serif;
  --font-headings: 'Inter', sans-serif;
  
  --base-size: 9.5pt;
  --spacing-unit: 0.65rem;
  
  font-family: var(--font-body);
  font-size: var(--base-size);
  color: var(--text-dark);
  line-height: 1.45;
  padding: 18mm 18mm;
  box-sizing: border-box;
}

/* Densidades de espaciado */
.cv-paper.density-compact {
  --base-size: 8.8pt;
  --spacing-unit: 0.45rem;
  padding: 12mm 14mm;
  line-height: 1.35;
}

.cv-paper.density-comfortable {
  --base-size: 10.2pt;
  --spacing-unit: 0.85rem;
  padding: 20mm 20mm;
  line-height: 1.55;
}

/* Fuentes aplicadas */
.cv-paper.font-inter { --font-body: 'Inter', sans-serif; --font-headings: 'Inter', sans-serif; }
.cv-paper.font-roboto { --font-body: 'Roboto', sans-serif; --font-headings: 'Roboto', sans-serif; }
.cv-paper.font-outfit { --font-body: 'Inter', sans-serif; --font-headings: 'Outfit', sans-serif; }
.cv-paper.font-merriweather { --font-body: 'Merriweather', serif; --font-headings: 'Merriweather', serif; }
.cv-paper.font-lora { --font-body: 'Lora', serif; --font-headings: 'Lora', serif; }

/* Enlaces dentro del CV */
.cv-paper a {
  color: inherit;
  text-decoration: none;
}
.cv-paper a:hover {
  text-decoration: underline;
}

/* ============================================================
   Componentes comunes de sección del CV
   ============================================================ */
.cv-section {
  margin-bottom: var(--spacing-unit);
  page-break-inside: avoid;
  break-inside: avoid;
}

.cv-section-title {
  font-family: var(--font-headings);
  font-size: 1.05em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary-color);
  margin-bottom: calc(var(--spacing-unit) * 0.6);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cv-item {
  margin-bottom: calc(var(--spacing-unit) * 0.7);
  page-break-inside: avoid;
  break-inside: avoid;
}

.cv-item:last-child {
  margin-bottom: 0;
}

.cv-item-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.15rem;
}

.cv-item-role {
  font-weight: 700;
  font-size: 1.02em;
  color: var(--text-dark);
}

.cv-item-company {
  font-weight: 600;
  color: var(--secondary-color);
}

.cv-item-date {
  font-size: 0.9em;
  color: var(--text-light);
  white-space: nowrap;
}

.cv-item-location {
  font-size: 0.88em;
  color: var(--text-light);
  font-style: italic;
}

.cv-item-description {
  font-size: 0.96em;
  color: var(--text-dark);
  margin-top: 0.2rem;
}

.cv-bullets-list {
  margin: 0.3rem 0 0 1.2rem;
  padding: 0;
}

.cv-bullets-list li {
  margin-bottom: 0.2rem;
  font-size: 0.95em;
}

/* ============================================================
   PLANTILLA 1: ATS Clásica / Harvard Minimalista
   ============================================================ */
.cv-paper.template-ats-classic {
  display: block;
}

.template-ats-classic .cv-header {
  text-align: center;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: calc(var(--spacing-unit) * 0.8);
  margin-bottom: var(--spacing-unit);
}

.template-ats-classic .cv-name {
  font-family: var(--font-headings);
  font-size: 1.9em;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--primary-color);
  margin-bottom: 0.2rem;
  text-transform: uppercase;
}

.template-ats-classic .cv-job-title {
  font-size: 1.05em;
  font-weight: 600;
  color: var(--secondary-color);
  margin-bottom: 0.4rem;
}

.template-ats-classic .cv-contact-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 0.9rem;
  font-size: 0.9em;
  color: var(--text-light);
}

.template-ats-classic .cv-contact-bar span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.template-ats-classic .cv-section-title {
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 0.2rem;
}

.template-ats-classic .skills-inline-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
}

.template-ats-classic .skills-inline-list span {
  background: #f1f5f9;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  font-size: 0.92em;
  font-weight: 500;
}

/* ============================================================
   PLANTILLA 2: Moderna Ejecutiva
   ============================================================ */
.cv-paper.template-modern-exec {
  display: block;
}

.template-modern-exec .cv-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  border-left: 5px solid var(--primary-color);
  padding-left: 1rem;
  margin-bottom: calc(var(--spacing-unit) * 1.2);
}

.template-modern-exec .cv-name {
  font-family: var(--font-headings);
  font-size: 2em;
  font-weight: 800;
  color: var(--primary-color);
  line-height: 1.15;
}

.template-modern-exec .cv-job-title {
  font-size: 1.1em;
  font-weight: 600;
  color: var(--secondary-color);
  margin-top: 0.15rem;
}

.template-modern-exec .cv-contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.25rem 0.75rem;
  font-size: 0.88em;
  color: var(--text-light);
  text-align: right;
}

.template-modern-exec .cv-avatar {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  object-fit: cover;
  border: 2px solid var(--primary-color);
}

.template-modern-exec .cv-section-title {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.template-modern-exec .cv-section-title::after {
  content: '';
  flex: 1;
  height: 1.5px;
  background: linear-gradient(to right, var(--primary-color), transparent);
}

.template-modern-exec .cv-timeline-item {
  position: relative;
  padding-left: 1rem;
  border-left: 1.5px solid var(--border-light);
}

.template-modern-exec .cv-timeline-item::before {
  content: '';
  position: absolute;
  left: -4px;
  top: 5px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary-color);
}

/* ============================================================
   PLANTILLA 3: Dos Columnas Profesional
   ============================================================ */
.cv-paper.template-two-column {
  padding: 0;
  display: flex;
  min-height: 297mm;
}

.template-two-column .cv-sidebar {
  width: 33%;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-light);
  padding: 16mm 10mm;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: calc(var(--spacing-unit) * 1.1);
}

.template-two-column .cv-main-col {
  width: 67%;
  padding: 16mm 14mm;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-unit);
}

.template-two-column .cv-avatar-wrap {
  text-align: center;
  margin-bottom: 0.5rem;
}

.template-two-column .cv-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #ffffff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.template-two-column .sidebar-section-title {
  font-family: var(--font-headings);
  font-size: 0.95em;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary-color);
  border-bottom: 1.5px solid var(--primary-color);
  padding-bottom: 0.2rem;
  margin-bottom: 0.5rem;
}

.template-two-column .sidebar-contact-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.88em;
  color: var(--text-dark);
  word-break: break-word;
}

.template-two-column .sidebar-skills-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.template-two-column .skill-progress-row {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.template-two-column .skill-name-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.88em;
  font-weight: 600;
}

.template-two-column .skill-bar-track {
  width: 100%;
  height: 4px;
  background: var(--border-light);
  border-radius: 2px;
  overflow: hidden;
}

.template-two-column .skill-bar-fill {
  height: 100%;
  background: var(--primary-color);
  border-radius: 2px;
}

.template-two-column .cv-name {
  font-family: var(--font-headings);
  font-size: 1.85em;
  font-weight: 800;
  color: var(--primary-color);
  line-height: 1.15;
}

.template-two-column .cv-job-title {
  font-size: 1.05em;
  font-weight: 600;
  color: var(--secondary-color);
  margin-bottom: 0.5rem;
}

/* ============================================================
   PLANTILLA 4: Creativa / Tecnológica
   ============================================================ */
.cv-paper.template-creative {
  display: block;
}

.template-creative .cv-header {
  background: #f8fafc;
  margin: -18mm -18mm var(--spacing-unit) -18mm;
  padding: 14mm 18mm 12mm 18mm;
  border-bottom: 3px solid var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.template-creative .cv-name {
  font-family: var(--font-headings);
  font-size: 2.1em;
  font-weight: 800;
  color: var(--text-dark);
}

.template-creative .cv-name span {
  color: var(--primary-color);
}

.template-creative .cv-job-title {
  font-size: 1.1em;
  font-weight: 600;
  color: var(--secondary-color);
  margin-top: 0.2rem;
}

.template-creative .cv-header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.template-creative .cv-avatar {
  width: 76px;
  height: 76px;
  border-radius: 14px;
  object-fit: cover;
  border: 2px solid var(--primary-color);
}

.template-creative .creative-contact-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.6rem;
  font-size: 0.88em;
  color: var(--secondary-color);
  margin-top: 0.5rem;
}

.template-creative .tech-badges-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.template-creative .tech-badge {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  border: 1px solid var(--border-light);
  color: var(--text-dark);
  font-weight: 600;
  font-size: 0.88em;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
}

/* ============================================================
   PLANTILLA 5: Compacta de 1 Página
   ============================================================ */
.cv-paper.template-compact {
  padding: 10mm 12mm;
  --base-size: 8.6pt;
  --spacing-unit: 0.4rem;
  line-height: 1.35;
}

.template-compact .cv-header {
  border-bottom: 1.5px solid var(--primary-color);
  padding-bottom: 0.3rem;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.3rem 0.8rem;
}

.template-compact .cv-name {
  font-family: var(--font-headings);
  font-size: 1.6em;
  font-weight: 800;
  color: var(--primary-color);
  text-transform: uppercase;
}

.template-compact .cv-job-title {
  font-size: 1em;
  font-weight: 600;
  color: var(--secondary-color);
}

.template-compact .cv-contact-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  font-size: 0.85em;
  color: var(--text-light);
  width: 100%;
}

.template-compact .cv-section-title {
  font-size: 0.95em;
  margin-bottom: 0.2rem;
  border-bottom: 1px solid var(--border-light);
}

.template-compact .cv-item {
  margin-bottom: 0.25rem;
}

.template-compact .cv-bullets-list {
  margin: 0.15rem 0 0 1rem;
}

.template-compact .cv-bullets-list li {
  margin-bottom: 0.1rem;
}
