/* ============================================================================
   B4 · Marius Mihail Ion · live surface
   Tokens first (six colour roles, two faces), then the chrome, then one block
   per act. The engine (scrollcraft.css) is untouched; its tokens are themed here.
   ========================================================================== */

/* Type and shadows from B3: Archivo (width axis) for display, Geist for text and labels. */
@font-face { font-family: "Archivo Variable"; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  src: url("../assets/fonts/archivo-latin-wdth-normal.woff2") format("woff2"); }
@font-face { font-family: "Geist Variable"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../assets/fonts/geist-latin-wght-normal.woff2") format("woff2"); }

:root {
  /* cool paper on a slightly deeper desk; one deep green accent */
  --sc-canvas:      #E8EBE6;   /* the desk */
  --sc-surface:     #F8F9F6;   /* the paper */
  --sc-ink:         #14191B;
  --sc-ink-soft:    #4B565A;
  --sc-accent:      #0B6B58;
  --sc-accent-ink:  #F4FAF7;

  --sc-font-display: "Archivo Variable", "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --sc-font-text:    "Geist Variable", "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;

  --sc-hairline:        color-mix(in oklab, var(--sc-ink) 12%, transparent);
  --sc-hairline-strong: color-mix(in oklab, var(--sc-ink) 28%, transparent);
  /* B3's soft shadows (a tight contact layer + one long offset blur), tinted to this desk */
  --sc-shadow-color: 150 18% 8%;
  --sc-e1: 0 1px 2px hsl(var(--sc-shadow-color) / 0.10), 0 6px 14px -6px hsl(var(--sc-shadow-color) / 0.20);
  --sc-e2: 0 1px 2px hsl(var(--sc-shadow-color) / 0.16), 0 14px 26px -10px hsl(var(--sc-shadow-color) / 0.34);
  --sc-e3: 0 2px 4px hsl(var(--sc-shadow-color) / 0.14), 0 18px 38px -10px hsl(var(--sc-shadow-color) / 0.32);
  --sc-e-up: 0 -1px 0 var(--sc-hairline-strong), 0 -22px 44px -18px hsl(var(--sc-shadow-color) / 0.30);
  --sc-edge: inset 0 1px 0 rgb(255 255 255 / 0.85);

  /* one radius scale for the whole page */
  --r-s: 6px;
  --r-m: 12px;

  --strip-h: 3rem;
  --bar-h: 0px;            /* the bottom bar exists on phones only */
  --pad: clamp(1rem, 4.5vw, 4.5rem);
  --maxw: 76rem;
}

html { scroll-padding-top: calc(var(--strip-h) + 1.25rem); }
body { background: var(--sc-canvas); font-size: 1.0625rem; font-weight: 420; line-height: 1.6; }
h1, h2, h3 { font-family: var(--sc-font-display); font-weight: 700; font-stretch: 86%; margin: 0; text-wrap: balance; word-spacing: 0.07em; }
.nw { white-space: nowrap; }
.ficha__title .nw { display: block; }   /* one segment per line; the pipes stay for screen readers only */
p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
.mono { font-family: var(--sc-font-text); font-size: var(--sc-t-xs); letter-spacing: 0.02em; font-weight: 600; font-variant-numeric: tabular-nums; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; left: 0.75rem; top: -4rem; z-index: 100; background: var(--sc-ink); color: var(--sc-surface); padding: 0.6rem 0.9rem; border-radius: var(--r-s); }
.skip:focus { top: 0.75rem; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2.05rem); letter-spacing: -0.025em; line-height: 1.1; }
h3 { font-size: 1.0625rem; letter-spacing: -0.012em; line-height: 1.32; }

/* ---------------------------------------------------------------- buttons -- */
.actions { display: flex; flex-wrap: wrap; gap: 0.625rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 2.75rem; padding: 0 1.15rem; white-space: nowrap;
  font: inherit; line-height: 1.3; font-weight: 620; font-size: 0.97rem; letter-spacing: -0.005em; text-decoration: none; cursor: pointer;
  color: var(--sc-ink); background: var(--sc-surface);
  border: 1px solid var(--sc-hairline-strong); border-radius: var(--r-s);
  transition: transform 120ms var(--sc-ease-out), background-color 150ms ease, border-color 150ms ease;
}
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--sc-accent); color: var(--sc-accent-ink); border-color: var(--sc-accent); }
.btn--quiet { background: transparent; box-shadow: none; border-color: transparent; text-decoration: underline; text-decoration-color: var(--sc-hairline-strong); text-underline-offset: 0.3em; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { border-color: var(--sc-ink); }
  .btn--primary:hover { background: color-mix(in oklab, var(--sc-accent) 88%, black); border-color: color-mix(in oklab, var(--sc-accent) 88%, black); }
  .btn--quiet:hover { background: color-mix(in oklab, var(--sc-ink) 6%, transparent); border-color: transparent; }
}
.btn[disabled] { opacity: 0.5; pointer-events: none; }
.btn[hidden], [hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--sc-accent); outline-offset: 3px; }

/* ------------------------------------------------------------------ strip --
   The one chrome, on every width: five section tabs with scroll-spy, EN, Contactar.
   One breakpoint for the whole page: 860px, the engine's own. */
.strip {
  position: sticky; top: 0; z-index: 60; height: var(--strip-h);
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0 max(var(--pad), calc((100% - var(--maxw)) / 2 + var(--pad)));
  background: color-mix(in oklab, var(--sc-surface) 94%, var(--sc-canvas));
  border-bottom: 1px solid var(--sc-hairline-strong);
}
.strip__nav { position: relative; flex: 1 1 auto; min-width: 0; height: 100%; display: flex; align-items: stretch; }
.strip__tabs { display: flex; align-items: stretch; gap: 0.25rem; margin-left: -0.75rem; }
.strip__tabs a {
  position: relative; display: flex; align-items: center; height: 100%; padding: 0 0.75rem;
  font-size: 0.9375rem; line-height: 1.3; color: var(--sc-ink-soft); text-decoration: none; white-space: nowrap;
  transition: color 150ms var(--sc-ease-out);
}
.strip__tabs a::after { content: ""; position: absolute; left: 0.75rem; right: 0.75rem; bottom: -1px; height: 2px; background: var(--sc-accent); transform: scaleX(0); transform-origin: 0 50%; transition: transform 200ms var(--sc-ease-out); }
.strip__tabs a[aria-current] { color: var(--sc-ink); font-weight: 620; }
.strip__tabs a[aria-current]::after { transform: none; }
@media (hover: hover) and (pointer: fine) { .strip__tabs a:hover { color: var(--sc-ink); } }
.strip__tabs a:focus-visible { outline-offset: -4px; border-radius: var(--r-s); }
.strip__lang {
  display: inline-flex; align-items: center; justify-content: center; min-width: 2.75rem; min-height: 2.25rem; padding: 0 0.6rem;
  font-size: 0.875rem; font-weight: 620; line-height: 1.3; color: var(--sc-ink); text-decoration: none; border-radius: var(--r-s);
  transition: background-color 150ms ease;
}
@media (hover: hover) and (pointer: fine) { .strip__lang:hover { background: color-mix(in oklab, var(--sc-ink) 7%, transparent); } }
.btn--strip { min-height: 2.25rem; padding: 0 1rem; font-size: 0.9375rem; box-shadow: none; }
.strip__menu {
  display: none; align-items: center; gap: 0.4rem; min-height: 2.5rem; margin-left: -0.6rem; padding: 0 0.6rem;
  font: inherit; font-size: 0.9375rem; font-weight: 620; line-height: 1.3; color: var(--sc-ink); background: none; border: 0; border-radius: var(--r-s); cursor: pointer;
}
.strip__menu svg { transition: transform 180ms var(--sc-ease-out); }
.strip__menu:active { background: color-mix(in oklab, var(--sc-ink) 7%, transparent); }
.strip__menu[aria-expanded="true"] svg { transform: rotate(180deg); }

/* ---------------------------------------------------------- the bottom bar --
   Phones only (see the phone block). Desktop has the strip's Contactar. */
.bar { display: none; }

/* ------------------------------------------------------------------- hero --
   One flat card on the plain desk. Its entrance is a CSS load stagger, so it never
   waits on an observer: with or without script, it is there within half a second. */
.hero {
  min-height: calc(100vh - var(--strip-h)); min-height: calc(100svh - var(--strip-h));
  display: grid; align-content: center;
  padding: clamp(2rem, 7svh, 4.5rem) max(var(--pad), calc((100% - var(--maxw)) / 2 + var(--pad)));
  background: var(--sc-canvas);
  border-bottom: 1px solid var(--sc-hairline-strong);
}
.hero__in { display: flex; flex-wrap: wrap; align-items: stretch; gap: clamp(1.25rem, 2.6vw, 2.5rem); }
.ficha {
  flex: 1.55 1 34rem; min-width: 0; max-width: 47rem; display: grid; gap: 1.5rem;
  padding: clamp(1.5rem, 1rem + 2.4vw, 3rem);
  background: var(--sc-surface); border-radius: var(--r-m);
  box-shadow: var(--sc-e1);
}
.ficha > *, .hero .lens { animation: greet 460ms var(--sc-ease-out) both; }
.ficha > :nth-child(2) { animation-delay: 60ms; }
.ficha > :nth-child(3) { animation-delay: 120ms; }
.ficha > :nth-child(4) { animation-delay: 180ms; }
.hero .lens { animation-delay: 240ms; }
/* from an already-visible start: the card is readable (and the LCP) from the first paint */
@keyframes greet { from { opacity: 0.4; transform: translateY(8px); } }
.ficha__head { display: flex; gap: 1.25rem; align-items: center; }
.avatar { flex: none; width: 5rem; height: 5rem; overflow: hidden; border-radius: var(--r-m); background: var(--sc-canvas); box-shadow: var(--sc-e1); outline: 1px solid var(--sc-hairline); outline-offset: -1px; }
.avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
h1 { font-size: clamp(2.1rem, 1.35rem + 2.6vw, 3.4rem); line-height: 1.02; letter-spacing: -0.035em; font-weight: 780; font-stretch: 80%; }
.ficha__title { margin-top: 0.5rem; font-weight: 560; font-size: clamp(0.98rem, 0.93rem + 0.2vw, 1.1rem); line-height: 1.4; text-wrap: balance; }
.ficha__plain { font-size: clamp(1.08rem, 1rem + 0.4vw, 1.3rem); line-height: 1.45; letter-spacing: -0.012em; max-width: 36em; text-wrap: pretty; }
.props { display: grid; gap: 0.875rem; padding-top: 1.5rem; border-top: 1px solid var(--sc-hairline); }
.props > div { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: 1rem; align-items: baseline; }
.props dt { font-family: var(--sc-font-text); font-weight: 600; font-size: 0.75rem; line-height: 1.4; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sc-ink-soft); }
.props dd { line-height: 1.45; text-wrap: balance; }
.ficha .actions { padding-top: 0.25rem; }

/* --------------------------------------------------------------- the acts -- */
.act { background: var(--sc-surface); }
.perfil, .tr, .skills, .close { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }
.perfil { padding-block: clamp(4rem, 10svh, 7rem) clamp(3.5rem, 9svh, 6rem); }
.prose { font-size: clamp(1.05rem, 1rem + 0.3vw, 1.25rem); line-height: 1.6; max-width: 34em; text-wrap: pretty; letter-spacing: -0.008em; }
.perfil__text.sc-stack > * + * { margin-top: 1.25rem; }

/* «¿Qué busca tu puesto?» (the Lente), beside the card: a lighter panel than the card
   (border, no shadow), so the card leads and the tool reads as the reader's own */
.lens {
  flex: 1 1 20rem; min-width: 0; max-width: 47rem; display: flex; flex-direction: column; gap: 1rem;
  padding: clamp(1.5rem, 1rem + 1.6vw, 2.25rem);
  background: color-mix(in oklab, var(--sc-surface) 45%, var(--sc-canvas));
  border: 1px solid var(--sc-hairline-strong); border-radius: var(--r-m);
  align-self: flex-start;
}
.lens h2 { font-size: 1.35rem; line-height: 1.2; }
.lens__help { color: var(--sc-ink-soft); font-size: 0.97rem; line-height: 1.5; text-wrap: pretty; }
.lens__chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  min-height: 2.5rem; padding: 0 0.9rem; font: inherit; line-height: 1.3; font-size: 0.93rem; font-weight: 560; cursor: pointer;
  color: var(--sc-ink); background: var(--sc-surface); border: 1px solid var(--sc-hairline-strong); border-radius: var(--r-s);
  transition: transform 120ms var(--sc-ease-out), background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}
.chip:active { transform: scale(0.97); }
.chip[aria-pressed="true"] { background: var(--sc-accent); color: var(--sc-accent-ink); border-color: var(--sc-accent); }
@media (hover: hover) and (pointer: fine) { .chip:hover { border-color: var(--sc-ink); } }
.lens__sum { font-size: 0.9375rem; line-height: 1.4; color: var(--sc-ink-soft); min-height: 2.5rem; display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.lens__clear { font: inherit; font-size: 0.9375rem; font-weight: 600; line-height: 1.3; color: var(--sc-ink); background: none; border: 0; padding: 0.5rem 0.25rem; min-height: 2.5rem; cursor: pointer; text-decoration: underline; text-decoration-color: var(--sc-hairline-strong); text-underline-offset: 0.25em; transition: text-decoration-color 150ms ease; }
@media (hover: hover) and (pointer: fine) { .lens__clear:hover { text-decoration-color: currentColor; } }
html:not(.js) .lens { display: none; }

/* the Lente answering: marks, hit lines, quieter non-hits */
mark { background: color-mix(in oklab, var(--sc-accent) 20%, var(--sc-surface)); color: var(--sc-ink); border-radius: 3px; padding: 0.03em 0.12em; margin: 0 -0.12em; font-weight: 620; }
.terms mark { background: none; padding: 0; margin: 0; }
.lens-on [data-lens] > li:not(.is-hit), .lens-on p[data-lens]:not(.is-hit) { color: var(--sc-ink-soft); }
.is-hit { background: color-mix(in oklab, var(--sc-accent) 8%, transparent); border-radius: var(--r-s); }
.prose.is-hit { background: none; }

/* ---- 3 · Experiencia: the regla de años in a slim side column, every job beside it ---- */
.tr { padding-block: clamp(4rem, 10svh, 7rem) clamp(3.5rem, 9svh, 6rem); }
.act--tr { border-top: 1px solid var(--sc-hairline); }
.tr__h { margin-bottom: clamp(1.5rem, 4svh, 2.5rem); }
.tr__jobs { display: grid; }
.job { display: grid; gap: 1rem; padding-block: 2rem; border-top: 1px solid var(--sc-hairline); scroll-margin-top: calc(var(--strip-h) + 1.5rem); }
.job:first-child { border-top: 0; padding-top: 0; }
.job__years { font-family: var(--sc-font-text); font-size: 0.8125rem; line-height: 1.4; letter-spacing: 0.04em; color: var(--sc-ink-soft); font-weight: 600; font-variant-numeric: tabular-nums; }
.job__head h3 { font-size: clamp(1.4rem, 1.15rem + 0.7vw, 1.85rem); letter-spacing: -0.025em; line-height: 1.15; margin-top: 0.35rem; }
.job__meta { margin-top: 0.4rem; color: var(--sc-ink-soft); font-size: 0.97rem; line-height: 1.45; text-wrap: pretty; }
.job__list { display: grid; gap: 0.25rem; max-width: 44rem; }
.job__list > li { position: relative; line-height: 1.55; text-wrap: pretty; padding: 0.3rem 0.75rem 0.3rem 1.5rem; margin-inline: -0.75rem; }
.job__list > li::before { content: ""; position: absolute; left: 0.75rem; top: 1.05rem; width: 0.3125rem; height: 0.3125rem; border-radius: 1px; background: var(--sc-hairline-strong); }
.is-hit::before { background: var(--sc-accent) !important; }
.tr__prev { padding-top: 1.75rem; border-top: 1px solid var(--sc-hairline); color: var(--sc-ink-soft); font-size: 0.97rem; line-height: 1.45; display: flex; gap: 1rem; align-items: baseline; flex-wrap: wrap; }
.tr__prev .mono { color: var(--sc-ink); font-size: 0.8125rem; }

/* the regla de años: ONE rail, built from the jobs' own years (actualidad -> 2018). It draws
   as the section arrives, a playhead follows the reading, every job read is sealed in green,
   and the Lente's squares sit on it. Each segment is a link to its job. */
.rail { display: none; }
.js .rail { display: block; }
.rail__in { position: relative; }
.rseg { position: absolute; display: block; text-decoration: none; color: var(--sc-ink-soft); border-radius: var(--r-s); transition: color 200ms var(--sc-ease-out); }
.rseg__bar { position: absolute; }
.rseg__draw, .rseg__fill { position: absolute; inset: 0; display: block; }
.rseg__draw { background: var(--sc-hairline-strong); }
.rseg__fill { background: var(--sc-accent); transform: scale(0); }
.rseg__lab { position: absolute; display: flex; flex-wrap: wrap; align-items: center; column-gap: 0.4rem; row-gap: 0.2rem; white-space: nowrap; transition: opacity 240ms var(--sc-ease-out); }
.rseg__n { font-size: 0.875rem; font-weight: 560; line-height: 1.3; }
.rseg.is-seen, .rseg.is-now { color: var(--sc-ink); }
.rseg.is-now .rseg__n { font-weight: 680; }
.rseg__t { display: inline-flex; gap: 3px; flex-wrap: wrap; }
.rseg__t:empty { display: none; }
.rseg__t i { width: 0.5rem; height: 0.5rem; border-radius: 1px; border: 1px solid var(--sc-accent); background: transparent; transition: background-color 220ms var(--sc-ease-out); }
.rseg.is-seen .rseg__t i, .rseg.is-now .rseg__t i { background: var(--sc-accent); }
.rail__yr { position: absolute; font-size: 0.75rem; font-weight: 600; line-height: 1.3; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; color: var(--sc-ink-soft); white-space: nowrap; transition: opacity 240ms var(--sc-ease-out); }
.rail .is-off { opacity: 0; }
@media (hover: hover) and (pointer: fine) { a.rseg:hover .rseg__n { color: var(--sc-accent); } }
a.rseg:focus-visible { outline-offset: 2px; }
.rail__head { position: absolute; left: 0; top: 0; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--sc-accent); border: 3px solid var(--sc-surface); box-shadow: var(--sc-e1); pointer-events: none; will-change: transform; transition: opacity 200ms var(--sc-ease-out); z-index: 2; }

@media (min-width: 861px) {
  .tr { display: grid; grid-template-columns: 11.5rem minmax(0, 1fr); grid-template-rows: auto 1fr auto; column-gap: clamp(2rem, 4vw, 4rem); }
  .tr__h { grid-column: 1 / -1; }
  .tr__rail { grid-column: 1; grid-row: 2 / 4; }
  .tr__jobs, .tr__prev { grid-column: 2; }
  /* vertical rail, sticky beside the jobs: years left, bar, job names right */
  .rail { position: sticky; top: calc(var(--strip-h) + 2rem); height: min(28rem, calc(100svh - var(--strip-h) - 4rem)); --x: 5.4rem; }
  .rail__in { position: absolute; inset: 0.5rem 0; }
  .rseg { left: 0; right: 0; top: calc(var(--t) * 1%); height: max(1.5rem, calc(var(--h) * 1%)); }
  .rseg__bar { left: calc(var(--x) - 1.5px); width: 4px; top: 0; bottom: 3px; }
  .rseg__draw, .rseg__fill { transform-origin: 50% 0; }
  .rseg__lab { left: calc(var(--x) + 0.85rem); right: 0; top: -0.15rem; }
  .rail__yr { left: 0; width: calc(var(--x) - 0.8rem); text-align: right; top: calc(var(--t) * 1%); transform: translateY(-50%); }
  .rail__yr::after { content: ""; position: absolute; left: calc(100% + 0.3rem); top: 50%; width: 0.5rem; height: 1px; background: var(--sc-hairline-strong); }
  .rail__head { left: var(--x); }
  .job { grid-template-columns: minmax(0, 1fr); }
}

/* ---- 4 · Competencias: each group is a real list, items spaced, no commas ---- */
.skills { padding-block: clamp(4rem, 10svh, 7rem) clamp(3.5rem, 9svh, 6rem); }
.act--skills { border-top: 1px solid var(--sc-hairline); }
.matrix { margin-top: 1.75rem; }
.mrow { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.75rem; padding: 1.5rem 0; }
.mrule { position: absolute; left: 0; right: 0; top: 0; height: 1px; border: 0; margin: 0; background: var(--sc-hairline-strong); }
.mrule--end { position: static; }
.mrow h3 { font-family: var(--sc-font-text); font-weight: 600; font-size: 0.8125rem; font-stretch: 100%; letter-spacing: 0.07em; text-transform: uppercase; color: var(--sc-ink-soft); line-height: 1.5; }
.terms { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.terms > li { position: relative; padding: 0.15rem 0.4rem 0.15rem 0.9rem; margin-left: -0.4rem; line-height: 1.5; border-radius: 4px; }
.terms > li::before { content: ""; position: absolute; left: 0; top: 0.78em; width: 4px; height: 4px; border-radius: 1px; background: var(--sc-hairline-strong); }
.terms > li.is-hit { background: color-mix(in oklab, var(--sc-accent) 14%, transparent); font-weight: 620; }
@media (min-width: 861px) {
  .mrow { grid-template-columns: 13rem minmax(0, 1fr); column-gap: 2rem; }
  .terms { max-width: 50rem; }
}
.edu { margin-top: clamp(3rem, 8svh, 5rem); padding-top: 2rem; border-top: 1px solid var(--sc-hairline); scroll-margin-top: calc(var(--strip-h) + 1.5rem); }
.edu__list { display: grid; gap: 1.25rem; margin-top: 1.5rem; }
.edu__list > div { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.25rem; }
.edu dt { font-family: var(--sc-font-text); font-weight: 600; font-size: 0.8125rem; line-height: 1.5; letter-spacing: 0.07em; text-transform: uppercase; color: var(--sc-ink-soft); }
.edu dd { line-height: 1.5; max-width: 40rem; text-wrap: pretty; }
@media (min-width: 861px) { .edu__list > div { grid-template-columns: 13rem minmax(0, 1fr); column-gap: 2rem; align-items: baseline; } }

/* ---- 5 · Contacto: the email, large; then CV and LinkedIn. The draft only once marked ---- */
.act--close { border-top: 1px solid var(--sc-hairline-strong); }
.close {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 3rem; align-content: start;
  padding-block: clamp(4rem, 10svh, 7rem) clamp(3rem, 8svh, 5rem);
}
.close__main.sc-stack > * + *, .close__main > * + * { margin-top: 1rem; }
.close__mail { margin-top: 1.5rem !important; font-family: var(--sc-font-display); font-weight: 700; font-stretch: 84%; font-size: clamp(1.6rem, 1rem + 3.4vw, 3.6rem); line-height: 1.1; letter-spacing: -0.03em; word-spacing: 0.07em; overflow-wrap: break-word; }
.close__mail a { color: var(--sc-ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.16em; text-decoration-color: var(--sc-accent); transition: color 150ms var(--sc-ease-out); }
@media (hover: hover) and (pointer: fine) { .close__mail a:hover { color: var(--sc-accent); } }
.close__place { color: var(--sc-ink-soft); line-height: 1.5; }
.close__main #dock { margin-top: 1.75rem; }
.compose { display: grid; gap: 1rem; align-content: start; max-width: 36rem; width: 100%; }
.ledger { display: grid; gap: 0.75rem; }
.ledger h3, .compose label { font-family: var(--sc-font-text); font-weight: 600; font-size: 0.8125rem; font-stretch: 100%; line-height: 1.5; letter-spacing: 0.07em; text-transform: uppercase; color: var(--sc-ink-soft); }
.compose label { margin-top: 0.75rem; }
.ledger__list { display: grid; gap: 0.75rem; }
.ledger__list li { display: grid; gap: 0.15rem; padding-top: 0.75rem; border-top: 1px solid var(--sc-hairline); }
.ledger__t { font-weight: 650; line-height: 1.4; }
.ledger__e { color: var(--sc-ink-soft); font-size: 0.9375rem; line-height: 1.45; }
.compose textarea {
  width: 100%; min-height: 15rem; resize: vertical; padding: 1rem 1.1rem; line-height: 1.55; font-size: 1rem;
  background: var(--sc-surface); color: var(--sc-ink); border: 1px solid var(--sc-hairline-strong); border-radius: var(--r-m); box-shadow: inset 0 1px 2px hsl(var(--sc-shadow-color) / 0.06);
}
.compose textarea:focus-visible { outline: 2px solid var(--sc-accent); outline-offset: 2px; border-color: var(--sc-accent); }
@media (min-width: 861px) {
  .lens-on .close { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: clamp(2.5rem, 6vw, 6rem); align-items: center; }
  .lens-on .close__mail { font-size: clamp(1.6rem, 0.6rem + 2.2vw, 2.6rem); }   /* half the width: keep the address on one line */
}

/* ----------------------------------------------------------------- phones -- */
@media (max-width: 860px) {
  :root { --bar-h: 3.75rem; }
  /* strip: the tabs fold into one «Secciones» menu; EN and Contactar stay on screen */
  .js .strip__menu { display: inline-flex; }
  .js .strip__tabs {
    position: absolute; top: calc(100% + 1px); left: calc(-1 * var(--pad)); width: 100vw; margin: 0;
    flex-direction: column; gap: 0; padding: 0.5rem var(--pad) 0.75rem; height: auto;
    background: var(--sc-surface); border-bottom: 1px solid var(--sc-hairline-strong); box-shadow: var(--sc-e2);
  }
  .js .strip__tabs:not(.is-open) { display: none; }
  .js .strip__tabs.is-open { transform-origin: 50% 0; transition: opacity 180ms var(--sc-ease-out), transform 180ms var(--sc-ease-out); }
  @starting-style { .js .strip__tabs.is-open { opacity: 0; transform: translateY(-6px); } }
  .js .strip__tabs a { height: auto; min-height: 2.75rem; padding: 0 0.25rem; font-size: 1rem; }
  .js .strip__tabs a::after { display: none; }
  .js .strip__tabs a[aria-current]::before { content: ""; width: 0.3125rem; height: 0.3125rem; margin-right: 0.6rem; border-radius: 1px; background: var(--sc-accent); }
  html:not(.js) .strip { height: auto; flex-wrap: wrap; padding-block: 0.25rem; }
  html:not(.js) .strip__nav { flex-basis: 100%; order: 2; }
  html:not(.js) .strip__tabs { flex-wrap: wrap; margin: 0; }
  html:not(.js) .strip__tabs a { min-height: 2.25rem; padding: 0 0.5rem; }
  .strip { gap: 0.25rem; }
  .btn--strip { padding: 0 0.85rem; }

  /* the one bottom bar: hidden over the hero, then Descargar CV + Contactar (+ what is marked);
     at the end the plate slides down, CV lands on the CV button and Contactar on the email */
  .bar {
    display: grid; position: fixed; left: 0; right: 0; bottom: 0; z-index: 61; gap: 0.25rem;
    padding: 0.5rem var(--pad) calc(0.5rem + env(safe-area-inset-bottom));
    transform: translateY(calc(100% + 1.5rem)); transition: transform 280ms var(--sc-ease-drawer);
  }
  .bar.is-up { transform: none; }
  .bar.is-docked { visibility: hidden; }
  .bar__plate {
    display: block; position: absolute; inset: 0; z-index: -1;
    background: var(--sc-surface); box-shadow: var(--sc-e-up);
    transform: translateY(calc(var(--q, 0) * 105%));
  }
  .bar__lens { display: none; min-height: 1.75rem; align-items: center; gap: 0.35rem; font-size: 0.8125rem; line-height: 1.3; color: var(--sc-ink-soft); text-decoration: none; white-space: nowrap; overflow: hidden; }
  .bar__k { color: var(--sc-ink); font-weight: 620; }
  .lens-on .bar__lens { display: flex; }
  .lens-on [data-lens-state] { color: var(--sc-accent); font-weight: 620; overflow: hidden; text-overflow: ellipsis; }
  .bar.is-docking .bar__lens { visibility: hidden; }
  .bar__acts { display: flex; gap: 0.625rem; }
  .bar__acts .btn { flex: 1 1 0; min-height: 2.75rem; box-shadow: var(--sc-e1); }
  .bar__acts .btn--primary { box-shadow: var(--sc-e2); }
  #dock.is-carried > .btn:first-child { visibility: hidden; }
  html:not(.js) .bar { display: none; }

  .hero { min-height: 0; padding-block: 1.5rem 2.5rem; }
  .ficha { gap: 1.25rem; }
  .ficha__head { gap: 1rem; }
  .avatar { width: 4rem; height: 4rem; }
  h1 { font-size: clamp(1.75rem, 8vw, 2.2rem); }
  .props > div { grid-template-columns: minmax(0, 1fr); gap: 0.25rem; }
  .actions .btn { flex: 1 1 auto; }
  .perfil { grid-template-columns: minmax(0, 1fr); }
  .job { scroll-margin-top: calc(var(--strip-h) + 4.75rem); }

  /* horizontal rail, sticky just under the strip */
  .tr__rail { position: sticky; top: var(--strip-h); z-index: 50; margin: 0 calc(-1 * var(--pad)) 1.5rem; }
  .rail { padding: 0.5rem var(--pad) 0.4rem; background: var(--sc-canvas); border-block: 1px solid var(--sc-hairline); }
  .rail__in { height: 2.6rem; }
  .rseg { left: calc(var(--t) * 1%); width: max(1.5rem, calc(var(--h) * 1%)); top: 0; height: 1.5rem; }
  .rseg__bar { left: 0; right: 3px; top: 0.6rem; height: 4px; }
  .rseg__draw, .rseg__fill { transform-origin: 0 50%; }
  .rseg__lab { left: 0; top: -0.2rem; }
  .rseg__n { display: none; }
  .rseg__t { gap: 2px; flex-wrap: nowrap; }
  .rseg__t i { width: 5px; height: 5px; }
  .rail__yr { top: 1.45rem; left: calc(var(--t) * 1%); transform: translateX(-50%); }
  .rail__yr--now { display: none; }
  .rail__yr--end { transform: translateX(-100%); }
  .rail__head { top: calc(0.6rem + 2px); border-color: var(--sc-canvas); }
}

@media (prefers-reduced-motion: reduce) {
  .ficha > *, .hero .lens { animation-name: greet-soft; }
  @keyframes greet-soft { from { opacity: 0.4; } }
  .ficha > *, .hero .lens { animation-duration: 240ms; }
  .rail *, .rseg, .strip__tabs a::after, .js .strip__tabs.is-open { transition: none !important; }
  .bar { transform: none; opacity: 0; transition: opacity 200ms ease; }
  .bar.is-up { opacity: 1; }
}
@media print { .strip, .bar { display: none !important; } }

/* sign-off: the page resolves instead of stopping */
.foot { width: 100%; max-width: var(--maxw); margin-inline: auto; padding: 1.5rem var(--pad) calc(var(--bar-h) + 1.5rem); display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between; color: var(--sc-ink-soft); font-size: 0.9375rem; line-height: 1.5; }
.foot a { color: var(--sc-ink); text-underline-offset: 0.2em; text-decoration-color: var(--sc-hairline-strong); }
