/* =========================================================
   MBM — Marco Barroso Martín · Portfolio
   Branding: negro profundo + azul eléctrico
   Para cambiar el color de acento, edita --accent y --accent-2
   ========================================================= */

:root {
  --bg: #050505;
  --bg-2: #0b0b0d;
  --surface: #111114;
  --surface-2: #17171b;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);

  --text: #f2f2f0;
  --text-2: #a3a3a8;
  --text-3: #6b6b72;

  --accent: #2f6bff;      /* Azul eléctrico */
  --accent-2: #00d0ff;    /* Cian para degradados */
  --accent-soft: rgba(47, 107, 255, 0.14);
  --accent-glow: rgba(47, 107, 255, 0.45);

  --font-display: "Clash Display", system-ui, sans-serif;
  --font-body: "Satoshi", system-ui, sans-serif;
  --font-code: ui-monospace, "Cascadia Code", Consolas, monospace;

  --container: 1240px;
  --gutter: clamp(16px, 4vw, 48px);
  --radius: 18px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-loading { overflow: hidden; }

::selection { background: var(--accent); color: #fff; }

a { color: inherit; text-decoration: none; }
img, svg { display: block; }
ul { list-style: none; }
strong { color: var(--text); font-weight: 700; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Etiquetas: Satoshi en mayúsculas con tracking (antes monoespaciada) */
.mono { font-family: var(--font-body); font-weight: 500; font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; }

.accent-text {
  font-style: normal;
  background: linear-gradient(100deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Grain overlay */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.035;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* =========================================================
   LOGO
   ========================================================= */
.logo {
  width: 92px; height: 28px;
  color: var(--text);
  overflow: visible;
  transition: color .3s;
}
.nav__logo:hover .logo { color: #fff; filter: drop-shadow(0 0 10px var(--accent-glow)); }
.logo--sm { width: 72px; height: 22px; color: var(--text-2); }

/* =========================================================
   PRELOADER
   ========================================================= */
.preloader {
  position: fixed; inset: 0;
  z-index: 1000;
  background: var(--bg);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 28px;
}
.preloader__logo {
  width: min(360px, 70vw);
  height: auto;
  color: var(--text);
  overflow: visible;
}
.pl-dot { fill: var(--accent); }
.preloader__bar {
  width: min(260px, 60vw);
  height: 2px;
  background: var(--line);
  overflow: hidden;
}
.preloader__bar span {
  display: block; height: 100%; width: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform-origin: left;
  transform: scaleX(0);
}
.preloader__count {
  font-variant-numeric: tabular-nums;
  font-size: 0.8rem;
  color: var(--text-3);
}

/* =========================================================
   CURSOR
   ========================================================= */
/* Se mantiene el cursor nativo. Solo aparece una etiqueta contextual
   ("Ver web ↗", "README ↗"…) al pasar por elementos con [data-cursor]. */
.cursor {
  position: fixed; top: 0; left: 0;
  z-index: 999;
  pointer-events: none;
}
.cursor__label {
  display: inline-flex; align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: 0 10px 30px -8px var(--accent-glow);
  transform: translate(14px, 14px) scale(0);
  transform-origin: top left;
  transition: transform .35s var(--ease);
}
.cursor.is-active .cursor__label { transform: translate(14px, 14px) scale(1); }
[data-cursor] { cursor: pointer; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* =========================================================
   NAV
   ========================================================= */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px var(--gutter);
  transition: background .4s, backdrop-filter .4s, padding .4s, border-color .4s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(5,5,5,.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding-top: 14px; padding-bottom: 14px;
  border-bottom-color: var(--line);
}
.nav.is-hidden { transform: translateY(-100%); }
.nav { transition: transform .5s var(--ease), background .4s, padding .4s, border-color .4s; }

.nav__links { display: flex; align-items: center; gap: 6px; }
.nav__links a {
  font-size: 0.9rem;
  color: var(--text-2);
  padding: 8px 14px;
  border-radius: 999px;
  transition: color .25s, background .25s;
}
.nav__links a:hover { color: var(--text); background: rgba(255,255,255,.05); }
.nav__links .nav__cta {
  color: var(--text);
  border: 1px solid var(--line-strong);
  margin-left: 8px;
}
.nav__links .nav__cta:hover { border-color: var(--accent); background: var(--accent-soft); }

.nav__burger {
  display: none;
  width: 44px; height: 44px;
  background: none; border: 1px solid var(--line-strong);
  border-radius: 50%;
  cursor: pointer;
  position: relative;
}
.nav__burger span {
  position: absolute; left: 13px; right: 13px;
  height: 1.5px; background: var(--text);
  transition: transform .4s var(--ease), top .4s var(--ease);
}
.nav__burger span:first-child { top: 17px; }
.nav__burger span:last-child { top: 25px; }
.nav__burger.is-open span:first-child { top: 21px; transform: rotate(45deg); }
.nav__burger.is-open span:last-child { top: 21px; transform: rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0;
  z-index: 45;
  background: var(--bg);
  display: flex; flex-direction: column;
  justify-content: center;
  padding: 0 var(--gutter);
  gap: 8px;
  clip-path: circle(0% at calc(100% - 40px) 40px);
  pointer-events: none;
}
.mobile-menu a {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 10vw, 3.5rem);
  font-weight: 500;
  letter-spacing: -0.015em;
}
.mobile-menu.is-open { pointer-events: auto; }

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  position: relative;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.95rem;
  overflow: hidden;
  isolation: isolate;
  cursor: pointer;
  border: 0;
  font-family: inherit;
  transition: color .35s var(--ease), border-color .35s, box-shadow .35s;
  -webkit-tap-highlight-color: transparent;
}
.btn > span, .btn > svg { position: relative; z-index: 1; }
/* Relleno que crece en círculo desde el punto por el que entra el ratón (--x/--y) */
.btn::before {
  content: "";
  position: absolute; inset: 0;
  z-index: 0;
  border-radius: inherit;
  clip-path: circle(0% at var(--x, 50%) var(--y, 100%));
  transition: clip-path .6s var(--ease);
}
.btn:hover::before { clip-path: circle(150% at var(--x, 50%) var(--y, 100%)); }

/* Texto que "rueda": sale hacia arriba y entra una copia desde abajo */
.btn__roll { display: inline-block; overflow: hidden; line-height: 1.25; height: 1.25em; }
.btn__roll > span { display: block; transition: transform .5s var(--ease); }
.btn__roll > span::after { content: attr(data-text); display: block; }
.btn:hover .btn__roll > span { transform: translateY(-50%); }

/* Iconos: la flecha avanza, los logos giran un poco */
.btn > svg { transition: transform .45s var(--ease); }
.btn:hover > svg { transform: translateX(4px); }
.btn:hover > svg:first-child { transform: rotate(-8deg) scale(1.08); }

/* Onda al hacer clic */
.btn > .ripple {
  position: absolute; z-index: 0;
  width: 12px; height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: currentColor;
  opacity: .35;
  pointer-events: none;
  animation: ripple .7s var(--ease) forwards;
}
@keyframes ripple { to { transform: scale(40); opacity: 0; } }

/* Foco visible con teclado */
.btn:focus-visible, a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 40px -10px var(--accent-glow);
}
.btn--primary:hover { box-shadow: 0 14px 50px -8px var(--accent-glow); }
.btn--primary::before { background: #fff; }
.btn--primary:hover { color: var(--bg); }

.btn--ghost { border: 1px solid var(--line-strong); color: var(--text); }
.btn--ghost::before { background: var(--text); }
.btn--ghost:hover { color: var(--bg); }

.btn--lg { padding: 18px 34px; font-size: 1.05rem; }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex; flex-direction: column;
  justify-content: center;
  padding: 130px 0 40px;
  overflow: hidden;
}
.hero__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
  opacity: .6;
}
.hero__glow {
  position: absolute;
  width: 60vmax; height: 60vmax;
  top: -20vmax; right: -15vmax;
  background: radial-gradient(circle, rgba(47,107,255,.28) 0%, rgba(0,208,255,.08) 35%, transparent 65%);
  filter: blur(20px);
  pointer-events: none;
}
.hero__inner { position: relative; z-index: 2; flex: 1; display: flex; flex-direction: column; justify-content: center; }

.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text-2);
  margin-bottom: 28px;
  text-transform: uppercase;
}
.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #29d17d;
  box-shadow: 0 0 0 0 rgba(41,209,125,.6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(41,209,125,.55); }
  70% { box-shadow: 0 0 0 10px rgba(41,209,125,0); }
  100% { box-shadow: 0 0 0 0 rgba(41,209,125,0); }
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(3.2rem, 11vw, 9.5rem);
  line-height: 0.92;
  letter-spacing: -0.025em;
  margin-bottom: 36px;
}
.line { display: block; overflow: hidden; padding-bottom: 0.06em; }
.line__inner { display: inline-block; }

.hero__lead {
  max-width: 560px;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--text-2);
  margin-bottom: 40px;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero__meta {
  position: relative; z-index: 2;
  display: flex; flex-wrap: wrap;
  align-items: flex-end;
  gap: 20px 56px;
  padding-top: 32px;
  margin-top: 60px;
  border-top: 1px solid var(--line);
}
.meta-item { display: flex; flex-direction: column; gap: 4px; font-size: 0.95rem; }
.meta-label { color: var(--text-3); text-transform: uppercase; font-size: 0.7rem; }

.scroll-hint {
  margin-left: auto;
  display: flex; align-items: center; gap: 12px;
  color: var(--text-3);
  text-transform: uppercase;
}
.scroll-hint i {
  width: 1px; height: 44px;
  background: var(--line-strong);
  position: relative; overflow: hidden;
}
.scroll-hint i::after {
  content: ""; position: absolute; left: 0; top: -50%;
  width: 100%; height: 50%;
  background: var(--accent);
  animation: scrollLine 1.8s var(--ease) infinite;
}
@keyframes scrollLine { to { top: 100%; } }

/* =========================================================
   SECTIONS
   ========================================================= */
.section { padding: clamp(90px, 14vw, 170px) 0; position: relative; }

.section__head {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: clamp(48px, 7vw, 90px);
}
.section__index { color: var(--accent); display: inline-flex; align-items: center; gap: 12px; }
.section__head .section__index::after { content: ""; width: 48px; height: 1px; background: var(--accent); opacity: .6; }
.section__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.6rem, 7vw, 5.5rem);
  letter-spacing: -0.02em;
  line-height: 1;
}
.section__sub {
  color: var(--text-2);
  max-width: 480px;
}

/* ---------- About ---------- */
.about__grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: clamp(40px, 7vw, 110px);
}
.about__statement {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.9vw, 2.4rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 500;
}
.about__side p { color: var(--text-2); margin-bottom: 20px; }

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 36px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.stat { background: var(--bg); padding: 22px 18px; display: flex; flex-direction: column; gap: 6px; }
.stat__num {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1;
}
.stat__label { font-size: 0.8rem; color: var(--text-3); line-height: 1.3; }

/* ---------- Experience ---------- */
.timeline { position: relative; }
.timeline__line {
  position: absolute; left: 220px; top: 0; bottom: 0;
  width: 1px; background: var(--line);
}
.timeline__line span {
  position: absolute; inset: 0;
  background: linear-gradient(var(--accent), var(--accent-2));
  transform-origin: top;
  transform: scaleY(0);
}
.job {
  display: grid;
  grid-template-columns: 220px 1fr;
  padding: 36px 0;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.job:first-of-type { border-top: 1px solid var(--line); }
.job::before {
  content: "";
  position: absolute; left: 216px; top: 46px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  box-shadow: 0 0 14px var(--accent-glow);
}
.job__date { color: var(--text-3); padding-top: 6px; padding-right: 30px; text-transform: uppercase; }
.job__body { padding-left: 48px; }
.job__role {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.job__company { color: var(--accent); font-weight: 500; margin: 6px 0 14px; }
.job__company span { color: var(--text-3); font-weight: 400; }
.job__desc { color: var(--text-2); max-width: 640px; }

/* ---------- Projects ---------- */
.projects__list { display: flex; flex-direction: column; gap: clamp(28px, 4vw, 48px); }

.project {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  overflow: hidden;
  position: relative;
  transform-style: preserve-3d;
  transition: border-color .4s;
}
.project::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(500px circle at var(--mx, 50%) var(--my, 50%), rgba(47,107,255,.12), transparent 45%);
  opacity: 0;
  transition: opacity .4s;
  z-index: 0;
}
.project:hover { border-color: rgba(47,107,255,.35); }
.project:hover::before { opacity: 1; }
.project:nth-child(even) .project__visual { order: 2; }

.project__visual {
  position: relative;
  min-height: 380px;
  background: var(--bg-2);
  display: grid; place-items: center;
  overflow: hidden;
  border-right: 1px solid var(--line);
}
.project:nth-child(even) .project__visual { border-right: 0; border-left: 1px solid var(--line); }

.project__info { padding: clamp(28px, 4vw, 52px); position: relative; z-index: 1; }
.project__top { display: flex; justify-content: space-between; gap: 12px; color: var(--text-3); margin-bottom: 18px; }
.project__num { color: var(--accent); }
.project__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1;
}
.project__tagline { color: var(--text); font-weight: 500; margin: 10px 0 16px; }
.project__desc { color: var(--text-2); margin-bottom: 20px; }
.project__desc em { color: var(--text); }
.project__points { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.project__points li {
  position: relative;
  padding-left: 20px;
  color: var(--text-2);
  font-size: 0.93rem;
  line-height: 1.55;
}
.project__points li::before {
  content: ""; position: absolute; left: 0; top: 0.62em;
  width: 8px; height: 1.5px; background: var(--accent);
}

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.tags li {
  font-family: var(--font-body);
  font-size: 0.72rem;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--text-2);
}

.project__link {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 500;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--accent);
  transition: color .3s, gap .3s var(--ease);
}
.project__link:hover { color: var(--accent); gap: 14px; }

.badge {
  position: absolute; top: 20px; left: 20px;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(47,107,255,.14);
  border: 1px solid rgba(47,107,255,.4);
  color: #cfe0ff;
  font-size: 0.72rem;
  backdrop-filter: blur(6px);
}

.visual-word {
  position: absolute; bottom: 18px; right: 22px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--text-3);
  letter-spacing: 0.02em;
}

/* Visual: HiveMind */
.project__visual--hive {
  background:
    radial-gradient(circle at 50% 50%, rgba(47,107,255,.2), transparent 60%),
    var(--bg-2);
}
.hive-svg { width: 88%; max-width: 440px; color: rgba(120,160,255,.35); }
.hive-nodes circle { fill: var(--surface-2); stroke: var(--accent); stroke-width: 1.5; }
.hive-nodes .core { fill: var(--accent); filter: drop-shadow(0 0 14px var(--accent)); }

/* Visual: Piso Compartido */
.project__visual--piso {
  background:
    radial-gradient(circle at 30% 70%, rgba(0,208,255,.14), transparent 55%),
    var(--bg-2);
}
.mock-phone {
  width: 190px; height: 320px;
  border-radius: 30px;
  border: 1.5px solid var(--line-strong);
  background: #0d0d10;
  padding: 34px 16px 16px;
  display: flex; flex-direction: column; gap: 10px;
  position: relative;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.8), 0 0 60px -20px var(--accent-glow);
}
.mock-phone__notch {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  width: 60px; height: 14px; border-radius: 10px; background: #000;
}
.mock-row--title { height: 14px; width: 60%; border-radius: 6px; background: rgba(255,255,255,.14); margin-bottom: 6px; }
.mock-card {
  display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 8px;
  padding: 10px; border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.mock-card i { width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); border: 1px solid var(--accent); }
.mock-card b { height: 8px; border-radius: 4px; background: rgba(255,255,255,.12); }
.mock-card s { text-decoration: none; font-family: var(--font-body); font-size: 0.62rem; color: #29d17d; }
.mock-card s.neg { color: #ff6b6b; }
.mock-btn { margin-top: auto; height: 34px; border-radius: 10px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }

/* Visual: captura real de la web dentro de un marco de navegador.
   Al pasar el ratón la página "se desplaza" sola hacia abajo. */
.project__visual--shot { padding: clamp(24px, 4vw, 44px); perspective: 1200px; }
.project__visual--sax {
  background: radial-gradient(circle at 50% 110%, rgba(255, 45, 155, .22), transparent 60%), var(--bg-2);
}
.project__visual--luthier {
  background: radial-gradient(circle at 50% 110%, rgba(232, 176, 72, .2), transparent 60%), var(--bg-2);
}
.browser {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #0d0d10;
  border: 1px solid var(--line-strong);
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.9), 0 0 0 1px rgba(255,255,255,.02);
  transition: box-shadow .5s var(--ease);
}
.browser__bar {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 12px;
  background: #141418;
  border-bottom: 1px solid var(--line);
}
.browser__bar i { width: 9px; height: 9px; border-radius: 50%; background: #2a2a30; }
.browser__bar i:nth-child(1) { background: #ff5f57; }
.browser__bar i:nth-child(2) { background: #febc2e; }
.browser__bar i:nth-child(3) { background: #28c840; }
.browser__bar span {
  flex: 1; margin: 0 8px 0 10px;
  padding: 3px 10px;
  border-radius: 6px;
  background: #0b0b0e;
  color: var(--text-3);
  font-size: 0.7rem;
  text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.browser__screen {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  container-type: size;
}
.browser__screen img {
  display: block;
  width: 100%; height: auto;
  transform: translateY(0);
  transition: transform 7s cubic-bezier(.45, .05, .35, 1);
}
.project__visual--shot:hover .browser__screen img { transform: translateY(calc(-100% + 100cqh)); transition-duration: 9s; }
.project__visual--shot:hover .browser { box-shadow: 0 50px 90px -30px rgba(0,0,0,.95), 0 0 50px -20px var(--accent-glow); }
/* Aquí el zoom general del visual sobra: ya se mueve la captura */
.project__visual--shot[data-cursor]:hover > * { transform: none; }

/* ---------- Education ---------- */
.edu__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.edu-card {
  padding: 32px 28px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: border-color .4s, transform .5s var(--ease);
}
.edu-card:hover { border-color: rgba(47,107,255,.4); transform: translateY(-6px); }
.edu-card__icon {
  display: inline-grid; place-items: center;
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 24px;
}
.edu-card h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 8px;
}
.edu-card__school { color: var(--accent); font-size: 0.92rem; margin-bottom: 14px; }
.edu-card__desc { color: var(--text-2); font-size: 0.93rem; }
.edu-card--award {
  background:
    linear-gradient(160deg, rgba(47,107,255,.14), transparent 60%),
    var(--surface);
}

/* ---------- Contact ---------- */
.contact { overflow: hidden; text-align: center; padding-bottom: clamp(110px, 16vw, 200px); }
.contact__glow {
  position: absolute; left: 50%; bottom: -40%;
  transform: translateX(-50%);
  width: 90vmax; height: 60vmax;
  background: radial-gradient(ellipse, rgba(47,107,255,.25), transparent 60%);
  pointer-events: none;
}
.contact__inner { position: relative; display: flex; flex-direction: column; align-items: center; }
.contact__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.8rem, 10vw, 8.5rem);
  line-height: 0.95;
  letter-spacing: -0.025em;
  margin: 28px 0 28px;
}
.contact__lead { color: var(--text-2); font-size: 1.1rem; margin-bottom: 40px; }
.contact__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }

/* ---------- Footer ---------- */
.footer {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-top: 1px solid var(--line);
  background: var(--bg-2);
}
/* Resplandor de acento que sube desde abajo */
.footer::before {
  content: "";
  position: absolute;
  left: 50%; bottom: -40%;
  z-index: -2;
  width: min(120vw, 1400px);
  aspect-ratio: 2 / 1;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, var(--accent-soft), transparent);
  pointer-events: none;
}
/* Logo gigante de fondo: asoma por el borde inferior y se funde con el footer */
.footer__mark {
  position: absolute;
  left: 50%; bottom: 0;
  z-index: -1;
  width: min(96vw, 1400px);
  aspect-ratio: 252 / 76;
  transform: translate(-50%, 34%);
  -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 78%);
          mask-image: linear-gradient(to bottom, #000 30%, transparent 78%);
  pointer-events: none;
  user-select: none;
  opacity: 0;
  transition: opacity 1.4s var(--ease), transform 1.4s var(--ease);
}
.footer__mark.is-visible { opacity: 1; transform: translate(-50%, 22%); }
.footer__mark svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.footer__mark-base { color: var(--text); opacity: .07; }
/* Foco que sigue al ratón e ilumina el trazo del logo */
.footer__mark-glow {
  color: var(--accent-2);
  opacity: 0;
  filter: drop-shadow(0 0 18px var(--accent-glow));
  -webkit-mask-image: radial-gradient(circle 260px at var(--mx, 50%) var(--my, 50%), #000, transparent);
          mask-image: radial-gradient(circle 260px at var(--mx, 50%) var(--my, 50%), #000, transparent);
  transition: opacity .6s var(--ease);
}
.footer:hover .footer__mark-glow { opacity: .55; }
@media (hover: none) { .footer__mark-glow { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .footer__mark, .footer__mark.is-visible { transition: none; opacity: 1; transform: translate(-50%, 22%); }
}
/* Marca a la izquierda y enlaces en columnas a la derecha; debajo queda sitio para el logo */
.footer__main {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 48px;
  padding-top: 72px;
  padding-bottom: clamp(120px, 20vw, 280px);
}
.footer__cols { display: grid; grid-template-columns: repeat(3, minmax(120px, auto)); gap: 32px clamp(40px, 6vw, 88px); }
.footer__col { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; font-size: 0.93rem; }
.footer__heading { margin-bottom: 6px; color: var(--text-3); font-size: 0.68rem; letter-spacing: .12em; text-transform: uppercase; }
.footer__brand { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.footer__name { font-size: 1.15rem; font-weight: 500; color: var(--text); transition: color .3s; }
.footer__brand:hover .footer__name { color: var(--accent-2); }
.footer__status { display: inline-flex; align-items: center; gap: 8px; color: var(--text-3); font-size: 0.68rem; }
.footer__small { color: var(--text-3); transition: color .3s; }
.footer__small:hover { color: var(--accent); }
.footer__link {
  position: relative;
  color: var(--text-2);
  transition: color .3s, transform .4s var(--ease);
}
/* Subrayado que entra desde la izquierda y sale por la derecha */
.footer__link::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .45s var(--ease);
}
.footer__link:hover { color: var(--text); }
.footer__link:hover::after { transform: scaleX(1); transform-origin: left; }
.footer__link i { font-style: normal; display: inline-block; color: var(--accent); transition: transform .4s var(--ease); }
.footer__link:hover i { transform: translate(2px, -2px); }

.footer__bottom {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
  padding-top: 16px; padding-bottom: 16px;
  border-top: 1px solid var(--line);
  color: var(--text-3);
}
.footer__clock { font-variant-numeric: tabular-nums; }
.footer__totop { display: inline-flex; align-items: center; gap: 10px; color: var(--text-2); transition: color .3s; }
.footer__totop-icon {
  display: grid; place-items: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  overflow: hidden;
  transition: border-color .3s, background .3s;
}
.footer__totop-icon svg { transition: transform .45s var(--ease); }
.footer__totop:hover { color: var(--text); }
.footer__totop:hover .footer__totop-icon { border-color: var(--accent); background: var(--accent); color: #fff; }
.footer__totop:hover .footer__totop-icon svg { animation: arrowUp .6s var(--ease); }
@keyframes arrowUp { 0% { transform: translateY(0); } 45% { transform: translateY(-140%); } 46% { transform: translateY(140%); } 100% { transform: translateY(0); } }


/* ---------- Email copiable ---------- */
.email-copy {
  display: inline-flex; flex-direction: column; align-items: center; gap: 6px;
  background: none; border: 0; color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 3.4vw, 2.2rem);
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 36px;
  position: relative;
}
.email-copy__text {
  position: relative;
  background: linear-gradient(var(--accent), var(--accent)) left bottom / 0% 2px no-repeat;
  transition: background-size .5s var(--ease), color .3s;
  padding-bottom: 4px;
}
.email-copy:hover .email-copy__text { background-size: 100% 2px; }
.email-copy__hint { color: var(--text-3); transition: color .3s; }
.email-copy.is-copied .email-copy__hint { color: #29d17d; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px;
  z-index: 200;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  color: var(--text);
  transform: translate(-50%, 140%);
  opacity: 0;
  transition: transform .5s var(--ease), opacity .3s;
  pointer-events: none;
}
.toast.is-visible { transform: translate(-50%, 0); opacity: 1; }

/* ---------- Detalles de navegación ---------- */
.nav__links a:not(.nav__cta):not(.nav__icon) { position: relative; }
.nav__links a:not(.nav__cta):not(.nav__icon)::after {
  content: "";
  position: absolute; left: 50%; bottom: 3px;
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--accent);
  transform: translateX(-50%) scale(0);
  transition: transform .35s var(--ease);
}
.nav__links a.is-active { color: var(--text); }
.nav__links a.is-active::after { transform: translateX(-50%) scale(1); }

.edu-card__date { display: block; color: var(--text-3); margin-bottom: 10px; }

/* Visual de proyecto clicable */
.project__visual[data-cursor] > * { transition: transform .8s var(--ease); }
.project__visual[data-cursor]:hover > *:not(.badge) { transform: scale(1.04); }

/* Clash Display trae poco espacio entre palabras: lo abrimos en todos los titulares */
.hero__title, .section__title, .contact__title, .project__title, .job__role, .edu-card h3,
.about__statement, .gh__title, .repo__name, .stat__num, .mobile-menu a { word-spacing: 0.1em; }

/* ---------- Iconos y enlaces de GitHub ---------- */
.nav__links .nav__icon { display: inline-grid; place-items: center; padding: 8px 10px; }
.mobile-menu a.mobile-menu__small {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 24px;
}

.project__links { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; }
.project__link--ghost { border-bottom-color: var(--line-strong); color: var(--text-2); }
.project__link--ghost:hover { border-bottom-color: var(--accent); }
.project__link svg { display: inline-block; }

/* Visual: Argus (terminal) */
.project__visual--argus {
  background:
    radial-gradient(circle at 60% 40%, rgba(47,107,255,.16), transparent 60%),
    var(--bg-2);
  padding: 28px;
}
.terminal {
  width: 100%; max-width: 440px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: #09090b;
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.9), 0 0 60px -30px var(--accent-glow);
  overflow: hidden;
}
.terminal__bar {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 0.72rem; color: var(--text-3);
}
.terminal__bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line-strong); }
.terminal__bar span { margin-left: 8px; }
.terminal__body {
  padding: 18px 16px 20px;
  font-family: var(--font-code);
  font-size: 0.74rem;
  line-height: 1.6;
  color: var(--text);
  white-space: pre;
  overflow: hidden;
}
.t-dim { color: var(--text-3); }
.t-high { color: #ffb547; }
.t-crit { color: #ff5d5d; }
.t-ok { color: var(--accent-2); }
.t-caret { color: var(--accent); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Bloque GitHub */
.gh {
  margin-top: clamp(56px, 8vw, 96px);
  padding: clamp(28px, 4vw, 44px);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  background: linear-gradient(180deg, var(--surface), var(--bg));
}
.gh__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.gh__title { font-family: var(--font-display); font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 500; letter-spacing: -0.01em; }
.gh__sub { color: var(--text-2); max-width: 520px; margin-top: 6px; }
.gh__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.repo {
  display: flex; flex-direction: column; gap: 8px;
  padding: 20px;
  border-radius: 14px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  transition: border-color .3s, transform .4s var(--ease);
}
.repo:hover { border-color: rgba(47,107,255,.45); transform: translateY(-4px); }
.repo__name { font-family: var(--font-display); font-weight: 500; font-size: 1.1rem; }
.repo__desc { color: var(--text-2); font-size: 0.9rem; flex: 1; }
.repo__meta { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--text-3); }
.repo__meta b { margin-left: auto; font-weight: 500; color: var(--accent); }
.lang-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--text-3)); }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 960px) {
  .nav__links { display: none; }
  .nav__burger { display: block; }

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

  .project, .project:nth-child(even) { grid-template-columns: 1fr; }
  .project:nth-child(even) .project__visual { order: 0; border-left: 0; }
  .project__visual { min-height: 280px; border-right: 0; border-bottom: 1px solid var(--line); }
  .project:nth-child(even) .project__visual { border-bottom: 1px solid var(--line); }

  .edu__grid { grid-template-columns: 1fr; }
  .footer__main { grid-template-columns: 1fr; gap: 40px; }

  .timeline__line { left: 4px; }
  .job { grid-template-columns: 1fr; padding-left: 32px; }
  .job::before { left: 0; top: 42px; }
  .job__date { margin-bottom: 8px; padding-right: 0; }
  .job__body { padding-left: 0; }
}

@media (max-width: 600px) {
  .hero { padding-top: 110px; }
  .hero__meta { gap: 18px 32px; }
  .scroll-hint { display: none; }
  .stats { grid-template-columns: 1fr; }
  .btn { padding: 13px 22px; }
  .footer__cols { grid-template-columns: repeat(2, 1fr); }
  .footer__bottom { flex-direction: column; gap: 10px; }
  .footer__bottom { align-items: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
