/* =========================================================
   Moonshape — Hoja de estilos del CV (/cv)
   Paleta heredada de brand.css:
     --ms-green #42E57D · --ms-purple #4900FB
     --ms-navy #111357  · --ms-offwhite #F3F5FE
   Se carga DESPUÉS de brand.css.

   Estructura:
     1. Tokens y utilidades del CV
     2. Encabezado (tarjeta de identidad)
     3. Marquee de disciplinas
     4. Sub-navegación pegajosa
     5. Bloques de sección
     6. Timeline de experiencia
     7. Habilidades
     8. Herramientas e idiomas
     9. Educación
    10. Portafolio
    11. Referencias
    12. Botón flotante de descarga
    13. @media print  → genera el PDF
   ========================================================= */

/* ---------------------------------------------------------
   1. Tokens y utilidades
   --------------------------------------------------------- */
.cv-page {
  --cv-line: rgba(255, 255, 255, 0.10);
  --cv-line-strong: rgba(255, 255, 255, 0.18);
  --cv-surface: #0b0b0b;
  --cv-surface-2: #111111;
  --cv-muted: rgba(255, 255, 255, 0.62);
}

.cv-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ms-green);
  margin-bottom: 14px;
}
.cv-eyebrow::before {
  content: '';
  width: 28px;
  height: 2px;
  background: var(--ms-green);
  flex: 0 0 auto;
}

.cv-section-title {
  font-size: 48px;
  line-height: 1.15;
  margin: 0;
}
@media (max-width: 991px) {
  .cv-section-title { font-size: 36px; }
}
@media (max-width: 575px) {
  .cv-section-title { font-size: 30px; }
}

.cv-divider {
  height: 1px;
  background: var(--cv-line);
  border: 0;
  margin: 0;
}

/* Revelado al hacer scroll.
   Deliberadamente NO se usa WOW.js: en este tema deja los elementos .wow
   en visibility:hidden y nunca los revela, lo que dejaría el CV en blanco.
   El ocultado solo aplica si cv.js pudo marcar <html> con .cv-js, así que
   sin JavaScript todo el contenido se muestra tal cual. */
.cv-js .cv-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--cv-delay, 0ms);
  will-change: opacity, transform;
}
.cv-js .cv-reveal.is-in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .cv-js .cv-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}


/* ---------------------------------------------------------
   2. Encabezado — tarjeta de identidad
   --------------------------------------------------------- */
.cv-hero {
  position: relative;
  overflow: hidden;
}
.cv-hero::after {
  /* Halo verde difuso detrás del retrato */
  content: '';
  position: absolute;
  top: -140px;
  right: -120px;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(66, 229, 125, 0.16) 0%, transparent 68%);
  pointer-events: none;
  z-index: 0;
}

.cv-hero > .container { position: relative; z-index: 1; }

.cv-portrait-wrap {
  position: relative;
  display: inline-block;
}
.cv-portrait {
  width: 100%;
  max-width: 260px;
  /* height:auto es obligatorio: sin él, el atributo height="520" del <img>
     fija la altura y aspect-ratio se ignora, dejando el retrato estirado. */
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 28px;
  display: block;
  border: 1px solid var(--cv-line-strong);
}
.cv-portrait-wrap::before {
  /* Marco desplazado en verde: guiño al diseño editorial */
  content: '';
  position: absolute;
  inset: 14px -14px -14px 14px;
  border: 2px solid var(--ms-green);
  border-radius: 28px;
  z-index: -1;
}

.cv-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ms-green);
  background: rgba(66, 229, 125, 0.10);
  border: 1px solid rgba(66, 229, 125, 0.30);
  border-radius: 100px;
  padding: 7px 18px;
  margin-bottom: 22px;
}
.cv-status .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ms-green);
  animation: cv-pulse 2s ease-in-out infinite;
}
@keyframes cv-pulse {
  0%, 100% { opacity: 1;   transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(0.8); }
}

.cv-name {
  font-size: 68px;
  line-height: 1.05;
  letter-spacing: -1.5px;
  margin: 0 0 10px;
  color: #fff;
}
@media (max-width: 1199px) { .cv-name { font-size: 56px; } }
@media (max-width: 767px)  { .cv-name { font-size: 42px; letter-spacing: -0.5px; } }
@media (max-width: 400px)  { .cv-name { font-size: 34px; } }

.cv-role {
  font-size: 24px;
  font-weight: 500;
  color: var(--ms-green);
  margin: 0 0 20px;
}
@media (max-width: 767px) { .cv-role { font-size: 19px; } }

.cv-tagline {
  font-size: 21px;
  line-height: 1.65;
  color: var(--cv-muted);
  max-width: 620px;
  margin: 0 0 34px;
}
@media (max-width: 767px) { .cv-tagline { font-size: 18px; } }

/* Rejilla de contacto */
.cv-contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--cv-line);
  border: 1px solid var(--cv-line);
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 34px;
}
@media (max-width: 575px) {
  .cv-contact-grid { grid-template-columns: 1fr; }
}
.cv-contact-item {
  background: var(--cv-surface);
  padding: 18px 22px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: background 0.3s ease;
  min-width: 0;
}
.cv-contact-item:hover { background: var(--cv-surface-2); }
.cv-contact-item i {
  color: var(--ms-green);
  font-size: 19px;
  line-height: 1.4;
  flex: 0 0 auto;
}
.cv-contact-item .label {
  display: block;
  font-size: 12px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.40);
  margin-bottom: 3px;
}
.cv-contact-item .value {
  display: block;
  font-size: 16px;
  color: #fff;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.cv-contact-item a.value:hover { color: var(--ms-green); }

/* Cifras */
.cv-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 46px;
  padding-top: 8px;
}
@media (max-width: 575px) { .cv-stats { gap: 28px; } }
.cv-stat .num {
  font-size: 48px;
  font-weight: 500;
  color: #fff;
  line-height: 1;
  display: block;
}
@media (max-width: 767px) { .cv-stat .num { font-size: 38px; } }
.cv-stat .num span { color: var(--ms-green); }
.cv-stat .cap {
  font-size: 16px;
  color: var(--cv-muted);
  display: block;
  margin-top: 8px;
}

/* Acciones: descargar + contactar + idioma */
.cv-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}
.cv-btn-download {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  background: var(--ms-green);
  color: var(--ms-navy);
  font-weight: 500;
  font-size: 17px;
  border: 2px solid var(--ms-green);
  border-radius: 100px;
  padding: 15px 32px;
  cursor: pointer;
  transition: all 0.3s ease;
}
.cv-btn-download:hover {
  background: transparent;
  color: var(--ms-green);
}
.cv-btn-download i { font-size: 20px; }

.cv-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--cv-line-strong);
  color: #fff;
  border-radius: 100px;
  padding: 15px 30px;
  font-size: 17px;
  font-weight: 500;
  transition: all 0.3s ease;
}
.cv-btn-ghost:hover {
  border-color: var(--ms-green);
  color: var(--ms-green);
}

/* Conmutador de idioma */
.cv-lang {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--cv-line-strong);
  border-radius: 100px;
  overflow: hidden;
}
.cv-lang a {
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 500;
  color: var(--cv-muted);
  transition: all 0.25s ease;
  line-height: 1;
}
.cv-lang a:hover { color: #fff; }
.cv-lang a.is-active {
  background: var(--ms-green);
  color: var(--ms-navy);
}


/* ---------------------------------------------------------
   3. Marquee de disciplinas
   --------------------------------------------------------- */
.cv-marquee {
  border-top: 1px solid var(--cv-line);
  border-bottom: 1px solid var(--cv-line);
  overflow: hidden;
  padding: 24px 0;
  user-select: none;
}
.cv-marquee-track {
  display: flex;
  width: max-content;
  animation: cv-scroll 38s linear infinite;
}
.cv-marquee:hover .cv-marquee-track { animation-play-state: paused; }
.cv-marquee-track span {
  font-size: 26px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
  padding: 0 26px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 26px;
}
.cv-marquee-track span::after {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ms-green);
  flex: 0 0 auto;
}
@media (max-width: 767px) { .cv-marquee-track span { font-size: 20px; padding: 0 18px; } }
@keyframes cv-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .cv-marquee-track { animation: none; }
}


/* ---------------------------------------------------------
   4. Sub-navegación pegajosa
   --------------------------------------------------------- */
/* El wrapper del tema tiene padding de 30px, así que la barra no puede ser
   full-bleed: se resuelve como una píldora flotante, coherente con los
   border-30 del resto del sitio. */
.cv-subnav {
  position: sticky;
  top: 14px;
  z-index: 20;
  margin-top: 40px;
  background: rgba(10, 10, 10, 0.82);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--cv-line-strong);
  border-radius: 100px;
}
.cv-subnav ul {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 8px 0;
  margin: 0;
}
.cv-subnav ul::-webkit-scrollbar { display: none; }
.cv-subnav a {
  display: block;
  white-space: nowrap;
  font-size: 16px;
  font-weight: 500;
  color: var(--cv-muted);
  padding: 8px 18px;
  border-radius: 100px;
  transition: all 0.25s ease;
}
.cv-subnav a:hover { color: #fff; }
.cv-subnav a.is-current {
  color: var(--ms-navy);
  background: var(--ms-green);
}


/* ---------------------------------------------------------
   5. Bloques de sección
   --------------------------------------------------------- */
.cv-section { padding: 110px 0; }
@media (max-width: 991px) { .cv-section { padding: 70px 0; } }
.cv-section-head { margin-bottom: 60px; }
@media (max-width: 991px) { .cv-section-head { margin-bottom: 40px; } }

.cv-lead {
  font-size: 21px;
  line-height: 1.8;
  color: var(--cv-muted);
  margin-bottom: 22px;
}
.cv-lead:last-child { margin-bottom: 0; }
.cv-lead strong { color: #fff; font-weight: 500; }
@media (max-width: 767px) { .cv-lead { font-size: 18px; } }


/* ---------------------------------------------------------
   6. Timeline de experiencia
   --------------------------------------------------------- */
.cv-timeline {
  position: relative;
  padding-left: 34px;
}
@media (max-width: 575px) { .cv-timeline { padding-left: 24px; } }
.cv-timeline::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 12px;
  bottom: 12px;
  width: 1px;
  background: linear-gradient(
    to bottom,
    var(--ms-green) 0%,
    var(--cv-line-strong) 22%,
    var(--cv-line-strong) 100%
  );
}
@media (max-width: 575px) { .cv-timeline::before { left: 3px; } }

.cv-job {
  position: relative;
  padding-bottom: 58px;
}
.cv-job:last-child { padding-bottom: 0; }
.cv-job::before {
  /* Nodo */
  content: '';
  position: absolute;
  left: -34px;
  top: 9px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #060606;
  border: 2px solid var(--cv-line-strong);
  transition: all 0.3s ease;
}
@media (max-width: 575px) { .cv-job::before { left: -24px; width: 9px; height: 9px; } }
.cv-job.is-current::before {
  background: var(--ms-green);
  border-color: var(--ms-green);
  box-shadow: 0 0 0 5px rgba(66, 229, 125, 0.18);
}
.cv-job:hover::before { border-color: var(--ms-green); }

.cv-job-period {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.8px;
  color: var(--ms-green);
  margin-bottom: 9px;
}
.cv-job-title {
  font-size: 27px;
  line-height: 1.3;
  margin: 0 0 5px;
  color: #fff;
}
@media (max-width: 767px) { .cv-job-title { font-size: 22px; } }
.cv-job-company {
  font-size: 19px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 3px;
}
.cv-job-place {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.42);
  margin: 0 0 16px;
}
.cv-job-summary {
  font-size: 18px;
  line-height: 1.7;
  color: var(--cv-muted);
  margin: 0 0 18px;
}

.cv-job-achievements {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
}
.cv-job-achievements li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 11px;
  font-size: 17px;
  line-height: 1.65;
  color: var(--cv-muted);
}
.cv-job-achievements li:last-child { margin-bottom: 0; }
.cv-job-achievements li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 11px;
  width: 9px;
  height: 2px;
  background: var(--ms-green);
}

.cv-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.cv-tags li {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.68);
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--cv-line);
  border-radius: 100px;
  padding: 5px 15px;
}

/* Insignia para los puestos con mayor peso creativo */
.cv-badge-creative {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--ms-navy);
  background: var(--ms-green);
  border-radius: 100px;
  padding: 3px 12px;
  vertical-align: middle;
  margin-left: 10px;
}


/* ---------------------------------------------------------
   7. Habilidades
   --------------------------------------------------------- */
.cv-skill-group {
  border: 1px solid var(--cv-line);
  border-radius: 24px;
  padding: 36px 34px;
  height: 100%;
  background: var(--cv-surface);
  transition: border-color 0.3s ease;
}
.cv-skill-group:hover { border-color: rgba(66, 229, 125, 0.32); }
@media (max-width: 575px) { .cv-skill-group { padding: 26px 22px; } }

.cv-skill-group-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
}
.cv-skill-group-head i {
  color: var(--ms-green);
  font-size: 24px;
  line-height: 1;
}
.cv-skill-group-head h3 {
  font-size: 23px;
  margin: 0;
  line-height: 1.3;
}
.cv-skill-note {
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.45);
  font-style: italic;
  margin: 0 0 24px;
  padding-left: 38px;
}
.cv-skill-group-head + .cv-skill-list { margin-top: 26px; }

.cv-skill-list { list-style: none; padding: 0; margin: 0; }
.cv-skill { margin-bottom: 20px; }
.cv-skill:last-child { margin-bottom: 0; }

.cv-skill-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 9px;
}
.cv-skill-label .name {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.45;
}
.cv-skill-label .pct {
  font-size: 14px;
  font-weight: 500;
  color: var(--ms-green);
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
}

.cv-skill-track {
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 100px;
  overflow: hidden;
}
.cv-skill-bar {
  height: 100%;
  width: 0;
  border-radius: 100px;
  background: linear-gradient(90deg, var(--ms-green) 0%, var(--ms-green-light) 100%);
  transition: width 1.15s cubic-bezier(0.16, 1, 0.3, 1);
}
.cv-skill-group.is-visible .cv-skill-bar,
.cv-languages.is-visible .cv-skill-bar { width: var(--cv-level, 0%); }
@media (prefers-reduced-motion: reduce) {
  .cv-skill-bar { transition: none; }
}


/* ---------------------------------------------------------
   8. Herramientas e idiomas
   --------------------------------------------------------- */
.cv-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.cv-chips li {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--cv-line-strong);
  border-radius: 100px;
  padding: 9px 20px;
  transition: all 0.3s ease;
}
.cv-chips li:hover {
  border-color: var(--ms-green);
  color: var(--ms-green);
}

.cv-lang-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
}
.cv-lang-row:last-child { margin-bottom: 0; }
.cv-lang-row .lname {
  font-size: 18px;
  color: #fff;
  flex: 0 0 118px;
}
.cv-lang-row .lvl {
  font-size: 15px;
  color: var(--ms-green);
  flex: 0 0 auto;
}
.cv-lang-row .cv-skill-track { flex: 1 1 auto; }


/* ---------------------------------------------------------
   9. Educación
   --------------------------------------------------------- */
.cv-edu {
  display: flex;
  gap: 22px;
  border: 1px solid var(--cv-line);
  border-radius: 24px;
  padding: 32px 30px;
  height: 100%;
  background: var(--cv-surface);
  transition: border-color 0.3s ease;
}
.cv-edu:hover { border-color: rgba(66, 229, 125, 0.32); }
@media (max-width: 575px) { .cv-edu { padding: 24px 20px; gap: 16px; } }
.cv-edu-icon {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(66, 229, 125, 0.10);
  border: 1px solid rgba(66, 229, 125, 0.26);
  display: grid;
  place-items: center;
  color: var(--ms-green);
  font-size: 23px;
}
.cv-edu h3 {
  font-size: 21px;
  line-height: 1.35;
  margin: 0 0 5px;
}
.cv-edu .inst {
  font-size: 17px;
  font-weight: 500;
  color: var(--ms-green);
  margin: 0 0 4px;
}
.cv-edu .period {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.42);
  margin: 0 0 10px;
}
.cv-edu .detail {
  font-size: 16px;
  line-height: 1.65;
  color: var(--cv-muted);
  margin: 0;
}


/* ---------------------------------------------------------
   10. Portafolio
   --------------------------------------------------------- */
.cv-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0 0 44px;
}
.cv-filter li {
  font-size: 16px;
  font-weight: 500;
  color: var(--cv-muted);
  border: 1px solid var(--cv-line-strong);
  border-radius: 100px;
  padding: 9px 22px;
  cursor: pointer;
  transition: all 0.3s ease;
}
.cv-filter li:hover { color: #fff; border-color: rgba(255, 255, 255, 0.4); }
.cv-filter li.is-checked {
  background: var(--ms-green);
  border-color: var(--ms-green);
  color: var(--ms-navy);
}

.cv-work {
  position: relative;
  display: block;
  border-radius: 20px;
  overflow: hidden;
  background: var(--cv-surface-2);
}
/* aspect-ratio reserva el alto ANTES de que la imagen cargue.
   Es indispensable: isotope mide el grid en window.load y las imágenes son
   lazy, así que sin esto calcularía altura 0 y apilaría todo en top:0. */
.cv-work img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.cv-work:hover img { transform: scale(1.05); }
.cv-work-cap {
  position: absolute;
  inset: auto 0 0 0;
  padding: 26px 24px;
  background: linear-gradient(transparent, rgba(17, 19, 87, 0.94));
  opacity: 0;
  transform: translateY(12px);
  transition: all 0.4s ease;
}
.cv-work:hover .cv-work-cap { opacity: 1; transform: none; }
.cv-work-cap .t {
  color: #fff;
  font-weight: 500;
  font-size: 21px;
  margin: 0 0 3px;
  line-height: 1.3;
}
.cv-work-cap .c {
  color: var(--ms-green);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}
/* En pantallas táctiles el hover no existe: el caption se muestra siempre. */
@media (hover: none) {
  .cv-work-cap { opacity: 1; transform: none; }
}


/* ---------------------------------------------------------
   11. Referencias
   --------------------------------------------------------- */
.cv-refs {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  list-style: none;
  padding: 0;
  margin: 0 0 22px;
}
.cv-refs li {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--cv-line);
  border-radius: 16px;
  padding: 16px 26px;
  background: var(--cv-surface);
}
.cv-refs-note {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.45);
  font-style: italic;
  margin: 0;
}


/* ---------------------------------------------------------
   12. Botón flotante de descarga
   --------------------------------------------------------- */
.cv-fab {
  position: fixed;
  right: 26px;
  bottom: 96px;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--ms-green);
  color: var(--ms-navy);
  font-weight: 500;
  font-size: 16px;
  border: none;
  border-radius: 100px;
  padding: 14px 24px;
  cursor: pointer;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: all 0.35s ease;
}
.cv-fab.is-visible { opacity: 1; visibility: visible; transform: none; }
.cv-fab:hover { background: var(--ms-green-light); }
.cv-fab i { font-size: 19px; }
@media (max-width: 575px) {
  .cv-fab { right: 16px; bottom: 84px; padding: 12px 18px; font-size: 15px; }
  .cv-fab .txt { display: none; }
}

/* Solo visible en el PDF */
.cv-print-only { display: none; }


/* =========================================================
   13. @media print — ESTA es la hoja que produce el PDF
   El usuario pulsa «Descargar CV en PDF», se abre el diálogo
   de impresión y elige «Guardar como PDF».
   ========================================================= */
@media print {

  /* --- Página --- */
  @page {
    size: A4 portrait;
    margin: 13mm 14mm;
  }

  /* --- Reinicio a documento claro --- */
  html, body {
    background: #fff !important;
    color: #1a1a1a !important;
    font-size: 10.5pt !important;
    line-height: 1.5 !important;
  }
  body * {
    background-image: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
    animation: none !important;
    transition: none !important;
  }

  /* El wrapper del tema mete padding y fondo oscuro */
  .main-page-wrapper {
    padding: 0 !important;
    background: #fff !important;
  }

  /* Las utilidades de fondo del tema (.bg-one = negro) sobreviven al
     reinicio de body, así que hay que neutralizarlas una por una o el
     encabezado sale con texto navy sobre negro. */
  .bg-one, .bg-two, .bg-three, .bg-four, .bg-five, .bg-six,
  .bg-seven, .bg-eight, .bg-nine, .bg-grey,
  .dark-bg, .dark-bg-two, .dark-bg-three, .dark-bg-four, .dark-bg-five,
  .cv-hero, .inner-content {
    background: transparent !important;
    background-color: transparent !important;
  }
  /* Sin esquinas redondeadas del tema en el documento impreso */
  .border-30, .border-20, .cv-hero {
    border-radius: 0 !important;
  }
  .cv-page {
    --cv-line: #d6d9e3;
    --cv-line-strong: #b9bdcb;
    --cv-muted: #45485c;
  }
  .container, .container-fluid {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .row { margin: 0 !important; }
  [class*="col-"] {
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
  }

  /* --- Fuera del PDF --- */
  header.theme-main-menu,
  .footer-one,
  .fancy-banner-one,
  .inner-banner-two,
  .scroll-top,
  .preloader,
  #preloader,
  .cv-subnav,
  .cv-marquee,
  .cv-fab,
  .cv-actions,
  .cv-btn-ghost,
  .cv-btn-download,
  .cv-status,
  .cv-filter,
  .cv-stats,
  .shapes,
  .cv-hero::after,
  .cv-portrait-wrap::before {
    display: none !important;
  }

  .cv-print-only { display: block !important; }

  /* --- Encabezado del PDF --- */
  .cv-hero {
    padding: 0 0 10pt !important;
    border-bottom: 2pt solid #42E57D !important;
    margin-bottom: 14pt !important;
    page-break-after: avoid;
    break-after: avoid;
  }
  /* Retrato + identidad en una sola fila.
     flex-wrap:nowrap es imprescindible: .row de Bootstrap trae wrap y a
     ancho de hoja A4 el retrato se iría a un renglón aparte. */
  .cv-hero .row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: flex-start !important;
    gap: 12pt !important;
  }
  .cv-hero .cv-hero-portrait-col {
    flex: 0 0 26mm !important;
    width: 26mm !important;
    max-width: 26mm !important;
    order: 0 !important;
  }
  .cv-hero .cv-hero-body-col {
    flex: 1 1 auto !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important; /* permite encogerse sin desbordar */
    order: 1 !important;
  }
  .cv-portrait-wrap { display: block !important; }
  .cv-portrait {
    max-width: 26mm !important;
    width: 26mm !important;
    border-radius: 3pt !important;
    border: 1px solid #c9ccd8 !important;
  }

  .cv-name {
    color: #0d0f3d !important;
    font-size: 24pt !important;
    letter-spacing: -0.4pt !important;
    margin-bottom: 2pt !important;
  }
  .cv-role {
    color: #159c52 !important;
    font-size: 12pt !important;
    margin-bottom: 6pt !important;
  }
  .cv-tagline {
    color: #45485c !important;
    font-size: 9.5pt !important;
    line-height: 1.45 !important;
    max-width: none !important;
    margin-bottom: 8pt !important;
  }

  /* Contacto: una tira compacta de 3 columnas */
  .cv-contact-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 3pt 10pt !important;
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    margin-bottom: 0 !important;
  }
  .cv-contact-item {
    background: none !important;
    border: none !important;
    padding: 0 !important;
    gap: 5pt !important;
    align-items: baseline !important;
  }
  .cv-contact-item i { color: #159c52 !important; font-size: 8.5pt !important; }
  .cv-contact-item .label { display: none !important; }
  .cv-contact-item .value {
    color: #1a1a1a !important;
    font-size: 8.5pt !important;
    line-height: 1.35 !important;
  }

  /* --- Secciones --- */
  .cv-section {
    padding: 0 0 12pt !important;
  }
  .cv-section-head {
    margin-bottom: 8pt !important;
    page-break-after: avoid;
    break-after: avoid;
  }
  .cv-eyebrow {
    color: #159c52 !important;
    font-size: 7.5pt !important;
    letter-spacing: 1.4pt !important;
    margin-bottom: 3pt !important;
  }
  .cv-eyebrow::before { background: #42E57D !important; width: 14pt !important; }
  .cv-section-title {
    color: #0d0f3d !important;
    font-size: 14pt !important;
    line-height: 1.2 !important;
  }
  .cv-divider { background: #d6d9e3 !important; }
  h1, h2, h3, h4, h5, h6 { color: #0d0f3d !important; }
  p, li, span { color: #1a1a1a !important; }
  .cv-lead {
    color: #35384a !important;
    font-size: 9.5pt !important;
    line-height: 1.5 !important;
    margin-bottom: 5pt !important;
  }
  .cv-lead strong { color: #0d0f3d !important; }

  /* --- Timeline --- */
  .cv-timeline { padding-left: 9pt !important; }
  .cv-timeline::before {
    left: 1.5pt !important;
    background: #c9ccd8 !important;
  }
  .cv-job {
    padding-bottom: 11pt !important;
    page-break-inside: avoid;
    break-inside: avoid;
  }
  .cv-job::before {
    left: -9pt !important;
    top: 3.5pt !important;
    width: 4.5pt !important;
    height: 4.5pt !important;
    background: #42E57D !important;
    border: none !important;
  }
  .cv-job-period {
    color: #159c52 !important;
    font-size: 8.5pt !important;
    letter-spacing: 0.3pt !important;
    margin-bottom: 1pt !important;
  }
  .cv-job-title {
    font-size: 11.5pt !important;
    color: #0d0f3d !important;
    margin-bottom: 1pt !important;
  }
  .cv-job-company {
    font-size: 10pt !important;
    color: #1a1a1a !important;
    margin-bottom: 0 !important;
  }
  .cv-job-place {
    font-size: 8.5pt !important;
    color: #6a6d80 !important;
    margin-bottom: 3pt !important;
  }
  .cv-job-summary {
    font-size: 9.5pt !important;
    color: #35384a !important;
    line-height: 1.45 !important;
    margin-bottom: 3pt !important;
  }
  .cv-job-achievements { margin-bottom: 4pt !important; }
  .cv-job-achievements li {
    font-size: 9pt !important;
    color: #35384a !important;
    line-height: 1.45 !important;
    margin-bottom: 2pt !important;
    padding-left: 10pt !important;
  }
  .cv-job-achievements li::before {
    background: #42E57D !important;
    width: 5pt !important;
    top: 5.5pt !important;
    left: 0 !important;
  }
  .cv-badge-creative {
    background: none !important;
    color: #159c52 !important;
    border: 0.5pt solid #42E57D !important;
    font-size: 6.5pt !important;
    padding: 0.5pt 4pt !important;
  }
  .cv-tags { gap: 3pt !important; }
  .cv-tags li {
    background: none !important;
    border: 0.5pt solid #c9ccd8 !important;
    color: #45485c !important;
    font-size: 7.5pt !important;
    padding: 0.5pt 5pt !important;
  }

  /* --- Habilidades: dos columnas reales en el PDF --- */
  .cv-skills-grid {
    display: block !important;
    column-count: 2 !important;
    column-gap: 10pt !important;
  }
  .cv-skills-grid > [class*="col-"] {
    display: block !important;
    break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 8pt !important;
  }
  .cv-skill-group {
    background: none !important;
    border: 0.5pt solid #d6d9e3 !important;
    border-radius: 3pt !important;
    padding: 7pt 8pt !important;
    height: auto !important;
    page-break-inside: avoid;
    break-inside: avoid;
  }
  .cv-skill-group-head { margin-bottom: 5pt !important; gap: 5pt !important; }
  .cv-skill-group-head i { color: #159c52 !important; font-size: 10pt !important; }
  .cv-skill-group-head h3 { font-size: 10.5pt !important; }
  .cv-skill-group-head + .cv-skill-list { margin-top: 5pt !important; }
  .cv-skill-note {
    font-size: 8pt !important;
    color: #6a6d80 !important;
    padding-left: 0 !important;
    margin-bottom: 5pt !important;
  }
  .cv-skill { margin-bottom: 3.5pt !important; }
  .cv-skill-label { margin-bottom: 1.5pt !important; gap: 5pt !important; }
  .cv-skill-label .name { font-size: 8.5pt !important; color: #1a1a1a !important; }
  .cv-skill-label .pct { font-size: 7.5pt !important; color: #159c52 !important; }
  .cv-skill-track {
    height: 2.5pt !important;
    background: #e4e6ee !important;
    border-radius: 2pt !important;
  }
  /* En impresión las barras deben salir llenas sin depender del JS */
  .cv-skill-bar {
    width: var(--cv-level, 0%) !important;
    background: #42E57D !important;
  }

  /* --- Herramientas / idiomas / educación --- */
  .cv-chips { gap: 3pt !important; }
  .cv-chips li {
    border: 0.5pt solid #c9ccd8 !important;
    color: #35384a !important;
    font-size: 8pt !important;
    padding: 1pt 6pt !important;
  }
  .cv-lang-row { gap: 7pt !important; margin-bottom: 4pt !important; }
  .cv-lang-row .lname { font-size: 9pt !important; flex-basis: 22mm !important; color: #1a1a1a !important; }
  .cv-lang-row .lvl { font-size: 8.5pt !important; color: #159c52 !important; }

  .cv-edu-grid {
    display: block !important;
    column-count: 2 !important;
    column-gap: 10pt !important;
  }
  .cv-edu-grid > [class*="col-"] { break-inside: avoid; margin-bottom: 6pt !important; }
  .cv-edu {
    background: none !important;
    border: 0.5pt solid #d6d9e3 !important;
    border-radius: 3pt !important;
    padding: 7pt 8pt !important;
    gap: 7pt !important;
    page-break-inside: avoid;
    break-inside: avoid;
  }
  .cv-edu-icon {
    width: 16pt !important;
    height: 16pt !important;
    border-radius: 2pt !important;
    background: none !important;
    border: 0.5pt solid #42E57D !important;
    color: #159c52 !important;
    font-size: 9pt !important;
  }
  .cv-edu h3 { font-size: 10pt !important; }
  .cv-edu .inst { font-size: 9pt !important; color: #159c52 !important; }
  .cv-edu .period { font-size: 8pt !important; color: #6a6d80 !important; }
  .cv-edu .detail { font-size: 8.5pt !important; color: #35384a !important; line-height: 1.4 !important; }

  /* --- Portafolio: rejilla compacta, sin isotope --- */
  .cv-portfolio-section { page-break-before: auto; }
  /* Isotope deja el wrapper con height y los items en position:absolute.
     Hay que deshacer las dos cosas o el PDF sale con la rejilla colapsada. */
  #isotop-gallery-wrapper,
  #isotop-gallery-wrapper.grid-3column {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 5pt !important;
    height: auto !important;
    position: static !important;
    margin: 0 !important;
  }
  #isotop-gallery-wrapper .grid-sizer { display: none !important; }
  .grid-3column .isotop-item,
  .isotop-item {
    position: static !important;
    width: auto !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    opacity: 1 !important;
    padding: 0 !important;
    margin: 0 !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .cv-work {
    border-radius: 2pt !important;
    border: 0.5pt solid #d6d9e3 !important;
    /* El fondo #111 de pantalla dejaría el título navy ilegible */
    background: #fff !important;
  }
  .cv-work img {
    height: 22mm !important;
    object-fit: cover !important;
    transform: none !important;
  }
  .cv-work-cap {
    position: static !important;
    opacity: 1 !important;
    transform: none !important;
    background: none !important;
    padding: 2.5pt 3pt !important;
  }
  .cv-work-cap .t { font-size: 7.5pt !important; color: #0d0f3d !important; margin-bottom: 0 !important; }
  .cv-work-cap .c { font-size: 6pt !important; color: #159c52 !important; letter-spacing: 0.4pt !important; }

  /* --- Referencias --- */
  .cv-refs { gap: 5pt !important; margin-bottom: 4pt !important; }
  .cv-refs li {
    background: none !important;
    border: 0.5pt solid #d6d9e3 !important;
    border-radius: 2pt !important;
    padding: 4pt 8pt !important;
    font-size: 9pt !important;
    color: #1a1a1a !important;
  }
  .cv-refs-note { font-size: 8.5pt !important; color: #6a6d80 !important; }

  /* --- Pie del PDF --- */
  .cv-print-footer {
    border-top: 0.5pt solid #d6d9e3 !important;
    margin-top: 8pt !important;
    padding-top: 5pt !important;
    font-size: 7.5pt !important;
    color: #6a6d80 !important;
    display: flex !important;
    justify-content: space-between !important;
    gap: 10pt !important;
  }

  /* Los enlaces salen como texto plano, sin URL adjunta */
  a { text-decoration: none !important; color: inherit !important; }
  a[href]::after { content: none !important; }

  /* Nada de animaciones de entrada a medio camino: en el PDF todo va visible */
  .wow, .animated, .cv-reveal,
  .cv-js .cv-reveal {
    visibility: visible !important;
    opacity: 1 !important;
    animation: none !important;
    transform: none !important;
    transition: none !important;
  }
}
