/* ============================================================
   DexterLab — Dark purple · neon accents · glassmorphism
   ============================================================ */

:root {
  --bg-deep:   #120a24;
  --bg-mid:    #1c1038;
  --bg-soft:   #2a1454;
  --accent:    #ff2965;
  --accent-2:  #e3197a;
  --accent-rgb: 255, 41, 101;
  --violet:    #7b6cff;
  --text:      #ffffff;
  --text-dim:  #b9a8d8;
  --glass-bg:     rgba(18, 10, 36, 0.55);
  --glass-border: rgba(255, 255, 255, 0.12);
  --font-display: "Space Grotesk", sans-serif;
  --font-body:    "Poppins", sans-serif;
}

/* Tema azul (se activa con el botón de la barra de navegación) */
body.theme-blue {
  --bg-deep:   #081224;
  --bg-mid:    #0c1d3a;
  --bg-soft:   #123060;
  --accent:    #19a8ff;
  --accent-2:  #2bd2ff;
  --accent-rgb: 25, 168, 255;
  --violet:    #5e8bff;
  --text-dim:  #a9bedf;
  --glass-bg:  rgba(6, 14, 30, 0.55);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg-deep);
  transition: background-color 0.9s ease;
  overflow-x: hidden;
}

/* Gradientes fijos de fondo: dos capas (rosa/morado y azul) con crossfade */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  transition: opacity 1s ease;
}
body::before {
  background:
    radial-gradient(1200px 800px at 75% 20%, rgba(123, 60, 200, 0.22), transparent 60%),
    radial-gradient(900px 700px at 15% 85%, rgba(227, 25, 122, 0.10), transparent 60%),
    linear-gradient(160deg, #1c1038 0%, #120a24 55%, #0c0719 100%);
  opacity: 1;
}
body::after {
  background:
    radial-gradient(1200px 800px at 75% 20%, rgba(40, 130, 230, 0.25), transparent 60%),
    radial-gradient(900px 700px at 15% 85%, rgba(25, 200, 255, 0.10), transparent 60%),
    linear-gradient(160deg, #0c1d3a 0%, #081224 55%, #060d1c 100%);
  opacity: 0;
}
body.theme-blue::before { opacity: 0; }
body.theme-blue::after  { opacity: 1; }

::selection { background: var(--accent); color: #fff; }

/* Scrollbar */
::-webkit-scrollbar { width: 9px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--accent), var(--violet));
  border-radius: 99px;
}

/* ===== Fondo 3D ===== */
#bg3d {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.bg-vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 45%, rgba(10, 5, 22, 0.55) 100%);
}

main { position: relative; z-index: 2; }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 56px;
  background: linear-gradient(rgba(18, 10, 36, 0.65), transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.nav__logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.35em;
  color: var(--text);
  text-decoration: none;
}
.nav__logo span { color: var(--accent); }

.nav__links { display: flex; gap: 38px; margin-left: auto; }

.nav__controls {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: 38px;
  z-index: 11;
}

/* Botón de tema: muestra el color al que cambiará */
.theme-toggle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  cursor: pointer;
  background: radial-gradient(circle at 32% 30%, #7ad4ff, #19a8ff 50%, #0d5cb8);
  box-shadow: 0 0 14px rgba(25, 168, 255, 0.5);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.theme-toggle:hover {
  transform: scale(1.15) rotate(20deg);
  box-shadow: 0 0 22px rgba(25, 168, 255, 0.8);
}
body.theme-blue .theme-toggle {
  background: radial-gradient(circle at 32% 30%, #ff7aa8, #ff2965 50%, #b3124d);
  box-shadow: 0 0 14px rgba(255, 41, 101, 0.5);
}
body.theme-blue .theme-toggle:hover {
  box-shadow: 0 0 22px rgba(255, 41, 101, 0.8);
}

.nav__link {
  position: relative;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  transition: color 0.3s;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -8px;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}
.nav__link:hover, .nav__link.is-active { color: var(--text); }
.nav__link:hover::after, .nav__link.is-active::after { width: 100%; }

.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav__burger span {
  width: 24px; height: 2px;
  background: var(--text);
  transition: transform 0.3s, opacity 0.3s;
}

/* ============================================================
   PUNTOS LATERALES
   ============================================================ */
.side-dots {
  position: fixed;
  right: 34px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.side-dots__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  border: 1px solid var(--text-dim);
  transition: all 0.35s ease;
}
.side-dots__dot.is-active {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  height: 26px;
  border-radius: 99px;
}

/* ============================================================
   SECCIONES — base
   ============================================================ */
.section {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px 10vw;
}

/* índice "01 —" estilo referencia */
.section__index {
  position: absolute;
  top: 110px;
  left: 10vw;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.section__num {
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.5em;
  color: var(--text-dim);
}
.section__bar {
  width: 26px; height: 3px;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.kicker {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.45em;
  color: var(--accent);
  margin-bottom: 22px;
}

.accent { color: var(--accent); }

/* ============================================================
   GLASSMORFISMO
   ============================================================ */
.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  backdrop-filter: blur(24px) saturate(120%);
  -webkit-backdrop-filter: blur(24px) saturate(120%);
  box-shadow:
    0 18px 50px rgba(5, 2, 14, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: border-color 0.35s ease, transform 0.35s ease;
}
.glass:hover {
  border-color: rgba(var(--accent-rgb), 0.35);
}

/* ============================================================
   BOTONES (contorno fino neón, como la referencia)
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 16px 34px;
  font-family: var(--font-body);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-decoration: none;
  color: var(--text);
  border-radius: 4px;
  transition: all 0.35s ease;
}

.btn--outline {
  border: 1px solid var(--accent);
  background: rgba(var(--accent-rgb), 0.06);
}
.btn--outline:hover {
  background: var(--accent);
  box-shadow: 0 0 28px rgba(var(--accent-rgb), 0.55);
  transform: translateY(-2px);
}

.btn--solid {
  border: 1px solid var(--accent);
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 24px rgba(var(--accent-rgb), 0.35);
}
.btn--solid:hover {
  box-shadow: 0 0 40px rgba(var(--accent-rgb), 0.65);
  transform: translateY(-2px);
}

.btn__arrow { transition: transform 0.3s ease; }
.btn:hover .btn__arrow { transform: translateX(6px); }

/* ============================================================
   01 · HERO
   ============================================================ */
.hero__content { max-width: 640px; }

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6.5vw, 5rem);
  font-weight: 700;
  line-height: 1.05;
  margin-bottom: 28px;
  text-shadow: 0 0 60px rgba(123, 108, 255, 0.35);
}

.hero__sub {
  color: var(--text-dim);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.8;
  max-width: 460px;
  margin-bottom: 42px;
}

.hero__pager {
  position: absolute;
  right: 9vw;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-display);
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.hero__pager-current {
  font-size: 1.7rem;
  font-weight: 700;
  border-bottom: 3px solid var(--accent);
  padding-bottom: 6px;
}
.hero__pager-total { color: var(--accent); font-size: 0.8rem; }

.scroll-hint {
  position: absolute;
  bottom: 38px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-size: 0.6rem;
  letter-spacing: 0.45em;
  color: var(--text-dim);
}
.scroll-hint__line {
  width: 1px; height: 46px;
  background: linear-gradient(var(--accent), transparent);
  animation: scrollPulse 2.2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { transform: scaleY(1);   opacity: 1; }
  50%      { transform: scaleY(0.55); opacity: 0.4; }
}

/* ============================================================
   02 · PRESENTACIÓN
   ============================================================ */
.about__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 34px;
  align-items: start;
}

.about__card { padding: 52px 56px; }

.about__icon {
  width: 84px; height: 84px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(var(--accent-rgb), 0.5);
  border-radius: 50%;
  color: var(--accent);
  margin-bottom: 30px;
  box-shadow: 0 0 22px rgba(var(--accent-rgb), 0.2), inset 0 0 18px rgba(var(--accent-rgb), 0.08);
}

.about__title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  margin-bottom: 22px;
}

.about__text {
  color: var(--text-dim);
  font-weight: 300;
  line-height: 1.85;
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.about__points {
  list-style: none;
  margin-top: 26px;
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.about__points li {
  position: relative;
  padding-left: 26px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 300;
}
.about__points li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55em;
  width: 10px; height: 2px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.about__aside {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.skill {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 26px 30px;
}
.skill:hover { transform: translateX(8px); }

.skill__num {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--accent);
  width: 46px; height: 46px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(var(--accent-rgb), 0.5);
  border-radius: 50%;
}
.skill h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.skill p {
  color: var(--text-dim);
  font-size: 0.78rem;
  font-weight: 300;
  letter-spacing: 0.04em;
}

/* ============================================================
   03 · FAQ
   ============================================================ */
.faq__inner {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
}

.faq__title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  margin-bottom: 34px;
}

.faq__list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.faq__item { padding: 0; }

.faq__item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 30px;
}
.faq__item summary::-webkit-details-marker { display: none; }

.faq__item summary h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.faq__item summary::after {
  content: "+";
  flex-shrink: 0;
  color: var(--accent);
  font-size: 1.4rem;
  line-height: 1;
  transition: transform 0.3s ease;
}
.faq__item[open] summary::after { transform: rotate(45deg); }

.faq__item p {
  color: var(--text-dim);
  font-weight: 300;
  line-height: 1.8;
  font-size: 0.92rem;
  padding: 0 30px 26px;
  max-width: 640px;
}

/* ============================================================
   04 · CONTACTO
   ============================================================ */
.contact { align-items: center; text-align: center; }

.contact__card {
  max-width: 680px;
  padding: 70px 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.contact__title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 3rem);
  margin-bottom: 20px;
}

.contact__text {
  color: var(--text-dim);
  font-weight: 300;
  line-height: 1.8;
  max-width: 440px;
  margin-bottom: 40px;
}

.contact__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.contact__links {
  margin-top: 44px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  font-size: 0.82rem;
}
.contact__link {
  color: var(--text-dim);
  text-decoration: none;
  letter-spacing: 0.08em;
  transition: color 0.3s, text-shadow 0.3s;
}
.contact__link:hover {
  color: var(--accent);
  text-shadow: 0 0 14px rgba(var(--accent-rgb), 0.6);
}
.contact__sep { color: var(--accent); }

.footer {
  position: absolute;
  bottom: 28px;
  left: 0; right: 0;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  font-weight: 300;
}

/* ============================================================
   REVEAL ON SCROLL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Accesibilidad: sin animaciones si el usuario lo prefiere */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-hint__line { animation: none; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .nav { padding: 20px 24px; }

  .nav__links {
    /* El backdrop-filter del .nav lo convierte en contenedor de los hijos
       fixed: inset:0 sería la barra, no la pantalla. Por eso 100vw/100vh. */
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
    background: rgba(14, 7, 28, 0.96);
    backdrop-filter: blur(20px);
    transform: translateY(-100%);
    visibility: hidden;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s 0.45s;
  }
  .nav__links.is-open {
    transform: translateY(0);
    visibility: visible;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s;
  }
  .nav__link { font-size: 1rem; }
  body.theme-blue .nav__links { background: rgba(6, 14, 30, 0.96); }
  .nav__controls { margin-left: 0; }
  .nav__burger { display: flex; z-index: 11; }
  .nav__burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav__burger.is-open span:nth-child(2) { opacity: 0; }
  .nav__burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .section { padding: 110px 7vw; }
  .section__index { left: 7vw; top: 96px; }

  .side-dots { display: none; }
  .hero__pager { display: none; }

  .about__grid { grid-template-columns: 1fr; }
  .about__card { padding: 38px 30px; }
  .contact__card { padding: 50px 28px; }

  .faq__item summary { padding: 20px 22px; }
  .faq__item p { padding: 0 22px 22px; }
}
