/* ================================
   ESTILOS GENERALES
================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  color: #f0f0f0; /* Color de texto claro por defecto para contraste */
  line-height: 1.6;
  background-color: #111; /* Color de fondo de respaldo */
}

/* ================================
   VIDEO DE FONDO
================================ */
.video-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: -2;
  overflow: hidden;
}

.video-background video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.5); /* Oscurece el video para mejorar legibilidad del texto */
}

/* ================================
   CONTENEDOR DE CONTENIDO
================================ */
.content-container {
  width: 100%;
  padding-top: 100px; /* Espacio para el header fijo */
}

/* ================================
   CABECERA / NAVBAR
================================ */
header {
  background-color: rgba(17, 17, 17, 0.8); /* Fondo semitransparente */
  backdrop-filter: blur(10px); /* Efecto de desenfoque */
  color: #fff;
  padding: 20px 0;
  text-align: center;
  position: fixed; /* Header fijo en la parte superior */
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

header h1 {
  font-size: 2rem;
  margin-bottom: 5px;
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 20px;
}

nav ul li a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

nav ul li a:hover {
  color: #ff0000;
}

/* ================================
   ESTILOS COMUNES PARA SECCIONES
================================ */
section {
  padding: 80px 20px;
  text-align: center;
  margin: 20px auto;
  max-width: 1100px;
  background-color: rgba(28, 28, 28, 0.75); /* Fondo semitransparente oscuro */
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

section h2 {
    font-size: 2.2rem;
    margin-bottom: 30px;
    color: #fff;
}

/* ================================
   SECCIÓN INICIO / HERO
================================ */
#inicio {
  background: none; /* Quitamos el fondo para que se vea el video */
  border: none;
  min-height: calc(100vh - 100px); /* Ocupa el resto de la pantalla inicial */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#inicio img {
  width: 250px;
  height: 250px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 25px;
  border: 5px solid #4c3737;
  box-shadow: 0 4px 20px rgba(255, 0, 0, 0.5);
}

#inicio h2 {
  font-size: 2.8rem;
  color: #fff;
  margin-bottom: 15px;
}

#inicio p {
  font-size: 1.3rem;
  max-width: 700px;
  margin: 0 auto;
  color: #ccc;
}

/* ================================
   SECCIÓN SOBRE MÍ
================================ */
#sobre-mi p {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.1rem;
}

/* ================================
   SECCIÓN PROYECTOS
================================ */
.proyectos-contenedor {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.proyecto {
  background-color: rgba(40, 40, 40, 0.9);
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  transition: transform 0.3s;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.proyecto:hover {
  transform: translateY(-5px);
}

.proyecto img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.proyecto h3 {
  margin: 15px 0;
  color: #ff5722;
}

.proyecto p {
  padding: 0 15px 20px;
  font-size: 0.95rem;
  color: #ccc;
}

/* ================================
   SECCIÓN SKILLS
================================ */
#skills {
  text-align: center;
}

.skills-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
  margin-top: 30px;
}

.skill {
  background-color: rgba(40, 40, 40, 0.9);
  border-radius: 15px;
  padding: 20px;
  width: 130px;
  transition: transform 0.3s, box-shadow 0.3s;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.skill:hover {
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.skill img {
  width: 60px;
  height: 60px;
  margin-bottom: 10px;
}

.skill p {
  color: #fff;
  font-weight: 500;
  font-size: 1rem;
}

/* Responsive para móviles */
@media (max-width: 600px) {
  .skills-container {
    gap: 25px;
  }

  .skill {
    width: 100px;
    padding: 15px;
  }

  .skill img {
    width: 50px;
    height: 50px;
  }

  .skill p {
    font-size: 0.9rem;
  }
}

/* ================================
   SECCIÓN CONTACTO
================================ */
#contacto a {
  color: #ff9800;
  text-decoration: none;
}

#contacto a:hover {
  text-decoration: underline;
}

/* ================================
   PIE DE PÁGINA
================================ */
footer {
  background-color: rgba(17, 17, 17, 0.9);
  color: #ccc;
  text-align: center;
  padding: 20px 0;
  font-size: 0.9rem;
  margin-top: 40px;
}

footer span {
  color: #ff9800;
}

/* ================================
   RESPONSIVE DESIGN
================================ */
@media (max-width: 768px) {
  .content-container {
    padding-top: 140px; /* Más espacio para el header en móvil */
  }
  
  header h1 {
    font-size: 1.5rem;
  }
  
  nav ul {
      flex-direction: column;
      gap: 10px;
  }

  #inicio img {
    width: 200px;
    height: 200px;
  }

  #inicio h2 {
    font-size: 2rem;
  }

  section {
      padding: 60px 15px;
  }
}