/* ============================================================
   VARIABLES & RESET
   EDITAR: Cambia los colores de la paleta aquí
============================================================ */
:root {
  /* Paleta oscura (dark terminal) */
  --bg:     #0D1117;
  --bg-2:   #161B22;
  --border: #30363D;
  --text:   #E6EDF3;
  --muted:  #8B949E;
  --lime:   #D4F255;
  --coral:  #D4523A;

  /* Paleta de secciones claras */
  --blue:   #3B52D4;
  --ink:    #0D0D0D;
  --cream:  #F5F1E8;

  /* Verde de estado terminal */
  --term-green: #6BBF47;

  /* Tipografía */
  --font-heading: 'Orbitron', sans-serif;
  --font-sans:  'Outfit', sans-serif;
  --font-serif: 'Cormorant Garamond', serif;
  --font-mono:  'JetBrains Mono', monospace;

  /* Espaciado base */
  --gap:    clamp(1.5rem, 4vw, 3rem);
  --radius: 20px;

  /* Transición global */
  --ease:   cubic-bezier(0.22, 1, 0.36, 1);
  --dur:    0.4s;
}

/* Reset moderno */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  /* EDITAR: quita background-image para eliminar el dot grid */
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(255,255,255,0.012) 2px,
      rgba(255,255,255,0.012) 4px
    ),
    radial-gradient(circle, rgba(48,54,61,0.7) 1px, transparent 1px);
  background-size: 100% 100%, 22px 22px;
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a  { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* Contenedor centrado */
.container {
  width: min(1160px, 100% - 3rem);
  margin-inline: auto;
}

/* Clase reveal (base, antes de animar) */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}


/* ============================================================
   TIPOGRAFÍA GLOBAL
============================================================ */
h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
}

p {
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  line-height: 1.65;
  color: var(--muted);
}

.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--lime);
  padding: 0.35em 0.9em;
  border-radius: 100px;
  margin-bottom: 1.25rem;
}
.section-tag--dark { background: var(--ink); color: var(--lime); }

.section-header { margin-bottom: clamp(2rem, 5vw, 4rem); }

.section-title {
  font-size: clamp(2.2rem, 5vw, 4rem);
  color: var(--ink);
}


/* ============================================================
   BOTONES
============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  padding: 0.85em 1.75em;
  border-radius: 100px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease),
              background var(--dur) var(--ease),
              color var(--dur) var(--ease);
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,.12); }
.btn:active { transform: translateY(0); }

/* EDITAR: Variante primaria */
.btn--primary {
  background: var(--ink);
  color: var(--lime);
  border-color: var(--ink);
}
.btn--primary:hover { background: #1a1a1a; }

/* EDITAR: Variante outline */
.btn--outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn--outline:hover { background: var(--ink); color: var(--cream); }

.btn--outline.btn--dark {
  border-color: var(--ink);
  color: var(--ink);
}

/* EDITAR: Variante lima */
.btn--lime {
  background: var(--lime);
  color: var(--ink);
  border-color: var(--lime);
}
.btn--lime:hover { background: #94b530; box-shadow: 0 8px 30px rgba(168,200,58,.35); }

.btn--lg { font-size: 1.1rem; padding: 1em 2.25em; }

/* Variante ghost — borde lima, para fondos oscuros */
.btn--ghost {
  background: transparent;
  color: var(--lime);
  border: 2px solid var(--lime);
  text-decoration: none;
}
.btn--ghost:hover { background: var(--lime); color: var(--ink); }

.btn--services {
  border: 1px solid #D4F255;
  color: #D4F255;
  background: transparent;
  padding: 0.6rem 1.4rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: background 0.2s, color 0.2s;
}
.btn--services:hover {
  background: #D4F255;
  color: #0D1117;
}


/* ============================================================
   NAV
============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0 clamp(1rem, 3vw, 2.5rem);
  transition: background var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
}

/* Clase que se añade al hacer scroll */
.nav.is-scrolled {
  background: rgba(28, 31, 39, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  max-width: 1160px;
  margin-inline: auto;
}

/* EDITAR: Logo */
.nav__logo {
  font-family: var(--font-sans);
  font-weight: 900;
  font-size: 1.4rem;
  letter-spacing: -0.04em;
  color: var(--ink);
}
.nav__logo span { color: var(--coral); }

/* Links de nav */
.nav__links {
  display: flex;
  gap: 2.5rem;
}

.nav__link {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  position: relative;
  padding-bottom: 3px;
}

/* Underline animado */
.nav__link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 2px;
  background: var(--coral);
  border-radius: 2px;
  transition: width var(--dur) var(--ease);
}
.nav__link:hover::after { width: 100%; }

/* Botón hamburguesa */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav__toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform var(--dur) var(--ease), opacity var(--dur);
}

/* Menú mobile */
.nav__mobile {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--ink);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  z-index: 99;
}
.nav__mobile.is-open { display: flex; }
.nav__mobile ul { text-align: center; display: flex; flex-direction: column; gap: 1.5rem; }
.nav__mobile .nav__link {
  color: var(--cream);
  font-size: 2.5rem;
  font-weight: 800;
}
.nav__mobile .nav__link::after { background: var(--lime); }


/* ============================================================
   HERO
============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 80px clamp(1rem, 3vw, 2.5rem) 40px;
  overflow: hidden;
}

/* Fondo tech — red de nodos */
.hero__tech-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.hero__tech-bg svg {
  width: 100%;
  height: 100%;
}

/* Contenido del hero */
.hero__content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap);
  width: min(1160px, 100%);
  margin-inline: auto;
}

.hero__text { flex: 1; max-width: 620px; }

.hero__title {
  font-size: clamp(2.4rem, 5.5vw, 4.8rem);
  color: var(--ink);
  margin-bottom: 1.5rem;
  line-height: 1.1;
  font-weight: 700;
  animation: fade-up 0.9s var(--ease) 0.1s both;
}
.hero__title em {
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  color: var(--blue);
}

.hero__desc {
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  max-width: 480px;
  margin-bottom: 2.5rem;
  animation: fade-up 0.9s var(--ease) 0.25s both;
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  animation: fade-up 0.9s var(--ease) 0.4s both;
}

/* Badge giratorio */
.hero__badge {
  position: relative;
  width: auto;
  height: auto;
  margin-bottom: 2rem;
  animation: fade-up 0.9s var(--ease) 0.05s both;
}

.badge__ring {
  width: 100%;
  height: 100%;
  animation: spin 12s linear infinite;
}

.badge__text {
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  fill: var(--term-green); /* EDITAR: color del texto del badge giratorio */
  text-transform: uppercase;
}

@keyframes spin { to { transform: rotate(360deg); } }

.badge__dot {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 18px; height: 18px;
  background: var(--lime);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(168,200,58,.5);
  animation: pulse 2s ease-in-out infinite;
}

/* ── Sistema monitor badge (htop style) ─────────────── */
.sys-badge {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 0.5rem 0.75rem;
  width: 150px;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  box-shadow: 0 0 20px rgba(168,200,58,0.08), 0 4px 16px rgba(0,0,0,0.4);
  opacity: 0.75;
}
.sys-badge__header {
  color: var(--lime);
  font-weight: 700;
  font-size: 0.58rem;
  margin-bottom: 0.1rem;
}
.sys-badge__blink { animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
.sys-badge__row { display: flex; align-items: center; gap: 0.5rem; }
.sys-badge__label { color: var(--muted); width: 2rem; flex-shrink: 0; }
.sys-badge__bar {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  overflow: hidden;
}
.sys-badge__fill { height: 100%; border-radius: 3px; background: var(--lime); }
.sys-badge__fill--cpu { width: 78%; animation: cpu-fluct 4s ease-in-out infinite; }
.sys-badge__fill--ram { width: 41%; animation: ram-fluct 6s ease-in-out infinite; }
@keyframes cpu-fluct { 0%,100%{width:78%} 25%{width:65%} 50%{width:82%} 75%{width:71%} }
@keyframes ram-fluct { 0%,100%{width:41%} 33%{width:44%} 66%{width:38%} }
.sys-badge__val { color: var(--lime); font-weight: 700; width: 2.5rem; text-align: right; flex-shrink: 0; }
.sys-badge__status { color: var(--term-green); font-weight: 700; }

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(168,200,58,.6); }
  70%  { box-shadow: 0 0 0 12px rgba(168,200,58,0); }
  100% { box-shadow: 0 0 0 0 rgba(168,200,58,0); }
}

/* Foto de perfil */
.hero__photo-wrap {
  flex-shrink: 0;
  animation: fade-up 0.9s var(--ease) 0.3s both;
}

.hero__photo {
  width: clamp(180px, 22vw, 280px);
  aspect-ratio: 3 / 4;
  border-radius: var(--radius);
  background: var(--blue);
  overflow: hidden;
  position: relative;
  box-shadow: 8px 8px 0 var(--border);
}

/* EDITAR: Placeholder hasta poner tu foto real */
.hero__photo-placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: linear-gradient(160deg, var(--blue) 0%, #1a2bcc 100%);
}
.hero__photo-placeholder svg {
  width: 70%; opacity: .6;
}

/* Scroll indicator */
.hero__scroll {
  position: absolute;
  bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0.5;
  animation: fade-in 1s var(--ease) 1s both;
}
.hero__scroll-line {
  width: 1px;
  height: 40px;
  background: var(--ink);
  transform-origin: top;
  animation: grow-line 1.5s var(--ease) 1.2s both;
}
@keyframes grow-line {
  from { transform: scaleY(0); }
  to   { transform: scaleY(1); }
}

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


/* ============================================================
   MARQUEE
============================================================ */
.marquee {
  background: var(--ink);
  padding: 1rem 0;
  overflow: hidden;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
}

.marquee__track {
  display: flex;
  /* La animación se controla en script.js con CSS custom properties */
  animation: marquee-scroll 25s linear infinite;
}

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.marquee:hover .marquee__track { animation-play-state: paused; }

.marquee__list {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0 1rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.marquee__list li {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  /* EDITAR: Color del texto de la marquee */
  color: var(--lime);
}

/* Separador ✦ en coral */
.marquee__list li:nth-child(even) { color: var(--coral); font-size: 0.7rem; }


/* ============================================================
   WORK — Grid de proyectos
============================================================ */
.work {
  padding: clamp(4rem, 10vw, 8rem) 0;
}

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

.work__more {
  margin-top: 3rem;
  text-align: center;
}

/* Tarjeta de proyecto */
.card {
  background: var(--card-bg, var(--ink));
  border-radius: var(--radius);
  overflow: hidden;
  transition:
    transform var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
}

.card:hover {
  transform: translateY(-6px) rotate(0.5deg);
  box-shadow: 0 8px 40px var(--card-bg), 0 20px 60px rgba(0,0,0,.3);
}

.card__inner {
  padding: clamp(1.5rem, 3vw, 2.5rem);
  min-height: 300px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* Número decorativo de fondo */
.card__inner::before {
  content: var(--card-num, '01');
  position: absolute;
  top: -0.25em; right: 0.1em;
  font-size: clamp(6rem, 14vw, 10rem);
  font-weight: 900;
  color: rgba(255,255,255,0.06);
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: auto;
}

.card__num {
  font-size: 0.8rem;
  font-weight: 700;
  color: rgba(255,255,255,.4);
  letter-spacing: 0.1em;
}

.card__tag {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.8);
  padding: 0.3em 0.8em;
  border-radius: 100px;
}

.card__body {
  margin: 2rem 0 1.5rem;
}

.card__name {
  font-size: clamp(1.3rem, 2.5vw, 1.7rem);
  color: #fff;
  font-weight: 800;
  margin-bottom: 0.6rem;
}

.card__desc {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.85);
  line-height: 1.5;
}

/* Flecha ↗ — rota en hover */
.card__arrow {
  display: inline-flex;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  align-items: center;
  justify-content: center;
  align-self: flex-end;
  color: #fff;
  transition: background var(--dur) var(--ease),
              transform var(--dur) var(--ease);
}
.card__arrow svg { width: 20px; height: 20px; }

.card:hover .card__arrow {
  background: var(--lime);
  color: var(--ink);
  transform: rotate(45deg);
}


/* ============================================================
   ABOUT
============================================================ */
.about {
  background: var(--lime);
  padding: clamp(4rem, 10vw, 8rem) 0;
}

.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
}

.about__text h2 { font-family: var(--font-heading); margin-bottom: 1.25rem; }
.about__text em { color: var(--blue); }
.about__text p   { color: #333; margin-bottom: 1rem; }
.about__text .btn { margin-top: 1.5rem; }

/* Stats */
.about__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.stat {
  background: var(--ink);
  color: var(--cream);
  border-radius: var(--radius);
  padding: clamp(1.2rem, 2.5vw, 2rem);
}

.stat__num {
  display: block;
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 900;
  color: var(--lime);
  line-height: 1;
  margin-bottom: 0.4rem;
}

.stat__label {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(245,241,232,.6);
  letter-spacing: 0.02em;
}


/* ============================================================
   CTA SECTION
============================================================ */
.cta-section {
  background: var(--ink);
  padding: clamp(5rem, 12vw, 10rem) 0;
  text-align: center;
}

.cta-section__inner { max-width: 720px; margin-inline: auto; }

.cta-section__title {
  font-size: clamp(2.5rem, 6vw, 5rem);
  color: var(--cream);
  margin-bottom: 1.25rem;
}
.cta-section__title em { color: var(--lime); }

.cta-section__sub {
  color: rgba(230,237,243,0.55);
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  margin-bottom: 2.5rem;
}


/* ============================================================
   FOOTER
============================================================ */
.footer {
  background: var(--ink);
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 2.5rem 0;
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.footer__logo {
  font-weight: 900;
  font-size: 1.3rem;
  color: var(--cream);
  letter-spacing: -0.04em;
}
.footer__logo span { color: var(--coral); }

.footer__social {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer__social-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(245,241,232,.5);
  position: relative;
  transition: color var(--dur) var(--ease);
}
.footer__social-link::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1px;
  background: var(--lime);
  transition: width var(--dur) var(--ease);
}
.footer__social-link:hover { color: var(--lime); }
.footer__social-link:hover::after { width: 100%; }

.footer__copy {
  font-size: 0.8rem;
  color: rgba(245,241,232,.3);
  width: 100%;
  text-align: center;
  margin-top: 0.5rem;
}


/* ============================================================
   RESPONSIVE — Mobile first ajustes
============================================================ */
@media (max-width: 768px) {

  /* Nav */
  .nav__links { display: none; }
  .nav__toggle { display: flex; }

  /* Hero */
  .hero { padding-top: 90px; padding-bottom: 80px; }

  /* Texto primero, foto pequeña debajo */
  .hero__content {
    flex-direction: column;
    align-items: flex-start;
  }

  /* Foto: pequeña y centrada, no ocupa toda la pantalla */
  .hero__photo-wrap {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 2rem;
  }
  .hero__photo {
    width: min(150px, 38vw);   /* EDITAR: tamaño máximo en móvil */
    aspect-ratio: 3 / 4;
    box-shadow: 4px 4px 0 var(--lime);
  }

  /* Terminal chrome: ancho completo en móvil */
  .term-chrome { max-width: 100%; }

  .hero__badge { width: auto; height: auto; }

  /* About */
  .about__grid { grid-template-columns: 1fr; }
  .about__stats { grid-template-columns: 1fr 1fr; }

  /* Footer */
  .footer__inner { flex-direction: column; align-items: flex-start; }
  .footer__social { gap: 1rem; }
}

@media (max-width: 480px) {
  .about__stats { grid-template-columns: 1fr; }
  .hero__ctas { flex-direction: column; }
  .hero__ctas .btn { width: 100%; justify-content: center; }

  /* Foto aún más pequeña en pantallas muy estrechas */
  .hero__photo {
    width: min(120px, 32vw);   /* EDITAR: ajusta si quieres más grande/pequeña */
  }
}


/* ============================================================
   TECH EXTRAS — Estética freak / terminal / hacker
   EDITAR: Comenta cualquier bloque para desactivarlo
============================================================ */

/* ── Nav: prefijo ~/ en el logo ─────────────────────────── */
.nav__prompt {
  font-family: var(--font-mono);
  font-weight: 400;
  color: var(--lime);          /* EDITAR: color del ~/ */
  font-size: 0.95em;
  letter-spacing: -0.02em;
}

/* ── Línea de terminal en el Hero ───────────────────────── */
.hero__terminal-line {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  font-family: var(--font-mono);
  font-size: clamp(0.78rem, 1.4vw, 0.92rem);
  color: var(--muted);
  margin-bottom: 0;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 6px 6px;
  padding: 0.45rem 0.85rem;
  animation: none;
}

.terminal__prompt {
  color: var(--lime);           /* EDITAR: color del $ */
  font-weight: 700;
  text-shadow: 0 0 8px rgba(212,242,85,0.6);
  white-space: nowrap;          /* evita que el prompt se parta en móvil */
}

.terminal__cmd {
  color: var(--coral);          /* EDITAR: color del comando */
  font-weight: 400;
}

/* Cursor parpadeante │ */
.terminal__cursor {
  color: var(--lime);
  font-size: 1em;
  line-height: 1;
  animation: blink-cursor 1s step-end infinite;
}

@keyframes blink-cursor {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ── Glitch en el título al hover ───────────────────────── */
/* EDITAR: Comenta este bloque para desactivar el glitch */
.hero__title {
  cursor: default;
}

.hero__title:hover {
  animation: glitch-title 0.45s steps(2, end) 1;
}

@keyframes glitch-title {
  0%   { text-shadow: none;                                            transform: none; }
  15%  { text-shadow: -3px 0 var(--coral), 3px 0 var(--blue);         transform: skewX(-1.2deg); }
  30%  { text-shadow: 3px 0 var(--lime),  -3px 0 var(--coral);        transform: skewX(1deg); }
  50%  { text-shadow: -2px 0 var(--blue),  2px 0 var(--coral);        transform: skewX(-0.8deg) translateX(2px); }
  70%  { text-shadow: 2px 0 var(--coral), -2px 0 var(--lime);         transform: skewX(0.5deg); }
  100% { text-shadow: none;                                            transform: none; }
}

/* ── Section tags: estilo monospace [_ TAG _] ───────────── */
.section-tag {
  font-family: var(--font-mono);
  border-radius: 4px;  /* cuadrado, no pill */
  letter-spacing: 0.06em;
}
.section-tag::before { content: '[ '; }
.section-tag::after  { content: ' ]'; }

/* ── Dot de lenguaje en tarjetas de proyecto ────────────── */
/* data-lang="terraform | yaml | bash" aparece en la esquina */
.card__inner::after {
  content: attr(data-lang);
  position: absolute;
  top: 1.1rem;
  right: 4.5rem;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.18);
  pointer-events: none;
  user-select: none;
}

/* ── Stats: comentario de código encima de cada stat ────── */
.stat {
  position: relative;
  overflow: hidden;
}

.stat::before {
  content: '// metric';          /* EDITAR: texto decorativo */
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 400;
  color: rgba(212,242,85,0.28);
  display: block;
  margin-bottom: 0.6rem;
  letter-spacing: 0.04em;
}

/* ── Scanlines sutiles sobre la foto de perfil ──────────── */
.hero__photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0,0,0,0.045) 3px,
    rgba(0,0,0,0.045) 4px
  );
  pointer-events: none;
  z-index: 2;
  border-radius: var(--radius);
}

/* ── Footer: prefijo ~/ ─────────────────────────────────── */
.footer__prompt {
  font-family: var(--font-mono);
  font-weight: 400;
  color: var(--lime);
  font-size: 0.9em;
}

/* ── Footer: indicador de uptime ────────────────────────── */
.footer__uptime {
  width: 100%;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: rgba(245,241,232,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  margin-bottom: 0.25rem;
}

/* Punto verde pulsante delante del uptime */
.footer__uptime::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
  flex-shrink: 0;
  box-shadow: 0 0 8px rgba(168,200,58,0.6);
  animation: pulse 2s ease-in-out infinite;
}

/* ── Foto de perfil con fondo transparente ──────────────── */
/* object-fit: contain → no recorta, el azul del contenedor se ve de fondo */
.hero__photo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;         /* EDITAR: cámbialo a "cover" si la foto no es transparente */
  object-position: bottom;     /* EDITAR: ancla la figura a la parte baja del recuadro */
  display: block;
  position: relative;
  z-index: 1;                  /* debajo de las scanlines (::after tiene z-index: 2) */
}

/* ── Scrollbar personalizada (Chromium) ─────────────────── */
::-webkit-scrollbar       { width: 6px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: var(--lime); border-radius: 3px; }


/* ============================================================
   DARK TERMINAL THEME
   Estética de consola Linux — fondo oscuro, acentos lima/coral
   EDITAR: --bg para cambiar el tono del fondo
============================================================ */

/* ── Nav: siempre oscuro ────────────────────────────────── */
.nav {
  background: rgba(28, 31, 39, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav__logo       { color: var(--text); }
.nav__link       { color: var(--muted); }
.nav__link:hover { color: var(--text); }

/* ── Hero: texto claro ──────────────────────────────────── */
.hero__title      { color: var(--text); }
.hero__title em   { color: var(--lime); }
.hero__desc       { color: var(--muted); }
.hero__scroll     { color: var(--muted); opacity: 0.6; }
.hero__scroll-line{ background: var(--border); }

/* ── Ventana de terminal (chrome) en el hero ────────────── */
.term-chrome {
  display: inline-flex;
  flex-direction: column;
  margin-bottom: 1.4rem;
  animation: fade-up 0.9s var(--ease) 0s both;
  width: 100%;
  max-width: 380px;
}

.term-chrome__bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 6px 6px 0 0;
  padding: 0.4rem 0.7rem;
  border-bottom: 1px solid var(--border);
}

/* Traffic-light dots */
.term-chrome__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}
.term-chrome__dot--red    { background: #FF5F56; }
.term-chrome__dot--yellow { background: #FFBD2E; }
.term-chrome__dot--green  { background: #27C93F; }

.term-chrome__title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  margin-left: 0.4rem;
  letter-spacing: 0.02em;
}

/* ── Sección Work: fondo oscuro ─────────────────────────── */
.work { background: transparent; }

.section-title          { color: var(--text); }
.section-header .section-tag { color: var(--lime); }

/* Excepciones: párrafos sobre fondo lima (about) */
.about p,
.about strong { color: #1a1a1a; }


/* Strong en CTA: destaca sobre oscuro */
.cta-section__sub strong { color: var(--lime); }

/* ── About: la sección lima se mantiene igual ───────────── */
/* Solo ajustamos el section-tag para que no quede raro */
.about .section-tag {
  background: var(--ink);
  color: var(--lime);
}
.about .section-title { color: var(--ink); }

/* ── Botones: ajuste sobre fondo oscuro ─────────────────── */
.btn--outline {
  color: var(--text);
  border-color: var(--border);
}
.btn--outline:hover {
  background: var(--bg-2);
  color: var(--lime);
  border-color: var(--lime);
}

/* Botón outline dentro de about (sobre fondo lima, va oscuro) */
.about .btn--primary {
  background: var(--ink);
  color: var(--lime);
}

/* ── Work section: botón "Ver más" ─────────────────────── */
.work .btn--outline.btn--dark {
  color: var(--text);
  border-color: var(--border);
}
.work .btn--outline.btn--dark:hover {
  background: var(--lime);
  color: var(--ink);
  border-color: var(--lime);
}

/* ── Mobile nav: ajuste oscuro ──────────────────────────── */
.nav__toggle span { background: var(--text); }
.nav__mobile { background: var(--bg); }
.nav__mobile .nav__link { color: var(--text); }

/* ── Hero: sys-badge flotante top-right ─────────────────── */
.hero__badge--float {
  position: absolute;
  top: clamp(80px, 10vh, 110px);
  right: clamp(1rem, 3vw, 2.5rem);
  margin: 0;
  z-index: 2;
  animation: fade-up 0.9s var(--ease) 0.3s both;
}
@media (max-width: 768px) {
  .hero__badge--float { display: none; }
}



/* ============================================================
   CERTS — Sección de certificaciones
============================================================ */
.certs {
  padding: clamp(4rem, 10vw, 8rem) 0;
}

/* Grid de badges — centrado si hay pocas */
.certs__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
}

/* Tarjeta de certificación */
.cert-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  width: clamp(180px, 22vw, 240px);
  text-align: center;
  transition:
    transform var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
  text-decoration: none;
}

.cert-card:hover {
  transform: translateY(-6px);
  border-color: var(--lime);
  box-shadow: 0 0 20px rgba(168,200,58,0.15);
}

/* Badge circular con brillo en hover */
.cert-card__badge {
  width: 130px;
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.03);
  padding: 0.5rem;
  transition: filter var(--dur) var(--ease);
}

.cert-card:hover .cert-card__badge {
  filter: drop-shadow(0 0 12px rgba(212,242,85,0.4));
}

.cert-card__badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Texto de la tarjeta */
.cert-card__info {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.cert-card__issuer {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cert-card__verify {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--lime);
  transition: color var(--dur) var(--ease);
}

.cert-card:hover .cert-card__verify {
  color: #fff;
}


/* ============================================================
   BLOG — Sección de artículos en homepage
============================================================ */
.blog {
  padding-block: clamp(4rem, 10vw, 8rem);
}

.blog__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--gap);
  margin-top: clamp(2rem, 5vw, 3rem);
}

.blog-card {
  background: var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px rgba(13, 13, 13, 0.18);
}

.blog-card__inner {
  padding: clamp(1.5rem, 3vw, 2rem);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: 100%;
}

.blog-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.blog-card__tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: var(--lime);
  color: var(--ink);
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
}

.blog-card__date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: rgba(245, 241, 232, 0.4);
}

.blog-card__title {
  font-size: clamp(1rem, 2vw, 1.15rem);
  font-weight: 800;
  line-height: 1.3;
  color: var(--cream);
}

.blog-card__excerpt {
  font-size: 0.9rem;
  line-height: 1.65;
  color: rgba(245, 241, 232, 0.6);
  flex: 1;
}

.blog-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--lime);
  margin-top: auto;
  transition: gap var(--dur) var(--ease);
}

.blog-card__link:hover {
  gap: 0.75rem;
}

.blog-card__link svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.blog__more {
  margin-top: clamp(2rem, 5vw, 3rem);
  text-align: center;
}
.blog__more .btn--outline {
  color: var(--text);
  border-color: rgba(230,237,243,0.35);
}
.blog__more .btn--outline:hover {
  background: var(--bg-2);
  color: var(--lime);
  border-color: var(--lime);
}


/* ============================================================
   BLOG POST — Página individual de artículo (blog/*.html)
============================================================ */
.post {
  padding-block: clamp(4rem, 10vw, 7rem);
}

.post__container {
  width: min(740px, 100% - 3rem);
  margin-inline: auto;
}

.post__header {
  margin-bottom: clamp(2rem, 5vw, 3rem);
}

.post__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.post__tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: var(--lime);
  color: var(--ink);
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
}

.post__date,
.post__read-time {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
}

.post__read-time::before {
  content: '·';
  margin-right: 0.5rem;
}

.post__title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.1;
  margin-bottom: 1.25rem;
}

.post__lead {
  font-size: 1.1rem;
  line-height: 1.75;
  color: rgba(230, 237, 243, 0.75);
  border-left: 4px solid var(--lime);
  padding-left: 1.25rem;
}

/* Bloque de descarga rápida al inicio del post */
.post__download {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: rgba(212,242,85,.06);
  border: 1px solid rgba(212,242,85,.25);
  border-radius: 12px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 2.5rem;
}
.post__download-title {
  color: var(--lime);
  font-size: 1rem;
  font-family: var(--font-sans);
}
.post__download-desc {
  color: var(--muted, #aaa);
  font-size: 0.9rem;
  margin: 0;
}
.post__download-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.post__divider {
  border: none;
  border-top: 1px solid var(--border);
  margin-block: clamp(2rem, 5vw, 3rem);
}

.post__body {
  font-size: 1.05rem;
  line-height: 1.8;
}

.post__body h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.3rem, 3vw, 1.65rem);
  margin-top: clamp(2rem, 5vw, 3rem);
  margin-bottom: 0.9rem;
}

.post__body h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  margin-top: 1.75rem;
  margin-bottom: 0.6rem;
}

.post__body p {
  margin-bottom: 1.25rem;
}

.post__body ul,
.post__body ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.post__body li {
  list-style: disc;
  margin-bottom: 0.5rem;
}

.post__body ol li {
  list-style: decimal;
}

.post__body strong {
  font-weight: 700;
}

.post__body code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  border-radius: 4px;
  padding: 0.15em 0.45em;
}

.post__body pre {
  background: var(--ink);
  border-radius: var(--radius);
  padding: 1.5rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

.post__body pre code {
  background: none;
  padding: 0;
  font-size: 0.875rem;
  color: var(--lime);
}

.post__body blockquote {
  border-left: 4px solid var(--lime);
  padding-left: 1.25rem;
  margin-block: 1.5rem;
  font-style: italic;
  color: var(--muted);
}

.post__diagram {
  margin: clamp(2rem, 5vw, 3rem) 0;
}

.post__diagram img {
  width: 100%;
  display: block;
  border-radius: var(--radius);
}

.post__diagram figcaption {
  font-size: 0.82rem;
  color: var(--muted);
  text-align: center;
  margin-top: 0.6rem;
  line-height: 1.5;
}

.post__footer {
  margin-top: clamp(3rem, 7vw, 5rem);
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.post__back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--text);
  transition: gap var(--dur) var(--ease);
}

.post__back:hover { gap: 0.8rem; }

.post__back svg {
  width: 16px;
  height: 16px;
  transform: rotate(180deg);
}

.post__author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.post__author-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.post__author-name {
  font-weight: 700;
  font-size: 0.875rem;
}

.post__author-role {
  font-size: 0.8rem;
  color: var(--muted);
}


/* ============================================================
   BLOG LISTING — blog/index.html
============================================================ */
.blog-listing {
  padding-block: clamp(5rem, 12vw, 9rem);
}

.blog-listing__header {
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
}

.blog-listing__desc {
  margin-top: 0.75rem;
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 520px;
  color: rgba(13, 13, 13, 0.6);
}

/* ── Artículo destacado ── */
.blog-featured {
  display: block;
  background: var(--ink);
  border-radius: var(--radius);
  padding: clamp(2rem, 5vw, 3rem);
  margin-bottom: clamp(2rem, 5vw, 3rem);
  text-decoration: none;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.blog-featured:hover {
  transform: translateY(-4px);
  box-shadow: 0 28px 56px rgba(13, 13, 13, 0.18);
}

.blog-featured__meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.blog-featured__label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(245, 241, 232, 0.4);
}

.blog-featured__title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--cream);
  margin-bottom: 1rem;
}

.blog-featured__excerpt {
  font-size: 1rem;
  line-height: 1.7;
  color: rgba(245, 241, 232, 0.6);
  max-width: 680px;
  margin-bottom: 1.75rem;
}

.blog-featured__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(245, 241, 232, 0.1);
}

.blog-featured__date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: rgba(245, 241, 232, 0.4);
}

.blog-featured__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--lime);
  transition: gap var(--dur) var(--ease);
}

.blog-featured:hover .blog-featured__cta {
  gap: 0.75rem;
}

.blog-featured__cta svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ── Archivo de artículos ── */
.blog-archive {
  border: 1px solid rgba(13, 13, 13, 0.12);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}

.blog-archive__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.5rem;
  background: rgba(13, 13, 13, 0.04);
  border-bottom: 1px solid rgba(13, 13, 13, 0.1);
}

.blog-archive__label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(13, 13, 13, 0.45);
}

.blog-archive__count {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: rgba(13, 13, 13, 0.35);
}

.blog-archive__list {
  list-style: none;
}

/* ── Fila individual de artículo ── */
.blog-row + .blog-row {
  border-top: 1px solid rgba(13, 13, 13, 0.07);
}

.blog-row__inner {
  display: grid;
  grid-template-columns: 5.5rem auto 1fr auto;
  align-items: center;
  gap: 1rem 1.25rem;
  padding: 1.1rem 1.5rem;
  text-decoration: none;
  color: var(--ink);
  background: #fff;
  transition: background var(--dur) var(--ease);
}

.blog-row__inner:hover {
  background: #f0f0ec;
}

.blog-row__inner:hover .blog-row__title {
  color: var(--blue);
}

.blog-row__inner:hover .blog-row__arrow {
  transform: translate(3px, -3px);
}

.blog-row__date {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: rgba(13, 13, 13, 0.4);
  white-space: nowrap;
}

.blog-row__tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--lime);
  color: var(--ink);
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  white-space: nowrap;
}

.blog-row__title {
  font-size: 0.975rem;
  font-weight: 700;
  line-height: 1.35;
  transition: color var(--dur) var(--ease);
}

.blog-row__arrow {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: rgba(13, 13, 13, 0.3);
  transition: transform var(--dur) var(--ease), color var(--dur) var(--ease);
}

.blog-row__inner:hover .blog-row__arrow {
  color: var(--blue);
}

/* Mobile: apilar columnas */
@media (max-width: 640px) {
  .blog-row__inner {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 0.4rem 0.75rem;
  }

  .blog-row__date {
    grid-column: 1;
    grid-row: 1;
  }

  .blog-row__tag {
    grid-column: 2;
    grid-row: 1;
  }

  .blog-row__title {
    grid-column: 1;
    grid-row: 2;
  }

  .blog-row__arrow {
    grid-column: 2;
    grid-row: 2;
    align-self: center;
  }
}


/* ============================================================
   BOTÓN FLOTANTE DE WHATSAPP
============================================================ */
.wa-btn {
  display: none; /* Desactivado — se activa cuando el número esté listo */
}

.wa-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(37, 211, 102, 0.55);
}

.wa-btn__icon {
  width: 1.6rem;
  height: 1.6rem;
  position: relative;
  z-index: 1;
}

/* Punto lima pulsante */
.wa-btn__pulse {
  position: absolute;
  top: 0.2rem;
  right: 0.2rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #D4F255;
  z-index: 2;
  box-shadow: 0 0 0 0 rgba(212, 242, 85, 0.6);
  animation: pulse 2s ease-in-out infinite;
}

/* Tooltip al hover */
.wa-btn::after {
  content: attr(data-tooltip);
  position: absolute;
  right: calc(100% + 0.75rem);
  top: 50%;
  transform: translateY(-50%);
  background: #161B22;
  color: #E6EDF3;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  white-space: nowrap;
  padding: 0.35rem 0.7rem;
  border-radius: 6px;
  border: 1px solid #30363D;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.wa-btn:hover::after {
  opacity: 1;
}


/* ============================================================
   WIDGET DE CHATBOT
============================================================ */
.chatbot {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

/* Botón toggle */
.chatbot__toggle {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: #0D1117;
  border: 1.5px solid #D4F255;
  color: #D4F255;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(212, 242, 85, 0.2);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  flex-shrink: 0;
  position: relative;
  opacity: 0; /* invisible hasta que el glitch lo revele */
}

.chatbot__toggle:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(212, 242, 85, 0.38);
}

.chatbot__toggle-icon {
  width: 1.45rem;
  height: 1.45rem;
  transition: opacity 0.2s ease;
  position: absolute;
}

.chatbot__toggle-icon--close { opacity: 0; }

.chatbot.is-open .chatbot__toggle-icon--open  { opacity: 0; }
.chatbot.is-open .chatbot__toggle-icon--close { opacity: 1; }

/* Punto verde pulsante en el toggle */
.chatbot__toggle-pulse {
  position: absolute;
  top: 0.2rem;
  right: 0.2rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #D4F255;
  box-shadow: 0 0 0 0 rgba(212, 242, 85, 0.6);
  animation: pulse 2s ease-in-out infinite;
  transition: opacity 0.2s ease;
  z-index: 1;
}

/* Ocultar el punto cuando el chat está abierto */
.chatbot.is-open .chatbot__toggle-pulse { opacity: 0; }

/* ── Glitch de entrada (se dispara una vez al cargar) ────── */
@keyframes chatbot-intro-glitch {
  /* aparece de la nada */
  0%       { transform: translate(0, 0)      scale(0.8);  filter: none;                                   opacity: 0; }
  5%       { transform: translate(-5px, 2px) scale(1.08); filter: brightness(2.2) hue-rotate(55deg);     opacity: 1; }
  12%      { transform: translate(4px, -3px) scale(0.94); filter: brightness(0.4) hue-rotate(210deg);    opacity: 0.7; }
  19%      { transform: translate(-3px, 3px) scale(1.05); filter: brightness(1.9) saturate(4);           opacity: 1; }
  26%      { transform: translate(5px, -1px) scale(0.97); filter: hue-rotate(130deg) brightness(1.6);    opacity: 0.8; }
  33%      { transform: translate(0, -4px)   scale(1.06); filter: brightness(0.6);                       opacity: 1; }
  40%      { transform: translate(-4px, 2px) scale(0.96); filter: brightness(2.5) hue-rotate(290deg);    opacity: 0.9; }
  47%      { transform: translate(3px, 3px)  scale(1.04); filter: hue-rotate(15deg) brightness(1.3);     opacity: 1; }
  54%      { transform: translate(-2px,-2px) scale(1);    filter: brightness(0.5) saturate(2);           opacity: 0.85; }
  61%      { transform: translate(2px, 1px)  scale(1.02); filter: brightness(1.8) hue-rotate(75deg);     opacity: 1; }
  68%      { transform: translate(0, 0)      scale(1);    filter: none;                                   opacity: 1; }
  /* rebote final suave */
  78%      { transform: translate(0, 0)      scale(1.06); filter: none;                                   opacity: 1; }
  86%      { transform: translate(0, 0)      scale(0.97); filter: none;                                   opacity: 1; }
  100%     { transform: translate(0, 0)      scale(1);    filter: none;                                   opacity: 1; }
}

.chatbot__toggle--glitch {
  animation: chatbot-intro-glitch 1.1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Ventana de chat */
.chatbot__window {
  width: 340px;
  max-height: 480px;
  display: flex;
  flex-direction: column;
  background: #0D1117;
  border: 1px solid #30363D;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 0.75rem;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.65);
  opacity: 0;
  transform: translateY(12px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.28s var(--ease), transform 0.28s var(--ease);
  transform-origin: bottom right;
}

.chatbot.is-open .chatbot__window {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

/* Chrome de terminal */
.chatbot__chrome {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #161B22;
  border-bottom: 1px solid #30363D;
  padding: 0.6rem 1rem;
  flex-shrink: 0;
}

.chatbot__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.chatbot__dot--red    { background: #FF5F57; }
.chatbot__dot--yellow { background: #FFBD2E; }
.chatbot__dot--green  { background: #28CA42; }

.chatbot__chrome-title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: rgba(230, 237, 243, 0.45);
  margin-left: 0.25rem;
}

/* Área de mensajes */
.chatbot__messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  scrollbar-width: thin;
  scrollbar-color: #30363D transparent;
}

.chatbot__messages::-webkit-scrollbar       { width: 4px; }
.chatbot__messages::-webkit-scrollbar-thumb { background: #30363D; border-radius: 2px; }

.chatbot__msg {
  display: flex;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.6;
  color: #E6EDF3;
  word-break: break-word;
}

.chatbot__msg--user {
  flex-direction: row-reverse;
  color: #D4F255;
}

.chatbot__msg--user .chatbot__prompt { display: none; }

.chatbot__prompt {
  color: #D4F255;
  flex-shrink: 0;
  font-weight: 700;
  user-select: none;
}

.chatbot__msg--loading > span:last-child::after {
  content: '▋';
  animation: blink 1s step-start infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* Formulario de input */
.chatbot__form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border-top: 1px solid #30363D;
  background: #0D1117;
  flex-shrink: 0;
}

.chatbot__input-prompt {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #D4F255;
  font-weight: 700;
  flex-shrink: 0;
  user-select: none;
}

.chatbot__input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #E6EDF3;
  caret-color: #D4F255;
}

.chatbot__input::placeholder { color: rgba(230, 237, 243, 0.3); }
.chatbot__input:disabled     { opacity: 0.5; }

.chatbot__send {
  background: none;
  border: none;
  cursor: pointer;
  color: #D4F255;
  display: flex;
  align-items: center;
  padding: 0.2rem;
  transition: opacity 0.2s ease;
  flex-shrink: 0;
}

.chatbot__send:hover { opacity: 0.65; }

.chatbot__send svg {
  width: 1rem;
  height: 1rem;
}

/* Responsive */
@media (max-width: 400px) {
  .chatbot__window { width: calc(100vw - 2rem); }
  .wa-btn          { right: 1rem; bottom: 1rem; }
  .chatbot         { right: 1rem; bottom: 5rem; }
}

/* ============================================================
   PRICING APPROACH — servicios.html
============================================================ */
.pricing-approach {
  padding: 5rem 2rem;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}
.pricing-approach__sub {
  color: #8B949E;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  margin-top: -1rem;
  margin-bottom: 3rem;
  letter-spacing: 0.05em;
}
.pricing-approach__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}
.pricing-approach__item {
  background: #161B22;
  border: 1px solid #30363D;
  border-radius: 8px;
  padding: 2rem 1.5rem;
  text-align: left;
  transition: border-color 0.2s;
}
.pricing-approach__item:hover {
  border-color: #D4F255;
}
.pricing-approach__icon {
  font-size: 1.5rem;
  display: block;
  margin-bottom: 1rem;
}
.pricing-approach__item h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: #E6EDF3;
  margin-bottom: 0.5rem;
}
.pricing-approach__item p {
  font-size: 0.875rem;
  color: #8B949E;
  line-height: 1.6;
}
.pricing-approach__cta-note {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: #D4F255;
  letter-spacing: 0.03em;
}
