/* ==========================================================================
   Jaime® — Portfolio creativo
   ========================================================================== */

:root {
  --bg: #0a0a0a;
  --bg-soft: #101011;
  --fg: #f4f2ee;
  --muted: #8b8b86;
  --line: rgba(244, 242, 238, 0.14);
  --line-soft: rgba(244, 242, 238, 0.08);
  --accent: #bcff4d;

  --font-display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --font-ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --pad: clamp(20px, 5vw, 80px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.has-cursor {
  cursor: none;
}

body.has-cursor a,
body.has-cursor button {
  cursor: none;
}

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

ul {
  list-style: none;
}

sup {
  font-size: 0.42em;
  vertical-align: super;
  line-height: 1;
}

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

/* ——— Grain overlay ——— */
.grain {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ——— Scroll progress ——— */
.progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 90;
  height: 2px;
  width: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  pointer-events: none;
}

/* ——— Magnetic ——— */
.magnetic {
  will-change: transform;
}

/* ——— Shared bits ——— */
.label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.muted {
  color: var(--muted);
}

.strong {
  font-weight: 500;
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 0 var(--pad);
  margin-bottom: clamp(32px, 5vw, 64px);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(30px, 4.5vw, 58px);
  line-height: 1;
  letter-spacing: -0.01em;
}

.section-count {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.06em;
}

/* ——— Nav ——— */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px var(--pad);
  font-size: 14px;
  transition: background 0.4s ease, backdrop-filter 0.4s ease, padding 0.4s ease;
}

.nav.is-stuck {
  background: rgba(10, 10, 10, 0.72);
  backdrop-filter: blur(14px);
  padding-top: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line-soft);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  gap: 4px;
}

.nav-links a {
  position: relative;
  color: var(--muted);
  transition: color 0.3s ease;
  white-space: nowrap;
}

.nav-links a::after {
  content: ",";
  color: var(--muted);
}

.nav-links a:last-child::after {
  content: "";
}

.nav-links a:hover {
  color: var(--fg);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #0a0a0a;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.3s ease, transform 0.3s var(--ease);
}

.nav-cta::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #0a0a0a;
  animation: blink 2.4s ease-in-out infinite;
}

.nav-cta:hover {
  background: var(--fg);
}

/* ——— Botones de contacto ——— */
.hero-actions {
  justify-self: end;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-talk,
.talk-float {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #0a0a0a;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.3s ease;
}

.hero-talk:hover,
.talk-float:hover {
  background: var(--fg);
}

.hero-talk .arr,
.talk-float .arr {
  transition: transform 0.35s var(--ease);
}

.hero-talk:hover .arr,
.talk-float:hover .arr {
  transform: translateX(4px);
}

/* Fijo abajo en móvil: aparece al pasar la portada y se va en Contacto */
.talk-float {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 70;
  display: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s var(--ease), background 0.3s ease;
}

.talk-float.is-on {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

body.chat-open .talk-float {
  opacity: 0;
  pointer-events: none;
}

.talk {
  background-image: linear-gradient(
    110deg,
    transparent 38%,
    rgba(255, 255, 255, 0.7) 50%,
    transparent 62%
  );
  background-size: 260% 100%;
  background-repeat: no-repeat;
  background-position: 160% 0;
  animation: talk-shine 5s ease-in-out infinite, talk-pulse 2.6s ease-out infinite;
}

.talk:hover {
  animation: none;
}

.talk-label {
  display: inline-grid;
  justify-items: center;
  overflow: hidden;
}

.talk-label > span,
.talk-label::after {
  grid-area: 1 / 1;
  white-space: nowrap;
  transition: transform 0.45s var(--ease);
}

.talk-label::after {
  content: attr(data-alt);
  transform: translateY(110%);
}

.talk:hover .talk-label > span {
  transform: translateY(-110%);
}

.talk:hover .talk-label::after {
  transform: none;
}

@keyframes talk-shine {
  0%,
  62% {
    background-position: 160% 0;
  }
  86%,
  100% {
    background-position: -60% 0;
  }
}

@keyframes talk-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(188, 255, 77, 0.55);
  }
  70%,
  100% {
    box-shadow: 0 0 0 14px rgba(188, 255, 77, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .talk {
    animation: none;
  }
}

/* ——— Hero ——— */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 140px var(--pad) clamp(28px, 4vw, 52px);
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 70vmax;
  height: 70vmax;
  background: radial-gradient(
    circle at center,
    rgba(188, 255, 77, 0.16),
    transparent 62%
  );
  filter: blur(36px);
  pointer-events: none;
  transform: translate3d(
    calc(var(--gx, 50%) - 50%),
    calc(var(--gy, 35%) - 50%),
    0
  );
  transition: opacity 0.5s ease;
  will-change: transform;
  opacity: 0.9;
}

.hero-glow.is-away {
  opacity: 0.45;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(50px, 11.5vw, 178px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: clamp(40px, 7vw, 96px);
}

.hero-title em,
.contact-title em,
.about-lead em {
  font-style: italic;
}

.rotator {
  display: inline-block;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease),
    filter 0.35s ease;
}

.rotator.is-out {
  opacity: 0;
  transform: translateY(-24%) rotate(-1.5deg);
  filter: blur(6px);
}

.line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.18em; /* hueco para la g, y, p… (Instrument Serif) */
  margin-bottom: -0.1em;
}

.line > span {
  display: block;
  transform: translateY(105%);
  animation: line-up 1.1s var(--ease) forwards;
}

.line:nth-child(1) > span { animation-delay: 0.15s; }
.line:nth-child(2) > span { animation-delay: 0.28s; }

.hero-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  align-items: end;
  gap: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  animation: fade-in 1s 0.7s var(--ease) both;
}

.hero-meta-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: blink 2.4s ease-in-out infinite;
}

.hero-scroll {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--fg);
  font-family: inherit;
  font-size: 13px;
  letter-spacing: 0.02em;
  cursor: pointer;
  overflow: hidden;
  position: relative;
  transition: color 0.4s var(--ease), border-color 0.4s ease;
}

.hero-scroll::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: translateY(101%);
  transition: transform 0.45s var(--ease);
  z-index: -1;
}

.hero-scroll:hover {
  color: #0a0a0a;
  border-color: var(--accent);
}

.hero-scroll:hover::before {
  transform: translateY(0);
}

.hero-scroll .arr {
  animation: bob 1.6s ease-in-out infinite;
}

/* ——— Objeto 3D del hero ——— */
.hero-3d {
  position: absolute;
  top: 50%;
  right: -4vw;
  width: min(54vw, 660px);
  aspect-ratio: 1;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  animation: fade-in-soft 1.6s 0.4s var(--ease) forwards;
}

.hero-3d canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-title,
.hero-meta {
  position: relative;
  z-index: 2;
}

/* ——— Anillo 3D de servicios ——— */
.ring {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: center;
  padding: clamp(50px, 7vw, 92px) var(--pad);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
  overflow: hidden;
}

.ring-side .label {
  display: block;
  margin-bottom: 10px;
}

.ring-hint {
  font-size: 13px;
  color: var(--muted);
}

.ring-hint::before {
  content: "↕ ";
  color: var(--accent);
}

.ring-stage {
  height: clamp(190px, 28vh, 280px);
  display: grid;
  place-items: center;
  perspective: 1000px;
  cursor: grab;
  touch-action: pan-y;
}

.ring-stage.is-grabbing {
  cursor: grabbing;
}

.ring-drum {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}

.ring-word {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  display: flex;
  align-items: center;
  gap: 18px;
  font-family: var(--font-display);
  font-size: clamp(34px, 6vw, 88px);
  line-height: 1;
  white-space: nowrap;
  backface-visibility: hidden;
  will-change: transform, opacity;
}

.ring-word .n {
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--accent);
  align-self: flex-start;
  padding-top: 0.5em;
}

.ring-word.is-front {
  color: var(--fg);
}

/* ——— Work ——— */
.work {
  padding: clamp(50px, 6vw, 90px) 0 clamp(50px, 6vw, 90px);
}

.work-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 0 var(--pad);
  margin-bottom: clamp(28px, 4vw, 52px);
}

.work-hint {
  font-size: 13px;
  color: var(--muted);
}

.work-hint::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: 3px;
}

.cases {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(22px, 3vw, 48px) clamp(18px, 2.4vw, 34px);
  padding: 0 var(--pad);
}

.case {
  display: block;
  --tint: #555;
}

.case-window {
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0d0d0d;
  transition: border-color 0.6s ease, transform 0.8s var(--ease);
}

.case:hover .case-window {
  border-color: rgba(244, 242, 238, 0.32);
  transform: translateY(-4px);
}

.case-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 36px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(244, 242, 238, 0.035);
}

.case-dots {
  display: flex;
  gap: 6px;
  flex: none;
}

.case-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(244, 242, 238, 0.16);
  transition: background 0.5s ease;
}

.case:hover .case-dots i:first-child {
  background: var(--tint);
}

.case-url {
  overflow: hidden;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.case-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #101010;
}

.case-scroll {
  position: absolute;
  top: 0;
  left: 0;
  width: 1440px;
  height: 900px;
  transform-origin: top left;
  transform: scale(var(--s, 0.4));
}

.case-scroll iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  pointer-events: none;
}

.case-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  pointer-events: none;
}

.case.has-poster .case-scroll {
  width: 100%;
  height: 100%;
  transform: none;
}

.case-media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(
    circle at var(--mx, 70%) var(--my, 20%),
    var(--tint),
    transparent 58%
  );
  opacity: 0;
  mix-blend-mode: screen;
  transition: opacity 0.45s ease;
  pointer-events: none;
}

.case:hover .case-media::before,
.case:focus-visible .case-media::before {
  opacity: 0.22;
}

.case-badge {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(10, 10, 10, 0.72);
  backdrop-filter: blur(10px);
  font-size: 12px;
  letter-spacing: 0.02em;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

.case-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: blink 2.4s ease-in-out infinite;
}

.case:hover .case-badge {
  opacity: 1;
  transform: translateY(0);
}

/* Sin iframe: una trama ligera, no cinco webs dentro */
.case.is-still .case-media {
  background:
    radial-gradient(circle at 72% 18%, color-mix(in srgb, var(--tint) 28%, transparent), transparent 58%),
    repeating-conic-gradient(from 0deg, rgba(244, 242, 238, 0.05) 0% 25%, transparent 0% 50%);
  background-size: auto, 6px 6px;
}

.case.is-still .case-media::after {
  content: attr(data-host);
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  padding: 24px;
  font-family: var(--font-display);
  font-size: clamp(28px, 3.4vw, 48px);
  letter-spacing: -0.02em;
  color: color-mix(in srgb, var(--tint) 72%, var(--fg));
  text-align: center;
  pointer-events: none;
}

.case.has-poster .case-media::after {
  display: none;
}

.case.is-still .case-badge {
  opacity: 1;
  transform: none;
}

.case-info {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 6px 16px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  transition: border-color 0.5s ease;
}

.case:hover .case-info {
  border-color: var(--line);
}

.case-index {
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.case-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(26px, 3.4vw, 46px);
  line-height: 1;
  letter-spacing: -0.015em;
  transition: transform 0.55s var(--ease);
}

.case:hover .case-name {
  transform: translateX(8px);
}

.case-tags {
  grid-column: 2;
  font-size: 13px;
  color: var(--muted);
}

.case-year {
  grid-row: 1;
  grid-column: 3;
  font-size: 13px;
  color: var(--muted);
}

/* ——— Franja de trabajo real ——— */
.about {
  overflow-x: clip;
}

.band {
  overflow: hidden;
  background: var(--accent);
  color: #0a0a0a;
  transform: rotate(-1.2deg);
  margin: 12px -2vw 0;
  padding: clamp(14px, 1.8vw, 22px) 0;
}

.band-track {
  display: flex;
  width: max-content;
  animation: band-run 38s linear infinite;
}

.band:hover .band-track {
  animation-play-state: paused;
}

.band-set {
  display: flex;
  align-items: center;
  gap: clamp(22px, 3vw, 44px);
  padding-right: clamp(22px, 3vw, 44px);
  font-family: var(--font-display);
  font-size: clamp(30px, 4.6vw, 68px);
  line-height: 1;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.band-set em {
  font-style: italic;
}

.band-set i {
  width: 0.22em;
  height: 0.22em;
  background: #0a0a0a;
  flex: none;
}

@keyframes band-run {
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .band-track {
    animation: none;
  }
}

/* ——— Services / FAQ accordion ——— */
.services,
.faq {
  padding: clamp(56px, 7vw, 100px) 0 clamp(40px, 5vw, 70px);
}

.acc-list {
  border-top: 1px solid var(--line);
}

.acc {
  border-bottom: 1px solid var(--line);
}

.acc-head {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) minmax(0, 0.8fr) 32px;
  align-items: center;
  gap: 20px;
  width: 100%;
  padding: clamp(22px, 2.4vw, 32px) var(--pad);
  background: none;
  border: 0;
  color: inherit;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.4s ease;
}

.acc-head:hover {
  background: rgba(244, 242, 238, 0.03);
}

.faq .acc-head {
  grid-template-columns: minmax(0, 1fr) 32px;
}

.acc-index {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.acc-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.9vw, 40px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  transition: transform 0.5s var(--ease);
}

.acc-head:hover .acc-title {
  transform: translateX(12px);
}

.acc-meta {
  font-size: 13px;
  color: var(--muted);
}

.acc-icon {
  position: relative;
  justify-self: end;
  width: 18px;
  height: 18px;
}

.acc-icon::before,
.acc-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--fg);
  transition: transform 0.45s var(--ease);
}

.acc-icon::after {
  transform: rotate(90deg);
}

.acc.is-open .acc-icon::after {
  transform: rotate(0deg);
}

.acc.is-open .acc-title {
  color: var(--accent);
}

.acc-panel {
  height: 0;
  overflow: hidden;
  transition: height 0.55s var(--ease);
}

.acc-inner {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 20px;
  padding: 0 var(--pad) clamp(28px, 3vw, 40px);
}

.faq .acc-inner {
  grid-template-columns: minmax(0, 1fr);
}

.acc-inner p {
  grid-column: 2;
  max-width: 58ch;
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted);
}

.faq .acc-inner p {
  grid-column: 1;
}

.tags {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.tags li {
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
}

/* ——— Proceso ——— */
.process {
  padding: clamp(50px, 6vw, 90px) 0 clamp(50px, 6vw, 90px);
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
}

.step {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(26px, 3vw, 44px) clamp(20px, 2.4vw, 34px) clamp(40px, 5vw, 64px);
  background: var(--bg);
  transition: background 0.5s ease;
}

.step:hover {
  background: var(--bg-soft);
}

.step-num {
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.1em;
}

.step h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(21px, 2.2vw, 30px);
  line-height: 1.1;
}

.step p {
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
}

/* ——— IA: cuatro escenas fijadas al scroll ——— */
.ia {
  position: relative;
  height: 400vh;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  background: var(--bg);
}

.ia-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.85fr);
  overflow: hidden;
}

.ia-stage {
  position: relative;
  min-width: 0;
  background: #080808;
  border-right: 1px solid var(--line-soft);
}

.ia-canvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  cursor: crosshair;
}

.ia-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 clamp(28px, 4vw, 72px);
  min-width: 0;
}

.ia-index {
  margin: 18px 0 0;
  font-family: var(--font-display);
  font-size: clamp(42px, 5vw, 72px);
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}

.ia-slides {
  display: grid;
  margin-top: clamp(18px, 2.4vw, 32px);
  min-height: 168px;
}

.ia-slide {
  grid-area: 1 / 1;
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}

.ia-slide.is-on {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.ia-slide h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(28px, 3.2vw, 48px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.ia-slide p {
  margin: 14px 0 0;
  font-size: clamp(15px, 1.15vw, 17px);
  line-height: 1.55;
  color: var(--muted);
  max-width: 38ch;
}

.ia-pips {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: clamp(28px, 3.4vw, 48px) 0 0;
  padding: 0;
  list-style: none;
}

.ia-pips li {
  width: 6px;
  height: 6px;
  background: var(--line);
  transition: width 0.45s var(--ease), background 0.35s ease;
}

.ia-pips li.is-on {
  width: 28px;
  background: var(--accent);
}

.ia-foot {
  margin: clamp(22px, 2.8vw, 36px) 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  font-size: 13px;
  color: var(--muted);
}

/* ——— Interludio 3D ——— */
.wave {
  position: relative;
  height: clamp(420px, 66vh, 640px);
  overflow: hidden;
  background: var(--bg);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.wave-stage {
  position: absolute;
  inset: 0;
  cursor: crosshair;
}

.wave-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* Velo para que el texto se lea por encima de las barras */
.wave::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 62%;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(10, 10, 10, 0.94) 0%,
    rgba(10, 10, 10, 0.72) 42%,
    rgba(10, 10, 10, 0) 100%
  );
  pointer-events: none;
}

.wave-copy {
  position: absolute;
  top: clamp(84px, 9vw, 120px);
  left: var(--pad);
  right: var(--pad);
  z-index: 2;
  display: grid;
  gap: 12px;
  pointer-events: none;
}

.wave-kicker {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

.wave-line {
  max-width: 16ch;
  font-family: var(--font-display);
  font-size: clamp(30px, 4.4vw, 62px);
  line-height: 1.05;
  letter-spacing: -0.015em;
}

.wave-line em {
  font-style: italic;
  color: var(--muted);
}

.wave-hint {
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* ——— About ——— */
.about {
  padding: clamp(52px, 6.5vw, 96px) 0 0;
  background: var(--bg-soft);
  border-top: 1px solid var(--line-soft);
}

.about-lead {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.4vw, 50px);
  line-height: 1.12;
  letter-spacing: -0.01em;
}

/* Declaración grande: cada línea sube desde abajo al entrar */
.about-say {
  padding: 0 var(--pad) clamp(36px, 4.6vw, 70px);
  font-family: var(--font-display);
  font-size: clamp(30px, 6vw, 96px);
  line-height: 1.04;
  letter-spacing: -0.025em;
}

.about-say em {
  font-style: italic;
  color: var(--accent);
}

.say {
  display: block;
  overflow: hidden;
}

.say > span {
  display: block;
  transform: translateY(105%);
  transition: transform 1.1s var(--ease);
}

.about-say.is-in .say > span {
  transform: none;
}

.about-say.is-in .say:nth-child(2) > span {
  transition-delay: 0.1s;
}

.about-say.is-in .say:nth-child(3) > span {
  transition-delay: 0.2s;
}

/* ——— Bola con dithering ——— */
.about-main {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(14px, 1.8vw, 24px);
  padding: 0 var(--pad) clamp(44px, 6vw, 88px);
  align-items: stretch;
}

.dither {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #080808;
  transition: border-color 0.5s ease;
}

.dither:hover {
  border-color: rgba(188, 255, 77, 0.3);
}

.dither-stage {
  flex: 1;
  min-height: clamp(260px, 34vw, 420px);
  cursor: crosshair;
}

.dither-next {
  font-family: inherit;
  font-size: 12px;
  color: var(--muted);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: color 0.3s ease;
}

.dither-next::after {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-left: 9px;
  border-radius: 50%;
  background: currentColor;
  vertical-align: 2px;
  transition: background 0.3s ease;
}

.dither:hover .dither-next,
.dither-next:hover,
.dither-next:focus-visible {
  color: var(--fg);
}

.dither-next:hover::after,
.dither-next:focus-visible::after {
  background: var(--accent);
}

/* Sin suavizado: los píxeles se ven cuadrados a propósito */
.dither-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}

.dither-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 1.8vw, 24px);
  border-top: 1px solid var(--line-soft);
}

.about-side {
  display: flex;
  flex-direction: column;
  gap: clamp(18px, 2vw, 28px);
  min-height: 0;
  padding: clamp(22px, 2.4vw, 36px);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(244, 242, 238, 0.018);
}

.about-now {
  margin: 10px 0 0;
  font-family: var(--font-display);
  font-size: clamp(26px, 2.8vw, 40px);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.about-now em {
  font-style: italic;
  color: var(--accent);
}

.about-aside {
  margin: 10px 0 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
}

.about-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(16px, 2vw, 28px);
  padding-top: 6px;
  border-top: 1px solid var(--line-soft);
}

.about-list {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.about-list li {
  position: relative;
  padding-left: 14px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--fg);
}

.about-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 8px;
  height: 1px;
  background: var(--accent);
}

.about-list.is-no li {
  color: var(--muted);
}

.about-list.is-no li::before {
  background: var(--muted);
}

.about-langs {
  padding-top: 4px;
  border-top: 1px solid var(--line-soft);
}

/* ——— Lo que sí / lo que no ——— */
.creed {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 70px);
  padding: clamp(44px, 5.5vw, 84px) var(--pad) clamp(44px, 5.5vw, 80px);
}

.creed-col {
  display: grid;
  gap: 14px;
  align-content: start;
}

.creed-col ul {
  display: grid;
  border-top: 1px solid var(--line);
}

.creed-col li {
  position: relative;
  padding: 14px 0 14px 26px;
  border-bottom: 1px solid var(--line-soft);
  font-size: clamp(15px, 1.5vw, 18px);
  line-height: 1.4;
  transition: padding-left 0.45s var(--ease), color 0.4s ease;
}

.creed-col li:hover {
  padding-left: 34px;
}

.creed-col li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.45em;
  width: 12px;
  height: 1px;
  background: var(--accent);
  transition: width 0.45s var(--ease);
}

.creed-col li:hover::before {
  width: 20px;
}

.creed-col.is-no li {
  color: var(--muted);
}

.creed-col.is-no li::before {
  background: var(--muted);
}

.creed-col.is-no li:hover {
  color: var(--fg);
}

.bento-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(20px, 2.2vw, 32px);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(244, 242, 238, 0.018);
  transition: border-color 0.5s ease, background 0.5s ease;
}

.bento-card:hover {
  border-color: rgba(244, 242, 238, 0.26);
  background: rgba(244, 242, 238, 0.035);
}

.bento-note {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 48ch;
}

.bento-big {
  font-family: var(--font-display);
  font-size: clamp(40px, 5vw, 68px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

/* Ahora mismo */
.now {
  display: grid;
  gap: 2px;
  margin-top: auto;
}

.now-row {
  display: grid;
  grid-template-columns: 22px 54px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid var(--line-soft);
}

.now-dot {
  justify-self: center;
  width: 5px;
  height: 5px;
  border: 1px solid var(--muted);
  border-radius: 50%;
}

.now-key {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.now-val {
  font-family: var(--font-display);
  font-size: clamp(18px, 1.9vw, 24px);
  line-height: 1.1;
}

.eq {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}

.eq i {
  width: 2px;
  height: 30%;
  background: var(--accent);
  animation: eq 1.1s ease-in-out infinite;
}

.eq i:nth-child(2) {
  animation-duration: 0.74s;
}

.eq i:nth-child(3) {
  animation-duration: 1.32s;
}

.eq i:nth-child(4) {
  animation-duration: 0.92s;
}

@keyframes eq {
  0%,
  100% {
    height: 22%;
  }
  50% {
    height: 100%;
  }
}

/* Barras de idioma */
.meter {
  display: grid;
  gap: 8px;
}

.meter-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.meter-top b {
  font-weight: 400;
  font-size: 15px;
}

.meter-top i {
  font-style: normal;
  font-size: 12px;
  color: var(--muted);
}

.meter-bar {
  display: block;
  height: 2px;
  background: var(--line-soft);
}

.meter-bar em {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent);
  transition: width 1.4s var(--ease);
}

.reveal.is-in .meter-bar em,
.is-in .meter-bar em {
  width: var(--v);
}

/* Lista corta */
.mini {
  display: grid;
  gap: 10px;
  margin-top: auto;
}

.mini li {
  position: relative;
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.5;
}

.mini li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 10px;
  height: 1px;
  background: var(--accent);
}

/* ——— Resume ——— */
.resume {
  padding: clamp(56px, 7vw, 100px) 0 clamp(44px, 6vw, 80px);
}

.resume-pdf {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.4s ease, background 0.4s ease, color 0.4s ease;
}

.resume-pdf .arr {
  transition: transform 0.4s var(--ease);
}

.resume-pdf:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: #0a0a0a;
}

.resume-pdf:hover .arr {
  transform: translateY(3px);
}

.resume-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  gap: clamp(32px, 5vw, 80px);
  padding: 0 var(--pad);
  align-items: start;
}

/* ——— Línea de tiempo ——— */
.timeline {
  --year-col: clamp(74px, 9vw, 116px);
  --rail-gap: clamp(26px, 3vw, 40px);
  position: relative;
}

/* Raíl: la línea gris de fondo y encima la verde que se pinta al bajar */
.timeline::before,
.timeline::after {
  content: "";
  position: absolute;
  top: 8px;
  left: calc(var(--year-col) + var(--rail-gap) / 2);
  width: 1px;
  height: calc(100% - 16px);
}

.timeline::before {
  background: var(--line);
}

.timeline::after {
  background: var(--accent);
  transform-origin: top;
  transform: scaleY(var(--p, 0));
}

.tl-group {
  display: grid;
  grid-template-columns: var(--year-col) minmax(0, 1fr);
  column-gap: var(--rail-gap);
}

.tl-group + .tl-group {
  margin-top: clamp(30px, 3.6vw, 54px);
}

.tl-year {
  position: sticky;
  top: 108px;
  align-self: start;
  font-family: var(--font-display);
  font-size: clamp(30px, 3.6vw, 52px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.tl-items {
  display: grid;
  gap: clamp(14px, 1.6vw, 22px);
}

.tl {
  position: relative;
  padding: clamp(14px, 1.6vw, 20px) clamp(16px, 1.8vw, 24px);
  border: 1px solid transparent;
  border-radius: 12px;
  transition: border-color 0.5s ease, background 0.5s ease, transform 0.6s var(--ease);
}

.tl:hover {
  border-color: var(--line);
  background: rgba(244, 242, 238, 0.025);
  transform: translateX(4px);
}

/* El punto sobre el raíl */
.tl::before {
  content: "";
  position: absolute;
  left: calc(var(--rail-gap) / -2 - 5px);
  top: calc(clamp(14px, 1.6vw, 20px) + 7px);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg);
  transition: background 0.5s ease, border-color 0.5s ease;
}

.tl.is-in::before {
  border-color: var(--accent);
}

.tl.is-now::before {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(188, 255, 77, 0.14);
}

.tl-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-bottom: 5px;
}

.tl-head h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(22px, 2.4vw, 32px);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.tl-tag {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}

.tl-tag.is-soft {
  border-color: var(--line);
  color: var(--muted);
}

.tl-meta {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
}

.tl-text {
  font-size: 15px;
  line-height: 1.65;
  max-width: 54ch;
}

/* ——— Columna lateral ——— */
.resume-side {
  display: grid;
  gap: clamp(14px, 1.6vw, 20px);
  align-content: start;
}

.side-card {
  display: grid;
  gap: 16px;
  padding: clamp(20px, 2.2vw, 28px);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(244, 242, 238, 0.018);
  transition: border-color 0.5s ease;
}

.side-card:hover {
  border-color: rgba(244, 242, 238, 0.26);
}

.side-card.is-key {
  border-left: 2px solid var(--accent);
  background: rgba(188, 255, 77, 0.035);
}

.tool-group {
  display: grid;
  gap: 10px;
}

.tool-head {
  font-size: 12px;
  color: var(--muted);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chips li {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.chips li:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #0a0a0a;
}

/* ——— Contact ——— */
.contact {
  padding: clamp(60px, 8vw, 120px) var(--pad) clamp(56px, 7vw, 100px);
  border-top: 1px solid var(--line-soft);
  background: var(--bg-soft);
}

.contact-kicker {
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
}

.contact-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(56px, 15vw, 230px);
  line-height: 0.9;
  letter-spacing: -0.03em;
  margin-bottom: clamp(32px, 5vw, 60px);
}

.contact-body {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.contact-body p {
  max-width: 40ch;
  font-size: 16px;
  line-height: 1.65;
  color: var(--muted);
}

.contact-mail {
  position: relative;
  font-family: var(--font-display);
  font-size: clamp(24px, 3.4vw, 46px);
  line-height: 1;
  padding-bottom: 8px;
}

.contact-mail::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transform-origin: left;
  transition: transform 0.5s var(--ease);
}

.contact-mail:hover::after {
  transform: scaleX(0);
  transform-origin: right;
}

/* ——— Botón que abre el flujo ——— */
.contact-start {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  position: relative;
  padding: 18px 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: 15px;
  cursor: pointer;
  overflow: hidden;
  z-index: 0;
  transition: color 0.4s ease, border-color 0.4s ease;
}

.contact-start::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: translateY(101%);
  transition: transform 0.45s var(--ease);
  z-index: -1;
}

.contact-start:hover {
  color: #0a0a0a;
  border-color: var(--accent);
}

.contact-start:hover::before {
  transform: translateY(0);
}

.contact-start .arr {
  transition: transform 0.45s var(--ease);
}

.contact-start:hover .arr {
  transform: translateX(5px);
}

.contact-alt {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 16px;
  margin-top: clamp(32px, 4vw, 54px);
}

/* ——— Flujo de contacto ——— */
.chat {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: var(--pad);
}

.chat[hidden] {
  display: none;
}

.chat-back-drop {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 5, 0.82);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.chat.is-open .chat-back-drop {
  opacity: 1;
}

.chat-panel {
  position: relative;
  width: min(760px, 100%);
  max-height: min(86svh, 760px);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg-soft);
  box-shadow: 0 50px 120px rgba(0, 0, 0, 0.7);
  opacity: 0;
  transform: translateY(18px) scale(0.98);
  transition: opacity 0.5s var(--ease), transform 0.6s var(--ease);
}

.chat.is-open .chat-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.chat-top {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px clamp(20px, 3vw, 34px) 14px;
}

.chat-count {
  margin-left: auto;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.chat-x {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  transition: color 0.35s ease, border-color 0.35s ease, transform 0.4s var(--ease);
}

.chat-x:hover {
  color: var(--fg);
  border-color: var(--fg);
  transform: rotate(90deg);
}

.chat-bar {
  height: 1px;
  margin: 0 clamp(20px, 3vw, 34px);
  background: var(--line);
}

.chat-bar span {
  display: block;
  height: 100%;
  width: 25%;
  background: var(--accent);
  transition: width 0.6s var(--ease);
}

.chat-body {
  padding: clamp(22px, 3vw, 36px) clamp(20px, 3vw, 34px) clamp(24px, 3vw, 36px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.chat-q {
  display: none;
}

.chat-q.is-on {
  display: grid;
  gap: 8px;
  animation: chat-in 0.55s var(--ease) both;
}

@keyframes chat-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-tag {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.chat-q h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(26px, 3.4vw, 42px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
}

.chat-picks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(12px, 1.6vw, 18px);
}

.pick {
  position: relative;
  display: grid;
  gap: 9px;
  align-content: start;
  text-align: left;
  padding: clamp(18px, 2.2vw, 26px);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(244, 242, 238, 0.015);
  color: var(--fg);
  font: inherit;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.4s ease, background 0.4s ease, transform 0.45s var(--ease);
}

.pick::before,
.pick::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
}

.pick::before {
  background: radial-gradient(
    260px circle at var(--px, 85%) var(--py, 0%),
    rgba(188, 255, 77, 0.2),
    transparent 70%
  );
}

/* Borde que se enciende donde está el ratón */
.pick::after {
  padding: 1px;
  background: radial-gradient(
    180px circle at var(--px, 85%) var(--py, 0%),
    rgba(188, 255, 77, 0.9),
    transparent 70%
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.pick:hover::after {
  opacity: 1;
}

.pick:hover {
  border-color: rgba(244, 242, 238, 0.34);
  transform: translateY(-3px);
}

.pick:hover::before,
.pick.is-on::before {
  opacity: 1;
}

.pick.is-on {
  border-color: var(--accent);
  background: rgba(188, 255, 77, 0.06);
}


.pick-name {
  font-family: var(--font-display);
  font-size: clamp(21px, 2.2vw, 28px);
  line-height: 1.05;
}

/* Marca de opción: una barra fina arriba, nada de iconos */
.pick-name::before {
  content: "";
  display: block;
  width: 26px;
  height: 2px;
  margin-bottom: 16px;
  background: var(--line);
  transition: width 0.5s var(--ease), background 0.4s ease;
}

.pick:hover .pick-name::before,
.pick.is-on .pick-name::before {
  width: 44px;
  background: var(--accent);
}

.pick-desc {
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}

.pick-stat {
  margin-top: 2px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(188, 255, 77, 0.72);
}

.chat-sum {
  margin: 4px 0 22px;
  padding: 16px 18px;
  border-left: 2px solid var(--accent);
  background: rgba(188, 255, 77, 0.04);
  font-size: 15px;
  line-height: 1.65;
  color: var(--muted);
}

.chat-sum b {
  font-weight: 400;
  color: var(--fg);
}

.chat-form {
  display: grid;
  gap: 20px;
}

.field {
  display: grid;
  gap: 7px;
}

.field > span {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.field input,
.field textarea {
  width: 100%;
  padding: 11px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: 15px;
  resize: vertical;
  transition: border-color 0.4s ease;
}

.field input::placeholder,
.field textarea::placeholder {
  color: rgba(139, 139, 134, 0.55);
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.chat-send {
  justify-self: start;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  overflow: hidden;
  z-index: 0;
  transition: color 0.4s ease, border-color 0.4s ease;
}

.chat-send::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: translateY(101%);
  transition: transform 0.45s var(--ease);
  z-index: -1;
}

.chat-send:hover {
  color: #0a0a0a;
  border-color: var(--accent);
}

.chat-send:hover::before {
  transform: translateY(0);
}

.chat-prev {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  padding: 6px 0;
  cursor: pointer;
  transition: color 0.35s ease;
}

.chat-prev:hover {
  color: var(--fg);
}

body.chat-open {
  overflow: hidden;
}

.contact-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: clamp(40px, 6vw, 72px);
  padding-top: 22px;
  border-top: 1px solid var(--line-soft);
  font-size: 13px;
  color: var(--muted);
}

.clock time {
  font-variant-numeric: tabular-nums;
  color: var(--fg);
}

/* ——— Footer ——— */
.footer {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr auto;
  align-items: start;
  gap: 32px;
  padding: 40px var(--pad) 44px;
  font-size: 14px;
  border-top: 1px solid var(--line);
}

.footer-name {
  font-family: var(--font-display);
  font-size: 22px;
  margin-bottom: 4px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-col .label {
  margin-bottom: 4px;
}

.footer-col a {
  color: var(--muted);
  transition: color 0.3s ease;
}

.footer-col a:hover {
  color: var(--fg);
}

.footer-year {
  color: var(--muted);
  justify-self: end;
}

/* ——— Custom cursor ——— */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 2147483647;
  width: 10px;
  height: 10px;
  background: var(--fg);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: width 0.3s var(--ease), height 0.3s var(--ease),
    background 0.3s ease, opacity 0.3s ease;
  display: grid;
  place-items: center;
}

.cursor.is-visible {
  opacity: 1;
}

/*
  Círculo dibujado a escalones de 12.5%, como si fuera una retícula de 8x8.
  Es el mismo truco que el dithering: curvas hechas de píxeles cuadrados.
*/
.cursor.is-hover,
.cursor.is-view {
  clip-path: polygon(
    25% 0,
    75% 0,
    75% 12.5%,
    87.5% 12.5%,
    87.5% 25%,
    100% 25%,
    100% 75%,
    87.5% 75%,
    87.5% 87.5%,
    75% 87.5%,
    75% 100%,
    25% 100%,
    25% 87.5%,
    12.5% 87.5%,
    12.5% 75%,
    0 75%,
    0 25%,
    12.5% 25%,
    12.5% 12.5%,
    25% 12.5%
  );
}

.cursor.is-hover {
  width: 44px;
  height: 44px;
  background: rgba(244, 242, 238, 0.16);
  backdrop-filter: blur(3px);
  /* Trama de puntos de 2px: el relleno también es pixelado */
  background-image: repeating-conic-gradient(
    from 0deg,
    rgba(244, 242, 238, 0.26) 0% 25%,
    transparent 0% 50%
  );
  background-size: 4px 4px;
}

.cursor.is-view {
  width: 76px;
  height: 76px;
  background: var(--accent);
}

.cursor-label {
  font-size: 12px;
  font-weight: 500;
  color: #0a0a0a;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.25s ease, transform 0.25s var(--ease);
}

.cursor.is-view .cursor-label {
  opacity: 1;
  transform: scale(1);
}

/* ——— Project pages ——— */
.project-page {
  padding: 120px var(--pad) clamp(70px, 10vw, 120px);
  max-width: 1180px;
  margin: 0 auto;
}

.project-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: clamp(50px, 8vw, 100px);
  font-size: 14px;
}

.project-back {
  color: var(--muted);
  transition: color 0.3s ease;
}

.project-back:hover {
  color: var(--fg);
}

.project-top .hero-logo {
  font-family: var(--font-display);
  font-size: 22px;
}

.project-badge {
  display: inline-block;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 24px;
}

.project-hero {
  margin-bottom: clamp(36px, 5vw, 64px);
}

.project-hero h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(46px, 9vw, 130px);
  line-height: 0.92;
  letter-spacing: -0.025em;
  margin-bottom: 20px;
}

.project-hero p {
  max-width: 54ch;
  font-size: 17px;
  line-height: 1.6;
  color: var(--muted);
}

.project-preview {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #151515;
  margin-bottom: clamp(36px, 5vw, 64px);
}

.project-preview iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.project-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.project-preview.is-still {
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 70% 20%, rgba(126, 200, 163, 0.28), transparent 58%),
    #151515;
}

.project-preview.is-still::before {
  content: attr(data-host);
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 52px);
  letter-spacing: -0.02em;
  color: rgba(244, 242, 238, 0.88);
}

.project-preview-note {
  grid-area: 1 / 1;
  align-self: end;
  margin: 0;
  max-width: 34ch;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  text-align: center;
}

.project-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-bottom: clamp(36px, 5vw, 64px);
}

.project-meta article {
  padding: 22px;
  background: var(--bg);
}

.project-meta h3 {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.project-meta p {
  font-size: 15px;
}

.project-cta-wrap {
  margin-bottom: clamp(50px, 7vw, 90px);
}

.project-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  background: var(--accent);
  color: #0a0a0a;
  font-weight: 500;
  font-size: 15px;
  transition: transform 0.4s var(--ease);
}

.project-cta:hover {
  transform: translateY(-3px);
}

.project-brand {
  padding-top: 28px;
  margin-bottom: 44px;
  border-top: 1px solid var(--line);
}

.project-brand h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(26px, 3.4vw, 42px);
  line-height: 1.05;
  margin-bottom: 16px;
}

.project-brand p {
  max-width: 60ch;
  font-size: 16px;
  line-height: 1.65;
  color: var(--muted);
  margin-bottom: 16px;
}

.project-list li {
  position: relative;
  padding: 8px 0 8px 20px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--muted);
}

.project-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.05em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.project-brand .placeholder {
  padding: 44px 24px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

/* ——— Motion ——— */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }

@keyframes line-up {
  to { transform: translateY(0); }
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in-soft {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes float-glow {
  0% { transform: translateX(-50%) translateY(0) scale(1); }
  100% { transform: translateX(-46%) translateY(4%) scale(1.12); }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(3px); }
}

/* ——— Referencias (música, anime, juegos) ——— */
.refs {
  padding: clamp(60px, 9vw, 130px) var(--pad);
  border-top: 1px solid var(--line-soft);
}

.refs-lead {
  max-width: 44ch;
  margin-bottom: clamp(36px, 5vw, 64px);
  font-size: 16px;
  line-height: 1.75;
  color: var(--muted);
}

.refs-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.ref {
  position: relative;
  background: var(--bg);
  padding: clamp(26px, 3vw, 40px) clamp(22px, 2.6vw, 34px) clamp(30px, 4vw, 48px);
  overflow: hidden;
  transition: background 0.5s ease;
}

.ref::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s var(--ease);
}

.ref:hover {
  background: var(--bg-soft);
}

.ref:hover::after {
  transform: scaleX(1);
}

.ref-glyph {
  font-family: var(--font-display);
  font-size: 34px;
  line-height: 1;
  color: var(--accent);
  display: block;
  margin-bottom: 20px;
  transition: transform 0.6s var(--ease);
}

.ref:hover .ref-glyph {
  transform: translateY(-4px) rotate(-8deg);
}

.ref h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(24px, 2.6vw, 36px);
  line-height: 1.05;
  margin-bottom: 14px;
}

.ref p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
  margin-bottom: 20px;
}

.ref-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.ref-list span {
  font-size: 12px;
  letter-spacing: 0.02em;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  transition: color 0.35s ease, border-color 0.35s ease, transform 0.35s var(--ease);
}

.ref:hover .ref-list span {
  border-color: rgba(188, 255, 77, 0.35);
  color: var(--fg);
}

.ref-list span:hover {
  transform: translateY(-2px);
  color: var(--accent);
}

/* ——— Responsive ——— */
@media (max-width: 1000px) {
  .grain {
    display: none;
  }

  .nav.is-stuck,
  .case-badge {
    backdrop-filter: none;
  }

  .hero-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* En móvil el canvas va arriba y el texto debajo, sin overlay */
  .ia {
    height: 320vh;
  }

  .ia-sticky {
    grid-template-columns: 1fr;
    grid-template-rows: 38vh minmax(0, 1fr);
  }

  .ia-stage {
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }

  .ia-copy {
    padding: 22px var(--pad) 28px;
    justify-content: flex-start;
  }

  .ia-index {
    font-size: clamp(36px, 9vw, 52px);
    margin-top: 10px;
  }

  .ia-slides {
    min-height: 124px;
    margin-top: 12px;
  }

  .ia-foot {
    display: none;
  }

  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .acc-head {
    grid-template-columns: 40px minmax(0, 1fr) 28px;
  }

  .acc-meta {
    display: none;
  }

  .acc-inner {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .hero-actions {
    justify-self: start;
  }

  .talk-float {
    display: inline-flex;
  }

  .about-main,
  .creed {
    grid-template-columns: 1fr;
  }

  .about-say {
    font-size: clamp(30px, 8vw, 58px);
  }

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

  .ring {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .hero-3d {
    right: -22vw;
    width: min(110vw, 700px);
    opacity: 0;
    animation: fade-in-soft 1.6s 0.4s var(--ease) forwards;
  }

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

  .chat-picks {
    grid-template-columns: 1fr;
  }

  .work-head {
    flex-direction: column;
    gap: 10px;
  }

  .resume-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

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

  .footer-year {
    justify-self: start;
  }
}

@media (max-width: 640px) {
  .nav {
    font-size: 13px;
    gap: 14px;
  }

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

  .contact-alt {
    flex-direction: column;
    gap: 8px;
  }

  .acc-head,
  .acc-inner {
    grid-template-columns: minmax(0, 1fr) 28px;
  }

  .acc-index {
    display: none;
  }

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

  .acc-inner p,
  .tags {
    grid-column: 1;
  }

  .nav-links {
    display: none;
  }

  .hero {
    min-height: 92svh;
    padding-top: 110px;
  }

  .hero-meta {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .timeline::before,
  .timeline::after {
    display: none;
  }

  .tl-group {
    grid-template-columns: 1fr;
    row-gap: 12px;
  }

  .tl-year {
    position: static;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
    color: var(--fg);
  }

  .tl {
    padding-left: 0;
    padding-right: 0;
  }

  .tl:hover {
    transform: none;
    border-color: transparent;
    background: none;
  }

  .tl::before {
    display: none;
  }

  .about-split {
    grid-template-columns: 1fr;
  }

  .now-row {
    grid-template-columns: 22px minmax(0, 1fr);
  }

  .now-key {
    display: none;
  }

  .project-meta {
    grid-template-columns: 1fr;
  }

  .contact-body {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer {
    grid-template-columns: 1fr;
    gap: 26px;
  }
}

@media (pointer: coarse), (max-width: 900px) {
  body,
  body.has-cursor,
  body.has-cursor a,
  body.has-cursor button {
    cursor: auto;
  }

  .cursor {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }

  .line > span,
  .say > span {
    transform: none;
  }

  .hero-3d {
    opacity: 0.5;
    animation: none;
  }

  .ia {
    height: auto;
  }

  .ia-sticky {
    position: relative;
    height: auto;
    min-height: 0;
  }

  .ia-stage {
    min-height: 52vh;
  }

  .ia-slide {
    opacity: 1;
    transform: none;
    position: relative;
    grid-area: auto;
    pointer-events: auto;
  }

  .ia-slides {
    display: flex;
    flex-direction: column;
    gap: 22px;
    min-height: 0;
  }

  .ia-index,
  .ia-pips {
    display: none;
  }
}

/* ——— Impresión: solo el currículum, en papel limpio ——— */
.print-head {
  display: none;
}

@media print {
  @page {
    margin: 16mm;
  }

  .grain,
  .progress,
  .nav,
  .cursor,
  .talk-float,
  .chat,
  .footer,
  .hero,
  .ring,
  .work,
  .band,
  .services,
  .process,
  .wave,
  .ia,
  .faq,
  .contact,
  .resume-pdf,
  .dither,
  .section-count {
    display: none !important;
  }

  html,
  body {
    background: #fff;
    color: #111;
  }

  /* El CV primero, los datos personales después */
  main {
    display: flex;
    flex-direction: column;
  }

  .print-head {
    order: 0;
  }

  .resume {
    order: 1;
  }

  .about {
    order: 2;
  }

  .about,
  .resume {
    padding: 0 0 8mm;
    border: 0;
    background: #fff;
  }

  .about-say,
  .about-main,
  .creed,
  .resume-grid,
  .timeline,
  .tl,
  .section-head {
    padding-left: 0;
    padding-right: 0;
  }

  .print-head {
    display: block;
    margin-bottom: 8mm;
    padding-bottom: 4mm;
    border-bottom: 1px solid #ccc;
  }

  .print-name {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 30pt;
    line-height: 1;
  }

  .print-head p:not(.print-name) {
    font-size: 9pt;
    color: #555;
  }

  .about-say {
    padding-bottom: 6mm;
    font-size: 17pt;
  }

  .about-say em {
    color: #111;
  }

  .say > span {
    transform: none;
  }

  .about-main,
  .creed {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6mm;
    padding-top: 0;
    padding-bottom: 4mm;
  }

  .bento-card,
  .about-side {
    padding: 0 0 3mm;
    border: 0;
    border-radius: 0;
    background: none;
    break-inside: avoid;
  }

  .about-now {
    font-size: 16pt;
    color: #111;
  }

  .about-now em {
    color: #111;
  }

  .creed-col li {
    padding-top: 2mm;
    padding-bottom: 2mm;
    border-color: #eee;
    font-size: 10pt;
  }

  .creed-col ul {
    border-color: #ccc;
  }

  .creed-col li::before,
  .creed-col.is-no li::before {
    background: #111;
  }

  .creed-col.is-no li {
    color: #555;
  }

  .eq i {
    background: #111;
  }

  .now-dot {
    border-color: #111;
  }

  .resume-grid {
    grid-template-columns: minmax(0, 1fr) 55mm;
    gap: 8mm;
  }

  .timeline::before,
  .tl::before {
    background: #ddd;
    border-color: #ddd;
  }

  /* El raíl verde no tiene sentido en papel */
  .timeline::after {
    display: none;
  }

  .tl,
  .tl-group {
    break-inside: avoid;
  }

  .tl:hover {
    transform: none;
    border-color: transparent;
    background: none;
  }

  .tl-year {
    position: static;
    font-size: 16pt;
    color: #999;
  }

  .tl-head h3 {
    font-size: 13pt;
  }

  .tl-tag {
    border-color: #ccc;
    color: #666;
  }

  .side-card,
  .side-card.is-key {
    padding: 0 0 4mm;
    border: 0;
    border-radius: 0;
    background: none;
  }

  .label,
  .tool-head,
  .tl-meta,
  .bento-note,
  .meter-top i {
    color: #666;
  }

  .meter-bar {
    background: #eee;
  }

  .meter-bar em {
    background: #111;
  }

  .mini li::before {
    background: #111;
  }

  .chips li {
    border-color: #ccc;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }

  .section-title {
    font-size: 18pt;
  }
}
