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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: radial-gradient(circle at top left, #1a1a1a, #121212);
  color: #eee;
  min-height: 100vh;
  padding: 0;
  overflow-x: hidden;
  position: relative;
}

/* Fondo animado de partículas */
body::after {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(155,89,182,0.2) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: moveParticles 20s linear infinite;
  z-index: 0;
  pointer-events: none;
}

@keyframes moveParticles {
  from { transform: translate(0, 0); }
  to { transform: translate(50px, 50px); }
}

/* ================= NAVBAR ================= */
header {
  background: #1a1a1a;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 2px 10px rgba(0,0,0,0.7);
}

nav ul.nav-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: #ccc;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: #9b59b6;
}

/* ================= SECCIONES ================= */
.section {
  padding: 4rem 2rem;
  max-width: 900px;
  margin: auto;
  position: relative;
  z-index: 1;
  text-align: center;
}

.section h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: #9b59b6;
  text-shadow: 0 0 10px #8e44ad;
}

.section p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #ccc;
}

/* ================= TÍTULO PRINCIPAL ================= */
#inicio h1 {
  font-size: 3rem;
  margin-bottom: 20px;
  color: #9b59b6;
  text-shadow: 0 0 15px #9b59b6, 0 0 30px #8e44ad;
  animation: fadeIn 1s ease-out forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ================= BOTONES DE PROYECTOS ================= */
.button-container {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 3rem;
}

.project-button {
  position: relative;
  padding: 25px 60px;
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  background-color: #1c1c1c;
  border: 2px solid #9b59b6;
  border-radius: 15px;
  cursor: pointer;
  text-decoration: none;
  overflow: hidden;
  transition: all 0.4s ease;
  animation: buttonFade 1s ease forwards;
  opacity: 0;
}

.project-button span {
  position: relative;
  z-index: 2;
  transition: all 0.3s ease;
}

.project-button::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, #9b59b6, #8e44ad);
  opacity: 0;
  transition: opacity 0.4s, transform 0.4s;
  z-index: 1;
  transform: scale(0.5);
  border-radius: 50%;
}

.project-button:hover::before {
  opacity: 0.3;
  transform: scale(1.5);
}

.project-button:hover {
  transform: translateY(-8px) scale(1.05);
  box-shadow: 0 0 20px #9b59b6, 0 0 40px #8e44ad, 0 10px 30px rgba(0,0,0,0.5);
}

.project-button:hover span {
  color: #fff;
}

@keyframes buttonFade {
  0% { opacity: 0; transform: translateY(20px);}
  100% { opacity: 1; transform: translateY(0);}
}

/* ================= FOOTER ================= */
footer {
  text-align: center;
  padding: 2rem;
  background: #1a1a1a;
  color: #888;
  font-size: 0.9rem;
  z-index: 1;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 700px) {
  #inicio h1 {
    font-size: 2.2rem;
  }

  .section h2 {
    font-size: 2rem;
  }

  .project-button {
    padding: 18px 45px;
    font-size: 1.3rem;
  }

  nav ul.nav-links {
    flex-direction: column;
    gap: 1rem;
  }
}
