/* Juan Díaz — estilos del tema. Paleta «Sistema humano» + Newsreader y Hanken Grotesk. */

@font-face { font-family: "Newsreader"; src: url("../fonts/newsreader.ttf") format("truetype"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("../fonts/hanken.ttf") format("truetype"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  /* Paleta tomada del logotipo de Juan: tinta, amarillo y blancos cálidos */
  --tinta: #23272C;
  --hueso: #EEEDE8;
  --calido: #F7F3EA;
  --amarillo: #FCC629;
  /* Derivados para accesibilidad y matices */
  --ocre: #7A5800;                    /* acento pequeño sobre claro, 5,6:1 sobre hueso */
  --tinta-medio: #333A42;             /* superficies elevadas sobre tinta */
  --texto-suave: #565B62;             /* texto secundario sobre claro, 5,8:1 */
  --texto-suave-osc: #B7BBC1;         /* texto secundario sobre tinta, 7,8:1 */
  --linea: rgba(35, 39, 44, .22);
  --linea-osc: rgba(238, 237, 232, .24);
  --slant: 14%;                       /* inclinación tomada del logotipo */

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;

  --max: 1320px;
  --gutter: clamp(20px, 4vw, 56px);
  --header-h: 72px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--hueso); color: var(--tinta); font-family: var(--sans); font-size: 1.0625rem; line-height: 1.65; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; }
::selection { background: var(--amarillo); color: var(--tinta); }

:focus-visible { outline: 3px solid var(--tinta); outline-offset: 3px; border-radius: 2px; }
.on-dark :focus-visible { outline-color: var(--amarillo); }

.skip { position: absolute; left: 12px; top: -80px; z-index: 100; background: var(--tinta); color: var(--hueso); padding: 10px 16px; text-decoration: none; font-weight: 600; }
.skip:focus { top: 12px; }

.screen-reader-text { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

/* ---------- Estructura ---------- */
.wrap { width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; }
.sec { padding-block: clamp(72px, 10vw, 148px); }
.sec--hueso { background: var(--hueso); }
.sec--calido { background: var(--calido); }
.sec--amarillo { background: var(--amarillo); color: var(--tinta); --texto-suave: #34383D; --linea: rgba(35, 39, 44, .38); }
.sec--tinta { background: var(--tinta); color: var(--hueso); }
.on-dark { color: var(--hueso); }

/* ---------- Tipografía ---------- */
.display { font-family: var(--serif); font-weight: 300; font-optical-sizing: auto; line-height: 1; letter-spacing: -.025em; }
.title-xl { font-size: clamp(2.6rem, 6vw, 5.6rem); }
.title-lg { font-size: clamp(2.2rem, 4.2vw, 4rem); line-height: 1.04; }
.title-md { font-family: var(--serif); font-weight: 400; font-size: clamp(1.4rem, 2.2vw, 1.9rem); line-height: 1.2; letter-spacing: -.01em; }
.lead { font-size: 1.2rem; line-height: 1.6; }
.muted { color: var(--texto-suave); }
.on-dark .muted, .sec--tinta .muted { color: var(--texto-suave-osc); }
.side-title { grid-column: 1 / span 3; font-family: var(--serif); font-weight: 500; font-size: 1.5rem; line-height: 1.2; padding-top: .7rem; border-top: 2px solid var(--tinta); align-self: start; max-width: 11rem; }
.on-dark .side-title { border-top-color: var(--amarillo); }

/* ---------- Enlaces y botones ---------- */
.link { font-weight: 600; text-decoration: underline; text-decoration-color: var(--amarillo); text-decoration-thickness: 3px; text-underline-offset: .26em; transition: text-decoration-color .2s; }
.link:hover { text-decoration-color: currentColor; }
.on-dark .link { color: var(--hueso); }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 28px; background: var(--tinta); color: var(--hueso); font: 600 1rem/1 var(--sans); text-decoration: none; border: 2px solid var(--tinta); border-radius: 999px; transition: background .2s, color .2s, border-color .2s; cursor: pointer; }
.btn:hover { background: var(--amarillo); color: var(--tinta); border-color: var(--tinta); }
.btn--small { min-height: 44px; padding: 0 22px; font-size: .95rem; }
.btn--amarillo { background: var(--amarillo); color: var(--tinta); border-color: var(--amarillo); }
.btn--amarillo:hover { background: var(--hueso); border-color: var(--hueso); }
.btn--ghost-dark { background: transparent; color: var(--hueso); border-color: var(--hueso); }
.btn--ghost-dark:hover { background: var(--hueso); color: var(--tinta); border-color: var(--hueso); }
.btn[aria-disabled="true"] { background: transparent; color: var(--texto-suave); border: 2px dashed var(--texto-suave); cursor: not-allowed; }

/* ---------- Cabecera ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--hueso); border-bottom: 1px solid var(--linea); }
.site-header__bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: var(--header-h); width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.brand { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; }
.brand__logo { display: block; height: 38px; width: auto; flex: none; }
.brand--solo .brand__logo { height: 48px; }
.brand__name { font-family: var(--serif); font-weight: 500; font-size: 1.25rem; letter-spacing: -.01em; }
.nav { display: flex; align-items: center; gap: 36px; }
.nav__list { display: flex; gap: 30px; }
.nav__list a { text-decoration: none; font-weight: 500; font-size: .98rem; padding-block: 8px; background: linear-gradient(var(--amarillo), var(--amarillo)) 0 100% / 0 3px no-repeat; transition: background-size .25s var(--ease); }
.nav__list a:hover, .nav__list a[aria-current="page"] { background-size: 100% 3px; }
.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); min-height: min(calc(100svh - var(--header-h)), 900px); }
.hero__copy { display: flex; flex-direction: column; justify-content: center; padding: clamp(48px, 7vw, 112px) clamp(24px, 4vw, 72px) clamp(48px, 7vw, 96px) max(var(--gutter), calc((100vw - var(--max)) / 2)); }
.hero__title { font-size: clamp(2.5rem, 4.7vw, 4.9rem); max-width: 14ch; }
.hero__title .line { display: block; padding-bottom: .06em; text-wrap: balance; }
.hero__title .line + .line { margin-top: .3em; }
.hero__title .line > span { display: inline-block; }
.hero__lead { max-width: 44ch; margin-top: clamp(28px, 3.4vw, 48px); font-size: 1.15rem; color: var(--texto-suave); }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 32px; margin-top: 36px; }
.hero__note { margin-top: 32px; font-size: .95rem; color: var(--texto-suave); }

.photo { position: relative; background: transparent; display: flex; flex-direction: column; min-height: 0; }
.photo__frame { position: relative; flex: 1 1 auto; min-height: 0; display: flex; }
.photo__frame img { width: 100%; flex: 1 1 auto; min-height: 0; object-fit: cover; object-position: 50% 16%; background: var(--tinta); clip-path: polygon(calc(var(--slant) + 26px) 0, 100% 0, 100% 100%, 26px 100%); }
.photo__frame::before { content: ""; position: absolute; inset: 0; background: var(--amarillo); clip-path: polygon(var(--slant) 0, calc(var(--slant) + 26px) 0, 26px 100%, 0 100%); pointer-events: none; }
.photo figcaption { background: var(--amarillo); color: var(--tinta); padding: 14px var(--gutter) 16px; font-size: .9rem; font-weight: 600; position: relative; }

/* ---------- Presentación ---------- */
.perfil { grid-column: 4 / -1; }
.statement { font-family: var(--serif); font-weight: 300; font-size: clamp(1.7rem, 3vw, 2.75rem); line-height: 1.2; letter-spacing: -.015em; max-width: 27em; }
.perfil__cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 48px; margin-top: clamp(40px, 5vw, 72px); max-width: 52rem; margin-left: clamp(0px, 8vw, 120px); }
.perfil__cols p { color: var(--texto-suave); max-width: 38ch; }
.perfil__more { margin-top: 40px; margin-left: clamp(0px, 8vw, 120px); }

/* ---------- Trayectoria y especialidades ---------- */
.timeline { grid-column: 4 / -1; }
.timeline__item { display: grid; grid-template-columns: minmax(150px, 3fr) 9fr; gap: 24px; padding-block: 32px; border-top: 1px solid var(--linea); }
.timeline__item:last-child { border-bottom: 1px solid var(--linea); }
.timeline__date { font-family: var(--serif); font-size: 1.15rem; font-variant-numeric: lining-nums tabular-nums; display: flex; align-items: baseline; gap: 12px; }
.timeline__date::before { content: ""; flex: none; width: 10px; height: 10px; background: var(--amarillo); border: 1.5px solid var(--tinta); transform: translateY(1px); }
.timeline__role { font-family: var(--serif); font-weight: 400; font-size: clamp(1.4rem, 2vw, 1.85rem); line-height: 1.2; margin-bottom: 10px; }
.timeline__item p:not(.timeline__date) { color: var(--texto-suave); max-width: 54ch; }
.timeline__place { font-weight: 600; color: var(--tinta); margin-bottom: 6px; }

.skills { margin-top: clamp(72px, 9vw, 128px); }
.skills__cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 24px; margin-top: 32px; }
.skills__group { font-size: .95rem; font-weight: 700; color: var(--ocre); margin-bottom: 14px; }
.skills__list li { padding-block: 8px; border-top: 1px solid var(--linea); }
.skills__list li:first-child { border-top: 0; padding-top: 0; }

/* ---------- Proyectos (tinta) ---------- */
.big-title { margin-bottom: clamp(56px, 8vw, 112px); max-width: 14ch; }
.feature { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: start; margin-bottom: clamp(80px, 11vw, 160px); }
.feature__text { grid-column: 1 / span 4; position: sticky; top: calc(var(--header-h) + 32px); }
.feature__name { font-family: var(--serif); font-weight: 300; font-size: clamp(2.6rem, 4.4vw, 4.6rem); line-height: .98; letter-spacing: -.03em; margin-bottom: 18px; }
.feature__tagline { font-family: var(--serif); font-size: 1.35rem; line-height: 1.3; color: var(--amarillo); margin-bottom: 20px; }
.feature__text > p:not(.feature__tagline) { color: var(--texto-suave-osc); max-width: 38ch; }
.facts { margin-block: 28px 32px; border-top: 1px solid var(--linea-osc); }
.facts div { display: grid; grid-template-columns: 6.5rem 1fr; gap: 12px; padding-block: 12px; border-bottom: 1px solid var(--linea-osc); font-size: .95rem; }
.facts dt { color: var(--texto-suave-osc); }
.on-light .facts, .facts--light { border-top-color: var(--linea); }
.facts--light div { border-bottom-color: var(--linea); }
.facts--light dt { color: var(--texto-suave); }

.shot { display: block; grid-column: 5 / -1; overflow: hidden; aspect-ratio: 1250 / 800; background: var(--tinta-medio); outline: 1px solid var(--linea-osc); outline-offset: 10px; }
.shot img { width: calc(100% * 1265 / 1230); max-width: none; height: 100%; object-fit: cover; object-position: 0 0; transition: transform .8s var(--ease); }
.shot:hover img { transform: scale(1.02); }
.feature--b .feature__text { grid-column: 8 / -1; grid-row: 1; }
.feature--b .shot { grid-column: 1 / span 6; grid-row: 1; }

.archive { border-top: 1px solid var(--linea-osc); padding-top: 28px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; }
.archive__title { font-family: var(--serif); font-weight: 500; font-size: 1.3rem; grid-column: 1 / span 3; }
.archive__list { grid-column: 5 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 40px; color: var(--texto-suave-osc); }
.archive__list strong { color: var(--hueso); font-weight: 700; display: block; }
.archive__list li { padding-left: 18px; position: relative; }
.archive__list li::before { content: ""; position: absolute; left: 0; top: .6em; width: 8px; height: 8px; background: var(--amarillo); }

/* ---------- Servicios ---------- */
.side { grid-column: 1 / span 4; align-self: start; position: sticky; top: calc(var(--header-h) + 40px); }
.side .title-lg { margin-bottom: 28px; max-width: 12ch; }
.services { grid-column: 6 / -1; }
.service { padding-block: 32px; border-top: 1px solid var(--linea); position: relative; }
.service:last-child { border-bottom: 1px solid var(--linea); }
.service::before { content: ""; position: absolute; left: 0; top: -1px; width: 0; height: 4px; background: var(--amarillo); transition: width .4s var(--ease); }
.service:hover::before { width: 100%; }
.service h3 { margin-bottom: 10px; max-width: 30ch; }
.service p { color: var(--texto-suave); max-width: 50ch; }

/* ---------- Contacto ---------- */
.contact { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 56px; }
.contact__title { grid-column: 1 / -1; font-size: clamp(2.8rem, 7.6vw, 7.4rem); line-height: .98; letter-spacing: -.03em; }
.contact__body { grid-column: 6 / -1; }
.contact__lead { font-size: 1.2rem; max-width: 40ch; }
.contact__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.contact__data { margin-top: 48px; border-top: 1px solid var(--linea); }
.contact__data div { display: grid; grid-template-columns: 7rem 1fr; gap: 16px; padding-block: 16px; border-bottom: 1px solid var(--linea); }
.contact__data dt { color: var(--texto-suave); }
.contact__data a { text-decoration: underline; text-decoration-color: var(--amarillo); text-decoration-thickness: 2px; text-underline-offset: .25em; word-break: break-word; }
.contact__data a:hover { text-decoration-color: var(--tinta); }

/* ---------- Pie ---------- */
.footer { background: var(--tinta); color: var(--hueso); padding-block: 48px; border-top: 1px solid var(--linea-osc); }
.footer__inner { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 32px; }
.footer__id { display: flex; gap: 16px; align-items: flex-start; }
.footer__id p { color: var(--texto-suave-osc); font-size: .95rem; }
.footer__id strong { color: var(--hueso); font-family: var(--serif); font-weight: 500; font-size: 1.15rem; }
.footer__legal { display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: .95rem; }
.footer__legal a { text-decoration: none; color: var(--texto-suave-osc); }
.footer__legal a:hover { color: var(--hueso); text-decoration: underline; text-decoration-color: var(--amarillo); }
.footer__copy { width: 100%; padding-top: 24px; border-top: 1px solid var(--linea-osc); font-size: .875rem; color: var(--texto-suave-osc); }

/* ---------- Página Perfil y CV ---------- */
.page-head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); min-height: min(calc(100svh - var(--header-h)), 820px); }
.page-head__copy { padding: clamp(48px, 7vw, 112px) clamp(24px, 4vw, 72px) clamp(48px, 7vw, 96px) max(var(--gutter), calc((100vw - var(--max)) / 2)); display: flex; flex-direction: column; justify-content: flex-end; }
.page-head__copy .lead { margin-top: 28px; max-width: 42ch; color: var(--texto-suave); }
.page-head__actions { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; margin-top: 32px; }
.cv-note { margin-top: 20px; font-size: .95rem; color: var(--texto-suave); max-width: 44ch; }
.cv-block { margin-bottom: clamp(64px, 8vw, 112px); }
.cv-block:last-child { margin-bottom: 0; }
.cv-block__head { grid-column: 1 / span 3; }
.pending { border: 2px dashed var(--texto-suave); padding: 20px 24px; color: var(--texto-suave); max-width: 46ch; }
.pending strong { color: var(--tinta); }

/* ---------- Página de proyecto ---------- */
.proj-head { background: var(--tinta); color: var(--hueso); padding-top: clamp(48px, 7vw, 96px); padding-bottom: clamp(140px, 22vw, 320px); }
.crumbs { font-size: .95rem; color: var(--texto-suave-osc); margin-bottom: clamp(32px, 5vw, 64px); }
.crumbs a { text-decoration: underline; text-decoration-color: var(--amarillo); text-underline-offset: .22em; text-decoration-thickness: 2px; }
.proj-head__title { font-size: clamp(3.4rem, 11vw, 10.5rem); letter-spacing: -.035em; line-height: .92; }
.proj-head__tagline { font-family: var(--serif); font-size: clamp(1.4rem, 2.6vw, 2.2rem); line-height: 1.25; color: var(--amarillo); margin-top: 24px; max-width: 28ch; }
.proj-shot { margin-top: calc(-1 * clamp(110px, 17vw, 250px)); position: relative; z-index: 1; }
.proj-shot__frame { overflow: hidden; background: var(--tinta-medio); box-shadow: 0 0 0 10px var(--hueso), 0 0 0 11px var(--linea); aspect-ratio: 1250 / 712; }
.proj-shot__frame img { width: calc(100% * 1265 / 1230); max-width: none; }
.proj-shot figcaption { margin-top: 22px; font-size: .9rem; color: var(--texto-suave); }
.proj-body { padding-top: clamp(64px, 8vw, 112px); }
.proj-aside { grid-column: 1 / span 4; position: sticky; top: calc(var(--header-h) + 32px); align-self: start; }
.proj-main { grid-column: 6 / -1; }
.proj-main section + section { margin-top: clamp(48px, 6vw, 80px); }
.proj-main h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.7rem, 2.8vw, 2.4rem); line-height: 1.1; letter-spacing: -.015em; margin-bottom: 18px; }
.proj-main p { max-width: 58ch; }
.proj-main p + p { margin-top: 1em; }
.proj-main ul.bullets { max-width: 58ch; }
.proj-main ul.bullets li { padding: 10px 0 10px 22px; border-top: 1px solid var(--linea); position: relative; }
.proj-main ul.bullets li:last-child { border-bottom: 1px solid var(--linea); }
.proj-main ul.bullets li::before { content: ""; position: absolute; left: 0; top: 1.15em; width: 8px; height: 8px; background: var(--amarillo); border: 1px solid var(--tinta); }
.next { display: block; text-decoration: none; padding-block: clamp(56px, 8vw, 112px); }
.next__label { color: var(--texto-suave-osc); margin-bottom: 12px; }
.next__name { font-size: clamp(2.6rem, 7vw, 6.4rem); line-height: .98; transition: color .25s; }
.next:hover .next__name { color: var(--amarillo); }

/* ---------- Movimiento: una secuencia de entrada en el hero ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero__title .line > span { animation: subir 1s var(--ease) both; }
  .hero__title .line:nth-child(2) > span { animation-delay: .18s; }
  .hero__lead, .hero__actions, .hero__note { animation: aparecer .8s ease-out .5s both; }
  .photo img { animation: aparecer 1.2s ease-out .15s both; }
}
@keyframes subir { from { transform: translateY(.6em); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes aparecer { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition-duration: .01ms !important; } }

/* ---------- Tablet ---------- */
@media (max-width: 1080px) {
  .side-title { max-width: none; margin-bottom: 28px; }
  .perfil, .timeline { grid-column: 1 / -1; }
  .perfil__cols, .perfil__more { margin-left: 0; }
  .skills__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature__text, .feature--b .feature__text { grid-column: 1 / span 9; grid-row: 2; position: static; margin-top: 36px; }
  .shot, .feature--b .shot { grid-column: 1 / -1; grid-row: 1; }
  .archive__title { grid-column: 1 / -1; margin-bottom: 16px; }
  .archive__list { grid-column: 1 / -1; }
  .side { grid-column: 1 / -1; position: static; margin-bottom: 40px; }
  .services { grid-column: 1 / -1; }
  .contact__body { grid-column: 1 / span 10; }
  .cv-block__head { grid-column: 1 / -1; margin-bottom: 28px; }
  .proj-aside { grid-column: 1 / -1; position: static; margin-bottom: 48px; }
  .proj-main { grid-column: 1 / -1; }
}

/* ---------- Móvil ---------- */
@media (max-width: 860px) {
  :root { --header-h: 64px; }
  .nav-toggle { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px; background: transparent; color: var(--tinta); border: 2px solid var(--tinta); border-radius: 999px; font: 600 .95rem/1 var(--sans); cursor: pointer; }
  .nav-toggle__icon { width: 16px; height: 10px; border-top: 2px solid currentColor; border-bottom: 2px solid currentColor; }
  .nav-toggle[aria-expanded="true"] { background: var(--tinta); color: var(--hueso); }
  .nav { position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0; background: var(--hueso); border-bottom: 1px solid var(--linea); padding: 8px var(--gutter) 24px; }
  .nav__list { flex-direction: column; gap: 0; }
  .nav__list a { display: block; padding: 16px 0; font-size: 1.3rem; font-family: var(--serif); border-bottom: 1px solid var(--linea); background: none; }
  .nav__list a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--amarillo); padding-left: 14px; }
  .nav .btn { margin-top: 20px; }
  .js .nav { display: none; }
  .js .nav.is-open { display: flex; }

  .hero, .page-head { grid-template-columns: 1fr; min-height: 0; }
  .hero__copy, .page-head__copy { padding: 44px var(--gutter) 52px; }
  .hero__title { max-width: 15ch; }
  .photo__frame img { aspect-ratio: 4 / 4.6; flex: none; }
  .page-head .photo { order: -1; }
  .page-head .photo__frame img { aspect-ratio: 4 / 4.2; }

  .perfil__cols { grid-template-columns: 1fr; }
  .timeline__item { grid-template-columns: 1fr; gap: 8px; }
  .feature { margin-bottom: 88px; }
  .feature__text, .feature--b .feature__text { grid-column: 1 / -1; }
  .shot { outline-offset: 6px; margin-inline: 6px; aspect-ratio: 5 / 4; }
  .facts div { grid-template-columns: 5.5rem 1fr; }
  .archive__list { grid-template-columns: 1fr; }
  .contact__body { grid-column: 1 / -1; }
  .contact__data div { grid-template-columns: 1fr; gap: 2px; }
  .footer__inner { flex-direction: column; }
  .proj-shot__frame { box-shadow: 0 0 0 6px var(--hueso), 0 0 0 7px var(--linea); margin-inline: 6px; }
}
@media (max-width: 420px) {
  .brand__name { font-size: 1.1rem; }
}

/* ---------- Formulario de contacto (sección clara) ---------- */
.form { margin-top: 40px; display: grid; gap: 20px; max-width: 40rem; }
.form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.form__field label { display: block; font-weight: 600; margin-bottom: 6px; }
.form__field input, .form__field select, .form__field textarea { width: 100%; min-height: 50px; padding: 12px 14px; font: inherit; color: var(--tinta); background: var(--hueso); border: 1px solid var(--texto-suave); border-radius: 6px; }
.form__field textarea { min-height: 140px; resize: vertical; }
.form__field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--tinta) 50%), linear-gradient(135deg, var(--tinta) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
.form__field input:focus-visible, .form__field select:focus-visible, .form__field textarea:focus-visible { outline: 3px solid var(--tinta); outline-offset: 2px; border-color: var(--tinta); }
.form .btn { justify-self: start; }
.form__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__status { padding: 14px 16px; border-left: 4px solid var(--ocre); background: var(--hueso); font-weight: 600; }
.form__status--error { border-left-color: #8A2F1F; }
.form__privacy { font-size: .9rem; line-height: 1.55; color: var(--texto-suave); max-width: 60ch; }
.form__privacy a { color: var(--tinta); text-decoration-color: var(--amarillo); text-underline-offset: .2em; }
.contact__or { margin-top: 48px; color: var(--texto-suave); }
.contact__or + .contact__actions { margin-top: 14px; }
.btn--ghost { background: transparent; color: var(--tinta); border-color: var(--tinta); }
.btn--ghost:hover { background: var(--tinta); color: var(--hueso); border-color: var(--tinta); }

/* ---------- Texto de páginas (legales y contenido libre) ---------- */
.entry__content { max-width: 62ch; }
.entry__content > * + * { margin-top: 1em; }
.entry__content h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.5rem, 2.4vw, 2rem); line-height: 1.15; margin-top: 1.8em; }
.entry__content ul, .entry__content ol { padding-left: 1.2em; list-style: revert; }
.entry__content a { text-decoration: underline; text-decoration-color: var(--amarillo); text-decoration-thickness: 2px; text-underline-offset: .2em; }

@media (max-width: 860px) {
  .form__row { grid-template-columns: 1fr; }
}

/* Dos secciones oscuras seguidas se separan con un filete. */
.sec--tinta + .sec--tinta { border-top: 1px solid var(--linea-osc); }

/* ---------- Perfil y CV: valor, áreas, puntos y formación ---------- */
.valor__title { grid-column: 1 / span 5; max-width: 12ch; }
.valor__text { grid-column: 7 / -1; align-self: end; }
.valor__text p { color: var(--texto-suave-osc); max-width: 52ch; }
.valor__text p + p { margin-top: 1em; }
.pilares__head { margin-bottom: clamp(32px, 5vw, 56px); max-width: 16rem; }
.pillars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 6vw, 96px); }
.pillar .title-md { margin-bottom: 10px; }
.pillar > .muted { margin-bottom: 24px; max-width: 44ch; }
.pillar .skills__list li:first-child { border-top: 1px solid var(--linea); padding-top: 8px; }
.timeline__points { margin-top: 14px; max-width: 60ch; }
.timeline__points li { position: relative; padding: 6px 0 6px 20px; color: var(--texto-suave); }
.timeline__points li::before { content: ""; position: absolute; left: 0; top: 1.05em; width: 7px; height: 7px; background: var(--amarillo); border: 1px solid var(--tinta); }
.training li { padding-block: 14px; border-top: 1px solid var(--linea); display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; }
.training li:last-child { border-bottom: 1px solid var(--linea); }
.training span { color: var(--texto-suave); }

@media (max-width: 1080px) {
  .valor__title, .valor__text { grid-column: 1 / -1; }
  .valor__text { margin-top: 28px; }
}
@media (max-width: 860px) {
  .pillars { grid-template-columns: 1fr; }
}

/* ---------- Sección amarilla (contacto y cierres) ---------- */
.sec--amarillo .btn:hover { background: var(--hueso); color: var(--tinta); border-color: var(--tinta); }
.sec--amarillo .contact__data a { text-decoration-color: var(--tinta); }
.sec--amarillo .form__status { border-left-color: var(--tinta); }
.sec--amarillo .form__field input, .sec--amarillo .form__field select, .sec--amarillo .form__field textarea { border-color: var(--tinta); background-color: var(--calido); }

/* ---------- Pie con el logotipo ---------- */
.footer__id { align-items: center; }

@media (max-width: 860px) {
  .photo__frame img { clip-path: none; }
  .photo__frame::before { display: none; }
}

/* ---------- Perfil: intro de «lo que sé hacer» y «lo que me gusta» ---------- */
.know { max-width: 62ch; margin-bottom: clamp(32px, 5vw, 56px); }
.know p + p { margin-top: 1em; }
.likes__head { margin-bottom: clamp(28px, 4vw, 48px); }
.likes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 4vw, 56px) clamp(32px, 6vw, 96px); }
.likes li { border-top: 2px solid var(--tinta); padding-top: 16px; }
.likes .title-md { margin-bottom: 8px; }
.likes .muted { max-width: 44ch; }
@media (max-width: 860px) { .likes { grid-template-columns: 1fr; } }

/* ---------- Colaboraciones (reutiliza el patrón de «Quién soy») ---------- */
.colab__title { max-width: 16ch; }
.colab__text { margin-top: 32px; max-width: 52ch; }
.colab__text p { color: var(--texto-suave); }
.colab__text p + p { margin-top: 1em; }
.colab__cta { margin-top: 36px; }

/* ---------- Perfil: «Mi papel» y nota de la trayectoria ---------- */
.papel { margin-top: clamp(40px, 5vw, 64px); max-width: 44rem; }
.papel .title-md { margin-bottom: 14px; }
.papel .muted { margin-top: 24px; max-width: 52ch; }
.timeline__note { color: var(--texto-suave); font-size: .95rem; margin-bottom: 6px; }

/* Móvil estrecho: el título largo de la ficha (CulturaDeClub) no desborda a 320 px. */
@media (max-width: 419px) { .proj-head__title { font-size: 13vw; } }
