/* =========================================================
   Sleyter Correa — CV web
   Tema: tinta / papel / rojo (el mismo rojo del logo S).
   Cada sección define su tema con data-theme y el body hace la transición.
   ========================================================= */

:root {
  --ink: #0c0c0d;
  --ink-2: #151517;
  --paper: #efece6;
  --accent: #d7141f;       /* rellenos: botones, franjas, credencial */
  --red-bright: #ff4a52;   /* texto y líneas rojas sobre fondo oscuro */

  --bg: var(--ink);
  --fg: var(--paper);
  --muted: rgba(239, 236, 230, .58);
  --line: rgba(239, 236, 230, .14);
  --surface: rgba(239, 236, 230, .035);
  --acc-text: var(--red-bright);
  --on-acc: #ffffff;

  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", "Times New Roman", Georgia, serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --gutter: clamp(16px, 4vw, 48px);
  --nav-h: 64px;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

html[data-theme="light"] {
  --bg: var(--paper);
  --fg: var(--ink);
  --muted: rgba(12, 12, 13, .62);
  --line: rgba(12, 12, 13, .14);
  --surface: rgba(12, 12, 13, .035);
  --acc-text: #b0101a;
}

html[data-theme="accent"] {
  --bg: var(--accent);
  --fg: #ffffff;
  --muted: rgba(255, 255, 255, .92);
  --line: rgba(255, 255, 255, .3);
  --surface: rgba(255, 255, 255, .08);
  --acc-text: #ffffff;
}

*, *::before, *::after { box-sizing: border-box; }

/* "hidden" siempre oculta, aunque la clase tenga display (evita capas invisibles que roban clics) */
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  transition: background-color .7s var(--ease), color .7s var(--ease);
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
mark { background: none; color: inherit; }
::selection { background: var(--accent); color: #fff; }

:focus-visible { outline: 2px solid var(--acc-text); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(1320px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.ic { width: 1.1em; height: 1.1em; flex-shrink: 0; }

.skip {
  position: fixed; left: 12px; top: -60px; z-index: 100;
  background: var(--accent); color: #fff; padding: 10px 14px; border-radius: 8px;
  font-weight: 600; text-decoration: none; transition: top .2s;
}
.skip:focus { top: 12px; }

.dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: #3ddc84; box-shadow: 0 0 0 0 rgba(61, 220, 132, .6);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(61, 220, 132, .55); }
  70% { box-shadow: 0 0 0 8px rgba(61, 220, 132, 0); }
  100% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0); }
}

/* ---------- Tipografía base ---------- */
.label {
  font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); display: flex; gap: .6em; align-items: center;
}
.label span { color: var(--acc-text); }

.h-xl {
  font-size: clamp(2.5rem, 6.4vw, 6rem);
  line-height: .95; letter-spacing: -.045em; font-weight: 500;
  margin-top: 1.2rem; text-wrap: balance;
}
.h-xl em, .contact-title em, .hero-name em {
  font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.02em;
}
.lead { margin-top: 1.4rem; max-width: 42ch; color: var(--muted); font-size: clamp(1rem, 1.3vw, 1.15rem); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 1.1rem; }
.chips span {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .02em;
  padding: 4px 10px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted);
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  height: 50px; padding: 0 1.35rem; border-radius: 99px;
  border: 1px solid var(--fg); color: var(--fg); background: transparent;
  font-size: 15px; font-weight: 500; text-decoration: none; white-space: nowrap;
  transition: background-color .25s, color .25s, border-color .25s, transform .35s var(--ease);
}
.btn:hover { background: var(--fg); color: var(--bg); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.btn-sm { height: 38px; padding: 0 1rem; font-size: 14px; }

/* ---------- Barra de progreso y cursor ---------- */
.progress { position: fixed; inset: 0 0 auto; height: 2px; z-index: 60; pointer-events: none; }
.progress span { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }
html[data-theme="accent"] .progress span { background: #fff; }

.cursor {
  position: fixed; left: 0; top: 0; z-index: 70; width: 36px; height: 36px; margin: -18px 0 0 -18px;
  border: 1px solid #fff; border-radius: 50%; pointer-events: none; mix-blend-mode: difference;
  opacity: 0; transition: width .3s var(--ease), height .3s var(--ease), margin .3s var(--ease), opacity .3s;
}
.cursor.is-on { opacity: 1; }
.cursor.is-hover { width: 64px; height: 64px; margin: -32px 0 0 -32px; background: rgba(255, 255, 255, .9); }

/* ---------- Navegación ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0 var(--gutter); color: var(--fg);
  transition: transform .45s var(--ease), background-color .45s, border-color .45s, color .7s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
  border-bottom-color: var(--line);
}
.nav.is-hidden { transform: translateY(-100%); }
.nav-brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; font-weight: 600; letter-spacing: -.01em; }
.logo {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  background: #fff; box-shadow: 0 0 0 1px rgba(12, 12, 13, .08), 0 4px 14px rgba(215, 20, 31, .25);
}
.nav-links { display: flex; gap: 2px; }
.nav-links a {
  position: relative; padding: 8px 12px; font-size: 14px; text-decoration: none; color: var(--muted); border-radius: 99px;
  transition: color .2s;
}
.nav-links a:hover, .nav-links a[aria-current="true"] { color: var(--fg); }
.nav-links a[aria-current="true"]::after {
  content: ""; position: absolute; left: 50%; bottom: 2px; width: 4px; height: 4px; margin-left: -2px;
  border-radius: 50%; background: var(--acc-text);
}
.nav-right { display: flex; align-items: center; gap: .9rem; }
.status { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--mono); font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }

.menu-btn { display: none; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; background: none; cursor: pointer; position: relative; }
.menu-btn span { position: absolute; left: 12px; right: 12px; height: 1.5px; background: currentColor; transition: transform .35s var(--ease), top .35s var(--ease); }
.menu-btn span:first-child { top: 17px; }
.menu-btn span:last-child { top: 23px; }
.menu-btn[aria-expanded="true"] span:first-child { top: 20px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { top: 20px; transform: rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 45; background: var(--ink); color: var(--paper);
  padding: calc(var(--nav-h) + 24px) var(--gutter) 32px; display: flex; flex-direction: column; justify-content: space-between;
  opacity: 0; pointer-events: none; transition: opacity .35s;
}
.menu.is-open { opacity: 1; pointer-events: auto; }
.menu nav { display: flex; flex-direction: column; }
.menu nav a {
  display: flex; align-items: baseline; gap: 1rem; padding: 10px 0; border-bottom: 1px solid rgba(239, 236, 230, .12);
  font-size: clamp(2rem, 9vw, 3.2rem); letter-spacing: -.04em; text-decoration: none; font-weight: 500;
}
.menu nav a span { font-family: var(--mono); font-size: 12px; color: var(--red-bright); letter-spacing: 0; }
.menu-foot { display: flex; flex-direction: column; gap: .5rem; font-family: var(--mono); font-size: 13px; color: rgba(239, 236, 230, .7); }
.menu-foot a { text-decoration: none; }

/* =========================================================
   HERO
   ========================================================= */
.hero { position: relative; min-height: 100svh; display: flex; padding-top: calc(var(--nav-h) + 8px); overflow: clip; }
.hero-dots {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0;
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 100%); mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
}
.hero-inner { display: flex; flex-direction: column; gap: 1.5rem; padding-bottom: clamp(3.5rem, 7vw, 6rem); }
.hero-inner > * { position: relative; z-index: 1; }

.hero-meta {
  display: flex; justify-content: space-between; gap: 1rem; padding-top: 14px; border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
}
.hero-meta time { color: var(--fg); font-variant-numeric: tabular-nums; }

.hero-name {
  margin-top: auto; font-weight: 600;
  font-size: clamp(4.4rem, 16.5vw, 17.5rem); line-height: .82; letter-spacing: -.065em;
  will-change: transform;
}
.hero-name .line { display: block; overflow: hidden; padding: 0 .04em .07em 0; margin-bottom: -.07em; }
.hero-name .line-2 { padding-left: .5em; }
.hero-name em { font-weight: 400; letter-spacing: -.035em; }
.hero-dot { display: inline-block; width: .13em; height: .13em; border-radius: 50%; background: var(--accent); margin-left: .05em; vertical-align: baseline; }
html.js .hero-name [data-split] { visibility: hidden; }
html.js .hero-name [data-split].is-split { visibility: visible; }
.ch { display: inline-block; transform: translateY(108%); transition: transform 1.1s var(--ease); transition-delay: calc(var(--i) * 45ms + 120ms); }
html.is-loaded .ch { transform: none; }

.hero-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; flex-wrap: wrap; will-change: transform, opacity; }
.hero-lede { max-width: 30ch; font-size: clamp(1.15rem, 1.8vw, 1.55rem); line-height: 1.3; letter-spacing: -.02em; }
.hero-lede strong { font-weight: 500; color: var(--acc-text); }
.hero-cta { display: flex; gap: .7rem; flex-wrap: wrap; }

/* Credencial colgante */
.badge-rig {
  position: absolute; z-index: 3; top: 0; right: clamp(24px, 17vw, 380px);
  width: 270px; transform-origin: 50% 0; will-change: transform;
}
.rig-anchor { position: absolute; left: 50%; top: 0; width: 0; height: 0; }
.strap {
  width: 26px; height: clamp(120px, 24vh, 260px); margin: 0 auto -6px; overflow: hidden;
  background: var(--accent); color: #fff; position: relative;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 40px); mask-image: linear-gradient(to bottom, transparent 0, #000 40px);
}
.strap span {
  position: absolute; left: 50%; top: 0; transform: translateX(-50%); writing-mode: vertical-rl;
  font-family: var(--mono); font-size: 10px; letter-spacing: .25em; white-space: nowrap; line-height: 26px;
}
.badge {
  --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 30%;
  position: relative; padding: 14px 14px 12px; border-radius: 18px;
  background: linear-gradient(160deg, #1c1c1f, #0f0f11 60%);
  border: 1px solid rgba(239, 236, 230, .16); color: var(--paper);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .06);
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .5s var(--ease);
  cursor: grab; user-select: none; -webkit-user-select: none; overflow: hidden;
}
.badge.is-drag { cursor: grabbing; transition: none; }
@media (pointer: fine) { .badge { touch-action: none; } }
.badge-sheen {
  position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen; opacity: .55;
  background:
    radial-gradient(circle at var(--mx) var(--my), rgba(255, 255, 255, .16), transparent 45%),
    conic-gradient(from 200deg at var(--mx) var(--my), rgba(215, 20, 31, .2), rgba(120, 140, 255, .1), rgba(255, 255, 255, .06), rgba(215, 20, 31, .2));
}
.badge-hole { display: block; width: 46px; height: 8px; margin: 0 auto 12px; border-radius: 99px; background: var(--ink); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .8); }
.badge-top { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: rgba(239, 236, 230, .55); margin-bottom: 10px; }
.badge-photo { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #222; }
.badge-photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.25) contrast(1.05); transition: filter .5s; pointer-events: none; }
.badge:hover .badge-photo img { filter: none; }
.scan {
  position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, .04) 0 1px, transparent 1px 3px);
}
.scan::after {
  content: ""; position: absolute; left: 0; right: 0; height: 30%;
  background: linear-gradient(to bottom, transparent, rgba(255, 74, 82, .24), transparent);
  animation: scan 4.5s linear infinite;
}
@keyframes scan { from { top: -30%; } to { top: 100%; } }
.badge-id { margin-top: 12px; display: flex; flex-direction: column; }
.badge-id strong { font-size: 19px; font-weight: 600; letter-spacing: -.02em; }
.badge-id span { font-size: 12.5px; color: rgba(239, 236, 230, .62); }
.badge-data { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed rgba(239, 236, 230, .16); }
.badge-data dt { font-family: var(--mono); font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: rgba(239, 236, 230, .45); }
.badge-data dd { font-size: 12px; display: flex; align-items: center; gap: 5px; }
.badge-data .dot { width: 6px; height: 6px; }
.badge-code { width: 100%; height: 26px; margin-top: 12px; color: rgba(239, 236, 230, .8); }

/* =========================================================
   MARQUESINA
   ========================================================= */
.marquee {
  position: relative; z-index: 4; width: 106vw; margin: -1.2rem 0 0 -3vw; padding: 1rem 0;
  background: var(--accent); color: #fff; overflow: hidden; transform: rotate(-2deg);
}
.marquee-track {
  display: flex; align-items: center; gap: 2rem; width: max-content; white-space: nowrap; will-change: transform;
  font-size: clamp(1.6rem, 4.2vw, 3.6rem); font-weight: 500; letter-spacing: -.035em; line-height: 1.1;
}
.marquee-track .ic { width: .55em; height: .55em; }

/* =========================================================
   01 PERFIL — texto que se ilumina al hacer scroll
   ========================================================= */
.perfil { position: relative; height: 260vh; }
.perfil-pin { position: sticky; top: 0; height: 100svh; display: flex; align-items: center; }
.scrub {
  margin-top: 1.6rem; max-width: 30ch; text-wrap: pretty;
  font-size: clamp(1.75rem, 4.3vw, 4rem); line-height: 1.1; letter-spacing: -.035em; font-weight: 500;
}
.scrub .w { opacity: .14; transition: opacity .4s, color .4s; }
.scrub .w.on { opacity: 1; }
.scrub .w.k.on { color: var(--acc-text); }
.scrub .w.k { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }

/* Números */
.numbers { padding: clamp(3rem, 8vw, 6rem) 0 clamp(5rem, 10vw, 8rem); }
.numbers-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.num { padding: 2rem 1.5rem 0 0; }
.num + .num { padding-left: 1.5rem; border-left: 1px solid var(--line); }
.num-v {
  display: flex; align-items: baseline; gap: .15em;
  font-size: clamp(3rem, 6.8vw, 6.4rem); font-weight: 500; letter-spacing: -.06em; line-height: 1; font-variant-numeric: tabular-nums;
}
.num-v small { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--acc-text); font-weight: 400; }
.num p { margin-top: 1rem; max-width: 24ch; color: var(--muted); font-size: 14.5px; }

/* =========================================================
   02 EXPERIENCIA
   ========================================================= */
.exp { padding: clamp(5rem, 12vw, 10rem) 0; }
.exp-grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(2rem, 6vw, 6rem); }
.exp-head { position: sticky; top: calc(var(--nav-h) + 40px); align-self: start; }

.timeline { position: relative; padding-left: 2.2rem; }
.timeline::before { content: ""; position: absolute; left: 0; top: .6rem; bottom: 0; width: 1px; background: var(--line); }
.tl-fill { position: absolute; left: 0; top: .6rem; bottom: 0; width: 1px; background: var(--acc-text); transform-origin: 50% 0; transform: scaleY(var(--p, 0)); }
.tl-item { position: relative; padding-bottom: clamp(3rem, 6vw, 5rem); }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ""; position: absolute; left: calc(-2.2rem - 6px); top: .45rem; width: 13px; height: 13px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--line); transition: background-color .4s, border-color .4s, box-shadow .4s;
}
.tl-item.on::before { background: var(--acc-text); border-color: var(--acc-text); box-shadow: 0 0 0 6px color-mix(in srgb, var(--acc-text) 16%, transparent); }
.tl-when { margin-bottom: .9rem; }
.tag {
  display: inline-flex; align-items: center; gap: .5rem; padding: 4px 11px; border-radius: 99px; border: 1px solid var(--line);
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase;
}
.tag-now { border-color: transparent; background: var(--fg); color: var(--bg); }
.tl-item h3 { font-size: clamp(1.5rem, 2.6vw, 2.2rem); line-height: 1.1; letter-spacing: -.035em; font-weight: 500; }
.tl-org { margin-top: .5rem; color: var(--muted); font-size: 15px; }
.tl-org a { display: inline-flex; align-items: center; gap: .3rem; text-decoration: none; border-bottom: 1px solid var(--line); word-break: break-all; }
.tl-org a:hover { color: var(--fg); border-color: var(--fg); }
.tl-list { margin-top: 1.2rem; display: grid; gap: .55rem; }
.tl-list li { position: relative; padding-left: 1.3rem; font-size: 16px; }
.tl-list li::before { content: ""; position: absolute; left: 0; top: .72em; width: 7px; height: 1px; background: var(--fg); }

.semesters { margin-top: 1.4rem; }
.semesters ol { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.semesters li {
  position: relative; height: 42px; border-radius: 6px; border: 1px solid var(--line);
  display: grid; place-items: end start; padding: 4px 6px; font-family: var(--mono); font-size: 10.5px; color: var(--muted); overflow: hidden;
}
.semesters li::before {
  content: ""; position: absolute; inset: 0; background: var(--fg); transform-origin: 0 50%; transform: scaleX(0);
  transition: transform .6s var(--ease); transition-delay: calc(var(--i, 0) * 70ms);
}
.semesters li.now::before { background: repeating-linear-gradient(135deg, var(--acc-text) 0 6px, transparent 6px 10px); }
.semesters.in li::before { transform: scaleX(1); }
.semesters.in li { color: var(--bg); }
.semesters.in li.now { color: var(--fg); }
.semesters li > * { position: relative; }
.semesters li { z-index: 0; }
.semesters li::before { z-index: -1; }
.semesters p { display: flex; justify-content: space-between; margin-top: .6rem; font-family: var(--mono); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }

/* =========================================================
   03 PROYECTOS — carrusel horizontal anclado
   ========================================================= */
.work { position: relative; }
.work-pin { position: relative; padding: clamp(5rem, 10vw, 8rem) 0 4.5rem; }
.work-track {
  display: flex; gap: 20px; padding: 0 var(--gutter) 1rem;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter);
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.work-track::-webkit-scrollbar { display: none; }
.work-intro { flex: 0 0 min(440px, 86vw); display: flex; flex-direction: column; justify-content: center; padding-right: 1rem; scroll-snap-align: start; }
.work-hint { margin-top: 2rem; display: flex; align-items: center; gap: .6rem; font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.work-hint .ic { color: var(--acc-text); animation: nudge 1.6s var(--ease) infinite; }
@keyframes nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(6px); } }
.hint-pin { display: none; }

.card {
  --mx: 50%; --my: 0%;
  position: relative; flex: 0 0 min(500px, 86vw); min-height: 560px; padding: 26px; border-radius: 22px;
  border: 1px solid var(--line); background: var(--surface); scroll-snap-align: center;
  display: flex; flex-direction: column; overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(215, 20, 31, .14), transparent 60%);
}
.card:hover::before { opacity: 1; }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; }
.card-mono {
  display: grid; place-items: center; min-width: 52px; height: 52px; padding: 0 10px; border-radius: 14px;
  background: var(--accent); color: #fff; font-family: var(--mono); font-weight: 500; font-size: 15px; letter-spacing: -.02em;
}
.card-idx { font-size: 64px; line-height: .8; font-weight: 500; letter-spacing: -.06em; color: transparent; -webkit-text-stroke: 1px var(--line); }
.card-sector { margin-top: 1.6rem; font-family: var(--mono); font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.card h3 { margin-top: .4rem; font-size: clamp(1.7rem, 2.6vw, 2.3rem); line-height: 1.05; letter-spacing: -.04em; font-weight: 500; }
.card-list { margin-top: 1.1rem; display: grid; gap: .5rem; }
.card-list li { position: relative; padding-left: 1.2rem; font-size: 15px; color: color-mix(in srgb, var(--fg) 82%, transparent); }
.card-list li::before { content: ""; position: absolute; left: 0; top: .7em; width: 6px; height: 1px; background: var(--acc-text); }
.card-link {
  margin-top: auto; padding-top: 1.2rem; display: inline-flex; align-items: center; gap: .45rem; align-self: flex-start;
  font-family: var(--mono); font-size: 13px; text-decoration: none; color: var(--fg); border-bottom: 1px solid var(--line);
}
.card-link:hover { border-color: var(--acc-text); color: var(--acc-text); }

.modmap { margin-top: 1.3rem; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.modmap span {
  padding: 7px 8px; border-radius: 7px; border: 1px solid var(--line); font-family: var(--mono); font-size: 10.5px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: background-color .4s, color .4s, border-color .4s;
}
.modmap span.on { background: color-mix(in srgb, var(--accent) 16%, transparent); border-color: color-mix(in srgb, var(--accent) 55%, transparent); color: var(--fg); }

.card-feature { flex-basis: min(820px, 90vw); flex-direction: row; gap: 26px; }
.card-text { display: flex; flex-direction: column; flex: 1 1 50%; min-width: 0; }
.resto { flex: 1 1 50%; align-self: center; width: 100%; max-width: 360px; height: auto; }
.resto text { font-family: var(--mono); font-size: 10px; fill: var(--muted); }
.r-frame { fill: rgba(239, 236, 230, .03); stroke: var(--line); }
.r-label { letter-spacing: .12em; }
.tb rect { fill: transparent; stroke: rgba(239, 236, 230, .35); stroke-width: 1; }
.tb text { text-anchor: middle; fill: var(--fg) !important; font-size: 11px !important; }
.tb.busy rect { animation: busy 7s infinite; }
.tb.b2 rect { animation-delay: -2.3s; }
.tb.b3 rect { animation-delay: -4.6s; }
@keyframes busy {
  0%, 48% { fill: var(--accent); stroke: var(--accent); }
  52%, 96% { fill: transparent; stroke: rgba(239, 236, 230, .35); }
  100% { fill: var(--accent); stroke: var(--accent); }
}
.lg-free { fill: transparent; stroke: rgba(239, 236, 230, .45); }
.lg-busy { fill: var(--accent); }
.r-sep, .ticket line { stroke: var(--line); }
.r-small { font-size: 10px; }
.r-big { font-family: var(--sans) !important; font-size: 20px !important; fill: var(--fg) !important; letter-spacing: -.02em; }
.ticket > rect { fill: var(--paper); }
.ticket text { fill: #3a3a3d !important; font-size: 9.5px !important; white-space: pre; }
.ticket .t-h { fill: var(--ink) !important; font-weight: 500; }
.ticket line { stroke: rgba(12, 12, 13, .2); stroke-dasharray: 3 3; }
.t-pill { fill: var(--accent); animation: blink 1.6s steps(2) infinite; }
.ticket .t-pill-t { fill: #fff !important; text-anchor: middle; font-size: 9px !important; font-weight: 500; }
@keyframes blink { 50% { opacity: .55; } }

.work-progress { display: flex; align-items: center; gap: 1rem; padding: 1.5rem var(--gutter) 0; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.work-count b { color: var(--fg); font-weight: 500; }
.work-bar { flex: 1; height: 1px; background: var(--line); position: relative; overflow: hidden; }
.work-bar i { position: absolute; inset: 0; background: var(--acc-text); transform-origin: 0 50%; transform: scaleX(0); }

/* Modo anclado (escritorio, lo activa JS) */
.work.is-pinned .work-pin { position: sticky; top: 0; height: 100svh; overflow: hidden; padding: 0; display: flex; flex-direction: column; justify-content: center; }
.work.is-pinned .work-track { overflow: visible; width: max-content; scroll-snap-type: none; padding-bottom: 0; will-change: transform; }
.work.is-pinned .card { height: min(640px, 74svh); min-height: 0; }
.work.is-pinned .work-progress { position: absolute; left: 0; right: 0; bottom: 28px; padding-top: 0; }
.work.is-pinned .hint-pin { display: inline; }
.work.is-pinned .hint-swipe { display: none; }

/* =========================================================
   04 PROCESO — diagrama que se arma con el scroll
   ========================================================= */
.proc { padding: clamp(5rem, 12vw, 10rem) 0 clamp(3rem, 8vw, 6rem); }
.proc-head { max-width: 900px; }
.proc-grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(2rem, 5vw, 5rem); margin-top: 2rem; }
.step { min-height: 72svh; display: flex; flex-direction: column; justify-content: center; opacity: .25; transition: opacity .5s; }
.step.on { opacity: 1; }
.step-n { font-family: var(--mono); font-size: 12px; color: var(--acc-text); letter-spacing: .08em; }
.step h3 { margin-top: .6rem; font-size: clamp(1.7rem, 3vw, 2.6rem); line-height: 1.05; letter-spacing: -.04em; font-weight: 500; }
.step p { margin-top: 1rem; color: var(--muted); max-width: 40ch; font-size: 16.5px; }
.proc-sticky { position: sticky; top: calc(var(--nav-h) + 4svh); height: calc(100svh - var(--nav-h) - 8svh); display: flex; flex-direction: column; justify-content: center; }
.diagram { width: 100%; height: auto; max-height: 68svh; overflow: visible; }
.diagram-caption { margin-top: 1rem; font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); text-align: center; }

.diagram .edge { fill: none; stroke: var(--red-bright); stroke-width: 1.6; stroke-dasharray: 1 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.1s var(--ease); }
.diagram .pk { fill: var(--red-bright); opacity: 0; transition: opacity .4s .9s; }
.diagram .node rect { fill: var(--ink-2); stroke: rgba(239, 236, 230, .16); stroke-width: 1; transition: fill .5s, stroke .5s; }
.diagram .node text { font-family: var(--sans); font-size: 15px; font-weight: 500; fill: var(--paper); text-anchor: middle; letter-spacing: -.01em; }
.diagram .node text.sub { font-family: var(--mono); font-size: 10px; font-weight: 400; fill: rgba(239, 236, 230, .5); letter-spacing: .02em; }
.diagram .node text.big { font-size: 22px; letter-spacing: -.03em; }
.diagram .node { opacity: .32; transition: opacity .6s; }
.diagram .core { opacity: 1; }
.diagram .core .ring { fill: none; stroke: var(--red-bright); stroke-dasharray: 5 6; opacity: .7; animation: spin 18s linear infinite; transform-box: fill-box; transform-origin: center; }
@keyframes spin { to { stroke-dashoffset: -110; } }
.diagram .mods rect { fill: var(--red-bright); opacity: 0; transform-box: fill-box; transform-origin: center; transform: scale(.2); transition: opacity .5s, transform .6s var(--ease); }
.diagram .mods text { font-family: var(--mono); font-size: 10.5px; fill: var(--accent); text-anchor: middle; opacity: 0; transition: opacity .5s .2s; }
.diagram .mods text { fill: var(--red-bright); }

.diagram.s2 .core rect:not(.ring) { fill: var(--accent); stroke: var(--accent); }
.diagram.s2 .core text { fill: #fff; }
.diagram.s2 .core text.sub { fill: rgba(255, 255, 255, .8); }
.diagram.s2 .edge.s2, .diagram.s4 .edge.s4, .diagram.s5 .edge.s5 { stroke-dashoffset: 0; }
.diagram.s2 .pk.s2, .diagram.s4 .pk.s4 { opacity: 1; }
.diagram.s2 .node.s2, .diagram.s4 .node.s4, .diagram.s5 .node.s5 { opacity: 1; }
.diagram.s2 .node.s2 rect, .diagram.s4 .node.s4 rect, .diagram.s5 .node.s5 rect { stroke: rgba(255, 74, 82, .6); }
.diagram.s3 .mods rect { opacity: 1; transform: scale(1); }
.diagram.s3 .mods text { opacity: 1; }

/* =========================================================
   05 STACK
   ========================================================= */
.stack { padding: clamp(5rem, 12vw, 10rem) 0; }
.stack-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; flex-wrap: wrap; margin-bottom: 3rem; }
.filter { display: inline-flex; padding: 4px; border: 1px solid var(--line); border-radius: 99px; gap: 2px; }
.filter button { border: 0; background: none; padding: 9px 16px; border-radius: 99px; font-size: 14px; cursor: pointer; color: var(--muted); transition: background-color .25s, color .25s; }
.filter button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }

.stack-grid { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--fg); }
.stack-col { padding: 1.4rem 1.2rem 1.6rem 0; }
.stack-col + .stack-col { padding-left: 1.2rem; border-left: 1px solid var(--line); }
.stack-col h3 { font-family: var(--mono); font-size: 12px; font-weight: 400; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: .8rem; }
.stack-col li {
  display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: .62rem 0;
  border-bottom: 1px dashed var(--line); font-size: 16px; letter-spacing: -.01em; transition: opacity .35s, transform .35s var(--ease);
}
.ctx { display: inline-flex; gap: 3px; flex-shrink: 0; }
.ctx i, .stack-legend i {
  display: grid; place-items: center; width: 18px; height: 18px; border-radius: 5px;
  font-family: var(--mono); font-size: 10px; font-style: normal;
}
.k-t { background: var(--fg); color: var(--bg); }
.k-p { border: 1px solid var(--fg); color: var(--fg); }
[data-stack][data-f="t"] li:not([data-c~="t"]), [data-stack][data-f="p"] li:not([data-c~="p"]) { opacity: .18; }
[data-stack][data-f="t"] li[data-c~="t"], [data-stack][data-f="p"] li[data-c~="p"] { transform: translateX(4px); }
.stack-legend { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-top: 1.2rem; font-size: 13px; color: var(--muted); }
.stack-legend span { display: inline-flex; align-items: center; gap: .5rem; }

.odoo-band {
  margin-top: clamp(3rem, 7vw, 5rem); padding: clamp(1.5rem, 4vw, 3rem); border-radius: 26px;
  background: var(--ink); color: var(--paper);
  display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center;
}
.odoo-band .label { color: rgba(239, 236, 230, .55); }
.odoo-band .label span { color: var(--red-bright); }
.odoo-band h3 { margin-top: 1rem; font-size: clamp(1.5rem, 2.6vw, 2.2rem); line-height: 1.1; letter-spacing: -.035em; font-weight: 500; }
.mod-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 1.4rem; }
.mod-chips li { padding: 6px 12px; border-radius: 99px; border: 1px solid rgba(239, 236, 230, .18); font-size: 13.5px; }
.versions-title, .versions-foot { font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: rgba(239, 236, 230, .55); }
.versions ol { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; margin-top: 1rem; }
.versions li {
  display: grid; place-items: center; height: 46px; border-radius: 8px; border: 1px solid rgba(239, 236, 230, .14);
  font-family: var(--mono); font-size: 13px; color: rgba(239, 236, 230, .45); transition: background-color .35s, color .35s, border-color .35s;
}
.versions li.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.v-line { height: 2px; margin-top: 10px; background: rgba(239, 236, 230, .12); border-radius: 2px; overflow: hidden; }
.v-line i { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
.versions-foot { display: flex; justify-content: space-between; margin-top: .7rem; }

/* =========================================================
   06 CONTACTO
   ========================================================= */
.contact { min-height: 100svh; padding-top: clamp(5rem, 11vw, 9rem); display: flex; flex-direction: column; justify-content: space-between; }
.contact-title {
  margin: 1.5rem 0 clamp(2rem, 5vw, 4rem); font-weight: 500;
  font-size: clamp(4.2rem, 17.5vw, 19rem); line-height: .85; letter-spacing: -.07em; margin-left: -.04em;
}
.contact-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.mail-row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.mail-link {
  font-size: clamp(1.25rem, 3vw, 2.6rem); letter-spacing: -.035em; font-weight: 500; text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 2px no-repeat; padding-bottom: 4px; overflow-wrap: anywhere;
  transition: background-size .4s var(--ease);
}
.mail-link:hover { background-size: 0 2px; background-position: 100% 100%; }
.copy {
  display: inline-flex; align-items: center; gap: .45rem; height: 40px; padding: 0 1rem; border-radius: 99px;
  border: 1px solid var(--fg); background: none; cursor: pointer; font-size: 14px; transition: background-color .2s, color .2s;
}
.copy:hover, .copy.is-done { background: var(--fg); color: var(--bg); }
.contact-note { margin-top: 1.6rem; max-width: 46ch; font-size: 17px; color: var(--muted); }
.contact-links { border-top: 1px solid var(--fg); }
.contact-links a {
  display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: .9rem;
  padding: 1.05rem 0; border-bottom: 1px solid var(--line); text-decoration: none; font-size: 18px; letter-spacing: -.02em;
  transition: padding .35s var(--ease);
}
.contact-links a:hover { padding-left: .6rem; }
.contact-links small { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.contact-links .go { transition: transform .35s var(--ease); }
.contact-links a:hover .go { transform: translate(3px, -3px); }

.foot {
  display: flex; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; align-items: center;
  margin-top: clamp(4rem, 8vw, 6rem); padding: 1.4rem 0 1.6rem; border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .02em; color: var(--muted);
}
.foot a { text-decoration: none; color: var(--fg); }
.foot-privacy { flex: 1 1 320px; max-width: 70ch; }

.logo img { width: 28px; height: 28px; display: block; }

/* Botón flotante de WhatsApp (aparece después del inicio y se oculta en Contacto) */
.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 40;
  display: inline-flex; align-items: center; gap: .55rem; height: 52px; padding: 0 20px 0 16px; border-radius: 99px;
  background: var(--accent); color: #fff; text-decoration: none; font-size: 15px; font-weight: 500;
  box-shadow: 0 14px 34px -12px rgba(215, 20, 31, .7), 0 0 0 1px rgba(255, 255, 255, .12) inset;
  transform: translateY(140%); opacity: 0; pointer-events: none;
  transition: transform .45s var(--ease), opacity .3s, background-color .2s;
}
.wa-float.is-on { transform: none; opacity: 1; pointer-events: auto; }
.wa-float:hover { background: #b80f19; }
.wa-float .ic { width: 22px; height: 22px; }

/* =========================================================
   Aparición al entrar en pantalla
   ========================================================= */
html.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
html.js [data-reveal].in { opacity: 1; transform: none; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1100px) {
  .nav-links { display: none; }
  .menu-btn { display: block; }
  .stack-grid { grid-template-columns: repeat(3, 1fr); }
  .stack-col:nth-child(4) { padding-left: 0; border-left: 0; }
  .stack-col:nth-child(n+4) { border-top: 1px solid var(--line); }
}

@media (max-width: 900px) {
  .status { display: none; }
  .hero-inner { gap: 1.2rem; }
  .hero-name { margin-top: 1.5rem; }
  .badge-rig { position: relative; top: auto; right: auto; width: min(250px, 72vw); margin: -1rem auto 0; z-index: 2; }
  .strap { height: 64px; }
  .hero-foot { flex-direction: column; align-items: flex-start; gap: 1.4rem; }

  .numbers-grid { grid-template-columns: 1fr 1fr; }
  .num:nth-child(3) { padding-left: 0; border-left: 0; }
  .num:nth-child(n+3) { border-top: 1px solid var(--line); margin-top: 2rem; }

  .exp-grid { grid-template-columns: 1fr; }
  .exp-head { position: static; }

  .card-feature { flex-direction: column; flex-basis: min(500px, 86vw); }
  .resto { max-width: 100%; }

  .proc-grid { display: flex; flex-direction: column; gap: 0; }
  .proc-visual { order: -1; position: sticky; top: 0; z-index: 2; background: var(--bg); padding: calc(var(--nav-h) - 4px) 0 .5rem; transition: background-color .7s var(--ease); }
  .proc-sticky { position: static; height: auto; }
  .diagram { max-height: 36svh; }
  .diagram .node text { font-size: 21px; transform: translateY(7px); }
  .diagram .node text.big { font-size: 28px; transform: translateY(4px); }
  .diagram .node text.sub, .diagram .mods text { display: none; }
  .diagram-caption { margin-top: .4rem; }
  .step { min-height: 58svh; }

  .odoo-band { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .hide-sm { display: none; }
  .nav-name { display: none; }
  .wa-float { width: 54px; height: 54px; padding: 0; justify-content: center; right: 14px; bottom: 14px; }
  .wa-float span { display: none; }
  .wa-float .ic { width: 26px; height: 26px; }
  .hero-meta { font-size: 10.5px; letter-spacing: .04em; }
  .hero-meta span { white-space: nowrap; }
  .hero-name { font-size: 21vw; }
  .hero-name .line-2 { padding-left: .25em; }
  .hero-cta { width: 100%; }
  .hero-cta .btn { flex: 1 1 auto; justify-content: center; }
  .marquee { margin-top: .5rem; }
  .perfil { height: 220vh; }
  .numbers-grid { grid-template-columns: 1fr; }
  .num, .num + .num { padding-left: 0; border-left: 0; }
  .num + .num { border-top: 1px solid var(--line); margin-top: 1.6rem; }
  .stack-grid { grid-template-columns: 1fr 1fr; }
  .stack-col, .stack-col + .stack-col { padding: 1.2rem .8rem 1.2rem 0; border-left: 0; }
  .stack-col:nth-child(even) { padding-left: .8rem; border-left: 1px solid var(--line); }
  .stack-col:nth-child(n+3) { border-top: 1px solid var(--line); }
  .stack-col:nth-child(4) { padding-left: .8rem; border-left: 1px solid var(--line); }
  .stack-col li { font-size: 14.5px; }
  .filter { width: 100%; }
  .filter button { flex: 1 1 auto; padding: 9px 10px; font-size: 13px; white-space: nowrap; }
  .versions ol { grid-template-columns: repeat(6, 1fr); }
  .modmap { grid-template-columns: repeat(3, 1fr); }
  .card { padding: 20px; min-height: 0; }
  .card-idx { font-size: 48px; }
  .semesters li { height: 34px; font-size: 9px; padding: 3px 4px; }
  .contact-links a { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .perfil { height: auto; }
  .perfil-pin { position: relative; height: auto; padding: 6rem 0; }
  .scrub .w { opacity: 1; }
  .ch { transform: none; }
  .diagram .edge { stroke-dashoffset: 0; }
  .diagram .node, .diagram .mods rect, .diagram .mods text { opacity: 1; transform: none; }
  .diagram .pk { display: none; }
}

@media print {
  .nav, .menu, .progress, .cursor, .hero-dots, .marquee, .badge-rig, .work-progress, .proc-visual, .filter { display: none !important; }
  body { background: #fff; color: #000; }
  .perfil { height: auto; }
  .perfil-pin { position: static; height: auto; }
  .scrub .w { opacity: 1; }
  html.js [data-reveal] { opacity: 1; transform: none; }
}
