* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: sans-serif;
}

body {
  font-family: 'Inter', sans-serif;
  background: radial-gradient(circle at 20% 30%, rgba(156,87,199,0.15), transparent 40%),
              radial-gradient(circle at 80% 70%, rgba(176,230,180,0.15), transparent 40%),
              #151515;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(156,87,199,0.15), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(176,230,180,0.15), transparent 40%),
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size:
    auto,
    auto,
    40px 40px,
    40px 40px;
  color: #f0f0f0;
  overflow-x: hidden;
  animation: moveBg 12s ease-in-out infinite alternate;
}

@keyframes moveBg {
  0% { background-position: 20% 30%, 80% 70%; }
  100% { background-position: 30% 40%, 70% 60%; }
}

/* HEADER */
.header {
  position: fixed;
  top: 0;
  width: 100%;
  background: #151515;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 40px;
  z-index: 1000;
}

.logo img {
  height: 60px;
}

.nav {
  display: flex;
  gap: 20px;
}

.nav a {
  text-decoration: none;
  color: white;
  font-size: 15px;
}

.nav a:hover {
  color: #9c57c7;
}

/* HERO */
.hero {
  padding: 150px 40px 80px;
}

.intro {
  font-size: 25px;
  color: #f96ade;
  margin-bottom: 10px;
}

.hero h1 {
  font-size: 70px;
  margin-bottom: 20px;
}

/* SECCIONES */
.posts {
  padding: 40px;
}

.posts h2 {
  margin-bottom: 20px;
}

/* GRID */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

/* CARDS */
.card {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  aspect-ratio: 1 / 1;
}

.card img,
.card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

/* OVERLAY */
.overlay {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.overlay h3 {
  color: white;
  text-align: center;
}

/* HOVER */
.card:hover img,
.card:hover video {
  transform: scale(1.3);
}

.card:hover .overlay {
  opacity: 1;
}

/* VIDEOS */
video {
  pointer-events: none;
  transform: scale(1.2);
}

/* MODAL */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  animation: fadeIn 0.3s ease;
  overflow: auto;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100%;
  padding: 20px;
}

.modal-content img,
.modal-content video {
  max-width: 90%;
  max-height: 90vh;
  object-fit: contain;
}

.close {
  position: fixed;
  top: 30px;
  right: 50px;
  color: #f1f1f1;
  font-size: 40px;
  cursor: pointer;
  z-index: 2001;
}

.close:hover {
  color: #f96ade;
}

/* SCROLL FIX (header) */
section {
  scroll-margin-top: 100px;
}

/* ========================= */
/* 📱 RESPONSIVE */
/* ========================= */

@media (max-width: 1024px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {

  /* HEADER */
  .header {
    padding: 10px 15px;
  }

  .logo img {
    height: 45px;
  }

  .nav {
    overflow-x: auto;
    white-space: nowrap;
    gap: 15px;
  }

  .nav a {
    font-size: 13px;
    flex: 0 0 auto;
  }

  /* HERO */
  .hero {
    padding: 120px 20px 40px;
  }

  .intro {
    font-size: 18px;
  }

  .hero h1 {
    font-size: 36px;
  }

  /* CONTENIDO */
  .posts {
    padding: 20px;
  }

  h2 {
    font-size: 22px;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  /* OVERLAY siempre visible */
  .overlay {
    opacity: 1;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  }

  .card:hover img,
  .card:hover video {
    transform: none;
  }

  /* MODAL */
  .modal-content {
    padding: 10px;
  }

  .modal-content img,
  .modal-content video {
    max-width: 100%;
    max-height: 80vh;
  }

  .close {
    top: 15px;
    right: 20px;
    font-size: 30px;
  }
}