/* ============================================================
   DevCarlos — Solo Leveling Theme
   Inspired by the System UI from Solo Leveling anime/manhwa
   ============================================================ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --bg: #000308;
  --bg2: #020610;
  --surface: rgba(2, 10, 28, 0.85);
  --surface-2: rgba(4, 15, 38, 0.9);
  --neon: #b84dff;
  --neon-bright: #ed8aff;
  --neon-dim: rgba(184, 77, 255, 0.18);
  --neon-glow: rgba(184, 77, 255, 0.55);
  --electric: #c45aff;
  --electric-2: #f2a2ff;
  --text: #eadcfb;
  --text-bright: #fff4ff;
  --muted: #b09ac9;
  --border: rgba(184, 77, 255, 0.3);
  --border-dim: rgba(184, 77, 255, 0.12);
  --r: 4px;
  --ease: cubic-bezier(0.2, 0.75, 0.25, 1);
  --f: "Rajdhani", "Poppins", system-ui, sans-serif;
  --f-hud: "Orbitron", "Rajdhani", monospace;
  --mono: "Orbitron", ui-monospace, monospace;
}

/* ── Reset ──────────────────────────────────────────────────── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
img {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
  text-decoration: none;
}
:focus-visible {
  outline: 1px solid var(--neon);
  outline-offset: 3px;
  border-radius: 2px;
  box-shadow: 0 0 12px var(--neon-glow);
}
::selection {
  background: var(--neon);
  color: #000;
}

/* ── Canvas ─────────────────────────────────────────────────── */
#sl-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  width: 100%;
  height: 100%;
}

/* ── Body ───────────────────────────────────────────────────── */
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.65 var(--f);
  overflow-x: hidden;
  letter-spacing: 0.01em;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.04) 0px,
    rgba(0, 0, 0, 0.04) 1px,
    transparent 1px,
    transparent 3px
  );
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(rgba(184, 77, 255, 0.035) 1px, transparent 1px) 0 0 / 60px
      60px,
    linear-gradient(90deg, rgba(184, 77, 255, 0.035) 1px, transparent 1px) 0 0 /
      60px 60px,
    radial-gradient(
      ellipse at 50% 0%,
      rgba(110, 35, 220, 0.18),
      transparent 55%
    ),
    radial-gradient(ellipse at 80% 80%, rgba(80, 25, 150, 0.1), transparent 40%),
    var(--bg);
  animation: grid-drift 40s linear infinite;
}
@keyframes grid-drift {
  to {
    background-position:
      60px 60px,
      60px 60px,
      center 0%,
      80% 80%;
  }
}

/* ── Layout ─────────────────────────────────────────────────── */
.wrap {
  width: min(1140px, 100%);
  margin: 0 auto;
  padding: 0 24px;
}
section {
  scroll-margin-top: 80px;
}
.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 9999;
  background: var(--neon);
  color: #000;
  padding: 10px 16px;
  border-radius: 4px;
  font: 700 0.85rem var(--f-hud);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.skip:focus {
  top: 12px;
}

/* ── Loader ─────────────────────────────────────────────────── */
#loader {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  background: var(--bg);
  transition:
    opacity 0.7s var(--ease),
    visibility 0.7s;
}
#loader.hide {
  opacity: 0;
  visibility: hidden;
}
.loader-box {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.sl-gate {
  position: relative;
  width: 90px;
  height: 90px;
  margin: 0 auto;
  display: grid;
  place-items: center;
}
.sl-gate::before,
.sl-gate::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}
.sl-gate::before {
  inset: 0;
  border: 2px solid var(--neon);
  box-shadow:
    0 0 20px var(--neon-glow),
    inset 0 0 20px rgba(184, 77, 255, 0.1);
  animation: gate-spin 3s linear infinite;
}
.sl-gate::after {
  inset: 12px;
  border: 1px solid var(--neon-bright);
  box-shadow: 0 0 30px var(--neon-glow);
  animation: gate-spin 2s linear infinite reverse;
}
.sl-gate-inner {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(184, 77, 255, 0.8) 0%,
    rgba(95, 30, 180, 0.4) 50%,
    transparent 70%
  );
  animation: gate-pulse 1.5s ease-in-out infinite;
}
.sl-gate-rune {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    transparent 0deg,
    rgba(184, 77, 255, 0.6) 60deg,
    transparent 120deg,
    rgba(184, 77, 255, 0.4) 180deg,
    transparent 240deg,
    rgba(184, 77, 255, 0.6) 300deg,
    transparent 360deg
  );
  animation: gate-spin 4s linear infinite;
  mix-blend-mode: screen;
}
@keyframes gate-spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes gate-pulse {
  0%,
  100% {
    opacity: 0.6;
    transform: scale(0.9);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}
.sl-loader-text {
  font: 700 0.88rem var(--f-hud);
  color: var(--neon);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  text-shadow: 0 0 14px var(--neon-glow);
  animation: text-flicker 2s ease-in-out infinite;
}
.sl-loader-sub {
  font: 400 0.74rem var(--f-hud);
  color: var(--muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
@keyframes text-flicker {
  0%,
  100% {
    opacity: 1;
  }
  92% {
    opacity: 1;
  }
  93% {
    opacity: 0.4;
  }
  94% {
    opacity: 1;
  }
  96% {
    opacity: 0.6;
  }
  97% {
    opacity: 1;
  }
}
.bar {
  width: 220px;
  height: 2px;
  background: var(--border-dim);
  overflow: hidden;
  position: relative;
}
.bar::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, var(--neon), transparent);
  transform: translateX(-100%);
  animation: bar-scan 1.4s linear infinite;
}
.bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--neon), var(--neon-bright));
  box-shadow: 0 0 10px var(--neon-glow);
  animation: load 1.5s var(--ease) forwards;
}
@keyframes load {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}
@keyframes bar-scan {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(400%);
  }
}

/* ── Header ─────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(0, 3, 8, 0.6);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-dim);
  transition:
    background 0.3s,
    border-color 0.3s,
    box-shadow 0.3s;
}
.site-header.scrolled {
  background: rgba(0, 3, 8, 0.92);
  border-bottom-color: var(--border);
  box-shadow:
    0 0 30px rgba(184, 77, 255, 0.08),
    0 4px 20px rgba(0, 0, 0, 0.4);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font: 700 1.05rem var(--f-hud);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-bright);
  text-shadow: 0 0 20px rgba(184, 77, 255, 0.35);
}
.hex {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  font: 700 0.7rem var(--f-hud);
  color: var(--neon);
  background: rgba(184, 77, 255, 0.07);
  border: 1px solid var(--neon);
  box-shadow:
    0 0 16px rgba(184, 77, 255, 0.3),
    inset 0 0 10px rgba(184, 77, 255, 0.08);
  clip-path: polygon(25% 6%, 75% 6%, 100% 50%, 75% 94%, 25% 94%, 0 50%);
  animation: hex-pulse 3s ease-in-out infinite;
}
@keyframes hex-pulse {
  0%,
  100% {
    box-shadow:
      0 0 16px rgba(184, 77, 255, 0.3),
      inset 0 0 10px rgba(184, 77, 255, 0.08);
  }
  50% {
    box-shadow:
      0 0 28px rgba(184, 77, 255, 0.55),
      inset 0 0 18px rgba(184, 77, 255, 0.15);
  }
}
.links {
  display: flex;
  gap: 32px;
}
.links a {
  position: relative;
  color: var(--muted);
  font: 600 0.78rem var(--f-hud);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 0;
  transition:
    color 0.25s,
    text-shadow 0.25s;
}
.links a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--neon), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.links a:hover,
.links a.active {
  color: var(--neon-bright);
  text-shadow: 0 0 16px rgba(184, 77, 255, 0.7);
}
.links a:hover::after,
.links a.active::after {
  transform: scaleX(1);
}
.menu-btn {
  display: none;
  background: rgba(184, 77, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--neon);
  border-radius: 4px;
  padding: 6px 14px;
  font: 600 0.78rem var(--f-hud);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background 0.2s,
    box-shadow 0.2s;
}
.menu-btn:hover {
  background: rgba(184, 77, 255, 0.12);
  box-shadow: 0 0 12px rgba(184, 77, 255, 0.3);
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 26px;
  border-radius: var(--r);
  border: 1px solid var(--border);
  background: rgba(184, 77, 255, 0.05);
  color: var(--neon-bright);
  font: 600 0.78rem var(--f-hud);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  overflow: hidden;
  transition:
    transform 0.25s var(--ease),
    box-shadow 0.25s,
    border-color 0.25s,
    background 0.25s;
}
.btn::before,
.btn::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  border-color: var(--neon);
  border-style: solid;
}
.btn::before {
  top: -1px;
  left: -1px;
  border-width: 1px 0 0 1px;
}
.btn::after {
  bottom: -1px;
  right: -1px;
  border-width: 0 1px 1px 0;
}
.btn:hover {
  transform: translateY(-2px);
  border-color: var(--neon);
  background: rgba(184, 77, 255, 0.1);
  box-shadow:
    0 0 20px rgba(184, 77, 255, 0.25),
    0 8px 24px rgba(0, 0, 0, 0.3);
}
.btn:active {
  transform: translateY(0) scale(0.98);
}
.btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex: none;
}
.btn.primary {
  background: linear-gradient(
    135deg,
    rgba(135, 45, 255, 0.8),
    rgba(224, 90, 255, 0.6)
  );
  border-color: var(--neon-bright);
  color: #fff;
  box-shadow:
    0 0 18px rgba(184, 77, 255, 0.35),
    0 4px 20px rgba(0, 0, 0, 0.3);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}
.btn.primary:hover {
  background: linear-gradient(
    135deg,
    rgba(184, 77, 255, 0.9),
    rgba(50, 220, 255, 0.75)
  );
  box-shadow:
    0 0 28px rgba(224, 90, 255, 0.5),
    0 8px 30px rgba(0, 0, 0, 0.35);
}
.row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* ── Sections ────────────────────────────────────────────────── */
.block {
  padding: clamp(58px, 8vw, 96px) 0;
}
h2 {
  font: 700 clamp(1.4rem, 3vw, 1.9rem) var(--f-hud);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-bright);
  text-shadow: 0 0 24px rgba(184, 77, 255, 0.3);
  margin-bottom: 6px;
}
h2::before {
  content: "[ ";
  color: var(--neon);
  opacity: 0.7;
}
h2::after {
  content: " ]";
  color: var(--neon);
  opacity: 0.7;
}
.sub {
  color: var(--muted);
  max-width: 56ch;
  margin-bottom: 32px;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
}

/* ── Hero ────────────────────────────────────────────────────── */
.hero {
  padding: clamp(72px, 10vw, 120px) 0 clamp(56px, 8vw, 88px);
  position: relative;
  perspective: 1200px;
}
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
}
.hero::before {
  width: clamp(40px, 6vw, 70px);
  aspect-ratio: 1;
  top: 8%;
  right: 8%;
  background:
    radial-gradient(
      circle at 35% 30%,
      rgba(255, 255, 255, 0.7),
      transparent 6%
    ),
    radial-gradient(circle at 35% 35%, #f2a2ff 0, #a32bff 40%, #020c20 75%);
  border: 1px solid rgba(77, 221, 255, 0.4);
  box-shadow:
    0 0 30px rgba(224, 90, 255, 0.35),
    inset -6px -6px 14px rgba(0, 0, 0, 0.6);
  animation: planet-float 8s ease-in-out infinite;
}
.hero::after {
  width: clamp(22px, 3.5vw, 44px);
  aspect-ratio: 1;
  bottom: 4%;
  left: 5%;
  background:
    radial-gradient(
      circle at 35% 30%,
      rgba(255, 255, 255, 0.5),
      transparent 6%
    ),
    radial-gradient(circle at 35% 35%, #d9a0ff 0, #8230cc 40%, #020c20 75%);
  border: 1px solid rgba(100, 200, 255, 0.3);
  box-shadow: 0 0 20px rgba(184, 77, 255, 0.3);
  opacity: 0.75;
  animation: planet-float 6s ease-in-out infinite -3s;
}
@keyframes planet-float {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
  50% {
    transform: translate(0, -14px) rotate(10deg);
  }
}

.hero .wrap {
  display: flex;
  align-items: center;
  gap: 56px;
  position: relative;
  isolation: isolate;
  padding: clamp(32px, 5vw, 56px) clamp(28px, 4vw, 52px);
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  animation: hero-arrive 0.9s var(--ease) both;
}
/* All 4 corner bracket accents */
.hero .wrap::before {
  content: "";
  position: absolute;
  z-index: 1;
  pointer-events: none;
  top: -1px;
  left: -1px;
  width: 40px;
  height: 40px;
  border-top: 2px solid var(--neon);
  border-left: 2px solid var(--neon);
  box-shadow: -2px -2px 14px rgba(184, 77, 255, 0.4);
}
.hero .wrap::after {
  content: "";
  position: absolute;
  z-index: 1;
  pointer-events: none;
  bottom: -1px;
  right: -1px;
  width: 40px;
  height: 40px;
  border-bottom: 2px solid var(--neon);
  border-right: 2px solid var(--neon);
  box-shadow: 2px 2px 14px rgba(184, 77, 255, 0.4);
}
@keyframes hero-arrive {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.97);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}
.avatar {
  width: 168px;
  height: 168px;
  flex: none;
  border-radius: 4px;
  object-fit: cover;
  border: 2px solid var(--neon);
  box-shadow:
    0 0 0 6px rgba(184, 77, 255, 0.07),
    0 0 30px rgba(184, 77, 255, 0.4),
    0 0 80px rgba(184, 77, 255, 0.15);
  background: var(--surface-2);
  clip-path: polygon(
    6% 0%,
    94% 0%,
    100% 6%,
    100% 94%,
    94% 100%,
    6% 100%,
    0% 94%,
    0% 6%
  );
  animation: avatar-float 5s ease-in-out infinite;
}
@keyframes avatar-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
    box-shadow:
      0 0 0 6px rgba(184, 77, 255, 0.1),
      0 0 45px rgba(184, 77, 255, 0.6),
      0 0 100px rgba(184, 77, 255, 0.2);
  }
}
h1 {
  font: 700 clamp(2.2rem, 5.5vw, 3.4rem)/1.1 var(--f-hud);
  letter-spacing: -0.01em;
  text-transform: uppercase;
  background: linear-gradient(110deg, #ffffff 10%, #e4b0ff 55%, #b84dff);
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-wrap: balance;
}
.lead {
  max-width: 46ch;
  margin: 18px 0 30px;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.6;
  letter-spacing: 0.02em;
}

/* ── Filters ─────────────────────────────────────────────────── */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}
.filters button {
  background: rgba(184, 77, 255, 0.04);
  border: 1px solid var(--border-dim);
  color: var(--muted);
  padding: 6px 18px;
  border-radius: var(--r);
  font: 600 0.76rem var(--f-hud);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: 0.25s;
}
.filters button:hover {
  color: var(--neon-bright);
  border-color: var(--neon);
  background: var(--neon-dim);
  box-shadow: 0 0 12px rgba(184, 77, 255, 0.2);
  transform: translateY(-2px);
}
.filters button[aria-pressed="true"] {
  background: linear-gradient(
    135deg,
    rgba(135, 45, 255, 0.7),
    rgba(224, 90, 255, 0.5)
  );
  border-color: var(--neon);
  color: #fff;
  box-shadow: 0 0 16px rgba(184, 77, 255, 0.35);
}

/* ── Grid & Cards ────────────────────────────────────────────── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 24px;
}
.card,
.panel {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border-dim);
  border-radius: 6px;
  -webkit-backdrop-filter: blur(12px) saturate(120%);
  backdrop-filter: blur(12px) saturate(120%);
}
/* HUD corner brackets */
.card::before,
.card::after,
.panel::before,
.panel::after {
  content: "";
  position: absolute;
  z-index: 1;
  pointer-events: none;
}
.card::before,
.panel::before {
  top: -1px;
  left: -1px;
  width: 16px;
  height: 16px;
  border-top: 1px solid var(--neon);
  border-left: 1px solid var(--neon);
}
.card::after,
.panel::after {
  bottom: -1px;
  right: -1px;
  width: 16px;
  height: 16px;
  border-bottom: 1px solid var(--neon);
  border-right: 1px solid var(--neon);
}
.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition:
    transform 0.4s var(--ease),
    border-color 0.3s,
    box-shadow 0.3s;
  will-change: transform;
  transform-style: preserve-3d;
}
.card:hover {
  transform: translateY(-8px) scale(1.012);
  border-color: var(--neon);
  box-shadow:
    0 0 0 1px rgba(184, 77, 255, 0.1),
    0 0 30px rgba(184, 77, 255, 0.3),
    0 20px 50px rgba(0, 0, 0, 0.5);
}
.card img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border-dim);
  transition:
    transform 0.7s var(--ease),
    filter 0.5s;
}
.card:hover img {
  transform: scale(1.055);
  filter: saturate(1.15) brightness(1.07);
}
.ph {
  display: grid;
  place-items: center;
  aspect-ratio: 16/10;
  font: 700 3.2rem var(--f-hud);
  color: var(--neon);
  background: linear-gradient(
    135deg,
    rgba(125, 35, 200, 0.3),
    rgba(0, 20, 50, 0.6)
  );
  border-bottom: 1px solid var(--border-dim);
  letter-spacing: 0.1em;
  text-shadow: 0 0 20px rgba(184, 77, 255, 0.6);
}
.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 8px;
  padding: 22px;
  transform: translateZ(10px);
}
.tags {
  font: 600 0.7rem var(--f-hud);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--neon);
  text-shadow: 0 0 8px rgba(184, 77, 255, 0.5);
}
.card h3 {
  font: 700 1rem var(--f-hud);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-bright);
}
.card p {
  flex: 1;
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 8px;
  line-height: 1.55;
}
.card .btn {
  align-self: flex-start;
  padding: 8px 18px;
  font-size: 0.74rem;
}
.card.tilt-enabled:hover {
  transform: perspective(1000px) rotateX(var(--tilt-y, 0deg))
    rotateY(var(--tilt-x, 0deg)) translateY(-8px) scale(1.012);
}

/* ── About ───────────────────────────────────────────────────── */
.about {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
}
.about p {
  color: var(--text);
  line-height: 1.7;
}
.about p + p {
  margin-top: 14px;
  color: var(--muted);
}
.panel {
  border-radius: 6px;
  padding: 28px;
  transition:
    transform 0.35s var(--ease),
    border-color 0.3s,
    box-shadow 0.3s;
}
.panel:hover {
  border-color: rgba(184, 77, 255, 0.4);
  box-shadow:
    0 0 24px rgba(184, 77, 255, 0.15),
    0 16px 40px rgba(0, 0, 0, 0.35);
  transform: translateY(-4px);
}
.panel h3 {
  font: 700 0.8rem var(--f-hud);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--neon);
  text-shadow: 0 0 10px rgba(184, 77, 255, 0.5);
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-dim);
}
.skills {
  list-style: none;
  display: grid;
  gap: 16px;
}
.skills li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 14px;
  align-items: center;
  font: 500 0.88rem var(--f-hud);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  transition:
    color 0.25s,
    transform 0.25s var(--ease);
}
.skills li:hover {
  color: var(--neon-bright);
  transform: translateX(5px);
}
.skills small {
  grid-column: 1/-1;
  color: var(--muted);
  font: 400 0.74rem var(--f);
  text-transform: none;
  letter-spacing: 0.02em;
}
.lvl {
  width: 90px;
  height: 5px;
  border-radius: 2px;
  background: linear-gradient(
    90deg,
    var(--neon) calc(var(--l) * 33.4%),
    rgba(184, 77, 255, 0.1) 0
  );
  box-shadow: 0 0 8px rgba(184, 77, 255, 0.2);
  transition:
    filter 0.3s,
    transform 0.3s var(--ease),
    box-shadow 0.3s;
}
.skills li:hover .lvl {
  filter: brightness(1.5);
  transform: scaleX(1.06);
  transform-origin: left;
  box-shadow: 0 0 14px rgba(224, 90, 255, 0.5);
}
.count {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--border-dim);
  color: var(--muted);
  font: 400 0.82rem var(--f-hud);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.count strong {
  color: var(--neon);
  font: 700 1.6rem var(--f-hud);
  margin-right: 8px;
  text-shadow: 0 0 12px rgba(184, 77, 255, 0.5);
}

/* ── Contact ─────────────────────────────────────────────────── */
.contact {
  border-top: 1px solid var(--border-dim);
  border-bottom: 1px solid var(--border-dim);
  background:
    radial-gradient(
      ellipse at 50% 100%,
      rgba(110, 35, 220, 0.12),
      transparent 60%
    ),
    linear-gradient(180deg, transparent, rgba(184, 77, 255, 0.03));
}

/* ── Footer ──────────────────────────────────────────────────── */
footer {
  padding: 44px 0 28px;
  font-size: 0.82rem;
  color: var(--muted);
  font-family: var(--f-hud);
  letter-spacing: 0.06em;
  border-top: 1px solid var(--border-dim);
}
.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
}
.foot strong {
  color: var(--neon);
  font: 700 0.88rem var(--f-hud);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(184, 77, 255, 0.4);
}
.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}
.foot a,
.foot button {
  background: none;
  border: 0;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition:
    color 0.2s,
    text-shadow 0.2s;
}
.foot a:hover,
.foot button:hover {
  color: var(--neon-bright);
  text-shadow: 0 0 10px rgba(184, 77, 255, 0.4);
}
.copy {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--border-dim);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ── Dialog ──────────────────────────────────────────────────── */
dialog {
  width: min(720px, 92%);
  max-height: 86vh;
  margin: auto;
  padding: 36px;
  background: rgba(1, 6, 18, 0.96);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: auto;
  box-shadow:
    0 0 40px rgba(184, 77, 255, 0.2),
    0 30px 80px rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
}
dialog::backdrop {
  background: rgba(0, 2, 8, 0.82);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
dialog h2 {
  font-size: 1.5rem;
}
dialog h3 {
  margin: 22px 0 6px;
  font: 600 0.82rem var(--f-hud);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--neon);
  text-shadow: 0 0 8px rgba(184, 77, 255, 0.4);
}
dialog p {
  color: var(--muted);
  font-size: 0.9rem;
}
.upd {
  font-size: 0.78rem;
}
.close {
  position: absolute;
  right: 16px;
  top: 12px;
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
  transition:
    color 0.2s,
    text-shadow 0.2s;
}
.close:hover {
  color: var(--neon-bright);
  text-shadow: 0 0 12px rgba(184, 77, 255, 0.6);
}

/* ── Reveal ──────────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  filter: blur(6px);
  transition:
    opacity 0.7s var(--ease),
    transform 0.7s var(--ease),
    filter 0.7s var(--ease);
}
.reveal.in {
  opacity: 1;
  transform: none;
  filter: none;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 760px) {
  .menu-btn {
    display: block;
  }
  .links {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    gap: 0;
    padding: 10px 24px 18px;
    background: rgba(0, 3, 8, 0.97);
    border-bottom: 1px solid var(--border);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
  }
  .links.open {
    display: flex;
  }
  .links a {
    padding: 13px 0;
    border-bottom: 1px solid var(--border-dim);
  }
  .hero .wrap {
    flex-direction: column;
    text-align: center;
    gap: 28px;
    padding: 28px 22px;
    border-radius: 6px;
  }
  .lead {
    margin-inline: auto;
  }
  .row {
    justify-content: center;
  }
  .about {
    grid-template-columns: 1fr;
  }
  dialog {
    padding: 28px 20px;
  }
  .hero::before {
    top: 2%;
    right: 4%;
  }
  .hero::after {
    bottom: 1%;
    left: 3%;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
    filter: none;
  }
  .avatar,
  .hex,
  .hero .wrap {
    animation: none;
  }
  .avatar {
    box-shadow: 0 0 20px rgba(184, 77, 255, 0.4);
  }
}

/* ============================================================
   XP BAR — Solo Leveling scroll experience bar
   ============================================================ */
.xp-bar-wrap {
  width: 100%;
  padding: 4px 24px 6px;
  background: rgba(0, 3, 8, 0.6);
  border-top: 1px solid rgba(184, 77, 255, 0.08);
}
.xp-bar-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3px;
}
.xp-class {
  font: 600 0.58rem var(--f-hud);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.xp-level {
  font: 700 0.64rem var(--f-hud);
  letter-spacing: 0.14em;
  color: var(--neon-bright);
  text-shadow: 0 0 10px rgba(224, 90, 255, 0.6);
  transition:
    transform 0.2s,
    text-shadow 0.2s;
}
.xp-level.levelup {
  animation: levelup-pop 0.6s var(--ease);
}
@keyframes levelup-pop {
  0% {
    transform: scale(1);
  }
  35% {
    transform: scale(1.45);
    color: #fff;
    text-shadow:
      0 0 24px rgba(0, 255, 255, 1),
      0 0 48px rgba(224, 90, 255, 0.8);
  }
  70% {
    transform: scale(0.92);
  }
  100% {
    transform: scale(1);
  }
}
.xp-track {
  position: relative;
  width: 100%;
  height: 4px;
  background: rgba(184, 77, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
}
.xp-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #0066cc, #b84dff, #33eeff);
  border-radius: 2px;
  box-shadow:
    0 0 10px rgba(224, 90, 255, 0.7),
    0 0 20px rgba(184, 77, 255, 0.4);
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
/* Leading edge glow */
.xp-fill::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  width: 20px;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9));
  border-radius: 2px;
}
/* Animated scan shimmer */
.xp-shine {
  position: absolute;
  top: 0;
  left: -60%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.35),
    transparent
  );
  animation: xp-shimmer 2.4s ease-in-out infinite;
}
@keyframes xp-shimmer {
  0% {
    left: -60%;
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  80% {
    opacity: 1;
  }
  100% {
    left: 110%;
    opacity: 0;
  }
}
.xp-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 2px;
}
.xp-label {
  font: 700 0.52rem var(--f-hud);
  letter-spacing: 0.2em;
  color: var(--neon);
  opacity: 0.7;
}
.xp-pct {
  font: 600 0.52rem var(--f-hud);
  letter-spacing: 0.1em;
  color: var(--muted);
  transition: color 0.3s;
}

/* Levelup toast notification */
.sl-levelup-toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  z-index: 5000;
  background: rgba(0, 5, 20, 0.95);
  border: 1px solid var(--neon);
  border-radius: 6px;
  padding: 10px 28px;
  font: 700 0.82rem var(--f-hud);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--neon-bright);
  text-shadow: 0 0 14px rgba(224, 90, 255, 0.8);
  box-shadow:
    0 0 30px rgba(184, 77, 255, 0.35),
    0 0 60px rgba(184, 77, 255, 0.2);
  pointer-events: none;
  opacity: 0;
  transition:
    opacity 0.3s,
    transform 0.3s var(--ease);
}
.sl-levelup-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.sl-levelup-toast::before,
.sl-levelup-toast::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border-color: var(--neon);
  border-style: solid;
}
.sl-levelup-toast::before {
  top: -1px;
  left: -1px;
  border-width: 1px 0 0 1px;
}
.sl-levelup-toast::after {
  bottom: -1px;
  right: -1px;
  border-width: 0 1px 1px 0;
}

/* ============================================================
   EPIC CARD ANIMATIONS — Solo Leveling dungeon style
   ============================================================ */

/* 1. Animated border trace on hover */
.card {
  --border-angle: 0turn;
}
.card::before,
.card::after {
  transition:
    width 0.3s ease,
    height 0.3s ease,
    box-shadow 0.3s ease;
}
.card:hover::before {
  width: 28px;
  height: 28px;
  box-shadow: -3px -3px 20px rgba(224, 90, 255, 0.7);
}
.card:hover::after {
  width: 28px;
  height: 28px;
  box-shadow: 3px 3px 20px rgba(224, 90, 255, 0.7);
}

/* 2. Full border trace animation */
.card-border-trace {
  position: absolute;
  inset: -1px;
  border-radius: 7px;
  opacity: 0;
  z-index: 0;
  pointer-events: none;
  background: conic-gradient(
    from var(--border-angle),
    transparent 70%,
    rgba(224, 90, 255, 0.9) 85%,
    rgba(100, 240, 255, 1) 90%,
    rgba(224, 90, 255, 0.9) 95%,
    transparent 100%
  );
  border-radius: 7px;
  transition: opacity 0.35s ease;
}
.card-border-trace::before {
  content: "";
  position: absolute;
  inset: 1px;
  background: var(--surface);
  border-radius: 6px;
}
.card:hover .card-border-trace {
  opacity: 1;
  animation: border-rotate 1.8s linear infinite;
}
@keyframes border-rotate {
  to {
    --border-angle: 1turn;
  }
}
@property --border-angle {
  syntax: "<angle>";
  initial-value: 0turn;
  inherits: false;
}

/* 3. Energy burst on hover */
.card:hover {
  box-shadow:
    0 0 0 1px rgba(224, 90, 255, 0.15),
    0 0 25px rgba(184, 77, 255, 0.45),
    0 0 55px rgba(135, 45, 255, 0.25),
    0 25px 55px rgba(0, 0, 0, 0.6);
}

/* 4. Card image energy overlay */
.card-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 55%,
    rgba(110, 35, 220, 0.35) 85%,
    rgba(105, 35, 190, 0.6) 100%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 1;
}
.card:hover .card-img-overlay {
  opacity: 1;
}

/* 5. Card image wrapper positioning */
.card-img-wrap {
  position: relative;
  overflow: hidden;
}

/* 6. Lightning strike on card hover */
.card-lightning {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.15s;
}
.card:hover .card-lightning {
  animation: lightning-flash 3s ease-in-out infinite 0.8s;
}
@keyframes lightning-flash {
  0%,
  85%,
  100% {
    opacity: 0;
  }
  87% {
    opacity: 0.6;
  }
  89% {
    opacity: 0;
  }
  91% {
    opacity: 0.4;
  }
  93% {
    opacity: 0;
  }
}

/* 7. Glitch effect on card h3 */
.card:hover h3 {
  animation: text-glitch 4s ease-in-out infinite;
}
@keyframes text-glitch {
  0%,
  90%,
  100% {
    transform: none;
    text-shadow: none;
    clip-path: none;
  }
  91% {
    transform: translate(-2px, 0);
    text-shadow:
      2px 0 rgba(224, 90, 255, 0.8),
      -2px 0 rgba(255, 50, 50, 0.3);
  }
  92% {
    transform: translate(2px, 0);
    text-shadow:
      -2px 0 rgba(224, 90, 255, 0.8),
      2px 0 rgba(255, 50, 50, 0.3);
  }
  93% {
    transform: none;
    text-shadow: none;
  }
}

/* 8. Tags pulse on hover */
.card:hover .tags {
  animation: tag-pulse 1.5s ease-in-out infinite;
}
@keyframes tag-pulse {
  0%,
  100% {
    text-shadow: 0 0 8px rgba(184, 77, 255, 0.5);
  }
  50% {
    text-shadow:
      0 0 18px rgba(184, 77, 255, 0.9),
      0 0 32px rgba(184, 77, 255, 0.5);
  }
}

/* 9. Card entrance animation — rune reveal */
.card.reveal {
  opacity: 0;
  transform: translateY(24px) scale(0.985);
  filter: blur(6px) brightness(0.65);
}
.card.reveal.in {
  opacity: 1;
  transform: none;
  filter: none;
  transition:
    filter 0.6s var(--ease),
    opacity 0.6s var(--ease),
    transform 0.6s var(--ease);
}

/* 10. QUEST CLEARED stamp */
.card-quest-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
  font: 700 0.56rem var(--f-hud);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--neon-bright);
  border: 1px solid rgba(224, 90, 255, 0.5);
  padding: 3px 8px;
  border-radius: 3px;
  background: rgba(0, 20, 50, 0.85);
  text-shadow: 0 0 8px rgba(224, 90, 255, 0.7);
  box-shadow: 0 0 10px rgba(184, 77, 255, 0.2);
  opacity: 0;
  transform: scale(0.8) rotate(-3deg);
  transition:
    opacity 0.3s 0.1s,
    transform 0.3s 0.1s var(--ease);
}
.card:hover .card-quest-badge {
  opacity: 1;
  transform: scale(1) rotate(-2deg);
}

/* 11. Bottom energy bar on card */
.card-energy-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--neon), var(--neon-bright));
  box-shadow: 0 0 10px rgba(224, 90, 255, 0.8);
  transition: width 0.5s var(--ease);
  pointer-events: none;
  z-index: 3;
}
.card:hover .card-energy-bar {
  width: 100%;
}

/* Stagger reveal delays for grid cards */
.card:nth-child(3n + 1) {
  --reveal-delay: 0s;
}
.card:nth-child(3n + 2) {
  --reveal-delay: 0.08s;
}
.card:nth-child(3n) {
  --reveal-delay: 0.16s;
}
.card.reveal {
  transition-delay: var(--reveal-delay, 0s);
}

/* ── Adjust scroll offset for taller header (XP bar added) ── */
section {
  scroll-margin-top: 105px;
}

/* ── XP bar hidden on tiny screens, condensed on mobile ──── */
@media (max-width: 480px) {
  .xp-bar-meta {
    display: none;
  }
  .xp-bar-wrap {
    padding: 3px 16px 5px;
  }
  section {
    scroll-margin-top: 88px;
  }
}

/* Project filters — readable, countable and touch-friendly */
.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  padding: 7px;
  margin-bottom: 28px;
  border: 1px solid rgba(184, 77, 255, 0.2);
  border-radius: 8px;
  background: rgba(2, 10, 28, 0.62);
  -webkit-backdrop-filter: blur(14px) saturate(135%);
  backdrop-filter: blur(14px) saturate(135%);
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.18),
    inset 0 1px rgba(255, 255, 255, 0.035);
}

.filters button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 40px;
  padding: 7px 13px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: #82a9c3;
  font: 600 0.72rem var(--f-hud);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
  transition:
    color 0.22s ease,
    border-color 0.22s ease,
    background 0.22s ease,
    box-shadow 0.22s ease,
    transform 0.22s var(--ease);
}

.filters button:hover {
  color: var(--text-bright);
  border-color: rgba(224, 90, 255, 0.28);
  background: rgba(184, 77, 255, 0.08);
  box-shadow: inset 0 0 16px rgba(184, 77, 255, 0.06);
  transform: translateY(-1px);
}

.filters button[aria-pressed="true"] {
  color: #fff;
  border-color: rgba(80, 220, 255, 0.68);
  background: linear-gradient(
    135deg,
    rgba(150, 45, 230, 0.76),
    rgba(184, 77, 255, 0.38)
  );
  box-shadow:
    0 0 16px rgba(184, 77, 255, 0.2),
    inset 0 0 12px rgba(100, 230, 255, 0.09);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.45);
}

.filter-count {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border: 1px solid rgba(130, 185, 220, 0.18);
  border-radius: 4px;
  background: rgba(0, 7, 18, 0.55);
  color: #9abbd0;
  font: 600 0.62rem var(--f-hud);
  letter-spacing: 0;
  transition:
    color 0.22s ease,
    border-color 0.22s ease,
    background 0.22s ease;
}

.filters button[aria-pressed="true"] .filter-count {
  border-color: rgba(151, 239, 255, 0.42);
  background: rgba(0, 13, 28, 0.4);
  color: #dffbff;
}

@media (max-width: 480px) {
  .filters {
    width: 100%;
    gap: 5px;
    padding: 6px;
  }

  .filters button {
    flex: 1 1 auto;
    gap: 7px;
    min-height: 42px;
    padding-inline: 10px;
    font-size: 0.66rem;
    letter-spacing: 0.07em;
  }
}

/* Keep project previews clear while retaining a restrained hover response. */
.grid .card:hover {
  transform: translateY(-4px) scale(1.006);
  border-color: rgba(51, 204, 255, 0.68);
  box-shadow:
    0 0 0 1px rgba(224, 90, 255, 0.08),
    0 10px 28px rgba(105, 35, 190, 0.2),
    0 16px 36px rgba(0, 0, 0, 0.38);
}

.grid .card.tilt-enabled:hover {
  transform: perspective(1200px) rotateX(var(--tilt-y, 0deg))
    rotateY(var(--tilt-x, 0deg)) translateY(-4px) scale(1.006);
}

.grid .card:hover img {
  transform: scale(1.02);
  filter: brightness(1.03);
}

.grid .card .card-img-overlay {
  background: linear-gradient(
    180deg,
    transparent 62%,
    rgba(110, 35, 220, 0.08) 100%
  );
  opacity: 0;
}

.grid .card:hover .card-img-overlay {
  opacity: 0.35;
}

.grid .card.tilt-enabled:hover .card-glow {
  opacity: 0;
}

.grid .card-border-trace {
  display: none;
}

.grid .card:hover .card-quest-badge {
  opacity: 0;
  transform: scale(0.96);
}

.grid .card:hover .card-lightning,
.grid .card:hover h3,
.grid .card:hover .tags {
  animation: none;
}

.grid .card:hover .card-energy-bar {
  width: 34%;
}

/* ==========================================================================
   SISTEMA UI — rediseño visual
   Basado en dos referencias:
     (1) HUD holográfico "SISTEMA" → header, hero, paneles, barras, botones
     (2) Ventana "QUEST INFO"      → tarjetas de proyecto y ventanas legales
   ⚠ Solo estilos. No cambia HTML, textos, scripts ni funciones del sitio.
   Para volver al diseño anterior basta con borrar este bloque (hasta el final).
   ========================================================================== */

:root {
  --f-hud: "Rajdhani", "Poppins", system-ui, sans-serif;
  --mono: "Rajdhani", ui-monospace, monospace;
  --sl-cyan: #2fd0ff;
  --sl-ice: #c9f0ff;
  --sl-blue: #2f8cff;
  --sl-glass: linear-gradient(
    180deg,
    rgba(14, 62, 128, 0.34),
    rgba(3, 20, 52, 0.66)
  );
  --sl-glow-text:
    0 0 6px rgba(150, 220, 255, 0.85), 0 0 16px rgba(30, 150, 255, 0.65);
  --frame-hud: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40' fill='none' stroke-linejoin='miter'%3E%3Cpath d='M1 13.2 L13.2 1 H39 V27.2 L27.2 39 H1 Z' stroke='%231f7cff' stroke-opacity='.14' stroke-width='7'/%3E%3Cpath d='M1 13.2 L13.2 1 H39 V27.2 L27.2 39 H1 Z' stroke='%232fb4ff' stroke-opacity='.30' stroke-width='3.4'/%3E%3Cpath d='M1 13.2 L13.2 1 H39 V27.2 L27.2 39 H1 Z' stroke='%2358dcff' stroke-width='1.1'/%3E%3Cpath d='M27 1.2 H39 V13' stroke='%23dff7ff' stroke-width='2.2'/%3E%3Cpath d='M1 27 V38.8 H13' stroke='%23dff7ff' stroke-width='2.2'/%3E%3C/svg%3E");
  --frame-quest: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48' fill='none' stroke-linejoin='miter'%3E%3Cpath d='M14.8 2 H33.2 L46 14.8 V33.2 L33.2 46 H14.8 L2 33.2 V14.8 Z' stroke='%231668ff' stroke-opacity='.16' stroke-width='9'/%3E%3Cpath d='M14.8 2 H33.2 L46 14.8 V33.2 L33.2 46 H14.8 L2 33.2 V14.8 Z' stroke='%232a86ff' stroke-opacity='.38' stroke-width='5'/%3E%3Cpath d='M14.8 2 H33.2 L46 14.8 V33.2 L33.2 46 H14.8 L2 33.2 V14.8 Z' stroke='%2359b4ff' stroke-opacity='.9' stroke-width='2.4'/%3E%3Cpath d='M14.8 2 H33.2 L46 14.8 V33.2 L33.2 46 H14.8 L2 33.2 V14.8 Z' stroke='%23e4f6ff' stroke-opacity='.85' stroke-width='.8'/%3E%3Cpath d='M16 8.5 H32 L39.5 16 V32 L32 39.5 H16 L8.5 32 V16 Z' stroke='%237fc4ff' stroke-opacity='.38' stroke-width='.8'/%3E%3C/svg%3E");
}

/* ── Header: barra superior del HUD ─────────────────────────────────────── */
.site-header {
  background: linear-gradient(
    180deg,
    rgba(3, 18, 44, 0.86),
    rgba(0, 5, 14, 0.9)
  );
  border-bottom: 1px solid rgba(47, 208, 255, 0.38);
  box-shadow:
    0 1px 0 rgba(47, 208, 255, 0.12),
    0 10px 34px rgba(150, 45, 230, 0.12);
}
.site-header.scrolled {
  background: linear-gradient(
    180deg,
    rgba(3, 16, 40, 0.95),
    rgba(0, 4, 12, 0.96)
  );
  border-bottom-color: rgba(47, 208, 255, 0.55);
}
.site-header::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -1px;
  width: min(340px, 46%);
  height: 2px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, #9be8ff, transparent);
  box-shadow: 0 0 14px 1px rgba(47, 208, 255, 0.75);
  pointer-events: none;
}
.brand {
  font: 700 1.3rem var(--f-hud);
  letter-spacing: 0.16em;
  text-shadow: var(--sl-glow-text);
}
.hex {
  font: 700 0.95rem var(--f-hud);
  letter-spacing: 0.04em;
  border-color: #58dcff;
}
.links a {
  font: 700 1rem var(--f-hud);
  letter-spacing: 0.16em;
  color: #86b4d2;
}
.links a:hover,
.links a.active {
  color: var(--sl-ice);
  text-shadow: var(--sl-glow-text);
}
.menu-btn {
  font: 700 0.95rem var(--f-hud);
  letter-spacing: 0.14em;
}

@media (min-width: 761px) {
  /* Menú como barra de navegación del HUD (referencia 1, barra inferior) */
  .links {
    gap: 4px;
    padding: 4px 6px;
    border: 1px solid rgba(47, 208, 255, 0.42);
    border-radius: 8px;
    background: linear-gradient(
      180deg,
      rgba(10, 52, 110, 0.4),
      rgba(2, 16, 42, 0.7)
    );
    box-shadow:
      inset 0 0 18px rgba(47, 208, 255, 0.1),
      0 0 16px rgba(47, 208, 255, 0.12);
  }
  .links a {
    padding: 7px 18px;
    border-radius: 5px;
    transition:
      color 0.25s,
      text-shadow 0.25s,
      background 0.25s,
      box-shadow 0.25s;
  }
  .links a::after {
    left: 14px;
    right: 14px;
    bottom: 2px;
  }
  .links a:hover {
    background: rgba(47, 208, 255, 0.08);
  }
  .links a.active {
    background: linear-gradient(
      180deg,
      rgba(20, 110, 200, 0.4),
      rgba(8, 60, 130, 0.35)
    );
    box-shadow:
      inset 0 0 12px rgba(120, 220, 255, 0.18),
      0 0 14px rgba(47, 208, 255, 0.25);
  }
}

/* ── Barra de EXP (como la barra EXP del perfil en la referencia 1) ─────── */
.xp-bar-wrap {
  background: rgba(0, 6, 18, 0.55);
  border-top-color: rgba(47, 208, 255, 0.14);
}
.xp-class {
  font: 700 0.78rem var(--f-hud);
  letter-spacing: 0.2em;
  color: #7fa9c6;
}
.xp-level {
  font: 700 0.86rem var(--f-hud);
  letter-spacing: 0.16em;
  color: var(--sl-ice);
  text-shadow: var(--sl-glow-text);
}
.xp-track {
  height: 7px;
  border-radius: 4px;
  border: 1px solid rgba(47, 208, 255, 0.34);
  background: rgba(0, 22, 56, 0.85);
}
.xp-fill {
  background: linear-gradient(90deg, #0a6cff, #1fb4ff 60%, #6af0ff);
  border-radius: 3px;
}
.xp-label {
  font: 700 0.72rem var(--f-hud);
  letter-spacing: 0.22em;
  opacity: 0.85;
}
.xp-pct {
  font: 700 0.72rem var(--f-hud);
  letter-spacing: 0.12em;
}

/* ── Botones (estilo botones "+1" de la referencia 1) ───────────────────── */
.btn {
  padding: 11px 24px;
  border-radius: 7px;
  border: 1px solid rgba(47, 208, 255, 0.6);
  background: linear-gradient(
    180deg,
    rgba(14, 70, 150, 0.4),
    rgba(3, 20, 52, 0.7)
  );
  box-shadow:
    inset 0 0 14px rgba(47, 208, 255, 0.12),
    0 0 14px rgba(47, 208, 255, 0.12);
  color: var(--sl-ice);
  font: 700 0.98rem var(--f-hud);
  letter-spacing: 0.14em;
  text-shadow: 0 0 8px rgba(120, 210, 255, 0.7);
}
.btn::before,
.btn::after {
  display: none;
}
.btn:hover {
  border-color: #6fe3ff;
  background: linear-gradient(
    180deg,
    rgba(22, 100, 190, 0.5),
    rgba(4, 30, 74, 0.75)
  );
  box-shadow:
    inset 0 0 18px rgba(80, 210, 255, 0.2),
    0 0 22px rgba(47, 208, 255, 0.35),
    0 8px 24px rgba(0, 0, 0, 0.3);
}
.btn.primary {
  background: linear-gradient(
    180deg,
    rgba(20, 130, 235, 0.88),
    rgba(8, 84, 190, 0.82)
  );
  border-color: #7fe6ff;
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 0 16px rgba(120, 230, 255, 0.25),
    0 0 20px rgba(47, 208, 255, 0.45);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.55);
}
.btn.primary:hover {
  background: linear-gradient(
    180deg,
    rgba(40, 160, 255, 0.95),
    rgba(14, 104, 215, 0.9)
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 0 20px rgba(150, 240, 255, 0.3),
    0 0 30px rgba(47, 208, 255, 0.65);
}

/* ── Títulos de sección: cabecera de panel del HUD ──────────────────────── */
h2 {
  font: 700 clamp(1.7rem, 3.6vw, 2.35rem) var(--f-hud);
  letter-spacing: 0.18em;
  color: var(--sl-ice);
  text-shadow: var(--sl-glow-text);
}
h2::before,
h2::after {
  color: var(--sl-cyan);
  opacity: 0.9;
  text-shadow: 0 0 12px rgba(47, 208, 255, 0.8);
}
.sub {
  font: 500 1.05rem/1.5 var(--f-hud);
  letter-spacing: 0.04em;
  color: #7fa6c2;
}
.sl-divider {
  height: 2px;
  background: linear-gradient(
    90deg,
    #6fe3ff,
    rgba(47, 208, 255, 0.35) 40%,
    transparent
  ) !important;
  box-shadow: 0 0 10px rgba(47, 208, 255, 0.35);
}

/* ── Paneles tipo HUD: cristal azul + marco con esquinas cortadas ──────── */
.hero .wrap,
.panel,
.contact .wrap {
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(120, 220, 255, 0.07), transparent 28%),
    var(--sl-glass);
  -webkit-backdrop-filter: blur(10px) saturate(130%);
  backdrop-filter: blur(10px) saturate(130%);
  clip-path: polygon(
    14px 0,
    100% 0,
    100% calc(100% - 14px),
    calc(100% - 14px) 100%,
    0 100%,
    0 14px
  );
}
.hero .wrap::before,
.panel::before,
.contact .wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  width: auto;
  height: auto;
  border: 16px solid transparent;
  border-image: var(--frame-hud) 16 / 16px / 0 stretch;
  box-shadow: none;
}
.hero .wrap::after,
.panel::after,
.contact .wrap::after {
  display: none;
}

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero .wrap {
  padding: clamp(34px, 5vw, 58px) clamp(30px, 4.4vw, 56px);
}
.avatar {
  border-radius: 50%;
  clip-path: none;
  border: 3px solid #5fe0ff;
  box-shadow:
    0 0 0 5px rgba(5, 25, 60, 0.9),
    0 0 0 7px rgba(47, 208, 255, 0.55),
    0 0 34px rgba(47, 208, 255, 0.55),
    inset 0 0 22px rgba(47, 208, 255, 0.25);
}
@keyframes avatar-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}
h1 {
  font: 700 clamp(2.3rem, 5.6vw, 3.9rem)/1.04 var(--f-hud);
  letter-spacing: 0.04em;
  background: linear-gradient(110deg, #ffffff 8%, #bfe8ff 50%, #3cb8ff);
  background-clip: text;
  -webkit-background-clip: text;
  filter: drop-shadow(0 0 14px rgba(47, 160, 255, 0.5));
}
.lead {
  font: 500 1.2rem/1.5 var(--f-hud);
  letter-spacing: 0.03em;
  color: #d2ecff;
}

/* ── Filtros ────────────────────────────────────────────────────────────── */
.filters {
  border-color: rgba(47, 208, 255, 0.4);
  background: linear-gradient(
    180deg,
    rgba(10, 52, 110, 0.4),
    rgba(2, 14, 38, 0.7)
  );
  box-shadow:
    inset 0 0 18px rgba(47, 208, 255, 0.08),
    0 0 18px rgba(47, 208, 255, 0.1);
}
.filters button {
  font: 700 0.95rem var(--f-hud);
  letter-spacing: 0.14em;
  color: #86b4d2;
}
.filters button:hover {
  color: var(--sl-ice);
  border-color: rgba(47, 208, 255, 0.5);
}
.filters button[aria-pressed="true"] {
  background: linear-gradient(
    180deg,
    rgba(20, 120, 220, 0.78),
    rgba(8, 80, 180, 0.7)
  );
  border-color: #7fe6ff;
  box-shadow:
    inset 0 0 14px rgba(120, 230, 255, 0.25),
    0 0 16px rgba(47, 208, 255, 0.4);
}
.filter-count {
  font: 700 0.8rem var(--f-hud);
}
@media (max-width: 480px) {
  .filters button {
    font-size: 0.86rem;
    letter-spacing: 0.08em;
  }
}

/* ==========================================================================
   TARJETAS — ventana "QUEST INFO" (referencia 2)
   Orden visual: cabecera [!] título → [etiquetas] → imagen → OBJETIVO → botón
   ========================================================================== */
.grid {
  gap: 32px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.grid .card {
  border: 0;
  border-radius: 0;
  padding: 28px 26px 26px;
  background:
    radial-gradient(
      ellipse 80% 38% at 0% 46%,
      rgba(150, 45, 230, 0.24),
      transparent 72%
    ),
    radial-gradient(
      ellipse 80% 38% at 100% 64%,
      rgba(150, 45, 230, 0.22),
      transparent 72%
    ),
    radial-gradient(
      ellipse 90% 30% at 50% 100%,
      rgba(150, 45, 230, 0.3),
      transparent 72%
    ),
    linear-gradient(180deg, rgba(1, 6, 16, 0.97), rgba(0, 2, 9, 0.985));
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  transform-style: flat;
  clip-path: polygon(
    14px 0,
    calc(100% - 14px) 0,
    100% 14px,
    100% calc(100% - 14px),
    calc(100% - 14px) 100%,
    14px 100%,
    0 calc(100% - 14px),
    0 14px
  );
}
/* Marco eléctrico de doble línea */
.grid .card::before,
.grid .card:hover::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: auto;
  height: auto;
  border: 20px solid transparent;
  border-image: var(--frame-quest) 20 / 20px / 0 stretch;
  box-shadow: none;
  transition: filter 0.3s ease;
}
/* Placas brillantes en los bordes (laterales y centro arriba/abajo) */
.grid .card::after,
.grid .card:hover::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 7;
  pointer-events: none;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: auto;
  height: auto;
  border: 0;
  box-shadow: none;
  background:
    linear-gradient(90deg, transparent, #d9f4ff, transparent) top 1px center /
      84px 3px no-repeat,
    linear-gradient(90deg, transparent, #d9f4ff, transparent) bottom 1px
      center / 84px 3px no-repeat,
    linear-gradient(180deg, transparent, #bfe8ff 25%, #bfe8ff 75%, transparent)
      left 1px top 30% / 3px 34% no-repeat,
    linear-gradient(180deg, transparent, #bfe8ff 25%, #bfe8ff 75%, transparent)
      right 1px top 44% / 3px 34% no-repeat;
  filter: drop-shadow(0 0 5px rgba(70, 190, 255, 0.9));
}
.grid .card:hover::before {
  filter: brightness(1.45) drop-shadow(0 0 5px rgba(47, 208, 255, 0.8));
}

/* El cuerpo deja de ser una caja para poder reordenar sus elementos */
.grid .card-body {
  display: contents;
}

/* 1 · Cabecera: [!] | TÍTULO */
.grid .card h3 {
  order: 1;
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: center;
  min-height: 48px;
  margin: 0 0 16px;
  border: 1px solid rgba(160, 205, 255, 0.45);
  background: linear-gradient(
    180deg,
    rgba(10, 36, 80, 0.5),
    rgba(2, 10, 28, 0.65)
  );
  text-align: center;
  font: 700 1.12rem/1.15 var(--f-hud);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--sl-ice);
  text-shadow: var(--sl-glow-text);
  box-shadow: inset 0 0 16px rgba(47, 160, 255, 0.1);
}
.grid .card h3::before {
  content: "!";
  align-self: stretch;
  display: grid;
  place-items: center;
  border-right: 1px solid rgba(160, 205, 255, 0.45);
  background: radial-gradient(
    circle at 50% 50%,
    transparent 10px,
    rgba(200, 235, 255, 0.95) 10.6px,
    rgba(200, 235, 255, 0.95) 11.8px,
    transparent 12.4px
  );
  font: 700 1.1rem var(--f-hud);
  letter-spacing: 0;
}

/* 2 · [ etiquetas ] */
.grid .card .tags {
  order: 2;
  flex: none;
  margin: 0 0 16px;
  text-align: center;
  font: 500 1rem/1.3 var(--f-hud);
  letter-spacing: 0.05em;
  text-transform: none;
  color: #c4e6ff;
  text-shadow: 0 0 8px rgba(80, 180, 255, 0.65);
}
.grid .card .tags::before {
  content: "[ ";
}
.grid .card .tags::after {
  content: " ]";
}

/* 3 · Imagen enmarcada */
.grid .card .card-img-wrap,
.grid .card > img,
.grid .card > .ph {
  order: 3;
  margin: 0 0 18px;
  border: 1px solid rgba(86, 190, 255, 0.55);
  border-radius: 2px;
  box-shadow:
    0 0 16px rgba(184, 77, 255, 0.28),
    inset 0 0 20px rgba(105, 35, 190, 0.4);
}
.grid .card .card-img-wrap img,
.grid .card .card-img-wrap .ph {
  border-bottom: 0;
}
/* El atributo height="400" del <img> anulaba el aspect-ratio 16/10 de tu CSS */
.grid .card .card-img-wrap img,
.grid .card > img {
  height: auto;
  aspect-ratio: 16 / 10;
}

/* 4 · OBJETIVO + descripción */
.grid .card-body > p:not(.tags) {
  order: 4;
  flex: 1;
  margin: 0 0 20px;
  color: #a9cde8;
  font: 500 1.05rem/1.45 var(--f-hud);
  letter-spacing: 0.02em;
}
.grid .card-body > p:not(.tags)::before {
  content: "OBJETIVO";
  display: block;
  width: max-content;
  margin: 0 auto 10px;
  padding-bottom: 2px;
  border-bottom: 3px double rgba(190, 230, 255, 0.85);
  font: 700 1.15rem/1.1 var(--f-hud);
  letter-spacing: 0.16em;
  color: var(--sl-ice);
  text-shadow: var(--sl-glow-text);
}

/* 5 · Fila de acciones de la tarjeta: Abrir Proyecto + Copiar Enlace */
.grid .card .card-actions {
  order: 5;
  display: flex;
  gap: 8px;
  align-items: stretch;
  width: 100%;
}
.grid .card .card-actions .btn {
  order: unset;
  align-self: auto;
  min-height: 44px;
}
.grid .card .card-actions .btn-open {
  flex: 1.35;
  justify-content: space-between;
  padding: 10px 14px;
  font: 700 0.95rem var(--f-hud);
  letter-spacing: 0.12em;
}
.grid .card .card-actions .btn-open::after {
  display: block;
  position: static;
  width: 14px;
  height: 14px;
  border: 1.5px solid rgba(200, 235, 255, 0.95);
  border-radius: 3px;
  box-shadow: 0 0 8px rgba(47, 208, 255, 0.6);
  transition:
    background 0.25s,
    box-shadow 0.25s;
}
.grid .card .card-actions .btn-open:hover::after {
  background: var(--sl-cyan);
  box-shadow: 0 0 14px var(--sl-cyan);
}
.grid .card .card-actions .btn-copy {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  font: 700 0.88rem var(--f-hud);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: linear-gradient(
    180deg,
    rgba(8, 28, 64, 0.85),
    rgba(2, 12, 32, 0.92)
  );
  border: 1px solid rgba(47, 208, 255, 0.5);
  color: #aee4ff;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: inset 0 0 10px rgba(184, 77, 255, 0.1);
}
.grid .card .card-actions .btn-copy:hover {
  background: linear-gradient(
    180deg,
    rgba(14, 52, 115, 0.95),
    rgba(5, 25, 62, 0.98)
  );
  border-color: #6fe3ff;
  color: #ffffff;
  box-shadow:
    0 0 14px rgba(47, 208, 255, 0.45),
    inset 0 0 12px rgba(47, 208, 255, 0.2);
  transform: translateY(-1px);
}
.grid .card .card-actions .btn-copy.copied {
  background: linear-gradient(
    180deg,
    rgba(0, 140, 90, 0.65),
    rgba(0, 60, 40, 0.85)
  ) !important;
  border-color: #00ffbb !important;
  color: #a3ffe0 !important;
  box-shadow: 0 0 18px rgba(0, 255, 187, 0.6) !important;
  transform: scale(1.02);
}

/* Efectos que ya existían: se adaptan al nuevo marco */
.grid .card .card-energy-bar {
  bottom: 3px;
  left: 14px;
}
.grid .card .card-quest-badge {
  z-index: 8;
}

/* ── Sobre mí: panel "Estadísticas" ─────────────────────────────────────── */
.panel {
  padding: 30px 30px 28px;
}
.panel:hover {
  box-shadow: none;
  border-color: transparent;
}
.panel h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  font: 700 1.2rem var(--f-hud);
  letter-spacing: 0.22em;
  color: var(--sl-ice);
  text-shadow: var(--sl-glow-text);
  border-bottom: 0;
  padding-bottom: 12px;
  position: relative;
}
.panel h3::before {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  background: var(--sl-cyan);
  transform: rotate(45deg);
  box-shadow:
    0 0 10px var(--sl-cyan),
    0 0 20px rgba(47, 208, 255, 0.6);
}
.panel h3::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(111, 227, 255, 0.9),
    rgba(47, 208, 255, 0.2) 60%,
    transparent
  );
}
.skills {
  gap: 18px;
}
.skills li {
  font: 700 1.1rem var(--f-hud);
  letter-spacing: 0.1em;
  color: var(--sl-ice);
  padding-bottom: 12px;
  border-bottom: 1px dashed rgba(47, 208, 255, 0.16);
}
.skills li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.skills small {
  font: 500 0.95rem var(--f-hud);
  letter-spacing: 0.03em;
  color: #7fa6c2;
}
.lvl {
  width: 130px;
  height: 9px;
  border-radius: 5px;
  border: 1px solid rgba(47, 208, 255, 0.42);
  background: linear-gradient(
    90deg,
    #0a6cff,
    #2fc8ff calc(var(--l) * 33.4%),
    rgba(0, 24, 60, 0.9) 0
  );
  box-shadow:
    0 0 10px rgba(47, 208, 255, 0.25),
    inset 0 0 6px rgba(0, 0, 0, 0.5);
}

/* Contador tipo "PUNTOS DISPONIBLES" */
.count {
  display: flex;
  align-items: center;
  gap: 14px;
  font: 700 1rem var(--f-hud);
  letter-spacing: 0.14em;
  color: #9cc4de;
}
.count strong {
  display: inline-grid;
  place-items: center;
  min-width: 68px;
  padding: 2px 14px;
  margin: 0;
  font: 700 2.4rem/1.15 var(--f-hud);
  color: #e4f8ff;
  text-shadow: var(--sl-glow-text);
  border: 1px solid rgba(47, 208, 255, 0.6);
  border-radius: 6px;
  background: linear-gradient(
    180deg,
    rgba(14, 70, 150, 0.35),
    rgba(2, 16, 44, 0.7)
  );
  box-shadow:
    inset 0 0 16px rgba(47, 208, 255, 0.18),
    0 0 14px rgba(47, 208, 255, 0.2);
}
.about p {
  font: 500 1.12rem/1.6 var(--f-hud);
  letter-spacing: 0.02em;
}

/* ── Contacto: panel de misión ──────────────────────────────────────────── */
.contact .wrap {
  width: min(1092px, calc(100% - 32px));
  padding: clamp(30px, 4.5vw, 52px) clamp(24px, 4vw, 52px);
}

/* ── Footer: barra inferior de navegación del HUD ───────────────────────── */
footer {
  font-family: var(--f-hud);
  border-top: 1px solid rgba(47, 208, 255, 0.3);
  box-shadow:
    0 -1px 0 rgba(47, 208, 255, 0.08),
    0 -14px 40px rgba(150, 45, 230, 0.08);
}
.foot strong {
  font: 700 1.05rem var(--f-hud);
  color: var(--sl-ice);
  text-shadow: var(--sl-glow-text);
}
.foot nav {
  align-self: flex-start;
  gap: 2px;
  padding: 4px 6px;
  border: 1px solid rgba(47, 208, 255, 0.36);
  border-radius: 8px;
  background: linear-gradient(
    180deg,
    rgba(10, 52, 110, 0.35),
    rgba(2, 16, 42, 0.65)
  );
}
.foot a,
.foot button {
  padding: 7px 14px;
  border-radius: 5px;
  font: 700 0.95rem var(--f-hud);
  letter-spacing: 0.14em;
  transition:
    color 0.2s,
    text-shadow 0.2s,
    background 0.2s;
}
.foot button:hover {
  background: rgba(47, 208, 255, 0.1);
}
.copy {
  font: 600 0.85rem var(--f-hud);
  letter-spacing: 0.14em;
}

/* ── Ventanas legales: "QUEST INFO" ─────────────────────────────────────── */
dialog {
  padding: 32px 30px;
  border: 20px solid transparent;
  border-image: var(--frame-quest) 20 / 20px / 0 stretch;
  border-radius: 0;
  background-clip: padding-box;
  background:
    radial-gradient(
      ellipse 80% 30% at 0% 50%,
      rgba(150, 45, 230, 0.2),
      transparent 70%
    ),
    radial-gradient(
      ellipse 80% 30% at 100% 70%,
      rgba(150, 45, 230, 0.18),
      transparent 70%
    ),
    rgba(1, 5, 14, 0.98);
  background-clip: padding-box;
  box-shadow: none;
  clip-path: polygon(
    14px 0,
    calc(100% - 14px) 0,
    100% 14px,
    100% calc(100% - 14px),
    calc(100% - 14px) 100%,
    14px 100%,
    0 calc(100% - 14px),
    0 14px
  );
}
dialog h2 {
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: center;
  min-height: 48px;
  margin: 8px 0 14px;
  border: 1px solid rgba(160, 205, 255, 0.45);
  background: linear-gradient(
    180deg,
    rgba(10, 36, 80, 0.5),
    rgba(2, 10, 28, 0.65)
  );
  text-align: center;
  font: 700 1.3rem/1.15 var(--f-hud);
  letter-spacing: 0.18em;
}
dialog h2::before {
  content: "!";
  align-self: stretch;
  display: grid;
  place-items: center;
  opacity: 1;
  border-right: 1px solid rgba(160, 205, 255, 0.45);
  background: radial-gradient(
    circle at 50% 50%,
    transparent 10px,
    rgba(200, 235, 255, 0.95) 10.6px,
    rgba(200, 235, 255, 0.95) 11.8px,
    transparent 12.4px
  );
  font: 700 1.1rem var(--f-hud);
  letter-spacing: 0;
  color: var(--sl-ice);
}
dialog h2::after {
  content: none;
}
dialog h3 {
  width: max-content;
  max-width: 100%;
  margin: 26px auto 10px;
  padding-bottom: 2px;
  border-bottom: 3px double rgba(190, 230, 255, 0.85);
  font: 700 1.15rem var(--f-hud);
  letter-spacing: 0.16em;
  color: var(--sl-ice);
  text-shadow: var(--sl-glow-text);
}
dialog p {
  font: 500 1.05rem/1.55 var(--f-hud);
  color: #a9cde8;
  letter-spacing: 0.02em;
}
.upd {
  text-align: center;
  color: #c4e6ff;
  text-shadow: 0 0 8px rgba(80, 180, 255, 0.65);
}
.upd::before {
  content: "[ ";
}
.upd::after {
  content: " ]";
}
.close {
  top: 6px;
  right: 6px;
  font-size: 1.8rem;
  color: #9cc8e6;
}

/* ── Avisos del sistema ─────────────────────────────────────────────────── */
.sl-levelup-toast {
  font: 700 1rem var(--f-hud);
  letter-spacing: 0.22em;
  color: var(--sl-ice);
  border-radius: 2px;
  background: linear-gradient(
    180deg,
    rgba(4, 24, 58, 0.96),
    rgba(0, 6, 18, 0.97)
  );
  border-color: #6fe3ff;
  width: max-content;
  max-width: calc(100vw - 32px);
  text-align: center;
}

/* ── Móvil ──────────────────────────────────────────────────────────────── */
@media (max-width: 760px) {
  .brand {
    font-size: 1.15rem;
  }
  .hero .wrap {
    padding: 30px 24px;
  }
  .grid {
    gap: 26px;
  }
  .panel {
    padding: 26px 22px;
  }
  dialog {
    padding: 24px 18px;
  }
}
.contact .row .btn {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}
@media (max-width: 480px) {
  .contact .row .btn {
    letter-spacing: 0.05em;
    font-size: 0.92rem;
    padding-inline: 16px;
  }
  .foot nav {
    width: 100%;
    justify-content: space-between;
  }
  .foot a,
  .foot button {
    padding: 7px 10px;
    letter-spacing: 0.08em;
    font-size: 0.9rem;
  }
  .grid .card {
    padding: 26px 22px 24px;
  }
  .grid .card h3 {
    font-size: 1.02rem;
    letter-spacing: 0.1em;
  }
  .lvl {
    width: 100px;
  }
}

/* Movimiento reducido: sin transiciones nuevas */
@media (prefers-reduced-motion: reduce) {
  .grid .card::before,
  .btn,
  .links a,
  .foot button {
    transition: none;
  }
}

/* ==========================================================================
   SOLO LEVELING HD SYSTEM EXTENSIONS (HUD, SOUNDS, HUNTER PROFILE, MODAL)
   ========================================================================== */

/* ── Controles HUD en la Barra de Navegación ────────────────────────────── */
.nav-hud-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  margin-right: 14px;
}
.hud-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  font: 700 0.78rem var(--f-hud);
  letter-spacing: 0.14em;
  color: #aee4ff;
  background: linear-gradient(
    180deg,
    rgba(8, 30, 70, 0.8),
    rgba(2, 12, 32, 0.9)
  );
  border: 1px solid rgba(47, 208, 255, 0.55);
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: inset 0 0 10px rgba(184, 77, 255, 0.15), 0 0 8px rgba(184, 77, 255, 0.2);
}
.hud-pill-btn:hover {
  border-color: #6fe3ff;
  color: #ffffff;
  box-shadow: 0 0 14px rgba(47, 208, 255, 0.5), inset 0 0 12px rgba(47, 208, 255, 0.3);
  transform: translateY(-1px);
}
.hud-pill-btn.muted {
  border-color: rgba(255, 75, 100, 0.5);
  color: #ff99aa;
  background: rgba(30, 8, 16, 0.8);
  box-shadow: none;
}
.hud-pill-btn.quest-btn {
  border-color: #00e5ff;
  background: linear-gradient(180deg, rgba(95, 30, 180, 0.6), rgba(0, 20, 60, 0.8));
  animation: hud-pulse 3s infinite alternate;
}
@keyframes hud-pulse {
  0% { box-shadow: 0 0 6px rgba(0, 229, 255, 0.3); }
  100% { box-shadow: 0 0 16px rgba(0, 229, 255, 0.65); }
}

/* ── Hero: Perfil de Cazador (Hunter Profile & Status Window) ───────────── */
.hunter-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  flex: none;
}
.avatar-frame {
  position: relative;
  display: inline-block;
  padding: 6px;
}
.avatar-glow-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    #00e5ff,
    #7c3aed,
    #00a2ff,
    #ff0077,
    #00e5ff
  );
  filter: blur(8px);
  opacity: 0.7;
  animation: avatar-ring-rotate 8s linear infinite;
  z-index: 0;
}
@keyframes avatar-ring-rotate {
  to { transform: rotate(360deg); }
}
.avatar-frame .avatar {
  position: relative;
  z-index: 1;
}
.rank-badge {
  position: absolute;
  bottom: 0px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  background: linear-gradient(90deg, #ff0055, #a855f7, #00d4ff);
  color: #fff;
  font: 900 0.76rem var(--f-hud);
  letter-spacing: 0.18em;
  padding: 3px 12px;
  border-radius: 3px;
  box-shadow: 0 0 14px rgba(184, 77, 255, 0.8), 0 0 24px rgba(255, 0, 85, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.7);
  white-space: nowrap;
}
.hunter-gauges {
  width: 100%;
  max-width: 170px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.gauge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 700 0.74rem var(--f-hud);
  letter-spacing: 0.08em;
}
.gauge-name {
  width: 22px;
  color: #6fe3ff;
}
.gauge-bar {
  flex: 1;
  height: 6px;
  background: rgba(1, 14, 38, 0.85);
  border: 1px solid rgba(47, 208, 255, 0.45);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}
.gauge-bar span {
  display: block;
  height: 100%;
  transition: width 0.5s ease;
}
.gauge-bar.hp span {
  background: linear-gradient(90deg, #00d4ff, #5fe0ff);
  box-shadow: 0 0 8px #00d4ff;
}
.gauge-bar.mp span {
  background: linear-gradient(90deg, #7c3aed, #00e5ff);
  box-shadow: 0 0 10px #7c3aed;
}
.gauge-val {
  font-size: 0.68rem;
  color: #aee4ff;
  width: 32px;
  text-align: right;
}

/* ── Status tag en Hero ─────────────────────────────────────────────────── */
.system-status-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 700 0.85rem var(--f-hud);
  letter-spacing: 0.14em;
  color: #6fe3ff;
  margin-bottom: 12px;
  text-shadow: 0 0 10px rgba(111, 227, 255, 0.6);
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00ffaa;
  box-shadow: 0 0 10px #00ffaa, 0 0 20px #00ffaa;
  animation: dot-pulse 1.8s infinite alternate;
}
@keyframes dot-pulse {
  0% { transform: scale(0.85); opacity: 0.6; }
  100% { transform: scale(1.15); opacity: 1; }
}
.btn.quest-trigger {
  background: linear-gradient(
    180deg,
    rgba(14, 45, 95, 0.75),
    rgba(4, 18, 48, 0.85)
  );
  border-color: #6fe3ff;
  color: #eaf6ff;
}
.btn.quest-trigger:hover {
  background: linear-gradient(
    180deg,
    rgba(24, 75, 145, 0.9),
    rgba(8, 30, 80, 0.95)
  );
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.6);
  color: #fff;
}

/* ── Efecto de Láser Holográfico en Tarjetas ────────────────────────────── */
.grid .card .card-img-wrap {
  position: relative;
  overflow: hidden;
}
.grid .card .card-img-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 229, 255, 0.25),
    transparent
  );
  transform: skewX(-25deg);
  pointer-events: none;
  transition: none;
}
.grid .card:hover .card-img-wrap::after {
  left: 200%;
  transition: left 0.85s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ── Ventana Holográfica del Sistema (Solo Leveling Modal) ──────────────── */
.sl-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.sl-modal.show {
  opacity: 1;
  pointer-events: auto;
}
.sl-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 3, 10, 0.85);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
}
.sl-modal-window {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 560px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(184, 77, 255, 0.28), transparent 72%),
    radial-gradient(ellipse at 50% 100%, rgba(124, 58, 237, 0.18), transparent 60%),
    linear-gradient(180deg, rgba(2, 10, 28, 0.98), rgba(0, 3, 12, 0.99));
  border: 2px solid #5fe0ff;
  clip-path: polygon(
    16px 0,
    calc(100% - 16px) 0,
    100% 16px,
    100% calc(100% - 16px),
    calc(100% - 16px) 100%,
    16px 100%,
    0 calc(100% - 16px),
    0 16px
  );
  box-shadow:
    0 0 50px rgba(184, 77, 255, 0.5),
    inset 0 0 35px rgba(184, 77, 255, 0.25);
  padding: 34px 30px 30px;
  transform: scale(0.92) translateY(24px);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.sl-modal.show .sl-modal-window {
  transform: scale(1) translateY(0);
}
.sl-modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  border-bottom: 1px solid rgba(80, 190, 255, 0.35);
  padding-bottom: 14px;
}
.sl-modal-badge {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1.5px solid #6fe3ff;
  border-radius: 50%;
  color: #6fe3ff;
  font: 700 1.1rem var(--f-hud);
  box-shadow: 0 0 14px rgba(111, 227, 255, 0.7);
  flex: none;
}
#sl-modal-title {
  flex: 1;
  font: 700 1.28rem var(--f-hud);
  letter-spacing: 0.16em;
  color: #eaf6ff;
  text-shadow: 0 0 16px rgba(79, 195, 247, 0.9);
}
.sl-modal-close {
  background: none;
  border: none;
  color: #7fa6c2;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s;
  padding: 0 6px;
}
.sl-modal-close:hover {
  color: #fff;
  text-shadow: 0 0 10px #00e5ff;
}
.sl-alert-box {
  background: rgba(0, 40, 95, 0.4);
  border: 1px dashed rgba(80, 190, 255, 0.5);
  padding: 16px 18px;
  border-radius: 4px;
  margin-bottom: 22px;
}
.sl-alert-title {
  font: 700 1.02rem var(--f-hud);
  color: #6fe3ff;
  letter-spacing: 0.12em;
  margin-bottom: 6px;
  text-shadow: 0 0 10px rgba(111, 227, 255, 0.6);
}
.sl-alert-desc {
  font: 500 0.98rem/1.5 var(--f);
  color: #c8e8ff;
}
.sl-quest-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 26px;
}
.sl-quest-item {
  background: rgba(2, 14, 38, 0.75);
  border-left: 3px solid #00d4ff;
  padding: 10px 14px;
  border-radius: 0 3px 3px 0;
}
.sl-quest-label {
  display: block;
  font: 700 0.84rem var(--f-hud);
  color: #6fe3ff;
  letter-spacing: 0.14em;
  margin-bottom: 2px;
}
.sl-quest-val {
  font: 500 0.96rem var(--f);
  color: #d8eeff;
}
.sl-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.sl-modal-actions .btn {
  flex: 1;
  min-width: 200px;
  justify-content: center;
  font-size: 0.95rem;
}
@media (max-width: 600px) {
  .nav-hud-controls {
    margin-right: 8px;
  }
  .hud-pill-btn {
    padding: 4px 8px;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
  }
  .hunter-profile {
    margin-bottom: 16px;
  }
  .grid .card .card-actions {
    flex-direction: column;
  }
  .grid .card .card-actions .btn-open,
  .grid .card .card-actions .btn-copy {
    width: 100%;
  }
}

/* ==========================================================================
   SOLO LEVELING 3D SCROLL & DUNGEON GATE SYSTEM
   ========================================================================== */

/* ── Portal de Mazmorra 3D en el fondo (Dungeon Gate) ───────────────────── */
.sl-portal-gate {
  position: fixed;
  top: 50%;
  left: 50%;
  width: min(650px, 85vw);
  height: min(650px, 85vw);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: -1;
  perspective: 1200px;
  opacity: 0.38;
  transition: opacity 0.5s ease;
}
.portal-orbit {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform:
    rotateX(calc(55deg + var(--scroll-rot-x, 0deg)))
    rotateY(var(--scroll-rot-y, 0deg))
    rotateZ(var(--scroll-spin, 0deg))
    scale(var(--scroll-scale, 1));
  transition: transform 0.15s cubic-bezier(0.1, 0.9, 0.2, 1);
}
.portal-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px dashed rgba(0, 229, 255, 0.6);
  box-shadow:
    0 0 35px rgba(0, 229, 255, 0.4),
    inset 0 0 25px rgba(124, 58, 237, 0.3);
  animation: portal-spin-outer 25s linear infinite;
}
.portal-ring.ring-inner {
  inset: 18%;
  border: 1.5px solid rgba(124, 58, 237, 0.7);
  box-shadow:
    0 0 25px rgba(124, 58, 237, 0.5),
    inset 0 0 20px rgba(0, 229, 255, 0.4);
  animation: portal-spin-inner 18s linear infinite reverse;
}
.portal-core {
  position: absolute;
  inset: 35%;
  border-radius: 50%;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(0, 229, 255, 0.7) 0%,
    rgba(124, 58, 237, 0.5) 45%,
    transparent 75%
  );
  filter: blur(12px);
  animation: portal-pulse-core 4s ease-in-out infinite alternate;
}
.portal-runes {
  position: absolute;
  inset: 6%;
  border-radius: 50%;
  border: 1px dotted rgba(79, 195, 247, 0.5);
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.25);
  animation: portal-spin-outer 35s linear infinite;
}

@keyframes portal-spin-outer {
  to { transform: rotateZ(360deg); }
}
@keyframes portal-spin-inner {
  to { transform: rotateZ(-360deg); }
}
@keyframes portal-pulse-core {
  0% { transform: scale(0.85); opacity: 0.45; }
  100% { transform: scale(1.18); opacity: 0.85; filter: blur(16px); }
}

/* ── Profundidad 3D en la Cuadrícula y Tarjetas (Dungeon 3D Perspective) ─── */
.grid {
  perspective: 1400px;
  perspective-origin: 50% 40%;
}
.grid .card {
  transform-style: preserve-3d;
  will-change: transform, opacity;
  transition:
    transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.45s ease,
    opacity 0.45s ease;
}

/* Scroll-driven animations nativas en el compositor (Chrome 115+, Safari 26+, Edge) */
@supports ((animation-timeline: view()) and (animation-range: entry)) {
  .grid .card {
    view-timeline: --card-scroll block;
    animation: sl-card-3d-entrance linear both;
    animation-timeline: --card-scroll;
    animation-range: entry 0% exit 100%;
  }

  @keyframes sl-card-3d-entrance {
    0% {
      opacity: 0.15;
      transform: perspective(1200px) rotateX(15deg) translateZ(-80px) scale(0.92);
      filter: brightness(0.65) drop-shadow(0 0 0px transparent);
    }
    30% {
      opacity: 1;
      transform: perspective(1200px) rotateX(0deg) translateZ(0) scale(1);
      filter: brightness(1) drop-shadow(0 0 15px rgba(0, 229, 255, 0.25));
    }
    75% {
      opacity: 1;
      transform: perspective(1200px) rotateX(0deg) translateZ(0) scale(1);
      filter: brightness(1);
    }
    100% {
      opacity: 0.25;
      transform: perspective(1200px) rotateX(-12deg) translateZ(-60px) scale(0.94);
      filter: brightness(0.7);
    }
  }

  .hunter-profile {
    view-timeline: --hero-scroll block;
    animation: sl-hero-parallax linear both;
    animation-timeline: --hero-scroll;
    animation-range: entry 100% exit 0%;
  }
  @keyframes sl-hero-parallax {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(-30px) scale(0.96); opacity: 0.7; }
  }
}

@media (prefers-reduced-motion: reduce) {
  .portal-ring,
  .portal-core,
  .portal-runes {
    animation: none;
  }
  .sl-portal-gate {
    display: none;
  }
  .grid .card {
    transform: none !important;
  }
}

/* ==========================================================================
   RESPONSIVE HARDENING — reglas finales para resolver conflictos heredados
   Mantiene el tema Solo Leveling y prioriza móviles estrechos y accesibilidad.
   ========================================================================== */
html {
  scroll-padding-top: 105px;
}

.wrap {
  width: min(1140px, 100%);
  padding-inline: clamp(16px, 4vw, 24px);
}

.grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: clamp(16px, 3vw, 28px);
  align-items: stretch;
}

.grid > .card {
  width: 100%;
  min-width: 0;
  padding: clamp(18px, 3vw, 26px);
}

.grid .card h3,
.grid .card .card-body > p:not(.tags),
.grid .card .tags,
.contact .btn {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: normal;
}

.grid .card .card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.grid .card .card-actions .btn {
  flex: 1 1 145px;
  min-width: 0;
  min-height: 44px;
  justify-content: center;
  white-space: normal;
  overflow-wrap: anywhere;
}

.filters {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  flex-wrap: wrap;
}

.filters button {
  min-width: 0;
  max-width: 100%;
  min-height: 42px;
  white-space: normal;
  overflow-wrap: anywhere;
  touch-action: manipulation;
}

button,
.btn,
.foot nav a,
.foot nav button {
  touch-action: manipulation;
}

.menu-btn,
.btn,
.foot nav button {
  min-height: 44px;
}

.site-header,
.site-header .nav,
.hero,
.hero .wrap,
.about,
.contact .row,
.foot {
  min-width: 0;
}

.sl-modal-window,
dialog,
.sl-modal-body,
.sl-modal-actions {
  min-width: 0;
  max-width: 100%;
}

.sl-modal-actions .btn {
  min-width: min(100%, 200px);
  overflow-wrap: anywhere;
  white-space: normal;
}

@media (max-width: 600px) {
  .grid .card {
    transform-style: flat;
    will-change: auto;
  }

  .card,
  .panel,
  .filters,
  .links {
    -webkit-backdrop-filter: blur(8px) saturate(110%);
    backdrop-filter: blur(8px) saturate(110%);
  }

  .sl-portal-gate {
    width: min(520px, 90vw);
    height: min(520px, 90vw);
    opacity: 0.24;
  }

  .sl-modal-window {
    width: calc(100% - 24px);
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}

@media (max-width: 380px) {
  .wrap {
    padding-inline: 16px;
  }

  .site-header .nav {
    gap: 8px;
  }

  .brand {
    font-size: 1rem;
  }

  .nav-hud-controls {
    gap: 4px;
    margin-right: 0;
  }

  .hud-pill-btn {
    padding-inline: 6px;
    letter-spacing: 0.02em;
  }

  .sfx-label,
  .quest-label {
    display: none;
  }

  .grid .card {
    padding: 18px 16px;
  }

  .filters button {
    flex: 1 1 calc(50% - 6px);
    padding-inline: 8px;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
  }

  .contact .row .btn {
    width: 100%;
  }
}

@media (hover: none) {
  .grid .card:hover {
    transform: none;
  }

  .filters button:hover {
    transform: none;
    box-shadow: none;
  }
}

/* Las animaciones ligadas al scroll competían con reveal/tilt y podían
   atenuar tarjetas al salir de pantalla. Se conserva el movimiento al hover. */
@supports ((animation-timeline: view()) and (animation-range: entry)) {
  .grid .card,
  .hunter-profile {
    animation: none !important;
    view-timeline-name: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal,
  .reveal.in,
  .grid .card {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    animation: none !important;
    will-change: auto;
  }

  .sl-portal-gate,
  #sl-canvas {
    display: none !important;
  }
}

/* FIX: modal del Sistema dentro del viewport real en móviles.
   El ancho del diálogo no debe sumarse al padding del contenedor fixed. */
html,
body {
  max-width: 100%;
}

.sl-modal {
  width: 100%;
  max-width: 100vw;
  padding: 12px;
  overflow: hidden;
}

.sl-modal-window {
  width: min(100%, 560px);
  min-width: 0;
  max-width: 100%;
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  overflow-x: clip;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  padding: clamp(18px, 4vw, 30px);
}

.sl-modal-header,
.sl-modal-actions,
.sl-quest-item,
.sl-alert-box {
  min-width: 0;
  max-width: 100%;
}

#sl-modal-title,
.sl-alert-title,
.sl-alert-desc,
.sl-quest-val,
.sl-modal-actions .btn {
  min-width: 0;
  overflow-wrap: anywhere;
}

.sl-modal-actions .btn {
  flex: 1 1 200px;
  max-width: 100%;
  white-space: normal;
}

@media (max-width: 600px) {
  .sl-modal {
    padding: 12px;
    align-items: center;
  }

  .sl-modal-window {
    width: 100%;
    max-width: 560px;
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    padding: 20px 18px;
  }

  .sl-modal-header {
    gap: 8px;
    margin-bottom: 16px;
  }

  #sl-modal-title {
    font-size: clamp(0.9rem, 4vw, 1.15rem);
    letter-spacing: 0.1em;
  }

  .sl-alert-box {
    padding: 14px;
    margin-bottom: 16px;
  }

  .sl-quest-details {
    gap: 10px;
    margin-bottom: 20px;
  }

  .sl-modal-actions {
    flex-direction: column;
    gap: 10px;
  }

  .sl-modal-actions .btn {
    flex: 0 1 auto;
    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding-inline: 12px;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
  }
}

@media (max-width: 380px) {
  .sl-modal-window {
    padding: 18px 14px;
  }

  .sl-modal-badge {
    width: 28px;
    height: 28px;
  }

  #sl-modal-title {
    font-size: 0.86rem;
    letter-spacing: 0.06em;
  }

  .sl-alert-title {
    font-size: 0.88rem;
    letter-spacing: 0.08em;
  }

  .sl-quest-label {
    font-size: 0.75rem;
  }
}

/* Acciones de tarjeta: tamaño compacto y adaptable en móviles. */
.grid .card .card-body {
  min-width: 0;
  padding: clamp(16px, 2.5vw, 22px);
}

.grid .card .card-actions {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  align-items: stretch;
  gap: 10px;
  width: 100%;
}

.grid .card .card-actions .btn,
.grid .card .card-actions .btn-open,
.grid .card .card-actions .btn-copy {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 46px;
  height: auto;
  padding: 10px 12px;
  font-size: clamp(0.72rem, 2.5vw, 0.86rem);
  line-height: 1.25;
  letter-spacing: 0.055em;
  white-space: normal;
  overflow-wrap: anywhere;
  justify-content: center;
  text-align: center;
}

.grid .card .card-actions .btn-open {
  gap: 8px;
}

.grid .card .card-actions .btn-open::after {
  flex: 0 0 12px;
  width: 12px;
  height: 12px;
}

@media (max-width: 600px) {
  .grid .card .card-actions {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.82fr);
    gap: 8px;
  }

  .grid .card .card-actions .btn-open,
  .grid .card .card-actions .btn-copy {
    min-height: 46px;
    padding: 10px 8px;
    font-size: 0.72rem;
    letter-spacing: 0.035em;
  }
}

@media (max-width: 380px) {
  .grid .card .card-body {
    padding: 16px 14px;
  }

  .grid .card .card-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .grid .card .card-actions .btn-open,
  .grid .card .card-actions .btn-copy {
    min-height: 44px;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
  }
}

/* Hotfix definitivo: impedir que reglas globales estiren las acciones de tarjeta. */
.grid .card .card-actions {
  display: grid !important;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr) !important;
  align-items: center !important;
  align-content: start !important;
  grid-auto-rows: auto !important;
  height: auto !important;
  min-height: 0 !important;
}

.grid .card .card-actions > .btn,
.grid .card .card-actions > .btn-open,
.grid .card .card-actions > .btn-copy {
  display: inline-flex !important;
  flex: 0 1 auto !important;
  align-self: center !important;
  height: auto !important;
  min-height: 44px !important;
  max-height: 56px !important;
  margin: 0 !important;
  padding: 10px 12px !important;
  line-height: 1.2 !important;
  font-size: clamp(0.7rem, 2.4vw, 0.84rem) !important;
  letter-spacing: 0.045em !important;
}

@media (max-width: 380px) {
  .grid .card .card-actions {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .grid .card .card-actions > .btn,
  .grid .card .card-actions > .btn-open,
  .grid .card .card-actions > .btn-copy {
    width: 100% !important;
    max-height: none !important;
  }
}


/* ── Proyecto cards: HUD interactivo ────────────────────────── */
.card-media {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  aspect-ratio: 16 / 10;
  background:
    radial-gradient(ellipse at 50% 45%, rgba(184, 77, 255, 0.16), transparent 65%),
    var(--surface-2);
  border-bottom: 1px solid var(--border-dim);
}
.card-media > img,
.card-media > .ph {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
  border: 0;
}
.card-media > img {
  transition: transform 0.75s var(--ease), filter 0.5s;
}
.card:hover .card-media > img {
  transform: scale(1.065);
  filter: saturate(1.18) brightness(1.08);
}
.card-index {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  color: #eafaff;
  background: rgba(0, 8, 20, 0.78);
  border: 1px solid rgba(184, 77, 255, 0.55);
  box-shadow: 0 0 18px rgba(184, 77, 255, 0.15);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font: 700 0.58rem var(--f-hud);
  letter-spacing: 0.12em;
  pointer-events: none;
}
.card-index::before {
  content: "";
  width: 5px;
  height: 5px;
  flex: 0 0 5px;
  background: var(--neon-bright);
  box-shadow: 0 0 9px var(--neon);
  transform: rotate(45deg);
}
.card-scanline {
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(224, 90, 255, 0.16) 48%, transparent 100%);
  transform: translateY(-100%);
  transition: opacity 0.25s;
}
.card:hover .card-scanline {
  opacity: 1;
  animation: card-scan 1.4s ease-in-out;
}
@keyframes card-scan {
  from { transform: translateY(-100%); }
  to { transform: translateY(100%); }
}
.card .card-body {
  position: relative;
  background: linear-gradient(180deg, rgba(4, 16, 38, 0.22), transparent 72%);
}
.card .tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  padding: 5px 8px;
  border: 1px solid rgba(184, 77, 255, 0.16);
  background: rgba(184, 77, 255, 0.055);
  line-height: 1.35;
}
.card h3 {
  line-height: 1.4;
  text-wrap: balance;
}
.card .card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border-dim);
}
.card .card-actions .btn {
  min-height: 36px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin: 0;
}
.card .btn.secondary {
  border-color: rgba(184, 77, 255, 0.24);
  background: rgba(184, 77, 255, 0.045);
}
.card .btn.secondary:hover,
.card .btn.secondary.copied {
  border-color: var(--neon);
  color: #fff;
  background: rgba(184, 77, 255, 0.16);
}
@media (max-width: 600px) {
  .grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
  .card-media {
    aspect-ratio: 16 / 9;
  }
  .card .card-body {
    padding: 18px;
  }
  .card .card-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
  }
  .card .card-actions .btn {
    width: 100%;
    min-width: 0;
    padding: 9px 8px;
    font-size: 0.7rem;
    white-space: nowrap;
  }
}
@media (prefers-reduced-motion: reduce) {
  .card-scanline,
  .card:hover .card-scanline {
    animation: none;
    transition: none;
  }
  .card-media > img {
    transition: none;
  }
}


/* ── Upgrade visual: loader, inicio y microinteracciones ── */
#loader {
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(ellipse at 50% 42%, rgba(150, 45, 230, .19), transparent 34%),
    linear-gradient(145deg, #00040b, #020b1a 55%, #000308);
}
#loader::before,
#loader::after {
  content: "";
  position: absolute;
  inset: 8%;
  pointer-events: none;
  border: 1px solid rgba(184, 77, 255, .12);
  clip-path: polygon(0 8%, 8% 0, 92% 0, 100% 8%, 100% 92%, 92% 100%, 8% 100%, 0 92%);
}
#loader::after {
  inset: 12%;
  border-color: rgba(184, 77, 255, .07);
  animation: loader-frame 12s linear infinite;
}
@keyframes loader-frame { to { transform: rotate(360deg); } }
.loader-box {
  position: relative;
  z-index: 1;
  width: min(420px, calc(100vw - 42px));
  padding: 34px 24px 28px;
  gap: 17px;
  border: 1px solid rgba(184, 77, 255, .22);
  background: linear-gradient(145deg, rgba(4, 20, 43, .58), rgba(0, 4, 13, .22));
  box-shadow: 0 0 55px rgba(150, 45, 230, .09), inset 0 0 30px rgba(150, 45, 230, .035);
  clip-path: polygon(0 14px, 14px 0, calc(100% - 14px) 0, 100% 14px, 100% calc(100% - 14px), calc(100% - 14px) 100%, 14px 100%, 0 calc(100% - 14px));
}
.loader-kicker {
  color: #a58abf;
  font: 600 .62rem var(--f-hud);
  letter-spacing: .22em;
}
.loader-box .sl-gate { width: 104px; height: 104px; margin: 4px auto 2px; }
.loader-box .bar {
  width: min(290px, 100%);
  height: 5px;
  overflow: hidden;
  border: 1px solid rgba(184, 77, 255, .55);
  background: rgba(0, 20, 45, .9);
  box-shadow: 0 0 18px rgba(184, 77, 255, .16);
}
.loader-box .bar span {
  display: block;
  width: 38%;
  height: 100%;
  background: linear-gradient(90deg, #a52dff, #ff9bfa, #a52dff);
  box-shadow: 0 0 12px #b84dff;
  animation: loader-progress 2.6s cubic-bezier(.4,0,.2,1) forwards;
}
@keyframes loader-progress { to { width: 100%; } }
.loader-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #d5b9f2;
  font: 600 .59rem var(--f-hud);
  letter-spacing: .12em;
}
.loader-status .status-dot { width: 6px; height: 6px; }
.loader-percent { color: var(--neon-bright); margin-left: auto; }
.hero .wrap {
  border-color: rgba(184, 77, 255, .42);
  background:
    radial-gradient(ellipse at 0% 0%, rgba(184, 77, 255, .09), transparent 45%),
    linear-gradient(135deg, rgba(3, 14, 32, .93), rgba(1, 6, 17, .88));
  box-shadow: 0 20px 70px rgba(0, 0, 0, .23), 0 0 36px rgba(150, 45, 230, .055), inset 0 1px rgba(255,255,255,.025);
}
.hero .wrap::before,
.hero .wrap::after { width: 54px; height: 54px; }
.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 17px;
  color: var(--neon-bright);
  font: 700 .65rem var(--f-hud);
  letter-spacing: .16em;
}
.hero-eyebrow-line {
  display: inline-block;
  width: 24px;
  height: 2px;
  background: var(--neon-bright);
  box-shadow: 0 0 10px var(--neon-glow);
}
.hero-eyebrow-code {
  margin-left: auto;
  color: var(--muted);
  font-size: .58rem;
}
.hero-content h1 {
  text-wrap: balance;
  max-width: 17ch;
  line-height: 1.12;
  letter-spacing: -.025em;
  text-shadow: 0 0 32px rgba(184, 77, 255, .16);
}
.hero-content .lead {
  max-width: 54ch;
  line-height: 1.8;
}
.system-status-tag {
  width: fit-content;
  max-width: 100%;
  padding: 8px 11px;
  border: 1px solid rgba(184, 77, 255, .19);
  background: rgba(150, 45, 230, .07);
}
.hero .row { margin-top: 26px; }
.hero .row .btn { min-height: 46px; }
.btn, .hud-pill-btn, .menu-btn, .links a {
  -webkit-tap-highlight-color: transparent;
}
.btn:focus-visible, .menu-btn:focus-visible, .hud-pill-btn:focus-visible, .links a:focus-visible {
  outline: 2px solid var(--neon-bright);
  outline-offset: 4px;
}
.btn.primary { position: relative; isolation: isolate; }
.btn.primary::marker { content: ""; }
.btn.primary:hover { filter: brightness(1.08); }
.links a { transition: color .2s ease, text-shadow .2s ease, background .2s ease; }
.links a:hover { text-shadow: 0 0 12px var(--neon-glow); }
.card, .panel, .hero .wrap { transform-style: preserve-3d; }
@media (max-width: 640px) {
  .loader-box { padding: 28px 18px 24px; }
  .loader-kicker { font-size: .54rem; letter-spacing: .14em; }
  .loader-box .sl-gate { width: 88px; height: 88px; }
  .hero { padding-top: 42px; }
  .hero .wrap { padding: 27px 20px; gap: 27px; }
  .hero-eyebrow { font-size: .56rem; letter-spacing: .1em; }
  .hero-content h1 { font-size: clamp(1.75rem, 8vw, 2.5rem); }
  .hero .row { gap: 10px; }
  .hero .row .btn { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  #loader::after, .loader-box .bar span { animation: none; }
  .loader-box .bar span { width: 100%; }
}


/* ── Paleta galaxia violeta integral ── */
:root {
  --bg: #05020b;
  --bg2: #0b0415;
  --surface: rgba(14, 5, 28, .88);
  --surface-2: rgba(22, 7, 42, .94);
  --text: #eadcfb;
  --text-bright: #fff4ff;
  --muted: #b09ac9;
  --neon: #b84dff;
  --neon-bright: #f09aff;
  --neon-dim: rgba(184, 77, 255, .2);
  --neon-glow: rgba(184, 77, 255, .58);
  --border: rgba(184, 77, 255, .38);
  --border-dim: rgba(184, 77, 255, .2);
}
body { background: #05020b; color: var(--text); }
body::before {
 background:
  radial-gradient(ellipse at 18% 12%, rgba(125, 35, 205, .19), transparent 38%),
  radial-gradient(ellipse at 82% 45%, rgba(185, 45, 255, .12), transparent 42%),
  radial-gradient(ellipse at 50% 95%, rgba(88, 25, 155, .18), transparent 45%),
  linear-gradient(rgba(184,77,255,.035) 1px, transparent 1px) 0 0 / 60px 60px,
  linear-gradient(90deg, rgba(184,77,255,.035) 1px, transparent 1px) 0 0 / 60px 60px,
  #05020b;
}
#loader { background: radial-gradient(ellipse at 50% 42%, rgba(150, 45, 230, .22), transparent 38%), linear-gradient(145deg, #05020b, #10051d 55%, #05020b); }
.loader-box { background: linear-gradient(145deg, rgba(35, 10, 57, .76), rgba(7, 2, 16, .82)); box-shadow: 0 0 55px rgba(160, 45, 255, .16), inset 0 0 30px rgba(184, 77, 255, .08); }
.loader-box .bar { background: rgba(34, 9, 53, .95); }
.loader-box .bar span { background: linear-gradient(90deg, #8b2cff, #f09aff, #b84dff); }
.hero .wrap { background: radial-gradient(ellipse at 0% 0%, rgba(184, 77, 255, .13), transparent 48%), linear-gradient(135deg, rgba(20, 7, 37, .96), rgba(6, 2, 16, .94)); box-shadow: 0 20px 70px rgba(0,0,0,.32), 0 0 38px rgba(160,45,255,.1), inset 0 1px rgba(255,255,255,.025); }
.system-status-tag { background: rgba(120, 35, 180, .12); }
.card, .panel { background: linear-gradient(145deg, rgba(20, 7, 39, .94), rgba(7, 3, 17, .94)); border-color: rgba(184,77,255,.23); }
.card .card-body { background: linear-gradient(180deg, rgba(92, 28, 135, .18), transparent 72%); }
.card:hover, .panel:hover { border-color: rgba(220, 130, 255, .68); }
.btn.primary { background: linear-gradient(135deg, #7925c9, #c34dff 58%, #ed8aff); border-color: #edb0ff; box-shadow: 0 0 22px rgba(184,77,255,.32), 0 4px 20px rgba(0,0,0,.3); }
.btn.primary:hover { background: linear-gradient(135deg, #9639e8, #d45aff 58%, #ffadfa); }
.filters button[aria-pressed="true"] { background: linear-gradient(135deg, rgba(117,35,195,.9), rgba(204,75,255,.72)); }
::selection { background: #c45aff; color: #12051d; }


/* ── Ajustes de presentación profesional: hero y sección Sobre mí ── */
.hero-content { max-width: 760px; }
.hero-content h1 {
  max-width: 19ch;
  font-size: clamp(2.15rem, 5vw, 3.55rem);
  line-height: 1.12;
}
.hero-content .lead {
  max-width: 58ch;
  font-size: clamp(1rem, 1.4vw, 1.08rem);
}
.hero .system-status-tag .status-text { letter-spacing: .07em; }
.about-intro { font-size: 1.05rem; }
.about-focus-title {
  margin-top: 26px;
  margin-bottom: 12px;
  color: var(--neon-bright);
  font: 700 .78rem var(--f-hud);
  letter-spacing: .15em;
  text-transform: uppercase;
}
.about-highlights {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  list-style: none;
}
.about-highlights li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 15px;
  border: 1px solid var(--border-dim);
  background: linear-gradient(110deg, rgba(184, 77, 255, .08), rgba(184, 77, 255, .02));
  border-radius: 4px;
}
.about-highlights li > span:first-child {
  color: var(--neon-bright);
  font-size: 1.1rem;
  line-height: 1.35;
}
.about-highlights li strong,
.about-highlights li small { display: block; }
.about-highlights li strong {
  color: var(--text-bright);
  font: 600 .78rem var(--f-hud);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.about-highlights li small {
  margin-top: 3px;
  color: var(--muted);
  font-size: .85rem;
  line-height: 1.5;
}
.about-highlights li:hover {
  border-color: var(--border);
  background: rgba(184, 77, 255, .09);
}
@media (max-width: 640px) {
  .hero-content h1 {
    max-width: 16ch;
    font-size: clamp(1.8rem, 8vw, 2.5rem);
  }
  .about-focus-title { margin-top: 22px; }
}


/* ── Navegación rápida lateral con progreso de lectura ── */
.quick-nav {
  position: fixed;
  z-index: 120;
  top: 50%;
  right: max(14px, calc((100vw - 1280px) / 2));
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  padding: 13px 8px 11px;
  border: 1px solid rgba(184, 77, 255, .3);
  background: rgba(10, 3, 19, .88);
  box-shadow: 0 8px 32px rgba(0, 0, 0, .3), 0 0 22px rgba(184, 77, 255, .08);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-radius: 8px;
}
.quick-nav-title {
  writing-mode: vertical-rl;
  color: var(--muted);
  font: 600 .48rem var(--f-hud);
  letter-spacing: .13em;
  margin-bottom: 3px;
}
.quick-nav-link {
  position: relative;
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 5px;
  transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s ease;
}
.quick-nav-link > span {
  font-size: 1.2rem;
  line-height: 1;
}
.quick-nav-link small {
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  transform: translate(4px, -50%);
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  padding: 7px 10px;
  color: var(--text-bright);
  border: 1px solid var(--border);
  border-radius: 4px;
  background: rgba(10, 3, 19, .96);
  font: 600 .65rem var(--f-hud);
  letter-spacing: .04em;
  transition: opacity .18s ease, transform .18s ease;
}
.quick-nav-link:hover small,
.quick-nav-link:focus-visible small {
  opacity: 1;
  transform: translate(0, -50%);
}
.quick-nav-link:hover,
.quick-nav-link.is-active {
  color: #fff;
  border-color: rgba(240, 154, 255, .55);
  background: linear-gradient(145deg, rgba(126, 42, 190, .55), rgba(184, 77, 255, .18));
  box-shadow: 0 0 15px rgba(184, 77, 255, .17);
}
.quick-nav-link.is-active { color: var(--neon-bright); }
.quick-nav-progress {
  position: relative;
  width: 3px;
  height: 48px;
  overflow: hidden;
  border-radius: 4px;
  background: rgba(184, 77, 255, .18);
}
.quick-nav-progress span {
  display: block;
  width: 100%;
  height: 0%;
  border-radius: inherit;
  background: linear-gradient(180deg, #f09aff, #9b4dff);
  box-shadow: 0 0 9px rgba(240, 154, 255, .65);
  transition: height .08s linear;
}
.quick-nav-percent {
  color: var(--neon-bright);
  font: 600 .52rem var(--f-hud);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 760px) {
  .quick-nav {
    top: auto;
    right: 50%;
    bottom: max(12px, env(safe-area-inset-bottom));
    transform: translateX(50%);
    flex-direction: row;
    gap: 7px;
    padding: 7px 10px;
    border-radius: 12px;
    max-width: calc(100vw - 24px);
  }
  .quick-nav-title { display: none; }
  .quick-nav-link { width: 39px; height: 39px; flex: 0 0 39px; }
  .quick-nav-link small {
    right: auto;
    top: auto;
    bottom: calc(100% + 9px);
    left: 50%;
    transform: translate(-50%, 4px);
  }
  .quick-nav-link:hover small,
  .quick-nav-link:focus-visible small { transform: translate(-50%, 0); }
  .quick-nav-progress { width: 42px; height: 3px; }
  .quick-nav-progress span {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #9b4dff, #f09aff);
  }
  .quick-nav-percent { min-width: 27px; text-align: center; }
  body { padding-bottom: 74px; }
}
@media (prefers-reduced-motion: reduce) {
  .quick-nav-link, .quick-nav-link small, .quick-nav-progress span { transition: none; }
}


/* ============================================================
   COMPACT HERO — LESS VERTICAL SPACE
   ============================================================ */
.hero {
  padding-top: clamp(28px, 4vw, 52px);
  padding-bottom: clamp(28px, 4vw, 48px);
}
.hero .wrap {
  gap: clamp(24px, 3.5vw, 42px);
  padding: clamp(24px, 3.5vw, 38px) clamp(24px, 3.5vw, 42px);
}
.hero-content h1 {
  max-width: 21ch;
  font-size: clamp(2rem, 4.2vw, 3.05rem);
  line-height: 1.08;
  margin-block: 10px 14px;
}
.hero-content .lead {
  line-height: 1.6;
  margin-bottom: 0;
}
.hero .row {
  margin-top: 18px;
  gap: 10px;
}
.hunter-profile { gap: 11px; }
.avatar { width: 142px; height: 142px; }
.hunter-gauges { max-width: 150px; }
.hero-eyebrow { margin-bottom: 8px; }
.system-status-tag {
  margin-bottom: 6px;
  padding: 6px 9px;
  font-size: .72rem;
}
@media (max-width: 760px) {
  .hero {
    padding-top: 20px;
    padding-bottom: 24px;
  }
  .hero .wrap {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    padding: 18px 14px 16px;
    text-align: left;
  }
  .hunter-profile {
    grid-column: 1;
    grid-row: 1;
    gap: 0;
    width: 76px;
    align-items: center;
  }
  .avatar-frame { padding: 4px; }
  .avatar { width: 68px; height: 68px; }
  .avatar-glow-ring { filter: blur(5px); }
  .rank-badge {
    font-size: .52rem;
    letter-spacing: .1em;
    padding: 2px 6px;
  }
  .hunter-gauges { display: none; }
  .hero-content {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    max-width: none;
    text-align: left;
  }
  .hero-eyebrow {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    font-size: .48rem;
    letter-spacing: .07em;
    line-height: 1.4;
  }
  .hero-eyebrow-line { width: 13px; }
  .hero-eyebrow-code { margin-left: 0; }
  .system-status-tag {
    display: none;
  }
  .hero-content h1 {
    max-width: none;
    font-size: clamp(1.22rem, 5.3vw, 1.65rem);
    line-height: 1.12;
    letter-spacing: -.035em;
    margin: 7px 0 9px;
    overflow-wrap: anywhere;
  }
  .hero-content .lead {
    font-size: .82rem;
    line-height: 1.5;
    margin: 0;
  }
  .hero .row {
    grid-column: 1 / -1;
    justify-content: flex-start;
    gap: 8px;
    margin-top: 2px;
  }
  .hero .row .btn {
    min-height: 38px;
    padding: 9px 11px;
    font-size: .76rem;
  }
  .hero .row .quest-trigger {
    flex-basis: 100%;
  }
}
@media (max-width: 380px) {
  .hero .wrap { grid-template-columns: 62px minmax(0, 1fr); gap: 10px; }
  .hunter-profile { width: 62px; }
  .avatar { width: 56px; height: 56px; }
  .hero-content h1 { font-size: 1.18rem; }
  .hero-content .lead { font-size: .78rem; }
}


/* ── Scrollbar personalizada: neón azul del Sistema ── */
html {
  scrollbar-width: thin;
  scrollbar-color: #48cfff #08051a;
  scroll-behavior: smooth;
}
html::-webkit-scrollbar {
  width: 10px;
}
html::-webkit-scrollbar-track {
  background: linear-gradient(180deg, #09051a, #100522 55%, #05020b);
  border-left: 1px solid rgba(72, 207, 255, .16);
}
html::-webkit-scrollbar-thumb {
  border: 2px solid #08051a;
  border-radius: 8px;
  background: linear-gradient(180deg, #a5f3ff 0%, #48cfff 35%, #377bff 72%, #8c4dff 100%);
  box-shadow: inset 0 0 5px rgba(255,255,255,.65), 0 0 12px rgba(72,207,255,.55);
}
html::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #e4fcff, #63ddff 38%, #6b8dff 75%, #c078ff);
}
@media (max-width: 760px) {
  html::-webkit-scrollbar { width: 5px; }
  html::-webkit-scrollbar-thumb { border-width: 1px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}


/* ── Botón de instalación PWA ── */
.install-app-btn:not([hidden]) { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-color: rgba(72,207,255,.65); color: #eafaff; background: linear-gradient(135deg, rgba(31,111,180,.22), rgba(184,77,255,.16)); box-shadow: 0 0 18px rgba(72,207,255,.12), inset 0 0 14px rgba(72,207,255,.05); }
.install-app-btn:not([hidden]):hover { border-color: #a5f3ff; box-shadow: 0 0 22px rgba(72,207,255,.24); }
