/* Página oscura por diseño (referencia del usuario). Un degradado iridiscente como único acento. */
:root {
  --bg: #0a0b0f;
  --bg-2: #101217;
  --text: #ededf0;
  --muted: #8b8e99;
  --dim: #6b6f7a;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.14);
  /* Tema por defecto: azulgrana. Los demás temas (selector del hero) redefinen estos tokens */
  --c-glow: #1f4c9c;   /* resplandores de ambiente */
  --c-glow2: #a50044;  /* segundo tono del resplandor */
  --c-blue: #4d8ae6;   /* puntos y marcas activas */
  --c-ok: #5bbf98;     /* terminado, en línea */
  --c-run: #e0b13a;    /* en curso */
  --c-warm: #a50044;   /* acento cálido */
  --g1: #4d8ae6; --g2: #cf2f6b;
  --grad: linear-gradient(120deg, var(--g1), var(--g2));
  --robot-grad: #4d8ae6, #2a5fbf, #7a2a7e, #a50044, #cf2f6b;
  --robot-rim: #4d8ae6;
  --robot-leds: #4d8ae6, #e0b13a, #a50044;
  --pad: clamp(16px, 4vw, 56px);
  --max: 1520px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Geist", system-ui, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.mono { font-family: "Geist Mono", ui-monospace, monospace; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
main { position: relative; z-index: 2; overflow-x: hidden; width: 100%; }

/* Fondo: líneas de cuadrícula, brillo y grano */
.grid-lines {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  display: grid; grid-template-columns: repeat(4, 1fr);
  max-width: var(--max); margin: 0 auto; padding: 0 var(--pad);
}
.grid-lines span { border-left: 1px solid var(--line); }
.grid-lines span:last-child { position: absolute; right: var(--pad); top: 0; bottom: 0; border-left: 1px solid var(--line); }
.glow {
  position: fixed; z-index: 0; pointer-events: none;
  width: 70vmin; height: 70vmin; left: 50%; top: 50%; transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, color-mix(in srgb, var(--c-glow) 20%, transparent), color-mix(in srgb, var(--c-glow2) 7%, transparent) 58%, transparent);
  filter: blur(20px);
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: 50; pointer-events: none; opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
#robot {
  position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; z-index: 1;
  pointer-events: none;
}
.no-webgl #robot { display: none; }

/* Avatar de Iago (recortado, con transparencia): entra desde la sección de proyectos */
#avatar {
  position: fixed; left: 50%; top: 47%; z-index: 1; pointer-events: none; opacity: 0;
  height: 66vh; height: 66dvh; aspect-ratio: 682 / 1024;
  perspective: 1200px; will-change: transform, opacity; transform: translate(-50%, -50%);
}
.avatar-stage {
  position: relative; width: 100%; height: 100%; transform-origin: 50% 100%;
  filter: drop-shadow(0 30px 50px color-mix(in srgb, var(--c-glow) 22%, transparent));
  /* Solo se desvanece el corte de las piernas */
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent 98%);
  mask-image: linear-gradient(to bottom, #000 72%, transparent 98%);
}
.avatar-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: bottom; opacity: 0; transition: opacity .5s ease; }
.avatar-img.on { opacity: 1; }
.avatar-img[data-pose="blink"] {
  transition: opacity .05s linear;
  /* Del parpadeo solo se usan los ojos: el resto de esa imagen (suéter, pelo) no coincide del todo con la neutral */
  -webkit-mask-image: radial-gradient(ellipse 19% 4.6% at 49.1% 23.5%, #000 55%, transparent 100%);
  mask-image: radial-gradient(ellipse 19% 4.6% at 49.1% 23.5%, #000 55%, transparent 100%);
}
@media (max-width: 900px) {
  #avatar { height: 40vh; height: 40dvh; top: 34%; }
}

/* Contacto con avatar */
.contact-grid { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 40px; }
@media (min-width: 1361px) { .contact-avatar { margin-right: 48px; } }
.contact-avatar {
  width: clamp(200px, 20vw, 380px); max-height: 62vh; object-fit: contain; height: auto; display: block;
  filter: drop-shadow(0 24px 40px color-mix(in srgb, var(--c-glow) 22%, transparent));
  -webkit-mask-image: linear-gradient(to bottom, #000 74%, transparent 98%);
  mask-image: linear-gradient(to bottom, #000 74%, transparent 98%);
  animation: floaty 5s ease-in-out infinite;
}
@keyframes floaty { 50% { transform: translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { .contact-avatar { animation: none; } }
@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
  .contact-avatar { width: 200px; justify-self: end; margin-top: -40px; }
}

/* Corchetes en las esquinas */
.bracket { position: relative; }
.bracket::before, .bracket::after {
  content: ""; position: absolute; width: 14px; height: 14px; border: 1px solid var(--line-2); pointer-events: none;
}
.bracket::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.bracket::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

/* Navegación: logo y contacto sobre un degradado; las secciones en una cápsula flotante */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20; height: 80px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 0 var(--pad);
  background: linear-gradient(to bottom, rgba(10, 11, 15, .94) 0%, rgba(10, 11, 15, .72) 55%, rgba(10, 11, 15, 0) 100%);
}
.logo { display: inline-flex; align-items: center; gap: 12px; font-weight: 500; font-size: 15px; }
.logo-mark {
  position: relative; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center;
  font-size: 11px; background: var(--bg-2);
}
.logo-mark::before {
  content: ""; position: absolute; inset: 0; border-radius: 9px; padding: 1.5px; background: var(--grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.nav nav {
  position: relative; display: flex; gap: 2px; padding: 5px; border-radius: 999px;
  background: rgba(20, 22, 28, .82);
  backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .42);
}
.nav nav a {
  position: relative; z-index: 1; padding: 9px 18px; border-radius: 999px;
  font-size: 14px; font-weight: 500; color: #a9acb6; transition: color .25s;
}
.nav nav a:hover, /* Sin anillo de foco: con teclado, el indicador se desliza al enlace enfocado */
.nav nav a:focus, .nav nav a:focus-visible { outline: none; }
/* Indicador que se desliza a la sección activa (y sigue al cursor), con el color del tema */
.nav-ind {
  position: absolute; top: 5px; bottom: 5px; left: 0; width: 0; border-radius: 999px; opacity: 0; pointer-events: none;
  background: color-mix(in srgb, var(--c-blue) 22%, rgba(255, 255, 255, .05));
}
.nav-ind.ready { transition: transform .5s cubic-bezier(.34, 1.3, .64, 1), width .5s cubic-bezier(.34, 1.3, .64, 1), opacity .3s; }
.nav-right { justify-self: end; display: flex; align-items: center; gap: 10px; }
.nav-cta {
 display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em;
  padding: 11px 18px; border-radius: 999px; background: var(--text); color: var(--bg);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .35); transition: transform .2s, background .25s;
}
.nav-cta:hover { background: #fff; transform: translateY(-1px); }
.nav-cta:active { transform: scale(.98); }
.nav-cta i { width: 6px; height: 6px; border-radius: 50%; background: var(--c-ok); box-shadow: 0 0 10px var(--c-ok); }

/* Índice lateral */
.index {
  position: fixed; right: 18px; top: 50%; transform: translateY(-50%); z-index: 15;
  display: grid; gap: 14px; justify-items: end; font-size: 10px; text-transform: uppercase; letter-spacing: .12em;
}
.index a { display: flex; align-items: center; gap: 10px; color: var(--dim); transition: color .3s; }
.index a::after { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; transition: transform .3s, background .3s; }
.index a:hover { color: var(--muted); }
.index a.on { color: var(--text); }
.index a.on::after { transform: scale(1.8); background: var(--c-blue); }
/* Proyectos del momento: solo se despliegan dentro de la sección */
.index-sub { display: grid; gap: 10px; justify-items: end; max-height: 0; overflow: hidden; opacity: 0; transition: max-height .5s cubic-bezier(.16, 1, .3, 1), opacity .4s; }
.index.in-caps .index-sub { max-height: 140px; opacity: 1; }
.index-sub a { font-size: 9.5px; letter-spacing: .1em; }
.index-sub a::after { width: 3px; height: 3px; }


/* Botones */
.btn {
  display: inline-flex; align-items: center; gap: 12px; white-space: nowrap;
  padding: 14px 22px; border-radius: 999px; font-size: 15px; font-weight: 500;
  border: 1px solid var(--line-2); color: var(--text);
  transition: transform .2s, background .25s, border-color .25s;
}
.btn b { font-weight: 400; transition: transform .3s cubic-bezier(.16, 1, .3, 1); }
.btn:hover { border-color: var(--muted); }
.btn:hover b { transform: translateX(4px); }
.btn:active { transform: scale(.98); }
.btn-light { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn-light:hover { background: #fff; }

/* Caja con borde iridiscente */
.boxed { position: relative; display: inline-block; padding: 0 .16em .04em; }
.boxed::before {
  content: ""; position: absolute; inset: .06em -.02em -.02em; border-radius: .12em; padding: 1.5px; background: var(--grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}

/* HERO: texto agrupado a la izquierda; a la derecha el avatar, el robot y el globo de tareas */
.hero {
  position: relative; min-height: 100vh; min-height: 100dvh;
  max-width: var(--max); margin: 0 auto; padding: 96px var(--pad) 64px;
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); align-items: center;
}
.hero-copy { position: relative; z-index: 3; max-width: 840px; }
.kicker { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 18px; }
h1 { font-size: clamp(48px, 7.4vw, 142px); line-height: .96; letter-spacing: -0.05em; font-weight: 500; }
h1 .line { display: block; overflow: hidden; padding-bottom: .06em; white-space: nowrap; }
h1 .line > span { display: inline-block; }
h1 .line.sub { font-size: .46em; letter-spacing: -0.035em; margin-top: .16em; color: var(--text); }
.hero-lead { margin-top: clamp(24px, 3vh, 36px); max-width: 44ch; color: var(--muted); font-size: clamp(17px, 1.3vw, 22px); line-height: 1.6; text-wrap: pretty; }
.hero-lead b { color: var(--text); font-weight: 500; }
.hero-ctas { margin-top: clamp(28px, 3.6vh, 44px); display: flex; flex-wrap: wrap; gap: 14px; }
.hero-ctas .btn { padding: clamp(14px, 1.1vw, 18px) clamp(22px, 1.8vw, 30px); font-size: clamp(15px, 1.05vw, 17px); }
.hero .kicker { font-size: 13px; }

/* Globo de chat sobre el robot */
.prompt {
  position: absolute; z-index: 3; right: var(--pad); top: 19%;
  width: min(390px, 26vw); padding: 16px 18px;
  border: 1px solid var(--line-2); border-radius: 16px 16px 4px 16px;
  background: rgba(16, 18, 23, 0.82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}
.prompt::after {
  content: ""; position: absolute; right: 30%; bottom: -8px; width: 14px; height: 14px;
  background: inherit; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2);
  transform: rotate(45deg); border-radius: 0 0 3px 0;
}
.prompt-label { display: flex; align-items: center; gap: 8px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 8px; }
.prompt-label i { width: 6px; height: 6px; border-radius: 50%; background: var(--c-ok); box-shadow: 0 0 8px var(--c-ok); }
.typed { font-size: clamp(15px, 1.05vw, 17px); line-height: 1.45; min-height: 2.9em; color: var(--text); }
.typed::after { content: ""; display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -2px; background: var(--muted); animation: caret 1s steps(1) infinite; }
.prev { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 12.5px; line-height: 1.45; color: var(--dim); min-height: 1.45em; }
@keyframes caret { 50% { opacity: 0; } }

/* CAPACIDADES */
.caps { position: relative; }
.caps-inner {
  position: relative; height: 100vh; height: 100dvh;
  max-width: var(--max); margin: 0 auto; padding: 96px var(--pad) 56px;
  display: grid; grid-template-rows: auto auto 1fr;
}
.caps-head { display: flex; align-items: baseline; gap: 20px; flex-wrap: wrap; margin-bottom: 16px; }
.caps-head .kicker { margin: 0; color: var(--text); }
.caps-note { color: var(--muted); font-size: 14px; }
.tabs { position: relative; overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .015); }
.tabs-track { display: flex; transition: transform .8s cubic-bezier(.16, 1, .3, 1); }
/* Reparten todo el ancho; si no caben, el carril se desplaza */
.tab {
  position: relative; flex: 1 1 0; min-width: max-content; display: flex; align-items: center; gap: 18px;
  padding: 20px 26px; border-right: 1px solid var(--line); cursor: pointer;
  font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted);
  transition: color .3s, background .3s;
}
.tab:last-child { border-right: 0; }
.tab:hover { color: var(--text); background: rgba(255, 255, 255, .03); }
.tab:focus-visible { outline: 1px solid var(--line-2); outline-offset: -1px; }
.tab .n { padding-right: 18px; border-right: 1px solid var(--line); color: var(--dim); transition: color .3s; }
.tab.is-active { color: var(--text); background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .015)); }
.tab.is-active .n { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tab::before, .tab::after {
  content: ""; position: absolute; width: 12px; height: 12px; border: 1px solid var(--text); opacity: 0; transition: opacity .4s;
}
.tab::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.tab::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
.tab.is-active::before, .tab.is-active::after { opacity: 1; }
/* Progreso dentro de cada pestaña */
.tab-prog { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--grad); transform: scaleX(var(--p, 0)); transform-origin: left; }

.cap-panels { position: relative; }
/* Columna izquierda: personaje arriba (capa fija), título y descripción apilados abajo.
   Columna derecha: la ventana de demo. */
.cap {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end;
  pointer-events: none;
}
.cap .cap-title, .cap .cap-body { max-width: 44%; }
.cap .cap-title, .cap .cap-body { opacity: 0; transform: translateY(24px); transition: opacity .6s, transform .8s cubic-bezier(.16, 1, .3, 1); }
.cap .cap-body { transition-delay: .08s; }
.cap.is-active { pointer-events: auto; }
.cap.is-active .cap-title, .cap.is-active .cap-body { opacity: 1; transform: none; }
.cap-tag { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 14px; }
.cap h2 { font-size: clamp(36px, 4.6vw, 84px); line-height: 1; letter-spacing: -0.045em; font-weight: 500; }
.cap-body { margin-top: 16px; }
.cap-body p { color: var(--muted); font-size: clamp(15px, 1.05vw, 17px); line-height: 1.6; max-width: 46ch; text-wrap: pretty; }
.cap-body .fact {
  margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line);
  font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--text);
}
.cap-body .fact b {
  font-weight: 500; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}

section { position: relative; }
/* Títulos de sección */
.big { font-size: clamp(36px, 5vw, 96px); line-height: 1.02; letter-spacing: -0.04em; font-weight: 500; }
.big.right { text-align: right; }

/* MANIFIESTO */
.manifesto { padding: clamp(100px, 16vh, 180px) 0; background: var(--bg); }
.scrub { font-size: clamp(28px, 4.2vw, 78px); line-height: 1.12; letter-spacing: -0.035em; font-weight: 400; max-width: 24ch; text-wrap: balance; }
.scrub .w { opacity: .12; }

/* STACK: bento sin huecos (2 filas x 3 columnas: 2+1 / 1+2) */
.stack { padding: clamp(80px, 12vh, 140px) 0 0; background: var(--bg); }
.bento { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-flow: dense; gap: 16px; }
.stack-head { margin-bottom: clamp(32px, 4vw, 56px); }
.stack-sub { margin-top: 14px; color: var(--muted); font-size: clamp(16px, 1.1vw, 19px); }
.cell {
  position: relative; overflow: hidden; min-height: clamp(280px, 21vw, 380px); padding: clamp(28px, 2.4vw, 44px); border-radius: 20px;
  border: 1px solid var(--line); background: var(--bg-2);
  display: flex; flex-direction: column; justify-content: flex-end; gap: 18px;
  transition: transform .5s cubic-bezier(.16, 1, .3, 1), border-color .3s;
  --mx: 50%; --my: 50%;
}
/* Foco de luz que sigue al cursor */
.cell::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(255, 255, 255, .07), transparent 60%);
}
.cell::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(300px circle at var(--mx) var(--my), rgba(255, 255, 255, .35), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.cell:hover { transform: translateY(-6px); border-color: var(--line-2); }
.cell:hover::after, .cell:hover::before { opacity: 1; }
.cell h3 { position: relative; font-size: clamp(26px, 2.3vw, 42px); letter-spacing: -0.03em; font-weight: 500; }
.chips2 { position: relative; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.chips2 li {
  font-size: clamp(11.5px, 0.8vw, 13px); padding: 7px 12px; border-radius: 999px; color: var(--muted);
  background: rgba(255, 255, 255, .04); border: 1px solid var(--line); transition: color .2s, border-color .2s, transform .2s;
}
.chips2 li:hover { color: var(--text); border-color: var(--line-2); transform: translateY(-2px); }
.c-agents { grid-column: span 2; background: radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--c-glow) 26%, transparent), transparent 55%), var(--bg-2); }
.c-auto { grid-column: span 1; }
.c-plat { grid-column: span 1; }
.c-cloud { grid-column: span 2; background: radial-gradient(120% 140% at 0% 100%, color-mix(in srgb, var(--c-warm) 20%, transparent), transparent 55%), var(--bg-2); }

/* Ilustraciones animadas de cada tarjeta: explican la categoría */
.cell-art { position: absolute; top: clamp(18px, 2vw, 32px); right: clamp(18px, 2vw, 32px); width: min(58%, 420px); height: auto; overflow: visible; }
.c-auto .cell-art { width: min(80%, 360px); }
.c-plat .cell-art { width: min(62%, 300px); }
.cell-art text { font-family: "Geist Mono", monospace; font-size: 15px; fill: var(--muted); text-anchor: middle; }
.cell-art .wire { fill: none; stroke: rgba(255, 255, 255, .14); stroke-width: 2; stroke-dasharray: 3 7; }
.cell-art .sig { fill: var(--c-run); filter: drop-shadow(0 0 6px color-mix(in srgb, var(--c-run) 90%, transparent)); }
.cell-art .core { fill: #15131f; stroke: var(--c-glow); stroke-width: 2; }
.cell-art .core-t { fill: var(--text); font-size: 16px; }
.cell-art .core-glow { fill: color-mix(in srgb, var(--c-glow) 25%, transparent); transform-origin: 210px 120px; animation: breathe 2.4s ease-in-out infinite; }
.cell-art .sat rect, .cell-art .wnode rect { fill: #14171d; stroke: rgba(255, 255, 255, .16); stroke-width: 1.5; }
.cell-art .wnode rect { animation: wlit 3s infinite; }
.cell-art .w2 rect { animation-delay: .75s; } .cell-art .w3 rect { animation-delay: 1.5s; } .cell-art .w4 rect { animation-delay: 2.25s; }
.cell-art .tick { fill: none; stroke: var(--c-ok); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: tick 3s infinite; }
.cell-art .w2 .tick { animation-delay: .75s; } .cell-art .w3 .tick { animation-delay: 1.5s; } .cell-art .w4 .tick { animation-delay: 2.25s; }
.cell-art .layer path { fill: rgba(20, 23, 29, .92); stroke: rgba(255, 255, 255, .18); stroke-width: 1.5; }
.cell-art .layer { animation: float 3.6s ease-in-out infinite; }
.cell-art .l2 { animation-delay: -.6s; } .cell-art .l3 { animation-delay: -1.2s; }
.cell-art .l1 path { stroke: color-mix(in srgb, var(--c-ok) 50%, transparent); }
.cell-art .orbit { fill: none; stroke: rgba(255, 255, 255, .12); stroke-width: 1.5; stroke-dasharray: 4 8; }
.cell-art .cloud { fill: color-mix(in srgb, var(--c-warm) 12%, transparent); stroke: color-mix(in srgb, var(--c-warm) 60%, transparent); stroke-width: 2; animation: breathe 4s ease-in-out infinite; transform-origin: 210px 110px; }
.cell-art .svc circle { fill: #14171d; stroke: rgba(255, 255, 255, .22); stroke-width: 1.5; }
.cell-art .svc text { font-size: 10px; fill: var(--text); }
@keyframes breathe { 50% { transform: scale(1.08); opacity: .8; } }
@keyframes float { 50% { transform: translateY(-6px); } }
@keyframes wlit { 0%, 20% { stroke: var(--c-run); } 45%, 100% { stroke: rgba(255, 255, 255, .16); } }
@keyframes tick { 0% { stroke-dashoffset: 40; } 15%, 70% { stroke-dashoffset: 0; } 90%, 100% { stroke-dashoffset: 40; } }
@media (prefers-reduced-motion: reduce) {
  .cell-art * { animation: none !important; }
  .cell-art .sig { display: none; }
  .cell-art .tick { stroke-dashoffset: 0; }
}

.marquee { margin-top: clamp(80px, 12vh, 120px); padding: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; }
.marquee-track { display: flex; gap: 56px; width: max-content; animation: marquee 40s linear infinite; font-size: 13px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* SOBRE MÍ + TRAYECTORIA */
.about { padding: clamp(100px, 16vh, 180px) 0; background: var(--bg); }
.about .big { margin-bottom: clamp(36px, 4vw, 64px); }
.about-grid { display: grid; grid-template-columns: minmax(240px, 440px) 1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.photo {
  aspect-ratio: 4 / 5; border-radius: 22px; overflow: hidden; border: 1px solid var(--line); margin: 0;
  background: linear-gradient(160deg, #1b1d24, #0d0e12);
}
.photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.1); transition: filter .8s; will-change: transform; }
.photo:hover img { filter: grayscale(0) contrast(1.05); }
.about-lead { font-size: clamp(24px, 2.6vw, 48px); line-height: 1.25; letter-spacing: -0.025em; max-width: 26ch; text-wrap: balance; }
.about-body { margin-top: 22px; color: var(--muted); line-height: 1.65; max-width: 58ch; font-size: clamp(16px, 1.05vw, 18px); }
.stats { margin-top: clamp(32px, 3vw, 48px); display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.stat { padding: 22px 20px 0 0; display: grid; gap: 8px; align-content: start; }
.stat + .stat { padding-left: 20px; border-left: 1px solid var(--line); }
.stat b { font-size: clamp(48px, 4.6vw, 88px); font-weight: 500; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat > span { color: var(--muted); font-size: clamp(14px, 1vw, 16px); line-height: 1.45; max-width: 22ch; }

.timeline { margin-top: clamp(80px, 11vh, 140px); }
.tl-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.tl-head h3 { font-size: clamp(28px, 2.6vw, 48px); font-weight: 500; letter-spacing: -0.035em; }
.tl-head span { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .1em; }
.tl-wrap { position: relative; padding-top: 30px; }
/* Riel que se dibuja con el scroll; cada hito se enciende cuando el riel lo alcanza */
.tl-rail { position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--line); border-radius: 2px; }
.tl-fill { position: absolute; inset: 0; background: var(--grad); transform: scaleX(var(--tp, 0)); transform-origin: left; border-radius: inherit; }
.tl { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 0; padding: 0; }
.tl-item.cell {
  min-height: 0; justify-content: flex-start; gap: 10px; overflow: visible; opacity: 0; translate: 0 50px;
  transition: transform .5s cubic-bezier(.16, 1, .3, 1), border-color .5s, background .5s, opacity .9s, translate 1.1s cubic-bezier(.16, 1, .3, 1);
}
.tl-wrap.in .tl-item, .reduced .tl-item { opacity: 1; translate: 0 0; }
.tl-wrap.in .tl-item:nth-child(2) { transition-delay: 0s, 0s, 0s, .12s, .12s; }
.tl-wrap.in .tl-item:nth-child(3) { transition-delay: 0s, 0s, 0s, .24s, .24s; }
.tl-dot {
  position: absolute; left: clamp(28px, 2.4vw, 44px); top: -36px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--line-2); transition: border-color .4s, background .4s, box-shadow .4s, transform .4s;
}
.tl-item.lit .tl-dot { border-color: transparent; background: #ededf0; box-shadow: 0 0 0 6px color-mix(in srgb, var(--c-blue) 18%, transparent), 0 0 24px color-mix(in srgb, var(--c-blue) 55%, transparent); transform: scale(1.1); }
.tl-item.is-now.lit .tl-dot { animation: now 2.2s ease-out infinite; }
@keyframes now { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c-ok) 55%, transparent), 0 0 24px color-mix(in srgb, var(--c-ok) 50%, transparent); } 100% { box-shadow: 0 0 0 16px color-mix(in srgb, var(--c-ok) 0%, transparent), 0 0 24px color-mix(in srgb, var(--c-ok) 50%, transparent); } }
.tl-item.lit { border-color: var(--line-2); }
.tl-year { font-size: 13px; letter-spacing: .1em; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.tl-year em { font-style: normal; font-size: 10.5px; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; color: var(--c-ok); border: 1px solid color-mix(in srgb, var(--c-ok) 35%, transparent); }
.tl-item h4 { font-size: clamp(20px, 1.6vw, 28px); font-weight: 500; letter-spacing: -0.025em; line-height: 1.15; margin: 4px 0 2px; }
.tl-desc { color: var(--muted); line-height: 1.55; font-size: 15px; }
.tl-meta { margin-top: auto; padding-top: 10px; font-size: 12px; color: var(--dim); text-transform: uppercase; letter-spacing: .08em; }
.tl-award {
  position: relative; margin-top: 6px; padding: 14px 16px; border-radius: 12px; font-size: 14px; line-height: 1.4;
  background: rgba(255, 255, 255, .03); display: grid; gap: 4px;
  opacity: 0; transform: translateY(10px) scale(.97); transition: opacity .5s .25s, transform .6s .25s cubic-bezier(.34, 1.56, .64, 1);
}
.tl-award::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: var(--grad); opacity: .6;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.tl-award span { font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--c-run); }
.tl-item.lit .tl-award, .reduced .tl-award { opacity: 1; transform: none; }
.tl-uni { display: flex; align-items: center; gap: 18px; margin-top: 28px; color: var(--muted); font-size: 14px; }
.tl-uni i { flex: 1; height: 0; border-top: 1px dashed var(--line-2); }
.tl-uni .mono { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; }

/* CONTACTO */
.contact { padding: clamp(100px, 16vh, 180px) 0 clamp(80px, 12vh, 120px); background: var(--bg); }
.huge { font-size: clamp(48px, 8.4vw, 168px); line-height: .98; letter-spacing: -0.05em; font-weight: 500; }
.contact-row { margin-top: 48px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.contact .mail { margin-left: auto; color: var(--muted); font-size: 13px; }
.foot {
  position: relative; z-index: 2; background: var(--bg);
  display: flex; justify-content: space-between; padding: 28px var(--pad) 36px;
  max-width: var(--max); margin: 0 auto; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em;
}

/* Movimiento reducido: todo visible, sin fijar secciones */
.reduced .cap { position: relative; inset: auto; margin-top: 56px; }
.reduced .cap .cap-title, .reduced .cap .cap-body { opacity: 1; transform: none; }
.reduced .caps-inner { height: auto; }
.reduced .scrub .w { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
  .typed::after { animation: none; }
}

/* Responsive */
@media (max-width: 1640px) {
  .index { display: none; }
}
@media (max-width: 1024px) {
  .nav nav { display: none; }
  .nav { grid-template-columns: 1fr auto; }
  .index { display: none; }
}
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; align-items: end; padding-top: 92px; padding-bottom: 76px; }
  .hero-copy { padding-top: 44vh; padding-top: 44dvh; }
  .hero-ctas { gap: 10px; }
  .hero-ctas .btn { padding: 13px 18px; font-size: 15px; }
  .theme-pick { bottom: 26px; }
  .prompt { display: none; }
  .caps-inner { padding-top: 84px; }
  .tab { min-width: 220px; padding: 14px 18px; }
  .cap .cap-title, .cap .cap-body { max-width: 100%; }
  .cap-body p { font-size: 15px; }
  .bento { grid-template-columns: 1fr; }
  .c-agents, .c-auto, .c-plat, .c-cloud { grid-column: span 1; }
  .cell { min-height: 0; padding-top: 200px; }
  .cell-art { left: 50%; right: auto; transform: translateX(-50%); width: min(92%, 360px); }
  .about-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .stat, .stat + .stat { padding: 18px 0; border-left: 0; border-bottom: 1px solid var(--line); grid-template-columns: auto 1fr; align-items: center; gap: 16px; }
  .tl-wrap { padding-top: 0; padding-left: 30px; }
  .tl-rail { top: 0; bottom: 0; left: 6px; right: auto; width: 2px; height: auto; }
  .tl-fill { transform: scaleY(var(--tp, 0)); transform-origin: top; }
  .tl { grid-template-columns: 1fr; }
  .tl-item.cell { padding-top: 26px; }
  .tl-dot { left: -31px; top: 30px; }
  .tl-uni { flex-wrap: wrap; }
  .photo { max-width: 300px; }
  .contact .mail { margin-left: 0; width: 100%; }
  .huge { font-size: min(44px, 11.6vw); }
}

/* Ventana flotante de demo, junto a la mascota */
.demo {
  /* bajo la fila de pestañas (~210 px) y tan grande como permita el alto: nunca se corta por abajo */
  position: absolute; z-index: 3; right: var(--pad); top: max(23%, 210px);
  width: min(52%, calc((100vh - 420px) * 1.78)); border-radius: 16px; overflow: hidden;
  border: 1px solid var(--line-2); background: rgba(16, 18, 23, 0.88);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
}
.demo-bar { display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border-bottom: 1px solid var(--line); }
.demo-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.demo-fict { display: none; white-space: nowrap; flex: none; padding-left: 12px; margin-left: auto; font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--dim); }
.demo-bar i { width: 9px; height: 9px; border-radius: 50%; background: #2a2d35; }
.demo-title { margin-left: 10px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.demo-screen { position: relative; aspect-ratio: 16 / 9; background: #07080b; overflow: hidden; }
.demo-screen video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s; }
.demo.has-video .demo-screen video { opacity: 1; }
.demo-empty {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 28px 28px; transition: opacity .5s;
}
.demo-empty::after {
  content: ""; position: absolute; inset: -40%; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--c-glow) 18%, transparent), transparent 70%);
}
.demo-app { font-size: 26px; font-weight: 500; letter-spacing: -0.02em; position: relative; z-index: 1; }
.demo-empty .mono { font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); position: relative; z-index: 1; }
.demo.has-video .demo-empty { opacity: 0; }
.demo-metrics { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.metric { padding: 16px 18px 18px; }
.metric + .metric { border-left: 1px solid var(--line); }
.metric .k { font-family: "Geist Mono", monospace; font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); line-height: 1.4; min-height: 2.8em; }
.metric .v { margin-top: 8px; font-size: clamp(26px, 2.2vw, 38px); font-weight: 500; letter-spacing: -0.03em; line-height: 1; display: flex; align-items: baseline; gap: 10px; }
.metric .v s { text-decoration: none; color: var(--dim); font-size: 22px; }
.metric .v .arrow { font-size: 16px; color: var(--muted); }
.metric .v b { font-weight: 500; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.metric .note { margin-top: 6px; font-size: 11px; color: var(--muted); }
.demo .swap { transition: opacity .35s, transform .5s cubic-bezier(.16, 1, .3, 1); }
.demo.switching .swap { opacity: 0; transform: translateY(8px); }
.reduced .demo { position: relative; right: auto; top: auto; width: 100%; max-width: 560px; margin-top: 40px; }

@media (max-width: 1100px) {
  .demo { width: min(50%, calc((100vh - 420px) * 1.78)); top: 22%; }
}
@media (max-width: 900px) {
  /* Celular: la demo deja de flotar y ocupa su propia fila, entre las pestañas y el texto del proyecto */
  .caps-inner { grid-template-rows: auto auto auto 1fr; padding: 76px var(--pad) 22px; }
  .caps-head { margin-bottom: 10px; gap: 4px 14px; }
  .caps-note { font-size: 12px; }
  .tab { padding: 12px 16px; font-size: 12px; gap: 12px; }
  .tab .n { padding-right: 12px; }
  .demo { position: relative; left: auto; right: auto; top: auto; width: auto; margin-top: 12px; }
  .demo-screen { aspect-ratio: 16 / 9; }
  .metric { padding: 10px 14px 12px; }
  .metric .k { min-height: 0; font-size: 9.5px; }
  .metric .v { font-size: 22px; margin-top: 4px; gap: 8px; }
  .metric .v s { font-size: 17px; }
  .metric .note { margin-top: 3px; font-size: 10px; }
  .cap-tag { font-size: 11px; margin-bottom: 8px; }
  .cap h2 { font-size: 34px; }
  .cap-body { margin-top: 10px; }
  .cap .cap-body p { font-size: 14px; line-height: 1.5; }
  .tab { min-width: max-content; white-space: nowrap; }
}

/* Pestaña con dos momentos (1/2, 2/2) */
.tab-sub { margin-left: auto; padding-left: 14px; font-size: 10.5px; color: var(--dim); }
.tab.is-active .tab-sub { color: var(--text); }

/* Diagrama animado de Scriptéalo dentro de la ventana de demo */
.demo-flow { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .5s; background: #090b0f; }
.demo.flow .demo-flow { opacity: 1; }
.demo.flow .demo-empty, .demo.flow video { opacity: 0 !important; }
.demo-flow text { font-family: "Geist", system-ui, sans-serif; }
.demo-flow .fcap, .demo-flow .col, .demo-flow .status text { font-family: "Geist Mono", ui-monospace, monospace; }
.demo-flow .fcap { font-size: 18px; letter-spacing: .14em; fill: #8b8e99; }
.demo-flow .col { font-size: 17px; letter-spacing: .14em; fill: #6b6f7a; text-anchor: middle; }
.demo-flow .col .n { fill: var(--c-run); }
.demo-flow .rule { stroke: rgba(255, 255, 255, .08); stroke-width: 2; }
.demo-flow .status rect { fill: color-mix(in srgb, var(--c-run) 10%, transparent); stroke: color-mix(in srgb, var(--c-run) 40%, transparent); stroke-width: 2; transition: fill .4s, stroke .4s; }
.demo-flow .status circle { fill: var(--c-run); transition: fill .4s; }
.demo-flow .status text { font-size: 18px; letter-spacing: .1em; fill: var(--c-run); text-transform: uppercase; transition: fill .4s; }
.demo-flow .status.ok rect { fill: color-mix(in srgb, var(--c-ok) 10%, transparent); stroke: color-mix(in srgb, var(--c-ok) 45%, transparent); }
.demo-flow .status.ok circle { fill: var(--c-ok); }
.demo-flow .status.ok text { fill: var(--c-ok); }
.demo-flow .route { fill: none; stroke: rgba(255, 255, 255, .14); stroke-width: 3; stroke-linecap: round; }
.demo-flow .trail { fill: none; stroke: url(#ftrail); stroke-width: 4; stroke-linecap: round; filter: drop-shadow(0 0 6px color-mix(in srgb, var(--c-run) 45%, transparent)); }
.demo-flow .token { fill: #fff6d6; filter: drop-shadow(0 0 10px color-mix(in srgb, var(--c-run) 100%, transparent)) drop-shadow(0 0 22px color-mix(in srgb, var(--c-run) 60%, transparent)); }
/* El carril que no se usa se apaga por dentro; la tarjeta sigue opaca para no dejar ver las líneas de atrás */
.demo-flow .node .t, .demo-flow .node .s, .demo-flow .node .ico, .demo-flow .node .tile { transition: opacity .5s, fill .4s, stroke .4s; }
.demo-flow .node.off .t, .demo-flow .node.off .s, .demo-flow .node.off .ico, .demo-flow .node.off .tile { opacity: .32; }
.demo-flow .card { fill: #12151b; stroke: rgba(255, 255, 255, .12); stroke-width: 2; transition: stroke .4s, filter .4s; }
.demo-flow .tile { fill: rgba(255, 255, 255, .05); stroke: rgba(255, 255, 255, .1); stroke-width: 2; }
.demo-flow .ico { fill: none; stroke: #8b8e99; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.demo-flow .t { font-size: 32px; font-weight: 500; fill: #ededf0; text-anchor: middle; }
.demo-flow .s { font-size: 21px; fill: #8b8e99; text-anchor: middle; }
.demo-flow .node.on .card { stroke: color-mix(in srgb, var(--c-run) 45%, transparent); }
.demo-flow .node.on .tile { fill: color-mix(in srgb, var(--c-run) 10%, transparent); stroke: color-mix(in srgb, var(--c-run) 35%, transparent); }
.demo-flow .node.on .ico { stroke: var(--c-run); }
.demo-flow .node.now .card { stroke: var(--c-run); filter: drop-shadow(0 0 18px color-mix(in srgb, var(--c-run) 35%, transparent)); }
.demo-flow .node.done .card { stroke: var(--c-ok); filter: drop-shadow(0 0 20px color-mix(in srgb, var(--c-ok) 35%, transparent)); }
.demo-flow .node.done .tile { fill: color-mix(in srgb, var(--c-ok) 12%, transparent); stroke: color-mix(in srgb, var(--c-ok) 40%, transparent); }
.demo-flow .node.done .ico { stroke: var(--c-ok); }
.demo-flow .lock circle { fill: #0f1217; stroke: rgba(255, 255, 255, .2); stroke-width: 2; }
.demo-flow .lock rect, .demo-flow .lock path { fill: none; stroke: #c9cbd1; stroke-width: 2; stroke-linejoin: round; }
.demo-flow .legend text { font-size: 21px; fill: #8b8e99; }
.demo-flow .legend .hint { text-anchor: end; fill: #6b6f7a; }
.demo-flow .legend .srv { font-family: "Geist Mono", ui-monospace, monospace; font-weight: 500; fill: #ededf0; }
.demo-flow .legend.live .srv { fill: var(--c-run); }
.demo-flow .legend.zero .srv { fill: var(--c-ok); }
.demo-flow .legend.zero .power path { stroke: var(--c-ok); }
.demo-flow .power circle { fill: #0f1217; stroke: rgba(255, 255, 255, .2); stroke-width: 2; }
.demo-flow .power path { fill: none; stroke: #c9cbd1; stroke-width: 2.4; stroke-linecap: round; }
.demo-flow .legend.live .power path { stroke: var(--c-run); }
.demo-flow .sl rect { fill: rgba(255, 255, 255, .04); stroke: rgba(255, 255, 255, .22); stroke-width: 2; }
.demo-flow .sl text { font-family: "Geist Mono", ui-monospace, monospace; font-size: 17px; letter-spacing: .14em; fill: #ededf0; text-anchor: middle; }
/* Piloto de energía de cada carril: apagado, arrancando, corriendo, apagándose */
.demo-flow .pw { fill: #3a3e48; transition: fill .3s; }
/* Instancias extra del Cloud Run Job: copias apiladas detrás de la tarjeta cuando escala */
.demo-flow .ghost {
  fill: #0f1217; stroke: color-mix(in srgb, var(--c-ok) 45%, transparent); stroke-width: 2; opacity: 0;
  transform-box: fill-box; transform: translateY(16px); transition: opacity .35s, transform .45s cubic-bezier(.34, 1.56, .64, 1);
}
.demo-flow .inst.x2 .g1, .demo-flow .inst.x3 .g1, .demo-flow .inst.x3 .g2 { opacity: 1; transform: none; }
.demo-flow .pw-boot .pw, .demo-flow .pw-down .pw { fill: var(--c-run); animation: pwblink .5s steps(1) infinite; }
.demo-flow .pw-on .pw { fill: var(--c-ok); filter: drop-shadow(0 0 6px color-mix(in srgb, var(--c-ok) 90%, transparent)); }
@keyframes pwblink { 50% { fill: #3a3e48; } }
.demo-flow .pw-boot .pw-label, .demo-flow .pw-down .pw-label { fill: var(--c-run); }
.demo-flow .pw-on .pw-label { fill: var(--c-ok); }

/* Claude Code: tarjeta destacada a todo el ancho con terminal animada */
.c-claude {
  grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(28px, 3vw, 56px);
  align-items: center; justify-content: initial; min-height: 0;
  background: radial-gradient(90% 120% at 100% 0%, rgba(217, 119, 87, .22), transparent 60%), var(--bg-2);
}
.cc-tag { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: #e3906f; margin-bottom: 14px; }
.c-claude h3 { display: flex; align-items: center; gap: .22em; }
.cc-spark {
  display: inline-block; font-size: .82em; line-height: 1; color: #d97757; transform-origin: 50% 54%;
  text-shadow: 0 0 0 rgba(217, 119, 87, 0); transition: text-shadow .5s, color .5s;
  animation: spin 9s linear infinite, breathe-s 3.2s ease-in-out infinite;
}
.c-claude.busy .cc-spark { color: #ec9a78; text-shadow: 0 0 28px rgba(217, 119, 87, .75); animation-duration: 1.6s, 1.1s; }
@keyframes breathe-s { 50% { scale: 1.12; } }
@keyframes spin { to { transform: rotate(360deg); } }
.c-claude h3 { font-size: clamp(40px, 4.4vw, 84px); line-height: 1; }
.cc-text { margin: 18px 0 22px; color: var(--muted); font-size: clamp(16px, 1.1vw, 19px); line-height: 1.6; max-width: 44ch; }
.term {
  position: relative; border-radius: 14px; overflow: hidden; border: 1px solid rgba(217, 119, 87, .35);
  background: #0c0d10; box-shadow: 0 30px 80px rgba(0, 0, 0, .5), 0 0 0 1px rgba(217, 119, 87, .08) inset;
}
.term-bar { display: flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-bottom: 1px solid var(--line); }
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: #2a2d35; }
.term-bar span { margin-left: 10px; font-size: 12px; color: var(--muted); }
.term-body { min-height: clamp(220px, 16vw, 300px); padding: 20px 22px 30px; font-size: clamp(13px, 0.95vw, 16px); line-height: 1.75; color: #c9cbd1; white-space: pre-wrap; }
.term-body .u { color: var(--text); }
.term-body .u::before { content: "> "; color: #d97757; }
.term-body .t { color: #e3906f; }
.term-body .ok { color: var(--c-ok); }
.term-body .dot { color: #8b8e99; }
.term-body .cur { display: inline-block; width: .55em; height: 1.1em; vertical-align: -3px; background: #d97757; animation: caret 1s steps(1) infinite; }
.term-note { position: absolute; right: 14px; bottom: 10px; font-size: 10.5px; color: var(--dim); text-transform: uppercase; letter-spacing: .1em; }
@media (prefers-reduced-motion: reduce) { .cc-spark { animation: none; } }
@media (max-width: 900px) {
  .c-claude { grid-template-columns: 1fr; padding-top: clamp(28px, 2.4vw, 44px); }
  .term-body { min-height: 300px; padding: 18px 18px 34px; }
}

/* TEMA AZULGRANA (?tema=barca): azul y grana sobrios, oro solo para lo que está en curso, sin arcoíris */
/* TEMAS (selector del hero). Azulgrana es el de :root; aquí, los de un solo color y el arcoíris original */
html[data-tema="azul"] {
  --c-glow: #1f4c9c; --c-glow2: #4d8ae6; --c-blue: #4d8ae6; --c-run: #4d8ae6; --c-warm: #4d8ae6;
  --g1: #8fb6f2; --g2: #4d8ae6;
  --robot-grad: #8fb6f2, #4d8ae6, #1f4c9c, #4d8ae6; --robot-rim: #4d8ae6; --robot-leds: #8fb6f2, #4d8ae6, #1f4c9c;
}
html[data-tema="esmeralda"] {
  --c-glow: #145c40; --c-glow2: #3cc68a; --c-blue: #3cc68a; --c-run: #3cc68a; --c-warm: #3cc68a;
  --g1: #8ee3bd; --g2: #3cc68a;
  --robot-grad: #8ee3bd, #3cc68a, #145c40, #3cc68a; --robot-rim: #3cc68a; --robot-leds: #8ee3bd, #3cc68a, #145c40;
}
html[data-tema="ambar"] {
  --c-glow: #7a4e0c; --c-glow2: #f0a830; --c-blue: #f0a830; --c-run: #f0a830; --c-warm: #f0a830;
  --g1: #f7cf86; --g2: #f0a830;
  --robot-grad: #f7cf86, #f0a830, #7a4e0c, #f0a830; --robot-rim: #f0a830; --robot-leds: #f7cf86, #f0a830, #7a4e0c;
}
html[data-tema="violeta"] {
  --c-glow: #3d2a8a; --c-glow2: #8b6cf6; --c-blue: #8b6cf6; --c-run: #8b6cf6; --c-warm: #8b6cf6;
  --g1: #c2b2fb; --g2: #8b6cf6;
  --robot-grad: #c2b2fb, #8b6cf6, #3d2a8a, #8b6cf6; --robot-rim: #8b6cf6; --robot-leds: #c2b2fb, #8b6cf6, #3d2a8a;
}
html[data-tema="arcoiris"] {
  --c-glow: #7b61ff; --c-glow2: #3aa0ff; --c-blue: #3aa0ff; --c-ok: #38d39f; --c-run: #f5c84b; --c-warm: #ff7a45;
  --grad: linear-gradient(120deg, #7b61ff, #3aa0ff 22%, #38d39f 44%, #f5c84b 64%, #ff7a45 82%, #ff4d6d);
  --robot-grad: #7b61ff, #3aa0ff, #38d39f, #f5c84b, #ff7a45, #ff4d6d; --robot-rim: #7b61ff; --robot-leds: #7b61ff, #38d39f, #ff7a45;
}
/* Selector de colores: solo puntos, apagados hasta que te acercas */
.theme-pick {
  position: absolute; z-index: 3; left: var(--pad); bottom: clamp(18px, 3.4vh, 34px);
  display: flex; gap: 13px;
}
/* La opacidad va en los puntos (el contenedor lo animan la entrada y la salida del hero) */
.theme-pick button {
  width: 20px; height: 20px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; background: var(--sw); opacity: .55;
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px rgba(255, 255, 255, .1);
  transition: transform .35s cubic-bezier(.34, 1.56, .64, 1), box-shadow .25s, opacity .3s;
}
.theme-pick:hover button, .theme-pick:focus-within button, .theme-pick button[aria-checked="true"] { opacity: 1; }
.theme-pick button:hover { transform: scale(1.2); }
.theme-pick button:active { transform: scale(.9); }
.theme-pick button:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.theme-pick button[aria-checked="true"] { box-shadow: 0 0 0 2.5px var(--bg), 0 0 0 4px var(--muted); }
/* Los colores del tema se funden al cambiar (propiedades registradas); el arcoíris cambia de golpe */
@property --c-glow { syntax: '<color>'; inherits: true; initial-value: #1f4c9c; }
@property --c-glow2 { syntax: '<color>'; inherits: true; initial-value: #a50044; }
@property --c-blue { syntax: '<color>'; inherits: true; initial-value: #4d8ae6; }
@property --c-ok { syntax: '<color>'; inherits: true; initial-value: #5bbf98; }
@property --c-run { syntax: '<color>'; inherits: true; initial-value: #e0b13a; }
@property --c-warm { syntax: '<color>'; inherits: true; initial-value: #a50044; }
@property --g1 { syntax: '<color>'; inherits: true; initial-value: #4d8ae6; }
@property --g2 { syntax: '<color>'; inherits: true; initial-value: #cf2f6b; }
html { transition: --c-glow .6s, --c-glow2 .6s, --c-blue .6s, --c-ok .6s, --c-run .6s, --c-warm .6s, --g1 .6s, --g2 .6s; }
.reduced { transition: none; }

/* Celulares bajos (iPhone SE y similares): todo lo de proyectos tiene que caber en una pantalla */
@media (max-width: 900px) and (max-height: 740px) {
  .hero-copy { padding-top: 37vh; padding-top: 37dvh; }
  #avatar { height: 34vh; height: 34dvh; top: 30%; }
  .hero-lead { margin-top: 18px; }
  .hero-ctas { margin-top: 20px; }
  .caps-inner { padding-top: 70px; }
  .caps-note { display: none; }
  .demo-fict { display: inline; }
  .caps-head { margin-bottom: 8px; }
  .tab { padding: 10px 14px; }
  .demo { margin-top: 8px; }
  .metric { padding: 8px 12px 10px; }
  .metric .v { font-size: 20px; }
  .cap h2 { font-size: 29px; }
  .cap-tag { margin-bottom: 6px; }
  .cap-body { margin-top: 8px; }
  .cap .cap-body p { font-size: 13.5px; line-height: 1.45; }
}

/* Menú de secciones en celular y tablet */
.nav-menu { display: none; width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer; background: rgba(20, 22, 28, .82); box-shadow: 0 10px 28px rgba(0, 0, 0, .38); position: relative; }
.nav-menu span { position: absolute; left: 14px; right: 14px; height: 2px; border-radius: 2px; background: var(--text); transition: transform .3s cubic-bezier(.16, 1, .3, 1), top .3s; }
.nav-menu span:first-child { top: 17px; }
.nav-menu span:last-child { top: 25px; }
.nav-menu[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.nav-menu[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }
.nav-sheet {
  position: absolute; top: 74px; right: var(--pad); display: grid; min-width: 230px; padding: 8px; border-radius: 20px;
  background: rgba(20, 22, 28, .94); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
  transform-origin: top right; animation: sheet-in .28s cubic-bezier(.16, 1, .3, 1);
}
.nav-sheet[hidden] { display: none; }
.nav-sheet a { padding: 14px 18px; border-radius: 14px; font-size: 19px; font-weight: 500; color: #c9cbd1; }
.nav-sheet a.on { color: var(--text); background: color-mix(in srgb, var(--c-blue) 22%, rgba(255, 255, 255, .05)); }
@keyframes sheet-in { from { opacity: 0; transform: translateY(-6px) scale(.97); } }
@media (max-width: 1024px) {
  .nav-menu { display: block; }
}
@media (max-width: 480px) {
  .nav-cta { padding: 10px 14px; font-size: 11px; }
  .logo { font-size: 14px; gap: 10px; }
}
