/* Reset básico */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Variables (fácil de ajustar luego) */
:root {
  --bg-main: #f5f7fa;
  --bg-card: #ffffff;
  --text-main: #1f2933;
  --text-muted: #4b5563;
  --primary: #2563eb;
  --border: #e5e7eb;
}

/* Base */
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  padding: 40px 20px;
}

.navbar {
  max-width: 900px;
  margin: 0 auto 24px auto;
  display: flex;
  justify-content: center;
  gap: 24px;
}

.navbar a {
  text-decoration: none;
  font-weight: 500;
  color: var(--text-muted);
}

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

.header {
  text-align: center;
}

.profile-img {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 16px;
  border: 3px solid var(--primary);
}

/* Contenedor general */
header,
section {
  max-width: 900px;
  margin: 0 auto 40px auto;
  background: var(--bg-card);
  padding: 32px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

/* Header */
header h1 {
  font-size: 2.2rem;
  margin-bottom: 8px;
}

header p {
  font-size: 1.1rem;
  color: var(--text-muted);
}

/* Títulos */
section h2 {
  font-size: 1.4rem;
  margin-bottom: 16px;
  color: var(--primary);
}

/* Texto */
section p {
  margin-bottom: 12px;
  color: var(--text-main);
}

/* Listas */
ul {
  padding-left: 20px;
}

li {
  margin-bottom: 8px;
  color: var(--text-main);
}

/* Experiencia */
#experiencia h3 {
  margin-top: 24px;
  font-size: 1.1rem;
}

#experiencia p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

#experiencia ul {
  margin-top: 12px;
}

#experiencia li {
  line-height: 1.5;
}
/* Contacto */
#contacto p {
  font-weight: 500;
}

/* Responsive */
@media (max-width: 600px) {
  body {
    padding: 20px 10px;
  }

  header,
  section {
    padding: 24px;
  }

  header h1 {
    font-size: 1.8rem;
  }
}

.experience-cards {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.experience-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}

.experience-card h3 {
  margin-bottom: 6px;
  font-size: 1.1rem;
}

.experience-meta {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.experience-card ul {
  padding-left: 18px;
}

.experience-card li {
  margin-bottom: 8px;
  line-height: 1.5;
}

/* Dark mode */
body.dark {
  --bg-main: #0f172a;
  --bg-card: #020617;
  --text-main: #e5e7eb;
  --text-muted: #9ca3af;
  --border: #1e293b;
  --primary: #38bdf8;
}

/* Botón toggle */
#theme-toggle {
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--text-muted);
}

#theme-toggle:hover {
  color: var(--primary);
}

.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 768px) {
  .fade-in {
    opacity: 1;
    transform: none;
  }
  body {
    padding: 16px 12px;
  }

  header,
  section {
    padding: 20px;
    margin-bottom: 24px;
  }

  header h1 {
    font-size: 1.6rem;
    line-height: 1.2;
  }

  header p {
    font-size: 1rem;
  }

  section h2 {
    font-size: 1.25rem;
  }

  /* Navbar más usable */
  .navbar {
    flex-wrap: wrap;
    gap: 10px !important;
  }

  .navbar a {
    font-size: 0.95rem;
  }

  /* Cards */
  .experience-card {
    padding: 20px;
  }

  .experience-card h3 {
    font-size: 1rem;
  }

  .experience-meta {
    font-size: 0.8rem;
  }

  .experience-card li {
    font-size: 0.95rem;
  }

  /* Impacto más claro */
  .impact strong {
    font-size: 0.95rem;
  }

  .impact li {
    font-size: 0.9rem;
  }
}
.impact {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}

.impact strong {
  display: block;
  margin-bottom: 8px;
  color: var(--primary);
}

.impact ul {
  padding-left: 18px;
}

.impact li {
  font-size: 0.95rem;
}

.contact-list {
  list-style: none;
  padding: 0;
}

.contact-list li {
  margin-bottom: 12px;
}

.contact-list a {
  text-decoration: none;
  font-weight: 500;
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

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

.project-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
  margin-top: 28px;
}

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