/* ============================================================
   JUAN PABLO DUEÑAS — PORTAFOLIO V5
   Sitio construido a mano: HTML + CSS + JS, sin frameworks.
   01. Tokens y base
   02. Fondo espacial
   03. Preloader
   04. Navegación
   05. Botones y utilidades
   06. Hero
   07. Sobre mí + estudios + stats
   08. Música (marco del panel)
   09. Portafolio: tabs, proyectos, certificados, stack
   10. Contacto
   11. Footer
   12. Vista de proyecto
   13. Toast, reveal, scrollbar
   14. Responsive
   ============================================================ */

/* ============================================================
   01. TOKENS Y BASE
   ============================================================ */
:root {
  --bg-0: #03060e;
  --bg-1: #050d1b;
  --bg-2: #071426;
  --panel: rgba(10, 21, 38, .62);
  --panel-soft: rgba(12, 25, 45, .45);
  --stroke: rgba(148, 178, 255, .12);
  --stroke-strong: rgba(148, 178, 255, .26);
  --text: #eef4ff;
  --text-2: #c9d6ea;
  --muted: #93a3bd;
  --muted-2: #677792;
  --blue: #3b82f6;
  --blue-2: #60a5fa;
  --blue-3: #2563eb;
  --cyan: #7dd3fc;
  --grad-title: linear-gradient(96deg, #a7d4ff 0%, #5b95fe 42%, #2563eb 100%);
  --grad-text: linear-gradient(96deg, #9cc8ff 0%, #60a5fa 55%, #3b82f6 100%);
  --font-display: "Sora", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "Consolas", monospace;
  --radius: 18px;
  --ease: cubic-bezier(.22, .7, .2, 1);
  --shadow-soft: 0 24px 70px rgba(2, 8, 20, .55);
  --nav-h: 62px;
}

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

/* Cualquier elemento con [hidden] se oculta de verdad (aunque tenga display propio) */
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(96, 165, 250, .4) #050b16;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(1100px 720px at 12% -8%, rgba(37, 99, 235, .22), transparent 62%),
    radial-gradient(900px 620px at 96% -4%, rgba(14, 116, 144, .07), transparent 58%),
    radial-gradient(1200px 800px at 50% 118%, rgba(29, 78, 216, .14), transparent 62%),
    linear-gradient(180deg, #030711 0%, #03060e 45%, #040a16 100%);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.is-locked { overflow: hidden; }

img, svg, canvas { display: block; }
img { max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
ul { list-style: none; }

::selection { background: rgba(37, 99, 235, .45); color: #fff; }

:focus-visible {
  outline: 2px solid rgba(125, 211, 252, .8);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 200;
  padding: 12px 18px;
  border-radius: 10px;
  background: #12305c;
  color: #fff;
  font-size: .9rem;
  transition: top .25s var(--ease);
}
.skip:focus-visible { top: 14px; }

/* ============================================================
   02. FONDO ESPACIAL
   ============================================================ */
.stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: .9;
}

.space {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.space__nebula {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .55;
  will-change: transform;
  animation: nebulaDrift 26s ease-in-out infinite alternate;
}
.space__nebula--a {
  width: 620px; height: 620px;
  left: -180px; bottom: -220px;
  background: radial-gradient(circle, rgba(37, 99, 235, .5), rgba(29, 78, 216, .14) 55%, transparent 70%);
}
.space__nebula--b {
  width: 560px; height: 560px;
  right: -190px; bottom: -280px;
  background: radial-gradient(circle, rgba(8, 145, 178, .26), rgba(14, 116, 144, .07) 55%, transparent 72%);
  opacity: .42;
  animation-delay: -8s;
}
.space__nebula--c {
  width: 700px; height: 700px;
  left: 38%; top: 58%;
  background: radial-gradient(circle, rgba(30, 64, 175, .26), transparent 68%);
  animation-delay: -16s;
}
.space__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 178, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 178, 255, .05) 1px, transparent 1px);
  background-size: 90px 90px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, rgba(0, 0, 0, .55), transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, rgba(0, 0, 0, .55), transparent 75%);
  opacity: .5;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 45%, transparent 40%, rgba(1, 4, 10, .55) 100%),
    linear-gradient(180deg, rgba(1, 4, 10, .35), transparent 18%, transparent 82%, rgba(1, 4, 10, .5));
}

main, .topbar, .footer { position: relative; z-index: 2; }

@keyframes nebulaDrift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(40px, -30px, 0) scale(1.08); }
}

/* ============================================================
   03. PRELOADER
   ============================================================ */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  background: #03060e;
  transition: opacity .7s var(--ease), visibility .7s;
}
.preloader.is-done { opacity: 0; visibility: hidden; }

.preloader__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.preloader__num {
  font-family: var(--font-display);
  font-size: clamp(4rem, 9vw, 6.4rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.05em;
  color: #f4f7ff;
  display: flex;
  align-items: flex-start;
}
/* El % heredaba el letter-spacing negativo y, con background-clip:text, el glifo
   se salía de su caja y la parte sobrante no se pintaba (se veía cortado). */
.preloader__num sup {
  display: inline-block;
  font-size: .34em;
  line-height: 1.12;
  letter-spacing: 0;
  margin-top: .34em;
  margin-left: .08em;
  padding: .1em .14em .1em .04em;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 700;
  overflow: visible;
}
.preloader__bar {
  position: relative;
  width: min(320px, 62vw);
  height: 2px;
  border-radius: 99px;
  background: rgba(148, 178, 255, .14);
  overflow: hidden;
}
.preloader__bar i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #60a5fa, #2563eb);
  box-shadow: 0 0 18px rgba(96, 165, 250, .8);
  transition: width .12s linear;
}
.preloader__label {
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted-2);
}

/* ============================================================
   04. NAVEGACIÓN
   ============================================================ */
.topbar {
  position: fixed;
  top: 22px;
  left: 0;
  right: 0;
  z-index: 80;
  display: flex;
  justify-content: center;
  padding: 0 18px;
  pointer-events: none;
}

.nav {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(8, 17, 32, .68);
  border: 1px solid rgba(148, 178, 255, .14);
  box-shadow:
    0 22px 60px rgba(1, 5, 14, .6),
    inset 0 1px 0 rgba(255, 255, 255, .05);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  transition: background .35s var(--ease), border-color .35s var(--ease), transform .35s var(--ease);
}
body.is-scrolled .nav {
  background: rgba(7, 15, 29, .82);
  border-color: rgba(148, 178, 255, .18);
}

.nav__link {
  position: relative;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: .88rem;
  font-weight: 500;
  color: var(--muted);
  transition: color .25s var(--ease), background .25s var(--ease);
  white-space: nowrap;
}
.nav__link:hover { color: var(--text); }
.nav__link.is-active {
  color: var(--text);
  background: rgba(148, 178, 255, .12);
  box-shadow: inset 0 0 0 1px rgba(148, 178, 255, .14);
}

.nav__divider {
  width: 1px;
  height: 22px;
  margin: 0 6px;
  background: rgba(148, 178, 255, .16);
  flex: 0 0 auto;
}

.nav__sound {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #b9c9e2;
  transition: background .25s var(--ease), color .25s var(--ease);
}
.nav__sound:hover { background: rgba(148, 178, 255, .1); color: #fff; }
.nav__sound svg { width: 19px; height: 19px; }
.nav__sound .sound-wave { opacity: 0; transition: opacity .25s var(--ease); }
.nav__sound .sound-mute { display: none; }
.nav__sound-bars {
  position: absolute;
  inset: 0;
  display: none;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  padding-bottom: 12px;
}
.nav__sound-bars i {
  width: 2.5px;
  border-radius: 2px;
  background: #4f9dff;
  height: 6px;
}
.nav__sound-bars i:nth-child(1) { height: 6px; }
.nav__sound-bars i:nth-child(2) { height: 11px; }
.nav__sound-bars i:nth-child(3) { height: 8px; }

/* Estado "música activa" (lo activa music.js) */
.nav__sound.is-on { color: #8cc8ff; }
.nav__sound.is-on .sound-wave { opacity: 1; }
.nav__sound.is-on svg { opacity: 0; }
.nav__sound.is-on .nav__sound-bars { display: flex; }
.nav__sound.is-on .nav__sound-bars i { animation: eqBar .9s ease-in-out infinite alternate; }
.nav__sound.is-on .nav__sound-bars i:nth-child(2) { animation-delay: .18s; }
.nav__sound.is-on .nav__sound-bars i:nth-child(3) { animation-delay: .36s; }
@keyframes eqBar {
  from { transform: scaleY(.45); }
  to   { transform: scaleY(1.15); }
}

/* ============================================================
   05. BOTONES Y UTILIDADES
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 22px;
  border-radius: 12px;
  font-size: .92rem;
  font-weight: 600;
  letter-spacing: .01em;
  white-space: nowrap;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease),
              background .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease);
}
.btn svg { width: 17px; height: 17px; flex: 0 0 auto; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  color: #fff;
  background: linear-gradient(180deg, #3f86f7 0%, #2563eb 100%);
  border: 1px solid rgba(147, 197, 253, .35);
  box-shadow:
    0 14px 34px rgba(37, 99, 235, .34),
    inset 0 1px 0 rgba(255, 255, 255, .22);
}
.btn--primary:hover {
  box-shadow:
    0 18px 44px rgba(37, 99, 235, .46),
    inset 0 1px 0 rgba(255, 255, 255, .28);
}

.btn--ghost {
  color: #dbe6fb;
  background: rgba(13, 26, 47, .6);
  border: 1px solid rgba(148, 178, 255, .18);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.btn--ghost:hover {
  border-color: rgba(148, 178, 255, .34);
  background: rgba(17, 34, 60, .7);
  color: #fff;
}

.btn--full { width: 100%; }

.icon-link {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #a9bbd6;
  background: rgba(13, 26, 47, .5);
  border: 1px solid rgba(148, 178, 255, .14);
  transition: color .25s var(--ease), border-color .25s var(--ease),
              background .25s var(--ease), transform .25s var(--ease);
}
.icon-link svg { width: 18px; height: 18px; }
.icon-link:hover {
  color: #fff;
  border-color: rgba(96, 165, 250, .55);
  background: rgba(30, 64, 120, .45);
  transform: translateY(-2px);
}

.kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 14px;
}

.grad {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section {
  width: min(1240px, calc(100% - 80px));
  margin: 0 auto;
  padding: 110px 0;
  position: relative;
}

.section-head { text-align: center; margin-bottom: 40px; }
.section-head__title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 4.6vw, 3.7rem);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.05;
  color: #f7faff;
}
.section-head__sub {
  margin: 16px auto 0;
  max-width: 62ch;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.75;
}

/* ============================================================
   06. HERO
   ============================================================ */
.hero {
  position: relative;
  width: min(1240px, calc(100% - 80px));
  margin: 0 auto;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr);
  align-items: center;
  gap: clamp(20px, 4vw, 64px);
  padding: calc(var(--nav-h) + 54px) 0 64px;
}

.hero__copy { max-width: 640px; }

.hero__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.9rem, 6vw, 5.4rem);
  line-height: .98;
  letter-spacing: -.045em;
  display: flex;
  flex-direction: column;
  gap: .04em;
}
.hero__title-gradient {
  background: var(--grad-title);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 12px 40px rgba(37, 99, 235, .25));
}
.hero__title-solid { color: #f8fbff; }

.hero__role {
  margin-top: 26px;
  font-size: clamp(1.1rem, 1.7vw, 1.4rem);
  font-weight: 600;
  color: var(--text-2);
  letter-spacing: -.01em;
}

.hero__desc {
  margin-top: 16px;
  max-width: 46ch;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.8;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.hero__find {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 44px;
}
.hero__find-label {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.hero__socials { display: flex; gap: 10px; }

.hero__visual {
  position: relative;
  width: 100%;
  min-height: 660px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  isolation: isolate;
}
/* Sin resplandor azul detrás de la credencial: la tarjeta se recorta limpia
   contra el fondo estrellado (el cliente lo pidió explícitamente). */

.hero__hint {
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: .66rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted-2);
  white-space: nowrap;
  opacity: .8;
}
.hero__hint svg { width: 15px; height: 15px; }

/* ============================================================
   07. SOBRE MÍ + ESTUDIOS + STATS
   ============================================================ */
.about { padding-top: 60px; }

.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr) minmax(0, 1fr);
  gap: clamp(24px, 3.4vw, 54px);
  align-items: center;
}

.about__left { display: flex; flex-direction: column; align-items: flex-start; }
.about__hi {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 3.4vw, 2.9rem);
  font-weight: 700;
  letter-spacing: -.03em;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.1;
}
.about__name {
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 4.2vw, 3.6rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -.04em;
  color: #f8fbff;
  margin: 8px 0 30px;
}

.about__photo {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: #060f1e;
  isolation: isolate;
  box-shadow:
    0 34px 90px rgba(2, 7, 18, .72),
    0 0 0 1px rgba(148, 178, 255, .13),
    0 12px 30px rgba(2, 7, 18, .45);
}
/* filo degradado fino (cian → azul → tenue) */
.about__photo::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(155deg,
    rgba(125, 211, 252, .55),
    rgba(59, 130, 246, .18) 38%,
    rgba(148, 178, 255, .05) 62%,
    rgba(125, 211, 252, .26));
  -webkit-mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000);
  mask-composite: exclude;
  pointer-events: none;
}
.about__photo::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 13%;
  z-index: 2;
  background: linear-gradient(180deg, transparent, rgba(4, 10, 20, .6));
  pointer-events: none;
}
.about__photo-glow {
  position: absolute;
  inset: -20% -10% auto;
  height: 70%;
  background: radial-gradient(ellipse at 50% 40%, rgba(37, 99, 235, .38), transparent 66%);
  filter: blur(30px);
  z-index: -1;
}
.about__photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 28%;
  transform: scale(1.005);
}
.about__photo-tag {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(6, 14, 27, .78);
  border: 1px solid rgba(148, 178, 255, .16);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-family: var(--font-mono);
  font-size: .64rem;
  letter-spacing: .14em;
  color: #b8c8e2;
}
.about__photo-tag i {
  width: 6px; height: 6px; border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 10px rgba(52, 211, 153, .9);
}

/* Variante recorte: el retrato vuela sobre el fondo estrellado */
.about__photo--cutout {
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}
.about__photo--cutout::after { display: none; }
.about__photo--cutout img {
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
  transform: none;
  -webkit-mask-image: linear-gradient(180deg, #000 74%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 74%, transparent 100%);
  filter: drop-shadow(0 30px 70px rgba(0, 4, 12, .72));
}
.about__photo--cutout .about__photo-glow {
  inset: 2% -6% 12%;
  background: radial-gradient(ellipse at 50% 45%, rgba(37, 99, 235, .34), rgba(8, 145, 178, .12) 46%, transparent 68%);
}
.about__photo--cutout .about__photo-tag {
  left: 50%;
  bottom: 6px;
  transform: translateX(-50%);
}

/* Variante fundido: la foto ya trae fondo de estudio; se difumina el marco */
.about__photo--blend {
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
  -webkit-mask-image: radial-gradient(ellipse 82% 86% at 50% 48%, #000 62%, transparent 100%);
  mask-image: radial-gradient(ellipse 82% 86% at 50% 48%, #000 62%, transparent 100%);
}
.about__photo--blend::after { display: none; }
.about__photo--blend img { aspect-ratio: 4 / 5; object-fit: cover; }
.about__photo--blend .about__photo-glow {
  inset: 6% -8% 10%;
  background: radial-gradient(ellipse at 50% 50%, rgba(37, 99, 235, .26), transparent 66%);
}
.about__photo--blend .about__photo-tag {
  left: 50%;
  bottom: 10%;
  transform: translateX(-50%);
}

.about__right p {
  color: var(--muted);
  font-size: .96rem;
  line-height: 1.85;
  margin-bottom: 18px;
}
.about__right strong { color: var(--text-2); font-weight: 600; }
.about__right em { color: #b9d4ff; font-style: normal; }
.about__right .btn { margin-top: 10px; }

.about__study {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 3.4vw, 54px);
  margin-top: 76px;
}
.study__title {
  font-family: var(--font-display);
  font-size: 1.42rem;
  font-weight: 700;
  letter-spacing: -.02em;
  color: #f2f7ff;
  margin-bottom: 18px;
}
.study-card {
  display: flex;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid var(--stroke);
  margin-bottom: 12px;
  transition: border-color .3s var(--ease), background .3s var(--ease), transform .3s var(--ease);
}
.study-card:hover {
  border-color: rgba(96, 165, 250, .32);
  background: rgba(14, 29, 52, .68);
  transform: translateY(-2px);
}
.study-card__icon {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #7cc4ff;
  background: linear-gradient(180deg, rgba(19, 42, 77, .95), rgba(9, 20, 38, .95));
  border: 1px solid rgba(125, 211, 252, .16);
}
.study-card__icon svg { width: 22px; height: 22px; }
.study-card b { font-size: .95rem; font-weight: 600; color: var(--text); display: block; }
.study-card p { font-size: .84rem; color: var(--muted); margin-top: 3px; line-height: 1.55; }
.study-card small {
  display: block;
  margin-top: 7px;
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--muted-2);
  letter-spacing: .04em;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 56px;
}
.stat-card {
  position: relative;
  padding: 22px 24px;
  min-height: 196px;
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  background: linear-gradient(158deg, rgba(17, 33, 58, .72), rgba(7, 15, 29, .55));
  border: 1px solid var(--stroke);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
  overflow: hidden;
  transition: border-color .3s var(--ease), transform .3s var(--ease);
}
.stat-card:hover { border-color: rgba(96, 165, 250, .3); transform: translateY(-3px); }
.stat-card::before {
  content: "";
  position: absolute;
  inset: -60% -30% auto;
  height: 120%;
  background: radial-gradient(ellipse at 20% 0%, rgba(37, 99, 235, .22), transparent 60%);
  pointer-events: none;
}
.stat-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #86c8ff;
  background: rgba(19, 40, 71, .8);
  border: 1px solid rgba(125, 211, 252, .14);
}
.stat-card__icon svg { width: 21px; height: 21px; }
.stat-card strong {
  position: absolute;
  top: 14px;
  right: 22px;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 4vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: 1;
  background: linear-gradient(180deg, #ffffff, #a9c8f0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-card b { margin-top: auto; font-size: 1rem; font-weight: 600; color: var(--text-2); }
.stat-card small { font-size: .8rem; color: var(--muted-2); margin-top: 4px; }

/* ============================================================
   08. MÚSICA — marco del panel
   (el reproductor interior lo estiliza music.css)
   ============================================================ */
.music-section {
  width: min(1240px, calc(100% - 80px));
  margin: 0 auto;
  padding: 40px 0 40px;
  position: relative;
}

.music-panel {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  gap: clamp(28px, 4vw, 60px);
  align-items: center;
  padding: clamp(30px, 4.4vw, 58px);
  border-radius: 28px;
  background:
    radial-gradient(900px 420px at 8% -20%, rgba(37, 99, 235, .2), transparent 60%),
    linear-gradient(135deg, rgba(14, 28, 52, .82), rgba(6, 14, 28, .72));
  border: 1px solid rgba(148, 178, 255, .13);
  box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255, 255, 255, .04);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  position: relative;
  overflow: hidden;
}
.music-panel::after {
  content: "";
  position: absolute;
  inset: auto -10% -60% 55%;
  height: 320px;
  background: radial-gradient(ellipse at center, rgba(14, 116, 144, .22), transparent 68%);
  filter: blur(20px);
  pointer-events: none;
}

.music-copy__title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.2vw, 2.7rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.035em;
  color: #f7faff;
  margin-bottom: 18px;
}
.music-copy > p {
  color: var(--muted);
  font-size: .96rem;
  line-height: 1.8;
  max-width: 40ch;
  margin-bottom: 26px;
}
.music-copy .btn { position: relative; z-index: 1; }

.music-stage { position: relative; }

/* ============================================================
   09. PORTAFOLIO
   ============================================================ */
.portfolio { padding-top: 90px; }

.tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
  width: fit-content;
  margin: 0 auto 44px;
  padding: 6px;
  border-radius: 16px;
  background: rgba(9, 19, 35, .6);
  border: 1px solid var(--stroke);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.tab {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 20px;
  border-radius: 11px;
  font-size: .9rem;
  font-weight: 500;
  color: var(--muted);
  transition: color .25s var(--ease), background .25s var(--ease), box-shadow .25s var(--ease);
  white-space: nowrap;
}
.tab svg { width: 17px; height: 17px; }
.tab:hover { color: var(--text); }
.tab.is-active {
  color: #fff;
  background: linear-gradient(180deg, #3f86f7, #2563eb);
  box-shadow: 0 12px 28px rgba(37, 99, 235, .38), inset 0 1px 0 rgba(255, 255, 255, .22);
}

.panel { animation: panelIn .45s var(--ease) both; }
.panel[hidden] { display: none; }
@keyframes panelIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
.panel__note {
  margin-top: 26px;
  text-align: center;
  font-size: .82rem;
  color: var(--muted-2);
}

.projects {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.project-card {
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(170deg, rgba(13, 27, 49, .78), rgba(6, 14, 28, .62));
  border: 1px solid var(--stroke);
  box-shadow: 0 18px 44px rgba(1, 5, 14, .35);
  transition: transform .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
  cursor: pointer;
}
.project-card:hover {
  transform: translateY(-5px);
  border-color: rgba(96, 165, 250, .4);
  box-shadow: 0 26px 60px rgba(1, 5, 14, .5);
}
.project-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #071323;
  border-bottom: 1px solid rgba(148, 178, 255, .08);
}
.project-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(3, 8, 18, 0) 55%, rgba(4, 10, 20, .55));
  pointer-events: none;
}
.project-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform .7s var(--ease);
}
.project-card:hover .project-card__media img { transform: scale(1.045); }
.project-card__body {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 22px 22px 20px;
  flex: 1;
}
.project-card__cat {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #6f8bb5;
}
.project-card h3 {
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: -.02em;
  color: #f4f8ff;
}
.project-card p {
  font-size: .88rem;
  line-height: 1.65;
  color: var(--muted);
  margin-bottom: 12px;
}
.project-card__link {
  margin-top: auto;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 10px;
  font-size: .83rem;
  font-weight: 600;
  color: #cfe2ff;
  background: rgba(18, 36, 64, .8);
  border: 1px solid rgba(148, 178, 255, .16);
  transition: background .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease);
}
.project-card__link svg { width: 15px; height: 15px; transition: transform .25s var(--ease); }
.project-card__link:hover {
  background: rgba(37, 99, 235, .35);
  border-color: rgba(96, 165, 250, .5);
  color: #fff;
}
.project-card__link:hover svg { transform: translateX(3px); }

.certs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.cert-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 26px;
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(14, 29, 52, .72), rgba(6, 14, 28, .55));
  border: 1px solid var(--stroke);
  min-height: 210px;
  overflow: hidden;
  transition: transform .3s var(--ease), border-color .3s var(--ease);
}
.cert-card:hover { transform: translateY(-4px); border-color: rgba(96, 165, 250, .35); }
.cert-card::before {
  content: "";
  position: absolute;
  inset: -50% 40% auto -20%;
  height: 160%;
  background: radial-gradient(ellipse at 30% 25%, rgba(37, 99, 235, .2), transparent 60%);
}
.cert-card__seal {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #8fd0ff;
  background: rgba(18, 38, 68, .85);
  border: 1px solid rgba(125, 211, 252, .16);
  position: relative;
}
.cert-card__seal svg { width: 24px; height: 24px; }
.cert-card__year {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -.04em;
  color: rgba(140, 200, 255, .9);
  line-height: 1;
}
.cert-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -.01em;
  color: #f2f7ff;
}
.cert-card p { font-size: .87rem; line-height: 1.65; color: var(--muted); }
.cert-card__meta {
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #6f8bb5;
}

.stack {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.stack-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  border-radius: 13px;
  background: rgba(11, 24, 44, .6);
  border: 1px solid var(--stroke);
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-2);
  transition: border-color .25s var(--ease), background .25s var(--ease), transform .25s var(--ease);
}
.stack-item:hover {
  border-color: rgba(96, 165, 250, .35);
  background: rgba(16, 34, 60, .75);
  transform: translateY(-2px);
}
.stack-item__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(180deg, #7dd3fc, #2563eb);
  box-shadow: 0 0 10px rgba(96, 165, 250, .8);
  flex: 0 0 auto;
}
.stack-item b {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: .64rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted-2);
}

/* ============================================================
   10. CONTACTO
   ============================================================ */
.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  gap: 26px;
  align-items: start;
}
.contact__col { display: flex; flex-direction: column; gap: 26px; }

.form {
  padding: clamp(22px, 2.6vw, 30px);
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(13, 27, 49, .72), rgba(6, 14, 28, .58));
  border: 1px solid var(--stroke);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03);
}
.form__title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -.01em;
  color: #f4f8ff;
  margin-bottom: 18px;
}
.field { display: block; margin-bottom: 14px; }
.field > span {
  display: block;
  font-size: .8rem;
  color: var(--muted);
  margin-bottom: 8px;
}
.field input,
.field textarea {
  width: 100%;
  padding: 13px 15px;
  border-radius: 11px;
  background: rgba(5, 13, 26, .72);
  border: 1px solid rgba(148, 178, 255, .14);
  color: var(--text);
  font-size: .92rem;
  line-height: 1.5;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease);
  resize: vertical;
}
.field input::placeholder,
.field textarea::placeholder { color: #5f718b; }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: rgba(96, 165, 250, .6);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .16);
  background: rgba(7, 17, 33, .85);
}
.field--file input[type="file"] {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}
.field__file-ui {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px;
  border-radius: 11px;
  border: 1px dashed rgba(148, 178, 255, .24);
  background: rgba(6, 15, 29, .6);
  color: var(--muted);
  font-size: .87rem;
  cursor: pointer;
  transition: border-color .25s var(--ease), color .25s var(--ease), background .25s var(--ease);
}
.field__file-ui svg { width: 17px; height: 17px; }
.field--file:hover .field__file-ui {
  border-color: rgba(96, 165, 250, .45);
  color: #cfe2ff;
  background: rgba(10, 22, 42, .8);
}
.field--file.has-file .field__file-ui { color: #8fd0ff; border-color: rgba(96, 165, 250, .5); }
.form__note { font-size: .76rem; color: var(--muted-2); margin: 10px 0 16px; line-height: 1.6; }

.findme {
  padding: 24px;
  border-radius: 20px;
  background: radial-gradient(600px 260px at 90% -30%, rgba(37, 99, 235, .18), transparent 60%),
              linear-gradient(160deg, rgba(13, 27, 49, .68), rgba(6, 14, 28, .55));
  border: 1px solid var(--stroke);
}
.findme__label {
  display: block;
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 14px;
}
.findme__row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 11px 12px;
  border-radius: 13px;
  border: 1px solid transparent;
  transition: background .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
}
.findme__row + .findme__row { margin-top: 4px; }
.findme__row:hover {
  background: rgba(16, 33, 59, .7);
  border-color: var(--stroke);
  transform: translateX(2px);
}
.findme__icon {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #dbe8ff;
  background: linear-gradient(180deg, #1a2c4d, #0e1c33);
  border: 1px solid rgba(148, 178, 255, .12);
}
.findme__icon svg { width: 20px; height: 20px; }
.findme__icon--ig {
  background: linear-gradient(135deg, #833ab4, #fd1d1d 55%, #fcb045);
  border-color: rgba(255, 255, 255, .16);
  color: #fff;
}
.findme__txt { display: flex; flex-direction: column; line-height: 1.3; }
.findme__txt b { font-size: .92rem; font-weight: 600; color: var(--text); }
.findme__txt small { font-size: .78rem; color: var(--muted-2); }
.findme__arrow {
  margin-left: auto;
  width: 16px;
  height: 16px;
  color: var(--muted-2);
  transition: transform .25s var(--ease), color .25s var(--ease);
}
.findme__row:hover .findme__arrow { color: #8fd0ff; transform: translate(2px, -2px); }
.findme__status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(148, 178, 255, .1);
  font-size: .78rem;
  color: var(--muted);
}
.findme__status i {
  width: 7px; height: 7px; border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 10px rgba(52, 211, 153, .9);
}

.comments {
  padding: 22px 24px;
  border-radius: 20px;
  background: rgba(9, 19, 36, .5);
  border: 1px solid var(--stroke);
}
.comments__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.comments__head .findme__label { margin-bottom: 0; }
.comments__count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: .7rem;
  color: var(--muted-2);
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
}
.comments__list { display: flex; flex-direction: column; gap: 14px; }
.comment {
  display: flex;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(148, 178, 255, .08);
}
.comment:last-child { border-bottom: 0; padding-bottom: 0; }
.comment__avatar {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .85rem;
  color: #dbe9ff;
  background: linear-gradient(135deg, #1e3a63, #0d1d34);
  border: 1px solid rgba(148, 178, 255, .16);
  overflow: hidden;
}
.comment__avatar img { width: 100%; height: 100%; object-fit: cover; }
.comment__body { min-width: 0; }
.comment__top { display: flex; align-items: baseline; gap: 8px; }
.comment__top b { font-size: .87rem; font-weight: 600; color: var(--text-2); }
.comment__top span { font-size: .72rem; color: var(--muted-2); font-family: var(--font-mono); }
.comment__body p { font-size: .87rem; color: var(--muted); line-height: 1.6; margin-top: 3px; overflow-wrap: anywhere; }
.comments__empty { font-size: .85rem; color: var(--muted-2); }

/* ============================================================
   11. FOOTER
   ============================================================ */
.footer {
  margin-top: 60px;
  border-top: 1px solid rgba(148, 178, 255, .1);
  background: linear-gradient(180deg, rgba(4, 10, 20, .4), rgba(2, 6, 13, .85));
}
.footer__main {
  width: min(1240px, calc(100% - 80px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  padding: 56px 0 44px;
}
.footer__brand b {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -.02em;
  color: #f2f7ff;
}
.footer__brand b span { color: #60a5fa; }
.footer__brand p {
  margin-top: 12px;
  max-width: 38ch;
  font-size: .87rem;
  line-height: 1.7;
  color: var(--muted-2);
}
.footer__col { display: flex; flex-direction: column; gap: 9px; }
.footer__title {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 4px;
}
.footer__col a {
  font-size: .87rem;
  color: var(--muted);
  transition: color .25s var(--ease);
  width: fit-content;
}
.footer__col a:hover { color: #cfe2ff; }
.footer__socials { display: flex; gap: 10px; margin-top: 4px; }
.footer__socials .icon-link { width: 38px; height: 38px; }
.footer__bottom {
  width: min(1240px, calc(100% - 80px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 0 26px;
  border-top: 1px solid rgba(148, 178, 255, .08);
  font-size: .8rem;
  color: var(--muted-2);
}
.footer__top {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 10px;
  font-size: .8rem;
  font-weight: 500;
  color: #cfe2ff;
  background: rgba(13, 26, 47, .7);
  border: 1px solid var(--stroke);
  transition: border-color .25s var(--ease), background .25s var(--ease), transform .25s var(--ease);
}
.footer__top svg { width: 15px; height: 15px; }
.footer__top:hover { border-color: rgba(96, 165, 250, .4); background: rgba(20, 40, 70, .8); transform: translateY(-2px); }

/* ============================================================
   12. VISTA DE PROYECTO
   ============================================================ */
.project-view {
  width: min(1240px, calc(100% - 80px));
  margin: 0 auto;
  padding: calc(var(--nav-h) + 76px) 0 90px;
}
.project-view__top {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 44px;
}
.project-view__back { padding: 11px 18px; }
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .84rem;
  color: var(--muted-2);
}
.breadcrumb svg { width: 13px; height: 13px; }
.breadcrumb b { color: var(--text-2); font-weight: 600; }

.project-view__hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
}
.project-view__tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #6f8bb5;
  margin-bottom: 14px;
}
.project-view__title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.2vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1.04;
  color: #f8fbff;
}
.project-view__sub {
  margin-top: 16px;
  font-size: 1.05rem;
  color: var(--text-2);
  font-weight: 500;
}
.project-view__desc {
  margin-top: 18px;
  color: var(--muted);
  font-size: .96rem;
  line-height: 1.85;
  max-width: 58ch;
}
.project-view__media {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow-soft);
  background: #071323;
  position: relative;
}
.project-view__media img { width: 100%; height: auto; }
.project-view__media::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 80px rgba(2, 8, 18, .5);
  pointer-events: none;
}
.project-view__grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 26px;
  margin-top: 52px;
}
.project-view__block {
  padding: 26px;
  border-radius: 18px;
  background: rgba(10, 21, 38, .5);
  border: 1px solid var(--stroke);
}
.project-view__block h3 {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 700;
  color: #f2f7ff;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.project-view__block h3 svg { width: 17px; height: 17px; color: #7cc4ff; }
.project-view__list { display: flex; flex-direction: column; gap: 11px; }
.project-view__list li {
  position: relative;
  padding-left: 20px;
  font-size: .9rem;
  line-height: 1.6;
  color: var(--muted);
}
.project-view__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .55em;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: linear-gradient(180deg, #7dd3fc, #2563eb);
  transform: rotate(45deg);
}
.project-view__tech { display: flex; flex-wrap: wrap; gap: 8px; }
.project-view__tech span {
  padding: 7px 12px;
  border-radius: 9px;
  font-family: var(--font-mono);
  font-size: .74rem;
  color: #cfe2ff;
  background: rgba(18, 36, 64, .8);
  border: 1px solid rgba(148, 178, 255, .14);
}
.project-view__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(148, 178, 255, .1);
}
.project-view__status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: .8rem;
  color: #a9bbd6;
}
.project-view__status i {
  width: 7px; height: 7px; border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 10px rgba(52, 211, 153, .8);
}
.project-view__status.client i { background: #fbbf24; box-shadow: 0 0 10px rgba(251, 191, 36, .8); }
.project-view__note { font-size: .78rem; color: var(--muted-2); }
.project-view__cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }

/* ============================================================
   13. TOAST, REVEAL, SCROLLBAR
   ============================================================ */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 130;
  transform: translate(-50%, 24px);
  max-width: min(92vw, 460px);
  padding: 13px 20px;
  border-radius: 12px;
  font-size: .87rem;
  color: #eaf2ff;
  background: rgba(12, 26, 48, .94);
  border: 1px solid rgba(96, 165, 250, .35);
  box-shadow: 0 20px 50px rgba(1, 5, 14, .6);
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s var(--ease), transform .35s var(--ease), visibility .35s;
  text-align: center;
}
.toast.is-visible { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  will-change: opacity, transform;
}
[data-reveal].is-visible { opacity: 1; transform: none; }
[data-reveal-delay="1"] { transition-delay: .1s; }
[data-reveal-delay="2"] { transition-delay: .2s; }
[data-reveal-delay="3"] { transition-delay: .3s; }

body::-webkit-scrollbar { width: 10px; }
body::-webkit-scrollbar-track { background: #04080f; }
body::-webkit-scrollbar-thumb {
  background: rgba(96, 165, 250, .34);
  border-radius: 99px;
  border: 2px solid #04080f;
}
body::-webkit-scrollbar-thumb:hover { background: rgba(96, 165, 250, .55); }

/* ============================================================
   14. RESPONSIVE
   ============================================================ */
@media (max-width: 760px) {
  .music-copy .btn { white-space: normal; text-align: center; }
}
@media (max-width: 1180px) {
  .hero { grid-template-columns: minmax(0, 1fr); padding-top: calc(var(--nav-h) + 80px); }
  .hero__copy { max-width: 720px; }
  .hero__visual { min-height: 620px; margin-top: 24px; }
  .about__grid { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .about__left { order: 0; align-items: center; }
  .about__photo { order: 1; grid-column: auto; width: min(380px, 84vw); margin: 10px auto; }
  .about__right { order: 2; max-width: 620px; }
  .about__right .btn { margin-left: auto; margin-right: auto; }
  .projects { grid-template-columns: repeat(2, 1fr); }
  .certs { grid-template-columns: repeat(2, 1fr); }
  .stack { grid-template-columns: repeat(3, 1fr); }
  .music-panel { grid-template-columns: 1fr; }
  .music-copy > p { max-width: 56ch; }
  .project-view__hero { grid-template-columns: 1fr; }
  .project-view__grid { grid-template-columns: 1fr; }
}

@media (max-width: 980px) {
  .section, .hero, .music-section, .footer__main, .footer__bottom, .project-view {
    width: min(100% - 44px, 760px);
  }
  .hero__visual { min-height: 560px; }
  .hero__title { font-size: clamp(2.6rem, 8.4vw, 4rem); }
  .contact__grid { grid-template-columns: 1fr; }
  .about__study { grid-template-columns: 1fr; gap: 34px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat-card:last-child { grid-column: 1 / -1; min-height: 170px; }
  .footer__main { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .nav__link { padding: 9px 12px; font-size: .82rem; }
  .nav { gap: 0; }
  .hero { padding-top: calc(var(--nav-h) + 68px); gap: 12px; }
  .hero__role { margin-top: 20px; }
  .hero__actions .btn { flex: 1 1 auto; }
  .hero__visual { min-height: 520px; }
  .hero__find { flex-direction: column; align-items: flex-start; gap: 12px; }
  .about__grid { grid-template-columns: 1fr; }
  .about__photo { max-width: 320px; }
  .projects, .certs { grid-template-columns: 1fr; }
  .stack { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr; }
  .stat-card:last-child { grid-column: auto; }
  .music-panel { padding: 24px; border-radius: 22px; }
  .tabs { width: 100%; justify-content: flex-start; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .tab { padding: 10px 14px; font-size: .82rem; }
  .footer__main { grid-template-columns: 1fr; gap: 30px; padding: 40px 0 32px; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
  .project-view { padding-top: calc(var(--nav-h) + 60px); }
}

@media (max-width: 520px) {
  .nav { padding: 5px; }
  .nav__link { padding: 8px 9px; font-size: .76rem; }
  .nav__divider { display: none; }
  .nav__sound { width: 34px; height: 34px; }
  .section, .hero, .music-section, .footer__main, .footer__bottom, .project-view { width: calc(100% - 32px); }
  .hero__visual { min-height: 470px; }
  .stack { grid-template-columns: 1fr; }
  .about__photo { max-width: 280px; }
}

/* ============================================================
   MOVIMIENTO REDUCIDO
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .space__nebula { animation: none; }
}
