/* =========================================================================
   Alejandro Barrera — portal personal
   Estética: EDITORIAL / tipográfica. Sin tarjetas: bandas, líneas y listas.
   Hero cinemático con movimiento. Color SOLO por tokens (:root).
   ========================================================================= */

:root {
  --bg:        #08080b;
  --line:      #23232c;
  --line-soft: #18181f;

  --text:      #f5f5f7;
  --muted:     #9c9caa;
  --faint:     #66666f;

  --a1:        #8b7bff;
  --a2:        #38e0d8;
  --accent:    #9a8cff;
  --grad:      linear-gradient(100deg, var(--a1), var(--a2));

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body:    "Inter", system-ui, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, monospace;

  --maxw: 1180px;
  --gutter: clamp(16px, 4vw, 44px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; overflow-x: hidden; position: relative;
}

/* mesh gradient animado */
.bg-aura {
  position: fixed; inset: -20% -10% auto -10%; height: 130vh; z-index: -2; pointer-events: none;
  background:
    radial-gradient(38% 40% at 78% 12%, color-mix(in srgb, var(--a1) 30%, transparent), transparent 70%),
    radial-gradient(34% 38% at 14% 26%, color-mix(in srgb, var(--a2) 20%, transparent), transparent 70%),
    radial-gradient(30% 34% at 60% 60%, color-mix(in srgb, #ff7ad9 15%, transparent), transparent 70%);
  filter: saturate(125%) blur(8px);
  animation: aura 18s ease-in-out infinite alternate;
}
@keyframes aura {
  0% { transform: translate3d(0,0,0) scale(1); }
  50% { transform: translate3d(-3%,2%,0) scale(1.08); }
  100% { transform: translate3d(4%,-2%,0) scale(1.04); }
}
.grain {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .05; 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='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.cursor-glow {
  position: fixed; top: 0; left: 0; z-index: 0; pointer-events: none;
  width: 540px; height: 540px; border-radius: 50%; transform: translate(-50%,-50%);
  background: radial-gradient(circle, color-mix(in srgb, var(--a1) 18%, transparent), transparent 62%);
  filter: blur(26px); opacity: 0; transition: opacity .4s ease;
}
body:hover .cursor-glow { opacity: .6; }

.shell { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); position: relative; z-index: 1; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.05; letter-spacing: -0.02em; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--a1); color: #fff; }

.kicker { display: inline-block; font-family: var(--font-mono); font-size: .8rem; letter-spacing: .04em; color: var(--accent); margin-bottom: 18px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  font-family: var(--font-display); font-weight: 600; font-size: .95rem;
  padding: .8em 1.45em; border-radius: 999px; cursor: pointer; border: 1px solid transparent;
  transition: transform .12s ease, box-shadow .2s, background .2s, color .2s, border-color .2s; white-space: nowrap;
}
.btn--solid { background: var(--text); color: #0a0a0f; }
.btn--solid:hover { box-shadow: 0 12px 30px -12px rgba(255,255,255,.4); }
.btn--ghost { border-color: var(--line); color: var(--text); }
.btn--ghost:hover { border-color: var(--accent); color: #fff; }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line-soft); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 22px; }
.nav__brand { display: flex; align-items: center; gap: 11px; font-family: var(--font-display); font-weight: 700; }
.nav__mono { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--grad); color: #fff; font-size: .85rem; letter-spacing: -.04em; }
.nav__name { font-size: .98rem; }
.nav__status { display: inline-flex; align-items: center; gap: 6px; margin-left: 6px; font-family: var(--font-mono); font-size: .72rem; color: var(--muted); text-transform: lowercase; }
.nav__status i { width: 7px; height: 7px; border-radius: 50%; background: var(--a2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--a2) 25%, transparent); }
.nav__links { display: flex; gap: 24px; }
.nav__links a { color: var(--muted); font-size: .92rem; font-weight: 450; cursor: pointer; transition: color .2s; }
.nav__links a:hover { color: var(--text); }
.nav__actions { display: flex; align-items: center; gap: 14px; }
.lang { display: inline-flex; align-items: center; gap: 5px; background: none; border: none; color: var(--faint); font-family: var(--font-mono); font-weight: 500; font-size: .82rem; cursor: pointer; }
.lang__opt.is-active { color: var(--accent); }
.lang__sep { color: var(--line); }

/* ---------- HERO cinemático ---------- */
.hero { position: relative; z-index: 1; min-height: calc(100svh - 66px); display: flex; flex-direction: column; justify-content: center; padding-block: clamp(40px, 8vh, 90px); }
.hero__eyebrow { display: inline-flex; align-items: center; gap: 9px; align-self: flex-start; font-family: var(--font-mono); font-size: clamp(.74rem, 1.4vw, .9rem); letter-spacing: .04em; color: var(--muted); padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; opacity: 0; animation: fade-up .8s ease .05s forwards; }
.hero__eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 12px 1px color-mix(in srgb, var(--a2) 70%, transparent); }
.kinetic { margin: clamp(20px, 4vh, 40px) 0 clamp(22px, 3.5vh, 34px); line-height: .9; }
.kin { display: block; overflow: hidden; padding-block: .02em; }
.kin > span { display: block; font-size: clamp(2.1rem, 7vw, 6rem); font-weight: 700; letter-spacing: -.04em; white-space: nowrap; transform: translateY(112%); will-change: transform; animation: rise 1s cubic-bezier(.2,1,.3,1) forwards; }
.kin:nth-child(1) > span { animation-delay: .12s; }
.kin:nth-child(2) > span { animation-delay: .26s; }
.kinetic__accent { background: linear-gradient(100deg, var(--a1), var(--a2) 55%, #ff7ad9); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent; animation: rise 1s cubic-bezier(.2,1,.3,1) .26s forwards, shimmer 6s linear 1.3s infinite; }
@keyframes rise { to { transform: translateY(0); } }
@keyframes shimmer { to { background-position: 200% center; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.hero__lead { max-width: 50ch; color: var(--muted); font-size: clamp(1.02rem, 1.7vw, 1.3rem); opacity: 0; animation: fade-up .8s ease .5s forwards; }
.hero__cta { display: flex; gap: 13px; flex-wrap: wrap; margin-top: clamp(24px, 4vh, 38px); opacity: 0; animation: fade-up .8s ease .62s forwards; }
.scrollcue { position: absolute; bottom: clamp(16px, 4vh, 36px); left: 0; display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); opacity: 0; animation: fade-up .8s ease .9s forwards; }
.scrollcue i { display: block; width: 1px; height: 34px; background: linear-gradient(var(--accent), transparent); position: relative; overflow: hidden; }
.scrollcue i::after { content: ""; position: absolute; top: -34px; left: 0; width: 1px; height: 34px; background: var(--a2); animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { 0% { top: -34px; } 60%,100% { top: 34px; } }

/* ---------- FACTS strip ---------- */
.strip { display: grid; grid-template-columns: repeat(4, 1fr); border-block: 1px solid var(--line); }
.strip__item { display: flex; flex-direction: column; gap: 4px; padding: clamp(26px, 4vw, 40px) clamp(18px, 2.5vw, 32px); border-left: 1px solid var(--line); }
.strip__item:first-child { border-left: none; padding-left: 0; }
.strip__num { font-family: var(--font-display); font-weight: 700; font-size: clamp(2rem, 4.4vw, 3rem); letter-spacing: -.04em; line-height: 1; }
.strip__label { color: var(--faint); font-size: .88rem; }

/* ---------- movements (secciones editoriales) ---------- */
.movement { padding-block: clamp(64px, 11vw, 130px); border-bottom: 1px solid var(--line-soft); }
.movement__head { margin-bottom: clamp(34px, 5vw, 56px); }
.movement__head h2 { font-size: clamp(1.9rem, 4.4vw, 3rem); }
.movement__sub { color: var(--muted); margin-top: 14px; max-width: 60ch; font-size: clamp(.95rem, 1.5vw, 1.05rem); }
.row__new { display: inline-block; vertical-align: middle; margin-left: 12px; font-family: var(--font-mono); font-size: .6rem; letter-spacing: .08em; text-transform: uppercase; color: var(--a2); border: 1px solid color-mix(in srgb, var(--a2) 45%, transparent); border-radius: 999px; padding: 3px 8px; }

/* about manifiesto */
.statement { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.5rem, 3.6vw, 2.7rem); line-height: 1.26; letter-spacing: -.02em; max-width: 30ch; }
.statement::first-line { color: #fff; }

/* ---------- timeline (la operación ya cambió) ---------- */
.timeline { list-style: none; position: relative; padding-left: clamp(96px, 12vw, 150px); }
.timeline::before {
  content: ""; position: absolute; top: 6px; bottom: 6px; left: clamp(66px, 9vw, 112px);
  width: 1px; background: linear-gradient(var(--line), var(--a1) 60%, var(--a2));
}
.tl { position: relative; padding: clamp(18px, 2.6vw, 30px) 0; }
.tl::before {
  content: ""; position: absolute; top: clamp(26px, 3.4vw, 40px); left: calc(clamp(66px, 9vw, 112px) - clamp(96px, 12vw, 150px) - 4.5px);
  width: 10px; height: 10px; border-radius: 50%; background: var(--bg); border: 2px solid var(--faint);
}
.tl__year {
  position: absolute; left: calc(0px - clamp(96px, 12vw, 150px)); top: clamp(22px, 3vw, 34px);
  width: clamp(56px, 8vw, 96px); text-align: right;
  font-family: var(--font-mono); font-size: .85rem; color: var(--faint);
}
.tl__body h3 { font-size: clamp(1.15rem, 2.4vw, 1.6rem); margin-bottom: 8px; }
.tl__body p { color: var(--muted); font-size: .97rem; max-width: 62ch; }
.tl--now::before { background: var(--grad); border-color: transparent; box-shadow: 0 0 18px 2px color-mix(in srgb, var(--a2) 55%, transparent); }
.tl--now .tl__year { color: var(--a2); font-weight: 500; }
.tl--now .tl__body h3 { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tl--now .tl__body p { color: var(--text); }

/* ---------- rutas: fases ---------- */
.fases { list-style: none; display: grid; gap: 14px; margin: 20px 0; }
.fases li { display: grid; gap: 4px; padding-left: 18px; border-left: 2px solid var(--line); }
.fases li:hover { border-left-color: var(--accent); }
.fase__n { font-family: var(--font-mono); font-size: .78rem; letter-spacing: .04em; color: var(--accent); text-transform: uppercase; }
.fases li > span:last-child { color: var(--muted); font-size: .93rem; max-width: 58ch; }
.entry__cta { display: inline-block; margin-top: 18px; font-family: var(--font-display); font-weight: 600; font-size: .95rem; color: var(--accent); transition: color .2s; }
.entry__cta:hover { color: var(--a2); cursor: pointer; }

/* ---------- prueba: cierre ---------- */
.proof__follow { color: var(--muted); margin: clamp(26px, 4vw, 40px) 0 16px; }

/* ---------- listas (certs) ---------- */
.list { list-style: none; }
.row { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; padding: clamp(20px, 2.4vw, 30px) 0; border-top: 1px solid var(--line); transition: padding-left .3s ease; }
.row:last-child { border-bottom: 1px solid var(--line); }
.row__lead { display: inline-flex; align-items: baseline; gap: 18px; }
.row__idx { font-family: var(--font-mono); font-size: .82rem; color: var(--accent); min-width: 42px; }
.row__title { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.15rem, 2.4vw, 1.7rem); letter-spacing: -.02em; }
.row__meta { font-family: var(--font-mono); font-size: .82rem; color: var(--faint); text-align: right; }
.row:hover { padding-left: 14px; }
.row:hover .row__title { color: #fff; }
.row.is-placeholder .row__title, .row.is-placeholder .row__meta { opacity: .6; }
.row__link:hover .row__idx { color: var(--a2); }

/* ---------- skills (flujo de texto) ---------- */
.skills { display: grid; gap: 0; }
.skillrow { display: grid; grid-template-columns: clamp(180px, 22vw, 260px) 1fr; gap: clamp(16px, 3vw, 48px); align-items: baseline; padding: clamp(22px, 2.6vw, 32px) 0; border-top: 1px solid var(--line); }
.skillrow:last-child { border-bottom: 1px solid var(--line); }
.skillrow__cat { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; }
.skillrow__cat::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 3px; background: var(--grad); margin-right: 10px; vertical-align: middle; }
.skillrow__items { font-family: var(--font-mono); font-size: clamp(.95rem, 1.7vw, 1.18rem); color: var(--muted); line-height: 1.7; }

/* ---------- servicios (lista numerada) ---------- */
.list--services { }
.srow { display: grid; grid-template-columns: 64px clamp(200px, 26vw, 320px) 1fr; gap: clamp(16px, 2.5vw, 40px); align-items: baseline; padding: clamp(26px, 3vw, 40px) 0; border-top: 1px solid var(--line); transition: padding-left .3s ease, background .3s ease; }
.srow:last-child { border-bottom: 1px solid var(--line); }
.srow__no { font-family: var(--font-mono); font-size: .85rem; color: var(--faint); }
.srow__title { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.3rem, 2.8vw, 2rem); letter-spacing: -.02em; }
.srow__desc { color: var(--muted); font-size: clamp(.95rem, 1.5vw, 1.05rem); max-width: 52ch; }
.srow:hover { padding-left: 12px; }
.srow:hover .srow__no { color: var(--accent); }
.srow--feature .srow__title { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- proyectos (entradas) ---------- */
.entry { display: grid; grid-template-columns: clamp(150px, 20vw, 230px) 1fr; gap: clamp(20px, 4vw, 60px); padding: clamp(34px, 5vw, 64px) 0; border-top: 1px solid var(--line); }
.entry:last-child { border-bottom: 1px solid var(--line); }
.entry__meta { display: flex; flex-direction: column; gap: 12px; }
.entry__no { font-family: var(--font-mono); font-size: 1rem; color: var(--accent); }
.entry__tag { font-family: var(--font-mono); font-size: .8rem; color: var(--faint); }
.entry__body h3 { font-size: clamp(1.6rem, 3.4vw, 2.6rem); margin-bottom: 18px; }
.entry__body > p { color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.12rem); max-width: 60ch; margin-bottom: 18px; }
.entry__points { font-family: var(--font-mono); font-size: .85rem; color: var(--faint); }

/* ---------- asesoría / planes ---------- */
.list--pricing { margin-top: clamp(28px, 5vw, 44px); }
.list--pricing .row__idx { min-width: 70px; color: var(--accent); }
.row__title .row__sub { display: block; margin-top: 5px; font-family: var(--font-body); font-weight: 400; font-size: .88rem; letter-spacing: 0; color: var(--muted); }
.row__price { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.2rem, 2.4vw, 1.7rem); letter-spacing: -.02em; white-space: nowrap; }
.row:hover .row__price { color: var(--accent); }
.book__cta { margin-top: clamp(32px, 5vw, 48px); }
.book__note { margin-top: 14px; font-family: var(--font-mono); font-size: .78rem; color: var(--faint); }

/* ---------- contacto ---------- */
.movement--contact { border-bottom: none; }
.contact__title { font-size: clamp(2.4rem, 7vw, 5rem); line-height: 1.02; margin-bottom: clamp(36px, 6vw, 60px); }
.contact__title span { display: block; }
.contact__mail { display: block; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; text-decoration: none; transition: opacity .2s; }
.contact__mail:hover { opacity: .8; }
.links { list-style: none; }
.linkrow { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding: clamp(18px, 2.2vw, 26px) 0; border-top: 1px solid var(--line); transition: padding-left .3s ease; }
.links li:last-child .linkrow { border-bottom: 1px solid var(--line); }
.linkrow__k { font-family: var(--font-mono); font-size: .82rem; color: var(--faint); }
.linkrow__v { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.05rem, 2.2vw, 1.5rem); word-break: break-word; text-align: right; transition: color .2s; }
a.linkrow:hover { padding-left: 12px; }
a.linkrow:hover .linkrow__v { color: var(--accent); }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line-soft); }
.footer__inner { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; color: var(--faint); font-size: .86rem; padding-block: 28px; }

/* ---------- fab ---------- */
.fab { position: fixed; right: 20px; bottom: 20px; z-index: 40; background: var(--text); color: #0a0a0f; font-family: var(--font-display); font-weight: 600; font-size: .92rem; padding: .8em 1.4em; border-radius: 999px; box-shadow: 0 16px 40px -14px rgba(0,0,0,.8); opacity: 0; transform: translateY(18px); pointer-events: none; transition: opacity .3s, transform .3s; }
.fab.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.fab:hover { transform: translateY(-3px); }

/* ---------- reveal ---------- */
.reveal { opacity: 0; translate: 0 22px; transition: opacity .6s ease, translate .6s cubic-bezier(.2,1,.3,1); transition-delay: var(--rd, 0s); }
.reveal.in { opacity: 1; translate: 0 0; }

/* ---------- responsive ---------- */
@media (max-width: 820px) {
  .strip { grid-template-columns: repeat(2, 1fr); }
  .strip__item:nth-child(3) { border-left: none; padding-left: 0; }
  .skillrow, .srow, .entry { grid-template-columns: 1fr; gap: 10px; }
  .srow__no { display: none; }
  .row { flex-direction: column; align-items: flex-start; gap: 6px; }
  .row__meta { text-align: left; }
  .nav__links, .nav__status { display: none; }
}
@media (max-width: 480px) {
  .strip { grid-template-columns: 1fr 1fr; }
  .nav__name { display: none; }
  .linkrow { flex-direction: column; align-items: flex-start; gap: 4px; }
  .linkrow__v { text-align: left; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1 !important; translate: none !important; }
  .kin > span { transform: none !important; }
  .hero__eyebrow, .hero__lead, .hero__cta, .scrollcue { opacity: 1 !important; }
  .cursor-glow { display: none; }
}
