:root{
  --bg:#050816;
  --bg-alt:#020617;
  --card:#0b1220;
  --stroke:rgba(148,163,184,.35);
  --muted:#9aa4b2;
  --primary:#37e3a1;
  --secondary:#7aa8ff;
  --accent:#f97316;
  --white:#fff;
  --shadow:0 18px 45px rgba(0,0,0,.55), 0 0 0 1px var(--stroke);
  color-scheme:dark;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0;scroll-behavior:smooth}
body{
  font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  background:
    radial-gradient(circle at top,#111827 0,#020617 55%),
    radial-gradient(circle at bottom,#020617 0,#000 60%);
  color:#eaf0ff;
  min-height:100vh;
  position:relative;
  overflow-x:hidden;
}

/* THEME LIGHT OVERRIDES */
body[data-theme="light"]{
  --bg:#f3f4f6;
  --bg-alt:#e5e7eb;
  --card:#ffffff;
  --stroke:rgba(15,23,42,.08);
  --muted:#4b5563;
  --primary:#16a34a;
  --secondary:#2563eb;
  --accent:#ea580c;
  --white:#020617;
  color:#020617;
  background:radial-gradient(circle at top,#e5e7eb 0,#f9fafb 55%),
             radial-gradient(circle at bottom,#e5e7eb 0,#d1d5db 60%);
}

/* Fondo animado sutil: blobs */
.has-animated-bg::before,
.has-animated-bg::after{
  content:"";
  position:fixed;
  width:520px;
  height:520px;
  border-radius:999px;
  filter:blur(120px);
  opacity:.7;
  z-index:-3;
  pointer-events:none;
}
.has-animated-bg::before{
  background:radial-gradient(circle,#22c55e 0,transparent 60%);
  top:-140px;
  left:-80px;
  animation:blobMove1 24s ease-in-out infinite;
}
.has-animated-bg::after{
  background:radial-gradient(circle,#3b82f6 0,transparent 60%);
  bottom:-180px;
  right:-120px;
  animation:blobMove2 28s ease-in-out infinite;
}

/* Scanlines + noise */
body::before{
  content:"";
  position:fixed;
  inset:-40px;
  background:repeating-linear-gradient(
    to bottom,
    rgba(15,23,42,.5) 0px,
    rgba(15,23,42,.5) 1px,
    rgba(15,23,42,0) 3px
  );
  opacity:.17;
  mix-blend-mode:soft-light;
  pointer-events:none;
  z-index:-2;
}
body[data-theme="light"]::before{
  background:repeating-linear-gradient(
    to bottom,
    rgba(148,163,184,.4) 0px,
    rgba(148,163,184,.4) 1px,
    rgba(148,163,184,0) 3px
  );
  opacity:.10;
}

@keyframes blobMove1{
  0%,100%{transform:translate3d(0,0,0) scale(1)}
  33%{transform:translate3d(80px,40px,0) scale(1.1)}
  66%{transform:translate3d(30px,-60px,0) scale(.95)}
}
@keyframes blobMove2{
  0%,100%{transform:translate3d(0,0,0) scale(1)}
  40%{transform:translate3d(-60px,-30px,0) scale(1.08)}
  70%{transform:translate3d(-20px,40px,0) scale(.92)}
}

/* Utils */
.container{max-width:1160px;margin:auto;padding:0 20px}
.btn{
  display:inline-flex;
  gap:.5rem;
  align-items:center;
  padding:.85rem 1.15rem;
  border-radius:999px;
  border:1px solid var(--stroke);
  text-decoration:none;
  color:#fff;
  transition:.25s transform,.25s box-shadow,.25s background,.25s border-color,.25s color;
  position:relative;
  overflow:hidden;
  isolation:isolate;
}
.btn::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(120deg,rgba(255,255,255,.18),transparent 55%,rgba(148,163,184,.18));
  opacity:0;
  transform:translateX(-40%);
  transition:.35s;
  z-index:-1;
}
.btn--primary{
  background:linear-gradient(135deg,var(--primary),#22c55e);
  color:#020617;
  border-color:transparent;
  box-shadow:0 14px 30px rgba(34,197,94,.35);
}
.btn--ghost{
  background:rgba(15,23,42,.6);
  backdrop-filter:blur(10px);
}
body[data-theme="light"] .btn--ghost{
  background:rgba(255,255,255,.6);
}
.btn:hover{
  transform:translateY(-1px) scale(1.01);
  box-shadow:0 14px 35px rgba(15,23,42,.7);
}
.btn:hover::after{
  opacity:1;
  transform:translateX(0);
}
.btn--primary:hover{
  filter:brightness(1.02);
}
.btn--xl{width:100%;justify-content:center;font-weight:700}
.eyebrow{
  display:inline-flex;
  align-items:center;
  gap:.4rem;
  padding:.25rem .7rem;
  border:1px solid rgba(148,163,184,.45);
  border-radius:999px;
  color:var(--muted);
  font-size:.8rem;
  text-transform:uppercase;
  letter-spacing:.09em;
  background:radial-gradient(circle at top left,rgba(148,163,184,.25),transparent 55%);
}
.eyebrow::before{
  content:"●";
  font-size:.7rem;
  color:var(--primary);
}
.accent{color:var(--primary)}
.lead{color:var(--muted);font-size:1.02rem}
.muted{color:var(--muted)}
.section{padding:80px 0;position:relative}
.section::before{
  content:"";
  position:absolute;
  left:50%;
  top:0;
  width:130px;
  height:1px;
  transform:translateX(-50%);
  background:linear-gradient(90deg,transparent,var(--stroke),transparent);
  opacity:.6;
}
.section__head{text-align:center;max-width:780px;margin:0 auto 36px}
.section__head.left{text-align:left;margin-left:0}
.hide-sm{display:none}
@media(min-width:640px){.hide-sm{display:initial}}

/* Nav */
.nav{
  position:sticky;
  top:0;
  z-index:40;
  backdrop-filter:blur(16px);
  background:linear-gradient(180deg,rgba(15,23,42,.96),rgba(15,23,42,.78));
  border-bottom:1px solid var(--stroke);
}
body[data-theme="light"] .nav{
  background:rgba(248,250,252,.94);
  border-bottom:1px solid rgba(148,163,184,.4);
}
.nav__inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 0;
}
.brand{
  display:flex;
  align-items:center;
  gap:.6rem;
  color:#fff;
  text-decoration:none;
  font-weight:700;
  letter-spacing:.04em;
}
body[data-theme="light"] .brand{
  color:#020617;
}
.brand img{
  filter:drop-shadow(0 0 6px rgba(55,227,161,.6));
  animation:pulseLogo 4s ease-in-out infinite;
}
@keyframes pulseLogo{
  0%,100%{transform:scale(1);filter:drop-shadow(0 0 4px rgba(55,227,161,.4))}
  50%{transform:scale(1.06);filter:drop-shadow(0 0 12px rgba(55,227,161,.9))}
}
.nav__links{
  display:flex;
  gap:18px;
  align-items:center;
}
.nav__links a{
  position:relative;
  color:#e5edff;
  text-decoration:none;
  opacity:.85;
  font-size:.9rem;
  font-family:"JetBrains Mono",monospace;
}
body[data-theme="light"] .nav__links a{
  color:#111827;
}
.nav__links a::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:-4px;
  height:2px;
  border-radius:999px;
  transform:scaleX(0);
  transform-origin:center;
  background:linear-gradient(90deg,var(--primary),var(--secondary));
  transition:.25s;
}
.nav__links a:hover{
  opacity:1;
}
.nav__links a:hover::after{
  transform:scaleX(1);
}
.nav__toggle{
  display:none;
  background:rgba(15,23,42,.9);
  border:1px solid var(--stroke);
  color:#fff;
  padding:.4rem .7rem;
  border-radius:12px;
}
body[data-theme="light"] .nav__toggle{
  background:rgba(15,23,42,.08);
  color:#020617;
}

/* Theme toggle button */
.theme-toggle{
  border-radius:999px;
  border:1px solid var(--stroke);
  background:rgba(15,23,42,.9);
  color:#f9fafb;
  padding:.35rem .6rem;
  cursor:pointer;
  font-size:.9rem;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  transition:.2s;
}
body[data-theme="light"] .theme-toggle{
  background:#e5e7eb;
  color:#020617;
}
.theme-toggle:hover{
  transform:translateY(-1px);
  box-shadow:0 10px 22px rgba(15,23,42,.6);
}

/* Hero */
.hero{
  padding:96px 0 72px;
  position:relative;
  overflow:hidden;
}
.hero__grid{
  display:grid;
  grid-template-columns:1.25fr .95fr;
  gap:32px;
  align-items:center;
}
.hero__content h1{
  font-size:44px;
  line-height:1.12;
  margin:.5rem 0 1rem;
}
.hero__content h1 span.accent{
  background:linear-gradient(120deg,#22c55e,#a3e635,#22d3ee);
  -webkit-background-clip:text;
  color:transparent;
}
.hero__tags{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:12px 0 18px;
}
.hero__tags span{
  border-radius:999px;
  padding:.4rem .75rem;
  border:1px solid rgba(148,163,184,.5);
  background:rgba(15,23,42,.75);
  font-size:.8rem;
  color:#e5edff;
}
body[data-theme="light"] .hero__tags span{
  background:rgba(255,255,255,.85);
  color:#020617;
}
.hero .cta{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin:10px 0 20px;
}
.hero__stats{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-top:6px;
}
.stat{
  flex:1;
  min-width:120px;
  border-radius:16px;
  padding:.7rem .8rem;
  background:radial-gradient(circle at top left,rgba(34,197,94,.18),rgba(15,23,42,.95));
  border:1px solid rgba(34,197,94,.35);
}
.stat:nth-child(2){
  background:radial-gradient(circle at top left,rgba(59,130,246,.2),rgba(15,23,42,.95));
  border-color:rgba(59,130,246,.4);
}
.stat:nth-child(3){
  background:radial-gradient(circle at top left,rgba(249,115,22,.2),rgba(15,23,42,.95));
  border-color:rgba(249,115,22,.4);
}
body[data-theme="light"] .stat{
  background:radial-gradient(circle at top left,rgba(34,197,94,.12),#f9fafb);
}
body[data-theme="light"] .stat:nth-child(2){
  background:radial-gradient(circle at top left,rgba(59,130,246,.12),#f9fafb);
}
body[data-theme="light"] .stat:nth-child(3){
  background:radial-gradient(circle at top left,rgba(249,115,22,.12),#f9fafb);
}
.stat strong{
  display:block;
  font-size:1.35rem;
}
.stat span{
  font-size:.8rem;
  color:#cbd5f5;
}
body[data-theme="light"] .stat span{
  color:#4b5563;
}

/* Hero grid overlay */
.hero__grid-overlay{
  position:absolute;
  inset:10% 0 auto;
  opacity:.15;
  background-image:
    linear-gradient(to right,rgba(148,163,184,.3) 1px,transparent 1px),
    linear-gradient(to bottom,rgba(148,163,184,.3) 1px,transparent 1px);
  background-size:40px 40px;
  pointer-events:none;
  z-index:-1;
}

/* Hero right: terminal + skills */
.hero__right{
  display:grid;
  gap:16px;
}
.hero__terminal{
  border-radius:20px;
  background:radial-gradient(circle at top,var(--card),#020617);
  box-shadow:var(--shadow);
  border:1px solid var(--stroke);
  overflow:hidden;
  transform-style:preserve-3d;
}
.hero__terminal-bar{
  display:flex;
  align-items:center;
  gap:6px;
  padding:.45rem .7rem;
  background:linear-gradient(90deg,#020617,#020617,#0b1120);
  border-bottom:1px solid rgba(15,23,42,.9);
  font-size:.75rem;
}
body[data-theme="light"] .hero__terminal-bar{
  background:linear-gradient(90deg,#e5e7eb,#e5e7eb,#cbd5f5);
  border-bottom:1px solid rgba(148,163,184,.5);
}
.hero__terminal-title{
  margin-left:auto;
  color:#9ca3af;
  font-family:"JetBrains Mono",monospace;
}
.dot{
  width:9px;
  height:9px;
  border-radius:999px;
  display:inline-block;
}
.dot--red{background:#f97373}
.dot--yellow{background:#facc15}
.dot--green{background:#22c55e}
.hero__terminal-body{
  padding:1rem .95rem 1.1rem;
  background:radial-gradient(circle at top,#020617,#020617 60%,#020617 100%);
  font-family:"JetBrains Mono",monospace;
  font-size:.8rem;
  color:#e5e7eb;
  max-height:250px;
  overflow:auto;
}
body[data-theme="light"] .hero__terminal-body{
  background:#020617;
  color:#e5e7eb;
}
.hero__terminal-body pre{
  margin:0;
  white-space:pre-wrap;
}

/* Skills card */
.hero__skills{
  border-radius:18px;
  border:1px solid rgba(148,163,184,.4);
  background:radial-gradient(circle at top,#020617,#020617);
  padding:14px 16px 16px;
}
body[data-theme="light"] .hero__skills{
  background:#f9fafb;
}
.hero__skills h3{
  margin:0 0 8px;
  font-size:1rem;
}
.hero__skills-grid{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.hero__skills-grid span{
  border-radius:999px;
  padding:.35rem .7rem;
  border:1px solid rgba(148,163,184,.45);
  font-size:.78rem;
  color:#e5edff;
  background:rgba(15,23,42,.9);
}
body[data-theme="light"] .hero__skills-grid span{
  background:#ffffff;
  color:#020617;
}

/* Servicios */
.cards{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:18px;
  margin-top:18px;
}
.card{
  background:radial-gradient(circle at top,var(--card),#020617);
  border:1px solid var(--stroke);
  border-radius:18px;
  padding:18px;
  transition:
    transform .3s ease,
    box-shadow .3s ease,
    border-color .3s ease,
    background .3s ease;
  position:relative;
  overflow:hidden;
}
.card::before{
  content:"";
  position:absolute;
  inset:-40%;
  background:conic-gradient(from 0deg,var(--primary),var(--secondary),var(--accent),var(--primary));
  opacity:0;
  transition:.45s;
  z-index:-1;
}
.card::after{
  content:"";
  position:absolute;
  inset:1px;
  border-radius:17px;
  background:radial-gradient(circle at top,rgba(15,23,42,.98),rgba(15,23,42,.98));
  z-index:-1;
}
body[data-theme="light"] .card::after{
  background:radial-gradient(circle at top,#ffffff,#f9fafb);
}
.card:hover{
  transform:translateY(-6px) scale(1.01);
  box-shadow:0 20px 40px rgba(15,23,42,.85);
  border-color:rgba(148,163,184,.4);
}
.card:hover::before{
  opacity:.38;
  filter:blur(10px);
}
.card h3{margin:6px 0}
.card p{color:#cbd5f5}
body[data-theme="light"] .card p{
  color:#4b5563;
}
.chips{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:10px;
}
.chips span{
  border:1px solid var(--stroke);
  border-radius:999px;
  padding:.3rem .7rem;
  color:var(--muted);
  font-size:.8rem;
  background:rgba(15,23,42,.7);
}
body[data-theme="light"] .chips span{
  background:#f9fafb;
}

/* PROYECTOS – CARRUSEL ESTILO PRO */
.projects-shell{
  position:relative;
  margin-top:26px;
  padding-bottom:40px;
}
.projects-shell::before{
  content:"";
  position:absolute;
  left:50%;
  bottom:10px;
  width:60%;
  max-width:520px;
  height:6px;
  border-radius:999px;
  transform:translateX(-50%);
  background:rgba(2,6,23,.9);
  box-shadow:0 18px 40px rgba(0,0,0,.85);
}
body[data-theme="light"] .projects-shell::before{
  background:#d1d5db;
}
.projects-shell::after{
  content:"";
  position:absolute;
  left:50%;
  bottom:11px;
  width:30%;
  max-width:260px;
  height:3px;
  border-radius:999px;
  transform:translateX(-50%);
  background:linear-gradient(90deg,var(--primary),var(--secondary));
}

/* Contenedor base */
.carousel{
  position:relative;
}

/* Viewport */
.carousel__viewport{
  overflow-x:auto;
  overflow-y:visible;
  scroll-behavior:smooth;
  scroll-snap-type:x mandatory;
  -webkit-overflow-scrolling:touch;
}
.carousel__viewport::-webkit-scrollbar{
  height:0;
}

/* Track */
.carousel__track{
  display:flex;
  gap:20px;
  padding:10px 40px 30px;
  min-width:100%;
}

/* Botones flotando */
.carousel__btn{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  z-index:3;
  background:rgba(15,23,42,.95);
  border:1px solid var(--stroke);
  color:#fff;
  width:38px;
  height:38px;
  border-radius:999px;
  display:grid;
  place-items:center;
  cursor:pointer;
  box-shadow:0 12px 30px rgba(15,23,42,.9);
  transition:.25s transform,.25s background,.25s box-shadow;
}
body[data-theme="light"] .carousel__btn{
  background:#e5e7eb;
  color:#020617;
}
.carousel__btn.prev{left:12px}
.carousel__btn.next{right:12px}
.carousel__btn:hover{
  transform:translateY(-50%) scale(1.07);
  background:#020617;
  box-shadow:0 16px 38px rgba(0,0,0,.9);
}
body[data-theme="light"] .carousel__btn:hover{
  background:#d1d5db;
}

/* Dots (móvil) */
.carousel__dots{
  display:none;
  gap:6px;
  justify-content:center;
  margin-top:14px;
}
.carousel__dots button{
  width:9px;
  height:9px;
  border-radius:999px;
  border:none;
  background:#42526b;
  opacity:.5;
  transition:.2s;
}
.carousel__dots button.is-active{
  opacity:1;
  background:linear-gradient(90deg,var(--primary),var(--secondary));
}

.grid .tile,
.carousel .tile{scroll-snap-align:center}

/* Tarjetas slider */
.projects-carousel .tile{
  position:relative;
  display:block;
  min-width:280px;
  max-width:360px;
  border-radius:24px;
  overflow:hidden;
  border:1px solid rgba(148,163,184,.55);
  background:radial-gradient(circle at top,var(--card),#020617);
  box-shadow:0 18px 40px rgba(15,23,42,.9);
  transform-origin:center;
  transition:
    transform .4s ease,
    box-shadow .4s ease,
    border-color .3s ease,
    filter .3s ease;
}
body[data-theme="light"] .projects-carousel .tile{
  background:radial-gradient(circle at top,#ffffff,#e5e7eb);
  box-shadow:0 14px 30px rgba(148,163,184,.6);
}
.projects-carousel .tile img{
  width:100%;
  height:220px;
  object-fit:cover;
  transition:transform .5s,filter .5s;
}
.projects-carousel .tile span{
  position:absolute;
  left:12px;
  bottom:12px;
  background:rgba(15,23,42,.90);
  padding:.4rem .9rem;
  border-radius:999px;
  font-size:.82rem;
  color:#e5e7eb;
  display:inline-flex;
  align-items:center;
  gap:.35rem;
}
.projects-carousel .tile span::before{
  content:"●";
  font-size:.7rem;
  color:var(--primary);
}
body[data-theme="light"] .projects-carousel .tile span{
  background:rgba(15,23,42,.95);
}
.projects-carousel .tile:hover{
  transform:translateY(-8px) scale(1.02);
  box-shadow:0 24px 50px rgba(15,23,42,1);
  border-color:rgba(248,250,252,.9);
  filter:saturate(1.05);
}
.projects-carousel .tile:hover img{
  transform:scale(1.08);
  filter:contrast(1.05) saturate(1.1);
}

/* Bots IA */
.bots__grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px;
  align-items:stretch;
}
.bots__card{
  border:1px solid var(--stroke);
  border-radius:18px;
  padding:18px;
  background:radial-gradient(circle at top,var(--card),#020617);
  box-shadow:var(--shadow);
  position:relative;
  overflow:hidden;
}
.bots__card::before{
  content:"";
  position:absolute;
  inset:-35%;
  background:conic-gradient(from 180deg,var(--secondary),var(--primary),var(--accent),var(--secondary));
  opacity:.08;
  filter:blur(24px);
  z-index:-1;
}
body[data-theme="light"] .bots__card{
  background:radial-gradient(circle at top,#ffffff,#f3f4f6);
}
.bots__demo .screen{
  background:#020617;
  border:1px solid var(--stroke);
  border-radius:16px;
  padding:14px;
  height:290px;
  overflow:auto;
  position:relative;
}
body[data-theme="light"] .bots__demo .screen{
  background:#020617;
}
.bubble{
  max-width:85%;
  margin:8px 0;
  padding:10px 12px;
  border-radius:14px;
  animation:pop .4s ease both;
  font-size:.9rem;
}
.bubble.you{
  background:#111827;
  color:#eaf0ff;
}
.bubble.me{
  background:#eaf0ff;
  color:#0b1220;
  margin-left:auto;
}
@keyframes pop{
  from{opacity:0;transform:translateY(6px) scale(.97)}
  to{opacity:1;transform:none}
}
.list{
  margin:8px 0 0;
  padding-left:18px;
  color:#dbe3ff;
}
body[data-theme="light"] .list{
  color:#4b5563;
}

/* Sobre mí */
.about{
  display:grid;
  grid-template-columns:1.2fr .8fr;
  gap:20px;
}
.about__card{
  border:1px solid var(--stroke);
  border-radius:18px;
  padding:18px;
  background:radial-gradient(circle at top,var(--card),#020617);
  box-shadow:var(--shadow);
}
body[data-theme="light"] .about__card{
  background:radial-gradient(circle at top,#ffffff,#f3f4f6);
}
.about__bullets{
  display:grid;
  gap:8px;
  margin:10px 0;
  color:#dbe3ff;
}
body[data-theme="light"] .about__bullets{
  color:#4b5563;
}

/* Precios */
.pricing{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:18px;
}
.price{
  border:1px solid var(--stroke);
  border-radius:18px;
  padding:18px;
  background:radial-gradient(circle at top,var(--card),#020617);
  box-shadow:var(--shadow);
  position:relative;
  overflow:hidden;
}
body[data-theme="light"] .price{
  background:radial-gradient(circle at top,#ffffff,#f3f4f6);
}
.price::before{
  content:"";
  position:absolute;
  inset:-40%;
  background:conic-gradient(from 120deg,var(--primary),var(--secondary),var(--accent),var(--primary));
  opacity:0;
  filter:blur(18px);
  transition:.4s;
  z-index:-1;
}
.price:hover::before{
  opacity:.22;
}
.price__value{
  font-size:32px;
  font-weight:800;
  margin:8px 0 12px;
}
.price ul{
  list-style:none;
  padding:0;
  margin:0 0 12px;
  color:#d8e1ff;
}
body[data-theme="light"] .price ul{
  color:#4b5563;
}
.price--pop{
  outline:2px solid var(--primary);
  transform:translateY(-4px);
}

/* Contacto */
.contact{
  display:grid;
  grid-template-columns:1.1fr .9fr;
  gap:18px;
}
.contact__card{
  border:1px solid var(--stroke);
  border-radius:18px;
  padding:20px;
  background:radial-gradient(circle at top,var(--card),#020617);
  box-shadow:var(--shadow);
}
body[data-theme="light"] .contact__card{
  background:radial-gradient(circle at top,#ffffff,#f3f4f6);
}
.form{
  display:grid;
  gap:12px;
  margin-top:10px;
}
.field{
  display:grid;
  gap:6px;
  font-size:.9rem;
  color:#dbe3ff;
}
body[data-theme="light"] .field{
  color:#374151;
}
.form input,
.form select,
.form textarea{
  background:rgba(15,23,42,.9);
  border:1px solid var(--stroke);
  border-radius:12px;
  padding:.9rem .95rem;
  color:#eaf0ff;
  outline:none;
  transition:border-color .2s,box-shadow .2s,background .2s,color .2s,transform .15s;
}
body[data-theme="light"] .form input,
body[data-theme="light"] .form select,
body[data-theme="light"] .form textarea{
  background:#f9fafb;
  color:#020617;
}
.form input::placeholder,
.form textarea::placeholder{color:#8b97ab}
.form input:focus,
.form select:focus,
.form textarea:focus{
  border-color:var(--primary);
  box-shadow:0 0 0 3px rgba(55,227,161,.18);
  background:rgba(15,23,42,1);
  color:#eaf0ff;
  transform:translateY(-1px);
}
body[data-theme="light"] .form input:focus,
body[data-theme="light"] .form select:focus,
body[data-theme="light"] .form textarea:focus{
  background:#ffffff;
  color:#020617;
}
.form__note{margin-top:8px;font-size:.8rem;color:#94a3b8}
body[data-theme="light"] .form__note{
  color:#6b7280;
}

/* Select */
select.select,
.form select{
  background-color:#0f172a !important;
  color:#eaf0ff !important;
  border:1px solid var(--stroke);
}
select.select option,
.form select option{
  background-color:#020617 !important;
  color:#eaf0ff !important;
}
select.select option:checked,
.form select option:checked{
  background-color:#1e293b !important;
  color:#eaf0ff !important;
}
body[data-theme="light"] select.select,
body[data-theme="light"] .form select{
  background-color:#f9fafb !important;
  color:#020617 !important;
}
body[data-theme="light"] select.select option,
body[data-theme="light"] .form select option{
  background-color:#ffffff !important;
  color:#020617 !important;
}
select.select::-ms-expand{display:none}

/* Columna lateral contacto / garantía */
.contact__side{display:grid;gap:16px}
.kpis{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:10px;
}
.kpi{
  display:grid;
  place-items:center;
  border:1px solid var(--stroke);
  border-radius:14px;
  padding:14px;
  background:radial-gradient(circle at top,var(--card),#020617);
}
body[data-theme="light"] .kpi{
  background:radial-gradient(circle at top,#ffffff,#f3f4f6);
}
.kpi strong{font-size:22px;line-height:1}
.kpi span{color:var(--muted);font-size:.85rem}

.badge-row{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.badge{
  border:1px solid var(--stroke);
  border-radius:999px;
  padding:.35rem .7rem;
  color:#dbe3ff;
  font-size:.82rem;
  background:rgba(15,23,42,.85);
}
body[data-theme="light"] .badge{
  background:#ffffff;
  color:#020617;
}

.assure-card{
  border:1px solid var(--stroke);
  border-radius:14px;
  padding:14px;
  background:radial-gradient(circle at top,var(--card),#020617);
}
body[data-theme="light"] .assure-card{
  background:radial-gradient(circle at top,#ffffff,#f3f4f6);
}
.assure-card h5{
  margin:0 0 6px 0;
  font-size:1rem;
}

.faq{
  display:grid;
  gap:8px;
}
.faq details{
  border:1px solid var(--stroke);
  border-radius:12px;
  background:rgba(15,23,42,.9);
}
body[data-theme="light"] .faq details{
  background:#f9fafb;
}
.faq summary{
  cursor:pointer;
  padding:.7rem .9rem;
  color:#eaf0ff;
  list-style:none;
  outline:none;
}
body[data-theme="light"] .faq summary{
  color:#020617;
}
.faq summary::-webkit-details-marker{display:none}
.faq details[open] summary{border-bottom:1px solid var(--stroke)}
.faq p{
  margin:0;
  padding:.7rem .9rem;
  color:#cfe1ff;
}
body[data-theme="light"] .faq p{
  color:#4b5563;
}
.assure-cta{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

/* Footer */
.footer{
  border-top:1px solid var(--stroke);
  padding:22px 0;
  margin-top:32px;
  background:rgba(2,6,23,.95);
}
body[data-theme="light"] .footer{
  background:#e5e7eb;
}
.footer__inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
.footer .links{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}
.footer a{
  color:#dbe3ff;
  text-decoration:none;
  font-size:.86rem;
  opacity:.85;
}
body[data-theme="light"] .footer a{
  color:#111827;
}
.footer a:hover{opacity:1}
.to-top{
  position:fixed;
  right:16px;
  bottom:16px;
  border:1px solid var(--stroke);
  background:rgba(15,23,42,.85);
  color:#fff;
  border-radius:999px;
  padding:.55rem .9rem;
  opacity:0;
  transform:translateY(8px);
  pointer-events:none;
  transition:.25s;
  box-shadow:0 10px 24px rgba(15,23,42,.9);
}
body[data-theme="light"] .to-top{
  background:#e5e7eb;
  color:#020617;
}
.to-top.show{
  opacity:1;
  transform:none;
  pointer-events:auto;
}

/* Reveal scroll */
.reveal{
  opacity:0;
  transform:translateY(18px) translateZ(0);
  transition:opacity .7s ease,transform .7s ease;
  will-change:transform,opacity;
}
.reveal.in{
  opacity:1;
  transform:none;
}
.reveal[data-intense="true"].in{
  transition-duration:.9s;
}

/* Responsive */
@media(max-width:1024px){
  .hero__grid{grid-template-columns:1fr}
  .hero__right{order:-1}
  .hero{
    padding-top:86px;
  }
  .cards,
  .pricing{grid-template-columns:repeat(2,1fr)}
  .bots__grid,
  .about{grid-template-columns:1fr}
  .contact{grid-template-columns:1fr}
}
@media(max-width:640px){
  .nav__links{
    display:none;
    position:absolute;
    inset:auto 16px 10px 16px;
    padding:12px;
    border-radius:16px;
    background:rgba(15,23,42,.97);
    flex-direction:column;
    gap:10px;
    box-shadow:0 18px 40px rgba(15,23,42,.9);
  }
  body[data-theme="light"] .nav__links{
    background:#f9fafb;
  }
  .nav__links.is-open{display:flex}
  .nav__toggle{display:inline-block}

  .hero__content h1{
    font-size:32px;
  }
  .cards,
  .pricing{grid-template-columns:1fr}
  .carousel__track{
    padding:6px 18px 26px;
  }
  .projects-carousel .tile{
    min-width:84vw;
    max-width:84vw;
  }
  .carousel__btn{display:none}
  .carousel__dots{display:flex}
  .kpis{grid-template-columns:repeat(3,1fr)}
  .assure-cta .btn{flex:1}
}

/* ============================
   FONDO EXTRA: ÓRBITAS + SHAPES
   ============================ */

.bg-orbits{
  position:fixed;
  inset:0;
  overflow:hidden;
  pointer-events:none;
  z-index:-5;
}

/* ÓRBITAS circulares que giran muy lento */
.bg-orbit{
  position:absolute;
  border-radius:999px;
  border:1px dashed rgba(148,163,184,.25);
  box-shadow:0 0 40px rgba(15,23,42,.8);
  mix-blend-mode:screen;
}

.bg-orbit--green{
  width:520px;
  height:520px;
  top:-120px;
  left:-80px;
  border-color:rgba(34,197,94,.55);
  box-shadow:0 0 60px rgba(34,197,94,.35);
  animation:orbit-rotate 48s linear infinite;
}

.bg-orbit--blue{
  width:460px;
  height:460px;
  bottom:-140px;
  right:-40px;
  border-color:rgba(37,99,235,.6);
  box-shadow:0 0 60px rgba(37,99,235,.35);
  animation:orbit-rotate-reverse 55s linear infinite;
}

.bg-orbit--orange{
  width:280px;
  height:280px;
  top:40%;
  right:10%;
  border-color:rgba(249,115,22,.55);
  box-shadow:0 0 40px rgba(249,115,22,.35);
  animation:orbit-pulse 36s ease-in-out infinite;
}

/* Shapes tipo tarjetas de código flotando */
.bg-shape{
  position:absolute;
  border-radius:24px;
  border:1px solid rgba(148,163,184,.3);
  background:radial-gradient(circle at top,var(--card),#020617);
  box-shadow:0 20px 40px rgba(15,23,42,.85);
  opacity:.9;
  overflow:hidden;
}

.bg-shape::before{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(135deg,rgba(56,189,248,.3),transparent 40%,rgba(34,197,94,.25));
  opacity:.18;
}

.bg-shape--code{
  width:220px;
  height:130px;
  top:20%;
  left:8%;
  animation:float-code 22s ease-in-out infinite;
}

.bg-shape--code::after{
  content:"<code />";
  position:absolute;
  inset:auto 0 14px 0;
  margin-inline:auto;
  text-align:center;
  font-family:"JetBrains Mono",monospace;
  font-size:.9rem;
  color:#e5e7eb;
  opacity:.8;
}

.bg-shape--tag{
  width:180px;
  height:110px;
  bottom:14%;
  left:50%;
  transform:translateX(-50%);
  animation:float-tag 26s ease-in-out infinite;
}

.bg-shape--tag::after{
  content:"<div class=\"dev\" />";
  position:absolute;
  inset:auto 0 12px 0;
  margin-inline:auto;
  text-align:center;
  font-family:"JetBrains Mono",monospace;
  font-size:.8rem;
  color:#e5e7eb;
  opacity:.8;
}

/* ============================
   PARTÍCULAS (PUNTITOS DE LUZ)
   ============================ */

.bg-particles{
  position:fixed;
  inset:0;
  pointer-events:none;
  z-index:-4;
}

.particle{
  position:absolute;
  width:3px;
  height:3px;
  border-radius:999px;
  background:rgba(226,232,240,.9);
  box-shadow:0 0 10px rgba(148,163,184,.9);
  opacity:.8;
  animation:twinkle 4s ease-in-out infinite alternate;
}

/* Posición de cada partícula */
.particle--1{top:18%;left:30%;animation-delay:.2s}
.particle--2{top:32%;left:78%;animation-delay:.8s}
.particle--3{top:55%;left:14%;animation-delay:1.2s}
.particle--4{top:68%;left:64%;animation-delay:1.8s}
.particle--5{top:8%;left:55%;animation-delay:2.2s}
.particle--6{top:82%;left:40%;animation-delay:2.8s}

/* En modo claro, partículas más discretas */
body[data-theme="light"] .particle{
  background:rgba(148,163,184,.9);
  box-shadow:0 0 8px rgba(148,163,184,.7);
}

/* ANIMACIONES FONDO */
@keyframes orbit-rotate{
  0%{transform:translate3d(0,0,0) rotate(0deg)}
  100%{transform:translate3d(0,0,0) rotate(360deg)}
}

@keyframes orbit-rotate-reverse{
  0%{transform:translate3d(0,0,0) rotate(0deg)}
  100%{transform:translate3d(0,0,0) rotate(-360deg)}
}

@keyframes orbit-pulse{
  0%{
    transform:scale(1) translate3d(0,0,0) rotate(0deg);
    opacity:.8;
  }
  50%{
    transform:scale(1.08) translate3d(-10px,6px,0) rotate(12deg);
    opacity:1;
  }
  100%{
    transform:scale(1) translate3d(0,0,0) rotate(0deg);
    opacity:.85;
  }
}

@keyframes float-code{
  0%{
    transform:translate3d(0,0,0) rotate(-6deg);
  }
  33%{
    transform:translate3d(10px,-16px,0) rotate(-2deg);
  }
  66%{
    transform:translate3d(-4px,10px,0) rotate(-10deg);
  }
  100%{
    transform:translate3d(0,0,0) rotate(-6deg);
  }
}

@keyframes float-tag{
  0%{
    transform:translate3d(-50%,0,0) rotate(5deg);
  }
  40%{
    transform:translate3d(-54%,-18px,0) rotate(-2deg);
  }
  80%{
    transform:translate3d(-46%,10px,0) rotate(8deg);
  }
  100%{
    transform:translate3d(-50%,0,0) rotate(5deg);
  }
}

@keyframes twinkle{
  0%{
    opacity:.15;
    transform:scale(.9) translateY(0);
    box-shadow:0 0 4px rgba(148,163,184,.4);
  }
  50%{
    opacity:.9;
    transform:scale(1.2) translateY(-3px);
    box-shadow:0 0 14px rgba(148,163,184,1);
  }
  100%{
    opacity:.3;
    transform:scale(1.05) translateY(1px);
    box-shadow:0 0 6px rgba(148,163,184,.6);
  }
}

/* Ajuste para tema claro: shapes más suaves */
body[data-theme="light"] .bg-shape{
  background:radial-gradient(circle at top,#ffffff,#e5e7eb);
  box-shadow:0 12px 30px rgba(148,163,184,.55);
}
body[data-theme="light"] .bg-shape::before{
  background:linear-gradient(135deg,rgba(59,130,246,.25),transparent 45%,rgba(34,197,94,.2));
}
/* ===== PROYECTOS: solo imágenes + selección activa (se agranda) ===== */

.projects-carousel .tile{
  position:relative;
  display:block;
  min-width:280px;
  max-width:360px;
  border-radius:24px;
  overflow:hidden;
  border:1px solid rgba(148,163,184,.55);
  background:radial-gradient(circle at top,var(--card),#020617);
  box-shadow:0 18px 40px rgba(15,23,42,.9);
  transform-origin:center;
  cursor:pointer;

  /* estado normal */
  transform:scale(.92);
  opacity:.70;
  filter:saturate(.95);

  transition:
    transform .35s ease,
    box-shadow .35s ease,
    opacity .35s ease,
    filter .35s ease,
    border-color .3s ease;
}

body[data-theme="light"] .projects-carousel .tile{
  background:radial-gradient(circle at top,#ffffff,#e5e7eb);
  box-shadow:0 14px 30px rgba(148,163,184,.6);
}

.projects-carousel .tile img{
  width:100%;
  height:220px;
  object-fit:cover;
  display:block;
  transition:transform .45s ease, filter .45s ease;
}

.projects-carousel .tile:hover{
  opacity:.92;
  transform:scale(.98);
  filter:saturate(1.05);
}

.projects-carousel .tile.active{
  transform:scale(1.14);
  opacity:1;
  z-index:5;
  border-color:rgba(248,250,252,.9);
  box-shadow:0 26px 60px rgba(0,0,0,.85);
  filter:saturate(1.08);
}

.projects-carousel .tile.active img{
  transform:scale(1.05);
  filter:contrast(1.05) saturate(1.1);
}

/* foco teclado */
.projects-carousel .tile:focus{
  outline:none;
  box-shadow:0 0 0 3px rgba(55,227,161,.25), 0 18px 40px rgba(15,23,42,.9);
}

/* móvil */
@media(max-width:640px){
  .projects-carousel .tile{
    min-width:84vw;
    max-width:84vw;
  }
  .projects-carousel .tile.active{
    transform:scale(1.06);
  }
}
/* ===== Lightbox / Modal de imagen ===== */
.lightbox{
  position:fixed;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  padding:18px;
  background:rgba(0,0,0,.72);
  backdrop-filter:blur(10px);
  z-index:999;
}

.lightbox.is-open{display:flex}

.lightbox__figure{
  margin:0;
  width:min(1100px, 96vw);
  height:min(80vh, 780px);
  border-radius:18px;
  overflow:hidden;
  border:1px solid rgba(148,163,184,.45);
  background:radial-gradient(circle at top,var(--card),#020617);
  box-shadow:0 28px 70px rgba(0,0,0,.85);
  display:grid;
  place-items:center;
  position:relative;
}

.lightbox__figure img{
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
}

.lightbox__close{
  position:absolute;
  top:14px;
  right:14px;
  width:40px;
  height:40px;
  border-radius:999px;
  border:1px solid var(--stroke);
  background:rgba(15,23,42,.92);
  color:#fff;
  cursor:pointer;
  z-index:2;
}

.lightbox__nav{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  width:44px;
  height:44px;
  border-radius:999px;
  border:1px solid var(--stroke);
  background:rgba(15,23,42,.92);
  color:#fff;
  cursor:pointer;
  display:grid;
  place-items:center;
  z-index:2;
}

.lightbox__prev{left:16px}
.lightbox__next{right:16px}

.lightbox__close:hover,
.lightbox__nav:hover{
  transform:translateY(-50%) scale(1.06);
}

.lightbox__close:hover{transform:scale(1.06)}

@media(max-width:640px){
  .lightbox__nav{display:none}
  .lightbox__figure{
    width:96vw;
    height:70vh;
  }
}
