/* Portafolio · Antonio Rosas Castillo — v4
   Monocromo sobre papel, Geist + Geist Mono, bordes finos, color solo como acento. */

:root {
  --paper: #fafafa;
  --white: #ffffff;
  --hair: #ebebeb;
  --ash: #c9c9c9;
  --smoke: #a8a8a8;
  --stone: #666666;
  --charcoal: #4d4d4d;
  --ink: #171717;
  --green: #297a3a;
  --spectrum: linear-gradient(90deg, #00ff95 0%, #ffd000 25%, #ff1744 50%, #9500ff 75%, #00e5ff 100%);
  --ring: 0 0 0 1px rgba(0, 0, 0, .08), 0 0 0 2px #fafafa;
  --ring-hover: 0 0 0 1px rgba(0, 0, 0, .18), 0 0 0 2px #fafafa;
  --r: 6px;
  --max: 1200px;
  --pad: 32px;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
.page { background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.5; overflow-x: hidden; }
:where(.page) :where(p, h1, h2, h3, h4, figure, dl, dd, ul, ol) { margin: 0; padding: 0; }
:where(.page) :where(ul, ol) { list-style: none; }
:where(.page) img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--ink); color: var(--white); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
.skip { position: absolute; left: 16px; top: -48px; z-index: 60; background: var(--ink); color: var(--white); padding: 8px 14px; border-radius: var(--r); font-size: 14px; }
.skip:focus { top: 12px; }

.eyebrow { font-family: var(--mono); font-size: 11px; line-height: 1.5; letter-spacing: .071em; text-transform: uppercase; color: var(--ink); }
.eyebrow.muted { color: var(--stone); }
.mono { font-family: var(--mono); }
.link { text-decoration: underline; text-decoration-color: var(--ash); text-underline-offset: 3px; transition: text-decoration-color .2s ease; }
.link:hover { text-decoration-color: var(--ink); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(250, 250, 250, .82); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: 0 1px 0 transparent; transition: box-shadow .25s ease; }
.site-header.is-scrolled { box-shadow: 0 1px 0 var(--hair); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; min-height: 64px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; }
.mark { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 5px; background: var(--ink); color: var(--white); font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: .02em; }
.nav { display: flex; align-items: center; gap: 24px; font-size: 14px; }
.nav > a:not(.btn) { color: var(--charcoal); transition: color .2s ease; }
.nav > a:not(.btn):hover { color: var(--ink); }
.nav-cta { display: flex; gap: 8px; }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: var(--r); font-size: 14px; font-weight: 500; line-height: 1; white-space: nowrap; transition: background-color .2s ease, box-shadow .2s ease, transform .2s var(--ease); }
.btn:active { transform: translateY(1px); }
.btn-dark { background: var(--ink); color: var(--white); }
.btn-dark:hover { background: #383838; }
.btn-ghost { background: var(--white); color: var(--charcoal); box-shadow: 0 0 0 1px var(--hair); }
.btn-ghost:hover { color: var(--ink); box-shadow: 0 0 0 1px var(--ash); }
.btn-pill { border-radius: 999px; min-height: 32px; padding: 0 14px; font-size: 13px; }
.btn-lg { min-height: 44px; padding: 0 20px; font-size: 15px; }
.btn .arr { transition: transform .25s var(--ease); }
.btn:hover .arr { transform: translateX(3px); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 96px 0 112px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 64px; align-items: center; }
.hero .eyebrow { margin-bottom: 20px; display: inline-flex; align-items: center; gap: 10px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); position: relative; }
.live-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--green); animation: ping 2.2s var(--ease) infinite; }
@keyframes ping { 0% { transform: scale(1); opacity: .6; } 80%, 100% { transform: scale(2.8); opacity: 0; } }
.hero h1 { font-size: clamp(44px, 6vw, 72px); line-height: 1; font-weight: 450; letter-spacing: -0.06em; }
.hero h1 .w { display: inline-block; opacity: 0; transform: translateY(.35em); filter: blur(6px); animation: word-in .9s var(--ease) forwards; }
.hero h1 .w:nth-child(2) { animation-delay: .08s; }
.hero h1 .w:nth-child(3) { animation-delay: .16s; }
@keyframes word-in { to { opacity: 1; transform: none; filter: blur(0); } }
.hero-sub { margin-top: 20px !important; font-size: clamp(22px, 2.4vw, 30px); line-height: 1.15; letter-spacing: -0.05em; font-weight: 400; color: var(--charcoal); max-width: 22ch; }
.grad-text { background: var(--spectrum); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: slide 8s linear infinite; }
@keyframes slide { to { background-position: 200% 0; } }
.hero-text { margin-top: 24px !important; max-width: 560px; color: var(--charcoal); font-size: 16px; line-height: 1.6; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.hero-links { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 24px; }
.hero-links a { font-family: var(--mono); font-size: 12px; letter-spacing: .04em; color: var(--stone); transition: color .2s ease; }
.hero-links a:hover { color: var(--ink); }
.in { opacity: 0; transform: translateY(12px); animation: in .8s var(--ease) forwards; }
.in.i1 { animation-delay: .25s; } .in.i2 { animation-delay: .35s; } .in.i3 { animation-delay: .45s; } .in.i4 { animation-delay: .55s; } .in.i5 { animation-delay: .65s; }
@keyframes in { to { opacity: 1; transform: none; } }

.hero-side { position: relative; display: grid; gap: 12px; }
.glow { position: absolute; inset: 10% -6% 0; z-index: 0; pointer-events: none; border-radius: 50%; background: var(--spectrum); filter: blur(64px); opacity: .22; animation: glow 14s ease-in-out infinite alternate; }
@keyframes glow { 0% { transform: translate3d(-4%, 0, 0) rotate(0deg) scale(1); } 100% { transform: translate3d(4%, -3%, 0) rotate(8deg) scale(1.08); } }
.hero-side > *:not(.glow) { position: relative; z-index: 1; }

.card { background: var(--white); border-radius: var(--r); box-shadow: var(--ring); padding: 16px; }
.card.hover { transition: box-shadow .25s ease, transform .35s var(--ease); }
.card.hover:hover { box-shadow: var(--ring-hover); transform: translateY(-2px); }

.profile { display: flex; align-items: center; gap: 14px; }
.avatar { position: relative; width: 56px; height: 56px; flex: none; border-radius: 50%; overflow: hidden; background: var(--hair); display: grid; place-items: center; }
.avatar::before { content: ""; position: absolute; inset: 0; border-radius: 50%; padding: 1.5px; background: var(--spectrum); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; z-index: 2; }
.avatar span { font-family: var(--mono); font-size: 15px; font-weight: 500; color: var(--stone); }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.profile b { display: block; font-size: 15px; font-weight: 500; }
.profile .eyebrow { margin: 2px 0 0; color: var(--stone); }

/* Terminal */
.cli { font-family: var(--mono); font-size: 12.5px; line-height: 1.75; padding: 0; overflow: hidden; }
.cli-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; box-shadow: 0 1px 0 var(--hair); }
.cli-bar .dots { display: inline-flex; gap: 6px; }
.cli-bar .dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--hair); }
.cli-bar span:last-child { font-size: 11px; color: var(--smoke); }
.cli-body { padding: 14px 16px 16px; color: var(--ink); }
.cli-line { display: flex; gap: 10px; white-space: pre-wrap; }
.cli-line .p { color: var(--smoke); flex: none; }
.cli-line .ok { color: var(--green); flex: none; }
.cli-line .r { margin-left: auto; color: var(--stone); padding-left: 12px; text-align: right; }
.cli-line .g { color: var(--green); }
.caret { display: inline-block; width: 7px; height: 14px; background: var(--ink); vertical-align: -2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Cifras ---------- */
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-radius: var(--r); background: var(--white); box-shadow: var(--ring); }
.metric { padding: 24px 20px; position: relative; }
.metric + .metric { box-shadow: -1px 0 0 var(--hair); }
.metric-v { font-size: clamp(30px, 3.4vw, 40px); line-height: 1; font-weight: 450; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.metric-v small { font-size: .5em; letter-spacing: -0.02em; color: var(--stone); margin-left: 6px; }
.metric-t { margin-top: 10px !important; font-size: 13px; color: var(--stone); line-height: 1.45; }

/* ---------- Secciones ---------- */
.section { padding: 120px 0 0; }
.sec-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: end; margin-bottom: 48px; }
.sec-head .eyebrow { margin-bottom: 12px; }
.h2 { font-size: clamp(36px, 4.6vw, 56px); line-height: 1; font-weight: 450; letter-spacing: -0.06em; }
.sec-lead { color: var(--charcoal); max-width: 52ch; }

/* ---------- Sobre mí ---------- */
.about { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; }
.about p { color: var(--charcoal); font-size: 17px; line-height: 1.6; }
.about p + p { margin-top: 16px !important; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 28px; }
.facts .card { padding: 14px 16px; }
.facts dt { margin-bottom: 4px; }
.facts dd { font-size: 14px; }

/* ---------- Proyectos ---------- */
.project { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; padding: 56px 0; box-shadow: 0 -1px 0 var(--hair); scroll-margin-top: 72px; }
.project:first-of-type { box-shadow: none; padding-top: 8px; }
.p-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.p-num { display: inline-grid; place-items: center; min-width: 28px; height: 22px; padding: 0 6px; border-radius: 4px; background: var(--ink); color: var(--white); font-family: var(--mono); font-size: 11px; }
.p-title { margin-top: 16px !important; font-size: clamp(30px, 3.4vw, 40px); line-height: 1.05; font-weight: 450; letter-spacing: -0.05em; }
.p-sub { margin-top: 8px !important; color: var(--charcoal); }
.p-block { margin-top: 24px; }
.p-block .eyebrow { margin-bottom: 8px; color: var(--stone); }
.p-block p { color: var(--charcoal); font-size: 15px; line-height: 1.6; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { font-family: var(--mono); font-size: 11.5px; padding: 3px 8px; border-radius: 999px; background: var(--white); box-shadow: 0 0 0 1px var(--hair); color: var(--charcoal); }
.results li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 6px; font-size: 15px; line-height: 1.55; color: var(--charcoal); }
.results li + li { margin-top: 8px; }
.results li::before { content: "✓"; font-family: var(--mono); color: var(--green); font-size: 13px; padding-top: 1px; }
.results strong { color: var(--ink); font-weight: 500; }
.goal { margin-top: 12px !important; font-size: 13px !important; color: var(--stone) !important; padding: 8px 10px; border-radius: var(--r); box-shadow: 0 0 0 1px var(--hair); background: repeating-linear-gradient(-45deg, transparent 0 6px, rgba(0, 0, 0, .025) 6px 12px); }
.goal b { font-family: var(--mono); font-size: 10.5px; letter-spacing: .071em; font-weight: 500; color: var(--ink); margin-right: 6px; }
.p-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }

.p-visual { display: grid; gap: 12px; align-content: start; }
.v-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.v-head .eyebrow:last-child { color: var(--smoke); }

/* Diagrama vertical con flujo animado */
.flow { display: grid; justify-items: center; }
.node { position: relative; width: 100%; max-width: 280px; text-align: center; padding: 9px 12px; border-radius: var(--r); background: var(--paper); box-shadow: 0 0 0 1px var(--hair); font-size: 14px; line-height: 1.3; }
.node small { display: block; font-family: var(--mono); font-size: 10.5px; letter-spacing: .04em; color: var(--stone); margin-top: 2px; text-transform: uppercase; }
.node.dark { background: var(--ink); color: var(--white); box-shadow: none; }
.node.dark small { color: var(--smoke); }
.wire { position: relative; width: 1px; height: 28px; background: var(--hair); overflow: hidden; }
.wire::after { content: ""; position: absolute; left: -1px; top: -12px; width: 3px; height: 12px; border-radius: 2px; background: linear-gradient(180deg, transparent, var(--ink)); animation: drop 2.4s linear infinite; }
.wire.w2::after { animation-delay: .6s; }
@keyframes drop { 0% { transform: translateY(0); } 40%, 100% { transform: translateY(44px); } }
.targets { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; position: relative; padding-top: 14px; }
.targets::before { content: ""; position: absolute; top: 0; left: 16.66%; right: 16.66%; height: 1px; background: var(--hair); }
.targets.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.targets.four::before { left: 12.5%; right: 12.5%; }
.targets .node { max-width: none; font-size: 13px; padding: 8px 8px; }
.targets .node::before { content: ""; position: absolute; left: 50%; top: -14px; width: 1px; height: 14px; background: var(--hair); }
.node.pulse::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; box-shadow: 0 0 0 1px var(--ink); opacity: 0; animation: pulse 2.4s ease-in-out infinite; animation-delay: inherit; }
.p2 { animation-delay: 1.2s; } .p3 { animation-delay: 1.5s; } .p4 { animation-delay: 1.8s; } .p5 { animation-delay: 2.1s; }
@keyframes pulse { 0%, 100% { opacity: 0; } 12%, 30% { opacity: 1; } 50% { opacity: 0; } }
.v-note { margin-top: 16px !important; padding-top: 12px; box-shadow: 0 -1px 0 var(--hair); font-size: 13px; color: var(--stone); line-height: 1.5; }

/* Comparativa de velocidad */
.speed { display: grid; gap: 14px; }
.bar-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) 64px; gap: 12px; align-items: center; }
.bar-row .eyebrow { color: var(--stone); }
.track { height: 8px; border-radius: 4px; background: var(--paper); box-shadow: 0 0 0 1px var(--hair); overflow: hidden; }
.bar { height: 100%; border-radius: 4px; transform-origin: left; }
.bar.slow { width: 100%; background: var(--ash); }
.bar.fast { width: 3px; background: var(--green); }
.bar-v { font-family: var(--mono); font-size: 12px; text-align: right; }
.bar-v.g { color: var(--green); font-weight: 500; }
.speed-cap { font-size: 12.5px; color: var(--stone); }

/* Capturas */
.shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.shot { position: relative; aspect-ratio: 16 / 10; border-radius: var(--r); overflow: hidden; background: var(--white); box-shadow: var(--ring); }
.shot-ph { position: absolute; inset: 0; display: grid; place-items: center; background: repeating-linear-gradient(-45deg, var(--white) 0 8px, #f6f6f6 8px 16px); }
.shot-ph span { font-family: var(--mono); font-size: 11px; letter-spacing: .071em; text-transform: uppercase; color: var(--smoke); background: var(--white); padding: 4px 8px; border-radius: 4px; box-shadow: 0 0 0 1px var(--hair); }
.shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .6s var(--ease); }
.shot.has-img:hover img { transform: scale(1.03); }
.shot.has-img .shot-ph { display: none; }
.shot-open { all: unset; position: absolute; inset: 0; cursor: zoom-in; }
.shot-open:focus-visible { outline: 2px solid var(--ink); outline-offset: -3px; }
.shots-cap { font-size: 12px !important; color: var(--smoke) !important; font-family: var(--mono); letter-spacing: .04em; }

/* ---------- Habilidades ---------- */
.skills { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.skill { padding: 20px; display: flex; flex-direction: column; gap: 10px; min-height: 168px; }
.skill h3 { font-size: 20px; font-weight: 450; letter-spacing: -0.03em; line-height: 1.2; }
.skill p { font-size: 14px; color: var(--charcoal); line-height: 1.55; margin-top: auto !important; }
.skill .eyebrow { color: var(--stone); }
.skill.inverted { background: var(--ink); color: var(--white); box-shadow: none; position: relative; overflow: hidden; }
.skill.inverted::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--spectrum); background-size: 200% 100%; animation: slide 6s linear infinite; }
.skill.inverted p { color: var(--ash); }
.skill.inverted .eyebrow { color: var(--smoke); }
.skill.wide { grid-column: span 1; }

/* ---------- DevOps ---------- */
.devops { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: center; }
.devops .sec-lead { margin-top: 16px !important; }
.cli.big { font-size: 13px; }
.cli.big .cli-body { padding: 18px 20px 20px; min-height: 210px; }

/* ---------- Contacto ---------- */
.contact { position: relative; margin: 120px 0 0; padding: 72px 48px; border-radius: 8px; background: var(--ink); color: var(--white); overflow: hidden; }
.contact::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--spectrum); background-size: 200% 100%; animation: slide 8s linear infinite; }
.contact::after { content: ""; position: absolute; right: -10%; bottom: -60%; width: 60%; height: 120%; border-radius: 50%; background: var(--spectrum); filter: blur(90px); opacity: .18; pointer-events: none; }
.contact > * { position: relative; z-index: 1; }
.contact .eyebrow { color: var(--smoke); margin-bottom: 16px; }
.contact .h2 { color: var(--white); }
.contact p { color: var(--ash); margin-top: 16px !important; max-width: 48ch; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.contact .btn-light { background: var(--white); color: var(--ink); }
.contact .btn-light:hover { background: #e8e8e8; }
.contact .btn-outline { color: var(--white); box-shadow: 0 0 0 1px rgba(255, 255, 255, .25); }
.contact .btn-outline:hover { box-shadow: 0 0 0 1px rgba(255, 255, 255, .6); }
.contact-list { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 40px; padding-top: 24px; box-shadow: 0 -1px 0 rgba(255, 255, 255, .12); font-family: var(--mono); font-size: 12.5px; }
.contact-list a { color: var(--white); transition: opacity .2s ease; }
.contact-list a:hover { opacity: .7; }
.contact-list span { color: var(--smoke); }
.contact :focus-visible { outline-color: var(--white); }

.site-footer { padding: 40px 0 48px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-family: var(--mono); font-size: 11px; letter-spacing: .071em; text-transform: uppercase; color: var(--smoke); }
.footer-inner a:hover { color: var(--ink); }

/* Lightbox */
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(1100px, 94vw); width: 100%; }
.lightbox::backdrop { background: rgba(23, 23, 23, .8); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.lightbox[open] { animation: in .35s var(--ease); }
.lightbox img { width: 100%; height: auto; max-height: 84vh; object-fit: contain; border-radius: var(--r); background: var(--white); }
.lb-close { display: block; margin: 0 0 10px auto; font-family: var(--mono); font-size: 12px; color: var(--ink); background: var(--white); border: 0; border-radius: 999px; padding: 8px 14px; cursor: pointer; }

/* ---------- Reveal (solo con JS) ---------- */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .speed .bar.slow { transform: scaleX(0); }
.js .speed.is-in .bar.slow { transform: scaleX(1); transition: transform 2.4s cubic-bezier(.45, 0, .55, 1) .2s; }
.js .speed .bar.fast { transform: scaleX(0); }
.js .speed.is-in .bar.fast { transform: scaleX(1); transition: transform .15s linear .2s; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-side { max-width: 560px; }
  .project, .about, .devops, .sec-head { grid-template-columns: 1fr; gap: 28px; }
  .sec-head { align-items: start; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric:nth-child(3) { box-shadow: 0 -1px 0 var(--hair); }
  .metric:nth-child(4) { box-shadow: -1px 0 0 var(--hair), 0 -1px 0 var(--hair); }
  .skills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  :root { --pad: 20px; }
  .nav > a:not(.btn) { display: none; }
  .hero { padding: 56px 0 72px; }
  .hero h1 { font-size: clamp(40px, 12vw, 52px); }
  .section { padding-top: 88px; }
  .metrics { grid-template-columns: 1fr; }
  .metric + .metric, .metric:nth-child(3), .metric:nth-child(4) { box-shadow: 0 -1px 0 var(--hair); }
  .facts { grid-template-columns: 1fr; }
  .project { padding: 48px 0; }
  .targets, .targets.four { grid-template-columns: 1fr; padding-top: 0; gap: 6px; }
  .targets::before { display: none; }
  .targets .node::before { display: none; }
  .targets .node { max-width: 280px; justify-self: center; width: 100%; }
  .wire.w2 { margin-bottom: 6px; }
  .shots { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: 80px minmax(0, 1fr) 56px; gap: 8px; }
  .skills { grid-template-columns: 1fr; }
  .skill { min-height: 0; }
  .cli { font-size: 12px; }
  .cli-line { flex-wrap: wrap; column-gap: 10px; }
  .contact { padding: 48px 24px; margin-top: 88px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero h1 .w, .in { opacity: 1; transform: none; filter: none; }
  .wire::after { display: none; }
  .js .reveal { opacity: 1; transform: none; }
  .js .speed .bar.slow, .js .speed .bar.fast { transform: none; }
}

/* Terminales: las líneas se ocultan hasta que main.js las revela */
.js .cli-line.is-pending { visibility: hidden; }

/* utilidades (reemplazan style="" inline por la CSP) */
.mt-80 { margin-top: 80px; }
.mb-12 { margin-bottom: 12px; }
.not-found { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 20px; }
