/* Kathonejo — PORTAFOLIO 2026 (mockup local v2: intro Gmunk + obras flotantes)
   Identidad: negro/casi negro, rosa, amarillo dorado. Rubik, Red Rose, Roboto Mono.
   Textos existentes sin cambios. Vista previa local; no publicar. */

@font-face {
  font-family: "Rubik";
  src: url("fonts/Rubik[wght].ttf") format("truetype");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Red Rose";
  src: url("fonts/RedRose[wght].ttf") format("truetype");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Roboto Mono";
  src: url("fonts/RobotoMono[wght].ttf") format("truetype");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Roboto Mono";
  src: url("fonts/RobotoMono-Italic[wght].ttf") format("truetype");
  font-weight: 300 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #080808;
  --text: #f6f1ea;
  --muted: #c9c2b8;
  --pink: #ff99cc;
  --coral: #ff6666;
  --peach: #ff9999;
  --gold: #ffcc66;
  --gold-soft: #ffecb3;
  --blue: #1159cc;
  --green: #00cc99;
  --orange: #ff7b4d;
  --line: #1a1a1a;
  --fg: #fff;
  --accent-text: var(--pink);
  --link: var(--gold);
  --on-fill: var(--coral);
  --mark-text: var(--blue);
  --header-bg: rgba(0, 0, 0, 0.82);
  --header-bg-solid: rgba(0, 0, 0, 0.97);
  --art-bg: #050505;
  --rule: rgba(246, 241, 234, 0.22);
  --rule-soft: rgba(246, 241, 234, 0.18);
  --lightbox-bg: rgba(0, 0, 0, 0.94);
  --lightbox-backdrop: #000;
  --max: 1480px;
  --header-h: 4rem;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 0.75rem);
}

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

body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 90% 55% at 50% -10%, rgba(255, 153, 204, 0.055), transparent 52%),
    radial-gradient(ellipse 50% 40% at 100% 80%, rgba(255, 204, 102, 0.035), transparent 48%),
    radial-gradient(ellipse 40% 30% at 0% 60%, rgba(17, 89, 204, 0.05), transparent 50%);
  color: var(--fg);
  font-family: "Rubik", system-ui, sans-serif;
  font-weight: 300;
  font-size: 0.9375rem;
  line-height: 1.55;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover { color: var(--accent-text); }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  background: var(--gold);
  color: #000;
  padding: 0.4rem 0.7rem;
  z-index: 30;
}

.skip:focus { top: 0.75rem; }

.wrap {
  width: min(var(--max), calc(100% - 3.5rem));
  margin-inline: auto;
}

/* Subtle film grain — atmosphere, not decoration on the work */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 40;
  opacity: 0.055;
  mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.85'/%3E%3C/svg%3E");
  background-repeat: repeat;
}

/* Slim sticky bar — the work keeps the screen */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--header-bg);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(14px);
  transition: border-color 0.35s ease, background 0.35s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: var(--header-bg-solid);
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  min-height: var(--header-h);
  padding: 0.35rem 0;
}

.logo {
  width: 42px;
  height: auto;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem 1.25rem;
  font-family: "Roboto Mono", monospace;
  font-size: 0.82rem;
  font-weight: 500;
}

.nav a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.nav a:hover {
  color: var(--accent-text);
  border-bottom-color: var(--accent-text);
}

/* Cinematic intro: typography first (Gmunk), works floating at the edges (Bergh) */
.intro {
  position: relative;
  min-height: calc(100svh - var(--header-h));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem 0 3.25rem;
  isolation: isolate;
}

.intro::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 35%, rgba(0, 0, 0, 0.55) 100%);
  z-index: 1;
}

.intro-floats {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.float {
  position: absolute;
  margin: 0;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  will-change: transform;
}

.float img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05) contrast(1.04);
}

.float-a { width: min(19vw, 260px); top: 9%; left: 3%; aspect-ratio: 4 / 5; }
.float-b { width: min(14vw, 200px); top: 8%; right: 3%; aspect-ratio: 3 / 4; }
.float-c { width: min(13vw, 180px); top: 12%; left: 40%; aspect-ratio: 5 / 4; }
.float-d { width: min(13vw, 185px); top: 28%; right: 20%; aspect-ratio: 3 / 4; }

.intro-stage {
  position: relative;
  z-index: 2;
  width: min(var(--max), calc(100% - 3.5rem));
}

.brand-title {
  margin: 0 0 2.4rem;
  font-family: "Red Rose", sans-serif;
  font-weight: 500;
  font-size: clamp(3.4rem, 14vw, 8.6rem);
  letter-spacing: 0;
  line-height: 0.86;
  color: var(--fg);
}

.intro-foot {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem 2rem;
  align-items: end;
  padding-top: 1.15rem;
  border-top: 1px solid var(--rule);
}

.byline {
  margin: 0;
  font-family: "Roboto Mono", ui-monospace, monospace;
  font-size: 1rem;
  font-weight: 300;
  color: var(--fg);
}

.hero-side {
  text-align: right;
}

.kicker {
  margin: 0;
  font-family: "Roboto Mono", ui-monospace, monospace;
  font-weight: 500;
  font-size: clamp(1.2rem, 3.4vw, 2.5rem);
  color: var(--accent-text);
  letter-spacing: 0;
}

.badge {
  display: inline-block;
  margin-top: 0.55rem;
  background: var(--gold);
  color: var(--on-fill);
  font-family: "Red Rose", sans-serif;
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: 0;
  padding: 0.28rem 0.7rem;
  border-radius: 2px;
}

/* Sections */
.section {
  padding: 3.4rem 0 1.5rem;
  border-top: 1px solid var(--line);
  scroll-margin-top: calc(var(--header-h) + 0.75rem);
}

.section-title {
  margin: 0 0 2.4rem;
  font-family: "Roboto Mono", ui-monospace, monospace;
  font-weight: 500;
  font-size: clamp(1.35rem, 2.6vw, 2rem);
  color: var(--accent-text);
}

.ficha {
  display: grid;
  grid-template-columns: minmax(15rem, 0.32fr) minmax(22rem, 0.68fr);
  gap: 2rem 4.5rem;
  align-items: center;
  margin-bottom: 11rem;
  scroll-margin-top: calc(var(--header-h) + 1.25rem);
}

.ficha--stack {
  grid-template-columns: 1fr;
  align-items: start;
  gap: 2rem;
  margin-bottom: 10rem;
}

.media { min-width: 0; }

.art {
  margin: 0 0 0.9rem;
  position: relative;
  overflow: hidden;
}

.art img {
  width: 100%;
  height: auto;
  max-height: 78vh;
  object-fit: contain;
  object-position: center top;
  background: var(--art-bg);
  cursor: zoom-in;
  transform: scale(1);
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1), filter 0.8s ease;
}

.art--inline img {
  width: min(100%, 420px);
  max-height: none;
  cursor: zoom-in;
}

@media (hover: hover) {
  .art:hover img,
  .gallery figure:hover img {
    transform: scale(1.035);
  }
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.55rem 0 0;
}

.pin {
  display: inline-flex;
  align-items: center;
  background: var(--gold);
  color: var(--on-fill);
  font-family: "Red Rose", sans-serif;
  font-weight: 500;
  font-size: 1.05rem;
  padding: 0.22rem 0.6rem;
  border-radius: 2px;
}

.mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  color: var(--blue);
  font-family: "Roboto Mono", ui-monospace, monospace;
  font-weight: 500;
  font-size: 1rem;
  padding: 0;
  border-radius: 0;
  line-height: 1.2;
}

.legend .mark {
  background: var(--pink);
  color: var(--mark-text);
  min-width: 2.15rem;
  padding: 0.32rem 0.4rem;
  border-radius: 2px;
  font-size: 1.15rem;
}

.obra-title {
  margin: 0.55rem 0 0.9rem;
  font-family: "Roboto Mono", ui-monospace, monospace;
  font-weight: 500;
  font-size: clamp(1.05rem, 1.7vw, 1.28rem);
  color: var(--fg);
  line-height: 1.35;
  letter-spacing: 0;
}

.exhibit-kicker {
  margin: 0 0 0.7rem;
  font-family: "Roboto Mono", ui-monospace, monospace;
  font-weight: 500;
  font-style: italic;
  font-size: 1rem;
  color: var(--accent-text);
  line-height: 1.4;
}

.exhibit-sub {
  margin: 0 0 0.9rem;
  font-family: "Roboto Mono", ui-monospace, monospace;
  font-weight: 500;
  font-style: italic;
  font-size: 1rem;
  color: var(--blue);
  line-height: 1.45;
}

.series-label {
  margin: 0 0 0.4rem;
  font-family: "Roboto Mono", ui-monospace, monospace;
  font-weight: 500;
  font-size: 1rem;
  color: var(--blue);
}

.title-aux {
  margin: 0 0 0.9rem;
  font-family: "Roboto Mono", ui-monospace, monospace;
  font-weight: 500;
  font-size: clamp(1rem, 1.5vw, 1.05rem);
  color: var(--fg);
  line-height: 1.4;
}

.exhibit-body,
.exhibit-body p {
  font-family: "Roboto Mono", ui-monospace, monospace;
  font-weight: 500;
  font-style: italic;
  font-size: 1rem;
  color: var(--fg);
}

.lead {
  font-weight: 300;
  color: var(--fg);
}

.meta {
  font-family: "Rubik", sans-serif;
  font-size: 0.846rem;
  font-weight: 700;
  color: var(--accent-text);
}

.meta p,
.copy p {
  margin: 0 0 0.85rem;
}

.copy p:last-child,
.meta p:last-child { margin-bottom: 0; }

.quote,
.quote-curatorial {
  margin: 1.1rem 0;
  padding-left: 0;
  border-left: none;
  font-family: "Rubik", sans-serif;
  font-style: normal;
  font-weight: 300;
  font-size: 0.9375rem;
  color: var(--fg);
}

.quote-artist {
  margin: 1.1rem 0;
  padding-left: 0;
  border-left: none;
  font-family: "Rubik", sans-serif;
  font-style: normal;
  font-weight: 700;
  font-size: 0.846rem;
  color: var(--accent-text);
}

.quote p { margin: 0 0 0.75rem; }
.quote p:last-child { margin-bottom: 0; }
.quote footer,
.quote-curatorial footer {
  margin-top: 0.6rem;
  font-style: normal;
  font-weight: 300;
  color: var(--fg);
}

.list {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  font-family: "Rubik", sans-serif;
  font-size: 0.846rem;
  font-weight: 700;
  color: var(--accent-text);
}

.list li { margin: 0 0 0.35rem; }

/* Galleries */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.15rem 1.15rem;
  margin: 0;
}

.gallery--docs {
  grid-template-columns: 1fr;
}

.gallery figure {
  margin: 0;
  overflow: hidden;
}

.gallery img {
  width: 100%;
  height: auto;
  cursor: zoom-in;
  transform: scale(1);
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.gallery figcaption,
.art figcaption {
  margin-top: 0.45rem;
  font-family: "Roboto Mono", ui-monospace, monospace;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--blue);
}

.gallery--aurer {
  grid-template-columns: 1fr;
}

.pair {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
}

/* Floating / alternating works — sizes and sides shift like stills in space */
@media (min-width: 900px) {
  .ficha:not(.ficha--stack) .media {
    transform: translateX(2vw);
  }
  .ficha:not(.ficha--stack):nth-of-type(even) {
    grid-template-columns: minmax(22rem, 0.7fr) minmax(15rem, 0.3fr);
  }
  .ficha:not(.ficha--stack):nth-of-type(even) .copy { order: 2; }
  .ficha:not(.ficha--stack):nth-of-type(even) .media { order: 1; transform: translateX(-2vw); }
  .ficha:not(.ficha--stack):nth-of-type(3n) .media {
    width: 92%;
    justify-self: end;
    transform: translateX(4vw);
  }
  .ficha:not(.ficha--stack):nth-of-type(3n) .copy { padding-left: 1rem; }
}

@media (min-width: 820px) {
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery--docs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery--aurer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
  .gallery--aurer .span-2 { grid-column: 1 / -1; }
  .pair { grid-template-columns: 1.1fr 0.7fr; }
}

@media (min-width: 1100px) {
  .gallery--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 819px) {
  .wrap { width: min(var(--max), calc(100% - 1.6rem)); }
  .hero-side { text-align: left; }
  .intro { padding: 1.2rem 0 2rem; min-height: calc(100svh - 8.75rem); }
  .intro-stage { width: min(var(--max), calc(100% - 1.5rem)); }
  .intro-foot { grid-template-columns: 1fr; border-top-color: var(--rule-soft); }
  .float-a, .float-d { display: none; }
  .float-b { width: 34vw; top: 10%; right: -4%; opacity: 0.7; }
  .float-c { width: 36vw; left: -6%; bottom: 32%; opacity: 0.55; }
  .brand-title { margin-bottom: 1.2rem; font-size: clamp(2.4rem, 12.2vw, 3.4rem); }
  .about-grid { grid-template-columns: 1fr; }
  .photo-placeholder { min-height: 22rem; }
  .feature, .section, .ficha { scroll-margin-top: 7.25rem; }
  .feature-frame { height: calc(100svh - 7.25rem - 3.5rem); }
  .feature-video { object-position: center 45%; }
  .ficha {
    grid-template-columns: 1fr;
    margin-bottom: 5.5rem;
    gap: 1.25rem;
  }
  .ficha .copy { order: 2; }
  .ficha .media { order: 1; }
  .ficha .copy .mark { margin-top: 0; }
  .ficha:not(.ficha--stack) .copy > .mark { display: none; }
  .art img { max-height: none; }
  .bar { min-height: 3.4rem; }
  .logo { width: 36px; }
  .nav { font-size: 0.78rem; gap: 0.25rem 0.85rem; }
}

@media (max-width: 520px) {
  .gallery { grid-template-columns: 1fr; }
  .bar { flex-wrap: wrap; }
  .nav { width: 100%; justify-content: flex-start; }
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.95s ease, transform 0.95s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
  .art img, .gallery img { transition: none; }
}

/* Contact */
.contact-card {
  display: grid;
  gap: 1.4rem;
  padding: 0 0 4rem;
  min-height: 0;
}

.contact-mail {
  font-family: "Rubik", sans-serif;
  font-size: 0.846rem;
  font-weight: 700;
  color: var(--accent-text);
}

.contact-mail a { color: var(--accent-text); }

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1.3rem;
  padding: 0;
  margin: 0;
  list-style: none;
  font-family: "Roboto Mono", monospace;
  font-size: 0.92rem;
}

.site-footer {
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: "Roboto Mono", ui-monospace, monospace;
  font-weight: 300;
  font-size: 0.8rem;
}

/* Lightbox */
.lightbox {
  border: 0;
  padding: 0;
  background: var(--lightbox-bg);
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
}

.lightbox::backdrop {
  background: var(--lightbox-backdrop);
}

.lightbox[open] {
  display: grid;
  place-items: center;
}

.lightbox img {
  max-width: min(96vw, 1400px);
  max-height: 92vh;
  width: auto;
  height: auto;
  object-fit: contain;
}

.lightbox-close {
  position: fixed;
  top: 0.85rem;
  right: 1rem;
  z-index: 2;
  background: none;
  border: 0;
  color: var(--link);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
}



/* Featured Nubenejos — large, silent loop, black on black */
.feature {
  position: relative;
  background: #000;
  min-height: calc(100svh - var(--header-h));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 0 3.25rem;
  scroll-margin-top: var(--header-h);
}

.feature-frame {
  width: min(100vw, 100%);
  height: calc(100svh - var(--header-h) - 3.25rem);
  overflow: hidden;
  background: #000;
}

.feature-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
  object-fit: cover;
  object-position: center 42%;
}

.feature-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1.35rem;
  margin: 0;
  text-align: center;
  font-family: "Roboto Mono", ui-monospace, monospace;
  font-weight: 500;
  font-size: 1rem;
  color: var(--fg);
  z-index: 2;
  text-shadow: 0 1px 10px #000, 0 0 18px #000;
}

/* Sobre mí */
.section--about { padding-top: 4.5rem; }

.about-grid {
  display: grid;
  grid-template-columns: minmax(14rem, 0.42fr) minmax(18rem, 0.58fr);
  gap: 2rem 3.5rem;
  align-items: start;
}

.about-grid .section-title { grid-column: 1 / -1; margin-bottom: 0.5rem; }

.photo-slot { margin: 0; }

.photo-placeholder {
  min-height: 28rem;
  border: 1px dashed var(--gold);
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(255, 204, 102, 0.04),
      rgba(255, 204, 102, 0.04) 8px,
      transparent 8px,
      transparent 16px
    );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.6rem;
  padding: 1.2rem;
}

.photo-mark {
  font-family: "Red Rose", sans-serif;
  font-weight: 500;
  font-size: 1.15rem;
  color: var(--gold);
}

.slot-label {
  margin: 0 0 0.7rem;
  font-family: "Roboto Mono", ui-monospace, monospace;
  font-weight: 500;
  font-size: 1rem;
  color: var(--accent-text);
}

.slot-note {
  margin: 0;
  font-family: "Rubik", sans-serif;
  font-weight: 300;
  font-size: 0.9375rem;
  color: var(--muted);
  max-width: 38rem;
}

.cosmo-slot {
  border-top: 1px solid var(--rule-soft);
  padding-top: 1.2rem;
  min-height: 12rem;
}

/* Estudios */
.estudios-slot {
  margin: 0 0 4rem;
  max-width: 40rem;
}

.estudios-heading {
  margin: 0 0 0.7rem;
  font-family: "Roboto Mono", ui-monospace, monospace;
  font-weight: 500;
  font-size: 1.15rem;
  color: var(--blue);
}

.estudios-list {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  font-family: "Rubik", sans-serif;
  font-size: 0.9375rem;
  font-weight: 300;
  color: var(--text);
}

.estudios-list li {
  margin: 0 0 0.45rem;
  padding-left: 0.9rem;
  border-left: 2px solid var(--gold);
}

.section-title--sub {
  margin-top: 1rem;
}

.reveal {
  transition-duration: 1.15s;
}
.about-photo { display:block; width:100%; height:auto; aspect-ratio:1/1; object-fit:cover; border-radius:4px; }
@media (max-width: 720px) {
  .about-grid { display: grid; grid-template-columns: 1fr !important; gap: 1.5rem; }
  .about-grid > * { grid-column: 1 / -1 !important; min-width: 0; }
}

/* Nubenejos — high-res still from the layered master (OneDrive) */
.feature-still { background:#000; padding: 1.5rem 0 4rem; }
.feature-still-frame { margin:0 auto; width:min(96vw,1600px); }
.feature-still-frame img { display:block; width:100%; height:auto; }
@media (max-width:720px){ .feature-still{padding:.5rem 0 2.5rem} .feature-still-frame{width:100vw} }

/* avoid sideways scroll from obra media on desktop */
html, body { overflow-x: clip; }

/* ===== v3: moving Nubenejos hero ===== */
.hero {
  position: relative;
  background: #000;
  min-height: calc(100svh - var(--header-h));
  display: flex;
  flex-direction: column;
  isolation: isolate;
}
.hero-frame {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}
.hero-video {
  display: block;
  width: 100%;
  height: 100%;
  max-height: calc(100svh - var(--header-h) - 15rem);
  aspect-ratio: 20 / 9;
  object-fit: contain;
  background: #000;
}
.hero-play {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  font: 500 1.05rem "Red Rose", sans-serif;
  color: var(--coral);
  background: var(--gold);
  border: 0; border-radius: 999px;
  padding: 0.85rem 1.4rem;
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(0,0,0,.6);
  z-index: 3;
}
.hero-play[hidden] { display: none; }
.hero-toggle {
  position: absolute;
  right: 1rem; bottom: 0.6rem;
  width: 2.4rem; height: 2.4rem;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.35);
  background: rgba(0,0,0,.55);
  color: #fff;
  font: 500 0.8rem "Roboto Mono", monospace;
  cursor: pointer;
  z-index: 3;
}
.hero .intro-stage { margin: 0 auto; padding: 0.5rem 0 2.4rem; position: relative; z-index: 2; }
.hero .brand-title { margin: 0 0 1.4rem; font-size: clamp(3rem, 10vw, 7.6rem); line-height: 0.95; }

/* ===== v3: Proyectos / Mochi ===== */
.project {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 2rem 3rem;
  align-items: center;
  padding: 1rem 0 3rem;
}
.project-art {
  margin: 0;
  aspect-ratio: 1;
  max-width: 420px;
  width: 100%;
  justify-self: center;
  background: radial-gradient(circle at 50% 60%, rgba(255,153,204,.18), transparent 65%);
  border-radius: 50%;
}
.project-sprite { width: 100%; height: auto; display: block; image-rendering: auto; }
.project-link {
  display: inline-block;
  font: 500 1.05rem "Red Rose", sans-serif;
  color: var(--on-fill);
  background: var(--gold);
  padding: 0.4rem 0.9rem;
  border-radius: 2px;
  text-decoration: none;
}

/* ===== v3: Mochi desktop pet ===== */
.mochi {
  position: fixed;
  right: 1.25rem;
  bottom: 0;
  z-index: 60;
  width: 120px;
  pointer-events: none;
  transform: translateX(calc(100% + 2rem));
  transition: transform 2.6s linear;
}
.mochi.is-arrived { transform: translateX(0); }
.mochi.is-hidden { transform: translateX(calc(100% + 2rem)); transition-duration: .6s; }
.mochi-body {
  pointer-events: auto;
  display: block;
  width: 100%;
  padding: 0; border: 0; background: none;
  cursor: pointer;
  margin-bottom: -14px;
  -webkit-tap-highlight-color: transparent;
}
.mochi-sprite { display: block; width: 100%; height: auto; filter: drop-shadow(0 6px 12px rgba(0,0,0,.6)); }
.mochi-bubble {
  pointer-events: auto;
  position: absolute;
  right: 70%;
  bottom: 88%;
  width: min(300px, calc(100vw - 7rem));
  background: #fff;
  color: #000;
  border-radius: 14px 14px 2px 14px;
  padding: 0.85rem 2rem 0.75rem 0.95rem;
  box-shadow: 0 10px 30px rgba(0,0,0,.55);
  font-family: "Rubik", system-ui, sans-serif;
  font-size: 0.95rem;
  line-height: 1.4;
}
.mochi-bubble[hidden] { display: none; }
.mochi-label { margin: 0 0 .25rem; font: 500 .8rem "Roboto Mono", monospace; color: #1159cc; }
.mochi-text { margin: 0 0 .5rem; }
.mochi-text a { color: var(--blue); }
.mochi-next, .mochi-close {
  border: 0; background: none; cursor: pointer; color: #000;
  font: 500 .85rem "Roboto Mono", monospace;
  min-height: 44px;
}
.mochi-next { padding: 0; color: #1159cc; }
.mochi-close { position: absolute; top: 0; right: 0; width: 44px; font-size: 1.3rem; }

@media (max-width: 819px) {
  .hero { min-height: auto; }
  .hero-frame { flex: 0 0 auto; padding-top: 1rem; }
  .hero-video { height: auto; max-height: none; }
  .hero .intro-stage { padding: 1.2rem 0 6.5rem; }
  .hero .brand-title { font-size: clamp(2.8rem, 15vw, 4.4rem); }
  .hero-toggle { right: .6rem; bottom: -2.6rem; }
  .project { grid-template-columns: 1fr; gap: 1rem; }
  .project-art { max-width: 240px; }
  .mochi { width: 78px; right: .5rem; }
  .mochi-body { margin-bottom: -9px; }
  .mochi-bubble { right: 60%; bottom: 82%; width: min(250px, calc(100vw - 5.5rem)); font-size: .9rem; }
}
@media (max-height: 500px) and (orientation: landscape) {
  .hero { min-height: auto; }
  .hero-video { max-height: 78svh; height: auto; }
  .mochi { width: 70px; }
}
/* v3 tuning */
.mochi { width: 150px; }
.mochi-body { margin-bottom: -10%; }
@media (min-width: 820px) { .hero .hero-side { margin-right: 150px; } }
@media (max-width: 819px) {
  .mochi { width: 104px; right: .25rem; }
  .mochi-body { margin-bottom: -10%; }
  .mochi-bubble { right: 55%; bottom: 80%; width: min(232px, calc(100vw - 5rem)); padding: .7rem 2.2rem .5rem .8rem; }
}
@media (max-height: 500px) and (orientation: landscape) { .mochi { width: 84px; } }
.mochi-body, .mochi-body { margin-bottom: 0; }
@media (max-width: 819px) { .mochi { width: 92px; } .mochi-body { margin-bottom: 0; } .mochi-bubble { bottom: 88%; } }
@media (max-height: 500px) and (orientation: landscape) {
  .mochi-bubble { width: 210px; font-size: .8rem; padding: .5rem 2rem .3rem .7rem; bottom: 70%; }
  .mochi-next, .mochi-close { min-height: 34px; }
}

/* ===== v4: talk to Mochi ===== */
.mochi-actions { display: flex; flex-wrap: wrap; gap: .25rem 1rem; align-items: center; }
.mochi-talk { border: 0; cursor: pointer; }
.mochi-actions .mochi-talk {
  background: var(--gold); color: #000;
  font: 500 .9rem "Red Rose", sans-serif;
  border-radius: 999px; padding: 0 .9rem; min-height: 44px;
}
.project-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
button.project-link { border: 0; cursor: pointer; min-height: 44px; }
.project-link { min-height: 44px; display: inline-flex; align-items: center; }
.project-link--ghost { background: transparent; color: var(--link); border: 1px solid var(--link); }

.mochi-chat {
  position: fixed; z-index: 80;
  right: 1.25rem; bottom: 1.25rem;
  width: min(380px, calc(100vw - 2.5rem));
  height: min(560px, calc(100svh - var(--header-h) - 2.5rem));
  display: flex; flex-direction: column;
  background: #fff; color: #000;
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,.7);
  font-family: "Rubik", system-ui, sans-serif;
  overflow: hidden;
}
.mochi-chat[hidden] { display: none; }
.mc-head { display: flex; align-items: center; gap: .5rem; padding: .4rem .4rem .4rem .8rem; background: #ffecb3; }
.mc-avatar { width: 40px; height: 40px; }
.mc-title { margin: 0; flex: 1; font: 500 1.05rem "Roboto Mono", monospace; color: #1159cc; }
.mc-forget, .mc-close { border: 0; background: none; cursor: pointer; min-height: 44px; color: #000; font: 500 .8rem "Roboto Mono", monospace; }
.mc-forget { text-decoration: underline; padding: 0 .4rem; }
.mc-close { width: 44px; font-size: 1.5rem; }
.mc-log { flex: 1; overflow-y: auto; padding: .9rem; display: flex; flex-direction: column; gap: .6rem; overscroll-behavior: contain; }
.mc-msg-row { max-width: 88%; padding: .6rem .8rem; border-radius: 14px; line-height: 1.4; font-size: .95rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.mc-mochi { align-self: flex-start; background: #ffecb3; border-bottom-left-radius: 4px; }
.mc-user { align-self: flex-end; background: #ff99cc; color: #000; border-bottom-right-radius: 4px; }
.mc-mochi ol { margin: .35rem 0 .35rem 1.1rem; padding: 0; white-space: normal; }
.mc-mochi a { color: var(--blue); font-weight: 500; }
.mc-keylink { display: inline-flex; align-items: center; min-height: 44px; }
.mc-typing { opacity: .7; font-style: italic; }
.mc-setup, .mc-form { padding: .6rem .7rem .7rem; border-top: 1px solid #ffcc66; background: #fff; }
.mc-setup[hidden], .mc-form[hidden] { display: none; }
.mc-label { display: block; font: 500 .8rem "Roboto Mono", monospace; margin: 0 0 .3rem; color: #1159cc; }
.mc-row, .mc-form { display: flex; gap: .5rem; }
.mc-input { flex: 1; min-width: 0; min-height: 44px; font-size: 16px; padding: 0 .75rem; border: 1px solid #1159cc; border-radius: 10px; color: #000; background: #fff; }
.mc-btn { min-height: 44px; padding: 0 1rem; border: 0; border-radius: 10px; background: #1159cc; color: #fff; font: 500 .95rem "Red Rose", sans-serif; cursor: pointer; }
.mc-btn:disabled { opacity: .5; }
.mc-fine { margin: .35rem 0 0; font-size: .75rem; color: #1159cc; }

@media (max-width: 819px) {
  .mochi-chat {
    left: 0; right: 0; bottom: 0; width: 100%;
    height: min(82svh, 640px);
    border-radius: 18px 18px 0 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .mochi.is-chatting { display: none; }
}
@media (max-height: 500px) and (orientation: landscape) {
  .mochi-chat { height: calc(100svh - 1rem); bottom: .5rem; right: .5rem; left: auto; width: min(420px, calc(100vw - 1rem)); border-radius: 14px; }
}

/* v4: Mochi motion — slow, eased, crossfaded */
.mochi { transition: transform 6.2s cubic-bezier(.25,.1,.25,1); }
.mochi-body { position: relative; }
.mochi-sprite { transition: opacity .3s ease-in-out; }
.mochi-sprite--b { position: absolute; left: 0; top: 0; }
.mochi-body { animation: mochi-breathe 4.2s ease-in-out infinite; transform-origin: 50% 100%; }
.mochi.is-walking .mochi-body { animation: mochi-step 1.12s ease-in-out infinite; }
.mochi-body.is-boop { animation: mochi-boop .55s cubic-bezier(.3,1.6,.5,1) 1, mochi-breathe 4.2s ease-in-out .55s infinite; }
@keyframes mochi-breathe { 0%,100% { transform: translateY(0) scale(1,1); } 50% { transform: translateY(-2px) scale(1.012,.992); } }
@keyframes mochi-step { 0%,50%,100% { transform: translateY(0); } 25%,75% { transform: translateY(-3px); } }
@keyframes mochi-boop { 0% { transform: scale(1,1); } 35% { transform: scale(1.06,.93); } 70% { transform: scale(.97,1.04); } 100% { transform: scale(1,1); } }
.mc-chips { background: none !important; padding: 0 !important; display: flex; flex-wrap: wrap; gap: .4rem; }
.mc-chip { min-height: 44px; padding: 0 .9rem; border-radius: 999px; border: 2px solid #ff99cc; background: #fff; color: #1159cc; font: 500 .85rem "Rubik", system-ui, sans-serif; cursor: pointer; }
.mc-sources { display: block; margin-top: .35rem; font-size: .78rem; color: #1159cc; }

/* ===== v5: theme toggle + light theme (official palette, WCAG AA) ===== */
.bar { gap: 1rem; }
.theme-toggle {
  min-height: 44px; min-width: 44px;
  display: inline-flex; align-items: center; gap: .4rem;
  padding: 0 .8rem;
  border-radius: 999px;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--fg);
  font: 500 .85rem "Roboto Mono", ui-monospace, monospace;
  cursor: pointer;
  flex: 0 0 auto;
}
.theme-toggle:hover { border-color: var(--pink); }
.theme-toggle .tt-icon { font-size: 1rem; line-height: 1; }
.logo--color { display: none; }

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #ffffff;
  --fg: #000000;
  --text: #1159cc;
  --muted: #1159cc;
  --accent-text: #1159cc;
  --link: #1159cc;
  --on-fill: #000000;
  --mark-text: #000000;
  --line: rgba(17, 89, 204, 0.16);
  --rule: rgba(17, 89, 204, 0.35);
  --rule-soft: rgba(17, 89, 204, 0.25);
  --header-bg: rgba(255, 255, 255, 0.9);
  --header-bg-solid: rgba(255, 255, 255, 0.98);
  --art-bg: #ffecb3;
  --lightbox-bg: rgba(255, 255, 255, 0.96);
  --lightbox-backdrop: #ffffff;
}
:root[data-theme="light"] body { background-image: none; }
:root[data-theme="light"] .grain { display: none; }
:root[data-theme="light"] .logo--white { display: none; }
:root[data-theme="light"] .logo--color { display: block; }
:root[data-theme="light"] .brand-title,
:root[data-theme="light"] .section-title,
:root[data-theme="light"] .obra-title,
:root[data-theme="light"] .nav a { color: #1159cc; }
:root[data-theme="light"] .nav a:hover { color: #1159cc; border-bottom-color: #ff99cc; }
:root[data-theme="light"] a { text-decoration-color: #ff99cc; text-decoration-thickness: 2px; }
:root[data-theme="light"] a:hover { color: #1159cc; text-decoration-color: #ff6666; }
:root[data-theme="light"] .section-title { text-decoration: underline; text-decoration-color: #ff99cc; text-decoration-thickness: 3px; text-underline-offset: .22em; }
:root[data-theme="light"] .site-header.is-scrolled { border-bottom-color: #ff99cc; }
:root[data-theme="light"] .hero { background: var(--bg); }
:root[data-theme="light"] .kicker { color: #1159cc; }
:root[data-theme="light"] .badge,
:root[data-theme="light"] .pin { background: #ffcc66; color: #000; }
:root[data-theme="light"] .legend .mark { background: #ff99cc; color: #000; }
:root[data-theme="light"] .exhibit-sub,
:root[data-theme="light"] .series-label,
:root[data-theme="light"] .estudios-heading,
:root[data-theme="light"] .art figcaption,
:root[data-theme="light"] .mark { color: #1159cc; }
:root[data-theme="light"] .estudios-list { color: #000; }
:root[data-theme="light"] .estudios-list li { border-left-color: #ff99cc; }
:root[data-theme="light"] .photo-placeholder { border-color: #1159cc; }
:root[data-theme="light"] .photo-mark { color: #1159cc; }
:root[data-theme="light"] .section--projects { background: #ffecb3; }
:root[data-theme="light"] .project-art { background: radial-gradient(circle at 50% 60%, rgba(255,153,204,.45), transparent 65%); }
:root[data-theme="light"] .project-link { background: #ffcc66; color: #000; }
:root[data-theme="light"] .project-link--ghost { background: #fff; color: #1159cc; border-color: #1159cc; }
:root[data-theme="light"] .site-footer { color: #1159cc; }
:root[data-theme="light"] .art img,
:root[data-theme="light"] .about-photo { box-shadow: 0 6px 24px rgba(17, 89, 204, 0.14); }
:root[data-theme="light"] .mochi-bubble,
:root[data-theme="light"] .mochi-chat { border: 2px solid #ff99cc; box-shadow: 0 12px 34px rgba(17, 89, 204, 0.22); }
:root[data-theme="light"] .mochi-sprite { filter: drop-shadow(0 4px 8px rgba(17, 89, 204, 0.25)); }
:root[data-theme="light"] .lightbox-close { color: #1159cc; }
@media (max-width: 819px) {
  .theme-toggle .tt-label { display: none; }
  .theme-toggle { padding: 0; justify-content: center; width: 44px; }
}
.bar { justify-content: flex-start; }
.bar .nav { margin-left: auto; }
@media (max-width: 520px) {
  .theme-toggle { order: 1; margin-left: auto; }
  .bar .nav { order: 2; margin-left: 0; }
}
:root[data-theme="light"] { --art-bg: #ffffff; }
:root[data-theme="light"] .theme-toggle { border-color: #1159cc; color: #1159cc; }
:root[data-theme="light"] .theme-toggle:hover { background: #ff99cc; color: #000; border-color: #ff99cc; }
.mochi-body .mochi-sprite { position: relative; } .mochi-body .mochi-sprite--b { position: absolute; left: 0; top: 0; }

/* ===== v6: Mochi chat as a compact floating "mini pantalla" next to Mochi ===== */
.mochi-chat {
  right: calc(1.25rem + 150px + .5rem); bottom: 1.25rem; left: auto; top: auto;
  width: min(300px, calc(100vw - 2rem));
  height: auto; max-height: min(380px, calc(100svh - var(--header-h) - 2.5rem));
  border-radius: 16px;
  border: 2px solid #1159cc;
  box-shadow: 0 14px 40px rgba(0,0,0,.55);
  padding-bottom: 0;
}
.mochi-chat .mc-head { padding: 0 0 0 .55rem; gap: .35rem; min-height: 44px; }
.mochi-chat .mc-avatar { width: 30px; height: 30px; }
.mochi-chat .mc-title { font-size: .92rem; }
.mochi-chat .mc-forget { font-size: .72rem; padding: 0 .3rem; }
.mochi-chat .mc-log { flex: 1 1 auto; min-height: 120px; padding: .6rem .65rem; gap: .45rem; }
.mochi-chat .mc-msg-row { font-size: .88rem; line-height: 1.38; padding: .5rem .65rem; max-width: 92%; }
.mochi-chat .mc-chip { font-size: .8rem; padding: 0 .7rem; }
.mochi-chat .mc-setup, .mochi-chat .mc-form { padding: .45rem .55rem .55rem; flex: 0 0 auto; }
.mochi-chat .mc-label { font-size: .74rem; margin-bottom: .25rem; }
.mochi-chat .mc-btn { padding: 0 .8rem; font-size: .88rem; }
.mochi-chat .mc-fine { font-size: .7rem; margin-top: .25rem; }
.mochi.is-chatting { display: block; }
.mochi.is-chatting .mochi-bubble { display: none; }
@media (max-width: 819px) {
  .mochi-chat {
    left: auto; right: .5rem; bottom: calc(92px + .6rem + env(safe-area-inset-bottom));
    width: min(310px, calc(100vw - 1rem));
    height: auto; max-height: min(44svh, 340px);
    border-radius: 16px; padding-bottom: 0;
  }
  .mochi.is-chatting { display: block; }
}
@media (max-height: 500px) and (orientation: landscape) {
  .mochi-chat { right: calc(84px + 1rem); bottom: .5rem; left: auto; width: min(320px, calc(100vw - 7rem)); height: auto; max-height: calc(100svh - 1rem); }
}
:root[data-theme="light"] .mochi-chat { border: 2px solid #1159cc; box-shadow: 0 12px 30px rgba(17, 89, 204, 0.25); }

/* ===== v7: phone keyboard docking (JS sets bottom/left/width/max-height from visualViewport) ===== */
html.mc-kb .mochi-chat { right: auto; top: auto; border-radius: 14px; transition: none; }
html.mc-kb .mochi { display: none !important; }
html.mc-kb .mochi-chat .mc-chips { display: none; }
html.mc-kb .mochi-chat .mc-log { min-height: 0; }
html.mc-kb .mochi-chat .mc-head { min-height: 44px; }

/* ===== v8: header reads as an index of sections ===== */
.nav-toggle, .nav-kicker { display: none; }
.nav a {
  display: inline-flex; align-items: center; min-height: 44px;
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: #ff99cc;
  text-decoration-thickness: 2px;
  text-underline-offset: .38em;
  border-bottom: 0;
  transition: color .2s ease, text-decoration-color .2s ease, text-decoration-thickness .2s ease;
}
.nav a:hover, .nav a:focus-visible { color: #ff99cc; text-decoration-color: #ff99cc; text-decoration-thickness: 3px; border-bottom: 0; }
.nav a[aria-current="location"] { color: #ffcc66; text-decoration-color: #ffcc66; text-decoration-thickness: 3px; }
:root[data-theme="light"] .nav a { color: #1159cc; text-decoration-color: #ff99cc; }
:root[data-theme="light"] .nav a:hover, :root[data-theme="light"] .nav a:focus-visible { color: #1159cc; text-decoration-color: #ff99cc; text-decoration-thickness: 4px; }
:root[data-theme="light"] .nav a[aria-current="location"] { color: #000; text-decoration-color: #1159cc; text-decoration-thickness: 3px; }

/* Desktop: one row of section titles */
@media (min-width: 980px) {
  .bar .nav { flex-wrap: nowrap; gap: 0 2rem; font-size: .9rem; margin-left: auto; margin-right: .5rem; }
  .nav a { white-space: nowrap; }
}

/* Narrow (phones, tablets, landscape phones): «Secciones» control + panel */
@media (max-width: 979px) {
  :root { --header-h: 3.5rem; }
  .bar { flex-wrap: nowrap !important; min-height: var(--header-h); gap: .75rem; position: static; }
  .site-header { z-index: 70; }
  .site-header.nav-open { z-index: 95; background: var(--header-bg-solid); }
  .logo { width: 34px; }
  .nav-toggle {
    display: inline-flex; align-items: center; gap: .45rem;
    min-height: 44px; padding: 0 .35rem 0 .5rem; margin-left: .25rem;
    background: none; border: 0; cursor: pointer;
    color: var(--text);
    font: 500 1rem "Roboto Mono", ui-monospace, monospace;
  }
  .nav-toggle-label { text-decoration: underline; text-decoration-color: #ff99cc; text-decoration-thickness: 2px; text-underline-offset: .38em; }
  .nav-chevron { transition: transform .2s ease; }
  .nav-toggle[aria-expanded="true"] .nav-chevron { transform: rotate(180deg); }
  :root[data-theme="light"] .nav-toggle { color: #1159cc; }
  .theme-toggle { margin-left: auto !important; order: 3 !important; }
  .bar .nav {
    display: none; order: 4 !important;
    position: absolute; left: 0; right: 0; top: 100%;
    margin: 0 !important; width: auto !important;
    flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 0;
    padding: .5rem 1.25rem 1rem;
    background: var(--header-bg-solid);
    border-bottom: 2px solid #ff99cc;
    box-shadow: 0 18px 40px rgba(0,0,0,.45);
    max-height: calc(100svh - var(--header-h)); overflow-y: auto; overscroll-behavior: contain;
    font-size: 1.15rem;
  }
  .site-header.nav-open .nav { display: flex; }
  .nav-kicker { display: block; margin: .35rem 0 .25rem; font: 500 .75rem "Roboto Mono", monospace; letter-spacing: .12em; text-transform: uppercase; color: #ffcc66; }
  :root[data-theme="light"] .nav-kicker { color: #1159cc; }
  .nav a { min-height: 52px; padding: .2rem 0 .2rem .9rem; border-left: 4px solid transparent; font-size: 1.15rem; }
  .nav a[aria-current="location"] { border-left-color: #ffcc66; }
  :root[data-theme="light"] .nav a[aria-current="location"] { border-left-color: #1159cc; }
  :root[data-theme="light"] .bar .nav { box-shadow: 0 14px 30px rgba(17,89,204,.18); }
  .feature, .section, .ficha { scroll-margin-top: calc(var(--header-h) + .75rem) !important; }
}
@media (max-width: 979px) and (max-height: 500px) {
  .nav a { min-height: 44px; font-size: 1.05rem; }
  .nav-kicker { margin: .15rem 0; }
}
@media (max-width: 979px) { .bar .nav { background: #000; } :root[data-theme="light"] .bar .nav { background: #fff; } }
