/* Portfolio v2 de Kevin Manel Muñoz (Dust). Estilos de toda la web: un solo archivo, sin frameworks.
   Paleta y tipografía de la marca DustHandler (Marca/LEEME_Marca_DustHandler.md): carbón, grafito, dorado y washi;
   Archivo variable (ancho normal para leer, expandido para nombres y titulares).
   En escritorio la página no hace scroll: categorías a la izquierda y la categoría abierta a la derecha. */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-var.woff") format("woff");
  font-weight: 400 900;
  font-stretch: 100% 125%;
  font-display: swap;
}

:root {
  --ink: #161617;
  --panel: #1c1c1e;
  --raise: #232325;
  --raise-2: #2b2a28;
  --line: #33322f;
  --washi: #f3ece0;
  --washi-2: #d9d2c6;
  --ash: #9a9aa0;
  --gold: #f2b33d;
  --gold-2: #ffcb66;
  --gold-ink: #1d1505;
  --r-l: 22px;
  --r-m: 16px;
  --r-s: 10px;
  --side: 296px;
  --pad: clamp(18px, 2.2vw, 34px);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --fs-xs: 12.5px;
  --fs-s: 13.5px;
  --fs-m: 15px;
  --fs-l: 17px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--washi);
  font: 450 var(--fs-m)/1.5 "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.ic { width: 18px; height: 18px; flex: none; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Estructura ---------- */
.app {
  display: grid;
  grid-template-columns: var(--side) minmax(0, 1fr);
  height: 100vh;
  height: 100dvh;
}
.side {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 30px 22px 24px 26px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, #1a1a1b, var(--ink) 60%);
  z-index: 2;
  min-height: 0;
}
.stage { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
.dust { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.views { position: absolute; inset: 0; z-index: 1; }
.view {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: var(--pad) var(--pad) calc(var(--pad) * .8);
  min-height: 0;
}

/* ---------- Barra lateral ---------- */
.brand { display: flex; align-items: center; gap: 13px; }
.brand-mark { width: 23px; height: auto; transition: transform .5s var(--spring); }
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.08); }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-weight: 800; font-stretch: 112%; font-size: 17.5px; letter-spacing: -.005em; white-space: nowrap; }
.brand-alias { font-weight: 700; font-stretch: 125%; font-size: 13px; color: var(--gold); margin-top: 3px; }
.role { margin: 0; color: var(--washi-2); font-size: var(--fs-s); line-height: 1.45; max-width: 30ch; }
.avail { display: flex; align-items: center; gap: 9px; margin: -6px 0 0; font-size: var(--fs-xs); color: var(--ash); }
.avail-dot { width: 8px; height: 8px; border-radius: 50%; background: #72c295; box-shadow: 0 0 0 0 rgba(114, 194, 149, .5); animation: ping 2.6s var(--ease) infinite; flex: none; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(114, 194, 149, .45); } 70%, 100% { box-shadow: 0 0 0 9px rgba(114, 194, 149, 0); } }

.nav { position: relative; display: flex; flex-direction: column; gap: 2px; margin: 6px -10px 0; }
.nav a {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 14px;
  height: 42px;
  border-radius: 12px;
  font-weight: 650;
  font-size: 15.5px;
  color: var(--washi-2);
  transition: color .25s var(--ease), background-color .25s var(--ease);
}
.nav a:hover { color: var(--washi); background: rgba(255, 255, 255, .035); }
.nav a[aria-current="page"] { color: var(--gold-ink); background: none; }
.nav-n { margin-left: auto; font-weight: 600; font-size: 12.5px; color: var(--ash); font-variant-numeric: tabular-nums; transition: color .25s; }
/* el icono de cada categoría (20-nov-2026): se dibuja al elegirla (también con «reducir animaciones»: es un trazo, no
   un movimiento) y se ladea un poco al pasar el ratón. Los trazos llevan pathLength="1" en el sprite de index.html. */
.nav-ic { width: 19px; height: 19px; stroke-dasharray: 1; stroke-dashoffset: 0; transition: transform .45s var(--spring); }
.nav a:hover .nav-ic { transform: rotate(-9deg) scale(1.12); }
.nav a[aria-current="page"] .nav-ic { animation: icDraw .75s var(--ease) both; }
@keyframes icDraw { from { stroke-dashoffset: 1; } }
.nav a[aria-current="page"] .nav-n { color: rgba(29, 21, 5, .62); }
.nav-pill {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 42px;
  border-radius: 12px;
  background: var(--gold);
  box-shadow: 0 6px 24px -8px rgba(242, 179, 61, .55), inset 0 1px 0 rgba(255, 255, 255, .35);
  transform: translateY(var(--y, 0));
  transition: transform .55s var(--spring), height .3s var(--ease);
  z-index: 0;
}
.nav-pill.boop { animation: boop .5s var(--spring); }
@keyframes boop { 30% { scale: 1.035 .92; } 60% { scale: .99 1.04; } 100% { scale: 1 1; } }

/* ---------- Contacto, al pie de la barra (29-nov-2026: la propuesta «Lista con título» que eligió Kevin) ----------
   Antes eran botones de tres tamaños, el email cortado («dusthandler@...») y el CV un icono sin nombre, junto al
   idioma. Ahora, una lista con título en la que cada fila dice lo que es (el email entero, que se puede copiar,
   LinkedIn y el currículum en PDF) y el idioma aparte. Una rejilla, para que en pantallas bajas el idioma suba a la
   línea del título sin repetir nada en el HTML. */
.contact { margin-top: auto; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "h h" "list list" "lang lang"; align-items: center; gap: 9px; }
.contact-h { grid-area: h; margin: 0 0 0 4px; font-size: 11px; font-weight: 750; line-height: 1.3; letter-spacing: .14em; text-transform: uppercase; color: var(--ash); }
.contact-list { grid-area: list; display: grid; border-radius: 14px; background: var(--raise); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.contact-item { display: flex; align-items: center; min-width: 0; }
.contact-item + .contact-item { border-top: 1px solid var(--line); }
/* a 13 px el email mide 152 px y le quedan 157: entero, sin puntos suspensivos */
.contact-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 12px 0 13px; font-size: 13px; font-weight: 650; color: var(--washi); transition: background-color .2s; }
.contact-link .ic { width: 16px; height: 16px; color: var(--gold); }
.contact-link span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-link small { margin-left: auto; font-size: 11px; font-weight: 750; letter-spacing: .06em; color: var(--ash); }
.contact-copy { width: 38px; height: 44px; flex: none; display: grid; place-items: center; color: var(--ash); border-left: 1px solid var(--line); transition: background-color .2s, color .2s; }
.contact-copy .ic { width: 16px; height: 16px; }
.contact-link:hover, .contact-copy:hover { background: var(--raise-2); }
.contact-copy:hover { color: var(--washi); }
.contact-copy.ok { color: #72c295; }
/* la lista recorta lo que sobresale (sus esquinas redondas): el contorno del foco va por dentro */
.contact-link:focus-visible, .contact-copy:focus-visible { outline-offset: -3px; border-radius: 12px; }
.contact-lang { grid-area: lang; display: flex; align-items: center; gap: 10px; margin-top: 4px; padding-left: 4px; font-size: 12.5px; font-weight: 650; color: var(--ash); }
.contact-lang .ic { width: 16px; height: 16px; }
.contact-lang .lang { margin-left: auto; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14.5px;
  white-space: nowrap;
  transition: transform .35s var(--spring), background-color .2s, color .2s, box-shadow .2s;
  user-select: none;
}
.btn:active { transform: scale(.96); }
.btn-gold { background: var(--gold); color: var(--gold-ink); box-shadow: 0 8px 28px -12px rgba(242, 179, 61, .8); }
.btn-gold:hover { background: var(--gold-2); transform: translateY(-1px); }
.btn-ghost { background: var(--raise); color: var(--washi); box-shadow: inset 0 0 0 1px var(--line); }
.btn-ghost:hover { background: var(--raise-2); }
.btn-sq { width: 42px; padding: 0; }
.btn.ok { background: #72c295; color: #0e2016; box-shadow: none; }
.lang { display: flex; gap: 4px; align-self: flex-start; padding: 3px; border-radius: 10px; background: var(--raise); box-shadow: inset 0 0 0 1px var(--line); }
.lang button { height: 26px; padding: 0 10px; border-radius: 7px; font-size: 12px; font-weight: 700; color: var(--ash); transition: background .2s, color .2s; }
.lang button[aria-pressed="true"] { background: var(--washi); color: var(--ink); }

/* ---------- Transición entre categorías: el tajo ----------
   1) una línea dorada corta la página en la diagonal del ofuda; 2) las dos mitades de la categoría anterior se
   separan a lo largo del corte; 3) la nueva se abre a través de la herida y su contenido sube en cascada. */
@property --d { syntax: "<length>"; inherits: false; initial-value: 0px; }
.view.in-cut {
  clip-path: polygon(0 calc(var(--yL) - var(--d)), 100% calc(var(--yR) - var(--d)), 100% calc(var(--yR) + var(--d)), 0 calc(var(--yL) + var(--d)));
  animation: open .58s cubic-bezier(.6, 0, .2, 1) .1s both;
}
@keyframes open { from { --d: 0px; } to { --d: 1600px; } }
.view.cut-a { animation: cutA .46s cubic-bezier(.45, 0, .7, .3) .05s both; pointer-events: none; }
.view.cut-b { animation: cutB .46s cubic-bezier(.45, 0, .7, .3) .05s both; pointer-events: none; }
@keyframes cutA { to { transform: translate(34px, -40px) rotate(-1.5deg); opacity: 0; } }
@keyframes cutB { to { transform: translate(-34px, 40px) rotate(1.5deg); opacity: 0; } }
.blade { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 4; pointer-events: none; overflow: visible; }
.blade line { stroke-linecap: round; stroke-dasharray: var(--L); stroke-dashoffset: var(--L); animation: draw .22s cubic-bezier(.6, 0, .25, 1) forwards, bladeOut .35s ease .36s forwards; }
.blade .g { stroke: rgba(242, 179, 61, .6); stroke-width: 12; filter: blur(7px); }
.blade .c { stroke: #fff4d6; stroke-width: 2.4; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes bladeOut { to { opacity: 0; } }
/* móvil y primera pintura sin corte: entrada suave */
.view.in { animation: fadein .45s var(--ease) both; }
@keyframes fadein { from { opacity: 0; transform: translateY(10px); } }
.view.out { animation: away .24s ease both; pointer-events: none; }
@keyframes away { to { opacity: 0; transform: translateX(-12px); } }
.in .rise > *, .in-cut .rise > * { animation: rise .6s var(--ease) both; animation-delay: calc(var(--i, 0) * 35ms + 150ms); }
.in .rise > * { animation-delay: calc(var(--i, 0) * 40ms + 80ms); }
@keyframes rise { from { opacity: 0; transform: translateY(16px) scale(.985); } }

/* ---------- Etiquetas ----------
   Las categorías no llevan título ni entradilla a la vista (el menú ya dice dónde estás): solo un h1 oculto (.sr). */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(243, 236, 224, .07);
  color: var(--washi-2);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}
.chip b { color: var(--gold); font-weight: 750; font-variant-numeric: tabular-nums; }
.chip .ic { width: 14px; height: 14px; }
.chip-gold { background: rgba(242, 179, 61, .14); color: var(--gold-2); }
.chip-soon { background: rgba(155, 124, 240, .16); color: #cdbcff; }
.body { position: relative; flex: 1; min-height: 0; }

/* ---------- Apps y juegos ---------- */
.apps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: clamp(12px, 1.3vw, 20px); height: 100%; }
/* si hay siete tarjetas: arriba tres, algo más grandes, y abajo cuatro, con las filas en proporción a lo que mide cada
   tarjeta para que no se recorte ninguna portada. A Kevin no le convenció y ocultó Slime Lord (23-nov-2026): con
   seis vuelve la rejilla de 3 × 2. Se queda por si vuelven a ser siete, para que no se salga ninguna */
.apps.n7 { grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: minmax(0, 367fr) minmax(0, 310fr); }
.apps.n7 > .card { grid-column: span 3; }
.apps.n7 > .card:nth-child(-n+3) { grid-column: span 4; }
@media (max-width: 1100px) and (min-width: 900px) {
  .view[data-cat="publicado"] { overflow-y: auto; }
  .apps.n7 { height: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; grid-auto-rows: 300px; }
  .apps.n7 > .card, .apps.n7 > .card:nth-child(-n+3) { grid-column: auto; }
}
.card {
  --mx: 50%;
  --my: 30%;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-radius: var(--r-l);
  background: var(--raise);
  overflow: hidden;
  isolation: isolate;
  transition: transform .45s var(--spring), box-shadow .3s var(--ease);
  container: card / size;
}
/* el borde, por encima de la portada (como en .tile): pintado en la tarjeta, la imagen lo tapaba arriba */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .045);
  pointer-events: none;
  transition: box-shadow .3s var(--ease);
}
.card:hover::before { box-shadow: inset 0 0 0 1px rgba(242, 179, 61, .35); }
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(280px circle at var(--mx) var(--my), rgba(242, 179, 61, .13), transparent 62%);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
  z-index: 2;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 22px 40px -24px rgba(0, 0, 0, .9); }
.card:hover::after { opacity: 1; }
.card-hit { position: absolute; inset: 0; z-index: 3; border-radius: inherit; }
/* la portada crece con la tarjeta hasta su proporción (1200×750, 16:10) y no más, para que no se recorten los lados
   (el logo de Hangover Brothers, los slimes); lo que sobre de alto se lo queda el pie, con las etiquetas abajo */
.card-media { position: relative; flex: 1000 1 auto; min-height: 60px; max-height: 62.5cqw; overflow: hidden; background: var(--c, #2a2a2c); }
.card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease), opacity .5s; }
.card:hover .card-media img { transform: scale(1.045); }
.card-body { flex: 1 0 auto; display: flex; flex-direction: column; gap: 7px; padding: 13px 16px 15px; }
.card-head { display: flex; align-items: center; gap: 11px; min-width: 0; }
.card-icon { width: 36px; height: 36px; border-radius: 10px; flex: none; background: var(--c); transition: transform .5s var(--spring); }
/* los iconos de imagen, sin relleno: el de Super Stand tiene el stand recortado y tiene que verse el fondo */
img.card-icon, img.sec-icon, .info-head img { background: none; }
.card:hover .card-icon { transform: rotate(-7deg) scale(1.1); }
.card-mono { display: grid; place-items: center; font-weight: 800; font-stretch: 125%; font-size: 15px; color: var(--gold-ink); background: var(--accent); }
.card h2 { margin: 0; font-size: 17px; font-weight: 780; font-stretch: 112%; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-kind { margin: 2px 0 0; font-size: 12.5px; color: var(--ash); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* la frase siempre ocupa dos líneas, aunque quepa en una: así todos los pies miden lo mismo y las portadas también */
.card-line { margin: 0; font-size: 14px; line-height: 1.4; min-height: 2.8em; color: var(--washi-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-chips { display: flex; gap: 6px; flex-wrap: nowrap; overflow: hidden; mask-image: linear-gradient(90deg, #000 85%, transparent); margin-top: auto; }
@container card (max-height: 250px) {
  .card-line { -webkit-line-clamp: 1; min-height: 1.4em; }
}
@container card (max-height: 205px) {
  .card-chips { display: none; }
}
@container card (aspect-ratio > 1.9) {
  .card { flex-direction: row; }
}

/* imagen con hueco reservado: color medio mientras llega y aparece con suavidad */
.ph-img { opacity: 0; }
.ph-img.ok { opacity: 1; }

/* ---------- Muestrario 3D ---------- */
.p3d { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(300px, 1fr); gap: clamp(14px, 1.6vw, 24px); height: 100%; }
.stage3d {
  position: relative;
  min-height: 0;
  border-radius: var(--r-l);
  overflow: hidden;
  background: radial-gradient(70% 62% at 50% 46%, #33302a 0%, #232325 58%, #1c1c1e 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05);
}
.stage3d::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 13%;
  height: 22%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(242, 179, 61, .12), transparent 70%);
  pointer-events: none;
}
.big3d { position: absolute; inset: 5% 6% 17%; display: grid; place-items: center; }
.big3d img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; filter: drop-shadow(0 18px 22px rgba(0, 0, 0, .35)); }
.big3d img.pop { animation: pop .5s var(--spring); }
@keyframes pop { from { opacity: .3; transform: scale(.9) translateY(8px); } }
.big3d model-viewer { width: 100%; height: 100%; --poster-color: transparent; --progress-bar-color: var(--gold); background: transparent; }
.cap3d { position: absolute; left: 20px; right: 16px; bottom: 16px; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.cap3d h2 { margin: 0; font-weight: 800; font-stretch: 118%; font-size: clamp(19px, 1.7vw, 26px); line-height: 1.05; }
.cap3d p { margin: 5px 0 0; font-size: 13px; color: var(--ash); }
.cap3d-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.vars { display: flex; gap: 6px; padding: 4px; border-radius: 999px; background: rgba(0, 0, 0, .3); }
.vars button { width: 22px; height: 22px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .25); transition: transform .35s var(--spring), box-shadow .2s; }
.vars button[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--ink), 0 0 0 2px var(--gold); transform: scale(1.12); }
.btn-3d { height: 38px; padding: 0 14px; font-size: 13.5px; }
/* visor 3D propio (viewer3d.js): ocupa casi todo el escenario y tiene tres modos */
.stage3d.live .big3d { inset: 54px 10px 72px; }
.v3d { position: absolute; inset: 0; }
.v3d > canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.v3d > canvas:active { cursor: grabbing; }
.v3d-maps { position: absolute; inset: 0; overflow: auto; display: flex; flex-direction: column; gap: 14px; padding: 2px 4px; scrollbar-width: thin; }
/* el color con sus UV, grande a la izquierda; normales y ORM apilados a la derecha */
.v3d-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 10px; align-items: start; }
.v3d-row figure:first-child { grid-row: span 3; }
.v3d-maps figure { margin: 0; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.v3d-maps canvas { width: 100%; height: auto; aspect-ratio: 1; border-radius: 10px; background: #1c1c1e; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); cursor: zoom-in; transition: transform .35s var(--spring); }
.v3d-maps canvas:hover { transform: scale(1.02); }
.v3d-maps figcaption { font-size: 12px; font-weight: 650; color: var(--ash); }
.modes3d { position: absolute; top: 12px; left: 12px; z-index: 3; display: flex; gap: 3px; padding: 4px; border-radius: 12px; background: rgba(22, 22, 23, .78); backdrop-filter: blur(6px); }
.modes3d button { height: 30px; padding: 0 12px; border-radius: 9px; font-size: 12.5px; font-weight: 700; color: var(--washi-2); transition: background .2s, color .2s; }
.modes3d button:hover { color: var(--washi); background: rgba(255, 255, 255, .06); }
.modes3d button[aria-pressed="true"] { background: var(--gold); color: var(--gold-ink); }
.stage3d.maps .spin3d { opacity: 0; }
.spin3d { position: absolute; top: 14px; right: 14px; font-size: 12px; color: var(--ash); display: flex; gap: 6px; align-items: center; opacity: 0; transition: opacity .3s; }
.stage3d.live .spin3d { opacity: 1; }
.load3d { position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--gold); transform-origin: 0 50%; transform: scaleX(0); transition: transform .3s; }

.browse { display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.thumbs { position: relative; flex: 1; min-height: 0; }
.tgrid { position: absolute; inset: 0; display: grid; gap: 8px; align-content: start; }
/* el catálogo: todos los modelos, agrupados por proyecto, con su propio scroll y el título del grupo fijo arriba */
.scroll, .cat3d { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(243, 236, 224, .2) transparent; }
.cat3d { padding-right: 4px; }
.tgroup + .tgroup { margin-top: 18px; }
.tgroup h3 { position: sticky; top: 0; z-index: 1; margin: 0 0 8px; padding: 2px 0 8px; display: flex; align-items: baseline; gap: 8px; font-size: 14.5px; font-weight: 780; font-stretch: 112%; background: linear-gradient(var(--ink) 72%, transparent); }
.tgroup h3 .n, .sec-head .n { min-width: 24px; height: 21px; padding: 0 7px; border-radius: 999px; background: rgba(243, 236, 224, .08); font-size: 11.5px; font-weight: 700; color: var(--washi-2); display: inline-grid; place-items: center; font-variant-numeric: tabular-nums; }
.cat3d { container-type: inline-size; }
.cat3d .tgrid { position: static; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); }
/* Slime Lord y Otros proyectos, arriba y en la misma fila: comparten las columnas del catálogo (subgrid), así las
   miniaturas miden lo mismo que las de Hangover Brothers; cada grupo ocupa tantas columnas como modelos tiene
   (--n) y, si los dos no caben, el segundo baja a otra fila */
.tpair { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); column-gap: 8px; row-gap: 14px; margin-bottom: 18px; }
.tpair .tgroup { grid-column: span var(--n); display: grid; grid-template-columns: subgrid; align-content: start; }
.tpair .tgroup + .tgroup { margin-top: 0; }
.tpair .tgroup h3 { grid-column: 1 / -1; }
.cat3d .tpair .tgrid { grid-column: 1 / -1; grid-template-columns: subgrid; }
@container (max-width: 343px) { .tpair .tgroup { grid-column: 1 / -1; } }
.thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: 14px;
  background: radial-gradient(70% 70% at 50% 45%, #2d2b27, #222224);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .04);
  transition: transform .4s var(--spring), box-shadow .2s, background .2s;
}
.thumb img { position: absolute; inset: 7%; width: 86%; height: 86%; object-fit: contain; transition: transform .45s var(--spring); }
.thumb:hover { transform: translateY(-3px); background: radial-gradient(70% 70% at 50% 45%, #3a362e, #262628); }
.thumb:hover img { transform: scale(1.08) rotate(-2deg); }
.thumb[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--gold), 0 8px 22px -12px rgba(242, 179, 61, .7); }
.thumb .vn { position: absolute; top: 6px; right: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: rgba(0, 0, 0, .45); color: var(--washi-2); font-size: 10.5px; font-weight: 700; display: grid; place-items: center; }
.pager { display: flex; align-items: center; justify-content: center; gap: 10px; flex: none; min-height: 34px; }
.pager[hidden] { display: none; }
.pager button.pg { width: 34px; height: 34px; border-radius: 50%; background: var(--raise); display: grid; place-items: center; transition: transform .35s var(--spring), background .2s, opacity .2s; }
.pager button.pg:hover { background: var(--raise-2); }
.pager button.pg:disabled { opacity: .3; cursor: default; }
.dots { display: flex; gap: 6px; }
.dots i { width: 7px; height: 7px; border-radius: 4px; background: rgba(243, 236, 224, .22); transition: width .35s var(--spring), background .2s; }
.dots i.on { width: 20px; background: var(--gold); }
.page-in { animation: pagein .45s var(--ease) both; }
.page-in.back { animation-name: pageback; }
@keyframes pagein { from { opacity: 0; transform: translateX(28px); } }
@keyframes pageback { from { opacity: 0; transform: translateX(-28px); } }

/* ---------- Galerías ---------- */
.gal { display: flex; flex-direction: column; gap: 12px; height: 100%; min-height: 0; }
/* galerías con varias secciones (animación, UI/UX, más trabajos): todas a la vista, una debajo de otra */
.body.scroll { margin-right: -8px; padding-right: 8px; }
.secs { display: flex; flex-direction: column; gap: 26px; padding-bottom: 12px; }
.sec-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 10px; margin: 0 0 10px; padding: 2px 0 10px; background: linear-gradient(var(--ink) 78%, transparent); }
.sec-head h2 { margin: 0; font-size: 18px; font-weight: 800; font-stretch: 115%; letter-spacing: -.005em; }
.sec-kind { font-size: 13px; color: var(--ash); }
.sec-icon { width: 28px; height: 28px; border-radius: 8px; flex: none; background: var(--c); }
.sec-head .case-link { margin-left: auto; }
.sgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--min, 200px), 1fr)); gap: 10px; }
.sgrid .tile { aspect-ratio: var(--ar, 1.33); }
.case-link { font-size: 13px; font-weight: 650; color: var(--gold); display: inline-flex; align-items: center; gap: 6px; }
.case-link:hover { color: var(--gold-2); }
.ggrid { position: absolute; inset: 0; display: grid; gap: 10px; }
.tile {
  position: relative;
  min-height: 0;
  border-radius: var(--r-m);
  overflow: hidden;
  background: var(--c, #2a2a2c);
  text-align: left;
  transition: transform .45s var(--spring);
}
/* el borde va en una capa por encima de la imagen: pintado en la propia tarjeta, la imagen (o el vídeo, que crece
   al pasar el ratón) lo tapaba entero o a trozos */
.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05);
  pointer-events: none;
  transition: box-shadow .25s;
}
.tile img, .tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease), opacity .5s; }
/* logos: sobre papel washi, para que también se vean los de trazo negro */
.tile.contain { background: radial-gradient(85% 85% at 50% 42%, #faf6ee, #e6ddcd); }
.tile.contain img { object-fit: contain; padding: 10% 10% 22%; }
.tile.contain:hover img { transform: scale(1.04); }
.tile.pixel img { image-rendering: pixelated; object-fit: contain; padding: 10%; }
/* mientras se anima (al pasar el ratón), solo se ve la hoja animada: la fija de debajo asomaba por los huecos */
.tile.pixel.playing .ph-img { visibility: hidden; }
.tile.fit { background: #1e1e20; } /* las franjas, del gris del escenario: no del color medio de la pieza */
.tile.fit img, .tile.fit video { object-fit: contain; }
.tile:hover { transform: translateY(-3px); }
.tile:hover::after { box-shadow: inset 0 0 0 1px rgba(242, 179, 61, .4); }
.tile:hover img { transform: scale(1.05); }
.tile-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 26px 12px 10px;
  background: linear-gradient(transparent, rgba(12, 12, 13, .82));
  font-size: 13px;
  font-weight: 650;
  line-height: 1.25;
  color: var(--washi);
  transform: translateY(6px);
  opacity: .92;
  transition: transform .35s var(--ease), opacity .3s;
}
.tile:hover .tile-cap { transform: none; opacity: 1; }
.tile-cap small { display: block; margin-top: 2px; font-weight: 500; font-size: 11.5px; color: var(--ash); }
.tile .play { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 50%; background: rgba(0, 0, 0, .5); display: grid; place-items: center; color: var(--washi); transition: transform .35s var(--spring), opacity .3s; }
.tile .play .ic { width: 14px; height: 14px; }
.tile.playing .play { opacity: 0; transform: scale(.6); }


/* ---------- Sobre mí (rediseño del 20-nov-2026, «Disciplinas») ----------
   Arriba, quién es (foto, presentación, CV y redes); debajo, una columna por disciplina con sus programas y el
   enlace a su sección; al final, formación, idiomas y motores, cada uno con su icono. */
.ab { display: grid; gap: clamp(12px, 1.8vh, 18px); }
.ab-intro { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: clamp(18px, 2.4vw, 36px); align-items: center; padding: 2px 2px 4px; }
.ab-photo { width: clamp(96px, 8.6vw, 132px); height: auto; aspect-ratio: 1; border-radius: 50%; object-fit: cover; background: var(--c); box-shadow: 0 0 0 3px var(--ink), 0 0 0 5px var(--gold), 0 18px 40px -20px #000; margin: 5px; }
.ab-who h2 { margin: 0 0 7px; font-size: 22px; font-weight: 800; font-stretch: 115%; line-height: 1.1; }
.ab-who h2 small { margin-left: 10px; font-size: 14px; font-weight: 700; font-stretch: 100%; color: var(--gold); }
.ab-who p { margin: 0; font-size: clamp(15px, 1.12vw, 16.5px); line-height: 1.6; color: var(--washi-2); max-width: 80ch; text-wrap: pretty; }
.ab-act { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
/* redes: el logo de cada web, en blanco sobre su color */
.social { display: flex; flex-wrap: wrap; gap: 8px; }
.soc { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: var(--b); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), 0 10px 24px -14px var(--b); transition: transform .35s var(--spring), filter .2s; }
.soc .ic { width: 21px; height: 21px; }
.soc:hover { transform: translateY(-3px) scale(1.06); filter: brightness(1.12); }
.soc-linkedin { --b: #0a66c2; }
.soc-artstation { --b: #13aff0; }
.soc-itch { --b: #fa5c5c; }
.soc-github { --b: #3a424c; }
.soc-instagram { --b: #d6249f; background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%); }
/* las disciplinas */
.ab-cols { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.ab-col, .ab-fact { min-width: 0; border-radius: var(--r-l); background: var(--raise); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .045); padding: clamp(16px, 1.5vw, 22px); }
.ab-col { display: flex; flex-direction: column; gap: 7px; transition: box-shadow .25s; }
.ab-col:hover { box-shadow: inset 0 0 0 1px rgba(242, 179, 61, .3); }
.ab-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(242, 179, 61, .12); color: var(--gold); margin-bottom: 2px; }
.ab-ic .ic { width: 22px; height: 22px; }
.ab-col h3 { margin: 0; font-size: 16px; font-weight: 780; font-stretch: 108%; line-height: 1.2; }
.ab-col .tool { white-space: normal; }
.ab-col > p { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--ash); }
.ab-col > p b { color: var(--washi-2); font-weight: 650; }
.ab-tools { margin: 0; padding: 0; list-style: none; display: grid; gap: 5px; }
.ab-col .ab-tools { margin-top: 6px; padding-top: 11px; border-top: 1px solid var(--line); }
.tool { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 560; color: var(--washi-2); white-space: nowrap; }
.tool img { width: 18px; height: 18px; object-fit: contain; flex: none; }
.ab-go { margin-top: auto; padding-top: 10px; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.ab-go a { display: inline-flex; align-items: center; gap: 3px; font-size: 13px; font-weight: 700; color: var(--gold); }
.ab-go .ic { width: 15px; height: 15px; transition: transform .35s var(--spring); }
.ab-go a:hover .ic { transform: translateX(3px); }
/* formación, idiomas y motores */
.ab-facts { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 12px; }
.ab-fact h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 14px; font-weight: 750; color: var(--gold); }
.ab-fic { width: 30px; height: 30px; border-radius: 9px; flex: none; display: grid; place-items: center; background: rgba(242, 179, 61, .12); }
.ab-fic .ic { width: 17px; height: 17px; }
.edu { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.ab-edu .edu { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 26px; }
.edu li { display: grid; gap: 2px; align-content: start; }
.edu b { font-size: 14px; font-weight: 650; line-height: 1.3; color: var(--washi); text-wrap: pretty; }
.edu small { font-size: 12.5px; color: var(--ash); }
.langs { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, max-content); gap: 10px 30px; }
.langs li { display: flex; align-items: center; gap: 9px; font-size: 14.5px; white-space: nowrap; }
.langs b { font-weight: 650; color: var(--washi); }
.langs li > span:last-child { color: var(--ash); }
.flag { width: 24px; height: 16px; border-radius: 3px; overflow: hidden; flex: none; box-shadow: 0 0 0 1px rgba(255, 255, 255, .14), 0 4px 10px -6px #000; }
.flag svg { width: 100%; height: 100%; }
@media (max-width: 899px) {
  .ab-intro { grid-template-columns: auto minmax(0, 1fr); gap: 14px 18px; }
  .ab-who { display: contents; }
  .ab-who h2 { margin: 0; }
  .ab-who h2 small { display: block; margin: 5px 0 0; }
  .ab-who p, .ab-act { grid-column: 1 / -1; }
  .ab-act { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .ab-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ab-facts, .ab-edu .edu { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1240px) and (min-width: 900px) {
  .ab-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .ab-cols { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- UX/UI (rediseño del 20-nov-2026): un caso por app, en una tarjeta de su color ----------
   A la izquierda, el titular, la entradilla, los objetivos y los botones; a la derecha, sus pantallas destacadas:
   tres móviles en abanico o, si es de escritorio, una ventana grande con otra delante. */
.ux { display: grid; gap: 18px; }
.ux-case { --acc: var(--gold); position: relative; display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); align-items: center; gap: clamp(20px, 3vw, 52px); padding: clamp(22px, 2.6vw, 40px); border-radius: 28px; background: var(--bg); color: #201c17; overflow: hidden; }
.ux-case.dark { color: var(--washi); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.ux-app { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.ux-icon { width: 34px; height: 34px; border-radius: 9px; flex: none; }
.ux-app b { font-size: 16px; font-weight: 780; font-stretch: 110%; }
.ux-app span { opacity: .6; }
.ux-text h2 { margin: 16px 0 10px; font-size: clamp(22px, 2.05vw, 31px); font-weight: 820; font-stretch: 118%; line-height: 1.08; letter-spacing: -.01em; text-wrap: balance; }
.ux-lead { margin: 0; font-size: 15px; line-height: 1.6; opacity: .78; max-width: 58ch; text-wrap: pretty; }
.ux-points { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.ux-points li { display: flex; gap: 10px; font-size: 14.5px; line-height: 1.45; font-weight: 580; }
.ux-points .ic { width: 18px; height: 18px; margin-top: 1px; color: var(--acc); }
.ux-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.ux-main { background: var(--acc); color: #fff; box-shadow: 0 12px 28px -14px var(--acc); }
.ux-main:hover { filter: brightness(1.08); transform: translateY(-1px); }
.ux-sub { background: rgba(0, 0, 0, .06); color: inherit; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .09); }
.ux-sub:hover { background: rgba(0, 0, 0, .1); }
.ux-case.dark .ux-sub { background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.ux-case.dark .ux-sub:hover { background: rgba(255, 255, 255, .12); }
.ux-vis { position: relative; display: block; width: 100%; aspect-ratio: 1.3; padding: 0; cursor: zoom-in; }
.ux-vis img { position: absolute; height: auto; border-radius: 14px; background: var(--c); box-shadow: 0 26px 50px -24px rgba(20, 14, 6, .55); transition: transform .6s var(--spring); }
.ux-case.dark .ux-vis img { box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 26px 50px -24px #000; }
.ux-vis img:nth-child(1) { width: 35%; left: 32.5%; top: 1%; z-index: 2; }
.ux-vis img:nth-child(2) { width: 30%; left: 3%; top: 11%; transform: rotate(-6deg); }
.ux-vis img:nth-child(3) { width: 30%; right: 3%; top: 11%; transform: rotate(6deg); }
.ux-vis.desk { aspect-ratio: 1.4; }
.ux-vis.desk img { border-radius: 12px; }
.ux-vis.desk img:nth-child(1) { width: 90%; left: 0; top: 0; transform: none; z-index: 1; }
.ux-vis.desk img:nth-child(2) { width: 52%; left: auto; right: 0; top: auto; bottom: 0; transform: none; z-index: 2; box-shadow: 0 30px 60px -22px rgba(20, 14, 6, .6); }
@media (prefers-reduced-motion: no-preference) {
  .ux-vis:hover img:nth-child(1) { transform: translateY(-6px); }
  .ux-vis:hover img:nth-child(2) { transform: rotate(-9deg) translateX(-10px); }
  .ux-vis:hover img:nth-child(3) { transform: rotate(9deg) translateX(10px); }
  .ux-vis.desk:hover img:nth-child(1) { transform: translate(-4px, -4px); }
  .ux-vis.desk:hover img:nth-child(2) { transform: translate(6px, 6px); }
}

/* ---------- Logos (antes «Más trabajos», 20-nov-2026): cada logo en una tarjeta de su color ---------- */
.lg { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 14px; align-content: start; }
.lg-item { margin: 0; min-width: 0; display: grid; gap: 8px; }
.lg-item.big { grid-column: span 2; }
/* 16:9, como las imágenes que traen su fondo (Cherry Glasses, Upfears): esas llenan la tarjeta (fill); las demás van
   con aire alrededor (el padding de la imagen, que object-fit respeta) */
.lg-card { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--r-l); background: var(--bg); overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); transition: transform .45s var(--spring), box-shadow .3s; }
.lg-card img, .lg-card video { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; padding: 9% 15%; object-fit: contain; transition: transform .6s var(--ease); }
.lg-item.big .lg-card img, .lg-item.big .lg-card video { padding: 10% 20%; }
.lg-card.fill img, .lg-card.fill video { padding: 0; object-fit: cover; }
.lg-card:hover { transform: translateY(-4px); box-shadow: 0 22px 40px -24px #000, inset 0 0 0 1px rgba(242, 179, 61, .4); }
.lg-card:hover img, .lg-card:hover video { transform: scale(1.04); }
.lg-item figcaption { display: flex; align-items: baseline; gap: 8px; padding: 0 4px; min-width: 0; }
.lg-item figcaption b { font-size: 14px; font-weight: 720; white-space: nowrap; }
.lg-item figcaption span { font-size: 12.5px; color: var(--ash); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* el visor: el logo sobre su color */
.lb-logo { display: grid; place-items: center; max-width: min(1100px, 100%); max-height: 100%; padding: clamp(28px, 6vw, 96px); border-radius: 24px; background: var(--bg); box-shadow: 0 30px 80px -30px #000; }
.lb-logo.fill { padding: 0; overflow: hidden; }
.lb-logo > img, .lb-logo > video { max-width: 100%; max-height: calc(100dvh - 300px); width: auto; height: auto; object-fit: contain; }
.lb-logo.fill > img, .lb-logo.fill > video { max-height: calc(100dvh - 140px); }
@media (max-width: 899px) {
  .ux-case { grid-template-columns: minmax(0, 1fr); }
  .lg { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Ficha de un proyecto (diálogo) ---------- */
dialog { padding: 0; border: 0; color: var(--washi); }
dialog::backdrop { background: rgba(10, 10, 11, .72); backdrop-filter: blur(6px); }
.dlg {
  width: min(1180px, 94vw);
  height: min(760px, 92dvh);
  max-width: none;
  max-height: none;
  border-radius: 26px;
  background: var(--panel);
  box-shadow: 0 40px 120px -30px rgba(0, 0, 0, .9), inset 0 0 0 1px rgba(255, 255, 255, .06);
  overflow: hidden;
}
.dlg[open] { animation: dlgin .5s var(--spring); }
.dlg[open]::backdrop { animation: fade .3s ease; }
.dlg.closing { animation: dlgout .22s ease both; }
@keyframes dlgin { from { opacity: 0; transform: translateY(24px) scale(.96); } }
@keyframes dlgout { to { opacity: 0; transform: translateY(12px) scale(.98); } }
@keyframes fade { from { opacity: 0; } }
.dlg-in { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, 1fr); height: 100%; }
.shots { position: relative; min-width: 0; background: var(--sbg, #202022); overflow: hidden; }
.shots-track { height: 100%; display: flex; gap: 16px; padding: 28px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.shots-track::-webkit-scrollbar { display: none; }
.shot { position: relative; flex: none; height: 100%; aspect-ratio: var(--ar, 9 / 16); scroll-snap-align: center; border-radius: 16px; overflow: hidden; background: var(--c); box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .7); cursor: zoom-in; }
.shot img, .shot video { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: contain; }
.shot.wide { height: auto; width: min(100%, 860px); max-height: 100%; align-self: center; }
.shot-nav { position: absolute; top: 50%; translate: 0 -50%; width: 44px; height: 44px; border-radius: 50%; background: rgba(22, 22, 23, .78); display: grid; place-items: center; transition: transform .35s var(--spring), opacity .2s; }
.shot-nav:hover { transform: scale(1.1); }
.shot-nav.prev { left: 14px; }
.shot-nav.next { right: 14px; }
.info { display: flex; flex-direction: column; gap: 16px; padding: 30px 30px 26px; overflow-y: auto; min-height: 0; }
.info-head { display: flex; align-items: center; gap: 14px; padding-right: 40px; }
.info-head img, .info-head .card-mono { width: 56px; height: 56px; border-radius: 15px; }
.info-head h2 { margin: 0; font-weight: 800; font-stretch: 125%; font-size: 27px; line-height: 1.05; }
.info-head p { margin: 4px 0 0; color: var(--ash); font-size: 13.5px; }
.info .lead { margin: 0; font-size: 15.5px; line-height: 1.55; color: var(--washi); text-wrap: pretty; }
.status { margin: 0; padding: 10px 12px; border-radius: 12px; background: rgba(155, 124, 240, .14); color: #d6c9ff; font-size: 13.5px; font-weight: 600; }
.info h3 { margin: 0 0 8px; font-size: 13px; font-weight: 750; color: var(--gold); }
.info ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.info li { position: relative; padding-left: 18px; font-size: 14px; line-height: 1.4; color: var(--washi-2); }
.info li::before { content: ""; position: absolute; left: 2px; top: .5em; width: 7px; height: 7px; border-radius: 2px; background: var(--gold); transform: rotate(45deg) scale(.8); }
.info .role-line { margin: 0; font-size: 14px; color: var(--washi-2); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 6px; }
.cta .btn { height: 44px; }
.btn-soon { background: rgba(155, 124, 240, .16); color: #d6c9ff; cursor: default; }
.btn-soon:active { transform: none; }
.x { position: absolute; top: 16px; right: 16px; z-index: 5; width: 40px; height: 40px; border-radius: 50%; background: rgba(22, 22, 23, .8); display: grid; place-items: center; transition: transform .35s var(--spring), background .2s; }
.x:hover { transform: rotate(90deg); background: var(--raise-2); }
.yt { position: relative; flex: none; width: min(100%, 900px); aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #000; scroll-snap-align: center; align-self: center; box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .7); }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt button { position: absolute; inset: 0; display: grid; place-items: center; background: #111 center / cover no-repeat; }
.yt button span { width: 74px; height: 74px; border-radius: 50%; background: var(--gold); color: var(--gold-ink); display: grid; place-items: center; box-shadow: 0 10px 40px -8px rgba(242, 179, 61, .8); transition: transform .4s var(--spring); }
.yt button:hover span { transform: scale(1.1); }
.yt button .ic { width: 30px; height: 30px; margin-left: 4px; }

/* ---------- Visor de imágenes ---------- */
.lb { width: 100vw; height: 100dvh; max-width: none; max-height: none; background: rgba(12, 12, 13, .96); }
.lb[open] { animation: fade .25s ease; display: grid; grid-template-rows: 1fr auto; }
/* la celda del visor tiene alto y ancho fijos (minmax(0, 1fr)): sin eso, el max-height: 100% de la imagen no tenía
   contra qué medirse y las piezas verticales salían a su tamaño real, cortadas por abajo */
.lb-stage { position: relative; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; padding: 56px 72px 12px; min-height: 0; }
.lb-stage > img, .lb-stage > video { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 10px; box-shadow: 0 30px 80px -30px #000; }
.lb-stage > img.pixel { image-rendering: pixelated; }
.lb-stage .sprites { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px; width: min(1000px, 100%); max-height: 100%; overflow: auto; }
.lb-stage .sprites img { width: 100%; image-rendering: pixelated; background: rgba(255, 255, 255, .04); border-radius: 10px; padding: 12px; }
.lb-cap { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 10px 20px 22px; font-size: 14px; color: var(--washi-2); text-align: center; }
.lb-cap b { color: var(--washi); font-weight: 700; }
.lb-cap .num { color: var(--ash); }
.lb .shot-nav { position: absolute; }
.anim-in { animation: lbin .4s var(--spring); }
@keyframes lbin { from { opacity: 0; transform: scale(.94); } }

.toast { position: fixed; left: 50%; bottom: 26px; translate: -50% 0; z-index: 50; padding: 11px 18px; border-radius: 12px; background: var(--washi); color: var(--ink); font-weight: 700; font-size: 14px; box-shadow: 0 20px 50px -20px #000; opacity: 0; transform: translateY(12px) scale(.96); transition: opacity .25s, transform .45s var(--spring); pointer-events: none; }
.toast.on { opacity: 1; transform: none; }
.noscript { padding: 40px; max-width: 60ch; }

/* ---------- Portátiles con poca altura útil (1366×657 con el navegador abierto) ---------- */
@media (max-height: 780px) and (min-width: 900px) {
  .side { gap: 12px; padding: 20px 18px 16px 24px; }
  .role { font-size: 13px; line-height: 1.4; }
  .avail { margin-top: -4px; }
  .nav { margin-top: 2px; }
  .nav a { height: 38px; font-size: 15px; }
  .nav-pill { height: 38px; }
  /* el contacto, más compacto: el idioma sube a la línea del título (sin «Idioma», que ahí no cabe) y las filas
     bajan a 34 px. Así cabe entero hasta 641 px de alto; con menos, la barra ya hace scroll */
  .contact { gap: 7px; grid-template-areas: "h lang" "list list"; }
  .contact-lang { display: contents; }
  .contact-lang > .ic, .contact-lang > span { display: none; }
  .contact-lang .lang { grid-area: lang; }
  .lang button { height: 24px; }
  .contact-link, .contact-copy { height: 34px; }
  .view { gap: 12px; }
}
@container card (max-height: 262px) {
  .card-body { gap: 5px; padding: 10px 14px 12px; }
  .card-icon { width: 30px; height: 30px; border-radius: 8px; }
  .card h2 { font-size: 16px; }
}
/* tarjetas estrechas (pantallas de menos de unos 1300 px, o cuatro por fila si vuelven a ser siete): el título sin
   ensanchar para que quepa «Hangover Brothers» entero. El tipo sigue en una línea: en dos, el pie de esas tarjetas
   crecía y sus portadas quedaban más bajas que las de al lado */
@container card (max-width: 300px) {
  .card h2 { font-stretch: 100%; }
}
@container card (max-width: 240px) {
  .card-body { padding-inline: 14px; }
  .card-head { gap: 9px; }
  .card-icon { width: 30px; height: 30px; border-radius: 8px; }
  .card h2 { font-size: 15.5px; }
}
@container card (max-width: 212px) {
  .card h2 { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
}

/* ---------- Pantallas bajas: se permite scroll dentro de la categoría ---------- */
@media (max-height: 640px) and (min-width: 900px) {
  .view { overflow-y: auto; }
  .apps, .apps.n7 { height: auto; grid-template-rows: none; grid-auto-rows: 290px; }
  .p3d { height: auto; }
  .stage3d { min-height: 420px; }
  .side { overflow-y: auto; }
}

/* ---------- Tablets y móviles: la página hace scroll normal ---------- */
@media (max-width: 899px) {
  body { overflow: auto; }
  .app { display: block; height: auto; }
  .side { position: sticky; top: 0; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 14px 16px 0; border-right: 0; border-bottom: 1px solid var(--line); background: rgba(22, 22, 23, .92); backdrop-filter: blur(10px); z-index: 20; }
  .brand-name { font-size: 16.5px; }
  .role, .avail { display: none; }
  /* el contacto, en la barra de arriba: sin títulos, el email y LinkedIn con su icono y el currículum con su nombre */
  .contact { margin: 0 0 0 auto; display: flex; align-items: center; gap: 6px; }
  .contact-h, .contact-copy, .contact-link small, .contact-lang > .ic, .contact-lang > span { display: none; }
  .contact-list { display: flex; gap: 6px; border-radius: 0; background: none; box-shadow: none; overflow: visible; }
  .contact-item + .contact-item { border-top: 0; }
  .contact-link { flex: none; height: 38px; padding: 0 11px; gap: 8px; border-radius: 12px; background: var(--raise); box-shadow: inset 0 0 0 1px var(--line); }
  .contact-link span { display: none; }
  #cvBtn span { display: inline; }
  .contact-link:focus-visible { outline-offset: 3px; }
  .contact-lang { margin: 0; padding: 0; }
  .lang { align-self: center; }
  .nav { order: 5; flex-direction: row; width: calc(100% + 32px); margin: 4px -16px 0; padding: 0 12px 10px; overflow-x: auto; scrollbar-width: none; gap: 4px; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { flex: none; height: 36px; font-size: 14.5px; padding: 0 13px; gap: 8px; }
  .nav-ic { width: 17px; height: 17px; }
  .nav-n { display: none; }
  .nav-pill { height: 36px; top: 0; left: 0; right: auto; width: var(--w, 80px); transform: translateX(var(--x, 0)); transition: transform .5s var(--spring), width .35s var(--ease); }
  .stage { overflow: visible; }
  .views { position: relative; inset: auto; }
  .view { position: relative; inset: auto; padding: 20px 16px 40px; }
  .view.out { display: none; }
  .apps, .apps.n7 { grid-template-columns: 1fr; grid-template-rows: none; height: auto; }
  .apps.n7 > .card, .apps.n7 > .card:nth-child(-n+3) { grid-column: auto; }
  .card { min-height: 0; container-type: inline-size; }
  .card-media { flex: none; aspect-ratio: 16 / 10; }
  .p3d { grid-template-columns: 1fr; height: auto; }
  .stage3d { aspect-ratio: 1; }
  .thumbs { flex: none; }
  .tgrid, .ggrid { position: relative; inset: auto; }
  .ggrid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; grid-template-rows: none !important; grid-auto-rows: 44vw; }
  .tgrid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
  .tpair { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cat3d .tpair .tgrid { grid-template-columns: subgrid !important; }
  .pager { display: none; }
  .gal { height: auto; }
  /* en móvil hace scroll la página, no cada bloque */
  .scroll, .cat3d { overflow: visible; }
  .body.scroll { margin-right: 0; padding-right: 0; }
  .tgroup h3, .sec-head { position: static; background: none; }
  .sec-head { flex-wrap: wrap; }
  .sgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dlg { width: 100vw; height: 100dvh; border-radius: 0; }
  .dlg-in { grid-template-columns: 1fr; grid-template-rows: 46dvh auto; overflow-y: auto; }
  .info { overflow: visible; padding: 22px 18px 28px; }
  .shots-track { padding: 16px; }
  .lb-stage { padding: 56px 12px 8px; }
  .lb .shot-nav { display: none; }
  .spin3d { display: none; } /* en móvil no cabe junto a los modos del visor, y arrastrar ya es lo natural */
  .blade { display: none; }
}
@media (max-width: 899px) and (min-width: 600px) {
  .apps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ggrid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; grid-auto-rows: 28vw; }
  .tgrid { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; }
  .tpair { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .sgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Con «reducir animaciones» (Windows lo activa al quitar los efectos de animación): nada se desplaza, rebota ni
   gira, pero el tajo sigue: la línea dorada se dibuja y la página nueva se abre por el corte con un fundido. */
@keyframes fadeonly { from { opacity: 0; } }
@keyframes fadeout { to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .dust { display: none; }
  .view.cut-a, .view.cut-b, .view.out { animation-name: fadeout; animation-duration: .3s; }
  .view.in, .in .rise > *, .in-cut .rise > * { animation-name: fadeonly; }
  .page-in, .anim-in, .big3d img.pop, .nav-pill.boop, .avail-dot { animation: none; }
  .dlg[open] { animation: fade .25s ease; }
  .card:hover, .thumb:hover, .tile:hover, .soc:hover, .btn-gold:hover, .btn:active, .nav a:hover .nav-ic, .ab-go a:hover .ic,
  .card:hover .card-media img, .tile:hover img, .tile.contain:hover img, .thumb:hover img, .card:hover .card-icon,
  .brand:hover .brand-mark, .x:hover, .shot-nav:hover, .yt button:hover span { transform: none; }
  .nav-pill { transition: transform .25s ease, height .2s ease; }
  .vars button[aria-pressed="true"] { transform: none; }
}
