@charset "UTF-8";

/* ==========================================================
   ÍNDICE
   1. Variables
   2. Base
   3. Utilidades (container, lead, btn)
   4. Cabecera y menú
   5. Presentación (hero)
   6. Secciones y títulos
   7. Experiencia
   8. Skills
   9. Formación
   10. Contacto
   11. Pie de página
   12. Responsive
   ========================================================== */


/* 1. VARIABLES
   ========================================================== */
:root {
  /* Colores */
  --color-fondo-oscuro: #05122a;   /* header, títulos de sección, footer */
  --color-texto: #212529;          /* texto principal */
  --color-texto-suave: #3c4146;    /* párrafos de presentación */
  --color-gris: #a8a8a8;           /* texto sobre fondo oscuro */
  --color-claro: #f8f9fa;          /* hover sobre fondo oscuro, fondos suaves */
  --color-borde: #ccc;
  --color-acento: #00538c;         /* botón principal */
  --color-acento-hover: #00395f;

  /* Tipografías */
  --fuente-titulos: "Nunito", sans-serif;
  --fuente-texto: "Open Sans", sans-serif;

  /* Medidas */
  --ancho-max: 1100px;
  --radio: 8px;
}


/* 2. BASE
   ========================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* evita que el header tape los títulos al navegar */
}

body {
  font-family: var(--fuente-texto);
  color: var(--color-texto);
  line-height: 1.6;
}

ul {
  list-style: none;
}

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

img {
  max-width: 100%;
  display: block;
}

:focus-visible {
  outline: 3px solid var(--color-acento);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}


/* 3. UTILIDADES
   ========================================================== */
.container {
  width: 100%;
  max-width: var(--ancho-max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.lead {
  font-size: 1.2rem;
  max-width: 62ch;
}

.btn {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radio);
  background: var(--color-acento);
  color: var(--color-claro);
  font-family: var(--fuente-titulos);
  font-style: italic;
  font-weight: 700;
  transition: background 200ms;
}

.btn:hover {
  background: var(--color-acento-hover);
}


/* 4. CABECERA Y MENÚ
   ========================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--color-fondo-oscuro);
  border-bottom: 1px solid var(--color-texto-suave);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}

.brand {
  font-family: var(--fuente-titulos);
  font-style: italic;
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--color-gris);
  transition: color 200ms;
}

.brand:hover {
  color: var(--color-claro);
}

.nav {
  display: flex;
  gap: 1.75rem;
}

.nav a {
  color: var(--color-gris);
  font-size: 1.05rem;
  transition: color 200ms;
}

.nav a:hover {
  color: var(--color-claro);
  text-decoration: underline;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--color-gris);
  border-radius: var(--radio);
  color: var(--color-gris);
  font-size: 1.3rem;
  padding: 0.2rem 0.7rem;
  cursor: pointer;
}


/* 5. PRESENTACIÓN (HERO)
   ========================================================== */
.hero {
  padding: 3.5rem 0;
}

.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
}

.hero-text h1 {
  font-family: var(--fuente-titulos);
  font-style: italic;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.15;
  margin-bottom: 1.25rem;
}

.hero-text .lead {
  color: var(--color-texto-suave);
  margin-bottom: 1rem;
}

.hero-photo img {
  width: clamp(150px, 24vw, 280px);
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
}

/* Íconos de redes (usado en hero y contacto) */
.social {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 1.75rem;
}

.social a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.9rem;
}

.social img {
  width: 44px;
  height: 44px;
  padding: 5px;
  border-radius: 50%;
  background: var(--color-fondo-oscuro);
  transition: border-radius 200ms;
}

.social a:hover img {
  border-radius: 12%;
}


/* 6. SECCIONES Y TÍTULOS
   ========================================================== */
.section {
  padding-bottom: 3rem;
}

.section-title {
  margin-bottom: 2rem;
  padding: 1rem;
  background: var(--color-fondo-oscuro);
  color: var(--color-gris);
  font-family: var(--fuente-titulos);
  font-style: italic;
  font-size: 2rem;
  text-align: center;
}


/* 7. EXPERIENCIA
   ========================================================== */
.job {
  margin-bottom: 2.5rem;
}

.job h3 {
  font-size: 1.4rem;
}

.job-date {
  color: var(--color-texto-suave);
  margin-bottom: 0.75rem;
}

.job ul {
  display: grid;
  gap: 0.5rem;
  padding-left: 1.25rem;
  list-style: disc;
  max-width: 80ch;
}

.job-previous {
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-borde);
}

.job-previous h3 {
  margin-bottom: 0.75rem;
}


/* 8. SKILLS
   ========================================================== */
.skills {
  display: grid;
  gap: 1.75rem;
}

.skill-group h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.chips li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--color-borde);
  border-radius: 999px;
  background: var(--color-claro);
}

.chips img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}


/* 9. FORMACIÓN
   ========================================================== */
.edu-group {
  margin-bottom: 2rem;
}

.edu-group h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.edu-list {
  display: grid;
  gap: 0.75rem;
}

.edu-list li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-borde);
}

.edu-list a {
  font-weight: 600;
}

.edu-list a:hover {
  color: var(--color-acento);
  text-decoration: underline;
}

.edu-list span {
  color: var(--color-texto-suave);
}


/* 10. CONTACTO
   ========================================================== */
.contact-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.contact .social {
  justify-content: center;
}

.note {
  color: var(--color-texto-suave);
  font-size: 0.95rem;
}


/* 11. PIE DE PÁGINA
   ========================================================== */
.site-footer {
  padding: 1.5rem 0;
  background: var(--color-fondo-oscuro);
  color: var(--color-gris);
  text-align: center;
}

.site-footer .brand {
  font-size: 1.6rem;
}


/* 12. RESPONSIVE
   ========================================================== */
@media (max-width: 900px) {
  .hero-inner {
    flex-direction: column-reverse;
    text-align: center;
    gap: 1.5rem;
  }

  .hero-text .lead {
    margin-left: auto;
    margin-right: auto;
  }

  .social {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--color-fondo-oscuro);
    border-bottom: 1px solid var(--color-texto-suave);
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    padding: 0.9rem 1.25rem;
  }

  .lead {
    font-size: 1.05rem;
  }

  .section-title {
    font-size: 1.6rem;
  }
}
