/* ============================================================
   SANTIAGOMGV.COM — hoja de estilos oficial (y única)
   Estética: Y2K + brutalismo + dolor de ojos controlado
   ============================================================ */

/* ---------- 1. Tokens ---------- */
:root {
  --bg: #08070c;
  --bg-soft: #0d0b14;
  --card: #12101c;
  --card-2: #171426;
  --ink: #f3f0ea;
  --muted: #a09ab3;
  --dim: #6f6885;

  --acid: #d7ff3e;
  --pink: #ff3d8b;
  --cyan: #45e9ff;
  --violet: #9a6bff;
  --danger: #ff4d4d;

  --line: rgba(243, 240, 234, 0.13);
  --line-strong: rgba(243, 240, 234, 0.26);

  --font-display: "Arial Black", "Archivo Black", Impact, "Haettenschweiler", system-ui, sans-serif;
  --font-body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", "Courier New", monospace;
  --font-troll: "Comic Sans MS", "Comic Sans", cursive;

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --hard: 10px 10px 0 #000;

  --wrap: 1180px;
  --pad: clamp(18px, 4vw, 40px);
}

/* ---------- 2. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg, canvas { display: block; max-width: 100%; }
/* imprescindible: que [hidden] gane a los display:grid/flex de las capas */
[hidden] { display: none !important; }
button, input, textarea, select { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, figure, blockquote, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
::selection { background: var(--acid); color: #000; }

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

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(70vw 60vh at 78% -10%, rgba(154, 107, 255, 0.20), transparent 62%),
    radial-gradient(60vw 50vh at 4% 8%, rgba(215, 255, 62, 0.10), transparent 60%),
    radial-gradient(70vw 60vh at 50% 110%, rgba(255, 61, 139, 0.10), transparent 60%),
    var(--bg);
}

/* ---------- 3. Capas decorativas ---------- */
.grain {
  position: fixed;
  inset: -50%;
  z-index: 9000;
  pointer-events: none;
  opacity: 0.055;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grainShift 6s steps(6) infinite;
}
.scanlines {
  position: fixed;
  inset: 0;
  z-index: 8999;
  pointer-events: none;
  opacity: 0.35;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0 2px,
    rgba(0, 0, 0, 0.18) 2px 4px
  );
}
@keyframes grainShift {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -1%); }
  80% { transform: translate(3%, 3%); }
  100% { transform: translate(0, 0); }
}

/* ---------- 4. Utilidades ---------- */
.wrap {
  width: min(100% - (var(--pad) * 2), var(--wrap));
  margin-inline: auto;
}
.linkish {
  font: inherit;
  color: var(--acid);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  padding: 0;
}
.linkish:hover { color: var(--pink); }

/* ---------- 5. Botones ---------- */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  --btn-line: var(--line-strong);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.85em 1.35em;
  border: 1px solid var(--btn-line);
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, color 0.16s ease;
  will-change: transform;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.6); }
.btn:active { transform: translate(1px, 1px); box-shadow: none; }

.btn--sm { padding: 0.6em 1em; font-size: 0.68rem; }
.btn--big { padding: 1.05em 2em; font-size: 0.9rem; }

.btn--acid {
  --btn-bg: var(--acid);
  --btn-fg: #07060a;
  --btn-line: var(--acid);
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.65);
  font-weight: 800;
}
.btn--acid:hover { box-shadow: 9px 9px 0 rgba(0, 0, 0, 0.75); }

.btn--ghost { --btn-bg: rgba(255, 255, 255, 0.03); }
.btn--ghost:hover { --btn-bg: rgba(255, 255, 255, 0.09); border-color: var(--ink); }

.btn--danger {
  --btn-bg: var(--danger);
  --btn-fg: #180404;
  --btn-line: var(--danger);
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.6);
  animation: dangerPulse 2.6s ease-in-out infinite;
}
@keyframes dangerPulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.25); }
}

.btn--serio {
  --btn-line: var(--cyan);
  color: var(--cyan);
  border-style: dashed;
}
.btn--serio:hover { --btn-bg: var(--cyan); --btn-fg: #041014; }

.icon-btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-size: 1rem;
  line-height: 1;
  transition: background 0.16s ease, transform 0.16s ease;
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.08); transform: rotate(-8deg); }
.menu-btn { display: none; }

/* ---------- 6. Arranque ---------- */
.boot {
  position: fixed;
  inset: 0;
  z-index: 700;
  display: grid;
  place-items: center;
  padding: var(--pad);
  background:
    radial-gradient(60vw 60vh at 50% 40%, #141024, #05040a 70%);
  transition: opacity 0.5s ease, visibility 0.5s;
}
.boot.is-off { opacity: 0; visibility: hidden; pointer-events: none; }

.boot__win {
  width: min(560px, 100%);
  background: #100d1a;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.8), 0 0 0 1px #000;
  font-family: var(--font-mono);
}
.boot__titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 14px;
  background: linear-gradient(#2a2440, #191430);
  border-bottom: 1px solid var(--line);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}
.boot__title { color: var(--acid); font-weight: 700; }
.boot__ver { color: var(--dim); font-size: 0.6rem; }

.boot__screen { padding: 20px; }
.boot__log {
  min-height: 148px;
  margin: 0 0 16px;
  color: #9ef7b6;
  font-size: 0.72rem;
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
}
.boot__log .ok { color: var(--acid); }
.boot__log .warn { color: var(--pink); }
.boot__log .dim { color: var(--dim); }

.boot__progress { display: flex; align-items: center; gap: 12px; }
.boot__track {
  flex: 1;
  height: 12px;
  background: #05040a;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  padding: 2px;
}
.boot__fill {
  height: 100%;
  width: 0%;
  border-radius: 2px;
  background: repeating-linear-gradient(90deg, var(--acid) 0 10px, #a8cc22 10px 12px);
  transition: width 0.25s linear;
}
.boot__pct { font-size: 0.72rem; color: var(--acid); min-width: 4ch; text-align: right; }
.boot__hint {
  margin-top: 14px;
  font-size: 0.68rem;
  color: var(--dim);
}
#bootHint { color: var(--muted); }
.boot__foot {
  padding: 0 20px 18px;
  display: flex;
  justify-content: flex-end;
}

/* ---------- 7. Cabecera ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  gap: clamp(12px, 3vw, 34px);
  padding: 12px var(--pad);
  background: rgba(8, 7, 12, 0.78);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand__mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--acid);
  color: #07060a;
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: -0.04em;
  transform: rotate(-4deg);
  transition: transform 0.2s ease;
}
.brand:hover .brand__mark { transform: rotate(7deg) scale(1.06); }
.brand__txt {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: -0.02em;
}
.brand__txt em { font-style: normal; color: var(--dim); }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2vw, 26px);
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: lowercase;
}
.nav a { color: var(--muted); transition: color 0.15s ease; position: relative; }
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 1px;
  background: var(--acid);
  transition: width 0.2s ease;
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after { width: 100%; }
.nav__troll {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--pink);
  padding: 4px 10px;
  border: 1px dashed rgba(255, 61, 139, 0.5);
  border-radius: 999px;
  animation: trollBlink 3.4s steps(1) infinite;
}
@keyframes trollBlink {
  0%, 92%, 100% { opacity: 1; }
  94% { opacity: 0.25; }
  96% { opacity: 1; }
  97% { opacity: 0.2; }
}
.top__actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.nav + .top__actions { margin-left: 0; }

/* ---------- 8. Marquesina ---------- */
.ticker {
  overflow: hidden;
  background: var(--acid);
  color: #07060a;
  border-bottom: 1px solid #000;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.ticker__track {
  display: flex;
  width: max-content;
  gap: 0;
  padding: 7px 0;
  animation: ticker 46s linear infinite;
}
.ticker__track span { padding: 0 14px; white-space: nowrap; }
.ticker__sep { opacity: 0.45; }
@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- 9. Hero ---------- */
.hero {
  position: relative;
  padding: clamp(38px, 6vw, 78px) 0 clamp(26px, 4vw, 50px);
  overflow: hidden;
}
.hero__glow {
  position: absolute;
  top: -30%;
  right: -10%;
  width: 62vw;
  height: 62vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(215, 255, 62, 0.13), transparent 62%);
  filter: blur(30px);
  pointer-events: none;
}
.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: clamp(26px, 5vw, 64px);
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: clamp(10px, 2vw, 20px);
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 0 4px rgba(215, 255, 62, 0.15);
  animation: blink 1.8s ease-in-out infinite;
}
@keyframes blink { 50% { opacity: 0.25; } }

.hero__title {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 0.84;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  margin-left: -0.04em;
}
.hero__line1 {
  display: block;
  font-size: clamp(3.1rem, 9.8vw, 7.6rem);
  color: var(--ink);
}
.hero__line2 {
  display: block;
  font-size: clamp(3.4rem, 11.5vw, 9rem);
  color: var(--acid);
  text-shadow: 0 0 46px rgba(215, 255, 62, 0.22);
}
.reg {
  position: relative;
  top: -0.62em;
  font-family: var(--font-mono);
  font-size: 0.2em;
  letter-spacing: 0;
  color: var(--acid);
}

.glitch { position: relative; }
.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.glitch::before {
  color: var(--pink);
  transform: translate(-4px, 2px);
  clip-path: inset(0 0 58% 0);
  animation: glitchTop 5.5s steps(1) infinite;
  opacity: 0.75;
}
.glitch::after {
  color: var(--cyan);
  transform: translate(4px, -2px);
  clip-path: inset(58% 0 0 0);
  animation: glitchBot 4.7s steps(1) infinite;
  opacity: 0.7;
}
@keyframes glitchTop {
  0%, 88%, 100% { transform: translate(-4px, 2px); }
  90% { transform: translate(-9px, 1px); }
  92% { transform: translate(2px, -3px); }
  94% { transform: translate(-4px, 2px); }
}
@keyframes glitchBot {
  0%, 84%, 100% { transform: translate(4px, -2px); }
  86% { transform: translate(10px, 3px); }
  88% { transform: translate(-3px, 2px); }
  90% { transform: translate(4px, -2px); }
}

.hero__sub {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: clamp(14px, 2.4vw, 24px);
  font-family: var(--font-mono);
  font-size: clamp(0.78rem, 1.6vw, 0.95rem);
  color: var(--muted);
}
.prompt { color: var(--acid); }
.caret {
  display: inline-block;
  width: 9px;
  height: 1.05em;
  background: var(--acid);
  margin-left: 2px;
  animation: caret 1s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }

.hero__lead {
  max-width: 46ch;
  margin-top: clamp(14px, 2vw, 22px);
  font-size: clamp(0.95rem, 1.6vw, 1.06rem);
  color: #c9c4d6;
}
.hero__lead b { color: var(--ink); }

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(22px, 3.4vw, 34px);
}
.hero__fineprint {
  margin-top: 18px;
  font-size: 0.7rem;
  color: var(--dim);
  max-width: 50ch;
  line-height: 1.55;
}

/* Tarjeta de identidad */
.hero__side {
  position: relative;
  justify-self: center;
  width: min(100%, 390px);
  padding: 10px 0 26px;
}
.idcard {
  position: relative;
  padding: 18px 20px 20px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0) 40%),
    linear-gradient(180deg, #191527, #0e0c16);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform-style: preserve-3d;
  transition: transform 0.2s ease-out;
  overflow: hidden;
}
.idcard::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(115deg, transparent 0 22px, rgba(215, 255, 62, 0.045) 22px 24px);
  pointer-events: none;
}
.idcard__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
}
.idcard__live { display: inline-flex; align-items: center; gap: 6px; color: var(--acid); }
.idcard__live i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--acid);
  animation: blink 1.6s infinite;
}
.idcard__photo {
  width: 84px;
  height: 84px;
  margin: 16px 0 14px;
  display: grid;
  place-items: center;
  font-size: 2.4rem;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 26%, #2c2540, #141020);
  border: 1px solid var(--line-strong);
  box-shadow: 0 0 0 5px rgba(215, 255, 62, 0.08);
}
.idcard__name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: -0.03em;
  line-height: 1;
  text-transform: uppercase;
}
.idcard__role {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--muted);
}
.idcard__data {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.66rem;
}
.idcard__data li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px dashed rgba(243, 240, 234, 0.08);
}
.idcard__data span { color: var(--dim); }
.idcard__data b { font-weight: 600; }
.idcard__data b.ok { color: var(--acid); }
.idcard__barcode {
  height: 26px;
  margin-top: 16px;
  border-radius: 2px;
  background: repeating-linear-gradient(
    90deg,
    var(--ink) 0 2px, transparent 2px 5px,
    var(--ink) 5px 6px, transparent 6px 11px,
    var(--ink) 11px 14px, transparent 14px 17px
  );
  opacity: 0.75;
}
.idcard__id {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  color: var(--dim);
  text-transform: uppercase;
}

.sticker {
  position: absolute;
  top: -26px;
  right: -14px;
  width: 138px;
  height: 138px;
  z-index: 3;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.45));
}
.sticker__ring { position: absolute; inset: 0; animation: spin 22s linear infinite; }
.sticker__ring text {
  fill: var(--acid);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}
.sticker__core {
  position: relative;
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  font-size: 1.7rem;
  border-radius: 50%;
  background: #0b0a12;
  border: 1px solid var(--line-strong);
}
@keyframes spin { to { transform: rotate(360deg); } }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(18, 16, 28, 0.9);
  backdrop-filter: blur(8px);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--muted);
}
.pill__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--acid); }
.pill--float {
  position: absolute;
  left: -6px;
  bottom: 2px;
  z-index: 4;
  animation: float 5s ease-in-out infinite;
}
@keyframes float { 50% { transform: translateY(-8px); } }

/* Estadísticas */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: clamp(34px, 5vw, 58px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stats li {
  padding: 18px 16px 20px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.stats li:last-child { border-right: 0; }
.stats b {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--acid);
}
.stats span { font-family: var(--font-mono); font-size: 0.6rem; color: var(--dim); line-height: 1.4; }

/* ---------- 10. Secciones ---------- */
.section { padding: clamp(64px, 9vw, 118px) 0; }
.section--tight { padding-block: clamp(50px, 7vw, 86px); }

.sec-head {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 6px 18px;
  margin-bottom: clamp(28px, 4vw, 48px);
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.sec-head__num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--acid);
  letter-spacing: 0.1em;
}
.sec-head__title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4.4vw, 3.1rem);
  line-height: 0.95;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}
.sec-head__sub {
  grid-column: 2;
  color: var(--muted);
  font-size: 0.88rem;
  max-width: 58ch;
}
.sec-head--light .sec-head__title { color: var(--ink); }
.sec-head--light { border-bottom-color: rgba(255, 255, 255, 0.16); }

/* ---------- 11. Sobre mí ---------- */
.about {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
  gap: clamp(28px, 5vw, 60px);
  align-items: start;
}
.about__main p { color: #c5c0d2; max-width: 62ch; margin-bottom: 1em; }
.about__lead {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.45;
  color: var(--ink) !important;
  margin-bottom: 1.1em !important;
}
.about__lead b { color: var(--acid); }
.about code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: rgba(215, 255, 62, 0.1);
  color: var(--acid);
  padding: 1px 6px;
  border-radius: 4px;
}
.about em { color: var(--pink); font-style: normal; }

.skills { margin-top: clamp(24px, 3vw, 36px); display: grid; gap: 12px; }
.skill {
  display: grid;
  grid-template-columns: minmax(120px, 0.9fr) minmax(0, 1.6fr) 48px;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--muted);
}
.skill i {
  position: relative;
  height: 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}
.skill i::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--v, 50%);
  border-radius: 99px;
  background: linear-gradient(90deg, var(--acid), #8fe000);
  transform-origin: left;
  animation: growBar 1.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.skill--bad::before { background: linear-gradient(90deg, var(--pink), #ff7a3d) !important; }
.skill b { text-align: right; color: var(--ink); font-weight: 600; }
@keyframes growBar { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.about__side { display: grid; gap: 16px; }

.nowplaying {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--card);
}
.nowplaying__head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  color: var(--dim);
}
.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 10px; }
.eq i { width: 2px; background: var(--acid); animation: eq 1s ease-in-out infinite; }
.eq i:nth-child(1) { height: 40%; animation-delay: 0s; }
.eq i:nth-child(2) { height: 90%; animation-delay: 0.18s; }
.eq i:nth-child(3) { height: 60%; animation-delay: 0.36s; }
.eq i:nth-child(4) { height: 100%; animation-delay: 0.54s; }
@keyframes eq { 50% { transform: scaleY(0.3); } }

.nowplaying__track { font-family: var(--font-display); font-size: 1.25rem; margin-top: 10px; text-transform: uppercase; }
.nowplaying__artist { font-family: var(--font-mono); font-size: 0.64rem; color: var(--dim); margin-top: 2px; }
.nowplaying__bar { height: 3px; background: rgba(255, 255, 255, 0.1); border-radius: 99px; margin-top: 14px; overflow: hidden; }
.nowplaying__bar i { display: block; width: 34%; height: 100%; background: var(--acid); animation: progress 9s linear infinite; }
@keyframes progress { from { width: 12%; } to { width: 100%; } }
.nowplaying__time { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 0.56rem; color: var(--dim); margin-top: 6px; }

.sitebadge {
  position: relative;
  padding: 18px;
  border: 1px dashed rgba(215, 255, 62, 0.45);
  border-radius: var(--r-md);
  background: rgba(215, 255, 62, 0.04);
  overflow: hidden;
}
.sitebadge__title { font-family: var(--font-mono); font-size: 0.55rem; letter-spacing: 0.18em; color: var(--dim); }
.sitebadge__who { font-family: var(--font-display); font-size: 1.5rem; color: var(--acid); text-transform: uppercase; letter-spacing: -0.02em; }
.sitebadge__small { font-family: var(--font-mono); font-size: 0.58rem; color: var(--dim); }
.sitebadge__seal {
  position: absolute;
  right: -12px;
  bottom: -18px;
  font-size: 5rem;
  color: rgba(215, 255, 62, 0.12);
  transform: rotate(-12deg);
  font-family: var(--font-display);
}

/* ---------- 12. Proyectos ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 22px);
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, var(--card-2), var(--card));
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 60% at 100% 0%, rgba(215, 255, 62, 0.08), transparent 70%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.card:hover { transform: translate(-5px, -5px); border-color: var(--line-strong); box-shadow: 8px 8px 0 rgba(215, 255, 62, 0.9); }
.card:hover::before { opacity: 1; }
.card--cta { border-style: dashed; border-color: rgba(215, 255, 62, 0.4); }

.card__top { display: flex; align-items: center; justify-content: space-between; }
.card__tag {
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--acid);
  border: 1px solid rgba(215, 255, 62, 0.35);
  border-radius: 99px;
  padding: 3px 9px;
}
.card__idx { font-family: var(--font-mono); font-size: 0.62rem; color: var(--dim); }
.card__title {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.6vw, 1.9rem);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-top: 4px;
}
.card__desc { font-size: 0.88rem; color: var(--muted); flex: 1; }
.card__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.card__status { font-family: var(--font-mono); font-size: 0.58rem; text-transform: uppercase; letter-spacing: 0.08em; }
.card__status--ok { color: #8ff08f; }
.card__status--wip { color: #ffd166; }
.card__status--hot { color: var(--pink); }

/* con 5 tarjetas, "tu proyecto" pasa a ser una banda a todo el ancho */
@media (min-width: 821px) {
  .card--cta {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    gap: 18px;
    padding: 20px 28px;
  }
  .card--cta .card__top {
    flex: 0 0 auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }
  .card--cta .card__title { margin: 0; font-size: clamp(1.1rem, 1.9vw, 1.45rem); }
  .card--cta .card__desc { flex: 1 1 auto; margin: 0; }
  .card--cta .card__foot { flex: 0 0 auto; margin: 0; gap: 16px; }
}

/* ---------- 13. Testimonios ---------- */
.quotes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2vw, 22px); }
.quote {
  padding: clamp(20px, 2.6vw, 26px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--card);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.quote__stars { color: var(--acid); letter-spacing: 2px; font-size: 0.85rem; }
.quote blockquote { font-size: 0.95rem; line-height: 1.5; color: #d3cede; }
.quote figcaption { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 8px; }
.quote__ava {
  width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: 50%; background: #1e1a2e; border: 1px solid var(--line);
  font-size: 1.1rem;
}
.quote figcaption b { display: block; font-size: 0.78rem; }
.quote figcaption small { font-family: var(--font-mono); font-size: 0.58rem; color: var(--dim); }

/* ---------- 14. Sección hackeo ---------- */
.hack {
  position: relative;
  padding: clamp(58px, 8vw, 100px) 0;
  background: #050409;
  border-block: 1px solid rgba(215, 255, 62, 0.18);
  overflow: hidden;
  isolation: isolate;
}
.hack__canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.5; z-index: -1; }
.hack__inner { position: relative; }

.terminal {
  border: 1px solid rgba(215, 255, 62, 0.28);
  border-radius: var(--r-md);
  background: rgba(7, 6, 12, 0.86);
  backdrop-filter: blur(10px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7), 0 0 40px rgba(215, 255, 62, 0.05);
  overflow: hidden;
  font-family: var(--font-mono);
}
.terminal__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  background: #100e19;
  border-bottom: 1px solid rgba(215, 255, 62, 0.18);
  font-size: 0.62rem;
}
.terminal__dots { display: flex; gap: 5px; }
.terminal__dots i { width: 8px; height: 8px; border-radius: 50%; background: #3a3350; }
.terminal__dots i:first-child { background: #ff5f57; }
.terminal__dots i:nth-child(2) { background: #febc2e; }
.terminal__dots i:nth-child(3) { background: #28c840; }
.terminal__name { color: var(--dim); }
.terminal__x { margin-left: auto; color: var(--dim); font-size: 0.75rem; padding: 0 4px; }
.terminal__x:hover { color: var(--pink); }

.terminal__log {
  min-height: 210px;
  max-height: 320px;
  overflow: auto;
  margin: 0;
  padding: 18px;
  font-size: 0.74rem;
  line-height: 1.85;
  color: #9ef7b6;
  white-space: pre-wrap;
  word-break: break-word;
}
.terminal__log .t-dim { color: #5f6a72; }
.terminal__log .t-warn { color: #ffcf5c; }
.terminal__log .t-bad { color: var(--pink); }
.terminal__log .t-ok { color: var(--acid); }

.terminal__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}
.terminal__count { margin-left: auto; font-size: 0.6rem; color: var(--dim); }
.terminal__count b { color: var(--acid); }

/* ---------- 15. FAQ ---------- */
.faq { border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 2px;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  letter-spacing: -0.02em;
  list-style: none;
  transition: color 0.15s ease, padding-left 0.2s ease;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+";
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--acid);
  transition: transform 0.22s ease;
  flex-shrink: 0;
}
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item summary:hover { color: var(--acid); padding-left: 8px; }
.faq__item p { padding: 0 2px 22px; color: var(--muted); max-width: 70ch; font-size: 0.92rem; }

/* ---------- 16. Pie ---------- */
.foot {
  background: #050409;
  border-top: 1px solid var(--line);
  padding: clamp(46px, 6vw, 70px) 0 30px;
}
.foot__inner { display: grid; grid-template-columns: 1fr auto; gap: 30px 40px; align-items: start; }
.foot__brand { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.foot__brand p { font-size: 0.85rem; }
.foot__brand small { font-family: var(--font-mono); font-size: 0.6rem; color: var(--dim); }
.foot__fine { font-family: var(--font-troll); font-size: 0.7rem !important; color: var(--pink); }
.foot__badges { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.badge98 {
  width: 88px;
  height: 31px;
  display: grid;
  place-items: center;
  border: 2px solid currentColor;
  font-family: var(--font-mono);
  font-size: 8px;
  line-height: 1.15;
  text-align: center;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  image-rendering: pixelated;
}
.badge98--green { color: #7dff7d; background: #04220a; }
.badge98--blue { color: #8fc6ff; background: #041226; }
.badge98--pink { color: var(--pink); background: #24030f; }
.badge98--black { color: #cfcfcf; background: #111; }

.foot__links {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  padding: 20px 0;
  border-block: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
}
.foot__links a:hover { color: var(--acid); }
.foot__links .linkish { font-size: 0.7rem; }

.foot__bottom {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--dim);
}
.foot__exit .linkish { font-size: 0.6rem; color: var(--pink); }

/* ---------- 17. Ventanas troll ---------- */
.windows { position: fixed; inset: 0; z-index: 600; pointer-events: none; }

.win {
  position: fixed;
  display: flex;
  flex-direction: column;
  width: var(--w, 372px);
  max-width: calc(100vw - 16px);
  max-height: min(78vh, 660px);
  max-height: min(78dvh, 660px);
  background: #15121f;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--r-md);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.72), 0 0 0 1px rgba(0, 0, 0, 0.5);
  pointer-events: auto;
  overflow: hidden;
  animation: winIn 0.24s cubic-bezier(0.2, 1.3, 0.4, 1);
  font-family: var(--font-body);
}
@keyframes winIn {
  from { opacity: 0; transform: scale(0.9) translateY(8px); }
  to { opacity: 1; transform: none; }
}
.win.is-closing { animation: winOut 0.18s ease forwards; }
@keyframes winOut {
  to { opacity: 0; transform: scale(0.92) translateY(6px); }
}
.win.is-shake { animation: shake 0.4s ease; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-9px) rotate(-1deg); }
  40% { transform: translateX(8px) rotate(1deg); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(4px); }
}

.win__bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px 9px 12px;
  background: linear-gradient(#262039, #1a1628);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.win__bar:active { cursor: grabbing; }
.win__icon { font-size: 0.95rem; line-height: 1; }
.win__title {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #ded9e8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.win__btns { display: flex; gap: 5px; }
.win__btn {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 0.62rem;
  line-height: 1;
  transition: background 0.15s ease, transform 0.15s ease;
}
.win__btn:hover { background: var(--pink); transform: scale(1.12); }

.win__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 16px;
  font-size: 0.84rem;
  color: #c9c4d7;
}
.win__body p { margin-bottom: 10px; }
.win__body p:last-child { margin-bottom: 0; }
.win__body b { color: var(--ink); }
.win__body .win__big {
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.1;
  color: var(--acid);
  text-transform: uppercase;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.win__body .win__art { font-size: 2.2rem; line-height: 1; margin-bottom: 10px; }
.win__body .win__mono { font-family: var(--font-mono); font-size: 0.68rem; color: var(--dim); }
.win__body input[type="email"] {
  width: 100%;
  padding: 10px 12px;
  background: #0b0912;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  font-size: 0.8rem;
  margin-bottom: 10px;
}
.win__actions { flex: 0 0 auto; display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 16px; }
.win__actions .btn { flex: 1; min-width: 110px; }

/* menú dentro de una ventana (móvil) */
.win--menu .win__body { padding: 8px 0; }
.menu-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--ink);
  text-decoration: none;
  width: 100%;
  text-align: left;
}
.menu-row:last-child { border-bottom: 0; }
.menu-row span { color: var(--dim); font-size: 0.6rem; letter-spacing: 0.08em; }
.menu-row:hover, .menu-row:active { background: rgba(215, 255, 62, 0.07); color: var(--acid); }
.menu-row--troll { color: var(--pink); }

/* mini-scan dentro de ventana */
.scan { padding: 4px 0; }
.scan__track { height: 10px; background: #0b0912; border: 1px solid var(--line-strong); border-radius: 99px; overflow: hidden; }
.scan__fill { height: 100%; width: 0%; background: repeating-linear-gradient(90deg, var(--acid) 0 8px, #a8cc22 8px 10px); transition: width 0.2s linear; }
.scan__pct { font-family: var(--font-mono); font-size: 0.66rem; color: var(--acid); margin-top: 6px; }
.scan__list { margin-top: 12px; display: grid; gap: 6px; font-family: var(--font-mono); font-size: 0.68rem; }
.scan__row { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px dashed rgba(255, 255, 255, 0.08); padding-bottom: 5px; }
.scan__row b { color: var(--pink); }
.scan__row.is-ok b { color: #7dff9a; }

.nuke {
  position: fixed;
  right: 22px;
  bottom: 96px;
  z-index: 640;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: #08070c;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: transform 0.15s ease;
}
.nuke:hover { transform: scale(1.05); background: var(--pink); color: #fff; }

/* ---------- 18. Toasts ---------- */
.toasts {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 650;
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
  pointer-events: none;
  max-width: min(320px, calc(100vw - 36px));
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 13px;
  background: rgba(21, 18, 31, 0.97);
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--acid);
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5);
  font-size: 0.74rem;
  color: #d5d0e2;
  animation: toastIn 0.28s cubic-bezier(0.2, 1.2, 0.4, 1);
  pointer-events: auto;
}
.toast.is-out { animation: toastOut 0.25s ease forwards; }
.toast__icon { font-size: 1rem; line-height: 1.2; }
.toast__txt b { display: block; font-size: 0.72rem; color: var(--ink); margin-bottom: 1px; }
.toast__x { margin-left: auto; color: var(--dim); font-size: 0.8rem; }
@keyframes toastIn { from { opacity: 0; transform: translateX(-14px); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(-14px); } }

/* ---------- 19. Cookies ---------- */
.cookies {
  position: fixed;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  z-index: 590; /* por debajo de las ventanas: si abres el show, el banner espera */
  width: min(760px, calc(100% - 24px));
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: #12101c;
  border: 1px solid rgba(215, 255, 62, 0.6);
  border-radius: var(--r-md);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(0, 0, 0, 0.5);
  transition: transform 0.25s cubic-bezier(0.2, 1.2, 0.4, 1), opacity 0.25s;
}
.cookies.is-off { opacity: 0; transform: translate(-50%, 130%); pointer-events: none; }
.cookies__icon { font-size: 1.6rem; flex-shrink: 0; }
.cookies__txt { flex: 1; min-width: 0; }
.cookies__txt b { font-size: 0.8rem; }
.cookies__txt p { font-size: 0.68rem; color: var(--muted); line-height: 1.45; margin-top: 2px; }
.cookies__txt .linkish { font-size: 0.68rem; }
.cookies__btns { display: flex; gap: 8px; flex-shrink: 0; }
#cookieAccept { transition: transform 0.15s ease; }

/* ---------- 20. Chat ---------- */
.chat { position: fixed; right: 18px; bottom: 18px; z-index: 645; }
.chat.is-open .chat__bubble { display: none; }
.chat__bubble {
  position: relative;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--acid);
  font-size: 1.4rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45), 0 0 0 5px rgba(215, 255, 62, 0.12);
  transition: transform 0.2s ease;
}
.chat__bubble:hover { transform: scale(1.08) rotate(-6deg); }
.chat__badge {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--pink);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  animation: blink 1.6s ease-in-out infinite;
}
.chat__panel {
  position: absolute;
  right: 0;
  bottom: 70px;
  width: min(352px, calc(100vw - 32px));
  height: min(468px, calc(100vh - 140px));
  display: flex;
  flex-direction: column;
  background: #12101c;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.65);
  overflow: hidden;
  animation: winIn 0.22s cubic-bezier(0.2, 1.2, 0.4, 1);
}
.chat__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  background: linear-gradient(#221d34, #171326);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.68rem;
}
.chat__who { display: flex; align-items: center; gap: 7px; }
.chat__who small { color: var(--dim); font-size: 0.58rem; }
.chat__dot { width: 7px; height: 7px; border-radius: 50%; background: #7dff9a; }
.chat__close { color: var(--dim); font-size: 0.8rem; }
.chat__close:hover { color: var(--pink); }

.chat__body { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.msg { display: flex; gap: 8px; max-width: 92%; }
.msg--user { align-self: flex-end; flex-direction: row-reverse; }
.msg__ava { width: 26px; height: 26px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; background: #221d34; font-size: 0.8rem; }
.msg__bubble {
  padding: 9px 12px;
  border-radius: 12px;
  border-top-left-radius: 4px;
  background: #1c1829;
  font-size: 0.78rem;
  line-height: 1.45;
  color: #d5d0e2;
}
.msg--user .msg__bubble { background: var(--acid); color: #07060a; border-radius: 12px; border-top-right-radius: 4px; border-top-left-radius: 12px; }
.msg--typing .msg__bubble { display: flex; gap: 4px; padding: 12px; }
.msg--typing i { width: 5px; height: 5px; border-radius: 50%; background: var(--muted); animation: typing 1.1s infinite; }
.msg--typing i:nth-child(2) { animation-delay: 0.15s; }
.msg--typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); opacity: 0.5; } 30% { transform: translateY(-4px); opacity: 1; } }

.chat__form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); background: #0e0c16; }
.chat__input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  background: #171426;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.76rem;
}
.chat__input::placeholder { color: var(--dim); }
.chat__send {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--acid);
  color: #07060a;
  font-size: 0.9rem;
}

/* ---------- 21. Modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 800;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(4, 3, 8, 0.78);
  backdrop-filter: blur(9px);
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } }
.modal__box {
  width: min(500px, 100%);
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  background: #12101c;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  padding: clamp(22px, 4vw, 30px);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8);
  animation: winIn 0.26s cubic-bezier(0.2, 1.2, 0.4, 1);
}
.modal__art { font-size: 3rem; line-height: 1; margin-bottom: 12px; }
.modal__title {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3.4vw, 1.9rem);
  line-height: 1;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.modal__text { font-size: 0.88rem; color: var(--muted); margin-bottom: 14px; }
.modal__text b { color: var(--ink); }
.modal__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }

.player {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  background: #05040a;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.player::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.03) 0 8px, transparent 8px 16px);
}
.player__play {
  position: relative;
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #000;
  font-size: 1.2rem;
  padding-left: 4px;
  transition: transform 0.2s ease;
}
.player__play:hover { transform: scale(1.1); }
.player__label {
  position: absolute;
  bottom: 10px;
  left: 12px;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--dim);
}

/* ---------- 22. Pantalla azul ---------- */
.bsod {
  position: fixed;
  inset: 0;
  z-index: 950;
  background: #0a56c8;
  color: #fff;
  display: grid;
  place-items: center;
  padding: var(--pad);
  font-family: "Segoe UI", var(--font-body);
  animation: fadeIn 0.15s ease;
  cursor: pointer;
}
.bsod__inner { width: min(720px, 100%); }
.bsod__face { font-size: clamp(4rem, 12vw, 7rem); font-weight: 200; line-height: 1; margin-bottom: 18px; }
.bsod__title { font-size: clamp(1.2rem, 3vw, 1.7rem); font-weight: 300; margin-bottom: 18px; }
.bsod__text { font-size: clamp(0.8rem, 1.8vw, 0.95rem); line-height: 1.6; opacity: 0.92; margin-bottom: 22px; max-width: 62ch; }
.bsod__pct { font-family: var(--font-mono); font-size: 0.8rem; opacity: 0.85; }
.bsod__meta { margin-top: 18px; font-family: var(--font-mono); font-size: 0.62rem; opacity: 0.65; line-height: 1.6; }
.bsod__hint { margin-top: 26px; font-size: 0.72rem; opacity: 0.6; }

/* ---------- 23. Cursor propio ---------- */
.cursor { position: fixed; top: 0; left: 0; z-index: 9998; pointer-events: none; mix-blend-mode: difference; }
.cursor__ring {
  position: absolute;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border: 1.5px solid #fff;
  border-radius: 50%;
  transition: width 0.18s ease, height 0.18s ease, margin 0.18s ease, opacity 0.2s ease;
}
.cursor__dot {
  position: absolute;
  width: 5px;
  height: 5px;
  margin: -2.5px 0 0 -2.5px;
  background: #fff;
  border-radius: 50%;
}
.cursor.is-hover .cursor__ring { width: 54px; height: 54px; margin: -27px 0 0 -27px; opacity: 0.65; }
.cursor.is-hidden { opacity: 0; }

/* ---------- 24. Confeti y explosiones ---------- */
.confetti, .burst {
  position: fixed;
  z-index: 990;
  pointer-events: none;
  border-radius: 2px;
}
.burst { font-size: 18px; line-height: 1; border-radius: 0; }

/* ---------- 25. Modo dios ---------- */
body.god-mode { animation: hue 3s linear infinite; }
@keyframes hue { to { filter: hue-rotate(360deg); } }

/* ---------- 26. Responsive ---------- */
section[id] { scroll-margin-top: 84px; }

@media (max-width: 1024px) {
  .hero__grid { grid-template-columns: 1fr; gap: 44px; }
  .hero__side { justify-self: start; width: min(100%, 420px); margin-top: 4px; }
  .about { grid-template-columns: 1fr; }
  .about__side { grid-template-columns: 1fr 1fr; }
  .quotes { grid-template-columns: 1fr; }
  .foot__inner { grid-template-columns: 1fr; }
  .foot__badges { justify-content: flex-start; }
}

/* tablet: la ficha ocupa el ancho y se reorganiza en horizontal */
@media (min-width: 641px) and (max-width: 1024px) {
  .hero__side { width: 100%; max-width: 100%; }
  .idcard {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    grid-template-areas:
      "top top"
      "photo name"
      "photo role"
      "data data"
      "barcode barcode"
      "id id";
    column-gap: 20px;
    align-items: center;
    padding: 18px 22px 20px;
  }
  .idcard__top { grid-area: top; padding-right: 118px; }
  .idcard__photo { grid-area: photo; align-self: start; margin: 14px 0 6px; }
  .idcard__name { grid-area: name; align-self: end; }
  .idcard__role { grid-area: role; align-self: start; margin-top: 4px; }
  .idcard__data { grid-area: data; }
  .idcard__barcode { grid-area: barcode; max-width: 340px; }
  .idcard__id { grid-area: id; }
  .sticker { top: -26px; right: 6px; width: 118px; height: 118px; }
  .sticker__core { width: 54px; height: 54px; font-size: 1.5rem; }
  .sticker__ring text { font-size: 13px; }
}

@media (max-width: 820px) {
  .nav { display: none; }
  .menu-btn { display: grid; }
  .cards { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats li:nth-child(2) { border-right: 0; }
  .stats li:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .about__side { grid-template-columns: 1fr; }
  .sec-head { grid-template-columns: auto 1fr; }
  .sec-head__sub { grid-column: 1 / -1; }
  .terminal__count { margin-left: 0; }
}

/* ---------- 26.3 Móvil ---------- */
@media (max-width: 640px) {
  :root { --pad: 16px; }

  .top { gap: 8px; padding: 10px 14px; }
  .brand__txt { font-size: 0.74rem; }
  .brand__mark { width: 34px; height: 34px; font-size: 0.85rem; }
  .icon-btn { width: 38px; height: 38px; font-size: 0.9rem; }
  .btn--sm { padding: 0.55em 0.85em; font-size: 0.63rem; }
  .btn--serio { padding: 0.62em 0.8em; font-size: 0.58rem; }

  .hero { padding-top: 26px; }
  .hero__grid { gap: 30px; }
  .kicker { font-size: 0.58rem; letter-spacing: 0.1em; }
  .hero__title { line-height: 0.88; }
  .hero__line1 { font-size: clamp(2.9rem, 16vw, 4.6rem); }
  .hero__line2 { font-size: clamp(3.2rem, 18vw, 5.2rem); }
  .hero__sub { font-size: 0.78rem; }
  .hero__lead { font-size: 0.94rem; max-width: 100%; }
  .hero__cta { gap: 8px; }
  .hero__cta .btn { flex: 1 1 45%; min-height: 44px; }
  .hero__cta .btn--big { flex-basis: 100%; }
  .hero__fineprint { font-size: 0.63rem; }

  .hero__side {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 0 0 30px;
  }
  .idcard { width: 100%; padding: 16px 16px 18px; border-radius: 18px; }
  .idcard__photo { width: 64px; height: 64px; font-size: 1.9rem; margin: 12px 0 10px; }
  .idcard__name { font-size: 1.3rem; }
  .idcard__role { font-size: 0.62rem; }
  /* el sello pasa a ser una insignia encima de la ficha, sin taparla */
  .sticker {
    position: relative;
    top: auto;
    right: auto;
    width: 88px;
    height: 88px;
    margin: 0 6px 10px auto;
  }
  .sticker__core { width: 46px; height: 46px; font-size: 1.2rem; }
  .sticker__ring text { font-size: 15px; letter-spacing: 0.8px; }
  .pill--float { left: 6px; bottom: 2px; font-size: 0.58rem; }

  .stats { margin-top: 28px; }
  .stats li { padding: 13px 11px 15px; }
  .stats b { font-size: 1.45rem; }
  .stats span { font-size: 0.54rem; }

  .section { padding-block: 54px; }
  .section--tight { padding-block: 42px; }
  .sec-head { gap: 4px 12px; margin-bottom: 24px; padding-bottom: 14px; }
  .sec-head__title { font-size: clamp(1.55rem, 8vw, 2.2rem); }
  .sec-head__sub { font-size: 0.8rem; }

  .about__lead { font-size: 1.04rem; }
  .about__main p { font-size: 0.92rem; }
  .skills { gap: 14px; }
  .skill {
    grid-template-columns: 1fr auto;
    grid-template-areas: "label value" "bar bar";
    row-gap: 5px;
    font-size: 0.62rem;
  }
  .skill span { grid-area: label; }
  .skill b { grid-area: value; }
  .skill i { grid-area: bar; height: 7px; }

  .about__side { gap: 12px; }
  .nowplaying, .sitebadge { padding: 16px; }

  .cards { gap: 12px; }
  .card { padding: 20px; border-radius: 18px; }
  .card:hover { transform: none; box-shadow: none; border-color: var(--line); }
  .card:active { transform: scale(0.985); background: var(--card-2); }
  .card__foot { gap: 8px; }

  .quote { padding: 20px; }

  .hack { padding-block: 46px; }
  .terminal__log { min-height: 186px; max-height: 250px; padding: 14px; font-size: 0.65rem; line-height: 1.75; }
  .terminal__foot { padding: 12px; gap: 8px; }
  .terminal__foot .btn { flex: 1 1 100%; min-height: 42px; }
  .terminal__count { width: 100%; text-align: center; font-size: 0.56rem; }

  .faq__item summary { padding: 16px 0; font-size: 1rem; }
  .faq__item p { font-size: 0.86rem; padding-bottom: 18px; }

  .foot { padding-top: 40px; }
  .foot__inner { gap: 22px; }
  .foot__badges { display: flex; gap: 6px; }
  .badge98 { width: 74px; height: 27px; font-size: 7px; }
  .foot__links { gap: 12px 18px; font-size: 0.64rem; padding: 16px 0; }
  .foot__bottom { font-size: 0.55rem; gap: 8px; }
  .foot__bottom p { width: 100%; }

  /* --- capas flotantes: que no se pisen entre ellas --- */
  .cookies {
    left: 8px;
    right: 8px;
    bottom: calc(8px + env(safe-area-inset-bottom));
    width: auto;
    transform: none;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: "icon txt" "btns btns";
    align-items: start;
    padding: 12px 14px;
    gap: 8px 10px;
    border-radius: 16px;
  }
  .cookies.is-off { transform: translateY(150%); }
  .cookies__icon { grid-area: icon; font-size: 1.25rem; }
  .cookies__txt { grid-area: txt; min-width: 0; }
  .cookies__txt b { font-size: 0.76rem; }
  .cookies__txt p { font-size: 0.63rem; }
  .cookies__btns { grid-area: btns; width: 100%; gap: 6px; }
  .cookies__btns .btn { flex: 1; min-height: 42px; font-size: 0.56rem; padding-inline: 6px; }

  /* con el banner abierto, o con ventanas en pantalla, no tapamos nada */
  body.cookies-open .chat,
  body.cookies-open .toasts,
  body.has-windows .toasts,
  body.has-windows .chat,
  body.has-windows .cookies,
  body.chat-open .toasts { display: none; }

  .chat { right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); }
  .chat__bubble { width: 52px; height: 52px; font-size: 1.25rem; }
  .chat__panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    width: auto;
    height: 78dvh;
    max-height: 78dvh;
    border-radius: 18px 18px 0 0;
    border-bottom: 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .chat__panel::before {
    content: "";
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 4px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.18);
  }
  .chat__head { padding-top: 16px; }
  .chat__close { width: 40px; height: 40px; display: grid; place-items: center; font-size: 1rem; }
  .chat__input { font-size: 16px; min-height: 42px; }
  .chat__send { width: 42px; height: 42px; }

  .nuke {
    top: 96px;
    bottom: auto;
    right: 10px;
    font-size: 0.56rem;
    padding: 8px 12px;
  }

  .toasts {
    left: 10px;
    right: 10px;
    bottom: calc(74px + env(safe-area-inset-bottom));
    max-width: none;
  }
  .toast { font-size: 0.7rem; padding: 10px 12px; }

  /* las ventanas las coloca el JS: aquí solo el aspecto */
  .win { border-radius: 16px; }
  .win__bar { padding: 12px 12px 12px 14px; }
  .win__btn { width: 30px; height: 30px; font-size: 0.72rem; }
  .win__title { font-size: 0.68rem; }
  .win__body { padding: 14px; font-size: 0.82rem; }
  .win__actions { padding: 0 14px 14px; }
  .win__actions .btn { min-height: 42px; }
  .win--menu .win__body { padding: 6px 0; }
  .menu-row { padding: 16px 18px; font-size: 0.8rem; }

  .modal { padding: 0; align-items: end; }
  .modal__box {
    width: 100%;
    max-height: 88dvh;
    border-radius: 18px 18px 0 0;
    padding: 22px 18px calc(22px + env(safe-area-inset-bottom));
  }
  .modal__actions .btn { min-height: 44px; }

  .bsod { padding: 22px; }
  .bsod__face { font-size: 3.4rem; margin-bottom: 10px; }
  .bsod__title { font-size: 1.12rem; margin-bottom: 12px; }
  .bsod__text { font-size: 0.78rem; }
  .bsod__meta { font-size: 0.55rem; }
  .bsod__hint { font-size: 0.64rem; margin-top: 18px; }

  .boot { padding: 12px; }
  .boot__win { border-radius: 12px; }
  .boot__screen { padding: 16px; }
  .boot__log { min-height: 98px; font-size: 0.62rem; line-height: 1.65; }
  .boot__foot { padding: 0 16px 14px; }
  .boot__hint { font-size: 0.6rem; }
}

@media (max-width: 380px) {
  .brand__txt { display: none; }
  .hero__line1 { font-size: 2.7rem; }
  .hero__line2 { font-size: 3rem; }
  .hero__cta .btn { font-size: 0.62rem; padding: 0.9em 1em; }
  .stats b { font-size: 1.25rem; }
  .stats span { font-size: 0.5rem; }
  .badge98:nth-child(n + 3) { display: none; }
}

/* móvil en horizontal: que quepa el hero y las ventanas */
@media (max-height: 520px) and (orientation: landscape) {
  .hero { padding-top: 16px; }
  .hero__side { padding-top: 70px; }
  .win { max-height: 88dvh; }
  .chat__panel { height: 92dvh; max-height: 92dvh; }
  .boot__log { min-height: 60px; }
}

/* ---------- 27. Accesibilidad: menos movimiento ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .grain, .scanlines { display: none; }
  .ticker__track { animation: none; }
  .cursor { display: none; }
}

/* Usuarios táctiles: sin cursor propio ni efectos de ratón */
@media (pointer: coarse) {
  .cursor { display: none; }
  .cursor ~ * { cursor: auto; }
}
