@font-face { font-family: "Bricolage"; src: url("fuentes/bricolage.woff2") format("woff2"); font-weight: 200 800; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2212; }
@font-face { font-family: "Bricolage"; src: url("fuentes/bricolage-ext.woff2") format("woff2"); font-weight: 200 800; font-display: swap; unicode-range: U+0100-024F; }
@font-face { font-family: "Hanken"; src: url("fuentes/hanken-400.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2212; }
@font-face { font-family: "Hanken"; src: url("fuentes/hanken-500.woff2") format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2212; }
@font-face { font-family: "Hanken"; src: url("fuentes/hanken-600.woff2") format("woff2"); font-weight: 600; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2212; }
@font-face { font-family: "Hanken"; src: url("fuentes/hanken-ext-400.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0100-024F; }
@font-face { font-family: "Noto JP"; src: url("fuentes/noto-jp-kana.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --papel: #FBF9F6;
  --tinta: #16181D;
  --suave: #5F636B;
  --linea: #E5E0D8;
  --vino: #7A2338;
  --vino-claro: #F3E4E7;
  --noche: #15161B;
  --noche-2: #1E2027;
  --display: "Bricolage", system-ui, sans-serif;
  --sans: "Hanken", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ancho: 1180px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; overflow-x: clip; }
body { overflow-x: clip; }
body { margin: 0; background: var(--papel); color: var(--tinta); font-family: var(--sans); font-size: 17px; line-height: 1.65; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 { font-family: var(--display); margin: 0; line-height: 1.05; letter-spacing: -.02em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--vino); outline-offset: 3px; border-radius: 6px; }
.saltar { position: absolute; left: -999px; top: 10px; z-index: 300; background: var(--tinta); color: var(--papel); padding: .5em 1em; border-radius: 8px; }
.saltar:focus { left: 16px; }
.etiqueta { display: inline-block; font-size: 15px; font-weight: 600; color: var(--vino); margin-bottom: 18px; padding: 4px 12px; border-radius: 999px; background: var(--vino-claro); }
.etiqueta.clara { background: rgba(255,255,255,.08); color: #E9B9C4; }

/* Firma de entrada */
.intro { position: fixed; inset: 0; z-index: 400; background: var(--papel); display: grid; place-content: center; justify-items: center; gap: 18px; transition: transform .9s cubic-bezier(.7,0,.2,1), opacity .9s; }
.intro.fuera { transform: translateY(-100%); }
.firma { width: min(640px, 82vw); height: auto; color: var(--vino); overflow: visible; }
.firma path { fill: transparent; stroke: currentColor; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.firma.escribe path { animation: trazo 1.9s cubic-bezier(.5,0,.3,1) forwards, relleno .6s ease forwards; animation-delay: calc(var(--i) * .1s), calc(1.2s + var(--i) * .06s); }
@keyframes trazo { to { stroke-dashoffset: 0; } }
@keyframes relleno { to { fill: currentColor; stroke-width: 0; } }
.intro-pie { font-size: 15px; color: var(--suave); letter-spacing: .04em; opacity: 0; animation: aparece .8s 1.6s forwards; }
@keyframes aparece { to { opacity: 1; } }
body.cargando { overflow: hidden; }

/* Cursor */

/* Barra */
.barra { position: fixed; top: 14px; left: 50%; transform: translate(-50%, 0); z-index: 200; width: min(var(--ancho), calc(100% - 28px)); display: flex; align-items: center; gap: 18px; padding: 8px 10px 8px 18px; border-radius: 16px; border: 1px solid var(--linea); background: rgba(251,249,246,.78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: transform .4s ease, background .3s; }
.barra.escondida { transform: translate(-50%, -130%); }
.logo { color: var(--vino); display: flex; align-items: center; height: 40px; }
.firma-logo { height: 40px; width: auto; overflow: visible; transition: transform .3s; }
.logo:hover .firma-logo { transform: rotate(-4deg) scale(1.05); }
.menu { display: flex; gap: 2px; margin: 0 auto; }
.menu a { position: relative; text-decoration: none; font-weight: 500; font-size: 15px; color: var(--suave); padding: 7px 12px; border-radius: 9px; transition: color .2s, background .2s; }
.menu a:hover, .menu a.actual { color: var(--tinta); background: var(--vino-claro); }
.herr-barra { display: flex; align-items: center; gap: 8px; }
.icono { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--linea); color: var(--tinta); transition: background .2s, color .2s, transform .2s; }
.icono:hover { background: var(--tinta); color: var(--papel); transform: translateY(-2px); }
.icono svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.idioma { position: relative; display: flex; align-items: center; height: 40px; padding: 4px; border-radius: 10px; border: 1px solid var(--linea); background: transparent; font-size: 13px; font-weight: 600; }
.idioma span { position: relative; z-index: 1; width: 34px; text-align: center; transition: color .3s; }
.idioma i { position: absolute; left: 4px; top: 4px; width: 34px; height: 30px; border-radius: 7px; background: var(--tinta); transition: transform .35s cubic-bezier(.5,0,.2,1.3); }
.idioma .es { color: var(--papel); }
html[lang="en"] .idioma i { transform: translateX(34px); }
html[lang="en"] .idioma .es { color: var(--tinta); }
html[lang="en"] .idioma .en { color: var(--papel); }
.boton-cv { text-decoration: none; font-weight: 600; font-size: 15px; height: 40px; display: inline-flex; align-items: center; padding: 0 16px; border-radius: 10px; background: var(--vino); color: #fff; transition: background .2s, transform .2s; }
.boton-cv:hover { background: var(--tinta); transform: translateY(-2px); }

/* Índice lateral */
.indice { position: fixed; left: 10px; top: 50%; transform: translateY(-50%); z-index: 150; display: flex; flex-direction: column; gap: 2px; padding-left: 10px; opacity: 0; transition: opacity .4s; }
.indice.visible { opacity: 1; }
.indice a { position: relative; z-index: 1; font-size: 12px; font-weight: 500; color: var(--suave); text-decoration: none; padding: 5px 8px; transition: color .3s; white-space: nowrap; }
.indice a.actual { color: #fff; }
.caja { position: absolute; left: 10px; top: 0; height: 28px; width: 80px; border-radius: 7px; background: var(--vino); transition: transform .5s cubic-bezier(.6,-0.3,.3,1.4), width .4s ease, background .3s; box-shadow: 0 6px 14px rgba(122,35,56,.25); }
.barra-progreso { position: absolute; left: 0; top: 0; bottom: 0; width: 3px; border-radius: 3px; background: var(--linea); overflow: hidden; }
.barra-progreso b { display: block; width: 100%; height: 0; background: var(--vino); }
.indice.sobre-oscuro a { color: rgba(255,255,255,.6); }
.indice.sobre-oscuro a.actual { color: #fff; }
.indice.sobre-oscuro .barra-progreso { background: rgba(255,255,255,.15); }

/* Portada */
.portada { position: relative; min-height: 100vh; max-width: var(--ancho); margin: 0 auto; padding: 130px 24px 90px; display: grid; grid-template-columns: 1.2fr .8fr; align-items: center; gap: 50px; }
.formas { position: absolute; inset: 0; pointer-events: none; z-index: -1; }
.f { position: absolute; border-radius: 50%; filter: blur(2px); transition: transform .2s linear; }
.f1 { width: 180px; height: 180px; left: 2%; top: 18%; background: #F1DCE1; }
.f2 { width: 90px; height: 90px; left: 46%; top: 72%; background: #DDE6F1; border-radius: 28px; }
.f3 { width: 60px; height: 60px; right: 4%; top: 16%; background: #EEDFC6; border-radius: 16px; }
.f4 { width: 130px; height: 130px; right: 30%; top: 8%; border: 2px dashed #E3C9CF; background: transparent; }
.hola { font-size: 20px; color: var(--suave); margin-bottom: 8px; }
.nombre { font-size: clamp(40px, 8vw, 112px); font-weight: 700; line-height: .95; margin-bottom: 26px; }
.linea-n { display: block; overflow: hidden; }
.gira { font-size: clamp(20px, 2.2vw, 26px); line-height: 1.4; max-width: 30ch; margin-bottom: 32px; }
.palabra { display: inline-block; color: var(--vino); font-weight: 600; position: relative; min-width: 3ch; }
.palabra::after { content: ""; position: absolute; right: -6px; top: 10%; height: 80%; width: 2px; background: var(--vino); animation: parpadeo 1s steps(1) infinite; }
@keyframes parpadeo { 50% { opacity: 0; } }
.acciones { display: flex; flex-wrap: wrap; gap: 12px; }
.boton { display: inline-flex; align-items: center; justify-content: center; padding: 15px 26px; border-radius: 12px; font-weight: 600; font-size: 16px; text-decoration: none; border: 1.5px solid var(--tinta); background: transparent; transition: background .25s, color .25s; will-change: transform; }
.boton:hover { background: var(--tinta); color: var(--papel); }
.boton.lleno { background: var(--tinta); color: var(--papel); }
.boton.lleno:hover { background: var(--vino); border-color: var(--vino); }
.retrato { position: relative; justify-self: center; width: min(400px, 80vw); aspect-ratio: 1; transition: transform .2s ease-out; }
.mancha { position: absolute; inset: -6%; background: var(--vino); border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%; animation: morfo 12s ease-in-out infinite; opacity: .95; }
@keyframes morfo { 0%,100% { border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%; transform: rotate(0deg); } 33% { border-radius: 63% 37% 45% 55% / 55% 61% 39% 45%; } 66% { border-radius: 38% 62% 56% 44% / 64% 39% 61% 36%; transform: rotate(8deg); } }
.retrato img { position: relative; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; border: 8px solid var(--papel); }
.hanko { position: absolute; right: 6%; bottom: 4%; width: 64px; height: 64px; display: grid; place-items: center; border-radius: 10px; background: #fff; color: var(--vino); border: 2px solid var(--vino); font-family: "Noto JP", sans-serif; font-size: 17px; letter-spacing: 1px; transform: rotate(-10deg) scale(.6); opacity: 0; transition: transform .45s cubic-bezier(.3,1.6,.5,1), opacity .3s; box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 5px var(--vino); }
.retrato:hover .hanko { transform: rotate(-10deg) scale(1); opacity: 1; }
.nota { position: absolute; background: #fff; border: 1px solid var(--linea); border-radius: 999px; padding: 7px 14px; font-size: 14px; font-weight: 600; box-shadow: 0 10px 24px rgba(22,24,29,.08); animation: flota 6s ease-in-out infinite; white-space: nowrap; }
.n1 { left: -12%; top: 14%; }
.n2 { right: -10%; top: 58%; animation-delay: -3s; }
@keyframes flota { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.bajar { position: absolute; left: 50%; bottom: 26px; width: 26px; height: 42px; border: 2px solid var(--suave); border-radius: 14px; }
.bajar span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--suave); animation: rueda 1.6s infinite; }
@keyframes rueda { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(14px); } }

/* Cinta de herramientas */
.cinta { overflow: hidden; border-block: 1px solid var(--linea); padding: 22px 0; background: #fff; transform: rotate(-1.2deg) scale(1.02); }
.pista { display: flex; gap: 0; width: max-content; animation: cinta 32s linear infinite; }
.cinta:hover .pista { animation-play-state: paused; }
.pista span { font-family: var(--display); font-size: 30px; font-weight: 600; padding: 0 30px; color: var(--tinta); display: flex; align-items: center; gap: 60px; }
.pista span::after { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--vino); transform: rotate(45deg); margin-left: 30px; }
@keyframes cinta { to { transform: translateX(-50%); } }

/* Sobre mí */
.sobre { max-width: var(--ancho); margin: 0 auto; padding: 150px 24px 120px 24px; }
.revela { font-family: var(--display); font-size: clamp(28px, 3.6vw, 46px); line-height: 1.22; font-weight: 600; max-width: 26ch; letter-spacing: -.015em; max-width: 30ch; }
.revela .pal { color: #D8D2C8; transition: color .3s; }
.revela .pal.on { color: var(--tinta); }
.datos-sobre { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 70px; }
.dato { padding: 26px 22px; border-radius: 18px; background: #fff; border: 1px solid var(--linea); transition: transform .3s, box-shadow .3s; }
.dato:hover { transform: translateY(-6px) rotate(-1deg); box-shadow: 0 16px 32px rgba(22,24,29,.08); }
.dato .num { display: block; font-family: var(--display); font-size: 46px; font-weight: 700; color: var(--vino); line-height: 1; margin-bottom: 10px; }
.dato span:last-child { font-size: 15px; color: var(--suave); line-height: 1.45; display: block; }

/* Proyectos */
.proyectos { position: relative; background: var(--noche); color: #EDEBE6; padding: 40px 24px 140px; margin-top: 60px; }
.ola { position: absolute; left: 0; top: -118px; width: 100%; height: 120px; fill: var(--noche); }
.proy-cab { max-width: var(--ancho); margin: 0 auto 70px; padding-top: 40px; }
.proy-cab h2 { font-size: clamp(34px, 5vw, 64px); font-weight: 700; max-width: 18ch; margin-bottom: 20px; }
.aviso-datos { color: #9EA2AB; max-width: 52ch; }
.proyecto { max-width: var(--ancho); margin: 0 auto 110px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 60px; align-items: center; }
.proyecto.inv .ilustra { order: 2; }
.ilustra { position: relative; min-height: 440px; border-radius: 28px; background: var(--panel); color: var(--tinta); overflow: hidden; display: grid; place-items: center; padding: 30px; transform-style: preserve-3d; transition: transform .25s ease-out; }
.ilustra::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(22,24,29,.10) 1px, transparent 1px); background-size: 18px 18px; }
.num-p { font-family: var(--display); font-size: 16px; font-weight: 600; color: #E9B9C4; margin-bottom: 10px; }
.texto-p h3 { font-size: clamp(28px, 3vw, 40px); font-weight: 700; margin-bottom: 18px; }
.texto-p > p:not(.num-p) { color: #B9BCC4; font-size: 17px; }
.tags { list-style: none; padding: 0; margin: 4px 0 26px; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { font-size: 13px; font-weight: 600; padding: 5px 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,.16); color: #DADCE1; }
.links-p { display: flex; flex-wrap: wrap; gap: 10px; }
.links-p a { text-decoration: none; font-weight: 600; font-size: 15px; padding: 10px 16px; border-radius: 10px; border: 1px solid rgba(255,255,255,.2); transition: background .2s, color .2s, transform .2s; }
.links-p a:hover { background: #fff; color: #16181D; transform: translateY(-2px); }
.links-p a.lleno { background: #fff; color: #16181D; }
.links-p a.lleno:hover { background: #E9B9C4; }

/* Animaciones de entrada de cada ilustración (se activan con .visto) */
.flota { position: absolute; background: #fff; border-radius: 16px; padding: 14px 16px; box-shadow: 0 20px 40px rgba(22,24,29,.14); font-size: 13px; transform: translateZ(40px); }
.ilustra .flota { animation: flota 7s ease-in-out infinite; }

/* 1 móvil */
.movil { position: relative; width: 250px; background: #1C1E24; border-radius: 34px; padding: 12px; box-shadow: 0 30px 60px rgba(22,24,29,.3); transform: rotate(-4deg); }
.movil-cab { display: flex; align-items: center; gap: 8px; color: #fff; padding: 8px 8px 12px; font-size: 14px; }
.movil-cab .av { width: 28px; height: 28px; border-radius: 50%; background: var(--tono); display: grid; place-items: center; font-weight: 700; }
.movil-cab small { color: #8E929B; }
.chat { background: #EDE7E0; border-radius: 22px; padding: 14px 10px; min-height: 290px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; line-height: 1.4; }
.burbuja { margin: 0; background: #fff; border-radius: 14px 14px 14px 4px; padding: 9px 11px; max-width: 92%; }
.burbuja.yo { align-self: flex-end; background: #D8F0C8; border-radius: 14px 14px 4px 14px; }
.tarjeta-cl { display: flex; flex-direction: column; }
.tarjeta-cl em { font-size: 11px; color: var(--suave); }
.botones { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.botones span { background: rgba(28,30,36,.85); color: #fff; text-align: center; border-radius: 8px; padding: 6px; font-size: 12px; }
.botones .compro { transition: background .3s, transform .3s; }
.proyecto.visto .botones .compro { animation: pulsa .6s 2.1s forwards; }
@keyframes pulsa { 50% { transform: scale(.92); } 100% { background: #2E8B57; } }
.b1, .b2, .b3, .b4 { opacity: 0; transform: translateY(10px); }
.proyecto.visto .b1 { animation: entra .5s .2s forwards; }
.proyecto.visto .b2 { animation: entra .5s .9s forwards; }
.proyecto.visto .b3 { animation: entra .5s 1.5s forwards; }
.proyecto.visto .b4 { animation: entra .5s 2.6s forwards; }
@keyframes entra { to { opacity: 1; transform: none; } }
.graf-motivos { right: 6%; top: 10%; width: 200px; }
.graf-motivos b { display: block; margin-bottom: 8px; }
.barra-m { display: grid; grid-template-columns: 70px 1fr 34px; align-items: center; gap: 6px; margin-bottom: 5px; }
.barra-m i { height: 8px; border-radius: 4px; background: var(--tono); width: 0; transition: width 1.2s cubic-bezier(.3,0,.2,1); }
.proyecto.visto .barra-m i { width: var(--v); }
.barra-m em { font-style: normal; font-weight: 600; text-align: right; }
.chip-n8n { left: 6%; bottom: 10%; font-weight: 700; background: #EA4B71; color: #fff; border-radius: 999px; padding: 9px 16px; }

/* 2 formulario y correo */
.formulario { position: absolute; left: 7%; top: 12%; width: 230px; background: #fff; border-radius: 18px; padding: 18px; box-shadow: 0 20px 40px rgba(22,24,29,.12); font-size: 13px; transform: rotate(-3deg); }
.formulario > b { display: block; font-size: 16px; margin-bottom: 10px; }
.formulario label { display: block; margin-bottom: 9px; }
.formulario label span { display: block; color: var(--suave); font-size: 11px; }
.formulario .escribe { display: block; font-style: normal; border-bottom: 1.5px solid var(--linea); padding: 3px 0; white-space: nowrap; overflow: hidden; width: 0; }
.proyecto.visto .escribe { animation: teclea 1s steps(14) .3s forwards; }
.proyecto.visto .e2 { animation-delay: 1.1s; }
.proyecto.visto .e3 { animation-delay: 1.9s; }
@keyframes teclea { to { width: 100%; } }
.enviar { display: inline-block; margin-top: 6px; background: var(--tono); color: #fff; border-radius: 8px; padding: 6px 14px; font-weight: 600; }
.vuelo { position: absolute; left: 30%; top: 46%; width: 220px; fill: none; stroke: var(--tono); stroke-width: 2.5; stroke-dasharray: 6 8; opacity: .6; }
.sobre-correo { position: absolute; right: 7%; bottom: 12%; width: 250px; background: #fff; border-radius: 18px; padding: 18px; box-shadow: 0 24px 46px rgba(22,24,29,.16); opacity: 0; transform: translateY(30px) rotate(3deg); }
.proyecto.visto .sobre-correo { animation: llega .7s 2.8s cubic-bezier(.3,1.4,.5,1) forwards; }
@keyframes llega { to { opacity: 1; transform: rotate(3deg); } }
.sobre-correo > b { display: block; margin: 8px 0 10px; }
.sobre-correo i { display: block; height: 7px; border-radius: 4px; background: #E8E5DF; margin-bottom: 7px; }
.sobre-correo i.corta { width: 60%; }
.reloj { display: inline-block; font-weight: 700; color: #fff; background: var(--tono); border-radius: 999px; padding: 3px 10px; font-size: 13px; }
.prioridad { display: inline-block; margin-top: 6px; font-size: 12px; font-weight: 600; color: #8A2B2B; background: #F6DEDE; border-radius: 6px; padding: 3px 8px; }

/* 3 pedidos */
.pedidos { position: relative; width: min(380px, 100%); height: 300px; }
.ped-tit { display: block; font-family: var(--display); font-size: 20px; margin-bottom: 14px; }
.ped { position: absolute; left: 0; right: 0; height: 52px; display: grid; grid-template-columns: 70px 1fr auto 50px; align-items: center; gap: 10px; padding: 0 16px; background: #fff; border-radius: 12px; font-size: 13px; box-shadow: 0 8px 20px rgba(22,24,29,.08); transition: top .8s cubic-bezier(.6,0,.2,1), box-shadow .3s; }
.ped span { font-weight: 700; }
.ped em { font-style: normal; color: var(--suave); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ped i { font-style: normal; font-weight: 700; color: var(--tono); text-align: right; }
.ped.urgente { box-shadow: 0 0 0 2px #C0392B, 0 12px 26px rgba(192,57,43,.2); }
.ped.urgente i { color: #C0392B; }
.total-cobro { right: 7%; bottom: 9%; }
.total-cobro span { display: block; color: var(--suave); }
.total-cobro b { font-family: var(--display); font-size: 26px; color: var(--tono); }

/* 4 semana */
.semana { width: min(400px, 100%); background: #fff; border-radius: 18px; padding: 18px; box-shadow: 0 20px 40px rgba(22,24,29,.12); position: relative; }
.cab-sem { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; font-size: 12px; font-weight: 700; color: var(--suave); margin-bottom: 8px; text-align: center; }
.celdas { display: grid; grid-template-columns: repeat(5, 1fr); grid-template-rows: repeat(3, 48px); gap: 6px; }
.celdas i { border-radius: 8px; background: #CFE3D0; transform: scale(0); transition: transform .4s cubic-bezier(.3,1.5,.5,1); }
.proyecto.visto .celdas i { transform: scale(1); }
.celdas i:nth-child(2) { transition-delay: .05s; } .celdas i:nth-child(3) { transition-delay: .1s; } .celdas i:nth-child(4) { transition-delay: .15s; } .celdas i:nth-child(5) { transition-delay: .2s; } .celdas i:nth-child(6) { transition-delay: .25s; } .celdas i:nth-child(7) { transition-delay: .3s; } .celdas i:nth-child(8) { transition-delay: .35s; } .celdas i:nth-child(9) { transition-delay: .4s; } .celdas i:nth-child(10) { transition-delay: .45s; }
.celdas i.choque { background: #F2B8B5; }
.proyecto.visto .celdas i.choque { animation: late 1.4s 1s ease-in-out infinite; }
@keyframes late { 50% { box-shadow: 0 0 0 5px rgba(192,57,43,.25); } }
.celdas i.festivo { background: repeating-linear-gradient(45deg, #EEE 0 6px, #F8F8F8 6px 12px); }
.aviso-choque { position: absolute; right: -14px; top: -14px; background: #C0392B; color: #fff; font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px; }
.asistencia { left: 6%; bottom: 8%; width: 190px; }
.asistencia b { display: block; margin-bottom: 6px; }
.asistencia div { display: grid; grid-template-columns: 46px 1fr; align-items: center; gap: 6px; margin-bottom: 4px; }
.asistencia i { height: 7px; border-radius: 4px; background: var(--tono); width: 0; transition: width 1.2s .4s; }
.asistencia i.baja { background: #C0392B; }
.proyecto.visto .asistencia i { width: var(--v); }

/* 5 gráfica */
.grafica { position: relative; width: min(420px, 100%); background: #fff; border-radius: 18px; padding: 18px 18px 10px; box-shadow: 0 20px 40px rgba(22,24,29,.12); }
.grafica > b { font-size: 15px; }
.grafica svg { width: 100%; height: auto; overflow: visible; }
.grafica .rejilla { stroke: #EEE9E2; }
.grafica .trazo { fill: none; stroke: var(--tono); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 400; stroke-dashoffset: 400; }
.grafica .area { fill: var(--tono); opacity: 0; }
.grafica circle { fill: var(--tono); opacity: 0; }
.grafica text { font-size: 11px; fill: var(--suave); font-family: var(--sans); }
.proyecto.visto .grafica .trazo { animation: dibuja 1.8s .3s ease forwards; }
.proyecto.visto .grafica .area { animation: sombra 1s 1.6s forwards; }
.proyecto.visto .grafica circle { animation: aparece .4s 1.9s forwards; }
@keyframes dibuja { to { stroke-dashoffset: 0; } }
@keyframes sombra { to { opacity: .12; } }
.caida { position: absolute; right: 18px; top: 14px; font-family: var(--display); font-size: 34px; font-weight: 700; color: var(--tono); }
.provincias { right: 6%; bottom: 8%; width: 150px; }
.provincias b { display: block; margin-bottom: 6px; }
.provincias i { display: block; height: 7px; border-radius: 4px; background: #E3D3CE; margin-bottom: 4px; width: 0; transition: width 1s .5s; }
.provincias i.gr { background: var(--tono); }
.proyecto.visto .provincias i { width: var(--v); }
.provincias small { color: var(--suave); }

/* Método */
.metodo { max-width: var(--ancho); margin: 0 auto; padding: 140px 24px 60px; }
.metodo h2, .trayectoria h2, .seccion-cv h2 { font-size: clamp(34px, 4.6vw, 58px); font-weight: 700; margin-bottom: 60px; max-width: 18ch; }
.pasos { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
.hilo { position: absolute; left: 24px; right: 24px; top: 24px; height: 3px; background: var(--linea); border-radius: 3px; }
.hilo b { display: block; height: 100%; width: 0; background: var(--vino); border-radius: 3px; }
.paso { position: relative; }
.circ { position: relative; z-index: 1; width: 50px; height: 50px; display: grid; place-items: center; border-radius: 50%; background: var(--papel); border: 3px solid var(--linea); font-family: var(--display); font-weight: 700; font-size: 20px; margin-bottom: 20px; transition: background .4s, border-color .4s, color .4s, transform .4s; }
.paso.on .circ { background: var(--vino); border-color: var(--vino); color: #fff; transform: scale(1.1); }
.paso h3 { font-size: 26px; margin-bottom: 8px; }
.paso p { color: var(--suave); font-size: 16px; }

/* Trayectoria */
.trayectoria { max-width: var(--ancho); margin: 0 auto; padding: 120px 24px 40px; }
.linea-t { position: relative; padding-left: 50px; }
.eje { position: absolute; left: 14px; top: 0; bottom: 0; width: 3px; background: var(--linea); border-radius: 3px; }
.eje b { display: block; width: 100%; height: 0; background: var(--vino); border-radius: 3px; }
.hito { position: relative; background: #fff; border: 1px solid var(--linea); border-radius: 20px; padding: 26px 30px 12px; margin-bottom: 22px; max-width: 760px; transition: transform .4s, box-shadow .4s, border-color .4s; }
.hito::before { content: ""; position: absolute; left: -44px; top: 30px; width: 15px; height: 15px; border-radius: 50%; background: var(--papel); border: 3px solid var(--linea); transition: background .4s, border-color .4s; }
.hito.on::before { background: var(--vino); border-color: var(--vino); }
.hito.est::before { border-radius: 4px; transform: rotate(45deg); }
.hito:hover { transform: translateX(8px); box-shadow: 0 14px 30px rgba(22,24,29,.07); border-color: #D9CFC2; }
.fecha { font-size: 14px; font-weight: 600; color: var(--vino); margin-bottom: 6px; }
.hito h3 { font-size: 24px; margin-bottom: 6px; }
.lugar { color: var(--suave); margin-bottom: 10px; }
.hito p:last-child:not(.lugar) { color: var(--suave); }
.cursos { margin-top: 40px; max-width: 810px; background: var(--tinta); color: #EDEBE6; border-radius: 20px; padding: 28px 32px; }
.cursos h3 { font-size: 24px; margin-bottom: 14px; }
.cursos ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.cursos li { display: flex; align-items: baseline; gap: 12px; }
.estado { flex: none; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 6px; background: rgba(255,255,255,.1); color: #C9CCD3; }
.estado.vivo { background: #E9B9C4; color: var(--vino); }

/* CV */
.seccion-cv { max-width: var(--ancho); margin: 0 auto; padding: 140px 24px 60px; display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.seccion-cv h2 { margin-bottom: 20px; }
.seccion-cv p { color: var(--suave); font-size: 18px; margin-bottom: 30px; max-width: 34ch; }
.hoja { display: block; justify-self: center; width: min(340px, 85%); border-radius: 6px; box-shadow: 0 30px 70px rgba(22,24,29,.18), 0 0 0 1px var(--linea); transform: rotate(3deg); transition: transform .25s ease-out; background: #fff; }
.hoja img { border-radius: 6px; }

/* Contacto */
.contacto { text-align: center; padding: 160px 24px 120px; max-width: 900px; margin: 0 auto; }
.contacto h2 { font-size: clamp(38px, 6vw, 80px); font-weight: 700; margin-bottom: 22px; }
.contacto h2 span:last-child { color: var(--vino); }
.contacto p { color: var(--suave); font-size: 19px; margin-bottom: 34px; }
.contacto .acciones { justify-content: center; }
.pie { border-top: 1px solid var(--linea); padding: 40px 24px 50px; display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--suave); font-size: 15px; }
.firma-pie { width: 220px; height: auto; color: var(--vino); overflow: visible; }
.pie p { margin: 0; transition: color .4s; }
.pie p.visto { color: var(--vino); }

.aviso { position: fixed; left: 50%; bottom: 30px; transform: translate(-50%, 30px); opacity: 0; z-index: 300; background: var(--tinta); color: var(--papel); padding: 12px 22px; border-radius: 12px; font-weight: 600; transition: opacity .3s, transform .3s; pointer-events: none; }
.aviso.ver { opacity: 1; transform: translate(-50%, 0); }

/* Apariciones al bajar */
.sube { opacity: 0; transform: translateY(40px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1); }
.sube.dentro { opacity: 1; transform: none; }

@media (max-width: 1400px) { .indice { display: none; } }
@media (max-width: 980px) {
  .menu { display: none; }
  .herr-barra { margin-left: auto; }
  .portada { grid-template-columns: 1fr; padding-top: 120px; text-align: left; }
  .retrato { width: min(300px, 70vw); order: -1; }
  .n1 { left: -6%; } .n2 { right: -6%; }
  .datos-sobre { grid-template-columns: 1fr 1fr; }
  .proyecto, .proyecto.inv { grid-template-columns: 1fr; gap: 30px; }
  .proyecto.inv .ilustra { order: 0; }
  .pasos { grid-template-columns: 1fr 1fr; }
  .hilo { display: none; }
  .seccion-cv { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .boton-cv { display: none; }
  .barra { padding-left: 12px; }
  .ilustra { min-height: 400px; padding: 18px; }
  .graf-motivos { right: 4%; top: 4%; width: 170px; transform: scale(.85); transform-origin: top right; }
  .movil { width: 220px; }
  .formulario { left: 5%; top: 6%; }
  .sobre-correo { right: 4%; bottom: 6%; width: 220px; }
  .pasos { grid-template-columns: 1fr; }
  .datos-sobre { grid-template-columns: 1fr; }
  .linea-t { padding-left: 36px; }
  .hito::before { left: -30px; }
  .eje { left: 8px; }
  .hito { padding: 22px 20px 8px; }
  .pista span { font-size: 22px; }
  .formas { display: none; }
  .proyectos { padding-bottom: 60px; }
  .proyecto { margin-bottom: 80px; }
  .caida { font-size: 24px; top: 10px; }
  .grafica > b { font-size: 13px; }
  .ped { grid-template-columns: 58px 1fr auto 40px; padding: 0 10px; gap: 6px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .sube { opacity: 1; transform: none; }
}

/* ---------- Sobre mí ampliado ---------- */
.sobre-mas { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; margin-top: 70px; align-items: start; }
.bio p { color: var(--suave); font-size: 18px; }
.bio .detalle { margin-top: 24px; padding: 16px 18px; border-left: 3px solid var(--vino); background: var(--carta); border-radius: 0 12px 12px 0; font-size: 16px; }
.rasgos { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rasgos-tit { grid-column: 1 / -1; font-weight: 600; margin: 0; }
.rasgos-tit small { font-weight: 400; color: var(--suave); }
.rasgo { position: relative; height: 170px; padding: 0; border: 0; background: transparent; perspective: 900px; text-align: left; }
.rasgo > span { position: absolute; inset: 0; border-radius: 18px; padding: 20px; backface-visibility: hidden; -webkit-backface-visibility: hidden; transition: transform .6s cubic-bezier(.4,.2,.2,1); }
.cara-a { background: var(--carta); border: 1px solid var(--linea); display: flex; flex-direction: column; justify-content: space-between; }
.cara-a b { font-family: var(--display); font-size: 22px; line-height: 1.1; }
.cara-a i { font-style: normal; font-family: var(--display); font-weight: 700; font-size: 34px; color: var(--vino); opacity: .25; align-self: flex-end; }
.cara-b { background: var(--vino); color: #fff; transform: rotateY(180deg); font-size: 15px; line-height: 1.5; display: flex; align-items: center; }
.rasgo.girada .cara-a { transform: rotateY(-180deg); }
.rasgo.girada .cara-b { transform: rotateY(0); }

/* ---------- Herramientas ---------- */
.herramientas { max-width: var(--ancho); margin: 0 auto; padding: 60px 24px 160px; }
.herramientas h2 { font-size: clamp(34px, 4.6vw, 58px); font-weight: 700; margin-bottom: 12px; }
.he-sub { color: var(--suave); font-size: 18px; margin-bottom: 40px; max-width: 46ch; }
.caja-herr { display: grid; grid-template-columns: 240px 1fr; gap: 22px; }
.lista-herr { display: flex; flex-direction: column; gap: 8px; }
.lista-herr button { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--linea); background: var(--carta); font-weight: 600; font-size: 16px; text-align: left; transition: transform .25s, border-color .25s, background .25s, color .25s; }
.lista-herr button:hover { transform: translateX(6px); border-color: var(--vino); }
.lista-herr button.activa { background: var(--tinta); color: var(--papel); border-color: var(--tinta); transform: translateX(10px); }
.ico-h { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--c); color: #fff; font-family: var(--display); font-weight: 700; font-size: 13px; }
.ficha-herr { display: grid; grid-template-columns: 1fr 1.05fr; gap: 26px; background: var(--carta); border: 1px solid var(--linea); border-radius: 26px; padding: 34px; min-height: 420px; }
.ficha-texto { animation: entra .45s ease; }
.nivel { display: inline-block; font-size: 13px; font-weight: 700; padding: 4px 11px; border-radius: 999px; background: var(--vino-claro); color: var(--vino); margin-bottom: 14px; }
.nivel.aprende { background: #E3ECF7; color: #2A5486; }
.ficha-texto h3 { font-size: 34px; margin-bottom: 12px; }
.h-que { font-size: 18px; }
.h-uso { color: var(--suave); }
.h-proy { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.h-proy a { font-size: 14px; font-weight: 600; text-decoration: none; padding: 7px 12px; border-radius: 10px; border: 1px solid var(--linea); transition: background .2s, color .2s; }
.h-proy a:hover { background: var(--vino); color: #fff; border-color: var(--vino); }
.h-proy span { font-size: 14px; color: var(--suave); }
.demo { --tinta: #16181D; --suave: #5F636B; --linea: #E5E0D8; color: var(--tinta); position: relative; border-radius: 18px; background: #F3EFE8; overflow: hidden; display: grid; place-items: center; padding: 20px; font-size: 13px; }
.demo::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(22,24,29,.08) 1px, transparent 1px); background-size: 16px 16px; }
.demo > * { position: relative; }
.demo-pie { position: absolute; left: 16px; bottom: 12px; font-size: 12px; color: var(--suave); }
/* Excel */
.hoja-x { display: grid; grid-template-columns: 70px 90px 60px 60px; background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 12px 30px rgba(22,24,29,.12); }
.hoja-x span { padding: 7px 9px; border-bottom: 1px solid #EEE; border-right: 1px solid #F2F2F2; transition: background .5s, color .5s; }
.hoja-x .c { background: #1D6F42; color: #fff; font-weight: 700; }
.hoja-x .tarde.on { background: #F6D2CF; color: #9B2A20; font-weight: 700; }
.hoja-x .bien.on { background: #D6EBDD; color: #1D6F42; }
/* Power Query */
.pq { display: grid; gap: 10px; width: 100%; max-width: 330px; }
.pq-fila { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pq-fila span { background: #fff; padding: 7px 10px; border-radius: 8px; box-shadow: 0 4px 10px rgba(22,24,29,.06); white-space: pre; transition: all .5s; }
.pq-fila.dup { transition: opacity .5s, transform .5s; }
.pq-fila.dup.fuera { opacity: 0; transform: translateX(40px); height: 0; margin-top: -10px; }
.pq-pasos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.pq-pasos i { font-style: normal; font-size: 12px; font-weight: 600; padding: 4px 9px; border-radius: 999px; background: #fff; color: var(--suave); transition: background .3s, color .3s; }
.pq-pasos i.on { background: #2B7A3D; color: #fff; }
/* Power BI */
.pbi { width: 100%; max-width: 340px; background: #fff; border-radius: 14px; padding: 16px; box-shadow: 0 12px 30px rgba(22,24,29,.12); }
.pbi-filtros { display: flex; gap: 6px; margin-bottom: 14px; }
.pbi-filtros button { border: 1px solid #DDD; background: #fff; border-radius: 8px; padding: 5px 10px; font-size: 12px; font-weight: 600; }
.pbi-filtros button.on { background: #C99A06; border-color: #C99A06; color: #fff; }
.pbi-barras { display: flex; align-items: flex-end; gap: 10px; height: 130px; border-bottom: 1px solid #EEE; }
.pbi-barras i { flex: 1; background: #C99A06; border-radius: 6px 6px 0 0; height: var(--h); transition: height .6s cubic-bezier(.3,1.3,.5,1); }
.pbi-et { display: flex; gap: 10px; margin-top: 6px; }
.pbi-et span { flex: 1; text-align: center; font-size: 11px; color: var(--suave); }
/* n8n */
.n8n-demo { width: 100%; max-width: 360px; height: 220px; position: relative; }
.nodo { position: absolute; width: 74px; padding: 10px 6px; border-radius: 12px; background: #fff; text-align: center; font-size: 11px; font-weight: 700; box-shadow: 0 8px 20px rgba(22,24,29,.12); border: 2px solid transparent; transition: border-color .3s, transform .3s; }
.nodo em { display: block; font-style: normal; font-size: 18px; }
.nodo.on { border-color: #EA4B71; transform: scale(1.08); }
.n8n-demo svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.n8n-demo path { fill: none; stroke: #C9C2B8; stroke-width: 2.5; stroke-dasharray: 6 6; animation: corre 1s linear infinite; }
@keyframes corre { to { stroke-dashoffset: -12; } }
/* SQL y Python */
.codigo { width: 100%; max-width: 360px; background: #1B1D23; color: #E6E3DC; border-radius: 14px; padding: 16px 16px 12px; font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 12.5px; line-height: 1.6; box-shadow: 0 14px 30px rgba(22,24,29,.2); }
.codigo .linea-c { white-space: pre; min-height: 1.6em; }
.codigo .k { color: #E9A2B5; } .codigo .s { color: #A9D8A2; } .codigo .f { color: #9CC4F2; }
.resultado { margin-top: 10px; display: grid; gap: 5px; opacity: 0; transition: opacity .5s; }
.resultado.on { opacity: 1; }
.resultado div { display: grid; grid-template-columns: 90px 1fr 46px; gap: 8px; align-items: center; font-family: var(--sans); font-size: 12px; }
.resultado i { height: 8px; border-radius: 4px; background: #9CC4F2; width: var(--v); }
.cursor-c { display: inline-block; width: 7px; height: 14px; background: #E6E3DC; vertical-align: -2px; animation: parpadeo 1s steps(1) infinite; }

/* ---------- Modo oscuro ---------- */
:root { --carta: #FFFFFF; --barra-bg: rgba(251,249,246,.78); --pal-apagada: #D8D2C8; --anillo: rgba(22,24,29,.35); --bloque: #16181D; }
.tema .luna { display: none; }
:root[data-tema="oscuro"] { --papel: #0F1014; --tinta: #ECE9E3; --suave: #A3A6AE; --linea: #2A2C33; --vino: #C2526B; --vino-claro: rgba(194,82,107,.16); --noche: #1C1D25; --carta: #17191F; --barra-bg: rgba(15,16,20,.78); --pal-apagada: #34363D; --anillo: rgba(236,233,227,.4); --bloque: #1C1E25; color-scheme: dark; }
:root[data-tema="oscuro"] .tema .sol { display: none; }
:root[data-tema="oscuro"] .tema .luna { display: block; }
body { transition: background .5s ease, color .5s ease; }
.barra { background: var(--barra-bg); }
.revela .pal { color: var(--pal-apagada); }
.dato, .hito, .cinta, .nota, .hanko { background: var(--carta); }
.hanko { box-shadow: inset 0 0 0 3px var(--carta), inset 0 0 0 5px var(--vino); }
.cursos { background: var(--bloque); }
.ilustra { --tinta: #16181D; --suave: #5F636B; --linea: #E5E0D8; }
.boton-cv, .cara-b, .paso.on .circ { color: #fff; }
:root[data-tema="oscuro"] .retrato img { border-color: var(--papel); }
:root[data-tema="oscuro"] .f1 { background: #3A1E27; } :root[data-tema="oscuro"] .f2 { background: #1D2738; } :root[data-tema="oscuro"] .f3 { background: #3A3020; } :root[data-tema="oscuro"] .f4 { border-color: #4A2A33; }
:root[data-tema="oscuro"] .ilustra, :root[data-tema="oscuro"] .demo { filter: brightness(.92) saturate(.95); }
:root[data-tema="oscuro"] .hoja { box-shadow: 0 30px 70px rgba(0,0,0,.5); }
:root[data-tema="oscuro"] .etiqueta { color: #E9A9B8; }
:root[data-tema="oscuro"] .nivel.aprende { background: rgba(110,160,220,.16); color: #9CC4F2; }
:root[data-tema="oscuro"] .proyectos { border-top: 1px solid #23252C; }
:root[data-tema="oscuro"] .intro { background: var(--papel); }

@media (max-width: 980px) {
  .sobre-mas { grid-template-columns: 1fr; }
  .caja-herr { grid-template-columns: 1fr; }
  .lista-herr { flex-direction: row; overflow-x: auto; padding-bottom: 6px; }
  .lista-herr button { flex: none; }
  .lista-herr button:hover, .lista-herr button.activa { transform: none; }
  .ficha-herr { grid-template-columns: 1fr; padding: 24px; }
  .demo { min-height: 280px; }
}
@media (max-width: 600px) { .rasgos { grid-template-columns: 1fr; } .rasgo { height: 150px; } }


/* ===================== Versión 4 ===================== */
/* Logo RR */
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--tinta); height: 40px; }
.mono { position: relative; width: 50px; height: 40px; display: inline-block; font-family: var(--display); font-weight: 700; font-size: 30px; line-height: 40px; }
.mono b { position: absolute; top: 0; }
.mono b:first-child { left: 2px; color: var(--tinta); z-index: 1; }
.mono b:last-child { left: 19px; color: transparent; -webkit-text-stroke: 1.5px var(--vino); }
.logo:hover .mono b:last-child { left: 23px; transition: left .3s ease; }
.mono b:last-child { transition: left .3s ease; }
.logo-txt { font-family: var(--display); font-weight: 600; font-size: 16px; letter-spacing: -.01em; white-space: nowrap; }
@media (max-width: 1180px) { .logo-txt { display: none; } }

/* Firma de entrada, ahora en tinta */
.firma { color: var(--tinta); width: min(560px, 80vw); }
.firma path { stroke-width: 7; }

/* Menú del móvil */
.menu-btn { display: none; width: 42px; height: 40px; border-radius: 10px; border: 1px solid var(--linea); background: transparent; padding: 0; position: relative; }
.menu-btn span { position: absolute; left: 11px; right: 11px; height: 2px; border-radius: 2px; background: var(--tinta); transition: transform .3s, opacity .3s, top .3s; }
.menu-btn span:nth-child(1) { top: 13px; } .menu-btn span:nth-child(2) { top: 19px; } .menu-btn span:nth-child(3) { top: 25px; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { top: 19px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { top: 19px; transform: rotate(-45deg); }
.menu-movil { position: fixed; left: 14px; right: 14px; top: 76px; z-index: 190; background: var(--carta); border: 1px solid var(--linea); border-radius: 18px; padding: 10px; box-shadow: 0 24px 50px rgba(0,0,0,.18); opacity: 0; transform: translateY(-10px); transition: opacity .25s, transform .25s; max-height: calc(100svh - 96px); overflow: auto; }
.menu-movil.abierto { opacity: 1; transform: none; }
.menu-movil nav { display: flex; flex-direction: column; }
.menu-movil nav a { text-decoration: none; font-family: var(--display); font-weight: 600; font-size: 22px; padding: 12px 14px; border-radius: 12px; }
.menu-movil nav a:active, .menu-movil nav a:hover { background: var(--vino-claro); }
.menu-movil-acciones { display: grid; gap: 8px; padding: 10px 4px 4px; border-top: 1px solid var(--linea); margin-top: 6px; }
.menu-movil-acciones .boton { width: 100%; padding: 13px; }

/* Portada a pantalla completa */
.portada { max-width: none; padding: 0; display: block; min-height: 100vh; min-height: 100svh; overflow: hidden; --d1: #F4DCE3; --d2: #DCE7F3; }
:root[data-tema="oscuro"] .portada { --d1: #3B1D28; --d2: #18243A; }
.decor { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.decor .capa { transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.decor #puntos circle { fill: var(--vino); opacity: .28; }
.decor .lineas-d { fill: none; stroke: var(--vino); stroke-width: 1.6; opacity: .45; }
.decor .solidos { fill: var(--vino); opacity: .5; }
.portada-in { position: relative; z-index: 1; max-width: 1240px; margin: 0 auto; min-height: 100vh; min-height: 100svh; padding: 150px 32px 90px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); align-items: center; gap: 40px; }
.portada-texto { max-width: 640px; }
.hola { min-height: 1.65em; white-space: nowrap; }
.gira { display: block; min-height: 2.9em; max-width: 26em; }
.gira .g1, .gira .g2 { display: block; }
.palabra { min-width: 0; }
.acciones .boton { min-width: 178px; }
.retrato { width: min(480px, 40vw); }
.orbita { position: absolute; inset: -12%; width: 124%; height: 124%; fill: none; stroke: var(--vino); stroke-width: .6; stroke-dasharray: 2 5; opacity: .5; animation: gira 60s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }
.n3 { left: -4%; bottom: 6%; animation-delay: -1.5s; }
.f, .bajar { display: none !important; }

/* Índice lateral con fondo propio */
.indice { padding: 10px 10px 10px 14px; border-radius: 14px; background: var(--barra-bg); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--linea); pointer-events: none; }
.indice.visible { pointer-events: auto; }
.indice .barra-progreso { left: 6px; top: 12px; bottom: 12px; }
.caja { left: 14px; }
.indice.sobre-oscuro { background: rgba(20,21,27,.75); border-color: rgba(255,255,255,.08); }

/* Logos de herramientas */
.ico-h { background: #fff; padding: 5px; border: 1px solid var(--linea); }
.ico-h img { width: 100%; height: 100%; object-fit: contain; }

/* CV sin deformar */
.hoja { aspect-ratio: 910 / 1287; }
.hoja img { width: 100%; height: 100%; object-fit: contain; }

/* --------- Tablet --------- */
@media (max-width: 980px) {
  .barra .menu, .barra .boton-cv, .barra .icono:not(.tema) { display: none; }
  .menu-btn { display: block; }
  .portada-in { grid-template-columns: 1fr; padding-top: 120px; gap: 28px; text-align: left; }
  .retrato { width: min(340px, 72vw); order: -1; justify-self: start; margin-left: 4%; }
  .gira { min-height: 0; }
}
/* --------- Móvil --------- */
@media (max-width: 700px) {
  .barra { width: calc(100% - 20px); top: 10px; padding: 6px 8px 6px 12px; gap: 8px; }
  .menu-movil { top: 66px; left: 10px; right: 10px; }
  .portada-in { padding: 104px 20px 60px; }
  .retrato { width: min(270px, 70vw); justify-self: center; margin-left: 0; }
  .nota { font-size: 12px; padding: 6px 11px; }
  .n1 { left: -8%; top: 6%; } .n2 { right: -10%; top: 60%; } .n3 { left: -6%; bottom: -2%; }
  .acciones .boton { min-width: 0; flex: 1 1 150px; }
  .sobre { padding: 100px 20px 80px; }
  .herramientas, .metodo, .trayectoria, .seccion-cv { padding-left: 20px; padding-right: 20px; }
  .proyectos { padding: 30px 16px 60px; }
  .proy-cab { margin-bottom: 44px; }
  /* Ilustraciones de proyectos: todo apilado, nada encima de nada */
  .ilustra { min-height: 0; display: flex; flex-direction: column; align-items: stretch; gap: 14px; padding: 18px; border-radius: 22px; }
  .ilustra > * { position: relative !important; inset: auto !important; left: auto !important; right: auto !important; top: auto !important; bottom: auto !important; transform: none !important; animation: none !important; width: 100% !important; max-width: none; margin: 0; }
  .ilustra .vuelo { display: none; }
  .movil { width: 100% !important; max-width: 300px !important; align-self: center; }
  .chat { min-height: 0; }
  .sobre-correo { opacity: 1; }
  .proyecto.visto .sobre-correo { animation: none; }
  .pedidos { height: 300px; }
  .semana { padding: 14px; }
  .celdas { grid-template-rows: repeat(3, 40px); }
  .aviso-choque { right: 8px; top: -12px; }
  .chip-n8n { align-self: flex-start; width: auto !important; }
  .grafica { padding: 14px; }
  .caida { font-size: 22px; }
  .texto-p h3 { font-size: 26px; }
  .links-p a { flex: 1 1 auto; text-align: center; }
  .rasgos { grid-template-columns: 1fr; }
  .rasgo { height: auto; min-height: 150px; }
  .rasgo > span { position: absolute; }
  .ficha-herr { padding: 18px; border-radius: 20px; }
  .ficha-texto h3 { font-size: 28px; }
  .demo { min-height: 260px; padding: 14px; overflow-x: auto; }
  .hoja-x { grid-template-columns: 62px 78px 44px 48px; font-size: 12px; }
  .hito { padding: 20px 18px 8px; }
  .cursos { padding: 22px 18px; }
  .cursos li { flex-direction: column; gap: 4px; }
  .contacto { padding: 110px 20px 90px; }
  .contacto .acciones .boton { flex: 1 1 100%; }
  .datos-sobre { gap: 12px; }
}
@media (max-width: 380px) {
  .mono { transform: scale(.9); transform-origin: left center; }
  .idioma span { width: 28px; } .idioma i { width: 28px; } html[lang="en"] .idioma i { transform: translateX(28px); }
  .icono { width: 36px; height: 36px; } .menu-btn { width: 38px; height: 36px; }
  .menu-btn span:nth-child(1) { top: 11px; } .menu-btn span:nth-child(2) { top: 17px; } .menu-btn span:nth-child(3) { top: 23px; }
  .menu-btn[aria-expanded="true"] span:nth-child(1), .menu-btn[aria-expanded="true"] span:nth-child(3) { top: 17px; }
  .nombre { font-size: 38px; }
  .gira { font-size: 19px; }
  .ped { grid-template-columns: 54px 1fr auto; } .ped i { display: none; }
  .barra-m { grid-template-columns: 62px 1fr 30px; }
}
.boton, .links-p a, .lista-herr button { white-space: nowrap; }
@media (max-width: 700px) { .boton { padding: 14px 16px; font-size: 15px; } .acciones { gap: 10px; } }


/* ===================== Versión 5 ===================== */
/* Tarjetas que giran solo al pulsar: adelante y atrás */
.rasgo { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.cara-a::after { content: "↻"; position: absolute; left: 20px; bottom: 16px; font-size: 18px; color: var(--vino); opacity: .7; }
.cara-b::after { content: "↺"; position: absolute; right: 16px; bottom: 12px; font-size: 16px; opacity: .8; }
@media (hover: hover) { .rasgo:hover .cara-a { border-color: var(--vino); } }

/* Caja de herramientas: columnas siempre alineadas */
.caja-herr { align-items: stretch; }
.lista-herr { justify-content: space-between; }
.lista-herr button { flex: 1; }
.lista-herr button.activa, .lista-herr button:hover { transform: none; }
.lista-herr button.activa { box-shadow: inset 4px 0 0 var(--vino); }
.ficha-herr { min-height: 470px; align-items: center; }
.ico-h { width: 38px; height: 38px; padding: 0; display: grid; place-items: center; }
.ico-h img { width: 24px !important; height: 24px !important; object-fit: contain; }

/* Trayectoria en dos columnas, ordenada por fecha */
.tray-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.col-tit { font-size: 24px; margin: 0 0 22px; display: flex; align-items: center; gap: 10px; }
.col-tit::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--vino); }
.col-t:last-child .col-tit::before { border-radius: 2px; transform: rotate(45deg); }
.linea-t { position: relative; padding-left: 40px; }
.eje { left: 12px; width: 2px; top: 6px; bottom: 6px; }
.hito { max-width: none; }
.hito:hover { transform: none; }
.hito::before { left: -35px; top: 28px; width: 16px; height: 16px; border-width: 2px; }
.hito.est::before { border-radius: 3px; transform: rotate(45deg); }
.cursos-l { list-style: none; margin: 10px 0 14px; padding: 0; display: grid; gap: 9px; }
.cursos-l li { display: flex; align-items: baseline; gap: 10px; font-size: 15.5px; line-height: 1.45; }
.cursos-l .estado { background: #EEE9E2; color: var(--suave); }
:root[data-tema="oscuro"] .cursos-l .estado { background: rgba(255,255,255,.08); color: #C9CCD3; }
.cursos-l .estado.vivo { background: #E9B9C4; color: #7A2338; }

@media (max-width: 980px) {
  .tray-grid { grid-template-columns: 1fr; gap: 40px; }
  /* Herramientas en móvil y tablet: rejilla de botones y ficha debajo */
  .lista-herr { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; overflow: visible; padding: 0; }
  .lista-herr button { flex-direction: column; justify-content: center; gap: 6px; padding: 12px 6px; font-size: 13px; text-align: center; white-space: normal; line-height: 1.2; min-height: 82px; }
  .lista-herr button.activa { box-shadow: inset 0 -3px 0 var(--vino); }
  .ficha-herr { min-height: 0; align-items: stretch; }
}
@media (max-width: 700px) {
  .linea-t { padding-left: 40px; }
  .eje { left: 12px; }
  .hito::before { left: -35px; }
  .hito { padding: 20px 18px 8px; }
  .ficha-herr { padding: 18px; gap: 18px; }
  .ficha-texto h3 { font-size: 26px; margin-bottom: 8px; }
  .h-que { font-size: 16px; }
  .h-uso { font-size: 15px; }
  .h-proy a { font-size: 13px; padding: 6px 10px; }
  .demo { min-height: 240px; }
  .cursos-l li { flex-direction: column; gap: 3px; }
}
@media (max-width: 360px) {
  .lista-herr button { font-size: 12px; min-height: 76px; }
  .ico-h { width: 32px; height: 32px; }
}
.demo { padding-bottom: 38px; }
.demo-pie { bottom: 10px; right: 16px; }
:root .cursos-l .estado.vivo, :root[data-tema="oscuro"] .cursos-l .estado.vivo { background: #E9B9C4; color: #7A2338; }

/* Línea de tiempo: punto y línea comparten el mismo centro exacto */
.linea-t { --x: 13px; padding-left: 40px; }
.linea-t .eje { left: calc(var(--x) - 1px); width: 2px; }
.linea-t .hito::before { left: calc(var(--x) - 40px - 1px); transform: translateX(-50%); width: 16px; height: 16px; margin: 0; }
.linea-t .hito.est::before { transform: translateX(-50%) rotate(45deg); border-radius: 3px; width: 14px; height: 14px; top: 29px; }
