/* ==========================================================
   PORTAFOLIO · RENZO TINTA
   1. Tokens · 2. Base · 3. Cabecera · 4. Componentes
   5. Inicio · 6. Hojas de proyecto · 7. Movimiento
   Contrastes verificados (WCAG AA): texto >= 4.5:1 en ambos temas.
   ========================================================== */

/* 1. TOKENS ------------------------------------------------ */
:root {
  --bg: #F6F7F9;
  --bg-2: #EEF1F5;
  --surface: #FFFFFF;
  --surface-2: #EEF1F5;
  --text: #0B1220;
  --muted: #475569;
  --line: rgb(15 23 42 / .10);
  --line-strong: rgb(15 23 42 / .20);
  --grid-line: rgb(15 23 42 / .05);
  --accent: #0F766E;
  --accent-2: #1D4ED8;
  --accent-ink: #FFFFFF;
  --ok-bg: #DDF3EF;
  --warn: #92400E;
  --warn-bg: #FEF3C7;
  --bar-muted: #CBD5E1;
  --glow: rgb(15 118 110 / .14);
  --flow-raw: 100 116 139;
  --flow-clean: 15 118 110;
  --focus: #1D4ED8;
  --shadow-1: 0 1px 2px rgb(15 23 42 / .05), 0 2px 8px rgb(15 23 42 / .05);
  --shadow-2: 0 12px 40px -12px rgb(15 23 42 / .22);
  --sun: 0;

  --font-sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "Cascadia Code", Consolas, monospace;

  --fs-xs: .8125rem;
  --fs-sm: .9375rem;
  --fs-md: 1.0625rem;
  --fs-lg: 1.1875rem;
  --fs-h3: 1.375rem;
  --fs-h2: clamp(2rem, 1.2rem + 3vw, 3.4rem);
  --fs-hero: clamp(2.6rem, 1rem + 5.4vw, 5.25rem);
  --fs-page: clamp(2.2rem, 1.1rem + 3.6vw, 4rem);

  --s-1: .25rem; --s-2: .5rem; --s-3: .75rem; --s-4: 1rem;
  --s-5: 1.5rem; --s-6: 2rem; --s-7: 3rem; --s-8: 5rem;
  --section: clamp(4.5rem, 3rem + 5vw, 8rem);

  --r-sm: 8px; --r-md: 14px; --r-lg: 20px; --r-pill: 999px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --dur-fast: 180ms; --dur: 320ms;

  --maxw: 1180px;
  --header-h: 68px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #07090D; --bg-2: #0B0F15; --surface: #0E131A; --surface-2: #151C25;
    --text: #E8EDF3; --muted: #94A3B8;
    --line: rgb(148 163 184 / .14); --line-strong: rgb(148 163 184 / .28); --grid-line: rgb(148 163 184 / .07);
    --accent: #2DD4BF; --accent-2: #60A5FA; --accent-ink: #04221F;
    --ok-bg: #0B2A27; --warn: #FCD34D; --warn-bg: #231C0A; --bar-muted: #334155;
    --glow: rgb(45 212 191 / .16); --flow-raw: 148 163 184; --flow-clean: 45 212 191;
    --focus: #7DB4FF;
    --shadow-1: 0 1px 2px rgb(0 0 0 / .4); --shadow-2: 0 18px 50px -18px rgb(0 0 0 / .8);
    --sun: 1;
  }
}
:root[data-theme="dark"] {
  --bg: #07090D; --bg-2: #0B0F15; --surface: #0E131A; --surface-2: #151C25;
  --text: #E8EDF3; --muted: #94A3B8;
  --line: rgb(148 163 184 / .14); --line-strong: rgb(148 163 184 / .28); --grid-line: rgb(148 163 184 / .07);
  --accent: #2DD4BF; --accent-2: #60A5FA; --accent-ink: #04221F;
  --ok-bg: #0B2A27; --warn: #FCD34D; --warn-bg: #231C0A; --bar-muted: #334155;
  --glow: rgb(45 212 191 / .16); --flow-raw: 148 163 184; --flow-clean: 45 212 191;
  --focus: #7DB4FF;
  --shadow-1: 0 1px 2px rgb(0 0 0 / .4); --shadow-2: 0 18px 50px -18px rgb(0 0 0 / .8);
  --sun: 1;
}

/* 2. BASE -------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 24px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 var(--fs-md)/1.65 var(--font-sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: clip;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.12; letter-spacing: -.02em; font-weight: 650; }
p { margin: 0 0 var(--s-4); }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
code { font-family: var(--font-mono); font-size: .92em; }
em { font-style: normal; }
::selection { background: color-mix(in srgb, var(--accent) 30%, transparent); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: var(--r-sm); }
[hidden] { display: none !important; }
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(1rem, .5rem + 2vw, 2rem); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link {
  position: absolute; left: var(--s-4); top: -100px; z-index: 200;
  background: var(--accent); color: var(--accent-ink); padding: var(--s-2) var(--s-4);
  border-radius: var(--r-sm); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: var(--s-2); }

/* 3. CABECERA ---------------------------------------------- */
.progress { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 120; pointer-events: none; }
.progress span {
  display: block; height: 100%; transform-origin: 0 50%; transform: scaleX(var(--p, 0));
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
.draft-banner {
  background: var(--warn-bg); color: var(--warn);
  font-size: var(--fs-xs); text-align: center; padding: var(--s-2) var(--s-4);
}
.site-header {
  position: sticky; top: 0; z-index: 100; height: var(--header-h);
  transition: transform var(--dur) var(--ease), background var(--dur), border-color var(--dur);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(1.5) blur(14px); -webkit-backdrop-filter: saturate(1.5) blur(14px);
  border-bottom-color: var(--line);
}
.site-header.is-hidden:not(:focus-within) { transform: translateY(-100%); }
.header-inner { display: flex; align-items: center; gap: var(--s-4); height: 100%; }
.brand {
  display: inline-flex; align-items: center; gap: .6rem; margin-right: auto;
  color: var(--text); text-decoration: none; font-weight: 650; letter-spacing: -.01em;
}
.brand-mark {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  font: 600 .8rem/1 var(--font-mono); color: var(--accent-ink);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  transition: transform var(--dur) var(--ease-spring);
}
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.06); }

.nav { position: relative; display: flex; gap: 2px; padding: 4px; border: 1px solid var(--line); border-radius: var(--r-pill); background: color-mix(in srgb, var(--surface) 70%, transparent); }
.nav a {
  position: relative; z-index: 1; color: var(--muted); text-decoration: none; font-size: var(--fs-sm); font-weight: 500;
  padding: .45rem .85rem; border-radius: var(--r-pill); transition: color var(--dur-fast);
}
.nav a:hover, .nav a[aria-current] { color: var(--text); }
.nav-indicator {
  position: absolute; top: 4px; left: 0; height: calc(100% - 8px); width: 0; border-radius: var(--r-pill);
  background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line);
  transition: transform .45s var(--ease), width .45s var(--ease), opacity .2s; opacity: 0; pointer-events: none;
}
.controls { display: flex; gap: var(--s-2); align-items: center; }
.seg { position: relative; display: inline-grid; grid-template-columns: 1fr 1fr; padding: 3px; border: 1px solid var(--line); border-radius: var(--r-pill); }
.seg-thumb {
  position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); border-radius: var(--r-pill);
  background: var(--accent); transition: transform .4s var(--ease-spring);
}
.seg[data-active="en"] .seg-thumb { transform: translateX(100%); }
.seg button {
  position: relative; z-index: 1; font: 600 var(--fs-xs)/1 var(--font-mono); cursor: pointer; letter-spacing: .04em;
  background: none; color: var(--muted); border: 0; padding: 0 .7rem; height: 32px; min-width: 40px; border-radius: var(--r-pill);
  transition: color var(--dur);
}
.seg button[aria-pressed="true"] { color: var(--accent-ink); }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--r-pill); background: none; color: var(--text);
  transition: background var(--dur-fast), border-color var(--dur-fast);
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--line-strong); }
.theme-btn { position: relative; }
.theme-btn svg { position: absolute; transition: transform .5s var(--ease-spring), opacity .3s; }
.theme-btn .i-sun { opacity: var(--sun); transform: rotate(calc((1 - var(--sun)) * 90deg)) scale(calc(.5 + var(--sun) * .5)); }
.theme-btn .i-moon { opacity: calc(1 - var(--sun)); transform: rotate(calc(var(--sun) * -90deg)) scale(calc(1 - var(--sun) * .5)); }
.menu-btn { display: none; }
.menu-btn span, .menu-btn span::before { display: block; width: 16px; height: 1.5px; background: currentColor; border-radius: 2px; transition: transform var(--dur) var(--ease); }
.menu-btn span { position: relative; transform: translateY(-3px); }
.menu-btn span::before { content: ""; position: absolute; top: 6px; }
.nav-open .menu-btn span { transform: translateY(0) rotate(45deg); }
.nav-open .menu-btn span::before { transform: translateY(-6px) rotate(-90deg); }

@media (max-width: 900px) {
  .menu-btn { display: inline-grid; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0; z-index: 99; flex-direction: column; gap: 0;
    padding: var(--s-4) clamp(1rem, .5rem + 2vw, 2rem) var(--s-6); border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
    background: var(--bg); visibility: hidden; opacity: 0; transform: translateY(-12px);
    transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility 0s linear var(--dur);
  }
  .nav a { font-size: 24px; font-weight: 600; letter-spacing: -.02em; padding: .7rem 0; border-radius: 0; border-bottom: 1px solid var(--line); color: var(--text); }
  .nav a[aria-current] { color: var(--accent); }
  .nav-indicator { display: none; }
  .nav-open .nav { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .nav-open .site-header { background: var(--bg); border-bottom-color: var(--line); }
  html.nav-open { overflow: hidden; }
}

/* 4. COMPONENTES ------------------------------------------- */
/* Botones */
.btn {
  --bg-btn: var(--surface); --fg-btn: var(--text);
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem; min-height: 48px;
  padding: 0 1.35rem; border-radius: var(--r-pill); border: 1px solid var(--line-strong);
  background: var(--bg-btn); color: var(--fg-btn); text-decoration: none; cursor: pointer;
  font: 600 var(--fs-sm)/1 var(--font-sans); letter-spacing: -.005em;
  transition: background var(--dur-fast), border-color var(--dur-fast), box-shadow var(--dur);
}
.btn:hover { border-color: var(--accent); }
.btn--primary { --bg-btn: var(--text); --fg-btn: var(--bg); border-color: transparent; }
.btn--primary:hover { box-shadow: 0 10px 30px -10px var(--glow), 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); border-color: transparent; }
.btn--sm { min-height: 40px; padding: 0 1rem; }
.btn .arrow { width: 16px; height: 16px; transition: transform var(--dur) var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn[disabled] { opacity: .5; cursor: not-allowed; box-shadow: none; }

/* Tiles de herramientas */
.tile {
  --s: 40px; position: relative; flex: none; width: var(--s); height: var(--s);
  display: inline-grid; place-items: center; border-radius: calc(var(--s) * .28);
  background: var(--tile-bg, var(--surface-2)); color: var(--tile-fg, var(--text));
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .10), 0 1px 2px rgb(0 0 0 / .15);
}
.tile svg { width: 54%; height: 54%; }
.tile-mono { font: 700 calc(var(--s) * .34)/1 var(--font-mono); letter-spacing: -.03em; }
.tile--xs { --s: 22px; }
.tile--sm { --s: 32px; }
.tile--md { --s: 48px; }
.tile--lg { --s: 56px; }

/* Chips e insignias */
.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chip {
  display: inline-flex; align-items: center; font: 500 var(--fs-xs)/1 var(--font-mono);
  padding: .45rem .7rem; border-radius: var(--r-pill); border: 1px solid var(--line-strong);
  color: var(--text); background: var(--surface);
  transition: border-color var(--dur-fast), transform var(--dur-fast) var(--ease);
}
.chip:hover { border-color: var(--accent); transform: translateY(-1px); }
.chip--practice { border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: var(--ok-bg); }
.chip--learning { border-style: dashed; border-color: var(--accent); color: var(--accent); background: transparent; }
.chip--explored { border-style: dotted; color: var(--muted); background: transparent; }
.badge {
  display: inline-flex; align-items: center; gap: .45rem; white-space: nowrap;
  font: 600 var(--fs-xs)/1 var(--font-sans); padding: .45rem .75rem; border-radius: var(--r-pill);
  background: var(--warn-bg); color: var(--warn); border: 1px solid color-mix(in srgb, var(--warn) 25%, transparent);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--ok { background: var(--ok-bg); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }

/* Tarjetas con foco de luz que sigue al cursor */
.card {
  position: relative; isolation: isolate; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: clamp(1.25rem, 1rem + 1vw, 1.75rem); box-shadow: var(--shadow-1);
  transition: border-color var(--dur), box-shadow var(--dur), transform var(--dur) var(--ease);
}
[data-spotlight]::before, [data-spotlight]::after {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .35s;
}
[data-spotlight]::before {
  z-index: -1;
  background: radial-gradient(520px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--accent) 10%, transparent), transparent 60%);
}
[data-spotlight]::after {
  padding: 1px;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--accent) 80%, transparent), transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
[data-spotlight]:hover::before, [data-spotlight]:hover::after { opacity: 1; }
[data-spotlight]:hover { box-shadow: var(--shadow-2); }

.todo { color: var(--muted); font-style: italic; }
.todo::before { content: "\25CC\00a0"; font-style: normal; }
.bullets li { position: relative; padding-left: 1.4rem; margin-bottom: var(--s-3); }
.bullets li::before {
  content: ""; position: absolute; left: .15rem; top: .62em; width: 7px; height: 7px; border-radius: 2px;
  background: var(--accent); transform: rotate(45deg);
}
.steps { counter-reset: s; margin-bottom: var(--s-4); }
.steps li { counter-increment: s; position: relative; padding-left: 2.6rem; margin-bottom: var(--s-4); min-height: 1.8rem; }
.steps li::before {
  content: counter(s, decimal-leading-zero); position: absolute; left: 0; top: .05rem; width: 1.9rem; height: 1.9rem;
  display: grid; place-items: center; border-radius: 8px; font: 600 .72rem/1 var(--font-mono);
  background: var(--ok-bg); color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
}

/* Secciones */
.section { padding-block: var(--section); position: relative; }
.section-head { display: grid; gap: var(--s-3); margin-bottom: clamp(2rem, 1.5rem + 2vw, 3.5rem); max-width: 760px; }
.section-index {
  display: flex; align-items: center; gap: .75rem; margin: 0;
  font: 500 var(--fs-xs)/1 var(--font-mono); color: var(--accent); letter-spacing: .12em; text-transform: uppercase;
}
.section-index::after { content: ""; width: 48px; height: 1px; background: currentColor; opacity: .5; }
.section-head h2 { font-size: var(--fs-h2); letter-spacing: -.04em; line-height: 1.02; }
.section-head > p:last-child { color: var(--muted); font-size: var(--fs-lg); margin: 0; max-width: 60ch; }
.sub-head { font: 500 var(--fs-xs)/1 var(--font-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .12em; margin: 0 0 var(--s-5); }

/* 5. INICIO ------------------------------------------------ */
/* Hero */
.hero { position: relative; min-height: min(100svh, 980px); display: grid; align-items: center; padding-block: calc(var(--s-7)) var(--s-8); overflow: hidden; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; z-index: -2; width: 70vmax; height: 70vmax; right: -25vmax; top: -30vmax; border-radius: 50%;
  background: radial-gradient(circle, var(--glow), transparent 62%);
}
.hero-grid-bg {
  position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 60% 45%, #000 25%, transparent 75%);
  mask-image: radial-gradient(ellipse 75% 65% at 60% 45%, #000 25%, transparent 75%);
}
.hero-flow {
  position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(2rem, 1rem + 4vw, 5rem); align-items: center; }
.status-pill {
  display: inline-flex; align-items: center; gap: .6rem; margin-bottom: var(--s-5);
  padding: .4rem .85rem .4rem .6rem; border-radius: var(--r-pill); border: 1px solid var(--line-strong);
  background: color-mix(in srgb, var(--surface) 70%, transparent); backdrop-filter: blur(8px);
  font: 500 var(--fs-xs)/1.2 var(--font-mono); color: var(--muted);
}
.pulse { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--accent); animation: ping 2.2s var(--ease) infinite; }
.hero-title { font-size: var(--fs-hero); font-weight: 700; letter-spacing: -.045em; line-height: .98; margin-bottom: var(--s-5); max-width: 12ch; }
.hero-role { margin-bottom: var(--s-5); }
.role-tag {
  display: inline-flex; align-items: center; gap: .6rem; font: 500 var(--fs-md)/1 var(--font-mono);
  color: var(--accent);
}
.role-tag::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.hero-lead { font-size: clamp(1.1rem, 1rem + .4vw, 1.3rem); line-height: 1.6; color: var(--muted); max-width: 50ch; margin-bottom: var(--s-6); }
.hero-lead em { font: inherit; color: var(--text); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.scroll-cue {
  position: absolute; left: 50%; bottom: var(--s-5); translate: -50% 0; display: grid; justify-items: center; gap: var(--s-2);
  font: 500 .7rem/1 var(--font-mono); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); text-decoration: none;
}
.scroll-cue i { position: relative; width: 1px; height: 38px; background: var(--line-strong); overflow: hidden; }
.scroll-cue i::after { content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--accent); animation: drip 2s var(--ease) infinite; }

/* Órbita de herramientas alrededor del avatar */
.hero-visual { display: grid; place-items: center; }
.orbit { --size: clamp(280px, 34vw, 460px); --r: calc(var(--size) / 2 - 30px); position: relative; width: var(--size); aspect-ratio: 1; }
.orbit-ring { position: absolute; inset: 30px; border-radius: 50%; border: 1px dashed var(--line-strong); }
.orbit-ring--inner { inset: 22%; border-style: solid; border-color: var(--line); }
.orbit-track { position: absolute; inset: 0; animation: spin 80s linear infinite; }
.orbit-item {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%) rotate(calc(var(--i) * 51.4286deg)) translateX(var(--r)) rotate(calc(var(--i) * -51.4286deg));
}
.orbit-inner { display: grid; justify-items: center; gap: 6px; animation: spin 80s linear infinite reverse; }
.orbit-inner .tile { transition: transform var(--dur) var(--ease-spring), box-shadow var(--dur); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .12), var(--shadow-2); }
.orbit-label {
  position: absolute; top: calc(100% + 6px); white-space: nowrap; font: 500 .72rem/1 var(--font-mono); color: var(--text);
  padding: .3rem .5rem; border-radius: 6px; background: var(--surface); border: 1px solid var(--line);
  opacity: 0; transform: translateY(-4px); transition: opacity var(--dur-fast), transform var(--dur-fast); pointer-events: none;
}
.orbit-item:hover .tile { transform: scale(1.18); }
.orbit-item:hover .orbit-label { opacity: 1; transform: none; }
.orbit:hover .orbit-track, .orbit:hover .orbit-inner { animation-play-state: paused; }
.avatar-core {
  position: absolute; inset: 27%; border-radius: 50%; overflow: hidden;
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  box-shadow: 0 0 0 1px var(--line-strong), 0 0 0 10px color-mix(in srgb, var(--accent) 8%, transparent), 0 30px 80px -20px var(--glow);
}
.avatar-core svg { width: 100%; height: 100%; }

@media (max-width: 900px) {
  .hero { min-height: auto; padding-block: var(--s-6) var(--s-8); }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .orbit { --size: min(78vw, 340px); }
  .scroll-cue { display: none; }
}

/* Resultados medidos */
.kpis { padding-block: 0 var(--section); }
.kpis-head { display: flex; align-items: center; gap: .75rem; margin-bottom: var(--s-5); font: 500 var(--fs-xs)/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.kpis-head::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.kpi-grid { display: grid; gap: var(--s-4); grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .kpi-grid { grid-template-columns: 1fr; } }
.kpi { display: flex; flex-direction: column; gap: var(--s-3); min-height: 250px; }
.kpi-num { font: 600 clamp(2.2rem, 1.6rem + 2vw, 3.2rem)/1 var(--font-mono); letter-spacing: -.05em; color: var(--text); font-variant-numeric: tabular-nums; }
.kpi-num small { font-size: .42em; letter-spacing: 0; color: var(--accent); margin-left: .3em; }
.kpi-label { font-weight: 600; font-size: var(--fs-sm); margin: 0; }
.kpi-note { color: var(--muted); font-size: var(--fs-xs); margin: 0; }
.kpi-viz { margin-top: auto; padding-top: var(--s-4); border-top: 1px dashed var(--line); }
.bar-row { display: grid; grid-template-columns: 4.6rem 1fr 3.6rem; align-items: center; gap: .6rem; font: 500 .75rem/1 var(--font-mono); color: var(--muted); }
.bar-row + .bar-row { margin-top: .55rem; }
.bar-row b { font-weight: 600; color: var(--text); text-align: right; }
.bar { height: 8px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; }
.bar > i { display: block; height: 100%; width: var(--w); border-radius: inherit; transform-origin: 0 50%; background: var(--bar-muted); }
.bar--accent > i { background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.dots { display: grid; grid-template-columns: repeat(20, 1fr); gap: 4px; }
.dots i { aspect-ratio: 1; border-radius: 2px; background: color-mix(in srgb, var(--accent) 75%, transparent); }
.dots i:nth-child(3n) { background: color-mix(in srgb, var(--accent-2) 70%, transparent); }

/* Sobre mí */
.about-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(2rem, 1rem + 3vw, 4rem); align-items: start; }
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; } }
.about-copy p { font-size: var(--fs-lg); line-height: 1.7; }
.about-copy p:first-child { color: var(--text); }
.about-copy p + p { color: var(--muted); }
.evo { margin-top: var(--s-6); display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-3); counter-reset: evo; }
@media (max-width: 600px) { .evo { grid-template-columns: 1fr; } }
.evo li { position: relative; padding: var(--s-4); border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); counter-increment: evo; }
.evo li::before { content: "0" counter(evo); display: block; font: 500 .72rem/1 var(--font-mono); color: var(--muted); margin-bottom: var(--s-3); }
.evo strong { display: block; font-size: var(--fs-sm); margin-bottom: 2px; }
.evo span { display: block; font-size: var(--fs-xs); color: var(--muted); line-height: 1.5; }
.evo li.is-now { border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: linear-gradient(160deg, var(--ok-bg), var(--surface) 70%); }
.evo li.is-now::after {
  content: attr(data-now); position: absolute; top: var(--s-3); right: var(--s-3);
  font: 600 .66rem/1 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--accent);
}
.facts { margin: 0; display: grid; gap: 0; }
.facts div { padding: var(--s-4) 0; border-bottom: 1px solid var(--line); display: grid; gap: 4px; }
.facts div:first-child { padding-top: 0; }
.facts div:last-child { border-bottom: 0; padding-bottom: 0; }
.facts dt { font: 500 .72rem/1 var(--font-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.facts dd { margin: 0; font-weight: 500; }

/* Stack: herramientas principales */
.core-grid { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); margin-bottom: var(--s-8); }
.core-item { padding: 0; }
.core-inner {
  display: grid; grid-template-columns: auto 1fr; gap: var(--s-2) var(--s-4); align-items: start; height: 100%;
  padding: clamp(1.1rem, 1rem + .6vw, 1.5rem);
  transform: perspective(800px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .5s var(--ease);
}
.core-item:hover .core-inner { transition-duration: .12s; }
.core-inner .tile { grid-row: span 2; transition: transform .45s var(--ease-spring); }
.core-item:hover .tile { transform: translateZ(0) scale(1.08) rotate(-4deg); }
.core-inner h4 { font-size: var(--fs-lg); letter-spacing: -.02em; display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); }
.core-inner p { margin: 0; font-size: var(--fs-xs); color: var(--muted); line-height: 1.55; }
.core-more { background: transparent; border-style: dashed; border-color: var(--line-strong); box-shadow: none; }
.core-more a {
  display: flex; align-items: center; justify-content: center; gap: var(--s-3); height: 100%; min-height: 110px;
  color: var(--muted); text-decoration: none; font-weight: 600; font-size: var(--fs-sm); border-radius: inherit;
  transition: color var(--dur-fast);
}
.core-more-plus {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 1px dashed currentColor;
  font: 500 1.1rem/1 var(--font-mono); transition: transform .5s var(--ease-spring);
}
.core-more:hover { border-color: var(--accent); }
.core-more:hover a { color: var(--accent); }
.core-more:hover .core-more-plus { transform: rotate(90deg); }
.legend { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-5); margin-bottom: var(--s-5); font-size: var(--fs-sm); color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: var(--s-2); }
.legend .chip { padding: .3rem .8rem; }
.eco { display: grid; border-top: 1px solid var(--line); }
.eco-row { display: grid; grid-template-columns: 220px 1fr; gap: var(--s-4); align-items: center; padding: var(--s-4) 0; border-bottom: 1px solid var(--line); }
.eco-row h4 { font-size: var(--fs-sm); font-weight: 600; color: var(--muted); }
@media (max-width: 700px) { .eco-row { grid-template-columns: 1fr; gap: var(--s-3); } }

/* Proyectos */
.projects-grid { display: grid; gap: var(--s-5); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 960px) { .projects-grid { grid-template-columns: 1fr; } }
.project-card { display: flex; flex-direction: column; gap: var(--s-5); padding: clamp(1.4rem, 1rem + 1.4vw, 2.25rem); }
.project-top { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; }
.project-index { font: 500 var(--fs-xs)/1 var(--font-mono); color: var(--muted); letter-spacing: .1em; }
.project-card h3 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); letter-spacing: -.035em; line-height: 1.08; }
.project-card h3 a { color: var(--text); text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat; transition: background-size .45s var(--ease); }
.project-card h3 a:hover { background-size: 100% 1.5px; }
.project-card > p { color: var(--muted); margin: 0; }
.project-metrics { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
.project-metrics div { padding: var(--s-3) var(--s-4); border-radius: var(--r-md); background: var(--bg-2); border: 1px solid var(--line); }
.project-metrics dt { font: 500 .7rem/1.3 var(--font-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; }
.project-metrics dd { margin: 0; font-weight: 600; font-size: var(--fs-sm); line-height: 1.35; }
.project-card .btn { align-self: flex-start; margin-top: auto; }

/* Cadena de herramientas (flujo) */
.chain { display: flex; align-items: flex-start; gap: 0; padding: var(--s-4); border-radius: var(--r-md); border: 1px dashed var(--line-strong); background: color-mix(in srgb, var(--bg-2) 60%, transparent); overflow-x: auto; scrollbar-width: none; }
.chain li { flex: 1 0 auto; display: grid; justify-items: center; gap: 8px; position: relative; min-width: 56px; }
.chain li:not(:last-child)::after {
  content: ""; position: absolute; top: 16px; left: calc(50% + 22px); right: calc(-50% + 22px); height: 2px;
  background: repeating-linear-gradient(90deg, var(--accent) 0 5px, transparent 5px 10px); background-size: 20px 2px;
  opacity: .55; animation: flow 1.2s linear infinite;
}
.chain-label { font: 500 .68rem/1.2 var(--font-mono); color: var(--muted); text-align: center; white-space: nowrap; }
.project-card:hover .chain li::after { opacity: 1; animation-duration: .6s; }
@media (max-width: 520px) { .chain-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } .chain li { min-width: 44px; } }

/* Enfoque (bento) */
.bento { display: grid; gap: var(--s-4); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bento .card:nth-child(1), .bento .card:nth-child(4), .bento .card:nth-child(6) { grid-column: span 2; }
@media (max-width: 900px) { .bento { grid-template-columns: 1fr 1fr; } .bento .card:nth-child(n) { grid-column: span 1; } }
@media (max-width: 600px) { .bento { grid-template-columns: 1fr; } }
.bento .card { display: grid; align-content: start; gap: var(--s-3); min-height: 200px; }
.glyph { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: var(--accent); background: var(--ok-bg); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); }
.glyph svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
/* Cada trazo lleva pathLength="100": al pasar el cursor se "redibuja". */
.bento .card:hover .glyph svg * { stroke-dasharray: 100; animation: draw .9s var(--ease); }
.bento h3 { font-size: var(--fs-h3); letter-spacing: -.025em; }
.bento p { margin: 0; color: var(--muted); font-size: var(--fs-sm); max-width: 52ch; }

/* Experiencia */
.timeline { position: relative; padding-left: clamp(1.75rem, 1rem + 2vw, 3rem); }
.timeline-track { position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; background: var(--line); overflow: hidden; }
.timeline-fill { position: absolute; inset: 0; transform-origin: 50% 0; background: linear-gradient(var(--accent), var(--accent-2)); }
.tl-item::before {
  content: ""; position: absolute; left: calc(-1 * clamp(1.75rem, 1rem + 2vw, 3rem) + 1px); top: 30px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--accent); box-shadow: 0 0 0 6px var(--glow);
}
.tl-head { display: flex; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; align-items: flex-start; margin-bottom: var(--s-5); padding-bottom: var(--s-5); border-bottom: 1px solid var(--line); }
.tl-meta { font: 500 var(--fs-xs)/1.4 var(--font-mono); color: var(--muted); margin-bottom: var(--s-2); }
.tl-head h3 { font-size: clamp(1.4rem, 1.2rem + .8vw, 1.9rem); letter-spacing: -.03em; }
.tl-cols { display: grid; gap: var(--s-5); grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .tl-cols { grid-template-columns: 1fr; } }
.tl-cols h4 { display: flex; align-items: center; gap: var(--s-2); font: 500 var(--fs-xs)/1 var(--font-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--accent); margin-bottom: var(--s-4); }
.tl-cols h4 svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tl-cols li { font-size: var(--fs-sm); color: var(--muted); }
.edu { display: grid; gap: var(--s-4); grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: var(--s-5); }
@media (max-width: 700px) { .edu { grid-template-columns: 1fr; } }
.edu-title { grid-column: 1 / -1; margin: var(--s-5) 0 0; }
.edu .card { display: grid; gap: var(--s-2); }
.edu h4 { font-size: var(--fs-md); }
.edu .who { font: 500 var(--fs-xs)/1 var(--font-mono); color: var(--muted); }
.edu .state { font-size: var(--fs-xs); color: var(--muted); }
.edu .bar { margin-top: var(--s-2); }

/* Contacto */
.contact { overflow: hidden; }
.contact::before {
  content: ""; position: absolute; z-index: -1; width: 60vmax; height: 60vmax; left: -20vmax; bottom: -35vmax; border-radius: 50%;
  background: radial-gradient(circle, var(--glow), transparent 60%);
}
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(2rem, 1rem + 4vw, 5rem); align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact .section-head h2 { font-size: clamp(2.4rem, 1.2rem + 4.4vw, 4.6rem); }
.contact-links { display: grid; gap: var(--s-3); }
.contact-link {
  display: flex; align-items: center; gap: var(--s-4); padding: var(--s-4) var(--s-5); text-decoration: none; color: var(--text);
  border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface);
  transition: border-color var(--dur-fast), transform var(--dur) var(--ease);
}
.contact-link:hover { border-color: var(--accent); transform: translateX(4px); }
.contact-link span:not(.tile) { display: grid; gap: 2px; margin-right: auto; }
.contact-link strong { font-size: var(--fs-md); }
.contact-link small { color: var(--muted); font: 400 var(--fs-xs)/1 var(--font-mono); }
.contact-link .arrow { width: 18px; height: 18px; color: var(--muted); transition: transform var(--dur) var(--ease), color var(--dur-fast); }
.contact-link:hover .arrow { transform: translate(3px, -3px); color: var(--accent); }
.form { display: grid; gap: var(--s-4); }
.field { display: grid; gap: var(--s-2); }
.field span { font-size: var(--fs-sm); font-weight: 600; }
.field input, .field textarea {
  font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line-strong);
  border-radius: var(--r-md); padding: .8rem 1rem; min-height: 48px; width: 100%;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus-visible, .field textarea:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.form .hp { position: absolute; left: -9999px; }
.form-status { font-size: var(--fs-sm); color: var(--muted); margin: 0; min-height: 1.5em; }

footer { border-top: 1px solid var(--line); padding-block: var(--s-6); color: var(--muted); font-size: var(--fs-sm); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); flex-wrap: wrap; }
.footer-inner a { color: var(--muted); text-decoration: none; display: inline-flex; gap: .4rem; align-items: center; }
.footer-inner a:hover { color: var(--accent); }

/* 6. HOJAS DE PROYECTO ------------------------------------- */
.page-hero { position: relative; overflow: hidden; isolation: isolate; padding-block: var(--s-6) var(--s-7); border-bottom: 1px solid var(--line); }
.page-hero::before {
  content: ""; position: absolute; z-index: -1; width: 60vmax; height: 60vmax; right: -20vmax; top: -35vmax; border-radius: 50%;
  background: radial-gradient(circle, var(--glow), transparent 62%);
}
.page-hero .hero-grid-bg { -webkit-mask-image: radial-gradient(ellipse 70% 80% at 70% 20%, #000 20%, transparent 75%); mask-image: radial-gradient(ellipse 70% 80% at 70% 20%, #000 20%, transparent 75%); }
.crumb {
  display: inline-flex; align-items: center; gap: .5rem; margin-bottom: var(--s-6); font-size: var(--fs-sm); color: var(--muted); text-decoration: none;
  padding: .4rem .8rem .4rem .6rem; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface);
  transition: color var(--dur-fast), border-color var(--dur-fast);
}
.crumb svg { width: 14px; height: 14px; transition: transform var(--dur) var(--ease); }
.crumb:hover { color: var(--text); border-color: var(--line-strong); }
.crumb:hover svg { transform: translateX(-3px); }
.page-title { font-size: var(--fs-page); font-weight: 700; letter-spacing: -.045em; line-height: 1; max-width: 18ch; margin: var(--s-3) 0 var(--s-4); }
.page-hero .lead { font-size: var(--fs-lg); color: var(--muted); max-width: 64ch; margin-bottom: var(--s-3); }
.role-note { font-size: var(--fs-sm); color: var(--text); margin-bottom: var(--s-5); }
.page-hero .chain { margin: var(--s-5) 0; max-width: 820px; }
.page-hero .hero-actions { margin-top: var(--s-5); }
.glance { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin-top: var(--s-7); border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); background: var(--line); }
.glance div { background: var(--surface); padding: var(--s-4) var(--s-5); display: grid; gap: 4px; align-content: start; }
.glance strong { font: 600 clamp(1.15rem, 1rem + .6vw, 1.5rem)/1.15 var(--font-mono); letter-spacing: -.03em; }
.glance span { color: var(--muted); font-size: var(--fs-xs); line-height: 1.45; }
@media (max-width: 800px) { .glance { grid-template-columns: 1fr 1fr; } }

.doc { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: clamp(2rem, 1rem + 4vw, 5rem); padding-block: var(--s-8); }
.toc { position: sticky; top: calc(var(--header-h) + 28px); align-self: start; }
.toc p { font: 500 .72rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: var(--s-4); }
.toc-links { position: relative; display: grid; }
.toc-links::before, .toc-links::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; border-radius: 2px; background: var(--line); }
.toc-links::after { background: linear-gradient(var(--accent), var(--accent-2)); transform-origin: 50% 0; transform: scaleY(var(--p, 0)); }
.toc a { display: block; padding: .45rem 0 .45rem 1rem; color: var(--muted); text-decoration: none; font-size: var(--fs-sm); transition: color var(--dur-fast), transform var(--dur) var(--ease); }
.toc a:hover { color: var(--text); transform: translateX(2px); }
.toc a[aria-current] { color: var(--text); font-weight: 600; }
@media (max-width: 960px) { .doc { grid-template-columns: 1fr; } .toc { display: none; } }

.doc-body section { padding-block: 0 var(--s-8); }
.doc-body h2 { font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.4rem); letter-spacing: -.035em; margin-bottom: var(--s-5); display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-1) var(--s-3); }
.doc-body h2 small { font: 500 var(--fs-xs)/1 var(--font-mono); color: var(--accent); text-transform: uppercase; letter-spacing: .1em; order: -1; flex-basis: 100%; }
.prose p, .prose li { max-width: 70ch; }
.prose > section > p { font-size: var(--fs-lg); line-height: 1.7; }
.prose .note { color: var(--muted); font-size: var(--fs-sm); }
.impact-grid { display: grid; gap: var(--s-4); grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: var(--s-5); }
@media (max-width: 700px) { .impact-grid { grid-template-columns: 1fr; } }

/* Diagrama de arquitectura */
.arch { counter-reset: n; display: grid; gap: var(--s-3); margin: 0; }
.arch figcaption { color: var(--muted); font-size: var(--fs-sm); margin-bottom: var(--s-3); max-width: 62ch; }
.lane { border: 1px dashed var(--line-strong); border-radius: var(--r-md); padding: var(--s-4); }
.lane--accent { border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent); background: color-mix(in srgb, var(--ok-bg) 55%, transparent); }
.lane h3 { font: 500 .72rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: var(--s-4); }
.lane--accent h3 { color: var(--accent); }
.nodes { display: grid; gap: var(--s-6); }
.node {
  counter-increment: n; position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: var(--s-4); display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-1);
  transition: border-color var(--dur-fast), transform var(--dur) var(--ease);
}
.node::before { content: counter(n, decimal-leading-zero); position: absolute; top: 12px; right: 14px; font: 500 .7rem/1 var(--font-mono); color: var(--accent); }
.node:hover { border-color: var(--accent); transform: translateY(-2px); }
.node .tile { margin-bottom: var(--s-2); }
.node strong { font-size: var(--fs-sm); line-height: 1.25; }
.node span:not(.tile) { color: var(--muted); font-size: var(--fs-xs); line-height: 1.45; }
.nodes > .node:not(:last-child)::after {
  content: ""; position: absolute; left: 50%; top: 100%; width: 2px; height: var(--s-6); translate: -50% 0;
  background: repeating-linear-gradient(180deg, var(--accent) 0 5px, transparent 5px 10px); background-size: 2px 20px;
  animation: flow-y 1.2s linear infinite;
}
@media (min-width: 760px) {
  .nodes { grid-template-columns: repeat(var(--cols, 1), minmax(0, 1fr)); gap: var(--s-5); }
  .nodes > .node:not(:last-child)::after {
    left: 100%; top: 50%; width: var(--s-5); height: 2px; translate: 0 -50%;
    background: repeating-linear-gradient(90deg, var(--accent) 0 5px, transparent 5px 10px); background-size: 20px 2px;
    animation-name: flow;
  }
  .arch-foot { grid-template-columns: 1fr 1fr; }
}
.arch-link { display: flex; align-items: center; justify-content: center; gap: var(--s-2); flex-wrap: wrap; font-size: var(--fs-sm); color: var(--accent); }
.arch-link svg { width: 16px; height: 16px; }
.arch-link small { color: var(--muted); font-size: var(--fs-xs); }
.arch-foot { display: grid; gap: var(--s-3); }
.arch-foot .bullets li { font-size: var(--fs-sm); color: var(--muted); }
.arch-note { color: var(--muted); font-size: var(--fs-sm); margin: 0; }
.lane-note { margin: var(--s-4) 0 0; padding-top: var(--s-3); border-top: 1px dashed var(--line); color: var(--muted); font-size: var(--fs-xs); line-height: 1.55; max-width: none; }

/* Dependencias de la extracción en paralelo */
.deps-fig { margin: 0; display: grid; gap: var(--s-4); }
.deps-fig figcaption { color: var(--muted); font-size: var(--fs-sm); max-width: 62ch; }
.deps { display: grid; gap: var(--s-3); align-items: center; }
.deps-col { border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s-4); background: var(--surface); }
.deps-col--opt { border-style: dashed; background: transparent; }
.deps-col h3 { font: 500 .72rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: .12em; color: var(--accent); margin-bottom: var(--s-3); }
.deps-col--opt h3 { color: var(--muted); }
.deps-col ul { display: grid; gap: var(--s-2); }
.task { display: flex; align-items: center; gap: var(--s-2); font-size: var(--fs-sm); line-height: 1.3; padding: var(--s-2) var(--s-3); border-radius: var(--r-sm, 8px); background: var(--bg); border: 1px solid var(--line); transition: border-color var(--dur-fast), transform var(--dur) var(--ease); }
.task:hover { border-color: var(--accent); transform: translateX(2px); }
.task--key { border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.task small { margin-left: auto; flex: none; white-space: nowrap; font: 600 var(--fs-xs)/1 var(--font-mono); color: var(--accent); background: var(--ok-bg); padding: 3px 6px; border-radius: 6px; }
.deps-arrow { display: grid; place-items: center; color: var(--accent); }
.deps-arrow svg { width: 22px; height: 22px; transform: rotate(90deg); }
.deps-arrow--soft { color: var(--muted); }
@media (min-width: 760px) {
  .deps { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr); }
  .deps-arrow svg { transform: none; }
}
.pe { border-top: 1px solid var(--line); margin-top: var(--s-2); }
.pe summary { cursor: pointer; padding: var(--s-4) 0 var(--s-2); font-weight: 600; list-style: none; display: flex; gap: var(--s-3); align-items: center; }
.pe summary::-webkit-details-marker { display: none; }
.pe summary::before {
  content: "+"; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; flex: none;
  font: 600 .9rem/1 var(--font-mono); color: var(--accent); background: var(--ok-bg); transition: transform var(--dur) var(--ease);
}
.pe[open] summary::before { transform: rotate(45deg); }
.pe-body { padding: var(--s-2) 0 0; color: var(--muted); font-size: var(--fs-sm); }

.shots { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); margin-top: var(--s-4); }
.shots figure { margin: 0; }
.shots a { display: block; border-radius: var(--r-md); overflow: hidden; }
.shots img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--r-md); transition: transform .6s var(--ease); }
.shots a:hover img { transform: scale(1.03); }
.shots figcaption { margin-top: var(--s-2); color: var(--muted); font-size: var(--fs-xs); }

.files { display: grid; margin-bottom: var(--s-5); border-top: 1px solid var(--line); }
.files li { display: grid; grid-template-columns: 12rem 1fr; gap: var(--s-3); align-items: baseline; padding: var(--s-3) 0; border-bottom: 1px solid var(--line); }
.files code { font-size: var(--fs-sm); color: var(--accent); }
.files span { color: var(--muted); font-size: var(--fs-sm); }
@media (max-width: 560px) { .files li { grid-template-columns: 1fr; gap: 0; } }

.next-card {
  display: grid; gap: var(--s-2); padding: clamp(1.5rem, 1rem + 2vw, 2.5rem); text-decoration: none; color: var(--text);
}
.next-card small { font: 500 var(--fs-xs)/1 var(--font-mono); text-transform: uppercase; letter-spacing: .12em; color: var(--accent); }
.next-card strong { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2.1rem); letter-spacing: -.035em; line-height: 1.1; display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); }
.next-card .arrow { width: 28px; height: 28px; flex: none; color: var(--accent); transition: transform var(--dur) var(--ease); }
.next-card:hover .arrow { transform: translateX(6px); }

/* 7. MOVIMIENTO -------------------------------------------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes ping { 0% { transform: scale(1); opacity: .6; } 80%, 100% { transform: scale(3); opacity: 0; } }
@keyframes drip { 0% { top: -40%; } 100% { top: 100%; } }
@keyframes flow { to { background-position: 20px 0; } }
@keyframes flow-y { to { background-position: 0 20px; } }
@keyframes draw { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }

/* Estado inicial de las animaciones de entrada: solo si GSAP está activo (clase .motion en <html>). */
.motion [data-reveal]:not(.is-in),
.motion [data-stagger] > :not(.is-in),
.motion .hero-title:not(.is-in),
.motion .page-title:not(.is-in) { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .core-inner { transform: none !important; }
}
