:root {
  --fondo: #0f0f0f;
  --superficie: #1a1a1a;
  --texto: #f2f2f2;
  --suave: #9a9a9a;
  --linea: #2c2c2c;
  --fuente: "Archivo", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --ancha: 125%; /* anchura de Archivo para títulos */
  --curva: cubic-bezier(.6, 0, .2, 1);
}
h1, h2, .menu a, .tarjeta .t, .ficha h3, .logo, .boton-reel, .bajar, .filtros button, .enlaces a, .correo { font-stretch: var(--ancha); }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0; background: var(--fondo); color: var(--texto);
  font-family: var(--fuente); font-size: 1rem; line-height: 1.6;
}
a { color: inherit; }
:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.skip { position: absolute; left: -9999px; top: 8px; background: #fff; color: #000; padding: 8px 14px; z-index: 50; }
.skip:focus { left: 8px; }

/* Cuadros de transparencia donde falta una imagen */
.alfa {
  background-color: #222;
  background-image:
    linear-gradient(45deg, #2b2b2b 25%, transparent 25%, transparent 75%, #2b2b2b 75%),
    linear-gradient(45deg, #2b2b2b 25%, transparent 25%, transparent 75%, #2b2b2b 75%);
  background-size: 24px 24px; background-position: 0 0, 12px 12px;
}

/* Cabecera flotante */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 30;
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px clamp(20px, 3vw, 32px); pointer-events: none;
}
.top > * { pointer-events: auto; }
.logo {
  display: grid; place-items: center; width: 48px; height: 48px;
  border: 2px solid #fff; color: #fff; text-decoration: none;
  font-weight: 600; font-size: .8rem; letter-spacing: .25em; line-height: 1.15;
  text-align: center; padding-left: .25em; mix-blend-mode: difference;
}
.hamburguesa {
  position: relative; width: 44px; height: 44px; border: 0; background: none; cursor: pointer;
  mix-blend-mode: difference;
}
.hamburguesa span {
  position: absolute; left: 8px; right: 8px; top: 50%; height: 2px; margin-top: -1px;
  background: #fff; transition: transform .25s, opacity .25s;
}
.hamburguesa span:nth-child(1) { transform: translateY(-9px); }
.hamburguesa span:nth-child(3) { transform: translateY(9px); }
.hamburguesa[aria-expanded="true"] span:nth-child(1) { transform: rotate(45deg); }
.hamburguesa[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburguesa[aria-expanded="true"] span:nth-child(3) { transform: rotate(-45deg); }

/* Selector de idioma: icono de mundo con ENG / ESP */
.acciones { display: flex; align-items: center; gap: 6px; }
.idioma { position: relative; }
.mundo {
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 0; background: none; cursor: pointer; mix-blend-mode: difference;
}
.mundo svg { width: 26px; height: 26px; fill: none; stroke: #fff; stroke-width: 1.6; }
.mundo:hover svg, .mundo[aria-expanded="true"] svg { stroke-width: 2.1; }
.idiomas {
  position: absolute; top: calc(100% + 8px); right: 0;
  display: flex; flex-direction: column; min-width: 92px;
  background: rgba(10,10,10,.96); border: 1px solid var(--linea);
}
.idiomas button {
  font: inherit; font-size: .85rem; font-weight: 600; letter-spacing: .1em; text-align: left;
  background: none; border: 0; padding: 10px 16px; cursor: pointer; color: var(--suave);
}
.idiomas button:hover { color: #fff; }
.idiomas button[aria-pressed="true"] { color: #fff; text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.menu {
  position: fixed; inset: 0; z-index: 25; background: rgba(10,10,10,.96);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
}
.menu a {
  text-decoration: none; font-size: clamp(1.6rem, 5vw, 2.6rem); font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em; color: var(--suave);
}
.menu a:hover { color: #fff; }

/* Hero a pantalla completa */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 420px; overflow: hidden; }
.hero-fondo { position: absolute; inset: 0; }
.hero-fondo > * { width: 100%; height: 100%; object-fit: cover; display: block; }
/* El reel tiene bandas negras (imagen 2.35:1 dentro de 16:9, con el texto del breakdown abajo).
   En el fondo se recortan para que la imagen llene la pantalla. */
.hero-fondo { container-type: size; overflow: hidden; }
.hero-fondo > video {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  width: max(100cqw, 235cqh); height: auto; aspect-ratio: 16 / 9; object-fit: fill;
}
.hero-velo { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,.25), transparent 30%, transparent 70%, rgba(0,0,0,.55)); }
/* Capa de visor sobre el showreel: marcas de safe area, frame, resolución y canales */
.visor-hud { position: absolute; inset: clamp(84px, 11vh, 110px) clamp(20px, 4vw, 56px) clamp(22px, 4vh, 40px); pointer-events: none; }
.esquina { position: absolute; width: 22px; height: 22px; border: 0 solid rgba(255,255,255,.75); }
.e1 { top: 0; left: 0; border-top-width: 1.5px; border-left-width: 1.5px; }
.e2 { top: 0; right: 0; border-top-width: 1.5px; border-right-width: 1.5px; }
.e3 { bottom: 0; left: 0; border-bottom-width: 1.5px; border-left-width: 1.5px; }
.e4 { bottom: 0; right: 0; border-bottom-width: 1.5px; border-right-width: 1.5px; }
.hud {
  position: absolute; bottom: 14px; display: flex; align-items: baseline; gap: 14px;
  font-family: var(--mono); font-size: .78rem; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.6);
  font-variant-numeric: tabular-nums;
}
.hud-izq { left: 18px; }
.hud-der { right: 18px; }
.hud .frame { font-size: .95rem; font-weight: 500; min-width: 4ch; }
.hud-suave { color: rgba(255,255,255,.6); }
.canales { display: flex; gap: 6px; }
.canales b { font-weight: 500; }
.canales .r { color: #ff5a5a; } .canales .g { color: #5aff8a; } .canales .b { color: #6aa8ff; } .canales .a { color: #fff; }
@media (max-width: 640px) { .hud .res, .hud-izq .hud-suave { display: none; } }

.hero-pie {
  position: absolute; left: 0; right: 0; bottom: clamp(48px, 8vh, 72px);
  display: flex; flex-direction: column; align-items: center; gap: 18px;
}
.bajar {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  text-decoration: none; font-weight: 600; font-size: 1.05rem;
  text-shadow: 0 1px 8px rgba(0,0,0,.5);
}
.bajar span[aria-hidden] { font-size: 1.5rem; line-height: 1; }
@media (prefers-reduced-motion: no-preference) {
  .bajar span[aria-hidden] { animation: rebote 2.2s ease-in-out infinite; }
  @keyframes rebote { 50% { transform: translateY(6px); } }
}
.boton-reel {
  font: inherit; font-weight: 600; color: #fff; cursor: pointer;
  background: rgba(0,0,0,.35); border: 2px solid #fff; padding: 10px 22px;
}
.boton-reel:hover { background: #fff; color: #000; }

/* Presentación */
.presentacion { text-align: center; padding: clamp(56px, 8vw, 96px) 20px clamp(40px, 5vw, 64px); }
.presentacion h1 { margin: 0; font-size: clamp(1.6rem, 3.4vw, 2.6rem); font-weight: 600; line-height: 1.2; }
.frase { margin: 10px auto 0; max-width: 46ch; color: var(--suave); font-size: clamp(1rem, 1.6vw, 1.2rem); font-weight: 500; }

/* Filtros */
.filtros { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 26px; padding: 0 20px 28px; }
.filtros button {
  font: inherit; font-size: .85rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em;
  background: none; border: 0; padding: 6px 0; cursor: pointer; color: var(--suave);
  border-bottom: 2px solid transparent;
}
.filtros button:hover { color: #fff; }
.filtros button[aria-pressed="true"] { color: #fff; border-bottom-color: #fff; }
.filtros .n { margin-left: 6px; font-weight: 500; opacity: .6; }

/* Rejilla de borde a borde */
.rejilla { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .rejilla { grid-template-columns: repeat(2, 1fr); } }
/* Si queda un proyecto suelto en la última fila, ocupa el ancho entero */
@media (max-width: 900px) { .rejilla li.sola { grid-column: 1 / -1; } .rejilla li.sola .tarjeta { aspect-ratio: 16 / 9; } }
.tarjeta {
  position: relative; display: block; width: 100%; padding: 0; border: 0;
  background: #000; color: #fff; font: inherit; cursor: pointer; aspect-ratio: 16 / 10; overflow: hidden;
}
.tarjeta img, .tarjeta video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.tarjeta .alfa { position: absolute; inset: 0; }
.tarjeta .info {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; padding: 16px; text-align: center;
  background: rgba(0,0,0,.55); opacity: 0; transition: opacity .3s;
}
.tarjeta .t { font-size: clamp(1rem, 1.6vw, 1.3rem); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.tarjeta .m { font-size: .85rem; color: #d6d6d6; }
.tarjeta:hover .info, .tarjeta:focus-visible .info { opacity: 1; }
.tarjeta:hover img, .tarjeta:hover video { transform: scale(1.04); }
.tarjeta:focus-visible { outline-offset: -4px; }
/* Mientras no haya portada, el título se ve siempre */
.tarjeta:has(.alfa) .info { opacity: 1; background: rgba(0,0,0,.35); box-shadow: inset 0 0 0 1px #262626; }
@media (hover: none) { .tarjeta .info { opacity: 1; background: linear-gradient(to top, rgba(0,0,0,.7), transparent 60%); justify-content: flex-end; } }

/* Proyectos sin estrenar: solo se ve "Soon to release" */
.tarjeta .info.pronto { opacity: 1; background: rgba(0,0,0,.35); box-shadow: inset 0 0 0 1px #262626; justify-content: center; }
.tarjeta .info.pronto .t { letter-spacing: .14em; }
.ficha-media > .alfa.pronto { color: #fff; font-size: clamp(1.2rem, 3vw, 2rem); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }

/* Contacto */
.contacto { text-align: center; padding: clamp(72px, 10vw, 128px) 20px; }
.contacto h2 { margin: 0; font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 600; }
.contacto > p { margin: 6px 0 0; color: var(--suave); font-size: 1.1rem; }
.correo { display: inline-block; margin-top: 28px; font-size: clamp(1.2rem, 3vw, 1.8rem); font-weight: 600; text-decoration: none; border-bottom: 2px solid #fff; word-break: break-all; }
.correo:hover { color: var(--suave); border-color: var(--suave); }
.contacto .telefono { color: var(--suave); margin: 10px 0 0; }
.telefono:empty { display: none; }

/* Sobre mí */
.sobre {
  max-width: 1180px; margin: 0 auto; padding: clamp(64px, 8vw, 104px) clamp(20px, 4vw, 48px);
  border-top: 1px solid var(--linea);
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 72px); align-items: start;
}
.foto { aspect-ratio: 4 / 5; overflow: hidden; position: sticky; top: 96px; }
.foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.foto .falta { display: grid; place-items: center; height: 100%; color: var(--suave); }
.sobre h2 { margin: 0; font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 600; }
.sobre h3 { margin: 40px 0 12px; font-size: 1rem; font-weight: 600; color: var(--suave); }
#bio p { max-width: 62ch; margin: 18px 0 0; color: #d4d4d4; }
#bio p:first-child { color: #fff; font-size: 1.15rem; }
.disponible { display: inline-block; margin: 22px 0 0; padding: 6px 12px; border: 1px solid var(--linea); color: #d4d4d4; }
.experiencia { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--linea); }
.experiencia li { display: grid; grid-template-columns: 9.5rem 1fr; gap: 2px 20px; padding: 14px 0; border-bottom: 1px solid var(--linea); }
.experiencia .anio { color: var(--suave); font-variant-numeric: tabular-nums; }
.experiencia .estudio { font-weight: 600; }
.experiencia .puesto { grid-column: 2; color: var(--suave); }
.experiencia li:not(:has(.anio)) { grid-template-columns: 1fr; }
.experiencia li:not(:has(.anio)) .puesto { grid-column: 1; }
.disponible:empty, .enlaces:empty { display: none; }
.herramientas { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.herramientas li { padding: 5px 12px; background: var(--superficie); font-size: .9rem; }

/* Pie */
.pie { border-top: 1px solid var(--linea); padding: 32px 20px 40px; text-align: center; color: var(--suave); font-size: .9rem; }
.enlaces { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 28px; }
.enlaces a { color: #fff; font-weight: 600; text-decoration: none; text-transform: uppercase; letter-spacing: .08em; font-size: .85rem; }
.enlaces a:hover { color: var(--suave); }
.pie p { margin: 0; }
.enlaces-contacto { margin: 28px 0 0; }
.enlaces-contacto a { font-size: .95rem; border: 1.5px solid #fff; padding: 10px 22px; display: inline-block; }
.enlaces-contacto a:hover { background: #fff; color: #000; }

/* Ficha de proyecto */
.ficha {
  width: min(1200px, calc(100vw - 24px)); max-height: calc(100vh - 24px);
  padding: 0; border: 0; background: var(--superficie); color: var(--texto);
}
.ficha::backdrop { background: rgba(0,0,0,.9); }
.ficha[open] { animation: abrir .22s ease-out; }
@keyframes abrir { from { opacity: 0; transform: translateY(12px); } }
@media (prefers-reduced-motion: reduce) { .ficha[open] { animation: none; } }
.cerrar {
  position: absolute; top: 10px; right: 10px; z-index: 2; width: 40px; height: 40px;
  border: 0; border-radius: 50%; background: rgba(0,0,0,.7); color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer;
}
.ficha-media .video { aspect-ratio: 16 / 9; background: #000; }
/* Reels de Instagram: formato vertical, centrado */
.ficha-media .video.vertical { aspect-ratio: auto; display: flex; justify-content: center; padding: 56px 0 0; background: #000; }
.ficha-media .video.vertical iframe { width: min(400px, 100%); height: min(720px, 75vh); background: #fff; }
.ficha-media iframe, .ficha-media video { width: 100%; height: 100%; border: 0; display: block; background: #000; }
.ficha-media > .alfa { aspect-ratio: 16 / 9; display: grid; place-items: center; color: var(--suave); padding: 20px; text-align: center; }
.ficha-media > * + * { margin-top: 4px; }
.ficha-texto { padding: 24px clamp(20px, 4vw, 40px) 36px; }
.ficha-meta { margin: 0; color: var(--suave); font-size: .9rem; }
.ficha h3 { margin: 6px 0 12px; font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.ficha-texto > p { max-width: 68ch; color: #d4d4d4; }
.tareas { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tareas li { padding: 4px 12px; border: 1px solid #555; font-size: .85rem; }

/* Comparador antes / después dentro de la ficha */
.wipe { margin: 0; }
.visor { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #000; user-select: none; touch-action: pan-y; }
.visor .capa { position: absolute; inset: 0; }
.visor .capa > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.visor .comp { clip-path: inset(0 0 0 var(--pos)); }
.visor .linea { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: #fff; pointer-events: none; }
.visor .asa { position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.5); }
.visor .asa::before, .visor .asa::after { content: ""; position: absolute; top: 50%; margin-top: -6px; border: 6px solid transparent; }
.visor .asa::before { left: 6px; border-right-color: #111; }
.visor .asa::after { right: 6px; border-left-color: #111; }
.visor .rango { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.visor:has(.rango:focus-visible) { outline: 2px solid #fff; outline-offset: -2px; }
.etiqueta { position: absolute; bottom: 12px; padding: 3px 10px; background: rgba(0,0,0,.6); color: #fff; font-size: .8rem; font-weight: 600; }
.etiqueta.izq { left: 12px; }
.etiqueta.der { right: 12px; }
.wipe figcaption { padding: 8px clamp(20px, 4vw, 40px) 0; font-size: .85rem; color: var(--suave); }

@media (max-width: 820px) {
  .sobre { grid-template-columns: 1fr; }
  .foto { position: static; max-width: 420px; }
}
@media (max-width: 560px) {
  .experiencia li { grid-template-columns: 1fr; }
  .experiencia .puesto { grid-column: 1; }
}
.frase:empty { display: none; }

/* Asistente de contacto */
.asistente-boton {
  position: fixed; right: clamp(16px, 3vw, 32px); bottom: clamp(16px, 3vw, 32px); z-index: 40;
  display: inline-flex; align-items: center; gap: 10px;
  font: inherit; font-weight: 600; font-stretch: var(--ancha); font-size: .95rem; color: #fff; cursor: pointer;
  background: rgba(15,15,15,.92); border: 2px solid #fff; padding: 12px 20px;
  opacity: 0; transform: translateY(12px); transition: opacity .4s, transform .4s var(--curva), background .2s, color .2s;
}
.asistente-boton.visible { opacity: 1; transform: none; }
.asistente-boton.oculto { opacity: 0; pointer-events: none; }
.asistente-boton:hover { background: #fff; color: #000; }
.asistente-boton .punto { width: 8px; height: 8px; border-radius: 50%; background: #5aff8a; flex: none; }
@media (prefers-reduced-motion: no-preference) {
  .asistente-boton .punto { animation: latido 2s ease-in-out infinite; }
  @keyframes latido { 50% { opacity: .35; } }
}
.asistente {
  position: fixed; right: clamp(16px, 3vw, 32px); bottom: clamp(16px, 3vw, 32px); z-index: 41;
  width: min(380px, calc(100vw - 32px)); height: min(560px, calc(100svh - 120px));
  display: flex; flex-direction: column; background: var(--superficie); border: 1px solid #3a3a3a;
  box-shadow: 0 18px 50px rgba(0,0,0,.55);
}
.asistente[hidden] { display: none !important; }
@media (prefers-reduced-motion: no-preference) {
  .asistente:not([hidden]) { animation: abrir .25s ease-out; }
}
.asistente-cab { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; border-bottom: 1px solid var(--linea); }
.asistente-logo {
  display: grid; place-items: center; width: 36px; height: 36px; flex: none; border: 2px solid #fff;
  font-size: .6rem; font-weight: 600; letter-spacing: .2em; padding-left: .2em; font-stretch: var(--ancha);
}
.asistente-cab > div { flex: 1; min-width: 0; }
.asistente-titulo { margin: 0; font-weight: 600; line-height: 1.2; }
.asistente-sub { margin: 0; font-size: .8rem; color: var(--suave); }
.asistente-cerrar { width: 36px; height: 36px; border: 0; background: none; color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; }
.asistente-cerrar:hover { color: var(--suave); }
.asistente-mensajes { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.msg { margin: 0; max-width: 85%; padding: 9px 13px; font-size: .93rem; line-height: 1.45; white-space: pre-line; word-wrap: break-word; }
.msg.bot { align-self: flex-start; background: #262626; color: #ececec; }
.msg.yo { align-self: flex-end; background: #fff; color: #000; }
.msg.suave { color: var(--suave); background: none; padding-left: 0; }
.msg.escribiendo { display: flex; gap: 4px; padding: 13px 14px; }
.msg.escribiendo span { width: 6px; height: 6px; border-radius: 50%; background: var(--suave); }
@media (prefers-reduced-motion: no-preference) {
  .msg.escribiendo span { animation: latido 1s ease-in-out infinite; }
  .msg.escribiendo span:nth-child(2) { animation-delay: .15s; }
  .msg.escribiendo span:nth-child(3) { animation-delay: .3s; }
}
.asistente-opciones { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 10px; }
.asistente-opciones:empty { display: none; }
.asistente-opciones button {
  font: inherit; font-size: .85rem; color: #fff; background: none; border: 1px solid #555; padding: 6px 12px; cursor: pointer;
}
.asistente-opciones button:hover { border-color: #fff; }
.asistente-opciones button.principal { background: #fff; color: #000; border-color: #fff; font-weight: 600; }
.asistente-escribir { display: flex; border-top: 1px solid var(--linea); }
.asistente-escribir input {
  flex: 1; min-width: 0; font: inherit; font-size: .95rem; color: #fff; background: none; border: 0; padding: 14px 16px;
}
.asistente-escribir input:focus { outline: none; }
.asistente-escribir:focus-within { box-shadow: inset 0 0 0 1px #fff; }
.asistente-escribir input:disabled { opacity: .4; }
.asistente-escribir button { width: 52px; border: 0; background: none; color: #fff; font-size: 1.2rem; cursor: pointer; }
.asistente-escribir button:hover { background: #fff; color: #000; }
@media (max-width: 560px) {
  .asistente { left: 0; right: 0; bottom: 0; width: auto; height: min(78svh, 600px); border-left: 0; border-right: 0; border-bottom: 0; }
}

/* ===== Ajustes para móvil y cabecera ===== */

/* Cabecera: fondo oscuro al bajar del showreel, para que no tape el texto */
.top { transition: background .3s, padding .3s; }
.top.con-fondo {
  background: rgba(15,15,15,.88); padding-top: 12px; padding-bottom: 12px;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--linea);
}

/* Vídeo de fondo para móvil: ya viene recortado, solo tiene que cubrir */
.hero-fondo > video.movil {
  position: static; translate: none; width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover;
}

/* Zonas táctiles de al menos 44 px */
.filtros button { min-height: 44px; }
.enlaces a { display: inline-block; padding: 12px 4px; }

@media (max-width: 560px) {
  /* Título: nombre y oficio en dos líneas, sin la barra */
  .presentacion { padding-top: 48px; padding-bottom: 28px; }
  .presentacion h1 { font-size: 1.55rem; line-height: 1.25; }
  .presentacion h1 [data-bind] { display: block; }
  .presentacion h1 [data-bind="oficio"] { font-size: .7em; font-weight: 500; color: var(--suave); margin-top: 4px; }
  .presentacion h1 .sep { display: none; }

  /* Filtros en una sola fila; si no caben, se desliza con el dedo */
  .filtros { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; gap: 22px; padding: 0 20px 18px; scrollbar-width: none; }
  .filtros::-webkit-scrollbar { display: none; }
  .filtros button { flex: none; }

  /* Proyectos en cuadrícula de 2 columnas para no bajar tanto */
  .tarjeta { aspect-ratio: 1 / 1; }
  .tarjeta .info { padding: 10px; gap: 2px; }
  .tarjeta .t { font-size: .85rem; letter-spacing: .04em; }
  .tarjeta .m { font-size: .7rem; }
  .tarjeta .info.pronto .t { font-size: .75rem; letter-spacing: .1em; }

  /* Email entero: más pequeño y, si hace falta, corta por el @ */
  .correo { font-size: 1.1rem; font-stretch: 100%; word-break: normal; overflow-wrap: anywhere; }

  /* Botón del chat: círculo con el punto, para no tapar los proyectos */
  .asistente-boton { width: 56px; height: 56px; padding: 0; justify-content: center; border-radius: 50%; }
  .asistente-boton #asistenteBotonTexto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .asistente-boton .punto { width: 12px; height: 12px; }

  /* Ficha del proyecto a pantalla completa; la X arriba, fuera del vídeo */
  .ficha { width: 100vw; max-width: 100vw; height: 100svh; max-height: 100svh; margin: 0; padding-top: 56px; }
  .cerrar { top: 8px; right: 8px; }

  /* Pie con más aire para el dedo */
  .pie { padding-bottom: 96px; }
}

/* Burbuja de aviso del chat: tarjeta con foto, estado "en línea", mensaje y botón */
.asistente-aviso {
  position: fixed; right: clamp(16px, 3vw, 32px); bottom: calc(clamp(16px, 3vw, 32px) + 68px); z-index: 40;
  width: 300px; padding: 16px 16px 14px; border-radius: 16px;
  background: #fff; color: #111; box-shadow: 0 14px 40px rgba(0,0,0,.5);
  opacity: 0; transform: translateY(10px) scale(.97); transform-origin: bottom right;
  transition: opacity .35s, transform .45s cubic-bezier(.2, 1.4, .4, 1);
}
.asistente-aviso.visible { opacity: 1; transform: none; }
.asistente-aviso::after {
  content: ""; position: absolute; right: 26px; bottom: -7px; width: 14px; height: 14px;
  background: #fff; transform: rotate(45deg); border-radius: 0 0 3px 0;
}
.aviso-cab { display: flex; align-items: center; gap: 10px; padding-right: 22px; }
/* Avatar del asistente: el cuadrado JCG de la web con una chispa de IA */
.aviso-avatar {
  position: relative; flex: none; display: grid; place-items: center; width: 40px; height: 40px;
  background: #111; color: #fff; border-radius: 10px;
  font-size: .58rem; font-weight: 600; letter-spacing: .18em; padding-left: .18em; font-stretch: var(--ancha);
}
.aviso-avatar .chispa {
  position: absolute; right: -5px; top: -5px; width: 18px; height: 18px; padding: 2px;
  background: #fff; border-radius: 50%; fill: #2fbf5b;
}
.aviso-nombre { margin: 0; font-size: .9rem; font-weight: 600; line-height: 1.2; }
.aviso-estado { margin: 2px 0 0; display: flex; align-items: center; gap: 6px; font-size: .78rem; color: #4b8a5f; }
.aviso-estado .punto { width: 7px; height: 7px; border-radius: 50%; background: #2fbf5b; }
.aviso-texto { margin: 12px 0 14px; font-size: .92rem; line-height: 1.45; color: #222; cursor: pointer; }
.aviso-accion {
  width: 100%; font: inherit; font-size: .9rem; font-weight: 600; color: #fff; cursor: pointer;
  background: #111; border: 0; border-radius: 10px; padding: 11px 14px;
}
.aviso-accion:hover { background: #333; }
.aviso-cerrar {
  position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; border: 0; border-radius: 50%;
  background: none; color: #777; font-size: 1.2rem; line-height: 1; cursor: pointer;
}
.aviso-cerrar:hover { background: #f0f0f0; color: #000; }
@media (prefers-reduced-motion: reduce) { .asistente-aviso { transition: opacity .2s; transform: none; } }
@media (max-width: 560px) {
  .asistente-aviso { width: min(300px, calc(100vw - 32px)); bottom: calc(clamp(16px, 3vw, 32px) + 70px); }
}
.asistente-logo { position: relative; }
.asistente-logo .chispa { position: absolute; right: -7px; top: -7px; width: 16px; height: 16px; padding: 2px; background: var(--superficie); border-radius: 50%; fill: #2fbf5b; }

/* Aviso de privacidad */
.enlace-privacidad { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.enlace-privacidad:hover { color: #fff; }
.legal { width: min(720px, calc(100vw - 24px)); }
.legal .ficha-texto { padding-top: 32px; }
.legal h3 { margin-right: 48px; }
.legal h4 { margin: 22px 0 6px; font-size: 1rem; font-weight: 700; color: #fff; }
.legal p { margin: 0; color: #d4d4d4; line-height: 1.6; }
