/* =====================================================
   CV — Erika Adai Reyes Herrera
   Dark Modern Premium — style.css
   ===================================================== */

/* ---------- CSS RESET & BASE ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg:           #05070D;
  --sidebar-bg:   #0A0E18;
  --card-bg:      #0D111B;
  --chip-bg:      #111827;
  --primary:      #5B5FFF;
  --secondary:    #8B5CF6;
  --border:       #232838;
  --chip-border:  #2A3347;
  --text:         #FFFFFF;
  --text-sec:     #C5C7D0;
  --text-muted:   #7E8A9E;
  --font:         'Poppins', sans-serif;
  --radius-card:  14px;
  --radius-chip:  8px;

  /* Carta (Letter) at 96dpi ≈ 850 × 1100px.
     Se usa un poco más de ancho (900px) para que sidebar + contenido
     se estiren horizontalmente y no dejen espacio vacío a los lados. */
  --page-w: 900px;
  --page-h: 1100px;
}

html, body {
  background: #000;
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- PAGE WRAPPER ---------- */
.page-wrapper {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  padding: 24px;
  background: #000;
}

/* ---------- CV ROOT ---------- */
.cv-root {
  width: var(--page-w);
  min-height: var(--page-h);
  background: var(--bg);
  display: flex;
  flex-direction: row;
  overflow: hidden;
  box-shadow: 0 0 80px rgba(91, 95, 255, 0.15), 0 0 160px rgba(139, 92, 246, 0.08);
  position: relative;
}

/* subtle bg glow */
.cv-root::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(91,95,255,0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ======================================================
   SIDEBAR  (28%)
   ====================================================== */
.sidebar {
  width: 28%;
  min-height: 100%;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  z-index: 1;
}

/* ---- Photo ---- */
.photo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.photo-ring {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 0 24px rgba(91,95,255,0.45), 0 0 48px rgba(91,95,255,0.18);
  flex-shrink: 0;
}

.photo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: var(--card-bg);
}

/* ---- Sidebar Section ---- */
.sb-section {
  padding: 16px 0;
  border-top: 1px solid var(--border);
}

.sb-section:first-of-type {
  border-top: none;
}

/* ---- Sidebar Heading ---- */
.sb-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.sb-heading-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--primary);
}

.sb-heading-text {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
}

/* ---- Contact Items ---- */
.contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.contact-item svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  color: var(--primary);
}

.contact-item a,
.contact-item span {
  font-size: 10px;
  color: var(--text-sec);
  text-decoration: none;
  line-height: 1.4;
  word-break: break-all;
}

.contact-item a:hover {
  color: var(--primary);
}

/* ---- Tech Groups ---- */
.tech-group {
  margin-bottom: 10px;
}

.tech-group-label {
  font-size: 9px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.chip {
  font-size: 9px;
  font-weight: 500;
  color: var(--text-sec);
  background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  border-radius: var(--radius-chip);
  padding: 3px 8px;
  white-space: nowrap;
  line-height: 1.4;
}

/* ---- Tools List ---- */
.tools-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.tools-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  color: var(--text-sec);
}

.tool-icon {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  background: var(--border);
  overflow: hidden;
}

/* Tool color accents */
.tool-icon.vscode    { background: #007ACC; }
.tool-icon.android   { background: #3DDC84; color: #000; }
.tool-icon.netbeans  { background: #1B6AC6; }
.tool-icon.cisco     { background: #1BA0D8; }
.tool-icon.canva     { background: #00C4CC; color: #000; }
.tool-icon.notion    { background: #fff; color: #000; }
.tool-icon.excel     { background: #217346; }

/* ---- Skills ---- */
.skills-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.skills-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  color: var(--text-sec);
}

.skill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
  box-shadow: 0 0 5px rgba(91,95,255,0.6);
}

/* ---- Languages ---- */
.lang-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lang-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lang-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.lang-name {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text);
}

.lang-level {
  font-size: 9px;
  color: var(--text-muted);
}

.lang-dots {
  display: flex;
  gap: 4px;
}

.lang-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.2s;
}

.lang-dot.filled {
  background: var(--secondary);
  box-shadow: 0 0 6px rgba(139,92,246,0.6);
}


/* ======================================================
   CONTENT  (72%)
   ====================================================== */
.content {
  width: 72%;
  min-height: 100%;
  background: var(--bg);
  padding: 28px 28px 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  z-index: 1;
}

/* ---- CV Header ---- */
.cv-header {
  margin-bottom: 18px;
}

.cv-name {
  line-height: 1.05;
  margin-bottom: 8px;
}

.cv-name .first {
  display: block;
  font-size: 38px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
}

.cv-name .last {
  display: block;
  font-size: 38px;
  font-weight: 800;
  background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.01em;
  text-shadow: none;
  filter: drop-shadow(0 0 14px rgba(91,95,255,0.4));
}

.cv-accent-bar {
  width: 44px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 2px;
  margin-bottom: 10px;
  box-shadow: 0 0 10px rgba(91,95,255,0.5);
}

.cv-specialties {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.specialty-text {
  font-size: 10.5px;
  color: var(--text-sec);
  font-weight: 400;
}

.specialty-sep {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
  box-shadow: 0 0 4px rgba(91,95,255,0.7);
}

.cv-title {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 2px;
}

/* ---- Section generic ---- */
.cv-section {
  margin-bottom: 16px;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.section-icon {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: rgba(91,95,255,0.15);
  border: 1px solid rgba(91,95,255,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.section-icon svg {
  width: 13px;
  height: 13px;
  color: var(--primary);
}

.section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  flex: 1;
}

.section-divider {
  height: 1px;
  background: var(--border);
  margin-bottom: 12px;
}

/* ---- Profile text ---- */
.profile-text {
  font-size: 11px;
  line-height: 1.75;
  color: var(--text-sec);
  font-weight: 400;
}

/* ---- Timeline (Experience & Education) ---- */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  padding-left: 16px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: linear-gradient(to bottom, var(--primary), transparent);
}

.tl-item {
  position: relative;
  padding-left: 16px;
  padding-bottom: 14px;
}

.tl-item:last-child {
  padding-bottom: 0;
}

.tl-dot {
  position: absolute;
  left: -12px;
  top: 6px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--secondary);
  box-shadow: 0 0 8px rgba(139,92,246,0.7);
  flex-shrink: 0;
}

.tl-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 2px;
}

.tl-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.tl-period {
  font-size: 10px;
  font-weight: 500;
  color: var(--primary);
  white-space: nowrap;
  flex-shrink: 0;
}

.tl-company {
  font-size: 10px;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 6px;
}

.tl-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tl-list li {
  font-size: 10.5px;
  color: var(--text-sec);
  line-height: 1.6;
  padding-left: 12px;
  position: relative;
}

.tl-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-size: 10px;
  line-height: 1.6;
}

/* ---- Projects ---- */
.projects-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Featured project card */
.project-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 14px 16px;
}

.project-card.featured {
  border-color: var(--primary);
  box-shadow: 0 0 20px rgba(91,95,255,0.12), inset 0 0 40px rgba(91,95,255,0.03);
}

.featured-label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.featured-star {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: rgba(139,92,246,0.2);
  border: 1px solid rgba(139,92,246,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.featured-star svg {
  width: 10px;
  height: 10px;
  color: var(--secondary);
}

.featured-tag {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--secondary);
}

.proj-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 2px;
}

.proj-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.proj-period {
  font-size: 10px;
  font-weight: 500;
  color: var(--primary);
  white-space: nowrap;
  flex-shrink: 0;
}

.proj-subtitle {
  font-size: 10px;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 6px;
}

.proj-description {
  font-size: 10.5px;
  color: var(--text-sec);
  line-height: 1.6;
  margin-bottom: 8px;
}

/* Badge chips for projects */
.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 8px;
}

.badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 9px;
  font-weight: 500;
  color: var(--text-sec);
  background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  border-radius: 7px;
  padding: 3px 8px;
  white-space: nowrap;
}

.badge svg {
  width: 9px;
  height: 9px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.proj-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.proj-list li {
  font-size: 10.5px;
  color: var(--text-sec);
  line-height: 1.6;
  padding-left: 12px;
  position: relative;
}

.proj-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-size: 10px;
  line-height: 1.6;
}

/* ---- Bottom Row ---- */
.cv-bottom-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.cv-bottom-half {
  flex: 1;
  margin-bottom: 0;
}

/* ---- Learning list ---- */
.learning-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.learning-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 10.5px;
  color: var(--text-sec);
  line-height: 1.5;
}

.learning-item::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
  margin-top: 5px;
  box-shadow: 0 0 5px rgba(91,95,255,0.5);
}

/* ---- Interest chips ---- */
.interests-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.interest-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 9.5px;
  font-weight: 500;
  color: var(--text-sec);
  background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  padding: 4px 10px;
}

.interest-chip svg {
  width: 9px;
  height: 9px;
  color: var(--secondary);
  flex-shrink: 0;
}

/* ---- Education (reuses timeline but simpler) ---- */
.edu-card {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.edu-left {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.edu-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--secondary);
  box-shadow: 0 0 8px rgba(139,92,246,0.7);
  flex-shrink: 0;
  margin-top: 4px;
}

.edu-degree {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
  line-height: 1.3;
}

.edu-institution {
  font-size: 10px;
  color: var(--text-muted);
  font-style: italic;
}

.edu-badge {
  font-size: 10px;
  font-weight: 500;
  color: var(--primary);
  text-align: right;
  white-space: nowrap;
  flex-shrink: 0;
}


/* ======================================================
   BOTÓN DE DESCARGA (no forma parte del CV capturado)
   ====================================================== */
.btn-download-pdf {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  padding: 12px 22px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  font-family: var(--font);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(91, 95, 255, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.btn-download-pdf:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(91, 95, 255, 0.45); }
.btn-download-pdf:disabled { opacity: 0.6; cursor: wait; transform: none; }

/* Por si alguien también usa Ctrl+P: el botón nunca debe imprimirse */
@media print {
  .btn-download-pdf { display: none !important; }
}

/* ======================================================
   PRINT STYLES
   ====================================================== */
@media print {
  body { background: var(--bg); }
  .page-wrapper { padding: 0; background: var(--bg); }
  .cv-root {
    width: 215.9mm;
    min-height: 279.4mm;
    box-shadow: none;
  }
}

/* ======================================================
   RESPONSIVE (screen smaller than A4)
   ====================================================== */
@media screen and (max-width: 840px) {
  .page-wrapper { padding: 0; }

  .cv-root {
    width: 100%;
    min-height: auto;
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .content {
    width: 100%;
  }

  .cv-bottom-row {
    flex-direction: column;
  }

  .cv-name .first,
  .cv-name .last {
    font-size: 28px;
  }
}