/* ==========================================================================
   Santiago Villamizar Mantilla — Portfolio
   ========================================================================== */

:root {
  /* Paleta */
  --black: #050507;
  --black-2: #0B0A10;
  --midnight: #191027;
  --purple-dark: #2A1645;
  --purple: #6D28D9;
  --purple-bright: #8B5CF6;
  --lavender: #C4B5FD;
  --white: #FFFFFF;
  --white-2: #D4D4D8;
  --gray-dark: #18181B;
  --muted: #A1A1AA;

  /* Superficies */
  --surface: rgba(11, 10, 16, .72);
  --surface-solid: #0B0A10;
  --border: rgba(255, 255, 255, .08);
  --border-strong: rgba(139, 92, 246, .35);
  --glow: 0 0 0 1px rgba(139, 92, 246, .35), 0 18px 60px -18px rgba(109, 40, 217, .55);

  /* Tipografía */
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Cascadia Code", Consolas, monospace;

  /* Layout */
  --container: 1200px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --header-h: 72px;

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
}

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

* { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  background: var(--black);
  color: var(--white-2);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

button, input, textarea { font: inherit; color: inherit; }

button { background: none; border: 0; cursor: pointer; }

ul, ol { list-style: none; }

::selection { background: rgba(139, 92, 246, .45); color: var(--white); }

:focus-visible {
  outline: 2px solid var(--purple-bright);
  outline-offset: 3px;
  border-radius: 6px;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 200;
  padding: .7rem 1.1rem;
  background: var(--purple);
  color: var(--white);
  border-radius: var(--radius-sm);
  font-weight: 600;
  transform: translateY(-200px);
  transition: transform .25s var(--ease-out);
}
.skip-link:focus { transform: translateY(0); }

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ==========================================================================
   Fondo espacial
   ========================================================================== */
.space {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(ellipse 120% 80% at 50% -10%, var(--midnight) 0%, transparent 60%),
    linear-gradient(180deg, var(--black) 0%, var(--black-2) 100%);
}

.starfield {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.nebula {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .5;
  will-change: transform;
}
.nebula--one {
  width: 60vmax; height: 45vmax;
  top: -18vmax; right: -14vmax;
  background: radial-gradient(circle at 40% 50%, rgba(109, 40, 217, .38), rgba(42, 22, 69, .2) 45%, transparent 70%);
  animation: nebula-drift 48s ease-in-out infinite alternate;
}
.nebula--two {
  width: 50vmax; height: 40vmax;
  bottom: -20vmax; left: -16vmax;
  background: radial-gradient(circle at 60% 40%, rgba(139, 92, 246, .22), rgba(25, 16, 39, .3) 50%, transparent 72%);
  animation: nebula-drift 62s ease-in-out infinite alternate-reverse;
}
.nebula--three {
  width: 34vmax; height: 26vmax;
  top: 38%; left: 38%;
  background: radial-gradient(circle, rgba(109, 40, 217, .12), transparent 70%);
  opacity: .6;
  animation: nebula-drift 80s ease-in-out infinite alternate;
}

@keyframes nebula-drift {
  0%   { transform: translate3d(0, 0, 0) scale(1) rotate(0deg); }
  100% { transform: translate3d(-4vmax, 3vmax, 0) scale(1.12) rotate(8deg); }
}

.space__vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(5, 5, 7, .75) 100%);
}

.header, main, .footer { position: relative; z-index: 1; }

/* ==========================================================================
   Botones y utilidades
   ========================================================================== */
.btn {
  --btn-bg: transparent;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  min-height: 48px;
  padding: .8rem 1.5rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--white);
  isolation: isolate;
  overflow: hidden;
  transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out), background-color .3s, border-color .3s;
}

.btn__icon { width: 18px; height: 18px; flex-shrink: 0; transition: transform .3s var(--ease-out); }

.btn--primary {
  background: linear-gradient(135deg, var(--purple) 0%, var(--purple-bright) 100%);
  box-shadow: 0 10px 30px -10px rgba(139, 92, 246, .7), inset 0 1px 0 rgba(255, 255, 255, .2);
}
.btn--primary::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, .28) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .7s var(--ease-out);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px -10px rgba(139, 92, 246, .85), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.btn--primary:hover::before { transform: translateX(120%); }
.btn--primary:hover .btn__icon { transform: translateX(3px); }

.btn--ghost {
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .03);
  backdrop-filter: blur(8px);
}
.btn--ghost:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  background: rgba(139, 92, 246, .1);
  box-shadow: 0 0 30px -8px rgba(139, 92, 246, .5);
}

.btn--sm { min-height: 42px; padding: .6rem 1.2rem; font-size: .8rem; }
.btn--block { width: 100%; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem .25rem;
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--white-2);
  transition: color .25s;
}
.link-arrow__gh { width: 18px; height: 18px; }
.link-arrow__arrow { transition: transform .3s var(--ease-out); }
.link-arrow:hover { color: var(--white); }
.link-arrow:hover .link-arrow__arrow { transform: translateX(4px); }

.tag {
  display: inline-flex;
  align-items: center;
  padding: .3rem .75rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(109, 40, 217, .12);
  color: var(--lavender);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .02em;
}

.pulse-dot {
  position: relative;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--purple-bright);
  box-shadow: 0 0 12px var(--purple-bright);
}
.pulse-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--purple-bright);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0%   { transform: scale(1); opacity: .9; }
  100% { transform: scale(3.2); opacity: 0; }
}

/* ==========================================================================
   Navbar
   ========================================================================== */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--header-h);
  transition: background-color .35s, border-color .35s, backdrop-filter .35s;
  border-bottom: 1px solid transparent;
}
.header.is-scrolled {
  background: rgba(5, 5, 7, .72);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--border);
}

.nav {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.logo {
  position: relative;
  display: inline-flex;
  align-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: .12em;
  color: var(--white);
}
.logo__mark {
  background: linear-gradient(120deg, var(--white) 40%, var(--lavender));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.logo__star {
  width: 6px; height: 6px;
  margin-left: 4px;
  margin-top: -12px;
  border-radius: 50%;
  background: var(--purple-bright);
  box-shadow: 0 0 10px 2px rgba(139, 92, 246, .8);
  animation: twinkle 3s ease-in-out infinite;
}
@keyframes twinkle {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .45; transform: scale(.7); }
}

.nav__list {
  display: flex;
  align-items: center;
  gap: .25rem;
}

.nav__link {
  position: relative;
  display: block;
  padding: .5rem .85rem;
  font-size: .92rem;
  font-weight: 500;
  color: var(--muted);
  border-radius: 999px;
  transition: color .25s, background-color .25s;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 2px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--purple-bright);
  box-shadow: 0 0 8px var(--purple-bright);
  transform: translateX(-50%) scale(0);
  transition: transform .3s var(--ease-spring);
}
.nav__link:hover { color: var(--white); }
.nav__link.is-active { color: var(--white); }
.nav__link.is-active::after { transform: translateX(-50%) scale(1); }

.nav__actions {
  display: flex;
  align-items: center;
  gap: .75rem;
}

/* Switch de idioma */
.lang-switch {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  width: 92px;
  height: 38px;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(24, 24, 27, .7);
  font-family: var(--font-display);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .08em;
  transition: border-color .3s, box-shadow .3s;
}
.lang-switch:hover {
  border-color: var(--border-strong);
  box-shadow: 0 0 20px -6px rgba(139, 92, 246, .6);
}
.lang-switch__option {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--muted);
  transition: color .35s;
}
.lang-switch[data-lang="es"] .lang-switch__option:nth-of-type(2),
.lang-switch[data-lang="en"] .lang-switch__option:nth-of-type(3) { color: var(--white); }

.lang-switch__thumb {
  position: absolute;
  top: 3px; left: 3px;
  width: calc(50% - 3px);
  height: calc(100% - 6px);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--purple), var(--purple-bright));
  box-shadow: 0 0 16px rgba(139, 92, 246, .6);
  transition: transform .5s var(--ease-spring);
}
.lang-switch[data-lang="en"] .lang-switch__thumb { transform: translateX(100%); }
.lang-switch.is-bumping .lang-switch__thumb { animation: thumb-flash .5s var(--ease-out); }
@keyframes thumb-flash {
  0%   { box-shadow: 0 0 16px rgba(139, 92, 246, .6); }
  40%  { box-shadow: 0 0 28px 6px rgba(139, 92, 246, .9); }
  100% { box-shadow: 0 0 16px rgba(139, 92, 246, .6); }
}

/* Transición al cambiar de idioma */
body.lang-anim [data-i18n] { transition: opacity .2s ease, filter .2s ease; }
body.lang-fading [data-i18n] { opacity: 0; filter: blur(3px); }

/* Botón hamburguesa */
.nav__toggle {
  display: none;
  position: relative;
  width: 42px; height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(24, 24, 27, .7);
}
.nav__toggle-line {
  position: absolute;
  left: 11px;
  width: 18px; height: 1.5px;
  background: var(--white);
  border-radius: 2px;
  transition: transform .35s var(--ease-out), opacity .2s;
}
.nav__toggle-line:nth-child(1) { top: 14px; }
.nav__toggle-line:nth-child(2) { top: 20px; width: 12px; }
.nav__toggle-line:nth-child(3) { top: 26px; }
.header.menu-open .nav__toggle-line:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.header.menu-open .nav__toggle-line:nth-child(2) { opacity: 0; }
.header.menu-open .nav__toggle-line:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  overflow: hidden;
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 3rem) 0 6rem;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  padding: .45rem 1rem .45rem .85rem;
  margin-bottom: 1.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(24, 24, 27, .5);
  backdrop-filter: blur(8px);
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--white-2);
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.7rem, 7.4vw, 6.2rem);
  font-weight: 700;
  line-height: .98;
  letter-spacing: -.035em;
  text-transform: uppercase;
  color: var(--white);
}
.hero__line {
  display: block;
  overflow: hidden;
  padding-bottom: .06em;
}
.hero__word {
  display: inline-block;
  transform: translateY(105%);
  animation: word-up 1.1s var(--ease-out) forwards;
  animation-delay: var(--d, 0s);
}
.hero__word--accent {
  background: linear-gradient(100deg, var(--white) 0%, var(--lavender) 45%, var(--purple-bright) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
@keyframes word-up { to { transform: translateY(0); } }

.hero__role {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-top: 1.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  font-weight: 500;
  color: var(--white);
}
.hero__role-bracket { color: var(--purple-bright); font-family: var(--font-mono); }

.hero__desc {
  max-width: 34rem;
  margin-top: 1.1rem;
  font-size: clamp(1rem, 1.3vw, 1.1rem);
  color: var(--muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.1rem;
  margin-top: 2.25rem;
}

.anim-in {
  opacity: 0;
  transform: translateY(18px);
  animation: fade-up 1s var(--ease-out) forwards;
  animation-delay: var(--d, 0s);
}
@keyframes fade-up { to { opacity: 1; transform: none; } }

/* Visual del hero */
.hero__visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 460px;
}

.hero__glow {
  position: absolute;
  width: 70%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(109, 40, 217, .35), transparent 65%);
  filter: blur(30px);
}

.orbit-system {
  position: absolute;
  inset: -10%;
  display: grid;
  place-items: center;
  transform: rotate(-18deg);
}
.orbit {
  position: absolute;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(139, 92, 246, .14);
  animation: spin linear infinite;
}
.orbit--1 { width: 62%; animation-duration: 40s; }
.orbit--2 { width: 84%; animation-duration: 70s; animation-direction: reverse; border-style: dashed; border-color: rgba(255, 255, 255, .06); }
.orbit--3 { width: 106%; animation-duration: 110s; border-color: rgba(139, 92, 246, .08); }
.orbit__body {
  position: absolute;
  top: -3px; left: 50%;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 0 10px 2px rgba(139, 92, 246, .9);
}
.orbit--2 .orbit__body { width: 4px; height: 4px; top: -2px; background: var(--lavender); }
.orbit--3 .orbit__body { top: auto; bottom: -3px; }
@keyframes spin { to { transform: rotate(360deg); } }

.code-card {
  position: relative;
  width: min(100%, 420px);
  border-radius: var(--radius);
  border: 1px solid rgba(139, 92, 246, .22);
  background: linear-gradient(160deg, rgba(25, 16, 39, .88), rgba(11, 10, 16, .92));
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .9), 0 0 60px -20px rgba(109, 40, 217, .5), inset 0 1px 0 rgba(255, 255, 255, .06);
  backdrop-filter: blur(12px);
  animation: float 9s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}
.code-card__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: .8rem 1rem;
  border-bottom: 1px solid var(--border);
}
.code-card__dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, .14); }
.code-card__dot:first-child { background: var(--purple-bright); }
.code-card__file {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--muted);
}
.code-card__body {
  padding: 1.1rem 1.25rem 1.3rem;
  font-family: var(--font-mono);
  font-size: .8rem;
  line-height: 1.8;
  color: var(--white-2);
  overflow-x: auto;
  white-space: pre;
}
.c-k { color: var(--purple-bright); }
.c-v { color: var(--white); }
.c-p { color: var(--lavender); }
.c-s { color: #E4DDFB; }
.c-f { color: var(--purple-bright); }
.c-c { color: #71717A; font-style: italic; }
.code-card__cursor {
  display: inline-block;
  width: 7px; height: 1.05em;
  margin-left: 3px;
  vertical-align: text-bottom;
  background: var(--purple-bright);
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.float-chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .5rem .9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(11, 10, 16, .82);
  backdrop-filter: blur(10px);
  font-size: .78rem;
  font-weight: 500;
  color: var(--white);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .8);
  animation: float 7s ease-in-out infinite;
}
.float-chip svg { width: 12px; height: 12px; color: var(--purple-bright); }
.float-chip--one { top: 10%; right: 2%; animation-delay: -2s; }
.float-chip--two { bottom: 9%; left: 0; animation-delay: -4.5s; }

.scroll-cue {
  position: absolute;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .6rem;
  font-size: .7rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color .25s;
}
.scroll-cue:hover { color: var(--white); }
.scroll-cue__line {
  position: relative;
  width: 1px; height: 44px;
  background: linear-gradient(var(--border-strong), transparent);
  overflow: hidden;
}
.scroll-cue__line::after {
  content: "";
  position: absolute;
  left: 0; top: -40%;
  width: 1px; height: 40%;
  background: var(--white);
  box-shadow: 0 0 6px var(--purple-bright);
  animation: scroll-drop 2.2s var(--ease-out) infinite;
}
@keyframes scroll-drop { to { top: 110%; } }

/* ==========================================================================
   Secciones
   ========================================================================== */
.section {
  position: relative;
  padding-block: clamp(5rem, 10vw, 8rem);
}

.section__head { max-width: 46rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section__head--center { margin-inline: auto; text-align: center; }

.section__kicker {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1rem;
  font-family: var(--font-display);
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--lavender);
}
.section__index {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  color: var(--purple-bright);
}
.section__index::after {
  content: "";
  width: 28px; height: 1px;
  background: linear-gradient(90deg, var(--purple-bright), transparent);
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.03em;
  color: var(--white);
}

.section__intro {
  margin-top: 1rem;
  font-size: 1.05rem;
  color: var(--muted);
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
}
/* El retardo escalonado solo aplica a la aparición, no a los hovers posteriores */
.reveal:not(.is-done) { transition-delay: var(--d, 0s); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ==========================================================================
   Sobre mí
   ========================================================================== */
.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.about__text p + p { margin-top: 1.25rem; }
.about__text p { font-size: 1.05rem; color: var(--muted); }
.about__text .about__lead {
  font-size: clamp(1.15rem, 1.8vw, 1.35rem);
  line-height: 1.6;
  color: var(--white-2);
}

.profile-card {
  position: relative;
  padding: 1.75rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(160deg, rgba(25, 16, 39, .7), rgba(11, 10, 16, .8));
  backdrop-filter: blur(10px);
  overflow: hidden;
}
.profile-card::before {
  content: "";
  position: absolute;
  top: -40%; right: -30%;
  width: 70%; aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, .25), transparent 70%);
  pointer-events: none;
}
.profile-card__top {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-bottom: 1.4rem;
  margin-bottom: 1.2rem;
  border-bottom: 1px solid var(--border);
}
.profile-card__avatar {
  position: relative;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 64px; height: 64px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--purple-dark), var(--black-2));
  border: 1px solid var(--border-strong);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .9rem;
  letter-spacing: .08em;
  color: var(--white);
}
.profile-card__ring {
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 1px dashed rgba(139, 92, 246, .45);
  animation: spin 24s linear infinite;
}
.profile-card__ring::after {
  content: "";
  position: absolute;
  top: 50%; right: -3px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 0 8px var(--purple-bright);
}
.profile-card__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.3;
  color: var(--white);
}
.profile-card__role { font-size: .85rem; color: var(--lavender); }

.profile-card__list { display: grid; gap: .9rem; }
.profile-card__row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: .92rem;
}
.profile-card__row dt { color: var(--muted); }
.profile-card__row dd { color: var(--white); font-weight: 500; text-align: right; }

.traits {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1rem;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
}
.trait {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.1rem;
  padding: 1.25rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--white);
  transition: border-color .35s, box-shadow .35s, transform .45s var(--ease-out), opacity .9s var(--ease-out);
}
.trait__icon {
  width: 18px; height: 18px;
  color: var(--purple-bright);
  filter: drop-shadow(0 0 6px rgba(139, 92, 246, .8));
  transition: transform .6s var(--ease-spring);
}
.trait.is-visible:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--glow);
}
.trait:hover .trait__icon { transform: rotate(90deg) scale(1.15); }

/* ==========================================================================
   Skills
   ========================================================================== */
.skills__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}
.skill-group {
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(25, 16, 39, .45), rgba(11, 10, 16, .6));
}
.skill-group--wide { grid-column: 1 / -1; }

.skill-group__title {
  display: flex;
  align-items: baseline;
  gap: .75rem;
  margin-bottom: 1.25rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--white);
}
.skill-group__num { font-family: var(--font-mono); font-size: .75rem; color: var(--purple-bright); }

.skill-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: .85rem;
}

.skill-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .85rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-solid);
  overflow: hidden;
  transition: transform .4s var(--ease-out), border-color .35s, box-shadow .35s;
}
.skill-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120px circle at 20% 50%, rgba(139, 92, 246, .18), transparent 70%);
  opacity: 0;
  transition: opacity .35s;
}
.skill-card__icon {
  position: relative;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--midnight);
  border: 1px solid rgba(139, 92, 246, .18);
  transition: transform .5s var(--ease-spring), box-shadow .35s;
}
.skill-card__icon img { width: 24px; height: 24px; }
.skill-card__name {
  position: relative;
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--white);
}
.skill-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--glow);
}
.skill-card:hover::before { opacity: 1; }
.skill-card:hover .skill-card__icon {
  transform: scale(1.08) rotate(-6deg);
  box-shadow: 0 0 18px -2px rgba(139, 92, 246, .7);
}

/* ==========================================================================
   Trayectoria (timeline orbital)
   ========================================================================== */
.timeline { position: relative; }

.timeline__orbit {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 200px;
  overflow: visible;
}
.timeline__orbit-path {
  fill: none;
  stroke: url(#orbit-grad);
  stroke-width: 1.5;
}
.timeline__orbit-ghost {
  fill: none;
  stroke: rgba(255, 255, 255, .06);
  stroke-width: 1;
  stroke-dasharray: 3 7;
}
.timeline__comet {
  fill: var(--white);
  filter: drop-shadow(0 0 6px var(--purple-bright));
}

.timeline__list {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
}
.timeline__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* El nodo cae sobre la curva: punto (25% / 75%, y = 85px de 200px) */
.timeline__node {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  margin-top: 63px;
  margin-bottom: 2.25rem;
  border-radius: 50%;
  border: 1px solid rgba(139, 92, 246, .45);
  background: rgba(5, 5, 7, .9);
}
.timeline__node::before {
  content: "";
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 1px dashed rgba(139, 92, 246, .25);
  animation: spin 30s linear infinite;
}
.timeline__core {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 0 10px 3px rgba(139, 92, 246, .9), 0 0 30px 8px rgba(109, 40, 217, .5);
}
.timeline__node--current .timeline__core { animation: core-pulse 2.8s ease-in-out infinite; }
@keyframes core-pulse {
  0%, 100% { box-shadow: 0 0 10px 3px rgba(139, 92, 246, .9), 0 0 30px 8px rgba(109, 40, 217, .5); }
  50%      { box-shadow: 0 0 14px 5px rgba(139, 92, 246, 1), 0 0 46px 14px rgba(109, 40, 217, .6); }
}

.timeline__card {
  width: 100%;
  max-width: 420px;
  padding: 1.75rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(10px);
  transition: transform .45s var(--ease-out), border-color .35s, box-shadow .35s;
}
.timeline__card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--glow);
}
.timeline__year {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.03em;
  background: linear-gradient(180deg, var(--white), var(--lavender));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.timeline__title {
  margin-top: .8rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--white);
}
.timeline__place { color: var(--muted); font-weight: 500; }
.timeline__desc { margin: .6rem 0 1.1rem; color: var(--muted); }

.timeline__next {
  margin-top: 2.5rem;
  text-align: center;
  font-family: var(--font-display);
  font-size: .85rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ==========================================================================
   Proyectos
   ========================================================================== */
.projects__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.25rem, 2.5vw, 2rem);
}

.project {
  --mx: 50%;
  --my: 50%;
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(25, 16, 39, .55), rgba(11, 10, 16, .85));
  box-shadow: 0 30px 60px -40px rgba(0, 0, 0, .9);
  isolation: isolate;
  transition: transform .5s var(--ease-out), border-color .4s, box-shadow .5s var(--ease-out), opacity .9s var(--ease-out);
}
/* Borde luminoso que sigue al cursor */
.project::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(139, 92, 246, .7), transparent 45%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: 0;
  transition: opacity .4s;
}
.project::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(600px circle at var(--mx) var(--my), rgba(109, 40, 217, .1), transparent 40%);
  opacity: 0;
  transition: opacity .4s;
  pointer-events: none;
}
.project.is-visible:hover {
  transform: translateY(-6px);
  border-color: rgba(139, 92, 246, .25);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .9), 0 0 70px -20px rgba(109, 40, 217, .55);
}
.project:hover::before,
.project:hover::after { opacity: 1; }

.project--featured {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: stretch;
}
.project--featured .project__media { flex: 1.15; border-radius: var(--radius-lg) 0 0 var(--radius-lg); }
.project--featured .project__body { flex: 1; }

.project__media {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: clamp(1.25rem, 3vw, 2.25rem);
  background:
    radial-gradient(circle at 70% 20%, rgba(139, 92, 246, .28), transparent 55%),
    radial-gradient(circle at 10% 90%, rgba(42, 22, 69, .9), transparent 60%),
    var(--midnight);
  display: grid;
  place-items: center;
}
.project__media::before {
  /* Retícula de estrellas sutil */
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 20% 30%, rgba(255, 255, 255, .5), transparent),
    radial-gradient(1px 1px at 80% 15%, rgba(255, 255, 255, .4), transparent),
    radial-gradient(1px 1px at 65% 80%, rgba(255, 255, 255, .35), transparent),
    radial-gradient(1.5px 1.5px at 10% 70%, rgba(196, 181, 253, .6), transparent),
    radial-gradient(1px 1px at 90% 60%, rgba(255, 255, 255, .3), transparent);
  pointer-events: none;
}
.project__media::after {
  content: "";
  position: absolute;
  left: 50%; bottom: -60%;
  width: 140%; aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(139, 92, 246, .14);
  transform: translateX(-50%);
  pointer-events: none;
}

.mockup {
  position: relative;
  z-index: 1;
  width: 100%;
  transition: transform .8s var(--ease-out);
}
.project:hover .mockup { transform: scale(1.025) translateY(-4px); }

.project__body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  flex: 1;
}
.project__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.project__type {
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--lavender);
}
.project__num {
  font-family: var(--font-display);
  font-size: .85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, .25);
}
.project__badge-featured {
  display: inline-flex;
  flex-shrink: 0;
  white-space: nowrap;
  align-items: center;
  gap: .4rem;
  padding: .3rem .7rem;
  border-radius: 999px;
  background: rgba(139, 92, 246, .14);
  border: 1px solid var(--border-strong);
  font-size: .72rem;
  font-weight: 600;
  color: var(--white);
}
.project__badge-featured svg { width: 11px; height: 11px; color: var(--purple-bright); }

.project__title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.02em;
  color: var(--white);
}
.project--featured .project__title { font-size: clamp(2rem, 3.6vw, 2.8rem); }
.project__desc { color: var(--muted); }

.project__subtitle {
  margin-top: .25rem;
  font-family: var(--font-display);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--white-2);
}

.features { display: grid; gap: .5rem .9rem; }
.features--cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.features li {
  position: relative;
  padding-left: 1.2rem;
  font-size: .9rem;
  line-height: 1.45;
  color: var(--white-2);
}
.features li::before {
  content: "";
  position: absolute;
  left: 0; top: .5em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--purple-bright);
  box-shadow: 0 0 8px rgba(139, 92, 246, .8);
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .25rem;
}
.badge {
  padding: .35rem .75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(24, 24, 27, .8);
  font-family: var(--font-mono);
  font-size: .75rem;
  color: var(--white-2);
  transition: border-color .3s, color .3s;
}
.badge--accent { border-color: var(--border-strong); color: var(--lavender); background: rgba(109, 40, 217, .12); }
.project:hover .badge { border-color: rgba(139, 92, 246, .28); }

.project__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: auto;
  padding-top: .75rem;
}

.roles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
}
.role {
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(5, 5, 7, .55);
}
.role__title {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .35rem;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--white);
}
.role__title svg { width: 16px; height: 16px; color: var(--purple-bright); }
.role__desc { font-size: .85rem; line-height: 1.5; color: var(--muted); }

/* ---------- Mockups ---------- */
.mock-window {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .1);
  background: var(--black-2);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .9), 0 0 0 1px rgba(0, 0, 0, .4);
  overflow: hidden;
  font-size: 11px;
  line-height: 1.4;
  color: var(--white-2);
  user-select: none;
}
.mock-window__bar {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  background: var(--gray-dark);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.mock-window__bar > span { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .15); }
.mock-window__bar > span:first-child { background: var(--purple-bright); }
.mock-window__title {
  flex: 1;
  margin-right: 28px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
}

/* F1 */
.f1-ui { display: grid; grid-template-columns: 110px 1fr; min-height: 250px; }
.f1-ui__side {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 8px;
  background: rgba(25, 16, 39, .6);
  border-right: 1px solid rgba(255, 255, 255, .05);
}
.f1-ui__brand {
  margin: 0 6px 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  font-style: italic;
  color: var(--white);
}
.f1-ui__brand b { color: var(--purple-bright); }
.f1-ui__nav {
  padding: 6px 8px;
  border-radius: 6px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.f1-ui__nav.is-active { background: rgba(139, 92, 246, .2); color: var(--white); box-shadow: inset 2px 0 0 var(--purple-bright); }
.f1-ui__main { padding: 12px 14px; min-width: 0; }
.f1-ui__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--white);
}
.f1-ui__pill {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  font-size: 9.5px;
  font-weight: 500;
  color: var(--lavender);
}
.f1-ui__cols { display: grid; grid-template-columns: 1.35fr 1fr; gap: 10px; }
.f1-table { display: grid; gap: 3px; min-width: 0; }
.f1-row {
  display: grid;
  grid-template-columns: 16px 4px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .03);
  white-space: nowrap;
}
.f1-row--head { background: none; font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.f1-row:nth-child(2) { background: rgba(139, 92, 246, .14); }
.f1-row__pos { font-weight: 700; color: var(--white); }
.f1-row__team { width: 3px; height: 14px; border-radius: 2px; background: var(--c); }
.f1-row__pts { font-family: var(--font-mono); color: var(--white); }
.f1-track {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border-radius: 8px;
  background: rgba(25, 16, 39, .7);
  border: 1px solid rgba(139, 92, 246, .15);
}
.f1-track svg { width: 100%; height: auto; }
.f1-track__path { fill: none; stroke: rgba(212, 212, 216, .45); stroke-width: 3; stroke-linejoin: round; }
.f1-track__car { fill: var(--purple-bright); filter: drop-shadow(0 0 3px var(--purple-bright)); }
.f1-track__lap { font-family: var(--font-mono); font-size: 9.5px; color: var(--muted); }
.f1-track__btn {
  padding: 5px 6px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--purple), var(--purple-bright));
  text-align: center;
  font-size: 10px;
  font-weight: 600;
  color: var(--white);
}

/* Terminal */
.term {
  min-height: 230px;
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.75;
  background: linear-gradient(180deg, #08070C, var(--black-2));
}
.term p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.term__prompt { color: var(--purple-bright); }
.term__title { color: var(--white); font-weight: 600; margin: 2px 0 4px; }
.term__key { color: var(--lavender); }
.term__warn {
  margin: 6px 0 4px;
  padding: 3px 8px;
  border-left: 2px solid var(--purple-bright);
  background: rgba(139, 92, 246, .12);
  color: var(--white);
}
.term__warn > span:first-child { color: var(--purple-bright); }
.term__cursor {
  display: inline-block;
  width: 7px; height: 12px;
  vertical-align: middle;
  background: var(--white-2);
  animation: blink 1s steps(1) infinite;
}

/* Banco */
.bank-ui {
  display: grid;
  gap: 10px;
  padding: 14px;
  background: radial-gradient(circle at 100% 0%, rgba(109, 40, 217, .18), transparent 50%), var(--black-2);
}
.bank-ui__top { display: flex; align-items: center; justify-content: space-between; }
.bank-ui__logo { font-family: var(--font-display); font-weight: 700; font-size: 13px; color: var(--white); }
.bank-ui__logo span { color: var(--purple-bright); }
.bank-ui__hello { font-size: 10px; color: var(--muted); }
.bank-ui__balance {
  position: relative;
  padding: 12px 14px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--purple-dark), var(--purple) 130%);
  border: 1px solid rgba(139, 92, 246, .4);
  overflow: hidden;
}
.bank-ui__balance::after {
  content: "";
  position: absolute;
  right: -20px; top: -30px;
  width: 100px; height: 100px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .15);
}
.bank-ui__label { font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--lavender); }
.bank-ui__amount { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--white); }
.bank-ui__acc { font-family: var(--font-mono); font-size: 9.5px; color: rgba(255, 255, 255, .6); }
.bank-ui__actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.bank-ui__action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 8px 4px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .05);
  font-size: 9.5px;
  text-align: center;
  color: var(--white-2);
  min-width: 0;
}
.bank-ui__action > span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bank-ui__ico {
  position: relative;
  width: 20px; height: 20px;
  border-radius: 6px;
  background: rgba(139, 92, 246, .18);
}
.bank-ui__ico::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1.5px solid var(--lavender);
}
.bank-ui__ico--in::after  { border-width: 0 0 1.5px 1.5px; transform: rotate(-45deg) translate(1px, -1px); }
.bank-ui__ico--out::after { border-width: 1.5px 1.5px 0 0; transform: rotate(-45deg) translate(-1px, 1px); }
.bank-ui__ico--pay::after { border-radius: 2px; inset: 6px 4px; }
.bank-ui__ico--doc::after { inset: 4px 6px; border-radius: 1px; }
.bank-ui__list { display: grid; gap: 4px; }
.bank-ui__list-title { font-size: 10px; font-weight: 600; color: var(--white); margin-bottom: 2px; }
.bank-ui__tx {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .03);
  white-space: nowrap;
}
.bank-ui__tx > span:last-child { font-family: var(--font-mono); color: var(--white-2); }
.bank-ui__tx .is-pos { color: var(--lavender) !important; }

/* ==========================================================================
   Lo que me define (constelación)
   ========================================================================== */
.values__grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1.5rem;
  padding-top: 1rem;
}

.constellation {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: 0;
}
.constellation__line {
  stroke: rgba(196, 181, 253, .28);
  stroke-width: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.8s var(--ease-out), stroke .4s;
}
.constellation.is-drawn .constellation__line { stroke-dashoffset: 0; }
.constellation__line.is-lit { stroke: rgba(139, 92, 246, .9); }
.constellation__dust { fill: rgba(255, 255, 255, .5); }

.value-card {
  --mx: 50%;
  --my: 50%;
  position: relative;
  z-index: 1;
  grid-column: span 2;
  padding: 2rem 1.6rem 1.75rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background:
    radial-gradient(300px circle at var(--mx) var(--my), rgba(139, 92, 246, .1), transparent 60%),
    rgba(11, 10, 16, .82);
  backdrop-filter: blur(6px);
  transition: transform .45s var(--ease-out), border-color .35s, box-shadow .35s, opacity .9s var(--ease-out);
}
/* Escalonado tipo constelación (margin: no afecta al cálculo de las líneas) */
.value-card:nth-of-type(2) { margin-top: 3rem; }
.value-card:nth-of-type(4) { grid-column: 2 / span 2; margin-top: -1rem; }
.value-card:nth-of-type(5) { margin-top: 1.5rem; }

.value-card.is-visible:hover {
  transform: translateY(-5px);
  border-color: var(--border-strong);
  box-shadow: var(--glow);
}
.value-card__star {
  position: absolute;
  top: -5px; left: 1.6rem;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 0 8px 2px rgba(139, 92, 246, .9), 0 0 24px 6px rgba(109, 40, 217, .45);
}
.value-card__star::before,
.value-card__star::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .8), transparent);
  transform: translate(-50%, -50%);
  transition: width .4s var(--ease-out), height .4s var(--ease-out);
}
.value-card__star::before { width: 22px; height: 1px; }
.value-card__star::after { width: 1px; height: 22px; background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .8), transparent); }
.value-card:hover .value-card__star::before { width: 34px; }
.value-card:hover .value-card__star::after { height: 34px; }

.value-card__num {
  font-family: var(--font-display);
  font-size: .9rem;
  color: var(--purple-bright);
  margin-bottom: .75rem;
}
.value-card__title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--white);
  margin-bottom: .5rem;
}
.value-card__desc { color: var(--muted); }

/* ==========================================================================
   Contacto
   ========================================================================== */
.contact { overflow: hidden; }
.contact__halo {
  position: absolute;
  left: 50%; top: 50%;
  width: min(1100px, 140vw);
  aspect-ratio: 1.6;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(109, 40, 217, .22), transparent 62%);
  pointer-events: none;
}
.contact__halo::before,
.contact__halo::after {
  content: "";
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  border: 1px solid rgba(139, 92, 246, .1);
}
.contact__halo::after { inset: 30%; border-style: dashed; border-color: rgba(255, 255, 255, .05); }

.contact__grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}

.contact__title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6.5vw, 5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.04em;
  background: linear-gradient(180deg, var(--white) 30%, var(--lavender));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.contact__subtitle {
  margin-top: 1.1rem;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: var(--white-2);
}

.contact__links { display: grid; gap: .75rem; margin-top: 2.25rem; max-width: 26rem; }
.contact-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .9rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(11, 10, 16, .7);
  transition: transform .4s var(--ease-out), border-color .3s, box-shadow .3s, background-color .3s;
}
.contact-link__icon {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border-radius: 12px;
  background: var(--midnight);
  border: 1px solid rgba(139, 92, 246, .2);
  color: var(--white);
}
.contact-link__icon svg { width: 20px; height: 20px; }
.contact-link__text { display: flex; flex-direction: column; line-height: 1.3; }
.contact-link__text strong { font-family: var(--font-display); font-weight: 600; color: var(--white); }
.contact-link__text small { font-size: .8rem; color: var(--muted); }
.contact-link__arrow {
  width: 18px; height: 18px;
  margin-left: auto;
  color: var(--muted);
  transition: transform .35s var(--ease-out), color .3s;
}
.contact-link:hover {
  transform: translateX(4px);
  border-color: var(--border-strong);
  background: rgba(25, 16, 39, .8);
  box-shadow: 0 0 30px -10px rgba(139, 92, 246, .6);
}
.contact-link:hover .contact-link__arrow { transform: translateX(3px); color: var(--purple-bright); }
.contact-link.is-placeholder { border-style: dashed; }
.contact-link.is-placeholder .contact-link__text small::after { content: " · " attr(data-pending); color: var(--lavender); }

.contact-form {
  position: relative;
  display: grid;
  gap: 1.1rem;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(139, 92, 246, .2);
  background: linear-gradient(160deg, rgba(25, 16, 39, .85), rgba(11, 10, 16, .92));
  backdrop-filter: blur(14px);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .9), 0 0 80px -30px rgba(109, 40, 217, .5);
}
.contact-form__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.contact-form__title { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; color: var(--white); }
.contact-form__dots { display: flex; gap: 5px; }
.contact-form__dots span { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .15); }
.contact-form__dots span:first-child { background: var(--purple-bright); box-shadow: 0 0 8px var(--purple-bright); }

.field { display: grid; gap: .4rem; }
.field__label { font-size: .85rem; font-weight: 500; color: var(--white-2); }
.field__input {
  width: 100%;
  padding: .85rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(5, 5, 7, .7);
  color: var(--white);
  transition: border-color .25s, box-shadow .25s, background-color .25s;
}
.field__input::placeholder { color: #71717A; }
.field__input:hover { border-color: rgba(255, 255, 255, .18); }
.field__input:focus {
  outline: none;
  border-color: var(--purple-bright);
  background: rgba(5, 5, 7, .9);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, .18);
}
.field__input--area { resize: vertical; min-height: 130px; }
.field__input[aria-invalid="true"] { border-color: #F472B6; }
.field__error { min-height: 0; font-size: .8rem; color: #F9A8D4; }
.field__error:empty { display: none; }

.contact-form__note { font-size: .8rem; color: var(--muted); text-align: center; }
.contact-form__status { font-size: .88rem; text-align: center; color: var(--lavender); }
.contact-form__status:empty { display: none; }
.contact-form__status.is-error { color: #F9A8D4; }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(5, 5, 7, .4), rgba(5, 5, 7, .95));
  padding-top: 3rem;
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 2rem;
}
.footer__brand { display: flex; align-items: center; gap: 1.25rem; }
.footer__name { font-family: var(--font-display); font-weight: 600; color: var(--white); }
.footer__role { font-size: .85rem; color: var(--muted); }
.footer__nav { display: flex; flex-wrap: wrap; gap: .5rem 1.75rem; }
.footer__nav a {
  position: relative;
  font-size: .92rem;
  color: var(--muted);
  transition: color .25s;
}
.footer__nav a:hover { color: var(--white); }
.footer__nav a.is-placeholder { opacity: .6; }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.5rem 2rem;
  border-top: 1px solid var(--border);
  font-size: .82rem;
  color: #71717A;
}
.footer__motto {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-display);
  color: var(--white-2);
}
.footer__motto svg { width: 12px; height: 12px; color: var(--purple-bright); }
.footer__top { color: var(--muted); transition: color .25s; }
.footer__top:hover { color: var(--white); }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%; bottom: 1.5rem;
  z-index: 150;
  max-width: calc(100vw - 2rem);
  padding: .8rem 1.2rem;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: rgba(11, 10, 16, .95);
  backdrop-filter: blur(10px);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, .8), 0 0 30px -10px rgba(139, 92, 246, .6);
  font-size: .88rem;
  color: var(--white);
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition: opacity .3s, transform .4s var(--ease-out);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .traits { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .project--featured { flex-direction: column; }
  .project--featured .project__media { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
}

@media (max-width: 960px) {
  :root { --header-h: 64px; }

  .nav__toggle { display: block; }

  .nav__menu {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    height: calc(100vh - var(--header-h));
    height: calc(100dvh - var(--header-h));
    padding: 2rem var(--gutter);
    background: rgba(5, 5, 7, .96);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-top: 1px solid var(--border);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .3s, transform .4s var(--ease-out), visibility 0s .4s;
    overflow-y: auto;
  }
  .header.menu-open { background: rgba(5, 5, 7, .96); }
  .header.menu-open .nav__menu {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .3s, transform .4s var(--ease-out), visibility 0s;
  }
  .nav__list { flex-direction: column; align-items: stretch; gap: .25rem; }
  .nav__link {
    padding: 1rem .5rem;
    border-radius: 0;
    border-bottom: 1px solid var(--border);
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--white-2);
  }
  .nav__link::after { left: auto; right: .5rem; bottom: 50%; transform: translateY(50%) scale(0); width: 6px; height: 6px; }
  .nav__link.is-active::after { transform: translateY(50%) scale(1); }

  .hero__grid { grid-template-columns: 1fr; }
  .hero { padding-bottom: 7rem; }
  .hero__visual { min-height: 400px; max-width: 520px; width: 100%; margin-inline: auto; }

  .about__grid { grid-template-columns: 1fr; }
  .profile-card { max-width: 520px; }

  .projects__grid { grid-template-columns: 1fr; }

  .values__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
  .value-card,
  .value-card:nth-of-type(4) { grid-column: auto; }
  .value-card:nth-of-type(n) { margin-top: 0; }
  .value-card:nth-of-type(even) { margin-top: 2rem; }
  .value-card:nth-of-type(5) { grid-column: 1 / -1; max-width: calc(50% - .625rem); justify-self: center; margin-top: 0; }

  .contact__grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .timeline__orbit { display: none; }
  .timeline__list { grid-template-columns: 1fr; gap: 1.5rem; padding-left: 2.25rem; }
  .timeline__list::before {
    content: "";
    position: absolute;
    left: 10px; top: 10px; bottom: 10px;
    width: 1px;
    background: linear-gradient(180deg, transparent, var(--purple-bright) 15%, var(--purple-bright) 85%, transparent);
    opacity: .5;
  }
  .timeline__item { position: relative; align-items: stretch; text-align: left; }
  .timeline__node {
    position: absolute;
    left: calc(-2.25rem - 12px);
    top: 1.75rem;
    width: 44px; height: 44px;
    margin: 0;
    transform: scale(.7);
  }
  .timeline__card { max-width: none; }
  .timeline__next { text-align: left; padding-left: 2.25rem; }
}

@media (max-width: 640px) {
  .hero__title { font-size: clamp(2.3rem, 11.5vw, 3.4rem); }
  .hero__actions .btn { flex: 1 1 auto; }
  .hero__visual { min-height: 340px; }
  .code-card__body { font-size: .7rem; padding: .9rem 1rem 1rem; }
  .float-chip--one { top: 2%; right: 0; }
  .float-chip--two { bottom: 2%; }
  .orbit--3 { display: none; }

  .traits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .skills__grid { grid-template-columns: 1fr; }
  .skill-group { padding: 1.15rem; }
  .skill-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .skill-card { padding: .7rem; gap: .65rem; }
  .skill-card__icon { width: 38px; height: 38px; }
  .skill-card__name { font-size: .92rem; }

  .features--cols,
  .roles { grid-template-columns: 1fr; }
  .project__actions .btn { width: 100%; }

  .f1-ui { grid-template-columns: 1fr; }
  .f1-ui__side { flex-direction: row; overflow: hidden; border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, .05); padding: 8px; }
  .f1-ui__brand { margin: 0 6px 0 2px; }
  .f1-ui__nav:nth-of-type(n + 4) { display: none; }
  .f1-ui__cols { grid-template-columns: 1fr; }
  .f1-track { display: grid; grid-template-columns: 90px 1fr; align-items: center; }
  .f1-track svg { grid-row: span 2; }

  .values__grid { grid-template-columns: 1fr; }
  .value-card:nth-of-type(n) { margin-top: 0; max-width: none; grid-column: auto; justify-self: stretch; }
  .value-card:nth-of-type(odd) { margin-right: 1.5rem; }
  .value-card:nth-of-type(even) { margin-left: 1.5rem; }

  .footer__inner,
  .footer__bottom { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 380px) {
  .lang-switch { width: 80px; }
  .nav__actions { gap: .5rem; }
}

/* Pantallas táctiles: sin efectos de hover costosos */
@media (hover: none) {
  .project::before, .project::after { display: none; }
  .nebula { filter: blur(60px); }
}

/* ==========================================================================
   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;
    transition-delay: 0s !important;
  }

  .hero__word { transform: none; }
  .anim-in,
  .reveal { opacity: 1; transform: none; }
  .timeline__comet { display: none; }
  .constellation__line { stroke-dashoffset: 0; }
}
