.back-link {
  color: var(--text-dim);
  text-decoration: none;
}

.back-link:hover {
  color: var(--text);
}

.cv-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 110px 24px 60px;
}

/* Cabecera */
.cv-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.cv-header-main h1 {
  font-family: var(--sans);
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--text);
}

.cv-role {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--violet);
  margin: 0 0 6px;
}

.cv-meta {
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--text-dim);
  margin: 0;
}

.cv-meta a {
  color: var(--text-dim);
  text-decoration: none;
  border-bottom: 1px dotted var(--line);
}

.cv-meta a:hover {
  color: var(--text);
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--violet);
  color: #fff;
  text-decoration: none;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 14px;
  padding: 11px 18px;
  border-radius: 8px;
  white-space: nowrap;
  transition: background 0.15s ease, transform 0.15s ease;
}

.download-btn:hover {
  background: #6a4ce0;
  transform: translateY(-1px);
}

.download-icon {
  font-family: var(--mono);
}

.cv-header-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.lang-switch {
  display: flex;
  gap: 4px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 3px;
}

.lang-btn {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  background: transparent;
  border: none;
  color: var(--text-dim);
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.lang-btn:hover {
  color: var(--text);
}

.lang-btn.active {
  background: var(--violet);
  color: #fff;
}

/* Secciones */
.cv-section {
  margin-bottom: 38px;
}

.cv-section-title {
  font-family: var(--mono);
  font-size: 15px;
  color: var(--text);
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cv-section-title .prompt-sym {
  color: var(--coral);
}

.cv-summary {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-dim);
  margin: 0;
}

/* Entradas de experiencia/formación */
.cv-entry {
  margin-bottom: 26px;
}

.cv-entry-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.cv-entry-head h3 {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.cv-entry-sub {
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--violet);
  margin: 2px 0 0;
}

.cv-dates {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--text-dim);
  white-space: nowrap;
}

.cv-bullets {
  margin: 0;
  padding-left: 20px;
  list-style: none;
}

.cv-bullets li {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-dim);
  margin-bottom: 6px;
  position: relative;
}

.cv-bullets li::before {
  content: '–';
  position: absolute;
  left: -16px;
  color: var(--coral);
}

/* Habilidades */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.skill-group h4 {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--violet);
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.skill-group p {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--text-dim);
  margin: 0;
  line-height: 1.5;
}

/* Idiomas */
.cv-langs {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--text-dim);
  margin: 0;
}

@media (max-width: 540px) {
  .cv-header {
    flex-direction: column;
  }
  .cv-header-actions {
    width: 100%;
    align-items: stretch;
  }
  .lang-switch {
    align-self: flex-end;
  }
  .download-btn {
    width: 100%;
    justify-content: center;
  }
}

@media print {
  header.top, .download-btn, footer.bottom { display: none; }
}
