@import url('/fonts/geist/geist.css');
@import url('/fonts/geist-mono/geist-mono.css');

/* Núcleo — portafolio de programador, oscuro. Portada con partículas 3D (Three.js, script.js) sobre un póster en CSS que queda
   en el editor, sin WebGL o con «reducir movimiento». Geist (texto) + Geist Mono (índices, etiquetas, HUD).
   html.is-ed = editor (todo quieto y editable) · html.gs = GSAP activo · html.still = sin GSAP o «reducir movimiento» ·
   .hero.is-gl = el 3D ya dibujó su primer cuadro (tapa el póster). */

:root {
  --bg: #050608;
  --bg-2: #0b0d11;
  --fg: #eef0f3;
  /* grises legibles sobre el negro (contraste ≥ 7:1 y ≥ 5:1): las etiquetas chicas en mono se perdían con .34 */
  --mute: rgba(238, 240, 243, .74);
  --dim: rgba(238, 240, 243, .6);
  --line: rgba(238, 240, 243, .1);
  --line-2: rgba(238, 240, 243, .18);
  --accent: #ff5a1f;
  /* Partículas: del azul profundo (lejos) al blanco frío (cerca); el acento es el «calor» del mouse */
  --gl-far: #3b4cff;
  --gl-near: #e8ecff;
  --ok: #3ddc84;
  --sans: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --pad: clamp(20px, 4vw, 56px);
  --nav-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body, button, input, select, textarea { font-family: var(--sans); }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--fg); font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: clip; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
::selection { background: var(--accent); color: var(--bg); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--fg); color: var(--bg); padding: 10px 16px; font-weight: 600; }
.skip-link:focus { left: 8px; }
.tm-al-left { text-align: left; } .tm-al-center { text-align: center; } .tm-al-right { text-align: right; }

/* ─── Botones ─── */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 54px; padding: 0 26px; border-radius: 999px;
  font-size: 15px; font-weight: 500; letter-spacing: -.005em; white-space: nowrap; overflow: hidden; isolation: isolate; cursor: pointer;
  transition: color .5s var(--ease), border-color .5s var(--ease); }
/* sin transition de transform en .btn: GSAP (entrada, botón magnético) lo maneja y una transición CSS lo dejaba a medio camino */
.btn > * { position: relative; z-index: 1; }
.btn .ar, .btn .wa-ic { flex: none; transition: transform .5s var(--ease); }
.btn:hover .ar { transform: translateX(4px); }
/* relleno que sube desde abajo al pasar el mouse */
.btn-fill { position: absolute !important; z-index: 0 !important; inset: 0; border-radius: inherit; transform: translateY(101%); transition: transform .6s var(--ease); }
.btn:hover .btn-fill { transform: none; }
.btn-solid { background: var(--fg); color: var(--bg); }
.btn-solid .btn-fill { background: var(--accent); }
.btn-solid:hover { color: #fff; }
.btn-line { border: 1px solid var(--line-2); color: var(--fg); background: rgba(5, 6, 8, .35); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.btn-line .btn-fill { background: var(--fg); }
.btn-line:hover { color: var(--bg); border-color: var(--fg); }
.btn-sm { height: 42px; padding: 0 18px; font-size: 14px; }
.btn-sm .wa-ic { width: 16px; height: 16px; }

/* ─── Cabecera ─── */
.nav { position: fixed; z-index: 50; top: 0; left: 0; right: 0; transition: transform .7s var(--ease), background-color .5s var(--ease), box-shadow .5s; }
.nav-in { max-width: 1520px; margin: 0 auto; height: var(--nav-h); padding: 0 var(--pad); display: flex; align-items: center; gap: 20px; }
.nav.is-solid { background: rgba(5, 6, 8, .72); box-shadow: 0 1px 0 var(--line); -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%); }
.nav.is-up { transform: translateY(-100%); }

.logo { display: inline-flex; align-items: center; font-family: var(--mono); font-size: 15px; font-weight: 500; letter-spacing: -.01em; white-space: nowrap; margin-right: auto; }
.logo::before { content: '~/'; color: var(--accent); margin-right: 2px; }
.logo::after { content: ''; width: .55em; height: 1.1em; margin-left: 4px; background: var(--fg); animation: caret 1.1s steps(1) infinite; }
.logo img { max-height: 40px; width: auto; }
.logo:has(img)::before, .logo:has(img)::after { display: none; }
@keyframes caret { 50% { opacity: 0; } }

/* Enlaces: cápsula con borde fino; una «píldora» (script) se desliza al enlace bajo el mouse */
.nav-links { position: relative; display: flex; align-items: center; gap: 2px; padding: 5px; border: 1px solid var(--line); border-radius: 999px;
  background: rgba(11, 13, 17, .55); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.nav-pill { position: absolute; top: 5px; bottom: 5px; left: 0; width: 0; border-radius: 999px; background: rgba(238, 240, 243, .08);
  box-shadow: inset 0 0 0 1px rgba(238, 240, 243, .1); opacity: 0; pointer-events: none;
  transition: transform .55s var(--ease), width .55s var(--ease), opacity .35s; }
.nav-links.has-pill .nav-pill { opacity: 1; }
.nl { position: relative; z-index: 1; display: inline-flex; align-items: baseline; gap: 7px; padding: 9px 16px; border-radius: 999px; font-size: 14px; color: var(--mute); transition: color .35s; }
.nl:hover, .nl.is-on { color: var(--fg); }
/* número del enlace por contador: al quitar una sección el editor quita su enlace y los demás se renumeran solos
   (escrito a mano quedaban saltos, «01, 04, 07») */
.nav-links { counter-reset: nl; }
.nl { counter-increment: nl; }
.nl-n::before { content: counter(nl, decimal-leading-zero); }
.nl-n { font-family: var(--mono); font-size: 10.5px; color: var(--dim); transition: color .35s; }
.nl:hover .nl-n, .nl.is-on .nl-n { color: var(--accent); }
.nl-t { white-space: nowrap; }

.nav-status { display: inline-flex; align-items: center; gap: 9px; font-family: var(--mono); font-size: 12px; color: var(--mute); white-space: nowrap; margin-left: auto; }
.dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; }
.dot::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--ok); animation: ping 2s var(--ease) infinite; }
@keyframes ping { from { transform: scale(1); opacity: .7; } to { transform: scale(2.8); opacity: 0; } }

.nav-toggle { display: none; position: relative; width: 46px; height: 46px; border: 1px solid var(--line-2); border-radius: 50%; background: rgba(11, 13, 17, .6); color: var(--fg); cursor: pointer; flex: none; }
.nav-toggle i { position: absolute; left: 14px; right: 14px; height: 1.5px; background: currentColor; transition: transform .5s var(--ease); }
.nav-toggle i:first-child { top: 19px; } .nav-toggle i:last-child { top: 25px; }
.nav.is-open .nav-toggle i:first-child { transform: translateY(3px) rotate(45deg); }
.nav.is-open .nav-toggle i:last-child { transform: translateY(-3px) rotate(-45deg); }

@media (max-width: 1180px) { .nav-status { display: none; } .nav-links { margin-left: auto; } }

/* Celular y tableta: menú a pantalla completa con los mismos enlaces, grandes; disponibilidad y «Hablemos» abajo */
@media (max-width: 900px) {
  :root { --nav-h: 68px; }
  .nav-toggle { display: block; }
  .nav-cta { display: none; }
  .nav-links { position: fixed; inset: 0; z-index: -1; margin: 0; padding: calc(var(--nav-h) + 28px) var(--pad) 170px; border: 0; border-radius: 0;
    flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0; background: var(--bg);
    -webkit-backdrop-filter: none; backdrop-filter: none; clip-path: inset(0 0 100% 0); visibility: hidden;
    transition: clip-path .8s var(--ease), visibility 0s .8s; overflow-y: auto; }
  /* cuadrícula tenue de fondo */
  .nav-links::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
    background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(120% 70% at 100% 0%, #000, transparent 70%); mask-image: radial-gradient(120% 70% at 100% 0%, #000, transparent 70%); }
  .nav-pill { display: none; }
  .nl { align-items: baseline; gap: 14px; padding: 16px 0; border-radius: 0; border-bottom: 1px solid var(--line); font-size: clamp(34px, 9vw, 54px);
    font-weight: 500; letter-spacing: -.04em; line-height: 1.05; color: var(--fg); opacity: 0; transform: translateY(30px);
    transition: transform .8s var(--ease), opacity .6s var(--ease), color .3s; }
  .nl-n { font-size: 12px; letter-spacing: 0; min-width: 22px; }
  .nl-t { white-space: normal; }
  .nav.is-open .nav-links { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path .8s var(--ease), visibility 0s; }
  .nav.is-open .nl { opacity: 1; transform: none; }
  .nav.is-open .nl:nth-child(3) { transition-delay: .06s; } .nav.is-open .nl:nth-child(4) { transition-delay: .12s; }
  .nav.is-open .nl:nth-child(5) { transition-delay: .18s; } .nav.is-open .nl:nth-child(6) { transition-delay: .24s; }
  .nav.is-open { background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  /* abajo del menú abierto: disponibilidad y «Hablemos» a todo el ancho (los mismos elementos de la cabecera) */
  .nav.is-open .nav-status { display: inline-flex; position: fixed; left: var(--pad); bottom: 100px; margin: 0; font-size: 13px;
    animation: menu-in .7s .25s var(--ease) both; }
  .nav.is-open .nav-cta { display: inline-flex; position: fixed; left: var(--pad); right: var(--pad); bottom: max(28px, env(safe-area-inset-bottom)); height: 56px; font-size: 16px;
    animation: menu-in .7s .3s var(--ease) both; }
}
@keyframes menu-in { from { opacity: 0; transform: translateY(16px); } }

/* ─── Portada ─── */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; isolation: isolate;
  padding: calc(var(--nav-h) + 40px) var(--pad) 0; }
.hero-bg, .hero-gl { position: absolute; inset: 0; z-index: -1; }
/* Póster: un núcleo de luz con su anillo, hecho con degradados (es lo que se ve en el editor y sin WebGL) */
/* Póster: un cuadro real de la escena (sin degradados); se ve en el editor, sin WebGL o con «reducir movimiento» */
.hero-poster { position: absolute; inset: 0; transition: opacity .9s ease; }
.hero-poster img { position: absolute; left: 69.8%; top: 48%; width: 97.5vh; max-width: none; height: auto; transform: translate(-50%, -50%); }
.hero.is-gl .hero-poster { opacity: 0; }
.hero-grid { position: absolute; inset: 0; opacity: .55;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 80px 80px; background-position: center;
  -webkit-mask-image: radial-gradient(70% 60% at 65% 45%, #000 0%, transparent 75%); mask-image: radial-gradient(70% 60% at 65% 45%, #000 0%, transparent 75%); }
.hero-gl canvas { display: block; width: 100% !important; height: 100% !important; opacity: 0; transition: opacity .9s ease; cursor: pointer; }
.hero.is-gl .hero-gl canvas { opacity: 1; }
/* texto siempre legible: la parte de abajo y la izquierda se oscurecen un poco */
.hero::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, rgba(5, 6, 8, .78), rgba(5, 6, 8, .2) 48%, transparent 70%), linear-gradient(0deg, var(--bg), rgba(5, 6, 8, 0) 34%); }

/* esquinas de «visor» */
.hero-x { position: absolute; width: 14px; height: 14px; pointer-events: none; border: 0 solid var(--line-2); }
.hero-x-tl { top: calc(var(--nav-h) + 14px); left: var(--pad); border-width: 1px 0 0 1px; }
.hero-x-tr { top: calc(var(--nav-h) + 14px); right: var(--pad); border-width: 1px 1px 0 0; }
.hero-x-bl { bottom: 18px; left: var(--pad); border-width: 0 0 1px 1px; }
.hero-x-br { bottom: 18px; right: var(--pad); border-width: 0 1px 1px 0; }

/* HUD (lo escribe el script): forma, partículas, fps, posición del mouse */
.hero-hud { position: absolute; top: calc(var(--nav-h) + 34px); right: calc(var(--pad) + 4px); z-index: 1; pointer-events: none; text-align: right;
  font-family: var(--mono); font-size: 11px; line-height: 1.75; letter-spacing: .04em; text-transform: uppercase; color: var(--dim); }
.hero-hud:empty { display: none; }
.hud-shape { color: var(--fg); }
.hud-shape b { color: var(--accent); font-weight: 500; }
.hud-bar { display: block; width: 140px; height: 1px; margin: 8px 0 6px auto; background: var(--line-2); overflow: hidden; }
.hud-bar i { display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); }

.hero-in { position: relative; max-width: 1520px; width: 100%; margin: 0 auto; padding-bottom: clamp(36px, 6vh, 64px); pointer-events: none; }
.hero-in > * { pointer-events: auto; }
.kicker { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 26px; font-family: var(--mono); font-size: 13px; letter-spacing: .02em; color: var(--mute); }
/* [01] [02]…: por contador, en el orden de la página; al quitar una sección las demás se renumeran (escritos a mano quedaban saltos) */
body { counter-reset: kidx; }
.k-idx { color: var(--accent); counter-increment: kidx; }
.k-idx::before { content: '[' counter(kidx, decimal-leading-zero) ']'; }
.hero-title { max-width: 13ch; font-size: clamp(46px, 7.4vw, 120px); font-weight: 500; line-height: .93; letter-spacing: -.055em; }
.ht { display: block; }
.ht-2 { color: var(--mute); }
.ht-3 { font-style: normal; display: inline-block; position: relative; padding-right: .08em; color: var(--accent); }
/* cursor de terminal al final del titular */
.ht-3::after { content: ''; position: absolute; right: -.42em; bottom: .12em; width: .36em; height: .08em; background: var(--accent); animation: caret 1.1s steps(1) infinite; }
.hero-lead { max-width: 33em; margin-top: 30px; font-size: clamp(16px, 1.25vw, 19px); line-height: 1.6; color: var(--mute); }
.hero-btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

.hero-hint { position: absolute; z-index: 1; right: calc(var(--pad) + 4px); top: 62%; display: none; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--dim); }
.hero.is-gl .hero-hint { display: inline-flex; }
/* en el celular el objeto ya invita a tocarlo; la pista chocaba con el texto */
@media (hover: none), (max-width: 900px) { .hero.is-gl .hero-hint { display: none; } }
.hint-ic { width: 18px; height: 18px; border: 1px solid var(--line-2); border-radius: 50%; position: relative; }
.hint-ic::after { content: ''; position: absolute; inset: 5px; border-radius: 50%; background: var(--accent); animation: ping 2s var(--ease) infinite; }

.hero-foot { position: relative; max-width: 1520px; width: 100%; margin: 0 auto; display: flex; align-items: stretch; gap: 24px; border-top: 1px solid var(--line); }
.meta { flex: 1; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.meta-i { display: flex; flex-direction: column; gap: 6px; padding: 22px 24px 30px 0; }
.meta-i + .meta-i { padding-left: 24px; border-left: 1px solid var(--line); }
.meta-k { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
.meta-v { font-size: 15px; color: var(--fg); }
.hero-scroll { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; width: 92px; border-left: 1px solid var(--line);
  font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.hs-line { position: relative; width: 1px; height: 38px; background: var(--line-2); overflow: hidden; }
.hs-line::after { content: ''; position: absolute; left: 0; top: 0; width: 1px; height: 100%; background: var(--accent); animation: hsl 2.2s var(--ease) infinite; }
@keyframes hsl { from { transform: translateY(-100%); } to { transform: translateY(100%); } }

/* Entrada del hero en CSS: corre con la primera pintura, sin esperar al script (GSAP + three.js pesan ~600 KB).
   Cada línea del titular sube desde una máscara; lo demás sube y aparece. En el editor y con «reducir movimiento», nada. */
@keyframes in-rise { from { opacity: 0; transform: translateY(22px); } }
@keyframes in-line { from { clip-path: inset(0 -40% 100% 0); transform: translateY(40%); } to { clip-path: inset(-25% -40% -25% 0); transform: none; } }
@keyframes in-fade { from { opacity: 0; } }
html:not(.is-ed) .nav-in { animation: in-fade .9s var(--ease) both; }
html:not(.is-ed) .in-1 { animation: in-rise .8s var(--ease) .05s both; }
html:not(.is-ed) .ht { animation: in-line 1.1s var(--ease) both; }
html:not(.is-ed) .ht-1 { animation-delay: .12s; } html:not(.is-ed) .ht-2 { animation-delay: .22s; } html:not(.is-ed) .ht-3 { animation-delay: .32s; }
html:not(.is-ed) .in-3 { animation: in-rise .9s var(--ease) .5s both; }
html:not(.is-ed) .in-4 { animation: in-rise .9s var(--ease) .6s both; }
html:not(.is-ed) .in-5 { animation: in-fade 1s var(--ease) .75s both; }

@media (max-width: 900px) {
  .hero { padding-top: calc(var(--nav-h) + 24px); }
  .hero-poster img { left: 50%; top: 28%; width: 122vw; }
  .hero-grid { -webkit-mask-image: radial-gradient(90% 50% at 50% 26%, #000, transparent 75%); mask-image: radial-gradient(90% 50% at 50% 26%, #000, transparent 75%); }
  .hero::after { background: linear-gradient(0deg, var(--bg) 8%, rgba(5, 6, 8, .82) 46%, rgba(5, 6, 8, 0) 70%); }
  .hero-in { padding-top: 34vh; }
  .hero-hud { top: calc(var(--nav-h) + 16px); right: var(--pad); font-size: 10px; }
  .hud-xy, .hud-meta { display: none; }
  .hero-hint { top: calc(var(--nav-h) + 38vh); right: auto; left: 50%; transform: translateX(-50%); white-space: nowrap; }
  .hero-x { display: none; }
  .hero-foot { flex-direction: column; gap: 0; }
  .meta { grid-template-columns: 1fr; }
  .meta-i { flex-direction: row; justify-content: space-between; gap: 16px; padding: 14px 0; }
  .meta-i + .meta-i { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .meta-v { text-align: right; font-size: 14px; }
  .hero-scroll { display: none; }
}
@media (max-width: 520px) {
  .hero-title { font-size: clamp(40px, 12.4vw, 60px); }
  .hero-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .hero-btns .btn { padding: 0 14px; height: 52px; }
  .kicker { font-size: 12px; margin-bottom: 18px; }
  .hero-lead { margin-top: 20px; }
  .hero-btns { margin-top: 26px; }
}

/* ─── Secciones ─── */
.sec { position: relative; max-width: 1520px; margin: 0 auto; padding: clamp(96px, 13vw, 180px) var(--pad) 0; }
.sec-head { display: grid; gap: 22px; margin-bottom: clamp(48px, 6vw, 88px); }
.label { display: inline-flex; align-items: center; gap: 12px; font-family: var(--mono); font-size: 13px; letter-spacing: .02em; color: var(--mute); }
.h-xl { max-width: 17ch; font-size: clamp(36px, 5.2vw, 84px); font-weight: 500; line-height: 1; letter-spacing: -.045em; }

/* Proyectos */
.works-list { display: flex; flex-direction: column; counter-reset: wk; }
.work { counter-increment: wk; display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(28px, 4vw, 72px); align-items: center; padding: clamp(28px, 3.5vw, 48px) 0; border-top: 1px solid var(--line); }
.work:nth-child(even) { grid-template-columns: 1fr 1.35fr; }
.work:nth-child(even) .work-media { order: 2; }
.work-media { position: relative; display: block; overflow: hidden; border-radius: 14px; background: var(--bg-2); aspect-ratio: 16 / 11; box-shadow: 0 0 0 1px var(--line); }
.work-img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.work-media:hover .work-img { transform: scale(1.035); }
.work-body { display: flex; flex-direction: column; gap: 18px; }
.work-top { display: flex; align-items: center; gap: 14px; font-family: var(--mono); font-size: 13px; color: var(--mute); }
.work-n::before { content: '0' counter(wk); color: var(--accent); }
.work-year { margin-left: auto; }
.work-name { font-size: clamp(34px, 4vw, 60px); font-weight: 500; letter-spacing: -.045em; line-height: 1; }
.work-desc { color: var(--mute); max-width: 34em; }
.work-facts { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.work-fact { display: flex; flex-direction: column; gap: 4px; padding: 16px 16px 16px 0; }
.work-fact + .work-fact { padding-left: 16px; border-left: 1px solid var(--line); }
.work-kpi { font-size: 30px; font-weight: 500; letter-spacing: -.03em; line-height: 1.1; }
.work-kpi-l, .work-kpi-k { font-family: var(--mono); font-size: 12.5px; letter-spacing: .03em; text-transform: uppercase; color: var(--dim); }
.work-kpi-k { order: 2; }
.work-role { font-size: 17px; line-height: 1.35; padding-top: 6px; }
.work-stack { font-family: var(--mono); font-size: 13.5px; color: var(--mute); }
.work-link { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; padding-bottom: 4px; border-bottom: 1px solid var(--line-2); font-size: 15px; transition: border-color .4s, color .4s; }
.work-link:hover { color: var(--accent); border-color: var(--accent); }
.work-link .ar { transition: transform .5s var(--ease); }
.work-link:hover .ar { transform: translate(3px, -3px); }

/* Experiencia */
.exp-list { border-bottom: 1px solid var(--line); }
.job { position: relative; display: grid; grid-template-columns: 200px 1.1fr 1.4fr; gap: 28px; align-items: baseline; padding: 30px 0; border-top: 1px solid var(--line); }
.job-line { position: absolute; left: 0; top: -1px; height: 1px; width: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .9s var(--ease); }
.job:hover .job-line { transform: none; }
.job-when { font-family: var(--mono); font-size: 13px; color: var(--mute); }
.job-role { font-size: clamp(22px, 2vw, 28px); font-weight: 500; letter-spacing: -.03em; line-height: 1.15; }
.job-at { margin-top: 4px; font-family: var(--mono); font-size: 13px; color: var(--accent); }
.job-desc { color: var(--mute); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: clamp(48px, 6vw, 80px); }
.stat { display: flex; flex-direction: column; gap: 8px; padding: 0 24px; border-left: 1px solid var(--line); }
.stat:first-child { padding-left: 0; border-left: 0; }
.stat-v { font-size: clamp(44px, 5vw, 76px); font-weight: 500; letter-spacing: -.05em; line-height: 1; }
.stat-l { font-size: 14px; color: var(--mute); max-width: 16em; }

/* Stack */
.stack-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(32px, 5vw, 88px); align-items: start; }
.about { display: grid; grid-template-columns: 180px 1fr; gap: 18px; align-items: start; }
.about-fig { border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 5; box-shadow: 0 0 0 1px var(--line); }
.about-img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); transition: filter .8s var(--ease); }
.about:hover .about-img { filter: none; }
.term { border: 1px solid var(--line-2); border-radius: 12px; background: var(--bg-2); overflow: hidden; }
.term-bar { display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-bottom: 1px solid var(--line); }
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.term-file { margin-left: 8px; font-family: var(--mono); font-size: 12px; color: var(--dim); }
.term-body { padding: 18px 20px 22px; font-family: var(--mono); font-size: 14px; line-height: 1.75; }
.term-cmd { color: var(--fg); margin-bottom: 10px; }
.term-ps { color: var(--ok); margin-right: 10px; }
.term-out { color: var(--mute); display: inline; }
.term-caret { display: inline-block; width: .6em; height: 1.1em; margin-left: 4px; vertical-align: -.2em; background: var(--accent); animation: caret 1.1s steps(1) infinite; }
.groups-list { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.group { padding: 26px 24px 30px 0; border-bottom: 1px solid var(--line); }
.group:nth-child(even) { padding-left: 24px; border-left: 1px solid var(--line); }
.groups-list { counter-reset: gr; }
.group { counter-increment: gr; }
.group-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 16px; }
.group-n::before { content: '0' counter(gr); font-family: var(--mono); font-size: 11px; color: var(--accent); }
.group-t { font-size: 20px; font-weight: 500; letter-spacing: -.02em; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 7px 13px; border: 1px solid var(--line-2); border-radius: 999px; font-family: var(--mono); font-size: 12.5px; color: var(--fg); transition: border-color .3s, color .3s; }
.chips li:hover { border-color: var(--accent); color: var(--accent); }

/* Contacto */
.contact { position: relative; margin-top: clamp(110px, 14vw, 200px); border-top: 1px solid var(--line); overflow: hidden; }
.contact::before { content: ''; position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 80px 80px; }
.contact-in { position: relative; max-width: 1520px; margin: 0 auto; padding: clamp(80px, 10vw, 140px) var(--pad) clamp(64px, 8vw, 110px); }
.ct-big { margin: 26px 0 40px; font-size: clamp(64px, 15vw, 250px); font-weight: 500; letter-spacing: -.065em; line-height: .86; }
.ct-fit { display: inline-block; }
.ct-big::after { content: ''; display: inline-block; width: .32em; height: .07em; margin-left: .04em; background: var(--accent); animation: caret 1.1s steps(1) infinite; }
.ct-row { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: end; }
.ct-text { max-width: 30em; font-size: clamp(17px, 1.4vw, 21px); color: var(--mute); }
.ct-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.btn-big { height: 64px; padding: 0 32px; font-size: 17px; }
.ct-mail { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; font-size: 15px; color: var(--mute); }
.mail-link { font-family: var(--mono); color: var(--fg); border-bottom: 1px solid var(--line-2); transition: color .3s, border-color .3s; }
.mail-link:hover { color: var(--accent); border-color: var(--accent); }
.mail-pick { position: fixed; z-index: 90; min-width: 240px; padding: 8px; display: flex; flex-direction: column; background: var(--bg-2); color: var(--fg);
  border: 1px solid var(--line-2); border-radius: 12px; box-shadow: 0 24px 60px -12px rgba(0, 0, 0, .7); }
.mail-pick p { font-family: var(--mono); font-size: 12px; color: var(--dim); padding: 8px 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.mail-pick a, .mail-pick button { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 8px; font: inherit; font-size: 15px; color: inherit; background: none; border: 0; text-align: left; cursor: pointer; }
.mail-pick a:hover, .mail-pick button:hover { background: rgba(238, 240, 243, .07); }

/* Pie */
.foot { border-top: 1px solid var(--line); }
.foot-in { max-width: 1520px; margin: 0 auto; padding: 36px var(--pad) 30px; }
.foot-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.socials { display: flex; flex-wrap: wrap; gap: 6px 26px; }
.socials a { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; color: var(--fg); transition: color .3s; }
.socials a:hover { color: var(--accent); }
.to-top { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 12px; color: var(--mute); }
.to-top:hover { color: var(--fg); }
.foot-bot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 12px; color: var(--dim); }

@media (max-width: 1100px) {
  .stack-grid { grid-template-columns: 1fr; }
  .job { grid-template-columns: 150px 1fr; }
  .job-desc { grid-column: 2; }
  .stats { grid-template-columns: repeat(2, 1fr); row-gap: 36px; }
  .stat:nth-child(odd) { padding-left: 0; border-left: 0; }
}
@media (max-width: 900px) {
  .work, .work:nth-child(even) { grid-template-columns: 1fr; gap: 24px; }
  .work:nth-child(even) .work-media { order: 0; }
  .job { grid-template-columns: 1fr; gap: 8px; padding: 24px 0; }
  .job-desc { grid-column: auto; margin-top: 4px; }
  .ct-row { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 600px) {
  .about { grid-template-columns: 1fr; }
  .about-fig { width: 132px; }
  .groups-list { grid-template-columns: 1fr; }
  .group:nth-child(even) { padding-left: 0; border-left: 0; }
  .group { padding-right: 0; }
  .stats { grid-template-columns: 1fr; row-gap: 0; }
  .stat, .stat:nth-child(odd) { flex-direction: row; align-items: baseline; gap: 16px; padding: 18px 0; border-left: 0; border-top: 1px solid var(--line); }
  .stat-v { min-width: 2.6em; font-size: 44px; }
  .ct-actions, .ct-actions .btn { width: 100%; }
  .work-kpi { font-size: 26px; }
  .foot-row { flex-direction: column; align-items: flex-start; }
}

/* ─── Editor: todo quieto y editable ─── */
html.is-ed .nav { position: sticky; background: var(--bg); box-shadow: 0 1px 0 var(--line); }
html.is-ed .hero { min-height: 0; padding-top: 80px; }
html.is-ed .hero-gl, html.is-ed .hero-hud { display: none; }
html.is-ed .dot::after, html.is-ed .hs-line::after, html.is-ed .logo::after, html.is-ed .ht-3::after, html.is-ed .hint-ic::after,
html.is-ed .term-caret, html.is-ed .ct-big::after { animation: none; }
html.is-ed .groups-list, html.is-ed .stats, html.is-ed .works-list, html.is-ed .exp-list { display: flex; flex-direction: column; }
html.is-ed .stat { padding-left: 0; border-left: 0; }
html.is-ed .work-img { transition: none; }
html.is-ed .meta { display: flex; flex-direction: column; }
html.is-ed .meta-i + .meta-i { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
html.is-ed .hero-in { padding-top: 0; }

@media (prefers-reduced-motion: reduce) {
  .dot::after, .hs-line::after, .logo::after, .ht-3::after, .hint-ic::after, .term-caret, .ct-big::after { animation: none; }
  .nav-in, .in-1, .ht, .in-3, .in-4, .in-5 { animation: none !important; }
}
