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

body {
  font-family: 'Segoe UI', sans-serif;
  background-color: #0d0c0c;
  color: #98b3ea;
  line-height: 1.6;
}

header {
  position: relative;
  background: linear-gradient(135deg, #0d1b2a, #1b263b, #415a77);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
  color: white;
  padding: 4rem 2rem;
  text-align: center;
  overflow: hidden;
}

header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5); /* Overlay para legibilidad */
  z-index: 0;
}

header h1, 
header p, 
header .cv-btn {
  position: relative;
  z-index: 1;
}

header h1 {
  font-size: 3rem;
  font-weight: bold;
  letter-spacing: 2px;
  margin-bottom: 0.5rem;
  animation: fadeInDown 1s ease;
}

header p {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  animation: fadeInUp 1.5s ease;
}

/* Animación degradado */
@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Animaciones de entrada */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.cv-btn {
  margin-top: 1rem;
  display: inline-block;
  background: white;
  color: #007acc;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s ease;
}

.cv-btn:hover {
  background: #121010;
}

/* Contenedor de partículas solo para el cuerpo */
#particles-container {
  position: relative;
  overflow: hidden;
}

#particles-js {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

section#proyectos {
  padding: 2rem;
  max-width: 1000px;
  margin: auto;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.proyecto {
  background: white;
  padding: 1rem;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  opacity: 0.3s ease;
  transform: translateY(20px);
}

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

.proyecto h3 {
  margin-bottom: 0.5rem;
  color: #007acc;
}

.proyecto a {
  text-decoration: none;
  color: #007acc;
  font-weight: bold;
}

#habilidades {
  padding: 2rem;
  max-width: 1000px;
  margin: auto;
  text-align: center;
}

#habilidades h2 {
  margin-bottom: 2rem;
  font-size: 2rem;
  color: #98b3ea;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(7,1fr);
  gap: 1.5rem;
  justify-items: center;
}

.skill {
  background: #1b263b;
  padding: 1rem;
  border-radius: 12px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.2);
  transition: transform 0.3s ease, background 0.3s ease;
}

.skill:hover {
  transform: translateY(-5px);
  background: #2c3e50;
}

.skill img {
  width: 50px;
  height: 50px;
  margin-bottom: 0.5rem;
}

.skill span {
  display: block;
  color: white;
  font-weight: bold;
  font-size: 0.9rem;
}

footer {
  text-align: center;
  padding: 1rem;
  background: #222;
  color: white;
  margin-top: 2rem;
}

