/* =========================================================
   Maxi · portafolio isométrico
   ========================================================= */

/* ===== Tokens ===== */
:root {
  --bg: #eef1f7;
  --surface: #ffffff;
  --ink: #1b2140;
  --ink-2: #4c5578;
  --ink-3: #6c7493;
  --line: #d5dbea;
  --grid: rgba(70, 85, 150, .09);

  /* caras de los bloques: t = arriba, l = izquierda, r = derecha */
  --indigo-t: #7b86ff; --indigo-l: #4b56d6; --indigo-r: #343fa6;
  --teal-t:   #5ee0cf; --teal-l:   #2bb5a3; --teal-r:   #1d887b;
  --amber-t:  #ffd27a; --amber-l:  #f2a93b; --amber-r:  #c47f1c;
  --coral-t:  #ff9b8a; --coral-l:  #f2684f; --coral-r:  #c24a35;
  --slate-t:  #e3e7f2; --slate-l:  #b8bfd6; --slate-r:  #8d96b5;

  --on-tint: #10162e;    /* texto sobre ámbar y verde agua */
  --focus: var(--indigo-l);
  --d: 12px;               /* espesor de los bloques */
  --side: #c9d0e3;         /* cara lateral de bloques blancos */
  --side-2: #aab3cf;       /* cara inferior */
  --radius: 6px;
  --head: "Space Grotesk", system-ui, sans-serif;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1222;
    --surface: #181d36;
    --ink: #eef1ff;
    --ink-2: #b3bad6;
    --ink-3: #8f97b8;
    --line: #2a3152;
    --grid: rgba(140, 155, 230, .09);
    --slate-t: #39406a; --slate-l: #2a3052; --slate-r: #1f2440;
    --side: #262c4d;
    --side-2: #1c2140;
    color-scheme: dark;
  }
}

/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  background-color: var(--bg);
  /* grilla isométrica */
  background-image:
    repeating-linear-gradient(30deg, var(--grid) 0 1px, transparent 1px 36px),
    repeating-linear-gradient(150deg, var(--grid) 0 1px, transparent 1px 36px);
  background-attachment: fixed;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { text-wrap: balance; margin: 0; font-family: var(--head); font-weight: 700; letter-spacing: -.025em; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--indigo-t); color: #fff; }
section { isolation: isolate; }

.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: 16px; top: 16px; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { width: auto; height: auto; overflow: visible; clip-path: none; z-index: 100; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 6px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.label { font: 500 13px/1 var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--indigo-l); }
@media (prefers-color-scheme: dark) { .label { color: var(--indigo-t); } }

/* ===== Bloque isométrico (caras laterales con pseudo-elementos) ===== */
.block, .project, .card, .proof, .steps li {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius);
}
.block::before, .project::before, .card::before, .proof::before, .steps li::before {
  /* cara derecha */
  content: ""; position: absolute; z-index: -1;
  top: 0; right: calc(var(--d) * -1); width: var(--d); height: 100%;
  background: var(--fr, var(--side));
  transform: skewY(45deg); transform-origin: left top;
  border-radius: 0 3px 3px 0;
  transition: width .25s ease, right .25s ease;
}
.block::after, .project::after, .card::after, .proof::after, .steps li::after {
  /* cara inferior */
  content: ""; position: absolute; z-index: -1;
  left: 0; bottom: calc(var(--d) * -1); height: var(--d); width: 100%;
  background: var(--fb, var(--side-2));
  transform: skewX(45deg); transform-origin: left top;
  border-radius: 0 0 3px 3px;
  transition: height .25s ease, bottom .25s ease;
}

/* ===== Botones (teclas isométricas) ===== */
.btn {
  --bt: var(--indigo-l); --bs: var(--indigo-r);
  position: relative; display: inline-flex; text-decoration: none;
  font: 600 15px/1 var(--head); letter-spacing: -.01em;
  transition: transform .15s ease;
}
.btn span {
  display: block; padding: 15px 22px; border-radius: 6px;
  background: var(--bt); color: #fff;
  box-shadow: 1px 1px 0 var(--bs), 2px 2px 0 var(--bs), 3px 3px 0 var(--bs), 4px 4px 0 var(--bs), 5px 5px 0 var(--bs), 6px 6px 0 var(--bs);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover span { transform: translate(-2px, -2px); box-shadow: 1px 1px 0 var(--bs), 2px 2px 0 var(--bs), 3px 3px 0 var(--bs), 4px 4px 0 var(--bs), 5px 5px 0 var(--bs), 6px 6px 0 var(--bs), 7px 7px 0 var(--bs), 8px 8px 0 var(--bs); }
.btn:active span { transform: translate(5px, 5px); box-shadow: 1px 1px 0 var(--bs); }
.btn--ghost { --bt: var(--surface); --bs: var(--side-2); }
.btn--ghost span { color: var(--ink); outline: 1.5px solid var(--line); outline-offset: -1.5px; }
.btn--sm span { padding: 10px 15px; font-size: 14px; box-shadow: 1px 1px 0 var(--bs), 2px 2px 0 var(--bs), 3px 3px 0 var(--bs), 4px 4px 0 var(--bs); }
.btn--big span { padding: 19px 28px; font-size: 17px; }

/* ===== Nav ===== */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav__in { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.brand { display: flex; align-items: center; gap: 10px; font: 700 21px/1 var(--head); letter-spacing: -.03em; text-decoration: none; }
.brand__cube { width: 30px; height: 30px; transition: transform .5s cubic-bezier(.34,1.6,.6,1); }
.brand:hover .brand__cube { transform: translateY(-4px) rotate(0deg); }
.nav__links { display: flex; align-items: center; gap: 28px; font-size: 15px; }
.nav__links a:not(.btn) { text-decoration: none; color: var(--ink-2); transition: color .2s; }
.nav__links a:not(.btn):hover { color: var(--ink); }

/* ===== Hero ===== */
.hero { padding: clamp(40px, 7vw, 88px) 0 clamp(56px, 8vw, 96px); }
.hero__in { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.eyebrow { font: 500 13px/1 var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--ink-2); display: inline-flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; width: 12px; height: 12px; background: var(--teal-l); transform: rotate(30deg) skewX(-30deg) scaleY(.86); }
.hero h1 { margin-top: 22px; font-size: clamp(40px, 5.6vw, 76px); line-height: 1.02; }
.hl {
  position: relative; white-space: nowrap; color: var(--indigo-l);
  background: linear-gradient(transparent 62%, color-mix(in srgb, var(--amber-t) 75%, transparent) 62%);
}
@media (prefers-color-scheme: dark) { .hl { color: var(--indigo-t); background: linear-gradient(transparent 62%, color-mix(in srgb, var(--amber-l) 45%, transparent) 62%); } }
.hero__lead { margin-top: 24px; max-width: 54ch; font-size: clamp(17px, 1.5vw, 19px); color: var(--ink-2); }
.hero__cta { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 16px; }

/* Escena isométrica con capturas apiladas */
.scene { position: relative; height: clamp(360px, 42vw, 540px); overflow-x: clip; }
.scene__iso {
  position: absolute; left: 50%; top: 50%;
  width: 380px; height: 238px; margin: -119px 0 0 -190px;
  transform: scale(var(--k, 1)) rotateX(58deg) rotateZ(-42deg);
  transform-style: preserve-3d;
}
.plate {
  position: absolute; inset: 0; border-radius: 8px;
  transform-style: preserve-3d;
}
.plate img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 8px; }
.plate--floor {
  inset: -40px; border-radius: 14px;
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 30px 30px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 30px 30px,
    var(--surface);
  box-shadow: 1px 1px 0 var(--side), 2px 2px 0 var(--side), 3px 3px 0 var(--side), 4px 4px 0 var(--side), 5px 5px 0 var(--side), 6px 6px 0 var(--side), 7px 7px 0 var(--side), 8px 8px 0 var(--side-2), 9px 9px 0 var(--side-2), 10px 10px 0 var(--side-2);
  transform: translateZ(0);
}
.plate--1, .plate--2, .plate--3 {
  --e: var(--slate-r);
  box-shadow: 1px 1px 0 var(--e), 2px 2px 0 var(--e), 3px 3px 0 var(--e), 4px 4px 0 var(--e), 5px 5px 0 var(--e), 6px 6px 0 var(--e), 22px 26px 40px rgba(20, 30, 80, .25);
  animation: float 6s ease-in-out infinite;
}
.plate--1 { --z: 40px;  --e: var(--coral-r);  transform: translateZ(var(--z)); }
.plate--2 { --z: 120px; --e: var(--amber-r);  transform: translateZ(var(--z)); animation-delay: -2s; }
.plate--3 { --z: 200px; --e: var(--indigo-r); transform: translateZ(var(--z)); animation-delay: -4s; }
@keyframes float {
  0%, 100% { transform: translateZ(var(--z)); }
  50% { transform: translateZ(calc(var(--z) + 14px)); }
}
/* Al pasar el mouse: la pila se endereza y muestra una captura por vez */
.scene { cursor: pointer; }
.scene__iso { transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.plate { transition: transform .8s cubic-bezier(.2,.8,.2,1), opacity .6s ease; }
.plate--floor, .scene__tag { transition: opacity .4s ease; }
.scene.is-viewing .scene__iso { transform: scale(calc(var(--k, 1) * 1.15)) rotateX(0deg) rotateZ(0deg) !important; transition-duration: .9s; }
.scene.is-viewing .plate--floor, .scene.is-viewing .scene__tag { opacity: 0; }
.scene.is-viewing .plate--1, .scene.is-viewing .plate--2, .scene.is-viewing .plate--3 {
  animation: none; opacity: 0; transform: translate3d(48px, 0, 0);
}
.scene.is-viewing .plate.is-prev { transform: translate3d(-48px, 0, 0); }
.scene.is-viewing .plate.is-active { opacity: 1; transform: translate3d(0, 0, 2px); }
.scene__dots { position: absolute; left: 50%; bottom: 6%; translate: -50% 0; display: flex; gap: 8px; opacity: 0; transition: opacity .4s; }
.scene.is-viewing .scene__dots { opacity: 1; }
.scene__dots span { width: 10px; height: 10px; background: var(--line); transform: rotate(30deg) skewX(-30deg) scaleY(.86); transition: background .3s; }
.scene__dots span.is-on { background: var(--indigo-l); }
.scene__tag {
  position: absolute; z-index: 2;
  font: 500 12.5px/1 var(--mono); text-transform: uppercase; letter-spacing: .06em;
  padding: 8px 11px; border-radius: 5px; color: #fff;
  box-shadow: 3px 3px 0 rgba(0,0,0,.18);
}
.scene__tag::before { content: ""; position: absolute; top: 50%; width: 34px; height: 1.5px; background: currentColor; opacity: .0; }
.scene__tag--a { left: 6%;  bottom: 34%; background: var(--coral-r); }
.scene__tag--b { right: 2%; top: 44%;    background: var(--amber-l); color: var(--on-tint); }
.scene__tag--c { left: 8%;  top: 10%;    background: var(--indigo-l); }

/* Prueba 3% → 18% */
.proof {
  --fr: var(--side); margin-top: clamp(40px, 6vw, 72px);
  display: grid; grid-template-columns: minmax(200px, 300px) 1fr; gap: clamp(20px, 4vw, 48px); align-items: center;
  padding: clamp(22px, 3vw, 34px) clamp(22px, 4vw, 44px);
  border: 1px solid var(--line);
}
.proof__art svg { width: 100%; height: auto; }
.proof__num { margin: 12px 0 10px; font: 700 clamp(48px, 6vw, 80px)/1 var(--head); letter-spacing: -.04em; }
.proof__num span:first-child { color: var(--coral-l); }
.proof__num .arrow { color: var(--ink-3); font-size: .55em; }
.proof__num strong { color: var(--teal-l); }
.proof p:last-child { color: var(--ink-2); max-width: 56ch; }

/* ===== Secciones ===== */
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 32px; margin-bottom: clamp(40px, 5vw, 60px); }
.section-head .label { width: 100%; }
h2 { font-size: clamp(34px, 4.6vw, 60px); line-height: 1.04; max-width: 20ch; }

/* ===== Qué hago ===== */

/* ===== Proyectos ===== */
.projects { padding: clamp(64px, 9vw, 112px) 0; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  font: 500 14px/1 var(--mono); color: var(--ink-2); cursor: pointer;
  padding: 11px 16px; border-radius: 5px; border: 1px solid var(--line); background: var(--surface);
  box-shadow: 1px 1px 0 var(--side), 2px 2px 0 var(--side), 3px 3px 0 var(--side);
  transition: transform .15s, box-shadow .15s, background .15s, color .15s;
}
.chip:hover { color: var(--ink); transform: translate(-1px, -1px); }
.chip.is-active { background: var(--indigo-l); color: #fff; border-color: var(--indigo-l); box-shadow: 1px 1px 0 var(--indigo-r), 2px 2px 0 var(--indigo-r), 3px 3px 0 var(--indigo-r); transform: translate(2px, 2px); }

.project {
  --fr: var(--cd); --fb: color-mix(in srgb, var(--cd) 80%, #000);
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); align-items: center;
  padding: clamp(22px, 3vw, 38px);
  border: 1px solid var(--line); margin-bottom: 48px;
}
.project--flip .project__media { order: 2; }
.project__media {
  display: grid; place-items: center; min-height: 340px; border-radius: 4px; padding: 20px;
  background:
    repeating-linear-gradient(30deg, var(--grid) 0 1px, transparent 1px 24px),
    repeating-linear-gradient(150deg, var(--grid) 0 1px, transparent 1px 24px),
    color-mix(in srgb, var(--c) 14%, var(--surface));
  perspective: 1600px;
}
.project__body h3, .card__body h3 { font-size: clamp(28px, 2.8vw, 38px); line-height: 1.05; margin: 14px 0 4px; }
.card__body h3 { font-size: clamp(24px, 2.2vw, 30px); }
.project__meta { display: flex; align-items: center; justify-content: space-between; }
.num { font: 500 13px/1 var(--mono); color: var(--ink-3); }

/* Captura inclinada en isométrico; se endereza al pasar el mouse */
.tilt {
  --e: var(--cd);
  width: 82%; transform: rotateX(52deg) rotateZ(-38deg) scale(.95);
  transform-style: preserve-3d; transition: transform .6s cubic-bezier(.22,1,.36,1);
}
.tilt img {
  width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-radius: 6px;
  box-shadow: 1px 1px 0 var(--e), 2px 2px 0 var(--e), 3px 3px 0 var(--e), 4px 4px 0 var(--e), 5px 5px 0 var(--e), 6px 6px 0 var(--e), 7px 7px 0 var(--e), 8px 8px 0 var(--e), 30px 34px 40px rgba(20, 30, 80, .22);
}
.project:hover .tilt, .card:hover .tilt, .tilt:focus-within { transform: none; }

.status {
  display: inline-flex; align-items: center; gap: 8px;
  font: 500 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .06em;
  padding: 7px 10px; border-radius: 4px; color: var(--ink-2); background: color-mix(in srgb, var(--s) 18%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--s) 45%, transparent);
}
.status::before { content: ""; width: 9px; height: 9px; background: var(--s); transform: rotate(30deg) skewX(-30deg) scaleY(.86); }
.status--live { --s: var(--teal-l); }
.status--dev { --s: var(--amber-l); }
.status--demo { --s: var(--coral-l); }
.status--proto { --s: var(--indigo-l); }

.stack { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.stack li { font: 400 12.5px/1 var(--mono); padding: 7px 10px; border-radius: 4px; background: var(--bg); border: 1px solid var(--line); color: var(--ink-2); }

/* Chat de Fer */

/* Grilla */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 40px; }
.card {
  --fr: var(--cd); --fb: color-mix(in srgb, var(--cd) 80%, #000);
  display: flex; flex-direction: column; border: 1px solid var(--line);
  transition: transform .25s ease;
}
.card:hover { transform: translate(-4px, -4px); --d: 16px; }
.card__media {
  display: grid; place-items: center; height: 260px; overflow: hidden; perspective: 1400px;
  border-radius: var(--radius) var(--radius) 0 0; border-bottom: 1px solid var(--line);
  background:
    repeating-linear-gradient(30deg, var(--grid) 0 1px, transparent 1px 22px),
    repeating-linear-gradient(150deg, var(--grid) 0 1px, transparent 1px 22px),
    color-mix(in srgb, var(--c) 16%, var(--surface));
}
.card__media .tilt { width: 72%; }

.card__body { padding: 22px clamp(20px, 2.6vw, 28px) 26px; display: flex; flex-direction: column; flex: 1; }

/* Problema / armé / resultado */
.psr { margin: 16px 0 0; display: grid; gap: 10px; }
.psr > div { display: grid; grid-template-columns: 108px 1fr; gap: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }
.psr dt { font: 500 12px/1.9 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.psr dd { margin: 0; font-size: 15.5px; color: var(--ink-2); }
.psr > div:last-child dt { color: var(--teal-l); }
.psr > div:last-child dd { color: var(--ink); font-weight: 500; }
.link {
  align-self: flex-start; display: inline-block; margin-top: 18px;
  font: 500 14px/1 var(--mono); text-decoration: none; color: var(--ink);
  padding: 9px 12px; border-radius: 4px; border: 1px solid var(--line); background: var(--bg);
  box-shadow: 1px 1px 0 var(--cd), 2px 2px 0 var(--cd), 3px 3px 0 var(--cd);
  transition: transform .15s;
}
.link:hover { transform: translate(-2px, -2px); }
.is-hidden, [hidden] { display: none !important; }

/* Pendientes de confirmar */
.todo {
  background: #fff1a8; color: #5a4a00;
  padding: 1px 6px; border-radius: 4px;
  font: 500 .84em/1.6 var(--mono);
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}

/* ===== Sobre mí ===== */
.about { padding: clamp(64px, 9vw, 112px) 0; }
.about__in { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(36px, 6vw, 88px); }
.about h2 { margin-top: 18px; }
.about__text { margin-top: 26px; display: grid; gap: 16px; color: var(--ink-2); max-width: 54ch; }
.about__hl { color: var(--ink); padding-left: 16px; border-left: 4px solid var(--amber-l); font-weight: 500; }
.timeline { margin-top: 30px; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0; }
.timeline li {
  position: relative; font: 500 13px/1.2 var(--mono); color: #fff;
  padding: 12px 14px; margin-right: 22px;
  background: var(--t); box-shadow: 1px 1px 0 var(--r), 2px 2px 0 var(--r), 3px 3px 0 var(--r), 4px 4px 0 var(--r), 5px 5px 0 var(--r);
  border-radius: 4px;
}
.timeline li::after { content: "→"; position: absolute; right: -19px; top: 50%; translate: 0 -50%; color: var(--ink-3); }
.timeline li:last-child::after { content: none; }
.timeline li:nth-child(1) { --t: var(--slate-r); --r: color-mix(in srgb, var(--slate-r) 70%, #000); }
.timeline li:nth-child(2) { --t: var(--teal-l); --r: var(--teal-r); margin-bottom: 8px; color: var(--on-tint); }
.timeline li:nth-child(3) { --t: var(--indigo-l); --r: var(--indigo-r); margin-bottom: 16px; }

.steps { margin-top: 22px; display: grid; gap: 30px; }
.steps li {
  display: grid; grid-template-columns: 92px 1fr; gap: 18px; align-items: end;
  padding: 16px 22px 18px 16px; border: 1px solid var(--line);
  transition: transform .2s;
}
.steps li:nth-child(2) { margin-left: 4%; }
.steps li:nth-child(3) { margin-left: 8%; }
.steps li:nth-child(4) { margin-left: 12%; }
.steps li:hover { transform: translate(-3px, -3px); }
.steps__art { display: flex; align-items: flex-end; justify-content: center; height: 96px; }
.steps__art svg { width: 70px; height: auto; max-height: 96px; }
.steps__n { font: 500 12px/1 var(--mono); color: var(--ink-3); }
.steps h3 { margin-top: 6px; font-size: 21px; }
.steps p { font-size: 15.5px; margin-top: 4px; color: var(--ink-2); }

/* ===== Contacto ===== */
.contact { padding: clamp(64px, 9vw, 120px) 0; }
.contact__in { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center; }
.contact__title { margin-top: 18px; font-size: clamp(44px, 6.4vw, 92px); line-height: .98; max-width: 12ch; }
.contact__lead { margin-top: 22px; font-size: clamp(18px, 1.8vw, 21px); color: var(--ink-2); }
.contact__links { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 18px; }
.contact__art svg { width: 100%; max-width: 360px; height: auto; margin-inline: auto; animation: bob 5s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-12px); } }
.socials { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 22px; font: 500 14px/1 var(--mono); }
.socials a { color: var(--ink-2); text-decoration: none; }
.socials a:hover { color: var(--indigo-l); }

.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 28px 0 40px; border-top: 1px solid var(--line); font: 400 14px/1.4 var(--mono); color: var(--ink-3); }

/* ===== Aparición ===== */
.reveal { opacity: 0; translate: 0 20px; transition: opacity .7s ease, translate .7s ease; }
.reveal.is-in { opacity: 1; translate: 0 0; }
.no-js .reveal { opacity: 1; translate: 0 0; }

/* ===== Logo ===== */
.brand__logo { width: 52px; height: 38px; flex: none; }
.hero__for { margin-top: 14px; font: 500 13px/1.5 var(--mono); color: var(--ink-3); letter-spacing: .02em; }

/* ===== 01 · Por qué ahora ===== */
.why { padding: clamp(64px, 9vw, 112px) 0 0; }
.why__in { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.why h2 { margin-top: 18px; }
.why__card { display: grid; grid-template-columns: 150px 1fr; gap: 26px; align-items: center; padding: clamp(22px, 3vw, 34px); border: 1px solid var(--line); }
.why__art svg { width: 100%; height: auto; }
.why__text { display: grid; gap: 14px; color: var(--ink-2); font-size: 16.5px; }
.why__hl { color: var(--ink); font-weight: 500; padding-left: 16px; border-left: 4px solid var(--coral-l); }

/* ===== 02 · Cómo trabajo ===== */
.how { padding: clamp(64px, 9vw, 112px) 0; }
.how__in { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(36px, 5vw, 72px); align-items: start; }
.how .steps { margin-top: 0; }
.how__lists { display: grid; gap: 36px; }
.list-card { padding: 24px 26px 26px; border: 1px solid var(--line); --fr: var(--teal-r); --fb: color-mix(in srgb, var(--teal-r) 80%, #000); }
.list-card--aside { --fr: var(--side); --fb: var(--side-2); background: color-mix(in srgb, var(--bg) 55%, var(--surface)); }
.checks { margin-top: 16px; display: grid; gap: 10px; }
.checks li { display: grid; grid-template-columns: 18px 1fr; gap: 10px; align-items: baseline; font-size: 15.5px; color: var(--ink); }
.checks li::before { content: ""; width: 10px; height: 10px; background: var(--teal-l); transform: translateY(-1px) rotate(30deg) skewX(-30deg) scaleY(.86); }
.checks--off li { color: var(--ink-2); }
.checks--off li::before { background: var(--slate-r); }
.list-card__note { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 14.5px; color: var(--ink-2); }

/* ===== 03 · Calculadora ===== */
.calc-sec { padding: clamp(32px, 5vw, 64px) 0 clamp(64px, 9vw, 112px); }
.calc {
  --fr: var(--amber-r); --fb: color-mix(in srgb, var(--amber-r) 80%, #000);
  display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(28px, 4vw, 56px);
  padding: clamp(22px, 3.5vw, 44px); border: 1px solid var(--line);
}
.calc__form { min-width: 0; grid-template-columns: minmax(0, 1fr); display: grid; gap: 22px; align-content: start; }
.field label { display: block; font: 500 12.5px/1.3 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); margin-bottom: 10px; }
.field__box {
  display: flex; align-items: center; gap: 8px; padding: 0 16px;
  background: var(--bg); border: 1.5px solid var(--ink-3); border-radius: 6px;
  box-shadow: 1px 1px 0 var(--side), 2px 2px 0 var(--side), 3px 3px 0 var(--side), 4px 4px 0 var(--side);
  transition: border-color .2s;
}
.field__box:focus-within { border-color: var(--indigo-l); outline: 2px solid var(--focus); outline-offset: 3px; }
.field__box--sm { max-width: 170px; }
.field__fix { font: 600 22px/1 var(--head); color: var(--ink-3); }
.field input {
  flex: 1; min-width: 0; width: 100%; padding: 14px 0; border: 0; background: transparent; outline: none;
  font: 700 clamp(24px, 2.6vw, 30px)/1 var(--head); letter-spacing: -.02em; color: var(--ink);
  -moz-appearance: textfield;
}
.field input::-webkit-outer-spin-button, .field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.calc__help { font-size: 14px; color: var(--ink-3); }
.calc__out { display: grid; gap: 22px; align-content: start; }
.calc__big { margin: 10px 0 2px; font: 700 clamp(38px, 5vw, 64px)/1 var(--head); letter-spacing: -.04em; color: var(--coral-l); overflow-wrap: anywhere; }
.calc__sub { color: var(--ink-2); }
.calc__opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: end; }
.calc__opts li {
  display: grid; justify-items: center; gap: 6px; text-align: center;
  padding: 14px 8px 16px; border-radius: 6px; border: 1px solid var(--line);
  background: color-mix(in srgb, var(--teal-t) 12%, var(--surface));
}
.calc__opts svg { width: 52px; height: auto; }
.calc__pct { font: 500 13px/1 var(--mono); color: var(--ink-2); }
.calc__save { font: 700 clamp(16px, 1.7vw, 21px)/1.1 var(--head); color: var(--teal-r); letter-spacing: -.02em; overflow-wrap: anywhere; }
@media (prefers-color-scheme: dark) { .calc__save { color: var(--teal-t); } }
.calc__legend { font-size: 14px; color: var(--ink-2); }
.calc__foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; padding-top: 22px; border-top: 1px dashed var(--line); }
.calc__note { max-width: 62ch; font-size: 14px; color: var(--ink-3); }

/* ===== Proyectos: extras ===== */
.links { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: auto; }
.card__media--art svg { width: auto; height: 150px; transition: transform .4s cubic-bezier(.34,1.6,.6,1); }
.card:hover .card__media--art svg { transform: translateY(-8px); }

/* ===== Sobre mí: extras ===== */
.about__cred { font: 500 14px/1.6 var(--mono); color: var(--ink-2); }
.creds { margin-top: 8px; padding-top: 18px; border-top: 1px dashed var(--line); --cd: var(--amber-r); }
.creds ul { margin-top: 14px; display: grid; gap: 14px; }
.creds li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 18px; }
.creds li div { display: grid; gap: 4px; flex: 1 1 260px; }
.creds strong { color: var(--ink); font-weight: 600; font-size: 16px; line-height: 1.35; }
.creds span { font: 400 13px/1.4 var(--mono); color: var(--ink-3); }
.creds .link { margin-top: 0; align-self: center; }
.about__side { align-self: center; }
.about__card { padding: 26px 28px 28px; border: 1px solid var(--line); }
.about__card .timeline { margin-top: 20px; }
.about__stat { margin-top: 26px; padding-top: 16px; border-top: 1px dashed var(--line); color: var(--ink-2); }
.about__stat strong { display: block; font: 700 clamp(34px, 4vw, 48px)/1 var(--head); letter-spacing: -.03em; color: var(--indigo-l); margin-bottom: 6px; }

/* ===== Testimonios (oculto hasta tener reales) ===== */
.testimonials { padding: clamp(64px, 9vw, 112px) 0 0; }
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; }
.quote { padding: 24px 26px; border: 1px solid var(--line); }
.quote blockquote { margin: 0; font-size: 17px; }
.quote__who { margin-top: 16px; font: 400 13px/1.4 var(--mono); color: var(--ink-3); }

/* ===== Contacto / pie: extras ===== */
.wa-todo { margin-top: 16px; }
.footer__brand { display: inline-flex; align-items: center; gap: 10px; }
.footer__brand .brand__logo { width: 27px; height: 20px; }

/* WhatsApp flotante (solo celular) */
.wa-float {
  position: fixed; right: 16px; bottom: 18px; z-index: 60;
  display: none; place-items: center; width: 56px; height: 56px; border-radius: 12px;
  background: var(--teal-r); color: #fff;
  box-shadow: 1px 1px 0 var(--teal-r), 2px 2px 0 var(--teal-r), 3px 3px 0 var(--teal-r), 4px 4px 0 var(--teal-r), 5px 5px 0 var(--teal-r);
  transition: opacity .25s, transform .25s;
}
.wa-float svg { width: 30px; height: 30px; }
.wa-float:active { transform: translate(4px, 4px); box-shadow: 1px 1px 0 var(--teal-r); }
.wa-float.is-off { opacity: 0; pointer-events: none; transform: translateY(12px); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1 !important; translate: 0 0 !important; transform: none; transition: none !important; }
  .plate, .contact__art svg { animation: none !important; }
}

/* ===== Responsive ===== */
@media (max-width: 1000px) {
  .hero__in { grid-template-columns: minmax(0, 1fr); }
  .scene { height: 420px; }
  .project { grid-template-columns: minmax(0, 1fr); }
  .project--flip .project__media { order: 0; }
  .about__in, .contact__in { grid-template-columns: 1fr; }
  
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  :root { --d: 9px; }
  .nav__links a:not(.btn) { display: none; }
  .scene { height: 300px; margin-top: 44px; }
  .scene__iso { --k: .66; }
  .proof { grid-template-columns: 1fr; }
  .proof__art { max-width: 240px; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .project__media { min-height: 240px; padding: 14px; }
  .card__media { height: 210px; }
  .psr > div { grid-template-columns: 1fr; gap: 2px; }
  .steps li { grid-template-columns: 64px 1fr; margin-left: 0 !important; }
  .steps__art svg { width: 52px; }
  .contact__art { max-width: 240px; }
  .contact__links .btn, .contact__links .btn span { width: 100%; text-align: center; }
}

@media (max-width: 1000px) {
  .why__in, .how__in { grid-template-columns: 1fr; }
  .calc { grid-template-columns: minmax(0, 1fr); }
  .quotes { grid-template-columns: 1fr; max-width: 560px; }
}
@media (max-width: 720px) {
  .why__card { grid-template-columns: 1fr; }
  .why__art { max-width: 130px; }
  .calc__opts { gap: 8px; }
  .calc__opts svg { width: 40px; }
  .calc__save { font-size: 14.5px; white-space: nowrap; overflow-wrap: normal; letter-spacing: -.03em; }
  .calc__opts li { padding-inline: 4px; }
  .calc__foot .btn, .calc__foot .btn span { width: 100%; text-align: center; }
  .wa-float { display: grid; }
  body { padding-bottom: 72px; }
  .card__media--art svg { height: 120px; }
}
/* ===== Movimiento ===== */
/* El espesor de los bloques se puede animar */
@property --d { syntax: '<length>'; inherits: true; initial-value: 12px; }

/* Los bloques "se arman" al aparecer: bajan a su lugar y les crece el espesor */
.reveal {
  transition: opacity .7s ease, translate .8s cubic-bezier(.2,.8,.2,1), transform .25s ease, --d .5s ease .35s;
}
:is(.project, .card, .proof, .block, .steps li).reveal:not(.is-in) { --d: 0px; translate: -14px -18px; }

/* Título: el resaltado se dibuja de izquierda a derecha */
.hl { background-size: 0% 100%; background-repeat: no-repeat; animation: hl-draw .9s cubic-bezier(.2,.8,.2,1) .7s forwards; }
@keyframes hl-draw { to { background-size: 100% 100%; } }

/* Capturas de proyectos: flotan suave */
.tilt { animation: drift 7s ease-in-out infinite; }
.grid .card:nth-child(2n) .tilt { animation-delay: -3.5s; }
@keyframes drift { 50% { translate: 0 -8px; } }
.card__media--art svg { animation: drift 6s ease-in-out infinite; }

/* Estado "En uso / En línea": late */
.status--live::before { animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; scale: .7; } }

/* Listas que entran de a un ítem */
.checks li, .timeline li, .psr > div, .calc__opts li, .stack li {
  opacity: 0; translate: -10px 0;
  transition: opacity .45s ease, translate .45s cubic-bezier(.2,.8,.2,1);
  transition-delay: calc(var(--i, 0) * 70ms + .25s);
}
.is-in .checks li, .is-in .timeline li, .is-in .psr > div, .is-in .calc__opts li, .is-in .stack li,
.no-js .checks li, .no-js .timeline li, .no-js .psr > div, .no-js .calc__opts li, .no-js .stack li { opacity: 1; translate: 0 0; }

/* Al filtrar proyectos, las tarjetas caen en su lugar */
.is-pop { animation: pop .5s cubic-bezier(.2,.8,.2,1) both; }
@keyframes pop { from { opacity: 0; translate: -10px -16px; } }

/* El número de la calculadora salta al cambiar */
.calc__big.is-bump { animation: bump .35s ease; }
@keyframes bump { 40% { scale: 1.04; } }

/* Iconos de "Lo que dejo listo" giran un poco al pasar el mouse */
.list-card:hover .checks li::before { transform: translateY(-1px) rotate(90deg) skewX(-30deg) scaleY(.86); transition: transform .4s; }

@media (prefers-reduced-motion: reduce) {
  .hl { animation: none; background-size: 100% 100%; }
  .tilt, .card__media--art svg, .status--live::before { animation: none; }
  .checks li, .timeline li, .psr > div, .calc__opts li, .stack li { opacity: 1; translate: 0 0; transition: none; }
  :is(.project, .card, .proof, .block, .steps li).reveal { --d: 12px; }
}

.reveal.is-settled { transition: opacity .7s ease, translate .8s cubic-bezier(.2,.8,.2,1), transform .25s ease, --d .25s ease; }

/* ===== Carrusel de capturas (una por vez, cambia cada 3 s) ===== */
.flip { position: relative; width: 100%; height: 100%; min-height: inherit; display: grid; place-items: center; }
.flip__slide {
  grid-area: 1 / 1; position: relative; margin: 0; width: 86%;
  opacity: 0; translate: 48px 0; pointer-events: none;
  transition: opacity .6s ease, translate .8s cubic-bezier(.2,.8,.2,1);
}
.flip__slide.is-active { opacity: 1; translate: 0 0; pointer-events: auto; }
.flip__slide.is-prev { translate: -48px 0; }
.card__media .flip .tilt, .flip .tilt { width: 100%; }
.flip__tag { left: 2%; bottom: 4%; z-index: 3; padding: 6px 9px; font-size: 11px; transition: opacity .3s; }
.project:hover .flip__tag, .card:hover .flip__tag { opacity: 0; }
.flip__dots { position: absolute; left: 50%; bottom: 10px; translate: -50% 0; display: flex; gap: 8px; z-index: 3; }
.flip__dots span { width: 9px; height: 9px; background: color-mix(in srgb, var(--ink-3) 45%, transparent); transform: rotate(30deg) skewX(-30deg) scaleY(.86); transition: background .3s; }
.flip__dots span.is-on { background: var(--indigo-l); }
.card__media:has(.flip) { height: 290px; }
.card__media .flip__slide { width: 78%; }
.flip__dots { translate: -50% 0; transform: translateZ(80px); }
@media (max-width: 720px) {
  .flip__slide { width: 86%; }
  .card__media .flip__slide { width: 84%; }
  .project__media:has(.flip) { min-height: 280px; padding: 8px; }
  .card__media:has(.flip) { height: 260px; }
}
@media (prefers-reduced-motion: reduce) { .flip__slide { translate: 0 0 !important; transition: opacity .3s; } }

/* Celular: la captura se levanta al pasar por el centro de la pantalla */
.is-lifted .tilt { transform: none; }
.is-lifted .flip__tag { opacity: 0; }

/* Destellos que recorren las líneas de la grilla del fondo */
:root { --glow: 75, 86, 214; --glow-a: .55; }
@media (prefers-color-scheme: dark) { :root { --glow: 140, 150, 255; --glow-a: .75; } }
.grid-glow { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }

/* ===== Página de privacidad ===== */
.footer a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.footer a:hover { color: var(--indigo-l); }
.legal { padding: clamp(40px, 7vw, 88px) 0 clamp(56px, 8vw, 96px); }
.legal__in { max-width: 820px; }
.legal__head h1 { margin-top: 18px; font-size: clamp(38px, 5vw, 64px); line-height: 1.04; }
.legal__date { margin-top: 14px; font: 500 13px/1.4 var(--mono); color: var(--ink-3); }
.legal__lead { margin-top: 18px; font-size: clamp(17px, 1.5vw, 19px); color: var(--ink-2); max-width: 56ch; }
.legal__body { margin-top: clamp(32px, 4vw, 48px); padding: clamp(22px, 4vw, 44px); border: 1px solid var(--line); --fr: var(--indigo-r); --fb: color-mix(in srgb, var(--indigo-r) 80%, #000); }
.legal__body h2 { font-size: clamp(21px, 2vw, 25px); line-height: 1.2; margin: 34px 0 10px; max-width: none; }
.legal__body h2:first-child { margin-top: 0; }
.legal__body p, .legal__body li { color: var(--ink-2); font-size: 16px; max-width: 70ch; }
.legal__body p + p { margin-top: 12px; }
.legal__body strong { color: var(--ink); }
.legal__body a { color: var(--indigo-l); text-underline-offset: 3px; }
.legal__body ul { display: grid; gap: 10px; margin: 10px 0 12px; }
.legal__body li { position: relative; padding-left: 26px; }
.legal__body li::before { content: ""; position: absolute; left: 4px; top: .62em; width: 9px; height: 9px; background: var(--indigo-l); transform: rotate(30deg) skewX(-30deg) scaleY(.86); }
.legal__note { margin-top: 16px !important; padding: 14px 16px; border-left: 4px solid var(--amber-l); background: color-mix(in srgb, var(--amber-t) 14%, var(--surface)); font-size: 14px !important; border-radius: 4px; }
.legal__back { margin-top: 40px; }

/* ===== Contraste en modo oscuro ===== */
@media (prefers-color-scheme: dark) {
  :root { --focus: var(--indigo-t); }
  .legal__body a, .about__stat strong { color: var(--indigo-t); }
  .hl { color: #c3c9ff; background-image: linear-gradient(transparent 62%, color-mix(in srgb, var(--amber-l) 30%, transparent) 62%); }
}
/* Etiquetas sobre verde agua: texto oscuro */
.flip__tag.is-tint { color: var(--on-tint); }

/* Proyecto destacado después de la grilla */
.project--after { margin: 48px 0 0; }

/* ===== 06 · Trabajo con equipos ===== */
.teams { padding: clamp(64px, 9vw, 112px) 0 0; }
.teams__in { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.teams h2 { margin-top: 18px; }
.teams__card { padding: clamp(22px, 3vw, 34px); border: 1px solid var(--line); display: grid; gap: 14px; color: var(--ink-2); font-size: 16.5px;
  --fr: var(--teal-r); --fb: color-mix(in srgb, var(--teal-r) 80%, #000); }
.teams__hl { color: var(--ink); font-weight: 500; padding-left: 16px; border-left: 4px solid var(--teal-l); }
.teams__links { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 8px; }

/* Contacto: LinkedIn, mail y CV */
.contact__more { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 14px; }
@media (max-width: 1000px) { .teams__in { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px) {
  .contact__more .btn, .contact__more .btn span { width: 100%; text-align: center; }
  .contact__more li { flex: 1 1 100%; }
}

/* Email que se muestra al tocar el botón */
.contact__more li { position: relative; }
.btn.is-shown span { user-select: all; }
.mail-tip { position: absolute; left: 50%; top: -26px; translate: -50% 0; font: 500 12px/1 var(--mono); color: var(--on-tint); background: var(--teal-l); padding: 5px 8px; border-radius: 4px; white-space: nowrap; }

/* Aviso de cookies (solo aparece cuando Analytics está conectado) */
.consent {
  position: fixed; left: 16px; bottom: 16px; z-index: 70; max-width: 420px;
  padding: 18px 20px; border: 1px solid var(--line); display: grid; gap: 14px;
  font-size: 15px; color: var(--ink-2); --fr: var(--indigo-r); --fb: color-mix(in srgb, var(--indigo-r) 80%, #000);
}
.consent a { color: var(--indigo-l); }
.consent__btns { display: flex; flex-wrap: wrap; gap: 12px; }
button.btn { border: 0; padding: 0; background: none; cursor: pointer; }
@media (prefers-color-scheme: dark) { .consent a { color: var(--indigo-t); } }
@media (max-width: 720px) { .consent { right: 16px; bottom: 90px; max-width: none; } }
