body {
  margin: 0;
  overflow: hidden;
  overflow-x: hidden;
  overflow-y: auto;
  font-family: 'Inter', sans-serif;
}

.slider {
  height: 100vh;
  width: 100vw;
  position: relative;
  background:
    linear-gradient(
      rgba(8, 15, 30, 0.85),
      rgba(8, 15, 30, 0.85)
    ),
    url('header.png');
  background-size: cover;
  background-position: 50% 50%;
  background-attachment: fixed;
  transition: background-position 0.2s ease-out;
  /*animation: moveBackground 20s infinite alternate ease-in-out;*/
}

/*
@keyframes moveBackground {
  0%   { background-position: left top; }
  100% { background-position: right bottom; }
}
  */
.glass {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 60px;
  border-radius: 20px;
  color: white;
  width: 70%;
  max-width: 1000px;
  text-align: center;
  pointer-events: auto;
}

.slide {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}


.slide.active {
  opacity: 1;
}
.dots {
  position: absolute;
  bottom: 30px;
  width: 100%;
  text-align: center;
  z-index: 100;
  pointer-events: auto;
}

.dot {
  height: 12px;
  width: 12px;
  margin: 5px;
  background-color: rgba(255,255,255,0.5);
  border-radius: 50%;
  display: inline-block;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease;  
}

.dot:hover {
  background-color: rgba(255, 255, 255, 0.8);
  transform: scale(1.2);
}

.dot.active {
  background-color: white;
}
.prev, .next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.2);
  border: none;
  font-size: 30px;
  color: white;
  padding: 10px 20px;
  cursor: pointer;
  border-radius: 10px;
}

.prev { left: 20px; }
.next { right: 20px; }

.hero-content {
  max-width: 900px;
  opacity: 0;
  transform: translateY(40px);
  animation: heroReveal 1.2s ease forwards;
}

@keyframes heroReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 52px;
  font-weight: 700;
  margin-bottom: 25px;
  letter-spacing: -1px;
}

.hero-subtitle {
  font-size: 24px;
  font-weight: 300;
  margin-bottom: 25px;
  opacity: 0.9;
}

.hero-experience {
  font-size: 18px;
  margin-bottom: 40px;
  opacity: 0.8;
}

.architecture-statement {
  margin-top: 30px;
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.5;
}


#particles {
  position: absolute;
  z-index: 1;
  pointer-events: none;
}

.slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.5s ease, visibility 0.5s;
  z-index: 2;
}

.slide.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}

.btn-primary, .btn-secondary {
  cursor: pointer;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  position: relative;
  z-index: 10;
}

.btn-primary {
  background: #1e3a8a;
  color: white;
}

.btn-primary:hover {
  background: #2563eb;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
  background: transparent;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.6);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: white;
  transform: translateY(-3px);
}

.prev, .next {
  z-index: 100;
  cursor: pointer;
}

.section-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 36px;
  margin-bottom: 50px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

.card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 30px;
  border-radius: 16px;
  text-align: left;
  transition: all 0.3s ease;
}

.card i {
  font-size: 28px;
  margin-bottom: 15px;
  color: #3b82f6; /* azul elegante */
}

.card h3 {
  font-family: 'Montserrat', sans-serif;
  margin-bottom: 10px;
  font-size: 20px;
}

.card p {
  font-size: 15px;
  opacity: 0.85;
  line-height: 1.6;
}

.card:hover {
  background: rgba(255,255,255,0.1);
  transform: translateY(-6px);
  border-color: rgba(59,130,246,0.4);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 35px;
}

.project-card {
  position: relative;
  padding: 35px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  transition: all 0.3s ease;
}

.project-card:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(59,130,246,0.4);
  transform: translateY(-6px);
}

.project-index {
  position: absolute;
  top: 20px;
  right: 25px;
  font-size: 14px;
  font-weight: 600;
  opacity: 0.4;
  letter-spacing: 2px;
}

.project-card h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 20px;
  margin-bottom: 10px;
}

.project-tech {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  opacity: 0.6;
  margin-bottom: 15px;
}

.project-card p {
  font-size: 14px;
  line-height: 1.6;
  opacity: 0.85;
}

.project-icon {
  font-size: 22px;
  margin-bottom: 15px;
  color: #3b82f6;
  opacity: 0.9;
}

.credentials-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 35px;
}

.credential-card {
  padding: 30px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 18px;
  transition: all 0.3s ease;
}

.credential-card:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(59,130,246,0.35);
}

.credential-icon {
  font-size: 20px;
  margin-bottom: 15px;
  color: #3b82f6;
  opacity: 0.9;
}

.credential-card h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 18px;
  margin-bottom: 10px;
}

.credential-card p {
  font-size: 14px;
  line-height: 1.6;
  opacity: 0.85;
}

.personal-intro {
  max-width: 700px;
  margin: 0 auto 50px auto;
  font-size: 18px;
  opacity: 0.9;
  line-height: 1.6;
}

.personal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 35px;
}

.personal-card {
  padding: 25px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 18px;
  text-align: center;
  transition: all 0.3s ease;
}

.personal-card:hover {
  background: rgba(255,255,255,0.08);
  transform: translateY(-4px);
}

.personal-card i {
  font-size: 22px;
  margin-bottom: 15px;
  color: #3b82f6;
}

.personal-card h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  margin-bottom: 10px;
}

.personal-card p {
  font-size: 14px;
  line-height: 1.6;
  opacity: 0.85;
}

.top-contact {
  position: fixed;
  top: 30px;
  right: 40px;
  display: flex;
  gap: 30px;
  z-index: 10;
}

.top-contact a {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  transition: all 0.3s ease;
}

.top-contact a:hover {
  color: #3b82f6;
}

.lang-switch {
  display: flex;
  gap: 10px;
  margin-left: 20px;
}

.lang-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.3);
  color: rgba(255,255,255,0.7);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.lang-btn:hover {
  border-color: #3b82f6;
  color: white;
}

.lang-btn.active {
  background: #3b82f6;
  border-color: #3b82f6;
  color: white;
}

/* ============================= */
/* MOBILE RESPONSIVE FIX        */
/* ============================= */

@media (max-width: 768px) {

  /* Permitir scroll vertical real */
  .slider {
    height: auto;
    min-height: 100vh;
    background-attachment: scroll;
  }

  .slide {
    position: relative;
    height: auto;
    padding: 80px 0;
  }

  .glass {
    width: 92%;
    padding: 28px 22px;
  }

  /* HERO */
  .hero-title {
    font-size: 28px;
    line-height: 1.2;
  }

  .hero-subtitle {
    font-size: 18px;
  }

  .hero-experience {
    font-size: 16px;
  }

  .architecture-statement {
    font-size: 11px;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 12px;
  }

  /* TITLES */
  .section-title {
    font-size: 24px;
    margin-bottom: 30px;
  }

  /* GRID FIXES */
  .cards,
  .projects-grid,
  .credentials-grid,
  .personal-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* CARD TEXT */
  .card,
  .project-card,
  .credential-card,
  .personal-card {
    padding: 20px;
  }

  .card h3,
  .project-card h3 {
    font-size: 18px;
  }

  .card p,
  .project-card p,
  .credential-card p,
  .personal-card p {
    font-size: 14px;
  }

  /* TOP CONTACT */
  .top-contact {
    position: relative;
    top: auto;
    right: auto;
    justify-content: center;
    margin-top: 20px;
    gap: 15px;
    flex-wrap: wrap;
  }

  /* Ocultar flechas en móvil */
  .prev,
  .next {
    display: none;
  }

  /* Ajustar dots */
  .dots {
    bottom: 10px;
  }

}
