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

body {
  font-family: 'Poppins', sans-serif;
  line-height: 1.6;
  color: #333;
  background: #f8f9fa;
  scroll-behavior: smooth;
}

/* --------------------------
   HEADER Y MENÚ RESPONSIVE
-------------------------- */
header {
  background: #ffffff;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
}

.logo {
  font-size: 1.6rem;
  font-weight: 700;
  color: #2c3e50;
  text-decoration: none;
}

.menu-btn {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.menu-btn span {
  width: 28px;
  height: 3px;
  background: #2c3e50;
  margin: 4px 0;
  transition: 0.3s;
  border-radius: 3px;
}

.menu-btn.active span:nth-child(1) { transform: rotate(-45deg) translate(-5px, 6px); }
.menu-btn.active span:nth-child(2) { opacity: 0; }
.menu-btn.active span:nth-child(3) { transform: rotate(45deg) translate(-5px, -6px); }

nav {
  display: flex;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 1.8rem;
}

nav ul li a {
  color: #2c3e50;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: color 0.3s ease;
  position: relative;
}

nav ul li a:hover {
  color: #3498db;
}

nav ul li a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: #3498db;
  transition: width 0.3s ease;
}

nav ul li a:hover::after {
  width: 100%;
}

/* --- Responsive Menú --- */
@media (max-width: 768px) {
  .menu-btn {
    display: flex;
  }

  nav {
    position: fixed;
    top: 70px;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: calc(100vh - 70px);
    background: white;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    transition: right 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 999;
    padding: 2rem 0;
  }

  nav.active {
    right: 0;
  }

  nav ul {
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    padding: 1rem 0;
  }

  nav ul li {
    width: 100%;
    text-align: center;
  }

  nav ul li a {
    padding: 0.8rem 1rem;
    display: block;
    border-radius: 8px;
    transition: background 0.3s;
  }

  nav ul li a:hover {
    background: #f0f7ff;
    color: #3498db;
  }
}

/* --------------------------
   HERO / SOBRE MÍ
-------------------------- */
.hero {
  padding: 6rem 2rem;
  background: linear-gradient(135deg, #3498db, #2c3e50);
  color: white;
  text-align: center;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.perfil-container {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.perfil-img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid rgba(255,255,255,0.3);
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  transition: transform 0.3s ease;
}

.perfil-img:hover {
  transform: scale(1.05);
}

.descripcion h1 {
  font-size: 2.8rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.descripcion p {
  font-size: 1.2rem;
  opacity: 0.9;
  max-width: 700px;
  margin: 0 auto;
}

/* --------------------------
   SECCIONES GENÉRICAS
-------------------------- */
.seccion {
  padding: 5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.seccion h2 {
  font-size: 2.2rem;
  margin-bottom: 2.5rem;
  color: #2c3e50;
  font-weight: 600;
}

.seccion h2::after {
  content: '';
  display: block;
  width: 100px;
  height: 4px;
  background: #3498db;
  margin: 0.5rem auto;
  border-radius: 2px;
}

/* --------------------------
   SKILLS - CARDS
-------------------------- */
.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.skill-card {
  background: white;
  padding: 2rem 1.5rem;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  text-align: center;
  transition: all 0.3s ease;
  border: 1px solid #eaeaea;
}

.skill-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.12);
  border-color: #3498db;
}

.skill-card i {
  font-size: 2.8rem;
  color: #3498db;
  margin-bottom: 1rem;
}

.skill-card h3 {
  color: #2c3e50;
  font-size: 1.5rem;
  margin-bottom: 0.6rem;
  font-weight: 600;
}

.skill-card p {
  color: #7f8c8d;
  font-size: 1rem;
  line-height: 1.5;
}

/* --------------------------
   LISTAS: HERRAMIENTAS Y HOBBIES
-------------------------- */
.herramientas-list, .hobbies-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.2rem;
  margin-top: 1rem;
}

.herramientas-list li, .hobbies-list li {
  background: #e3f2fd;
  color: #1565c0;
  padding: 0.8rem 1.6rem;
  border-radius: 30px;
  font-weight: 500;
  font-size: 0.95rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: transform 0.2s;
}

.herramientas-list li:hover, .hobbies-list li:hover {
  transform: translateY(-3px);
  background: #bbdefb;
}

/* --------------------------
   PROYECTOS
-------------------------- */
.proyectos-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.proyecto-link {
  background: #2c3e50;
  color: white;
  padding: 1rem 1.8rem;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.proyecto-link:hover {
  background: #3498db;
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0,0,0,0.15);
}

/* --------------------------
   CONTACTO
-------------------------- */
.contacto a {
  color: #3498db;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.contacto a:hover {
  color: #2980b9;
  text-decoration: underline;
}

.contacto p {
  margin: 1rem 0;
  font-size: 1.1rem;
}

/* --------------------------
   BOTÓN VOLVER ARRIBA
-------------------------- */
.volver-arriba-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #3498db;
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
}

.volver-arriba-btn.mostrar {
  opacity: 1;
  visibility: visible;
}

.volver-arriba-btn:hover {
  background: #2980b9;
  transform: scale(1.1);
}

/* --------------------------
   FOOTER
-------------------------- */
footer {
  background: #2c3e50;
  color: white;
  text-align: center;
  padding: 2rem;
  font-size: 0.9rem;
  margin-top: 2rem;
}

/* --------------------------
   ANIMACIONES AL SCROLL
-------------------------- */
.seccion, .hero, header {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.seccion.visible, .hero.visible, header.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --------------------------
   RESPONSIVE FINAL
-------------------------- */
@media (max-width: 480px) {
  .descripcion h1 {
    font-size: 2rem;
  }

  .descripcion p {
    font-size: 1rem;
  }

  .seccion {
    padding: 3rem 1rem;
  }

  .seccion h2 {
    font-size: 1.8rem;
  }

  .volver-arriba-btn {
    width: 40px;
    height: 40px;
    font-size: 0.9rem;
  }

  .perfil-img {
    width: 140px;
    height: 140px;
  }

  .menu-btn {
    padding: 0.4rem;
  }
}