:root{
  --bg:#f7f7f4; --paper:#fff; --ink:#111418; --muted:#5d6470; --body:#3a404a;
  --accent:#2f5bff; --hl:#ffe45c; --dot:#d4d6d0;
  --display:"Bricolage Grotesque",system-ui,sans-serif;
  --text:Inter,system-ui,sans-serif;
  --hand:Caveat,cursive;
  --pad-x:clamp(16px,6vw,96px);
}
*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
body{background:var(--bg);color:var(--ink);font-family:var(--text);line-height:1.5;
  background-image:radial-gradient(var(--dot) 1px,transparent 1px);background-size:22px 22px;-webkit-font-smoothing:antialiased}
a{color:inherit}
img{max-width:100%;display:block}
:focus-visible{outline:2.5px solid var(--accent);outline-offset:3px;border-radius:4px}

.wrap{max-width:1240px;margin:0 auto;padding:0 var(--pad-x)}

/* Navegación */
header.top{position:sticky;top:0;z-index:20;background:rgba(247,247,244,.86);backdrop-filter:blur(8px);border-bottom:1px solid transparent;transition:border-color .2s}
header.top.scrolled{border-bottom-color:#e2e3dd}
header.top .wrap{display:flex;align-items:center;justify-content:space-between;height:64px;gap:16px}
.brand{font-weight:700;text-decoration:none;white-space:nowrap}
.top nav{display:flex;gap:24px;font-size:14px;color:var(--muted)}
.top nav a{text-decoration:none}
.top nav a:hover{color:var(--ink)}
.lang{display:flex;border:1.5px solid var(--ink);border-radius:8px;overflow:hidden;font-size:13px;font-weight:600}
.lang button{border:0;background:var(--paper);color:var(--ink);padding:5px 9px;cursor:pointer;font:inherit}
.lang button[aria-pressed="true"]{background:var(--ink);color:var(--paper)}
.right{display:flex;align-items:center;gap:24px}
@media (max-width:760px){.top nav{display:none}}

/* Elementos comunes */
.hand{font-family:var(--hand);color:var(--accent);font-size:clamp(24px,2.4vw,30px);display:inline-block;transform:rotate(-3deg)}
.btn{display:inline-flex;align-items:center;gap:8px;padding:12px 20px;border-radius:10px;border:1.5px solid var(--ink);text-decoration:none;font-weight:600;font-size:15px;background:var(--paper);box-shadow:3px 3px 0 var(--ink);transition:transform .12s,box-shadow .12s}
.btn.primary{background:var(--ink);color:var(--paper)}
.btn:hover{transform:translate(-1px,-1px);box-shadow:4px 4px 0 var(--ink)}
.btn:active{transform:translate(2px,2px);box-shadow:1px 1px 0 var(--ink)}
.ctas{display:flex;flex-wrap:wrap;gap:12px}
.card{background:var(--paper);border:1.5px solid var(--ink);border-radius:12px}

/* Hero */
.hero{padding-top:clamp(40px,8vh,96px)}
.hero-grid{display:grid;grid-template-columns:1.35fr .75fr;gap:clamp(32px,6vw,88px);align-items:center}
.hero h1{font-family:var(--display);font-weight:700;font-size:clamp(42px,6.6vw,100px);line-height:.98;letter-spacing:-.045em;max-width:14ch;margin-top:8px}
.mark{position:relative;display:inline-block;white-space:nowrap;z-index:0}
.mark svg{position:absolute;left:-4%;bottom:-.08em;width:108%;height:.42em;z-index:-1;fill:var(--hl)}
.lede{font-size:clamp(17px,1.5vw,20px);line-height:1.6;color:var(--body);max-width:58ch;margin:clamp(24px,4vh,36px) 0 28px}
.polaroid{position:relative;justify-self:center;width:100%;max-width:360px;background:var(--paper);padding:12px 12px 14px;border:1.5px solid var(--ink);border-radius:8px;box-shadow:5px 5px 0 var(--ink);transform:rotate(2.5deg)}
.polaroid img{width:100%;height:auto;aspect-ratio:4/5;object-fit:cover;object-position:center 40%;border-radius:4px;background:#e9e9e4}
.polaroid figcaption{font-family:var(--hand);font-size:24px;text-align:center;margin-top:8px;color:var(--body)}
.polaroid::before{content:"";position:absolute;top:-14px;left:50%;width:96px;height:26px;transform:translateX(-50%) rotate(-4deg);background:rgba(255,228,92,.85);border:1px solid rgba(17,20,24,.12)}
.photo-note{position:absolute;right:-28px;top:-62px;font-family:var(--hand);font-size:22px;color:var(--accent);transform:rotate(-4deg);display:flex;align-items:flex-end;gap:2px;white-space:nowrap}
.photo-note svg{width:30px;height:34px}
.stats{position:relative;display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-top:clamp(72px,10vh,104px)}
.stat{position:relative;padding:14px 16px}
.stat:nth-child(1){transform:rotate(-1.2deg)}.stat:nth-child(3){transform:rotate(1deg)}
.stat b{display:block;font-family:var(--display);font-weight:700;font-size:clamp(26px,2.8vw,38px);letter-spacing:-.03em}
.stat span{font-size:13px;color:var(--muted)}
/* La nota vive dentro de la tarjeta de Eventum: la flecha siempre apunta a ella */
.stat .scribble{font-size:22px;color:var(--accent)}
.stat .scribble>span{display:block;font-size:inherit;color:inherit}
/* La flecha va a la izquierda del texto, así su punta cae dentro de la tarjeta en cualquier ancho */
.scribble{position:absolute;bottom:calc(100% - 2px);left:16px;pointer-events:none;white-space:nowrap;font-family:var(--hand);font-size:22px;color:var(--accent);display:flex;align-items:flex-end;gap:4px;transform:rotate(-2deg)}
.scribble svg{width:38px;height:34px}
@media (max-width:980px){.photo-note{display:none}}
@media (max-width:800px){.hero-grid{grid-template-columns:1fr}.polaroid{max-width:240px}.stats{grid-template-columns:1fr 1fr}}

/* Secciones */
section.block{padding-top:clamp(96px,14vh,160px);scroll-margin-top:72px}
.section-head{margin-bottom:clamp(28px,4vh,44px)}
.section-head h2{font-family:var(--display);font-weight:700;font-size:clamp(34px,4.6vw,64px);letter-spacing:-.04em;line-height:1}

/* Experiencia */
.jobs{display:grid;gap:20px}
.job{display:grid;grid-template-columns:260px 1fr;gap:clamp(16px,4vw,48px);padding:clamp(20px,3vw,32px);box-shadow:4px 4px 0 var(--ink)}
.job h3{font-family:var(--display);font-size:clamp(22px,2.2vw,28px);letter-spacing:-.02em}
.job .role{font-weight:600;margin-top:4px}
.job .when{font-size:14px;color:var(--muted);margin-top:4px}
.job ul{list-style:none;display:grid;gap:12px;color:var(--body);font-size:16px;line-height:1.6;max-width:68ch}
.job li{position:relative;padding-left:22px}
.job li::before{content:"";position:absolute;left:0;top:.62em;width:10px;height:10px;border-radius:50%;border:2px solid var(--accent)}
.job .more{display:inline-block;margin-top:16px;font-weight:600;color:var(--accent);text-decoration:none;border-bottom:1.5px solid currentColor}
.badge{display:inline-block;background:var(--hl);font-size:12px;font-weight:700;padding:2px 8px;border-radius:999px;border:1.5px solid var(--ink);margin-top:10px}
@media (max-width:760px){.job{grid-template-columns:1fr}}

/* Tecnologías */
.skills{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}
.skill{padding:20px}
.skill h3{font-size:15px;margin-bottom:12px}
.chips{display:flex;flex-wrap:wrap;gap:6px}
.chips span{font-size:13px;padding:4px 10px;border-radius:999px;background:#f1f2ee;border:1px solid #e1e2dc}
@media (max-width:980px){.skills{grid-template-columns:1fr 1fr}}
@media (max-width:520px){.skills{grid-template-columns:1fr}}

/* Proyectos */
.projects{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:18px}
.project{display:flex;flex-direction:column;text-decoration:none;overflow:hidden;transition:transform .15s,box-shadow .15s}
.project:hover{transform:translate(-2px,-2px) rotate(-.4deg);box-shadow:5px 5px 0 var(--ink)}
.project .thumb{aspect-ratio:16/10;background:#eceee8;border-bottom:1.5px solid var(--ink);overflow:hidden}
.project .thumb img{width:100%;height:100%;object-fit:cover}
.project .thumb.empty{display:grid;place-items:center;font-family:var(--display);font-weight:700;font-size:40px;letter-spacing:-.04em;color:var(--ink);background:var(--hl)}
.project .info{padding:14px 16px 16px;display:flex;flex-direction:column;gap:6px;flex:1}
.project h3{font-size:16px;line-height:1.3}
.project .see{margin-top:auto;font-size:13px;font-weight:600;color:var(--accent)}

/* Formación */
.edu{display:grid;grid-template-columns:1fr 1fr;gap:20px}
.edu .card{padding:clamp(20px,3vw,28px)}
.edu h3{font-family:var(--display);font-size:clamp(20px,2vw,24px);letter-spacing:-.02em}
.edu .where{font-weight:600;margin-top:6px}
.edu .when{font-size:14px;color:var(--muted);margin-top:2px}
.edu p{color:var(--body);margin-top:12px;line-height:1.6}
.edu .badge{margin-top:0}

/* Desplegables */
summary{cursor:pointer;list-style:none}
summary::-webkit-details-marker{display:none}
.fold{margin-top:16px;padding-top:14px;border-top:1.5px dashed #d6d7d1}
.fold summary{display:flex;align-items:center;gap:8px;font-weight:600;color:var(--ink)}
.fold summary::after{content:"+";margin-left:auto;width:26px;height:26px;display:grid;place-items:center;border:1.5px solid var(--ink);border-radius:50%;font-weight:700;line-height:1;transition:transform .2s}
.fold[open] summary::after{transform:rotate(45deg)}
.fold summary:hover::after{background:var(--hl)}
.fold p{margin-top:10px}
/* "Ver más" de sección: botón que despliega más tarjetas */
.reveal{margin-top:20px}
.reveal > summary{width:fit-content}
.reveal .chev{width:16px;height:16px;transition:transform .2s}
.reveal[open] > summary .chev{transform:rotate(180deg)}
.reveal > summary .when-open,.reveal[open] > summary .when-closed{display:none}
.reveal[open] > summary .when-open{display:inline}
.reveal-body{margin-top:20px}
.reveal[open] .reveal-body{animation:drop .25s ease-out}
@keyframes drop{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.reveal[open] .reveal-body{animation:none}.fold summary::after,.reveal .chev{transition:none}}

/* Detalles dentro de una tarjeta de experiencia */
.job .summary{color:var(--body);font-size:16px;line-height:1.6;max-width:68ch}
.job .fold summary{font-size:15px}
.job .fold ul{margin-top:12px}
.papers{list-style:none;display:grid;gap:8px;margin-top:14px;padding-left:22px}
.papers a{color:var(--ink);text-decoration:none;border-bottom:1.5px solid var(--hl);font-weight:500}
.papers a:hover{background:var(--hl)}
.papers small{display:block;color:var(--muted);font-size:13px}
.job.small{box-shadow:3px 3px 0 var(--ink)}
.job.small h3{font-size:clamp(19px,1.8vw,22px)}
.edu .tag{display:inline-block;font-family:var(--hand);font-size:22px;color:var(--accent);transform:rotate(-2deg);margin-bottom:4px}
@media (max-width:760px){.edu{grid-template-columns:1fr}}

/* Contacto */
.contact{padding:clamp(28px,5vw,64px);box-shadow:6px 6px 0 var(--ink);text-align:center;display:flex;flex-direction:column;align-items:center;gap:16px}
.contact h2{font-family:var(--display);font-weight:700;font-size:clamp(30px,4.4vw,58px);letter-spacing:-.04em;line-height:1.02;max-width:20ch}
.contact p{color:var(--body);font-size:18px}
.contact .ctas{justify-content:center;margin-top:8px}

footer{padding:56px 0 40px;font-size:14px;color:var(--muted)}
footer .wrap{display:flex;justify-content:space-between;flex-wrap:wrap;gap:12px}
footer a{text-decoration:none}
footer a:hover{color:var(--ink)}
footer .links{display:flex;gap:18px}

/* ================================================================
   Componentes de las páginas de proyecto (subdominios)
   Todo lo de arriba es igual que la web principal: no lo cambies
   aquí, cámbialo en /public/styles.css y vuelve a copiarlo.
   ================================================================ */

/* Enlace de vuelta a la web principal */
.back{display:inline-flex;align-items:center;gap:6px;font-size:14px;color:var(--muted);text-decoration:none;white-space:nowrap}
.back:hover{color:var(--ink)}

/* Hero de proyecto: logo + nombre */
.project-id{display:flex;align-items:center;gap:12px;margin-bottom:10px}
.project-id img{width:52px;height:52px;border-radius:12px;border:1.5px solid var(--ink);background:var(--paper)}
.project-id .kind{font-size:14px;color:var(--muted)}
.status{display:inline-flex;align-items:center;gap:6px;font-size:13px;font-weight:600;padding:3px 10px;border-radius:999px;border:1.5px solid var(--ink);background:var(--paper)}
.status::before{content:"";width:8px;height:8px;border-radius:50%;background:#22a35a}

/* Capturas: marco tipo polaroid (escritorio) o teléfono */
.shot{position:relative;justify-self:center;width:100%;max-width:520px;background:var(--paper);padding:10px;border:1.5px solid var(--ink);border-radius:10px;box-shadow:5px 5px 0 var(--ink);transform:rotate(1.5deg)}
.shot img{width:100%;height:auto;border-radius:5px}
.shot figcaption{font-family:var(--hand);font-size:22px;text-align:center;margin-top:6px;color:var(--body)}
.phone{justify-self:center;width:100%;max-width:280px;padding:10px;border:1.5px solid var(--ink);border-radius:32px;background:var(--ink);box-shadow:5px 5px 0 rgba(17,20,24,.25);transform:rotate(2deg)}
.phone img{width:100%;height:auto;border-radius:24px}

/* Rejilla de funciones */
.features{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:16px}
.feature{padding:20px}
.feature .icon{font-size:26px;line-height:1;margin-bottom:10px}
.feature h3{font-size:17px;margin-bottom:6px}
.feature p{color:var(--body);font-size:15px;line-height:1.55}

/* Pasos numerados ("cómo funciona") */
.steps{list-style:none;display:grid;gap:14px;counter-reset:step;max-width:760px}
.steps li{position:relative;padding:16px 18px 16px 64px;counter-increment:step}
.steps li::before{content:counter(step);position:absolute;left:16px;top:14px;width:32px;height:32px;display:grid;place-items:center;border-radius:50%;background:var(--hl);border:1.5px solid var(--ink);font-family:var(--display);font-weight:700}
.steps h3{font-size:16px}
.steps p{color:var(--body);font-size:15px;margin-top:4px}

/* Galería de capturas */
.gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:16px}
.gallery figure{padding:8px}
.gallery img{width:100%;height:auto;border-radius:6px}
.gallery figcaption{font-size:13px;color:var(--muted);margin-top:6px;padding:0 4px 4px}

/* Bloque de texto largo */
.prose{max-width:68ch;color:var(--body);font-size:17px;line-height:1.7}
.prose p+p{margin-top:14px}

/* ================================================================
   Solo ChronoJump
   ================================================================ */

/* Tipos de salto: tarjetas con la sigla en una pastilla de color */
.jump-types{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:16px}
.jump{padding:20px}
.jump .sigla{display:inline-block;font-family:var(--display);font-weight:800;font-size:20px;letter-spacing:-.02em;padding:2px 12px;border-radius:999px;border:1.5px solid var(--ink);background:var(--c);margin-bottom:10px}
.jump h3{font-size:17px;margin-bottom:6px}
.jump p{color:var(--body);font-size:15px;line-height:1.55}

/* Cómo funciona: pasos + captura de móvil al lado */
.how-grid{display:grid;grid-template-columns:minmax(0,1fr) 260px;gap:clamp(24px,5vw,64px);align-items:start}
.how-grid > *{min-width:0}
.how-grid .phone{max-width:260px;position:sticky;top:96px}
@media (max-width:860px){.how-grid{grid-template-columns:1fr}.how-grid .phone{position:static;max-width:240px}}

/* Fórmulas dentro del texto */
.steps code{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:.92em;background:#f1f2ee;border:1px solid #e1e2dc;border-radius:6px;padding:1px 6px;display:inline-block;max-width:100%;line-height:1.4}

/* Galería de capturas de escritorio, más anchas */
.gallery.wide{grid-template-columns:repeat(auto-fill,minmax(min(100%,300px),1fr))}
.note,.tech-note{color:var(--muted);font-size:14px;margin-top:14px;max-width:68ch}
.tech-note{font-size:16px;color:var(--body);line-height:1.6;margin-top:18px}
