/* ============================================
   PRADO FOX — CV
   Mismo sistema que la home (style.css), en claro
   y con una versión de impresión de una página.
   ============================================ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Tokens y tipografía: /tokens.css */

body {
  font-family: var(--font);
  font-weight: 400;
  background: var(--white);
  color: var(--black);
  -webkit-font-smoothing: antialiased;
  font-synthesis: none;
}

a { color: inherit; text-decoration: none; }

/* ---- NAV ---- */

nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 32px;
  mix-blend-mode: difference;
}

.nav-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--white);
  background: none;
  border: 0;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.2s;
}

.nav-label:hover { opacity: 0.5; }

.nav-right { display: flex; gap: 32px; }

/* ---- HERO ---- */

.cv-hero {
  padding: 160px 32px 120px;
}

.cv-name {
  font-size: 13vw;
  font-weight: 700;
  line-height: 0.82;
  letter-spacing: -0.02em;
}

.cv-role {
  margin-top: 40px;
  font-size: 14px;
  font-weight: 700;
  color: var(--gray);
}

.cv-summary {
  margin-top: 64px;
  font-size: clamp(22px, 2.6vw, 38px);
  font-weight: 700;
  line-height: 1.35;
  max-width: 880px;
}

/* ---- SECCIONES: etiqueta a la izquierda, contenido a la derecha ---- */

.cv-section {
  display: grid;
  grid-template-columns: var(--col) 1fr;
  column-gap: var(--gap);
  padding: 56px 32px;
  border-top: 1px solid var(--line);
}

.section-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--gray);
  padding-top: 6px;
}

/* Filas de experiencia / educación */
.entry + .entry { margin-top: 48px; }

.entry-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
}

.entry-title {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
}

.entry-org { color: var(--gray); }

.entry-when {
  font-size: 12px;
  font-weight: 700;
  color: var(--gray);
  white-space: nowrap;
}

.entry p,
.entry li {
  font-size: 16px;
  line-height: 1.5;
  max-width: 720px;
}

.entry p { margin-top: 12px; }

.entry ul {
  list-style: none;
  margin-top: 12px;
}

.entry li {
  position: relative;
  padding-left: 18px;
}

.entry li + li { margin-top: 6px; }

.entry li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--gray);
}

/* Lista de trabajo seleccionado (mismo ritmo que .project-list de la home) */
.work-list a,
.work-list div {
  display: flex;
  align-items: baseline;
  gap: var(--gap);
  padding: 14px 0;
}

.work-list a { transition: opacity 0.2s; }
.work-list a:hover { opacity: 0.4; }

.work-name {
  font-size: 24px;
  font-weight: 700;
  min-width: 220px;
  flex-shrink: 0;
}

.work-type {
  font-size: 14px;
  color: var(--gray);
  flex: 1;
}

.work-arrow { font-size: 14px; color: var(--gray); }

/* Nombres de proyectos que llevan a su sitio */
.entry-org a,
.entry p a,
.entry li a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; transition: opacity 0.2s; }
.entry-org a:hover,
.entry p a:hover,
.entry li a:hover { opacity: 0.5; }

/* Stack: grupos en columnas */
.stack {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 32px var(--gap);
}

.stack h3 {
  font-size: 12px;
  font-weight: 700;
  color: var(--gray);
  margin-bottom: 10px;
}

.stack p {
  font-size: 16px;
  line-height: 1.5;
}

/* ---- FOOTER ---- */

footer {
  padding: 56px 32px 0;
  border-top: 1px solid var(--line);
}

.footer-top {
  display: grid;
  grid-template-columns: var(--col) auto 1fr;
  column-gap: var(--gap);
  align-items: baseline;
}

.footer-top span,
.footer-top a {
  font-size: 12px;
  font-weight: 700;
  color: var(--gray);
  transition: opacity 0.2s;
}

.footer-top a:hover { opacity: 0.5; }

.footer-phrase {
  font-size: clamp(56px, 11vw, 152px);
  font-weight: 700;
  line-height: 0.88;
  letter-spacing: -0.02em;
  margin-top: 80px;
  padding-bottom: 48px;
}

/* Solo aparece en impresión */
.print-only { display: none; }

/* ---- RESPONSIVE ---- */

@media screen and (max-width: 768px) {
  nav { padding: 20px; }
  .nav-right { gap: 20px; }

  .cv-hero { padding: 120px 20px 80px; }
  .cv-name { font-size: 19vw; }
  .cv-summary { margin-top: 40px; font-size: clamp(20px, 5vw, 28px); }

  .cv-section {
    grid-template-columns: 1fr;
    row-gap: 28px;
    padding: 40px 20px;
  }

  .entry-head { flex-direction: column; gap: 4px; }
  .entry-title { font-size: 20px; }

  .work-list a,
  .work-list div { flex-direction: column; gap: 2px; padding: 12px 0; }
  .work-name { font-size: 20px; min-width: 0; }

  footer { padding: 40px 20px 0; }
  .footer-top {
    grid-template-columns: 1fr;
    row-gap: 12px;
  }
  .footer-phrase { font-size: clamp(44px, 13vw, 100px); }
}

/* ---- IMPRESIÓN: CV de una página, Cmd+P → Guardar como PDF ---- */

/* El margen vive en el body y no en @page: así sale igual aunque
   el diálogo de impresión tenga "Márgenes: Ninguno" */
@page {
  size: letter;
  margin: 0;
}

@media print {
  :root { --col: 120px; --gap: 20px; --line: #ccc; }

  body { background: #fff; color: #000; padding: 14mm 14mm 12mm; }

  nav,
  .footer-phrase,
  .no-print { display: none !important; }

  .print-only { display: block; }

  .cv-hero { padding: 0 0 14px; }
  .cv-name { font-size: 34px; line-height: 1; letter-spacing: -0.01em; }
  .cv-role { margin-top: 6px; font-size: 11px; color: #555; }
  .cv-summary { margin-top: 10px; font-size: 11.5px; line-height: 1.45; max-width: none; }

  .print-contact {
    margin-top: 8px;
    font-size: 10px;
    font-weight: 700;
    color: #555;
  }

  .cv-section {
    padding: 10px 0;
    break-inside: avoid;
  }

  .section-label { font-size: 9px; padding-top: 2px; color: #555; }

  .entry { break-inside: avoid; }
  .entry + .entry { margin-top: 10px; }
  .entry-title { font-size: 12px; }
  .entry-when { font-size: 9px; color: #555; }
  .entry p, .entry li { font-size: 10px; line-height: 1.4; max-width: none; }
  .entry p, .entry ul { margin-top: 3px; }
  .entry li + li { margin-top: 1px; }
  .entry-org, .work-type { color: #555; }

  .work-list a, .work-list div { padding: 2px 0; }
  .work-name { font-size: 11px; min-width: 150px; }
  .work-type { font-size: 10px; }

  .stack { grid-template-columns: repeat(4, 1fr); gap: 6px 16px; }
  .stack h3 { font-size: 9px; margin-bottom: 2px; color: #555; }
  .stack p { font-size: 10px; line-height: 1.4; }

  footer { display: none; }
}

/* ---- KEY FACTS ---- */

.facts { display: grid; row-gap: 10px; }

.facts > div {
  display: grid;
  grid-template-columns: 160px 1fr;
  column-gap: 24px;
  font-size: 16px;
  line-height: 1.5;
}

.facts dt { font-weight: 700; }

a.u { text-decoration: underline; text-underline-offset: 3px; }

/* Huecos por llenar — quitar antes de publicar */
mark.todo {
  background: #FFE45C;
  color: var(--black);
  padding: 0 4px;
}

@media screen and (max-width: 768px) {
  .facts > div { grid-template-columns: 1fr; }
}

@media print {
  .facts { row-gap: 1px; }
  .facts > div { grid-template-columns: 90px 1fr; column-gap: 10px; font-size: 10px; line-height: 1.4; }
}
