/* aleclagarde.com — inicio (currículum) y apps. Verde oliva sobre hueso,
   una sola letra (Zilla Slab). El currículum manda; las apps van aparte y la
   lista crece sin tocar el diseño. */
@font-face { font-family: 'Zilla Slab'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(fuentes/zilla-slab-latin-400-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Zilla Slab'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(fuentes/zilla-slab-latin-ext-400-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Zilla Slab'; font-style: normal; font-weight: 600; font-display: swap;
  src: url(fuentes/zilla-slab-latin-600-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Zilla Slab'; font-style: normal; font-weight: 600; font-display: swap;
  src: url(fuentes/zilla-slab-latin-ext-600-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Zilla Slab'; font-style: italic; font-weight: 400; font-display: swap;
  src: url(fuentes/zilla-slab-latin-400-italic.woff2) format('woff2'); }


:root {
  --hueso: #ecebe7;
  --superficie: #e1dfd9;
  --oliva: #38450f;
  --suave: #5d683a;
  --letra: 'Zilla Slab', Georgia, serif;
  --t-peq: 0.875rem;
  --t-cuerpo: clamp(1.0625rem, 1rem + 0.25vw, 1.25rem);
  --t-lema: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  --t-titulo: clamp(2rem, 1.4rem + 2.2vw, 3.25rem);
  --t-marca: clamp(3.25rem, 1rem + 9vw, 9.5rem);
  --borde: clamp(16px, 4vw, 56px);
  --hueco: 8px;
  --ancho: 1240px;
  color-scheme: light;
}
html[data-idioma="es"] [lang="en"]:not(html),
html[data-idioma="en"] [lang="es"]:not(html) { display: none !important; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: var(--hueso); color: var(--oliva); font: 400 var(--t-cuerpo)/1.5 var(--letra); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; text-wrap: balance; }
h1 { font-size: var(--t-marca); line-height: 0.9; letter-spacing: -0.045em; }
h2 { font-size: var(--t-titulo); line-height: 1; letter-spacing: -0.025em; }
h3 { font-size: var(--t-lema); line-height: 1.2; letter-spacing: -0.01em; }
p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
.pequeno { font-size: var(--t-peq); color: var(--suave); }
.casa > * { max-width: var(--ancho); margin-left: auto; margin-right: auto; }

/* ---------- Barra ---------- */
.barra { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 24px var(--borde) 0; flex-wrap: wrap; }
.marca { font-weight: 600; text-decoration: none; }
.barra nav { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.barra nav > a { text-decoration: none; }
.barra nav > a:hover { text-decoration: underline; text-underline-offset: 4px; }
.idiomas { display: flex; gap: 4px; }
.idiomas a { text-decoration: none; padding: 2px 8px; border-radius: 6px; }
.idiomas a[aria-current] { background: var(--oliva); color: var(--hueso); }

main { padding: 0 var(--borde); }

/* ---------- Portada ---------- */
.portada { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px var(--borde); padding-top: clamp(56px, 9vw, 120px); align-items: end; }
.portada h1 { grid-column: 1 / -1; }
.portada-texto { display: contents; }
.portada-texto > :not(h1) { grid-column: 1; }
.rol { font-size: var(--t-lema); font-weight: 600; margin-top: -24px; }
.lema { font-size: var(--t-lema); line-height: 1.35; max-width: 34ch; }
.botones { display: flex; flex-wrap: wrap; gap: 10px; }
.boton { display: inline-block; padding: 12px 22px; border-radius: 6px; background: var(--oliva); color: var(--hueso); text-decoration: none; font-weight: 600; transition: transform .15s, background .2s; }
.boton:hover { background: #2a340b; }
.boton:active { transform: scale(.97); }
.boton-suave { background: var(--superficie); color: var(--oliva); }
.boton-suave:hover { background: #d4d1c9; }
.enlace { font-weight: 600; text-underline-offset: 5px; text-decoration-thickness: 2px; }

.fichas { grid-column: 2; grid-row: 2 / span 4; display: grid; grid-template-columns: 1fr 1fr; gap: var(--hueco); align-self: stretch; }
.ficha { background: var(--superficie); border-radius: 6px; padding: 20px; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; min-height: 150px; }
.ficha dt { color: var(--suave); }
.ficha dd { font-weight: 600; line-height: 1.3; }
.ficha-0 { background: var(--oliva); color: var(--hueso); }
.ficha-0 dt { color: #c9cfa9; }
.reloj { font-size: var(--t-titulo); line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }

/* ---------- Bloques del currículum: título a la izquierda, contenido a la derecha ---------- */
.bloque { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 24px var(--borde); margin-top: clamp(88px, 12vw, 160px); }
.bloque > h2 { position: sticky; top: 24px; align-self: start; }
.libro { display: grid; gap: 48px; }
.libro > li { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 24px; }
.fecha { color: var(--suave); padding-top: 4px; }
.libro > li > div { display: grid; gap: 10px; }
.libro h3 span { font-weight: 400; color: var(--suave); }
.libro ul { display: grid; gap: 6px; }
.libro ul li { padding-left: 18px; position: relative; }
.libro ul li::before { content: ""; position: absolute; left: 0; top: .66em; width: 7px; height: 7px; border-radius: 50%; background: var(--suave); }
.tec { color: var(--suave); font-style: italic; }
.habilidades { display: grid; grid-template-columns: 1fr 1fr; gap: var(--hueco); }
.habilidades div { background: var(--superficie); border-radius: 6px; padding: 20px; display: grid; gap: 8px; align-content: start; }
.habilidades dt { font-weight: 600; font-size: var(--t-lema); }

/* ---------- Apps (secundario) ---------- */
.bloque-apps > div { display: grid; gap: 20px; }
.nota { color: var(--suave); }
.filas { display: grid; }
.filas a { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 14px 16px; margin: 0 -16px; border-radius: 6px; text-decoration: none; transition: background .2s; }
.filas a:hover, .filas a:focus-visible { background: var(--superficie); }
.filas img { width: 52px; border-radius: 12px; }
.fila-texto { display: grid; }
.fila-texto strong { font-weight: 600; }
.fila-texto span { color: var(--suave); }
.filas em { font-style: normal; font-size: var(--t-peq); color: var(--suave); }

/* ---------- Contacto ---------- */
.cierre { font-size: var(--t-lema); line-height: 1.35; max-width: 34ch; }
.cierre a { text-decoration-thickness: 4px; text-underline-offset: 6px; font-weight: 600; }

/* ---------- Página de apps ---------- */
.portada-apps { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.portada-apps h1 { grid-column: 1; }
.portada-apps .portada-texto > .lema { grid-column: 2; max-width: none; padding-bottom: 12px; }
.tarjetas { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: var(--hueco); margin-top: 56px; }
.tarjeta { background: var(--superficie); border-radius: 6px; padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.tarjeta img { width: 72px; border-radius: 16px; margin-bottom: 8px; }
.tarjeta h2 { font-size: var(--t-lema); letter-spacing: -0.01em; }
.tarjeta-enlaces { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 8px; }

/* ---------- Pie de teselas ---------- */
.pie { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--hueco); padding: var(--hueco); margin-top: clamp(96px, 12vw, 160px); max-width: none !important; }
.tesela { margin: 0; padding: 24px; border-radius: 6px; background: var(--superficie); min-height: 200px; display: flex; flex-direction: column; justify-content: space-between; gap: 16px; }
.tesela-frase { grid-column: span 5; }
.tesela-frase p:first-child { font-size: var(--t-lema); line-height: 1.3; max-width: 26ch; }
.tesela-nav { grid-column: span 3; justify-content: flex-start; gap: 4px; }
.tesela-nav a { text-decoration: none; }
.tesela-nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.tesela-correo { grid-column: span 4; justify-content: flex-end; }
.tesela-correo a:first-child { font-size: var(--t-lema); font-weight: 600; overflow-wrap: anywhere; }
.tesela-marca { grid-column: span 8; min-height: 300px; background: var(--oliva); color: var(--hueso); font-size: clamp(3rem, 8vw, 9rem); font-weight: 600; letter-spacing: -0.04em; line-height: 0.9; justify-content: center; align-items: center; text-align: center; }
.tesela-invita { grid-column: span 4; min-height: 300px; background: var(--suave); color: var(--hueso); text-decoration: none; font-size: var(--t-lema); font-weight: 600; transition: background .2s; }
.tesela-invita svg { align-self: flex-end; transition: transform .3s cubic-bezier(.2, .7, .1, 1); }
.tesela-invita:hover { background: #4d572f; }
.tesela-invita:hover svg { transform: translate(6px, -6px); }

/* ---------- Aparición ---------- */
.js .aparece { opacity: 0; transform: translateY(20px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .1, 1); }
.js .aparece.visto { opacity: 1; transform: none; }
.portada h1 { animation: sube 1s cubic-bezier(.2, .7, .1, 1) both; }
@keyframes sube { from { opacity: 0; transform: translateY(30px); } }
@media (prefers-reduced-motion: reduce) {
  .js .aparece { opacity: 1; transform: none; transition: none; }
  .portada h1 { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Tableta ---------- */
@media (max-width: 1000px) {
  .portada, .portada-apps { grid-template-columns: 1fr; }
  .portada-apps .portada-texto > .lema { grid-column: 1; }
  .fichas { grid-column: 1; grid-row: auto; }
  .bloque { grid-template-columns: 1fr; }
  .bloque > h2 { position: static; }
  .pie { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .tesela-frase, .tesela-nav { grid-column: span 3; }
  .tesela-correo, .tesela-marca, .tesela-invita { grid-column: 1 / -1; }
  .tesela-marca, .tesela-invita { min-height: 180px; }
}
/* ---------- Móvil ---------- */
@media (max-width: 640px) {
  .rol { margin-top: -16px; }
  .fichas { grid-template-columns: 1fr 1fr; }
  .ficha { min-height: 120px; padding: 16px; }
  .libro > li { grid-template-columns: 1fr; gap: 6px; }
  .habilidades { grid-template-columns: 1fr; }
  .filas a { grid-template-columns: 44px minmax(0, 1fr); }
  .filas img { width: 44px; }
  .filas em { display: none; }
  .pie { grid-template-columns: 1fr 1fr; gap: 6px; padding: 6px; }
  .tesela { padding: 20px; min-height: 140px; }
  .tesela-marca { order: -2; min-height: 150px; }
  .tesela-invita { order: -1; min-height: 130px; }
  .tesela-frase, .tesela-nav { grid-column: span 1; }
}
.tarjeta .boton-suave { background: var(--hueso); }
