/* ============================================================
   VARIABLES — cambia aquí colores y fuentes
============================================================ */
:root {
  --bg:      #f0efeb;
  --ink:     #0b0b0b;
  --accent:  #2f6bff;
  --muted:   #888888;
  --line-l:  rgba(0,0,0,0.1);
  --line-d:  rgba(255,255,255,0.1);
  --font: 'Space Grotesk', sans-serif;
  --mono: 'DM Mono', monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
/* Con Lenis activo el suavizado lo hace JS: el smooth nativo lo haría pelear */
html.lenis, html.lenis body { height: auto; }
html.lenis, .lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
em { font-style: normal; color: var(--accent); }
.accent { color: var(--accent); }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 40px; position: relative; }
section { padding: 140px 0; position: relative; }
.dark { background: var(--ink); color: #fff; }

.label {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 32px;
}
.label::before { content: '// '; }
.label.muted { color: rgba(255,255,255,0.35); }

.big-title {
  font-size: clamp(48px, 8vw, 120px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  font-weight: 600;
  margin-bottom: 72px;
}

/* ============================================================
   CURSOR
============================================================ */
.cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
  html, body, a { cursor: none; }
  .cursor {
    display: block;
    position: fixed; left: 0; top: 0; z-index: 9999;
    width: 24px; height: 24px; border-radius: 50%;
    border: 2px solid var(--accent);
    box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 70%, transparent);
    pointer-events: none;
    transition: width .2s var(--ease), height .2s var(--ease), background-color .2s;
    translate: -50% -50%;
  }
  .cursor.hover { width: 44px; height: 44px; background: color-mix(in srgb, var(--accent) 18%, transparent); }
}

/* ============================================================
   SPLASH — contador + nombre + telón que se abre
============================================================ */
#splash { position: fixed; inset: 0; z-index: 1000; color: #fff; display: grid; place-items: center; }
.splash-panel { position: absolute; left: 0; right: 0; height: 50.5%; background: var(--ink); }
.splash-panel--top { top: 0; }
.splash-panel--bottom { bottom: 0; }
.splash-inner { position: relative; }
.splash-name { font-size: clamp(56px, 11vw, 160px); font-weight: 700; line-height: .9; letter-spacing: -0.05em; }
.splash-name .sl { display: block; overflow: hidden; }
.splash-name .sl > span { display: inline-block; }
.splash-name i { font-style: normal; color: var(--accent); }
.splash-track { margin-top: 36px; height: 2px; background: var(--line-d); overflow: hidden; }
.splash-bar { height: 100%; width: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.splash-count {
  position: absolute; right: 40px; bottom: 32px;
  font-family: var(--mono); font-size: clamp(48px, 8vw, 110px); line-height: 1; color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.splash-meta { position: absolute; left: 40px; bottom: 40px; font-family: var(--mono); font-size: 12px; color: rgba(255,255,255,.4); letter-spacing: .08em; text-transform: uppercase; }
/* Sin JS no hay splash */
html:not(.js) #splash { display: none; }

/* ============================================================
   HERO — foto con pincel que revela una versión alterna
============================================================ */
#hero {
  height: 100vh; min-height: 640px; padding: 0;
  background: #0b0b0b; color: #fff; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 70% at 50% 40%, #4d86ff 0%, #1f4fd6 34%, #0a1f5c 70%, #03081a 100%);
}
.hero-bg::after { /* grano sutil */
  content: ''; position: absolute; inset: 0; opacity: .12; mix-blend-mode: overlay;
  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'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* Estela luminosa del cursor (toda la página) */
#trail { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 9998; display: none; }
@media (hover: hover) and (pointer: fine) { #trail { display: block; } }

/* ============================================================
   INTRO
============================================================ */
.intro-statement { font-size: clamp(30px, 4.6vw, 64px); line-height: 1.1; letter-spacing: -0.03em; font-weight: 500; }
.intro-statement .line { display: block; overflow: hidden; }
.intro-statement .line > span { display: inline-block; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; margin-top: 96px; border-top: 1px solid var(--line-d); padding-top: 40px; }
.stat-num { font-size: clamp(40px, 5vw, 72px); font-weight: 600; letter-spacing: -0.03em; color: var(--accent); }
.stat-label { font-family: var(--mono); font-size: 12px; color: rgba(255,255,255,.5); margin-top: 8px; }

/* ============================================================
   EXPERTISE (fondo 3D)
============================================================ */
.expertise { min-height: 100vh; overflow: hidden; }
#grid-canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .55; }
.expertise-content { pointer-events: none; }
.expertise-content a { pointer-events: auto; }
.skills { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line-d); border: 1px solid var(--line-d); }
.skill { background: rgba(17,17,17,.82); backdrop-filter: blur(6px); padding: 36px; }
.skill .num { font-family: var(--mono); font-size: 12px; color: var(--accent); }
.skill h3 { font-size: 26px; font-weight: 600; margin: 16px 0 10px; letter-spacing: -0.02em; }
.skill p { color: rgba(255,255,255,.6); line-height: 1.55; }

/* ============================================================
   EXPERIENCIA
============================================================ */
.timeline { list-style: none; border-top: 1px solid var(--line-l); }
.job {
  display: grid; grid-template-columns: 180px 1fr 1.2fr; gap: 32px;
  padding: 36px 0; border-bottom: 1px solid var(--line-l);
  transition: padding-left .4s var(--ease);
}
.job:hover { padding-left: 16px; }
.job-date { font-family: var(--mono); font-size: 13px; color: var(--muted); padding-top: 6px; }
.job h3 { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; }
.job-co { color: var(--accent); font-size: 15px; }
.job p { color: #555; line-height: 1.55; }

/* ============================================================
   PROYECTOS
============================================================ */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.card { display: block; border-radius: 16px; overflow: hidden; background: #1b1b1b; }
.card-media {
  aspect-ratio: 16 / 10;
  background:
    radial-gradient(circle at 30% 30%, hsl(var(--h) 90% 48%), transparent 60%),
    radial-gradient(circle at 80% 70%, hsl(calc(var(--h) - 6) 85% 22%), transparent 55%),
    #222;
  transition: transform .8s var(--ease);
}
.card:hover .card-media { transform: scale(1.06); }
.card-body { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; }
.card-body h3 { font-size: 22px; font-weight: 600; }
.card-body span { font-family: var(--mono); font-size: 12px; color: rgba(255,255,255,.5); }

/* ============================================================
   HERRAMIENTAS
============================================================ */
.marquee { overflow: hidden; border-block: 1px solid var(--line-l); padding: 28px 0; }
.marquee-track { display: flex; gap: 64px; width: max-content; animation: marquee 30s linear infinite; }
.marquee-track span { font-size: clamp(32px, 5vw, 64px); font-weight: 600; letter-spacing: -0.03em; white-space: nowrap; }
.marquee-track span::after { content: '✦'; color: var(--accent); margin-left: 64px; font-size: .5em; vertical-align: middle; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ============================================================
   CONTACTO
============================================================ */
.contact-title { font-size: clamp(56px, 11vw, 170px); line-height: .9; letter-spacing: -0.05em; font-weight: 700; }
.contact-mail {
  display: inline-block; margin-top: 48px; font-size: clamp(22px, 3vw, 36px);
  border-bottom: 2px solid var(--accent); padding-bottom: 6px; transition: color .3s;
}
.contact-mail:hover { color: var(--accent); }
footer {
  display: flex; justify-content: space-between; margin-top: 140px; padding-top: 24px;
  border-top: 1px solid var(--line-d); font-family: var(--mono); font-size: 12px; color: rgba(255,255,255,.4);
}

/* Estado inicial de elementos que se revelan (solo si JS carga) */
.js .reveal { opacity: 0; transform: translateY(40px); }

/* ============================================================
   ZYNCRA — tour interactivo (scroll + tabs + en vivo)
============================================================ */
.tour { display: grid; grid-template-columns: 320px 1fr; gap: 48px; align-items: center; min-height: calc(100vh - 160px); }
.tour-steps { list-style: none; border-top: 1px solid var(--line-d); }
.tour-step {
  position: relative; display: grid; grid-template-columns: 36px 1fr; gap: 4px 12px; width: 100%;
  padding: 18px 0; background: none; border: 0; border-bottom: 1px solid var(--line-d);
  color: rgba(255,255,255,.4); text-align: left; font: inherit; cursor: pointer;
  transition: color .4s;
}
.tour-step .num { font-family: var(--mono); font-size: 12px; color: inherit; padding-top: 5px; grid-row: span 2; }
.tour-step b { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.tour-step em { font-style: normal; font-size: 14px; line-height: 1.45; max-height: 0; overflow: hidden; opacity: 0; transition: max-height .5s var(--ease), opacity .4s; }
.tour-step.is-active { color: #fff; }
.tour-step.is-active .num { color: var(--accent); }
.tour-step.is-active em { max-height: 80px; opacity: .6; }
.tour-prog { position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.tour-live {
  margin-top: 28px; display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: 999px; border: 1px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent); color: #fff; font: 600 14px var(--font); cursor: pointer;
  transition: background .3s, transform .3s var(--ease);
}
.tour-live:hover { background: var(--accent); transform: translateY(-2px); }
.tour-live .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent); animation: pulse 1.6s infinite; }
.tour-live:hover .dot { background: #fff; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px transparent; } }

.tour-stage { position: relative; perspective: 1400px; padding-right: 60px; }
.browser {
  position: relative; border-radius: 14px; overflow: hidden; background: #161616;
  border: 1px solid var(--line-d); box-shadow: 0 40px 120px -40px rgba(47,107,255,.45);
  transform-style: preserve-3d; transition: transform .6s var(--ease); will-change: transform;
}
.shot-bar { display: flex; align-items: center; gap: 6px; padding: 12px 16px; background: #1d1d1d; border-bottom: 1px solid var(--line-d); }
.shot-bar i { width: 10px; height: 10px; border-radius: 50%; background: #3a3a3a; }
.shot-bar i:first-child { background: var(--accent); }
.shot-bar span { flex: 1; margin-left: 12px; padding: 4px 12px; border-radius: 6px; background: #111; font-family: var(--mono); font-size: 11px; color: rgba(255,255,255,.55); }
.tour-open { font-family: var(--mono); font-size: 11px; color: rgba(255,255,255,.55); }
.tour-open:hover { color: #fff; }
.browser-view { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #fff; }
.tour-page {
  position: absolute; inset: 0 0 auto 0; width: 100%; height: auto;
  opacity: 0; transition: opacity .5s ease; will-change: transform;
}
.tour-page.is-active { opacity: 1; }

.tour-live-frame { position: absolute; inset: 0; background: #fff; }
.tour-live-frame iframe { width: 100%; height: 100%; border: 0; }
.tour-live-bar { position: absolute; top: 12px; right: 12px; display: flex; gap: 8px; }
.tour-live-bar a, .tour-live-bar button { padding: 8px 14px; border-radius: 999px; border: 0; background: #111; color: #fff; font: 600 12px var(--font); cursor: pointer; }
.tour-live-bar a { background: rgba(17,17,17,.7); }
.phone {
  position: absolute; right: 0; bottom: -40px; width: 170px; aspect-ratio: 9 / 19.5;
  border-radius: 30px; padding: 8px; background: #0b0b0b; border: 1px solid #2a2a2a;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.8);
}
.phone-notch { position: absolute; top: 14px; left: 50%; translate: -50% 0; width: 56px; height: 16px; border-radius: 10px; background: #0b0b0b; z-index: 1; }
.phone-view { width: 100%; height: 100%; border-radius: 23px; overflow: hidden; background: #fff; }
.phone-view img { width: 100%; height: auto; will-change: transform; }

/* ============================================================
   MÓVIL
============================================================ */
@media (max-width: 860px) {
  .wrap { padding: 0 16px; }
  section { padding: 96px 0; }
  .stats, .skills, .cards { grid-template-columns: 1fr; }
  .tour { grid-template-columns: 1fr; min-height: 0; gap: 32px; }
  .tour-stage { padding-right: 0; order: -1; }
  .browser-view { aspect-ratio: 4 / 5; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .tour-page { position: relative; display: none; }
  .tour-page.is-active { display: block; }
  .phone { display: none; }
  .splash-count { right: 16px; }
  .splash-meta { left: 16px; }
  .job { grid-template-columns: 1fr; gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ============================================================
   EXTRAS — educación y Zyncra
============================================================ */
.sub-title { font-size: 32px; font-weight: 600; letter-spacing: -0.02em; margin: 96px 0 24px; }
.venture-lead { max-width: 720px; font-size: clamp(18px, 2vw, 24px); line-height: 1.5; color: rgba(255,255,255,.7); margin: -32px 0 64px; }
.contact .venture-lead { margin: 32px 0 0; }
.card-media { display: flex; align-items: flex-end; padding: 24px; }
.card-media span { font-family: var(--mono); font-size: 13px; color: rgba(255,255,255,.8); }
div.card { cursor: default; }
.hero-social span { color: rgba(255,255,255,.35); }
.contact-links { display: flex; flex-wrap: wrap; gap: 16px 40px; }
#projects .contact-mail { margin-top: 56px; }

/* ============================================================
   PROYECTOS — casos: Beast y Entre Pétalos
============================================================ */
#work { overflow: hidden; }
.work-lead { max-width: 640px; font-size: clamp(18px, 2vw, 24px); line-height: 1.5; color: #555; margin: -32px 0 40px; }
.case { padding: 72px 0 40px; border-top: 1px solid var(--line-l); }
.case + .case { margin-top: 64px; }
.case-head { display: grid; grid-template-columns: 80px 1fr auto; align-items: end; gap: 24px; margin-bottom: 48px; }
.case-idx { font-family: var(--mono); font-size: 13px; color: var(--accent); padding-bottom: 14px; }
.case-idx::before { content: '/ '; color: var(--muted); }
.case-name { font-size: clamp(44px, 7vw, 104px); line-height: .9; letter-spacing: -0.045em; font-weight: 600; }
.case-name a { background: linear-gradient(currentColor, currentColor) 0 100% / 0 3px no-repeat; transition: background-size .6s var(--ease); }
.case-name a:hover { background-size: 100% 3px; }
.case-kind { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding-bottom: 14px; }

.case-body { display: grid; grid-template-columns: 340px 1fr; gap: 64px; align-items: start; }
.case:nth-of-type(even) .case-body { grid-template-columns: 1fr 340px; }
.case:nth-of-type(even) .case-info { order: 2; }
.case-lead { font-size: 18px; line-height: 1.6; color: #333; }
.case-meta { margin: 32px 0 36px; border-top: 1px solid var(--line-l); }
.case-meta div { display: grid; grid-template-columns: 96px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line-l); }
.case-meta dt { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.case-meta dd { font-size: 15px; line-height: 1.45; }
.case-visit {
  display: inline-flex; align-items: center; gap: 12px; padding: 14px 22px; border-radius: 999px;
  background: var(--ink); color: #fff; font-size: 14px; font-weight: 600;
  transition: background .3s, transform .3s var(--ease);
}
.case-visit span { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); font-size: 12px; transition: transform .4s var(--ease); }
.case-visit:hover { background: var(--accent); transform: translateY(-2px); }
.case-visit:hover span { background: #fff; color: var(--accent); transform: rotate(45deg); }

.case-stage { position: relative; perspective: 1400px; padding-right: 70px; padding-bottom: 40px; }
.case-tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; list-style: none; padding: 5px; margin-bottom: 18px; border-radius: 999px; background: #e4e2dc; }
.case-tab {
  padding: 8px 16px; border: 0; border-radius: 999px; background: transparent; color: #666;
  font: 500 13px var(--font); cursor: pointer; transition: background .3s, color .3s;
}
.case-tab:hover { color: var(--ink); }
.case-tab.is-active { background: var(--ink); color: #fff; }
.case-browser { box-shadow: 0 50px 100px -40px rgba(10, 20, 60, .45), 0 30px 80px -50px color-mix(in srgb, var(--accent) 70%, transparent); }
.case-view { cursor: ns-resize; }
.case-page {
  position: absolute; inset: 0 0 auto 0; width: 100%; height: auto;
  opacity: 0; transition: opacity .5s ease; will-change: transform;
}
.case-page.is-active { opacity: 1; }
.case-phone { bottom: 0; }
.case-hint { position: absolute; left: 0; bottom: 0; font-family: var(--mono); font-size: 11px; color: var(--muted); }

@media (max-width: 860px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .case { padding-top: 48px; }
  .case-head { grid-template-columns: 1fr; gap: 8px; margin-bottom: 28px; }
  .case-idx, .case-kind { padding: 0; }
  .case-body, .case:nth-of-type(even) .case-body { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .case-stage, .case-info { min-width: 0; }
  .case:nth-of-type(even) .case-info { order: 0; }
  .case-stage { order: -1; padding: 0; }
  .case-tabs { display: flex; overflow-x: auto; flex-wrap: nowrap; border-radius: 14px; }
  .case-tab { white-space: nowrap; }
  .case-view { aspect-ratio: 4 / 5; overflow-y: auto; -webkit-overflow-scrolling: touch; cursor: auto; }
  .case-page { position: relative; display: none; }
  .case-page.is-active { display: block; }
  .case-hint { display: none; }
}

/* ============================================================
   MARCA + NAVEGACIÓN LATERAL DERECHA
============================================================ */
.brand {
  position: fixed; top: 20px; left: 24px; z-index: 100; white-space: nowrap;
  display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 50%;
  background: rgba(17,17,17,.72); backdrop-filter: blur(12px); border: 1px solid var(--line-d);
  color: #fff; font-weight: 700; font-size: 15px; letter-spacing: -0.04em;
  transition: rotate .5s var(--ease), scale .5s var(--ease), background .3s;
}
.brand span { color: var(--accent); }
.brand:hover { rotate: -12deg; scale: 1.06; background: var(--accent); }
.brand:hover span { color: #fff; }

#rail {
  position: fixed; top: 0; bottom: 0; right: 20px; z-index: 100;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-end; gap: 14px;
  pointer-events: none;
}
#rail > * { pointer-events: auto; }
.rail-track { position: fixed; top: 0; right: 0; bottom: 0; width: 3px; background: rgba(127,127,127,.15); pointer-events: none !important; }
.rail-fill { position: absolute; inset: 0; background: var(--accent); transform: scaleY(0); transform-origin: top; box-shadow: 0 0 12px var(--accent); }
.rail-nav {
  list-style: none; display: flex; flex-direction: column; gap: 2px; padding: 8px 6px;
  border-radius: 999px; background: rgba(14,14,16,.9); backdrop-filter: blur(12px); border: 1px solid var(--line-d);
}
.rail-nav a { position: relative; display: flex; align-items: center; justify-content: flex-end; }
.rail-num {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  font-family: var(--mono); font-size: 10px; color: rgba(255,255,255,.45);
  transition: background .4s var(--ease), color .3s, transform .4s var(--ease);
}
.rail-nav a:hover .rail-num { color: #fff; transform: scale(1.1); }
.rail-nav a.active .rail-num { background: var(--accent); color: #fff; }
.rail-label {
  position: absolute; right: calc(100% + 16px); white-space: nowrap;
  padding: 7px 14px; border-radius: 999px; background: rgba(17,17,17,.88); border: 1px solid var(--line-d);
  color: #fff; font-size: 13px; font-weight: 500;
  opacity: 0; translate: 10px 0; pointer-events: none;
  transition: opacity .35s, translate .5s var(--ease);
}
.rail-nav a.active .rail-label { color: #fff; border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.rail-nav:hover .rail-label, .rail-nav a:focus-visible .rail-label, #rail.flash a.active .rail-label { opacity: 1; translate: 0 0; }
.rail-nav:hover a:not(:hover) .rail-label { opacity: .55; }
.rail-cta {
  writing-mode: vertical-rl; transform: rotate(180deg);
  padding: 18px 12px; border-radius: 999px; background: var(--accent); color: #fff;
  font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  box-shadow: 0 10px 30px -10px var(--accent);
}
.rail-cta span { display: inline-block; }

/* Menú móvil */
.menu-btn { display: none; }
#menu[hidden] { display: none; }

/* ============================================================
   HERO — nombre, cargo rotativo, foto a la derecha
============================================================ */
.hero-visual { position: absolute; inset: 0; }
.hero-visual canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: pan-y; }
.hero-grid {
  position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 70% 60% at 60% 45%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 60% 45%, #000 20%, transparent 75%);
}
.hero-content {
  position: absolute; z-index: 2; left: 56px; top: 50%; translate: 0 -58%; max-width: 640px;
}
.hero-name {
  margin: 0 0 22px; font-size: clamp(64px, 8.2vw, 136px); line-height: .88; letter-spacing: -0.055em; font-weight: 700;
}
.hero-name .word { overflow: hidden; display: inline-block; vertical-align: top; padding-bottom: .06em; }
.hero-name .char { display: inline-block; }
.hero-roles { display: flex; gap: 10px; align-items: baseline; font-size: clamp(18px, 1.8vw, 26px); font-weight: 500; letter-spacing: -0.02em; }
.hero-roles-pre { color: rgba(255,255,255,.6); }
.hero-roles-box { position: relative; display: inline-grid; overflow: hidden; height: 1.3em; }
.hero-role { grid-area: 1 / 1; white-space: nowrap; color: #fff; opacity: 0; }
.hero-role.is-on { opacity: 1; }
.hero-role::after { content: ''; display: inline-block; width: .5em; height: 2px; margin-left: 6px; background: var(--accent); vertical-align: middle; }
.hero-lead { margin-top: 18px; max-width: 440px; font-size: 16px; line-height: 1.55; color: rgba(255,255,255,.68); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 14px; overflow: hidden;
  padding: 16px 16px 16px 26px; border-radius: 999px; font-size: 14px; font-weight: 600;
  transition: color .4s;
}
.btn i {
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-style: normal; font-size: 13px;
  transition: transform .5s var(--ease);
}
.btn::before { /* relleno que sube al pasar el mouse */
  content: ''; position: absolute; inset: 0; border-radius: inherit; transform: translateY(101%);
  transition: transform .5s var(--ease); z-index: -1;
}
.btn > * { position: relative; }
.btn { isolation: isolate; }
.btn:hover::before { transform: translateY(0); }
.btn:hover i { transform: rotate(-45deg); }
.btn--primary { background: #fff; color: var(--ink); }
.btn--primary i { background: var(--accent); color: #fff; }
.btn--primary::before { background: var(--accent); }
.btn--primary:hover { color: #fff; }
.btn--primary:hover i { background: #fff; color: var(--accent); }
.btn--ghost { border: 1px solid rgba(255,255,255,.3); color: #fff; }
.btn--ghost i { background: rgba(255,255,255,.12); }
.btn--ghost::before { background: #fff; }
.btn--ghost:hover { color: var(--ink); }
.btn--ghost:hover i { background: var(--ink); color: #fff; }
.hero-social { display: flex; gap: 22px; margin-top: 36px; font-family: var(--mono); font-size: 12px; color: rgba(255,255,255,.6); }
.hero-social a { position: relative; }
.hero-social a::after { content: ''; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease); }
.hero-social a:hover { color: #fff; }
.hero-social a:hover::after { transform: scaleX(1); transform-origin: left; }
.hero-hint {
  position: absolute; z-index: 2; right: 96px; top: 50%; translate: 0 -50%;
  writing-mode: vertical-rl; font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.5);
}
.hero-hint b { color: #fff; font-weight: 500; margin-top: 8px; }
.hero-hint::before { content: '● '; color: #fff; animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: .2; } }
.scroll-hint {
  position: absolute; z-index: 2; left: 50%; translate: -50% 0; top: 28px; display: flex; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.6);
}
.scroll-hint i { position: relative; width: 60px; height: 1px; background: rgba(255,255,255,.25); overflow: hidden; }
.scroll-hint i::after { content: ''; position: absolute; inset: 0; background: #fff; animation: scan 2s var(--ease) infinite; }
@keyframes scan { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }

/* ============================================================
   CINTA DE EMPRESAS
============================================================ */
.band { background: var(--accent); color: #fff; overflow: hidden; padding: 22px 0; position: relative; z-index: 2; }
.band-track { display: flex; width: max-content; gap: 56px; will-change: transform; }
.band-track span { display: inline-flex; align-items: center; gap: 56px; font-size: clamp(28px, 3.6vw, 52px); font-weight: 600; letter-spacing: -0.03em; white-space: nowrap; }
.band-track span::after { content: '✦'; font-size: .45em; opacity: .7; }

/* ============================================================
   ÍNDICE DE PROYECTOS (vista previa que sigue al cursor)
============================================================ */
.idx { list-style: none; border-top: 1px solid var(--line-l); }
.idx-row {
  position: relative; display: grid; grid-template-columns: 70px 1.3fr 1fr 70px 40px; align-items: center; gap: 20px;
  padding: 34px 0; border-bottom: 1px solid var(--line-l); transition: opacity .4s, padding .5s var(--ease);
}
.idx-row::before { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .7s var(--ease); }
.idx-row:hover::before { transform: scaleX(1); }
.idx:hover .idx-row:not(:hover) { opacity: .3; }
.idx-row:hover { padding-left: 20px; }
.idx-n { font-family: var(--mono); font-size: 12px; color: var(--accent); }
.idx-name { font-size: clamp(36px, 5.6vw, 84px); font-weight: 600; letter-spacing: -0.045em; line-height: 1; }
.idx-kind, .idx-year { font-family: var(--mono); font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.idx-arrow { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-l); font-style: normal; transition: transform .5s var(--ease), background .3s, color .3s; }
.idx-row:hover .idx-arrow { background: var(--accent); border-color: var(--accent); color: #fff; transform: rotate(90deg); }
.idx-preview {
  position: fixed; left: 0; top: 0; z-index: 60; width: 400px; aspect-ratio: 16 / 10; pointer-events: none;
  border-radius: 14px; overflow: hidden; box-shadow: 0 40px 80px -30px rgba(0,0,0,.5);
  scale: 0; opacity: 0;
}
.idx-preview-in { position: absolute; inset: -10%; background: #111 center top / cover no-repeat; }

/* ============================================================
   TÍTULOS POR LETRAS + LÍNEA DE TIEMPO
============================================================ */
.big-title .word, .contact-title .word { overflow: hidden; display: inline-block; vertical-align: top; padding-bottom: .06em; }
.big-title .char, .contact-title .char { display: inline-block; }
.contact-title .char { transition: translate .5s var(--ease), rotate .5s var(--ease), color .3s; }
.contact-title .char:hover { translate: 0 -12%; rotate: -6deg; color: var(--accent); }
.timeline { position: relative; }
.timeline-line { position: absolute; left: -28px; top: 0; bottom: 0; width: 2px; background: var(--accent); transform: scaleY(0); transform-origin: top; }
.job { position: relative; }
.job::before { content: ''; position: absolute; left: -33px; top: 44px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--line-l); transition: border-color .4s, background .4s; }
.job.is-on::before { border-color: var(--accent); background: var(--accent); }

/* Cursor con texto */
.cursor-label { position: absolute; left: 50%; top: 50%; translate: -50% -50%; font: 600 11px var(--font); color: #fff; opacity: 0; transition: opacity .2s; white-space: nowrap; }
.cursor.view { width: 84px; height: 84px; background: var(--accent); border-color: var(--accent); }
.cursor.view .cursor-label { opacity: 1; }

/* Espacio para el riel en escritorio */
@media (min-width: 861px) {
  .wrap { padding-left: 72px; padding-right: 120px; max-width: 1320px; }
}

/* ============================================================
   MÓVIL
============================================================ */
@media (max-width: 860px) {
  #rail { display: none; }
  .brand { top: 16px; left: 16px; width: 46px; height: 46px; font-size: 14px; }
  .menu-btn {
    position: fixed; top: 16px; right: 16px; z-index: 210;
    display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 18px;
    border-radius: 999px; border: 1px solid var(--line-d); background: rgba(17,17,17,.78); backdrop-filter: blur(12px);
    color: #fff; font: 600 13px var(--font); cursor: pointer;
  }
  .menu-ico { position: relative; width: 16px; height: 10px; }
  .menu-ico i { position: absolute; left: 0; height: 2px; border-radius: 2px; background: #fff; transition: transform .45s var(--ease), width .3s, top .3s; }
  .menu-ico i:first-child { top: 0; width: 16px; }
  .menu-ico i:last-child { top: 8px; width: 10px; }
  .menu-btn[aria-expanded="true"] .menu-ico i:first-child { top: 4px; transform: rotate(45deg); }
  .menu-btn[aria-expanded="true"] .menu-ico i:last-child { top: 4px; width: 16px; transform: rotate(-45deg); }
  .menu-btn b { font-weight: 600; }
  #menu {
    position: fixed; inset: 0; z-index: 200; background: var(--ink); color: #fff;
    display: flex; flex-direction: column; justify-content: space-between; padding: 96px 20px 32px;
  }
  #menu ol { list-style: none; }
  #menu li { overflow: hidden; border-bottom: 1px solid var(--line-d); }
  #menu li a { display: flex; align-items: baseline; gap: 14px; padding: 12px 0; font-size: 34px; font-weight: 600; letter-spacing: -0.03em; }
  #menu li a span { font-family: var(--mono); font-size: 11px; color: var(--accent); }
  .menu-foot { display: flex; flex-direction: column; gap: 10px; font-family: var(--mono); font-size: 13px; color: rgba(255,255,255,.6); }

  #hero { min-height: 760px; }
  .hero-content { left: 16px; right: 16px; top: 92px; translate: none; }
  .hero-name { font-size: clamp(52px, 15vw, 72px); margin: 20px 0 16px; }
  .hero-roles { font-size: 17px; }
  .hero-lead { font-size: 15px; max-width: 300px; }
  .hero-ctas { margin-top: 22px; }
  .btn { padding: 12px 12px 12px 20px; font-size: 13px; }
  .hero-social, .hero-hint, .scroll-hint { display: none; }
  .band { padding: 16px 0; }
  .idx-row { grid-template-columns: 34px 1fr 36px; gap: 12px; padding: 24px 0; }
  .idx-kind, .idx-year { display: none; }
  .idx-name { font-size: 34px; }
  .idx-arrow { width: 34px; height: 34px; }
  .idx-preview { display: none; }
  .timeline-line { left: -10px; }
  .job::before { display: none; }
}

/* ============================================================
   IA / CLAUDE — manifiesto, terminal que se escribe y robot
============================================================ */
#claude { overflow: hidden; }
.claude-glow {
  position: absolute; left: 50%; top: 30%; width: 900px; height: 900px; translate: -50% -50%; pointer-events: none;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 28%, transparent), transparent 62%); filter: blur(40px); opacity: .6;
}
.claude-manifesto { max-width: 980px; margin: -24px 0 96px; font-size: clamp(28px, 3.8vw, 54px); line-height: 1.15; letter-spacing: -0.03em; font-weight: 500; }
.sw { display: inline-block; }
.claude-stage { position: relative; }
.claude-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 64px; align-items: center; min-height: 80vh; }
.claude-steps { list-style: none; border-top: 1px solid var(--line-d); }
.claude-step { position: relative; display: grid; grid-template-columns: 48px 1fr; gap: 16px; padding: 26px 0; border-bottom: 1px solid var(--line-d); color: rgba(255,255,255,.35); transition: color .5s; }
.claude-step .num { font-family: var(--mono); font-size: 12px; padding-top: 6px; transition: color .5s; }
.claude-step h3 { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 8px; }
.claude-step p { line-height: 1.55; max-height: 0; opacity: 0; overflow: hidden; transition: max-height .6s var(--ease), opacity .5s; color: rgba(255,255,255,.62); }
.claude-step.is-active { color: #fff; }
.claude-step.is-active .num { color: var(--accent); }
.claude-step.is-active p { max-height: 120px; opacity: 1; }
.claude-step.is-done { color: rgba(255,255,255,.6); }
.claude-step.is-done .num::after { content: ' ✓'; color: var(--accent); }
.claude-step-bar { position: absolute; left: 0; bottom: -1px; width: 100%; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; }

.term-wrap { position: relative; padding-top: 150px; }
.term {
  position: relative; z-index: 1; border-radius: 14px; overflow: hidden;
  background: rgba(14,15,20,.92); border: 1px solid rgba(255,255,255,.1); backdrop-filter: blur(10px);
  box-shadow: 0 50px 120px -40px color-mix(in srgb, var(--accent) 55%, transparent), 0 0 0 1px rgba(0,0,0,.4);
}
.term-bar { display: flex; align-items: center; gap: 6px; padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.03); }
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: #3a3a3a; }
.term-bar i:first-child { background: #ff5f57; } .term-bar i:nth-child(2) { background: #febc2e; } .term-bar i:nth-child(3) { background: #28c840; }
.term-bar span { margin-left: 12px; font-family: var(--mono); font-size: 11px; color: rgba(255,255,255,.45); }
.term-body { height: 380px; padding: 20px 22px; font-family: var(--mono); font-size: 13.5px; line-height: 1.6; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; }
.tl { display: grid; grid-template-columns: 22px 1fr; margin-top: 8px; }
.tl b { font-weight: 400; }
.tl--u { color: #fff; margin-top: 16px; }
.tl--u b { color: var(--accent); }
.tl--a { color: rgba(255,255,255,.65); }
.tl--a b { color: #d97757; }
.tl--ok { color: #3ddc84; }
.caret { display: inline-block; width: 8px; height: 1.05em; margin-left: 2px; vertical-align: -2px; background: var(--accent); animation: blink 1s steps(1) infinite; }
.octo-wrap { position: absolute; z-index: 2; right: 24px; top: 0; width: 200px; height: 200px; }
.octo-wrap::before { content: ''; position: absolute; inset: 10%; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 40%, transparent), transparent 68%); filter: blur(18px); }
#octo-canvas { position: relative; width: 100%; height: 100%; display: block; }
.octo-tag { display: block; margin-top: 14px; text-align: right; font-family: var(--mono); font-size: 11px; color: rgba(255,255,255,.35); }

.shipped { margin-top: 120px; display: grid; grid-template-columns: 200px 1fr; gap: 32px; align-items: start; border-top: 1px solid var(--line-d); padding-top: 32px; }
.shipped-title { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.45); padding-top: 18px; }
.shipped-list { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.shipped-list a {
  position: relative; display: flex; flex-direction: column; gap: 6px; padding: 20px; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--line-d); background: rgba(255,255,255,.02); transition: border-color .4s, background .4s;
}
.shipped-list b { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.shipped-list span { font-family: var(--mono); font-size: 11px; color: rgba(255,255,255,.45); }
.shipped-list i { position: absolute; right: 18px; top: 18px; font-style: normal; color: rgba(255,255,255,.4); transition: rotate .5s var(--ease), color .3s; }
.shipped-list a:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.shipped-list a:hover i { color: #fff; rotate: 45deg; }

@media (max-width: 860px) {
  .claude-manifesto { margin: -32px 0 56px; font-size: 26px; }
  .claude-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; min-height: 0; }
  .term-wrap { padding-top: 120px; }
  .term-body { height: 320px; font-size: 12px; padding: 16px; }
  .octo-wrap { width: 150px; height: 150px; right: 8px; }
  .shipped { grid-template-columns: 1fr; margin-top: 72px; }
  .shipped-list { grid-template-columns: 1fr 1fr; }
}

/* Tras la entrada, las letras del nombre ya no se recortan: salen volando con el scroll */
.hero-name.is-free .word { overflow: visible; }
.hero-name .char { will-change: transform, opacity, filter; }
