/* ==========================================================
   Mikel Martin Gallo · CV web
   Paleta y tipografías heredadas del vídeo promo (Remotion)
   ========================================================== */

:root {
  --dark: #101014;
  --card: #1b1b22;
  --line: #2c2c35;
  --cream: #f3eee4;
  --ink: #f7f5f0;
  --pink: #ff3d7f;
  --cobalt: #2f4bff;
  --yellow: #ffd23f;
  --teal: #19c3a6;
  --dim: #8d8a96;

  --display: 'Archivo Black', 'Arial Black', sans-serif;
  --sans: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;

  --gutter: clamp(16px, 6vw, 120px);
  --hud-h: 56px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--hud-h); overflow-x: clip; }
body {
  margin: 0;
  background: var(--dark);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.is-booting { overflow: hidden; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }
.mono { font-family: var(--mono); }
.pink { color: var(--pink); }
.yellow { color: var(--yellow); }
.wrap { max-width: 1280px; margin: 0 auto; }

/* ─── Intro terminal ─── */
.boot {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  background: var(--dark);
  padding: 16px;
  transition: opacity .5s ease, visibility .5s;
}
.boot.is-done { opacity: 0; visibility: hidden; }
.term {
  width: min(900px, 100%);
  background: #17171d;
  border: 1px solid #2a2a33;
  border-radius: 16px;
  box-shadow: 0 40px 120px rgba(0,0,0,.5);
  animation: pop .5s cubic-bezier(.2,1.4,.4,1) both;
}
.term__bar { display: flex; align-items: center; gap: 8px; padding: 14px 18px; border-bottom: 1px solid #2a2a33; }
.term__bar i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; }
.term__bar i:nth-child(2) { background: #febc2e; }
.term__bar i:nth-child(3) { background: #28c840; }
.term__bar span { flex: 1; text-align: center; font: 13px var(--mono); color: var(--dim); margin-right: 52px; }
.term__body {
  margin: 0; padding: 24px 28px; min-height: 250px;
  font: clamp(12px, 2.2vw, 17px)/1.8 var(--mono);
  white-space: pre-wrap; word-break: break-word;
}
.term__body .c-teal { color: var(--teal); }
.term__body .c-yellow { color: var(--yellow); }
.term__body .c-pink { color: var(--pink); }
.term__body .c-dim { color: var(--dim); }
.boot__skip {
  position: absolute; bottom: 28px; right: 28px;
  background: none; border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 14px; color: var(--dim); font-size: 13px;
}
.boot__skip:hover { color: var(--ink); border-color: var(--dim); }

/* ─── HUD ─── */
.hud {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: var(--hud-h);
  display: flex; align-items: center; gap: 20px;
  padding: 0 var(--gutter);
  font-size: 13px;
  color: rgba(247,245,240,.7);
  background: rgba(16,16,20,.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: color .4s, background .4s;
}
body[data-light] .hud { color: rgba(16,16,20,.7); background: rgba(255,255,255,.35); }
.hud__logo { font-weight: 700; text-decoration: none; color: inherit; }
.hud__logo span { color: var(--pink); }
.hud__scene { flex: 1; text-align: center; letter-spacing: .04em; }
.hud__nav { display: flex; align-items: center; gap: 18px; }
.hud__nav a { text-decoration: none; }
.hud__nav a:hover { color: var(--pink); }
.hud__print {
  text-decoration: none;
  background: var(--pink); color: var(--dark); border: 0; border-radius: 6px;
  padding: 6px 12px; font-weight: 700; font-size: 12px;
}
.hud__progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; }
.hud__progress span { display: block; height: 100%; width: 0; background: var(--pink); }
body[data-scene-bg="pink"] .hud__progress span { background: var(--dark); }

/* ─── Escenas ─── */
.scene { position: relative; padding: calc(var(--hud-h) + 70px) var(--gutter) 100px; }
.scene--dark { background: var(--dark); }
.scene--pink { background: var(--pink); color: var(--dark); }
.scene--cobalt { background: var(--cobalt); }
.scene--cream { background: var(--cream); color: var(--dark); }
.scene--yellow { background: var(--yellow); color: var(--dark); }

.title {
  font: clamp(2.2rem, 6vw, 4.6rem)/1.02 var(--display);
  margin: 0 0 40px;
  letter-spacing: -.01em;
}

/* Revelado al hacer scroll */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.9,.3,1.2); }
.reveal.is-in { opacity: 1; transform: none; }

/* ─── Botones ─── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 26px; border-radius: 999px;
  font: 800 16px var(--sans); text-decoration: none;
  border: 2px solid transparent;
  transition: transform .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-3px) rotate(-1deg); }
.btn--pink { background: var(--pink); color: var(--dark); box-shadow: 0 10px 30px rgba(255,61,127,.35); }
.btn--yellow { background: var(--yellow); color: var(--dark); }
.btn--ghost { background: transparent; border-color: currentColor; }

/* ─── 01 · HERO ─── */
.hero {
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding-bottom: 120px;
  background:
    radial-gradient(circle at 80% 20%, rgba(47,75,255,.25), transparent 40%),
    radial-gradient(circle at 10% 90%, rgba(255,61,127,.18), transparent 40%),
    var(--dark);
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, #000 40%, transparent);
}
.hero__grid {
  position: relative;
  max-width: 1280px; width: 100%; margin: 0 auto;
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 60px; align-items: center;
}
.status { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: var(--dim); margin: 0 0 18px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 0 rgba(25,195,166,.7); animation: ping 1.8s infinite; }

.name { margin: 0; line-height: .85; }
.name__first { display: flex; font: clamp(5rem, 17vw, 14rem)/.88 var(--display); letter-spacing: -.02em; }
.name__first span { display: inline-block; animation: drop .8s cubic-bezier(.2,1.6,.4,1) both; animation-delay: calc(var(--start, 0s) + var(--i) * .07s); }
.name__band {
  display: inline-block;
  background: var(--pink); color: var(--dark);
  font: clamp(1.6rem, 5vw, 3.6rem)/1 var(--display);
  letter-spacing: .06em;
  padding: 8px 28px;
  transform-origin: left center;
  transform: rotate(-2deg);
  animation: band .6s cubic-bezier(.2,.9,.3,1) both;
  animation-delay: calc(var(--start, 0s) + .45s);
}
.name__band--sm { font-size: clamp(1.2rem, 3.4vw, 2.2rem); animation: none; }
.hero__role { font-weight: 600; font-size: clamp(1.05rem, 2.2vw, 1.5rem); margin: 34px 0 30px; min-height: 1.6em; }
.caret { animation: blink 1s steps(1) infinite; color: var(--pink); }
.hero__about { max-width: 46ch; color: rgba(247,245,240,.75); margin: -14px 0 30px; font-size: 1.05rem; }
.hero__about b { color: var(--ink); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; }

/* Post de Instagram */
.post {
  background: #fff; color: var(--dark);
  border-radius: 22px; overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,.45);
  transform: rotate(3deg);
  max-width: 340px; justify-self: end; width: 100%;
}
.post.is-in { transform: rotate(3deg); }
.post:hover { transform: rotate(0) scale(1.02); transition: transform .4s; }
.post__head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.post__head small { display: block; font-size: 12px; color: #77737f; }
.post__avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--pink), var(--yellow)); box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--pink); }
.post__more { margin-left: auto; font-weight: 800; }
.post__media { position: relative; aspect-ratio: 4 / 5; max-height: 52vh; width: 100%; background: var(--dark); user-select: none; }
.slides {
  display: flex; height: 100%;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none; outline: none;
}
.slides::-webkit-scrollbar { display: none; }
.slides img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: start; display: block; -webkit-user-drag: none; }
.post__count {
  position: absolute; top: 12px; right: 12px;
  background: rgba(16,16,20,.65); color: #fff; font-size: 12px;
  padding: 3px 9px; border-radius: 999px;
}
.slide-nav {
  position: absolute; top: 50%; translate: 0 -50%;
  width: 34px; height: 34px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.85); color: var(--dark);
  font-size: 22px; line-height: 1; padding-bottom: 3px;
  box-shadow: 0 4px 14px rgba(0,0,0,.25);
  opacity: 0; transition: opacity .2s;
}
.slide-nav--prev { left: 10px; }
.slide-nav--next { right: 10px; }
.post__media:hover .slide-nav, .slide-nav:focus-visible { opacity: 1; }
.slide-nav:disabled { opacity: 0 !important; pointer-events: none; }
@media (hover: none) { .slide-nav { display: none; } }
.post__dots { display: flex; gap: 5px; }
.post__dots i { width: 6px; height: 6px; border-radius: 50%; background: #cfccd6; transition: background .2s, transform .2s; }
.post__dots i.is-on { background: var(--cobalt); transform: scale(1.2); }
.post__burst { position: absolute; font-size: 110px; color: #fff; opacity: 0; pointer-events: none; text-shadow: 0 10px 30px rgba(0,0,0,.4); }
.post__burst.is-on { animation: burst .9s ease both; }
.post__body { padding: 12px 16px 18px; font-size: 14px; }
.post__body p { margin: 4px 0; }
.post__actions { display: flex; align-items: center; justify-content: space-between; }
.like { background: none; border: 0; font-size: 28px; line-height: 1; color: var(--dark); padding: 0; transition: transform .2s; }
.like[aria-pressed="true"] { color: var(--pink); animation: pop .4s cubic-bezier(.2,1.8,.4,1); }
.post__sched { font-size: 11px; background: var(--cobalt); color: var(--ink); padding: 4px 8px; border-radius: 4px; }
.tags { color: #2f4bff; }
.post__note { color: #77737f; font-size: 11px; margin-top: 8px !important; }

/* Marquee */
.marquee {
  position: absolute; left: 0; right: 0; bottom: 0;
  overflow: hidden; white-space: nowrap;
  background: var(--yellow); color: var(--dark);
  font-size: 15px; font-weight: 700;
  padding: 12px 0;
  transform: rotate(-1deg) translateY(10px);
}
.marquee__track { display: inline-flex; animation: marquee 28s linear infinite; }
.marquee__track span { padding-right: 0; }

/* ─── 02 · HECHOS ─── */
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.fact {
  background: var(--dark); color: var(--ink);
  border-radius: 22px; padding: 30px 34px;
  display: flex; align-items: center; gap: 28px;
  transition: transform .3s;
}
.fact:hover { transform: rotate(-1deg) scale(1.02); }
.fact > b { font: clamp(3rem, 7vw, 5.4rem)/1 var(--display); color: var(--pink); min-width: 3.2ch; white-space: nowrap; flex-shrink: 0; }
.fact > div { min-width: 0; }
.fact--wide > b { font-size: clamp(2.4rem, 4.6vw, 4rem); }
.fact strong { display: block; font-size: 1.5rem; }
.fact small { color: var(--dim); font-size: .95rem; }
.facts .fact:nth-child(2) { transition-delay: .1s; }
.facts .fact:nth-child(3) { transition-delay: .2s; }
.facts .fact:nth-child(4) { transition-delay: .3s; }
.source { margin-top: 30px; font-size: 14px; }

/* ─── 03 · CARRERA ─── */
.career__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }
.career__arrows { display: flex; gap: 10px; margin-bottom: 44px; }
.arrow {
  width: 52px; height: 52px; border-radius: 50%;
  background: transparent; border: 2px solid var(--line); font-size: 20px;
  transition: background .2s, border-color .2s;
}
.arrow:hover { background: var(--pink); border-color: var(--pink); color: var(--dark); }

.rail { position: relative; margin: 0 0 34px; }
.rail__line { height: 4px; background: var(--line); border-radius: 2px; position: absolute; left: 12px; right: 12px; top: 10px; }
.rail__line span { display: block; height: 100%; width: 0; background: var(--pink); border-radius: 2px; transition: width .3s; }
.rail__dots { position: relative; display: flex; justify-content: space-between; }
.rail__dot { background: none; border: 0; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; font: 13px var(--mono); color: var(--dim); }
.rail__dot::before { content: ""; width: 24px; height: 24px; border-radius: 50%; background: var(--line); transition: background .3s, box-shadow .3s; }
.rail__dot.is-past { color: var(--ink); }
.rail__dot.is-past::before { background: var(--pink); }
.rail__dot.is-active::before { box-shadow: 0 0 24px var(--pink); transform: scale(1.15); }

.track {
  display: flex; gap: 24px;
  overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 4px 4px 24px;
  scrollbar-width: thin; scrollbar-color: var(--pink) transparent;
  outline: none;
}
.job {
  flex: 0 0 min(600px, 86%);
  scroll-snap-align: start;
  background: var(--card); border: 1px solid var(--line); border-radius: 24px;
  padding: 34px 38px;
  position: relative;
  transition: border-color .3s, transform .3s;
}
.job:hover { border-color: var(--pink); }
.job__year { font: clamp(4rem, 9vw, 7rem)/.9 var(--display); color: var(--pink); margin: 0 0 12px; }
.job h3 { font-size: clamp(1.3rem, 2.6vw, 1.9rem); line-height: 1.15; margin: 0 0 6px; }
.job__org { color: var(--dim); margin: 0 0 18px; font-size: .95rem; }
.job ul { padding-left: 20px; margin: 0 0 20px; }
.job li { margin-bottom: 6px; }
.job li::marker { color: var(--pink); }
.job__note { color: var(--yellow); font-size: 14px; margin: 0; }
.badge { position: absolute; top: 30px; right: 30px; font-size: 12px; color: var(--teal); border: 1px solid var(--teal); border-radius: 999px; padding: 4px 10px; }

/* ─── PROYECTOS REALIZADOS ─── */
.projects__intro { font-size: 1.15rem; font-weight: 600; color: #5d5a63; margin: -20px 0 40px; max-width: 46ch; }
.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 26px; }
.project {
  display: flex; flex-direction: column;
  background: var(--dark); color: var(--ink);
  border: 0; border-radius: 22px; overflow: hidden; padding: 0; text-align: left;
  box-shadow: 0 20px 50px rgba(16,16,20,.18);
  transition: transform .35s cubic-bezier(.2,1.4,.4,1), box-shadow .35s, opacity .7s;
}
.project.reveal { transform: translateY(40px); }
.project.reveal.is-in { transform: none; }
.project:hover, .project:focus-within { transform: translateY(-8px) rotate(-1deg) !important; box-shadow: 0 30px 70px rgba(16,16,20,.3); transition-delay: 0s !important; }
.project__open {
  display: flex; flex-direction: column; flex: 1;
  background: none; border: 0; padding: 0; margin: 0;
  color: inherit; font: inherit; text-align: left;
}
.project__open .project__body { flex: 1; }
.project__doc {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin: 0 24px 24px; padding: 11px 14px;
  border: 2px solid var(--yellow); border-radius: 12px;
  color: var(--yellow); text-decoration: none; font-size: 13px; font-weight: 700;
  transition: background .2s, color .2s;
}
.project__doc:hover, .project__doc:focus-visible { background: var(--yellow); color: var(--dark); }
.lightbox__doc {
  display: inline-block; margin-top: 12px; padding: 8px 14px;
  background: var(--yellow); color: var(--dark); border-radius: 10px;
  font-size: 13px; font-weight: 700; text-decoration: none;
}
.lightbox__doc:hover { background: var(--pink); }
.cmd__more { padding: 10px 12px 6px; color: var(--dim); font-size: 12px; border-top: 1px dashed #2a2a33; margin-top: 6px; }
.project__media { position: relative; display: block; aspect-ratio: 4 / 4.4; overflow: hidden; background: #22222a; }
.project__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0%; display: block; transition: transform .6s ease; }
.project:hover .project__media img { transform: scale(1.05); }
.project__badge {
  position: absolute; top: 14px; left: 14px;
  background: var(--yellow); color: var(--dark); font-size: 12px; font-weight: 700;
  padding: 5px 10px; border-radius: 999px;
}
.project__play {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  width: 70px; height: 70px; border-radius: 50%;
  display: grid; place-items: center; padding-left: 5px;
  background: var(--pink); color: var(--dark); font-size: 26px;
  box-shadow: 0 0 0 0 rgba(255,61,127,.6); animation: pulse 2s infinite;
}
.project__body { display: flex; flex-direction: column; gap: 8px; padding: 22px 24px 26px; flex: 1; }
.project__meta { font-size: 12px; color: var(--dim); }
.project__title { font: 1.4rem/1.15 var(--display); }
.project__text { color: #c9c6d1; font-size: .98rem; line-height: 1.5; }
.project__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 8px; }
.project__tags i { font: 600 12px var(--mono); font-style: normal; border: 1px solid #3a3a45; border-radius: 6px; padding: 3px 8px; color: var(--ink); }
.project:nth-child(3n+1) .project__tags i:first-child { border-color: var(--pink); color: var(--pink); }
.project:nth-child(3n+2) .project__tags i:first-child { border-color: var(--teal); color: var(--teal); }
.project:nth-child(3n+3) .project__tags i:first-child { border-color: var(--yellow); color: var(--yellow); }
@keyframes pulse { 70% { box-shadow: 0 0 0 18px rgba(255,61,127,0); } 100% { box-shadow: 0 0 0 0 rgba(255,61,127,0); } }

/* ─── 04 · VÍDEO ─── */
.video { display: grid; grid-template-columns: 1fr 1.6fr; gap: 50px; align-items: center; }
.video__text p { font-size: 1.15rem; max-width: 34ch; }
.video__frame {
  border-radius: 20px; overflow: hidden;
  box-shadow: 0 30px 90px rgba(0,0,0,.4), 0 0 0 8px rgba(255,255,255,.12);
  transform: rotate(-1.5deg);
  background: var(--dark);
}
.video__frame video { display: block; width: 100%; aspect-ratio: 16 / 9; }

/* ─── 05 · HABILIDADES ─── */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.filters button { background: none; border: 1px solid var(--line); border-radius: 8px; padding: 8px 14px; font-size: 13px; color: var(--dim); }
.filters button.is-on { background: var(--ink); color: var(--dark); border-color: var(--ink); }
.skills { display: flex; flex-wrap: wrap; gap: 14px; }
.skill {
  --c: var(--pink);
  border: 2px solid var(--ink); background: transparent; color: var(--ink);
  border-radius: 999px; padding: 12px 24px;
  font: 800 clamp(.95rem, 1.6vw, 1.15rem) var(--sans);
  transform: scale(.6); opacity: 0;
  transition: transform .45s cubic-bezier(.2,1.8,.4,1), opacity .3s, background .3s, color .3s, border-color .3s, filter .3s;
}
.skill.is-in { transform: scale(1); opacity: 1; }
.skill.is-unlocked { background: var(--c); border-color: var(--c); color: var(--dark); }
.skill[data-color="cobalt"].is-unlocked { color: var(--ink); }
.skill:hover { transform: scale(1.06) rotate(-2deg); }
.skill.is-selected { outline: 3px dashed var(--ink); outline-offset: 4px; }
.skill.is-dim { opacity: .18; filter: grayscale(1); }
.evidence {
  margin-top: 40px; max-width: 760px;
  background: var(--card); border: 2px solid var(--yellow); border-radius: 18px;
  padding: 20px 26px;
}
.evidence__label { color: var(--yellow); font-size: 12px; letter-spacing: .08em; }
.evidence p { margin: 6px 0 0; font-family: var(--sans); font-size: 1.1rem; font-weight: 600; }

/* ─── 06 · FORMACIÓN ─── */
.edu { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.ticket {
  display: flex; gap: 24px; align-items: flex-start;
  background: #fff; border-radius: 18px; padding: 26px 28px;
  border: 2px solid var(--dark);
  box-shadow: 6px 6px 0 var(--dark);
  transition: transform .2s, box-shadow .2s;
  position: relative;
}
.ticket:hover { transform: translate(-3px, -3px); box-shadow: 9px 9px 0 var(--pink); }
.ticket__year { font: 1.6rem var(--display); color: var(--cobalt); writing-mode: vertical-rl; transform: rotate(180deg); border-right: 2px dashed #c9c3b6; padding-left: 16px; }
.ticket h3 { margin: 0 0 4px; font-size: 1.2rem; line-height: 1.2; }
.ticket p { margin: 0 0 6px; font-weight: 600; color: #5d5a63; }
.ticket small { color: #5d5a63; }

.extras__title { font: 1.6rem var(--display); margin: 50px 0 18px; }
.extras { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.extra { display: flex; align-items: center; gap: 16px; background: var(--dark); color: var(--ink); border-radius: 16px; padding: 20px 22px; transition: transform .2s; }
.extra:hover { transform: rotate(-1.5deg) scale(1.03); }
.extra__icon { font-size: 28px; width: 52px; height: 52px; flex: 0 0 52px; display: grid; place-items: center; border-radius: 12px; background: var(--card); }
.extra b { display: block; font-size: 1.1rem; }
.extra small { color: var(--dim); }
.extras .extra:nth-child(2) { transition-delay: .1s; }
.extras .extra:nth-child(3) { transition-delay: .2s; }

/* ─── 07 · MODO OFFLINE ─── */
/* Fondo: verde bosque con curvas de nivel, como un mapa de montaña */
.scene--offline {
  color: var(--ink);
  background:
    repeating-radial-gradient(ellipse 60% 45% at 18% 28%, transparent 0 26px, rgba(25,195,166,.13) 26px 27.5px),
    repeating-radial-gradient(ellipse 50% 60% at 85% 75%, transparent 0 30px, rgba(25,195,166,.10) 30px 31.5px),
    radial-gradient(circle at 50% 0%, rgba(255,210,63,.08), transparent 55%),
    linear-gradient(180deg, #0e2219 0%, #10261c 50%, #101014 100%);
}
.scene--offline .offline__intro { color: #b9d6c8; }
.battery { display: inline-block; animation: charge 2.4s ease-in-out infinite; }
.offline__intro { font-size: 1.2rem; font-weight: 600; margin: -20px 0 50px; max-width: 40ch; }
.polaroids { display: flex; flex-wrap: wrap; justify-content: center; gap: 34px 30px; padding-bottom: 20px; }
.polaroid {
  position: relative;
  width: min(250px, 80vw);
  background: #fff; color: var(--dark); border: 0; text-align: left;
  padding: 12px 12px 18px;
  box-shadow: 0 18px 40px rgba(16,16,20,.28);
  transform: rotate(var(--r, 0deg));
  transition: transform .35s cubic-bezier(.2,1.4,.4,1), box-shadow .35s, opacity .7s;
}
.polaroid.reveal { transform: translateY(40px) rotate(var(--r, 0deg)); }
.polaroid.reveal.is-in { transform: rotate(var(--r, 0deg)); }
.polaroid:nth-child(2) { transition-delay: .08s; }
.polaroid:nth-child(3) { transition-delay: .16s; }
.polaroid:nth-child(4) { transition-delay: .24s; }
.polaroid:nth-child(5) { transition-delay: .32s; }
.polaroid::before {
  content: ""; position: absolute; top: -12px; left: 50%;
  width: 90px; height: 26px; translate: -50% 0; rotate: -3deg;
  background: rgba(255,210,63,.75);
  box-shadow: 0 2px 4px rgba(0,0,0,.08);
}
.polaroid:nth-child(even)::before { background: rgba(255,61,127,.6); rotate: 4deg; }
.polaroid:hover, .polaroid:focus-visible { transform: rotate(0) scale(1.06) !important; box-shadow: 0 28px 60px rgba(16,16,20,.35); z-index: 2; transition-delay: 0s; }
.polaroid img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; background: #eee; }
.polaroid__label { display: block; font: 1.35rem var(--display); margin: 14px 4px 2px; }
.polaroid small { display: block; margin: 0 4px; color: #5d5a63; font-size: .92rem; line-height: 1.35; }

/* Visor de fotos */
.lightbox {
  position: fixed; inset: 0; z-index: 92;
  display: grid; place-items: center; padding: 16px;
  background: rgba(8,8,12,.88); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  animation: fade .2s both;
}
.lightbox figure { margin: 0; text-align: center; animation: pop .3s cubic-bezier(.2,1.4,.4,1) both; }
.lightbox__media img, .lightbox__media video {
  display: block; margin: 0 auto;
  max-width: min(88vw, 1000px); max-height: 76vh;
  border: 10px solid #fff; border-radius: 4px; background: #000;
  box-shadow: 0 30px 90px rgba(0,0,0,.6);
}
.lightbox__media video { border-width: 0; border-radius: 14px; }
.lightbox__nav {
  position: absolute; top: 50%; translate: 0 -50%;
  width: 52px; height: 52px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.9); color: var(--dark); font-size: 30px; line-height: 1; padding-bottom: 4px;
  z-index: 1;
}
.lightbox__nav:hover { background: var(--yellow); }
.lightbox__nav--prev { left: 16px; }
.lightbox__nav--next { right: 16px; }
.lightbox figcaption { color: var(--ink); font: 1.4rem var(--display); margin-top: 16px; }
.lightbox figcaption small { display: block; font: 500 1rem var(--sans); color: var(--dim); margin-top: 4px; }
.lightbox__close {
  position: absolute; top: 16px; right: 16px;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--pink); color: var(--dark); border: 0; font-size: 18px; font-weight: 800;
}
@keyframes charge { 0%, 100% { transform: none; } 50% { transform: rotate(-8deg) scale(1.1); } }

/* ─── 08 · MANIFIESTO ─── */
.manifesto { min-height: 80vh; display: flex; align-items: center; overflow: hidden; }
.manifesto .wrap { position: relative; width: 100%; }
.manifesto__text { font: clamp(2.8rem, 9vw, 7.5rem)/1.02 var(--display); margin: 0; }
.manifesto__text span { display: block; }
.manifesto__text span:nth-child(2) { transition-delay: .15s; }
.manifesto__hl { display: inline-block !important; background: var(--dark); color: var(--yellow); padding: 4px 26px; margin-top: 14px; transition-delay: .3s !important; }
.stamp {
  position: absolute; right: 0; top: 50%;
  width: clamp(150px, 22vw, 260px); aspect-ratio: 1;
  border-radius: 50%; border: 7px solid var(--dark);
  background: var(--pink); color: var(--dark);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; line-height: 1;
  transform: translateY(-50%) rotate(calc(-14deg + var(--spin, 0deg)));
  box-shadow: 0 0 0 6px var(--pink) inset, 0 0 0 9px var(--dark) inset;
}
.stamp b { font: clamp(2rem, 4vw, 3.4rem) var(--display); }
.stamp span { font: clamp(1.1rem, 2.6vw, 2.2rem) var(--display); }
.stamp small { font: 12px var(--mono); margin-top: 6px; }

/* ─── 08 · CONTACTO ─── */
.contact { min-height: 90vh; display: flex; flex-direction: column; justify-content: center; gap: 60px; }
.contact .wrap { width: 100%; }
.contact__side { display: grid; gap: 20px; }

/* Qué busco */
.busco { background: var(--card); border: 2px solid var(--teal); border-radius: 22px; padding: 24px 28px; }
.busco__label { color: var(--teal); font-size: 13px; margin: 0 0 14px; letter-spacing: .06em; }
.busco__roles { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.busco__roles span { background: var(--teal); color: var(--dark); font-weight: 800; font-size: .92rem; padding: 6px 12px; border-radius: 999px; }
.busco__info { margin: 0; display: grid; gap: 10px; }
.busco__info div { display: flex; justify-content: space-between; gap: 16px; border-top: 1px dashed var(--line); padding-top: 10px; }
.busco__info dt { color: var(--dim); font-size: .95rem; }
.busco__info dd { margin: 0; font-weight: 700; text-align: right; }

/* Formulario */
.form {
  background: var(--card); border: 1px solid var(--line); border-radius: 26px;
  padding: clamp(22px, 4vw, 44px);
  box-shadow: 0 30px 80px rgba(0,0,0,.25);
}
.form__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; margin-bottom: 24px; }
.form__head h3 { font: clamp(1.8rem, 4vw, 2.6rem)/1 var(--display); margin: 0; }
.form__head p { margin: 0; color: var(--dim); }
.form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.form__grid label { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: .95rem; }
.form__grid label small { color: var(--dim); font-weight: 500; }
.form__full { grid-column: 1 / -1; }
.form input, .form select, .form textarea {
  font: 500 1rem var(--sans); color: var(--ink);
  background: var(--dark); border: 2px solid var(--line); border-radius: 12px;
  padding: 12px 14px; width: 100%;
  transition: border-color .2s, box-shadow .2s;
}
.form textarea { resize: vertical; min-height: 120px; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--pink); box-shadow: 0 0 0 4px rgba(255,61,127,.18); }
.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 22px; }
.form__foot .btn { border: 0; }
.form__foot .btn:disabled { opacity: .6; cursor: wait; }
.form__status { margin: 0; font-size: 14px; color: var(--dim); }
.form__status.is-ok { color: var(--teal); }
.form__status.is-error { color: var(--yellow); }
.form__legal { margin: 18px 0 0; font-size: 12.5px; color: var(--dim); }
.form__trap { display: none !important; }
.contact__grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 50px; align-items: center; }
.contact__name { font: clamp(4.5rem, 14vw, 11rem)/.85 var(--display); margin: 0; }
.contact__role { font-weight: 700; font-size: 1.3rem; margin: 26px 0 28px; }
.channels { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 12px; max-width: 520px; }
.channel {
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 8px 10px 8px 8px;
  transition: border-color .2s, transform .2s;
}
.channel:hover { border-color: var(--pink); transform: translateX(4px); }
.channel__link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; text-decoration: none; padding: 4px; border-radius: 10px; }
.channel__icon {
  width: 46px; height: 46px; flex: 0 0 46px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--pink); color: var(--dark); font: 800 20px var(--sans);
}
.channel:nth-child(2) .channel__icon { background: var(--yellow); }
.channel:nth-child(3) .channel__icon { background: var(--cobalt); color: var(--ink); font-size: 18px; }
.channel__link small { display: block; font-size: 11px; color: var(--dim); letter-spacing: .06em; text-transform: uppercase; }
.channel__link b { display: block; font-size: 1.08rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.channel__copy {
  flex: 0 0 auto;
  background: transparent; border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 12px; font-size: 12px; color: var(--dim);
  transition: color .2s, border-color .2s, background .2s;
}
.channel__copy:hover { color: var(--ink); border-color: var(--dim); }
.channel__copy.is-done { background: var(--teal); border-color: var(--teal); color: var(--dark); }
.footer__links { display: flex; flex-wrap: wrap; gap: 16px; }
.footer__links a { text-decoration: none; color: var(--ink); }
.footer__links a:hover { color: var(--pink); }

.todo { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 28px 32px; }
.todo__label { color: var(--dim); font-size: 13px; margin: 0 0 16px; }
.todo label { display: flex; align-items: center; gap: 14px; font-weight: 700; font-size: 1.15rem; margin-bottom: 14px; }
.todo input {
  appearance: none; -webkit-appearance: none; flex: 0 0 26px; height: 26px; margin: 0;
  border: 3px solid var(--teal); border-radius: 7px; display: grid; place-items: center;
  transition: background .3s;
}
.todo input:checked { background: var(--teal); }
.todo input:checked::after { content: "✓"; color: var(--dark); font-weight: 800; font-size: 16px; }
.todo label:has(input:checked) { color: var(--dim); text-decoration: line-through; }
.todo__last { color: var(--yellow); }
.todo__last input { border-color: var(--yellow); }

.footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px;
  padding: 26px var(--gutter); font-size: 12px; color: var(--dim);
  border-top: 1px solid var(--line);
}

/* ─── Paleta de comandos (Ctrl + K) ─── */
kbd {
  font: 700 11px var(--mono);
  border: 1px solid currentColor; border-bottom-width: 2px; border-radius: 5px;
  padding: 1px 5px; opacity: .85;
}
.hud__cmd {
  display: inline-flex; align-items: center; gap: 8px;
  background: none; border: 1px solid currentColor; border-radius: 6px;
  padding: 5px 10px; font: 700 12px var(--mono);
}
.hud__cmd:hover { color: var(--pink); }
.cmd { position: fixed; inset: 0; z-index: 90; display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; }
.cmd__backdrop { position: absolute; inset: 0; background: rgba(8,8,12,.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade .2s both; }
.cmd__box {
  position: relative; width: min(640px, 100%);
  background: #17171d; color: var(--ink);
  border: 1px solid #2a2a33; border-radius: 16px; overflow: hidden;
  box-shadow: 0 40px 120px rgba(0,0,0,.6), 0 0 0 1px rgba(255,61,127,.25);
  animation: pop .25s cubic-bezier(.2,1.4,.4,1) both;
}
.cmd__search { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid #2a2a33; }
.cmd__prompt { color: var(--teal); font-size: 14px; white-space: nowrap; }
.cmd__search input { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: var(--ink); font-size: 16px; caret-color: var(--pink); }
.cmd__search input::placeholder { color: var(--dim); }
.cmd__esc { color: var(--dim); cursor: pointer; }
.cmd__list { list-style: none; margin: 0; padding: 8px; max-height: min(52vh, 420px); overflow-y: auto; }
.cmd__group { font: 11px var(--mono); color: var(--dim); letter-spacing: .08em; padding: 10px 12px 6px; }
.cmd__item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 10px; cursor: pointer;
  font-weight: 600;
}
.cmd__item[aria-selected="true"] { background: var(--pink); color: var(--dark); }
.cmd__icon { width: 30px; height: 30px; flex: 0 0 30px; display: grid; place-items: center; border-radius: 8px; background: #23232b; font-size: 15px; }
.cmd__item[aria-selected="true"] .cmd__icon { background: rgba(16,16,20,.15); }
.cmd__hint { margin-left: auto; font: 12px var(--mono); opacity: .6; }
.cmd__empty { padding: 26px 12px; text-align: center; color: var(--dim); font: 14px var(--mono); }
.cmd__foot { display: flex; gap: 18px; flex-wrap: wrap; padding: 10px 18px; border-top: 1px solid #2a2a33; font-size: 11px; color: var(--dim); }
.cmd__foot b { color: var(--yellow); font-weight: 700; }

/* Confeti del modo fiesta */
.confetti { position: fixed; top: -20px; z-index: 95; width: 10px; height: 16px; pointer-events: none; animation: fall linear forwards; }
@keyframes fall { to { transform: translate3d(var(--dx), 110vh, 0) rotate(var(--rot)); } }
@keyframes fade { from { opacity: 0; } }

/* ─── Así trabajo ─── */
.method { margin-top: 70px; }
.method__title { font: clamp(1.6rem, 3.5vw, 2.4rem)/1.1 var(--display); margin: 0 0 26px; }
.method__title span { display: block; font: 600 1.05rem var(--sans); color: #5d5a63; margin-top: 8px; }
.method__steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: step; position: relative; }
.method__steps::before {
  content: ""; position: absolute; left: 28px; right: 28px; top: 27px; height: 3px;
  background: repeating-linear-gradient(90deg, var(--dark) 0 10px, transparent 10px 18px);
  opacity: .25;
}
.step { position: relative; display: flex; flex-direction: column; gap: 8px; }
.step__num {
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--dark); color: var(--yellow); font-size: 18px; font-weight: 700;
  box-shadow: 0 0 0 6px var(--cream);
  transition: transform .3s, background .3s, color .3s;
}
.step:nth-child(2) .step__num { color: var(--pink); }
.step:nth-child(3) .step__num { color: var(--teal); }
.step:nth-child(4) .step__num { color: #8ea0ff; }
.step:hover .step__num { transform: scale(1.12) rotate(-6deg); background: var(--pink); color: var(--dark); }
.step__name { font: 1.35rem var(--display); margin-top: 6px; }
.step__text { color: #4a4750; font-size: .97rem; line-height: 1.45; }

.project__result {
  align-self: flex-start;
  background: rgba(25,195,166,.15); color: var(--teal);
  border: 1px solid var(--teal); border-radius: 8px;
  padding: 4px 10px; font-size: 13px; font-weight: 700;
}

/* ─── «Pregúntale a la IA» ─── */
@property --spin-a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.ai {
  position: fixed; right: 16px; bottom: 20px; z-index: 80; /* ordenador: abajo a la derecha (en móvil, a la izquierda) */
  display: flex; flex-direction: column; align-items: flex-end; gap: 12px;
  pointer-events: none;
}
.ai > * { pointer-events: auto; }
body.is-booting .ai { display: none; }

/* Botón flotante: borde de colores girando + brillo */
.ai__fab {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px 14px 16px; border-radius: 999px;
  font: 800 1rem var(--sans); color: var(--ink);
  border: 2px solid transparent;
  background:
    linear-gradient(#17171d, #17171d) padding-box,
    conic-gradient(from var(--spin-a), var(--pink), var(--yellow), var(--teal), var(--cobalt), var(--pink)) border-box;
  box-shadow: 0 12px 34px rgba(255,61,127,.35), 0 0 0 0 rgba(255,61,127,.45);
  animation: spin-border 4s linear infinite, glow 2.8s ease-in-out infinite;
  transition: transform .25s cubic-bezier(.2,1.6,.4,1);
  position: relative;
}
.ai__fab:hover { transform: translateY(-3px) scale(1.04); }
/* Botón redondo con la estrella (no tapa contenido ni choca con el sello de Netlify).
   La etiqueta «Pregúntale a la IA» asoma encima al entrar (.is-peek) y al pasar el ratón. */
.ai__fab { width: 58px; height: 58px; padding: 0; gap: 0; justify-content: center; }
.ai__spark { width: 36px; height: 36px; font-size: 18px; }
.ai__fab-text {
  position: absolute; right: 0; bottom: calc(100% + 10px);
  white-space: nowrap;
  background: #fff; color: var(--dark);
  font: 800 .88rem var(--sans);
  padding: 7px 12px; border-radius: 12px 12px 4px 12px;
  box-shadow: 0 10px 26px rgba(0,0,0,.3);
  opacity: 0; transform: translateY(6px) scale(.9); transform-origin: bottom right;
  pointer-events: none;
  transition: opacity .3s ease, transform .35s cubic-bezier(.2,1.5,.4,1);
}
.ai__fab.is-peek .ai__fab-text { opacity: 1; transform: none; }
@media (hover: hover) { .ai__fab:hover .ai__fab-text { opacity: 1; transform: none; } }
.ai.is-open .ai__fab-text, .ai:has(.ai__teaser:not([hidden])) .ai__fab-text { display: none; }
/* Puntito de «notificación» hasta que se abre el chat */
.ai__dot {
  position: absolute; top: -2px; right: -2px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--pink); border: 3px solid var(--dark);
  animation: ping-pink 1.8s infinite;
}
.ai.was-opened .ai__dot { display: none; }
/* El botón aparece al empezar a bajar (en la portada ya están «Hablemos» y «Ver trayectoria») */
.ai__fab { transition: opacity .35s ease, transform .4s cubic-bezier(.2,1.6,.4,1); }
.ai:not(.is-ready) .ai__fab { opacity: 0; transform: scale(.4); pointer-events: none; }
/* Si está el sello «Powered by Netlify» (abajo a la derecha), el chat se coloca justo encima */
body.has-nl-badge .ai { bottom: 84px; }
body.has-nl-badge .ai__panel { height: min(560px, calc(100vh - 200px)); }
@keyframes ping-pink { 0% { box-shadow: 0 0 0 0 rgba(255,61,127,.7); } 70%, 100% { box-shadow: 0 0 0 9px rgba(255,61,127,0); } }
.ai__spark {
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--pink), var(--cobalt));
  font-size: 15px; color: #fff;
  animation: twinkle 2.4s ease-in-out infinite;
}
.ai.is-open .ai__fab { animation: spin-border 4s linear infinite; box-shadow: 0 10px 26px rgba(0,0,0,.35); }

/* Aviso flotante */
.ai__teaser {
  position: relative; max-width: 270px;
  background: #fff; color: var(--dark);
  border-radius: 18px 18px 6px 18px;
  box-shadow: 0 18px 50px rgba(0,0,0,.35);
  animation: pop .4s cubic-bezier(.2,1.6,.4,1) both;
}
.ai__teaser-body {
  display: flex; gap: 10px; align-items: flex-start; text-align: left;
  background: none; border: 0; padding: 14px 34px 14px 16px; font-size: .95rem; color: inherit;
}
.ai__teaser-body b { display: block; color: var(--pink); }
.ai__wave { font-size: 22px; display: inline-block; transform-origin: 70% 80%; animation: wave 1.8s ease-in-out infinite; }
.ai__teaser-close {
  position: absolute; top: 6px; right: 6px;
  width: 26px; height: 26px; border-radius: 50%; border: 0;
  background: #f0eef3; color: #5d5a63; font-size: 11px;
}

/* Panel */
.ai__panel {
  width: 380px; height: min(580px, calc(100vh - 140px));
  display: flex; flex-direction: column;
  background: #141419; color: var(--ink);
  border: 1px solid #2a2a33; border-radius: 22px; overflow: hidden;
  box-shadow: 0 40px 100px rgba(0,0,0,.55), 0 0 0 1px rgba(255,61,127,.2);
  animation: pop .3s cubic-bezier(.2,1.4,.4,1) both;
  transform-origin: bottom right;
}
.ai__head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 14px 14px 16px;
  background: linear-gradient(120deg, rgba(255,61,127,.22), rgba(47,75,255,.22));
  border-bottom: 1px solid #2a2a33;
}
.ai__avatar {
  width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%;
  display: grid; place-items: center; color: #fff; font-size: 18px;
  background: conic-gradient(from var(--spin-a), var(--pink), var(--yellow), var(--teal), var(--cobalt), var(--pink));
  animation: spin-border 6s linear infinite;
  box-shadow: inset 0 0 0 3px #141419;
}
.ai__title { flex: 1; min-width: 0; line-height: 1.25; }
.ai__title b { display: block; font: .98rem var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai__title small { display: flex; align-items: center; gap: 6px; color: #b9b6c3; font-size: .78rem; }
.ai__online { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 8px var(--teal); flex: 0 0 7px; }
.ai__progress {
  --p: 0%;
  position: relative; overflow: hidden;
  font-size: 12px; font-weight: 700; padding: 5px 9px; border-radius: 999px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14);
}
.ai__progress::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: var(--p); background: var(--yellow); transition: width .5s; }
.ai__progress.is-bump { animation: pop .45s cubic-bezier(.2,1.8,.4,1); }
.ai__close { width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255,255,255,.08); color: var(--ink); font-size: 14px; }
.ai__close:hover { background: var(--pink); color: var(--dark); }

/* Conversación */
.ai__log {
  flex: 1; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
  scrollbar-width: thin; scrollbar-color: #2c2c35 transparent;
  overscroll-behavior: contain;
}
.ai__msg { max-width: 88%; padding: 10px 14px; font-size: .94rem; line-height: 1.45; animation: msg-in .3s ease both; }
.ai__msg ul, .ai__msg ol { margin: 6px 0 0; padding-left: 18px; }
.ai__msg li { margin-bottom: 3px; }
.ai__msg small { color: var(--dim); }
.ai__msg--bot { align-self: flex-start; background: #22222b; border-radius: 16px 16px 16px 4px; }
.ai__msg--bot b { color: #fff; }
.ai__msg--user { align-self: flex-end; background: var(--pink); color: var(--dark); font-weight: 600; border-radius: 16px 16px 4px 16px; }
.ai__typing { display: inline-flex; gap: 4px; padding: 4px 2px; }
.ai__typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); animation: typing 1s infinite ease-in-out; }
.ai__typing i:nth-child(2) { animation-delay: .15s; }
.ai__typing i:nth-child(3) { animation-delay: .3s; }
.ai__actions, .ai__chips { display: flex; flex-wrap: wrap; gap: 6px; animation: msg-in .3s ease both; }
.ai__action {
  border: 0; border-radius: 10px; padding: 8px 12px;
  background: var(--yellow); color: var(--dark); font: 700 .84rem var(--sans);
  transition: transform .15s, background .15s;
}
.ai__action:hover { transform: translateY(-2px); background: #ffe07a; }
.ai__chips { justify-content: flex-end; margin-top: 2px; }
.ai__chip {
  border: 1.5px solid var(--teal); border-radius: 999px; padding: 7px 12px;
  background: transparent; color: var(--teal); font: 700 .84rem var(--sans);
  transition: background .15s, color .15s;
}
.ai__chip:hover { background: var(--teal); color: var(--dark); }
.ai__chip.is-seen { border-color: #3a3a45; color: var(--dim); }

.ai__form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid #2a2a33; background: #17171d; }
.ai__form input {
  flex: 1; min-width: 0;
  background: var(--dark); color: var(--ink);
  border: 2px solid #2c2c35; border-radius: 12px; padding: 11px 14px;
  font: 500 .95rem var(--sans);
}
.ai__form input:focus { outline: none; border-color: var(--pink); }
.ai__send { width: 46px; flex: 0 0 46px; border: 0; border-radius: 12px; background: var(--pink); color: var(--dark); font-size: 17px; }
.ai__send:hover { background: var(--yellow); }

@keyframes spin-border { to { --spin-a: 360deg; } }
@keyframes glow { 50% { box-shadow: 0 12px 34px rgba(255,61,127,.45), 0 0 0 10px rgba(255,61,127,0); } }
@keyframes twinkle { 50% { transform: rotate(20deg) scale(1.15); } }
@keyframes wave { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(16deg); } 20%, 40% { transform: rotate(-10deg); } }
@keyframes typing { 0%, 80%, 100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-5px); opacity: 1; } }
@keyframes msg-in { from { opacity: 0; transform: translateY(8px); } }

/* ─── Toast "logro desbloqueado" ─── */
.toast {
  position: fixed; left: 24px; bottom: 24px; z-index: 85;
  display: flex; align-items: center; gap: 14px;
  background: var(--card); color: var(--ink);
  border: 3px solid var(--yellow); border-radius: 16px;
  padding: 14px 20px; max-width: min(380px, calc(100vw - 32px));
  transform: translateY(150%); opacity: 0;
  transition: transform .5s cubic-bezier(.2,1.4,.4,1), opacity .3s;
}
.toast.is-on { transform: none; opacity: 1; }
.toast__star { font-size: 30px; color: var(--yellow); }
.toast small { display: block; font: 11px var(--mono); color: var(--yellow); letter-spacing: .06em; }
.toast b { font-size: 1rem; }

/* ─── Animaciones ─── */
@keyframes drop { from { transform: translateY(70%) scaleY(.6); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes band { from { transform: rotate(-2deg) scaleX(0); } to { transform: rotate(-2deg) scaleX(1); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes pop { from { transform: scale(.85); } to { transform: scale(1); } }
@keyframes ping { 70% { box-shadow: 0 0 0 10px rgba(25,195,166,0); } 100% { box-shadow: 0 0 0 0 rgba(25,195,166,0); } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes burst { 0% { opacity: 0; transform: scale(.3); } 25% { opacity: 1; transform: scale(1.15); } 60% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.1); } }

/* ─── Responsive ─── */
@media (max-width: 1080px) {
  .hud__nav a[href="#habilidades"] { display: none; }
}
@media (max-width: 900px) {
  .hud__nav a[href="#carrera"] { display: none; }
  .hero__grid, .video, .contact__grid { grid-template-columns: 1fr; }
  .post { justify-self: center; transform: rotate(2deg); max-width: 380px; }
  .facts, .edu, .extras { grid-template-columns: 1fr; }
  .method__steps { grid-template-columns: 1fr 1fr; gap: 28px 18px; }
  .method__steps::before { display: none; }
  .hud__scene { display: none; }
  .hud { justify-content: space-between; }
  .stamp { position: relative; top: auto; margin: 40px 0 0 auto; transform: rotate(calc(-14deg + var(--spin, 0deg))); }
  .manifesto { min-height: auto; }
}
@media (max-width: 600px) {
  :root { --hud-h: 52px; }
  body { font-size: 16px; }
  .hud__nav a:not(.hud__print) { display: none; }
  .hud__cmd kbd { display: none; }
  .cmd { padding-top: 10vh; }
  .cmd__foot span:nth-child(-n+2) { display: none; }
  .scene { padding-top: calc(var(--hud-h) + 44px); padding-bottom: 80px; }
  .hero { padding-bottom: 110px; }
  .fact { padding: 22px; gap: 18px; }
  .fact--wide { flex-wrap: wrap; gap: 8px 18px; }
  .job { padding: 26px 22px; flex-basis: 88%; }
  .badge { position: static; display: inline-block; margin-bottom: 10px; }
  .career__arrows { display: none; }
  .rail__dot { font-size: 11px; }
  .ticket { padding: 20px; gap: 16px; }
  .todo { padding: 22px; }
  .channel__link b { font-size: .98rem; }
  .channel__icon { width: 40px; height: 40px; flex-basis: 40px; }
  .form__grid { grid-template-columns: 1fr; }
  .form__foot .btn { width: 100%; justify-content: center; }
  .method__steps { grid-template-columns: 1fr; }
  .step { flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: 14px; }
  .step__name { margin-top: 0; }
  .step__text { flex-basis: 100%; }
  .busco { padding: 20px; }
  .busco__info div { flex-direction: column; gap: 2px; }
  .busco__info dd { text-align: left; }
  .toast { left: auto; right: 12px; bottom: 80px; }
  .ai { right: 12px; bottom: 12px; left: 12px; align-items: flex-start; }
  .ai__fab-text { right: auto; left: 0; border-radius: 12px 12px 12px 4px; transform-origin: bottom left; }
  .ai__teaser { border-radius: 18px 18px 18px 6px; }
  .ai__panel { transform-origin: bottom left; }
  body.has-nl-badge .ai { bottom: 12px; } /* en móvil va a la izquierda: no choca con el sello */
  body.has-nl-badge .ai__panel { height: min(72vh, calc(100vh - 100px)); }
  .ai__panel { width: 100%; height: min(72vh, calc(100vh - 100px)); border-radius: 20px; }
  .ai__title small { font-size: .72rem; }
  .ai__head { gap: 9px; padding: 12px 10px 12px 12px; }
  .ai__avatar { width: 34px; height: 34px; flex-basis: 34px; font-size: 15px; }
  .ai__title b { font-size: .86rem; }
  .ai__progress { font-size: 11px; padding: 4px 7px; }
  .ai__close { width: 30px; height: 30px; }
  .ai__msg { max-width: 92%; }
  .lightbox__nav { top: auto; bottom: 18px; translate: none; width: 46px; height: 46px; }
  .lightbox__media img, .lightbox__media video { max-height: 70vh; max-width: 92vw; }
  .project__body { padding: 18px 18px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-delay: 0s !important; transition-duration: .001s !important; }
  html { scroll-behavior: auto; }
  .reveal, .skill { opacity: 1; transform: none; }
}

/* ==========================================================
   Versión impresa / PDF: un CV clásico y limpio
   ========================================================== */
@media print {
  @page { margin: 14mm; }
  body { background: #fff; color: #111; font-size: 10.5pt; line-height: 1.4; }
  .boot, .hud, .cmd, .confetti, .lightbox, .ai, #offline, .marquee, .post, .hero__cta, .status, .caret, #video, #manifiesto,
  .career__arrows, .rail, .filters, .evidence, .todo, .channels, .contact__cv, .form, .method, .busco, .toast, .source, .job__note, .footer, .badge, .contact .hero__cta { display: none !important; }
  .scene { background: #fff !important; color: #111 !important; padding: 0 0 10pt !important; min-height: 0 !important; display: block !important; }
  .hero::before { display: none; }
  .reveal, .skill { opacity: 1 !important; transform: none !important; }
  .title { font-size: 15pt; margin: 10pt 0 6pt; border-bottom: 2px solid #ff3d7f; padding-bottom: 3pt; }
  .no-print { display: none !important; }
  .hero__grid { display: block; }
  .name__first { font-size: 34pt; }
  .name__first span { animation: none; }
  .name__band { font-size: 14pt; padding: 3pt 10pt; animation: none; transform: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .hero__role { margin: 8pt 0; font-size: 11pt; }
  .facts { grid-template-columns: repeat(4, 1fr); gap: 6pt; }
  .fact { background: none; color: #111; border: 1px solid #ddd; padding: 6pt; display: block; border-radius: 6pt; }
  .fact > b { font-size: 16pt; color: #ff3d7f; }
  .fact strong { font-size: 10pt; display: inline; }
  .fact small { display: block; color: #555; font-size: 8pt; }
  .track { display: block; overflow: visible; padding: 0; }
  .job { background: none; border: 0; border-left: 3px solid #ff3d7f; border-radius: 0; padding: 0 0 0 10pt; margin-bottom: 8pt; break-inside: avoid; }
  .job__year { font-size: 12pt; display: inline; color: #ff3d7f; margin-right: 6pt; }
  .job h3 { display: inline; font-size: 11.5pt; }
  .job__org { color: #555; margin: 2pt 0; }
  .job ul { margin: 0; }
  .job li { margin: 0; }
  .skills { gap: 4pt; }
  .skill { border: 1px solid #999 !important; background: none !important; color: #111 !important; padding: 2pt 8pt; font-size: 9pt; }
  .edu { grid-template-columns: 1fr 1fr; gap: 6pt; }
  .ticket { box-shadow: none; border: 1px solid #ddd; padding: 6pt; break-inside: avoid; }
  .ticket__year { writing-mode: horizontal-tb; transform: none; border: 0; padding: 0; font-size: 11pt; }
  .ticket h3 { font-size: 10.5pt; }
  .extras { grid-template-columns: repeat(3, 1fr); gap: 6pt; }
  .extras__title { font-size: 11pt; margin: 8pt 0 4pt; }
  .extra { background: none; color: #111; border: 1px solid #ddd; padding: 6pt; }
  .extra__icon { display: none; }
  .extra small { color: #555; }
  .hero__about { color: #333; margin: 0 0 6pt; }
  .projects { display: block; }
  .projects__intro, .project__media, .project__tags, .project__doc { display: none !important; }
  .project { display: block; background: none; color: #111; box-shadow: none; border-left: 3px solid #ff3d7f; border-radius: 0; margin-bottom: 6pt; break-inside: avoid; }
  .project__body { padding: 0 0 0 10pt; gap: 1pt; }
  .project__title { font-size: 11pt; }
  .project__meta, .project__text { color: #444; font-size: 9.5pt; }
  .contact { min-height: 0; }
  .contact__name, .contact .name__band { display: none; }
  .contact__role { display: none; }
  .print-contact { display: block !important; font-size: 10pt; margin-top: 8pt; }
}
.print-contact { display: none; }
