/* pablo.olvera.com.co
 *
 * Editorial, not corporate: the type and the project imagery carry the page.
 * One palette, one type family, almost no chrome. Every colour on the page is
 * one of the tokens below; the only other colour comes from the photographs.
 */

:root {
  --bg: #f5f3ee;          /* warm off-white */
  --bg-deep: #ebe8e1;     /* image placeholders, form fields */
  --ink: #1d1d1f;         /* near-black */
  --ink-2: #6b6a66;       /* secondary text — 4.9:1 on --bg */
  --hair: rgba(29, 29, 31, 0.12);
  --night: #0d0d0d;       /* the one dark band */
  --night-ink: #f5f3ee;
  --night-ink-2: #a3a19b;
  --ok: #1f7a3e;
  --err: #b3261e;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
          "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;

  --wrap: 1240px;
  --gutter: clamp(20px, 5vw, 64px);
  --section: clamp(104px, 14vw, 208px);
  --radius: clamp(20px, 2.4vw, 30px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 64px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--font);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute; left: -9999px; top: 8px;
  background: var(--ink); color: var(--bg);
  padding: 10px 16px; border-radius: 999px; z-index: 100;
}
.skip:focus { left: 12px; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }

/* ── Top bar ─────────────────────────────────────────────────────────────── */

.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  background: rgba(245, 243, 238, 0.72);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  transition: box-shadow 300ms var(--ease);
}
/* A hairline only once content is actually scrolling underneath. */
.bar.scrolled { box-shadow: 0 1px 0 var(--hair); }

.bar .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 56px; gap: 16px;
}
.bar .name {
  font-weight: 600; font-size: 1rem; letter-spacing: -0.01em;
  text-decoration: none; white-space: nowrap;
}
.bar nav { display: flex; gap: clamp(14px, 3vw, 32px); }
.bar nav a {
  font-size: 0.875rem; letter-spacing: 0.005em;
  text-decoration: none; color: var(--ink-2);
  transition: color 150ms ease;
}
.bar nav a:hover, .bar nav a[aria-current="page"] { color: var(--ink); }
/* Language switch: a small outlined pill beside the nav. */
.bar nav a.lang {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em;
  padding: 3px 8px; border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--hair); color: var(--ink);
}
.bar nav a.lang:hover { box-shadow: inset 0 0 0 1px var(--ink-2); }
.bar nav { align-items: center; }

/* Save contact, always in reach on desktop. On phones the hero button is it. */
.bar nav a.bar-save {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 13px 0 11px; margin-left: 4px;
  border-radius: 999px;
  background: var(--ink); color: var(--bg);
  font-size: 0.8125rem; font-weight: 600;
  transition: transform 100ms ease-out, opacity 150ms ease;
}
.bar nav a.bar-save:hover { color: var(--bg); opacity: 0.86; }
.bar nav a.bar-save:active { transform: scale(0.96); }
.bar-save .ico { width: 15px; height: 15px; }
@media (max-width: 820px) { .bar nav a.bar-save { display: none; } }

.bar .name .mono { display: none; }
/* Phones: the hero shows the name right below, so the bar carries a monogram
   and the nav (longer in Spanish) keeps its room. */
@media (max-width: 480px) {
  .bar .name .full { display: none; }
  .bar .name .mono {
    display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px;
    background: var(--ink); color: var(--bg); font-size: 0.8125rem; font-weight: 700; letter-spacing: -0.04em;
  }
  .bar nav { gap: 14px; }
  .bar nav a { font-size: 0.8125rem; }
}

/* ── Type scale ──────────────────────────────────────────────────────────── */

.eyebrow {
  display: block;
  font-size: 0.875rem; font-weight: 600; letter-spacing: 0.01em;
  color: var(--ink-2);
  margin-bottom: 20px;
}
.display {
  font-size: clamp(2.5rem, 6.4vw, 5.75rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  max-width: 16ch;
}
.lede {
  font-size: clamp(1.1875rem, 1.9vw, 1.625rem);
  line-height: 1.4;
  letter-spacing: -0.012em;
  color: var(--ink-2);
  max-width: 36ch;
}
.lede strong { color: var(--ink); font-weight: 600; }

/* ── Hero ────────────────────────────────────────────────────────────────── */

.hero {
  min-height: min(100svh, 1000px);
  display: flex; align-items: flex-end;
  padding-top: 120px;
  padding-bottom: clamp(56px, 8vw, 112px);
}
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: end;
}
.hero h1 {
  font-size: clamp(3.75rem, 11.5vw, 10.5rem);
  line-height: 0.9;
  letter-spacing: -0.05em;
  font-weight: 700;
}
.hero h1 span { display: block; }
.hero .roles {
  margin-top: clamp(24px, 3vw, 40px);
  font-size: clamp(1.375rem, 2.6vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
}
.hero .lede { margin-top: 20px; }
.hero-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px;
  margin-top: clamp(28px, 3.4vw, 44px);
}
.btn.save { min-height: 54px; padding: 0 28px 0 24px; font-size: 1.0625rem; gap: 10px; }
.btn .ico { flex: none; }

/* The portrait file is already black-and-white (880×1100); no CSS filter. */
.portrait {
  justify-self: end;
  width: min(100%, 440px);
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-deep);
}
.portrait img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 820px) {
  .hero { min-height: 0; align-items: stretch; padding-top: 88px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 36px; }
  .portrait { order: -1; justify-self: stretch; width: 100%; aspect-ratio: 16 / 11; }
  .hero .wrap { gap: 28px; }
  .btn.save { flex: 1 1 auto; }
  .portrait img { object-position: 50% 30%; }
}

/* ── Sections ────────────────────────────────────────────────────────────── */

.section { padding-block: var(--section); }
.section-head { margin-bottom: clamp(48px, 7vw, 96px); }
.section-head .lede { margin-top: 24px; }

/* ── Selected work: bento ────────────────────────────────────────────────── */
/*
 * Every tile is a column: copy on the tile's own colour at the top, imagery
 * filling what is left below. Text never sits on a photograph, so it stays
 * legible whatever the picture is. Two variants:
 *   .split   copy left, portrait photo right (TheotokOS)
 *   .overlay copy over a full-bleed image with a scrim (reserved for a wide
 *            cinematic still — the film slot)
 */

.bento {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-rows: clamp(210px, 19.5vw, 285px);
  gap: clamp(12px, 1.4vw, 18px);
}
.tile {
  position: relative;
  grid-column: span 2;
  grid-row: span 2;
  display: flex; flex-direction: column;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--tile, var(--bg-deep));
  color: var(--tile-ink, var(--ink));
  text-decoration: none;
  isolation: isolate;
}
.tile.dark { --tile-ink: #fff; }
.tile.xl   { grid-column: span 4; }
.tile.wide { grid-column: span 6; }
.tile.half { grid-column: span 3; }

.tile .copy {
  order: 1;
  padding: clamp(22px, 2.4vw, 34px) clamp(22px, 2.4vw, 34px) 0;
}
.tile .media {
  order: 2;
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  margin-top: clamp(18px, 2vw, 26px);
  overflow: hidden;
}
.tile .media img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: var(--pos, center);
  transition: transform 900ms var(--ease);
}

.tile .kicker {
  display: block;
  font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.01em;
  opacity: 0.66; margin-bottom: 6px;
}
.tile h3 {
  font-size: clamp(1.5rem, 2.3vw, 2.125rem);
  letter-spacing: -0.03em; line-height: 1.05;
}
.tile.xl h3, .tile.wide h3 { font-size: clamp(2.25rem, 4.4vw, 4rem); letter-spacing: -0.04em; }
.tile p {
  margin: 10px 0 0;
  font-size: clamp(0.9375rem, 1.05vw, 1.0625rem);
  line-height: 1.42;
  max-width: 36ch;
  opacity: 0.84;
}
.tile .go {
  display: inline-block; margin-top: 12px;
  font-size: 0.9375rem; font-weight: 600;
}

/* Split: copy left, portrait-orientation photo right. */
.tile.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr); }
.tile.split .copy { grid-column: 1; grid-row: 1; align-self: end; padding-bottom: clamp(26px, 3vw, 40px); }
.tile.split .media { grid-column: 2; grid-row: 1; margin: 0; }

.tile .facts { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tile .facts li {
  font-size: 0.8125rem; font-weight: 600;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

/* Numbers: a typographic tile, no image. */
.tile.numbers .copy { flex: 1; display: flex; flex-direction: column; padding-bottom: clamp(22px, 2.4vw, 34px); }
.tile-stats { margin: auto 0 0; padding-top: 20px; display: grid; gap: 14px; }
.tile-stats div { border-top: 1px solid rgba(255, 255, 255, 0.18); padding-top: 12px; }
.tile-stats dt { font-size: clamp(2.25rem, 3.6vw, 3.25rem); font-weight: 700; letter-spacing: -0.045em; line-height: 1; color: #d9b45a; }
.tile-stats dd { margin: 6px 0 0; font-size: 0.875rem; line-height: 1.35; opacity: 0.78; }

/* Art: a cut-out object standing on the tile colour. */
.tile.art .media img { object-fit: contain; object-position: center bottom; padding-top: 4px; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.45)); }

/* Screen: a real e-ink capture, rising from the bottom edge like the device
   screen it came off. 1-bit art, so it is shown near its native 480px width. */
.tile.screen .media { display: flex; justify-content: center; align-items: flex-end; }
.tile.screen .media img {
  position: static;
  width: min(80%, 300px); height: 100%;
  object-fit: cover; object-position: top;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 24px 60px rgba(0, 0, 0, 0.45);
}
a.tile.screen:hover .media img { transform: none; }
/* In the big split tile the whole screen shows, scaled to fit, never cropped. */
.tile.split.screen .media { padding: clamp(24px, 3vw, 40px); align-items: center; }
.tile.split.screen .media img {
  width: auto; height: auto; max-width: 100%; max-height: 100%;
  border-radius: 16px;
}

/* Film: Pablo's photographs, whole, cross-fading like prints laid on a dark
   table. object-fit: contain, never cover — the rebate, the sprocket holes and
   the print border are part of the photograph. */
.tile.film { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.6fr); }
.tile.film h3 { font-size: clamp(2rem, 3.4vw, 3.25rem); }
.tile.film .copy { grid-column: 1; grid-row: 1; align-self: end; padding-bottom: clamp(26px, 3vw, 40px); }
.tile.film .media { grid-column: 2; grid-row: 1; margin: 0; --pad: clamp(24px, 3vw, 44px); }
.tile .slideshow .slide {
  position: absolute; inset: auto;
  top: var(--pad); left: var(--pad);
  width: calc(100% - 2 * var(--pad)); height: calc(100% - 2 * var(--pad) - 28px);
  object-fit: contain;
  opacity: 0;
  transform: scale(1.035);
  /* the fade is quick; the settle-in is slow, so each print eases into place */
  transition: opacity 1400ms var(--ease), transform 7000ms cubic-bezier(0.15, 0.6, 0.3, 1);
  filter: drop-shadow(0 18px 34px rgba(0, 0, 0, 0.55));
}
.tile .slideshow .slide.is-on { opacity: 1; transform: none; }
.slide-controls {
  position: absolute; left: 0; right: 0; bottom: calc(var(--pad) * 0.55);
  display: flex; justify-content: center; align-items: center; gap: 2px;
}
.slide-dot {
  width: 23px; height: 23px; padding: 8px; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, 0.34); background-clip: content-box;
  border-radius: 999px;
  transition: width 400ms var(--ease), background-color 400ms ease;
}
.slide-dot[aria-current="true"] { width: 38px; background-color: #fff; }
.slide-toggle {
  width: 26px; height: 26px; margin-right: 8px; border: 0; padding: 0; cursor: pointer;
  display: grid; place-items: center; border-radius: 50%;
  background: rgba(255, 255, 255, 0.14); color: #fff;
}
.slide-toggle svg { fill: currentColor; }
.slide-toggle .i-play, .slideshow[data-paused] .slide-toggle .i-pause { display: none; }
.slideshow[data-paused] .slide-toggle .i-play { display: inline; }

/* Overlay: copy on a full-bleed image. */
.tile.overlay { display: block; }
.tile.overlay .media { position: absolute; inset: 0; margin: 0; z-index: -1; }
.tile.overlay .media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0, 0, 0, 0.62) 0%, rgba(0, 0, 0, 0) 55%); }
.tile.overlay .copy { position: absolute; left: 0; right: 0; bottom: 0; padding-bottom: clamp(24px, 3vw, 40px); }

@media (hover: hover) and (pointer: fine) {
  a.tile:hover .media img { transform: scale(1.03); }
}
a.tile:active { transform: scale(0.99); transition: transform 120ms ease-out; }

@media (max-width: 900px) {
  .bento { grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto; }
  .tile, .tile.xl, .tile.wide, .tile.half { grid-column: 1; grid-row: auto; }
  .tile .media { flex: none; aspect-ratio: 4 / 3; }
  .tile.art .media { aspect-ratio: 1; }
  .tile.split { display: flex; }
  .tile.split .copy { padding-bottom: 0; }
  .tile.split .media { margin-top: clamp(18px, 2vw, 26px); aspect-ratio: 4 / 5; }
  .tile.overlay { aspect-ratio: 4 / 5; }
  .tile.film { display: flex; }
  .tile.film .copy { padding-bottom: 0; }
  .tile.film .media { aspect-ratio: 1; margin-top: 8px; }
  .tile.numbers .tile-stats { margin-top: 24px; }
}

/* ── Also built ──────────────────────────────────────────────────────────── */

.also { margin-top: clamp(56px, 7vw, 96px); }
.also ul {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0 32px;
  border-top: 1px solid var(--hair);
}
.also li { padding: 22px 0; border-bottom: 1px solid var(--hair); }
.also b { display: block; font-size: 1.0625rem; letter-spacing: -0.01em; margin-bottom: 6px; }
.also span { display: block; color: var(--ink-2); font-size: 0.9375rem; line-height: 1.45; }

/* ── Client portals: the web-portal consulting, one entry per client ─────── */

.portals { margin-top: clamp(64px, 8vw, 112px); }
.portals .section-head { margin-bottom: clamp(32px, 4vw, 48px); }
.portals .display { font-size: clamp(2rem, 4.4vw, 3.5rem); }
.portal-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 0 clamp(24px, 3vw, 40px);
}
.portal { padding: 24px 0 28px; border-top: 1px solid var(--hair); }
.portal .who { display: block; font-size: 0.8125rem; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.portal h4 { font-size: 1.25rem; letter-spacing: -0.02em; line-height: 1.2; }
.portal p { margin: 8px 0 0; color: var(--ink-2); font-size: 0.96875rem; line-height: 1.5; }
.portal .chips { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.portal .chips li {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.01em;
  padding: 5px 10px; border-radius: 999px; background: var(--bg-deep); color: var(--ink);
}
.portal .link-arrow { display: inline-block; margin-top: 14px; font-size: 0.9375rem; }

/* ── About ───────────────────────────────────────────────────────────────── */

.story {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: clamp(32px, 7vw, 120px);
  align-items: start;
}
.story .body p {
  font-size: clamp(1.125rem, 1.5vw, 1.3125rem);
  line-height: 1.55;
  letter-spacing: -0.006em;
  max-width: 38ch;
}
.story .body p:first-child {
  font-size: clamp(1.375rem, 2.2vw, 1.875rem);
  line-height: 1.35;
  letter-spacing: -0.02em;
  font-weight: 500;
}
/* The heading keeps you company while the longer text scrolls past. */
@media (min-width: 821px) { .story > :first-child { position: sticky; top: 104px; } }
.story .body a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.story .body a:hover { text-decoration-thickness: 2px; }
@media (max-width: 820px) { .story { grid-template-columns: 1fr; } }

/* ── Service: the dark band ──────────────────────────────────────────────── */

.night {
  background: var(--night);
  color: var(--night-ink);
}
.night .eyebrow, .night .lede { color: var(--night-ink-2); }
.night .lede strong { color: var(--night-ink); }
.night :focus-visible { outline-color: var(--night-ink); }

.service-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(40px, 7vw, 112px);
  align-items: end;
}
.service-photo { margin: 0; justify-self: end; width: min(100%, 420px); }
.service-photo img { width: 100%; height: auto; border-radius: var(--radius); display: block; }
.service-photo figcaption { margin-top: 14px; font-size: 0.875rem; color: var(--night-ink-2); }
@media (max-width: 820px) {
  .service-grid { grid-template-columns: 1fr; }
  .service-photo { justify-self: stretch; width: 100%; }
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  border-top: 1px solid rgba(245, 243, 238, 0.16);
  margin-top: clamp(56px, 8vw, 104px);
}
.stat {
  padding: clamp(28px, 3vw, 40px) 24px 0 0;
}
.stat b {
  display: block;
  font-size: clamp(2.5rem, 5vw, 4.25rem);
  font-weight: 700; letter-spacing: -0.045em; line-height: 1;
}
.stat span {
  display: block; margin-top: 12px;
  font-size: 0.9375rem; line-height: 1.4;
  color: var(--night-ink-2);
  max-width: 22ch;
}

/* ── Positions ───────────────────────────────────────────────────────────── */

.roles-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hair); }
.roles-list li {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) 8.5rem;
  gap: 8px 32px;
  align-items: baseline;
  padding: clamp(22px, 2.6vw, 32px) 0;
  border-bottom: 1px solid var(--hair);
}
.roles-list .role { font-size: clamp(1.25rem, 2vw, 1.625rem); font-weight: 600; letter-spacing: -0.02em; }
.roles-list .org { color: var(--ink-2); font-size: 1.0625rem; }
.roles-list .when { color: var(--ink-2); font-size: 0.9375rem; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
@media (max-width: 720px) {
  .roles-list li { grid-template-columns: minmax(0, 1fr) auto; }
  .roles-list .org { grid-column: 1 / -1; order: 3; }
}

.cta-row { margin-top: clamp(40px, 5vw, 64px); display: flex; flex-wrap: wrap; gap: 12px; }

/* ── Buttons & links ─────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px;
  border-radius: 999px; border: 0;
  background: var(--ink); color: var(--bg);
  font: 600 1rem/1 var(--font); letter-spacing: -0.005em;
  text-decoration: none; cursor: pointer;
  transition: transform 100ms ease-out, opacity 150ms ease;
}
.btn:active { transform: scale(0.97); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn[disabled] { opacity: 0.5; cursor: default; }
.night .btn { background: var(--night-ink); color: var(--night); }

.nw { white-space: nowrap; }
.link-arrow { font-weight: 600; text-decoration: none; }
.link-arrow::after { content: " →"; }
.link-arrow:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ── Contact ─────────────────────────────────────────────────────────────── */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(40px, 7vw, 120px);
  align-items: start;
}
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

.direct { list-style: none; padding: 0; margin: 32px 0 0; }
.direct li { padding: 18px 0; border-top: 1px solid var(--hair); }
.direct li:last-child { border-bottom: 1px solid var(--hair); }
.direct small { display: block; color: var(--ink-2); font-size: 0.8125rem; font-weight: 600; margin-bottom: 4px; }
.direct a { font-size: clamp(1.25rem, 2vw, 1.5rem); font-weight: 600; letter-spacing: -0.02em; text-decoration: none; overflow-wrap: anywhere; }
.direct a:hover { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1.5px; }

.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 8px; font-size: 0.875rem; font-weight: 600; color: var(--ink-2); }
.form input, .form textarea {
  width: 100%;
  font: 400 1.0625rem/1.4 var(--font);
  color: var(--ink);
  background: var(--bg-deep);
  border: 1.5px solid transparent;
  border-radius: 14px;
  padding: 14px 16px;
  transition: border-color 150ms ease, background 150ms ease;
}
.form textarea { min-height: 168px; resize: vertical; }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--ink); background: #fff; }
.form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form .row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 6px; }
.form .status { font-size: 0.9375rem; line-height: 1.4; }
.form .status.ok { color: var(--ok); }
.form .status.err { color: var(--err); }

/* ── Footer ──────────────────────────────────────────────────────────────── */

.foot {
  padding-block: 40px 56px;
  border-top: 1px solid var(--hair);
  color: var(--ink-2);
  font-size: 0.875rem;
}
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--ink); }
.foot nav { display: flex; gap: 20px; }

/* ── Motion ──────────────────────────────────────────────────────────────── */
/* Only when JS is running (html.js), so content is never hidden without it. */

.js .reveal {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  transition: opacity 1000ms var(--ease), transform 1000ms var(--ease);
  transition-delay: var(--d, 0ms);
}
.js .reveal.in { opacity: 1; transform: none; }

.js .hero .portrait img { transform: scale(1.06); transition: transform 1600ms var(--ease); }
.js .hero.in .portrait img { transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tile .slideshow .slide { transform: none; transition: opacity 900ms ease; }
  .slide-dot { transition: none; }
  .js .reveal { transform: none; transition: opacity 300ms ease; }
  .js .hero .portrait img { transform: none; transition: none; }
  .tile .media img, a.tile:active, .btn:active { transition: none; transform: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .bar { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: 0 1px 0 var(--hair); }
}

/* ══ /cv ═════════════════════════════════════════════════════════════════════
 * A conventional, printable CV. Same tokens, far quieter: a document, not a
 * story. Prints to Letter with the chrome stripped.
 */

.cv-page { padding-top: 104px; padding-bottom: 96px; }
.cv {
  max-width: 820px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.cv-tools { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 48px; }
.cv-tools .btn { min-height: 40px; padding: 0 18px; font-size: 0.9375rem; }

.cv header { padding-bottom: 28px; border-bottom: 2px solid var(--ink); }
.cv header h1 { font-size: clamp(2.25rem, 5vw, 3.25rem); letter-spacing: -0.04em; line-height: 1; }
.cv header .sub { margin-top: 10px; font-size: 1.125rem; font-weight: 600; letter-spacing: -0.01em; }
.cv header .meta { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 4px 18px; color: var(--ink-2); font-size: 0.9375rem; }
.cv header .meta a { text-decoration: none; }

.cv section { padding-top: 32px; }
.cv h2 {
  font-size: 0.8125rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-2);
  padding-bottom: 10px; margin-bottom: 18px;
  border-bottom: 1px solid var(--hair);
}
.cv .summary { font-size: 1.0625rem; line-height: 1.6; max-width: 68ch; }

.cv .entry { margin-bottom: 22px; break-inside: avoid; }
.cv .entry-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.cv .entry h3 { font-size: 1.0625rem; letter-spacing: -0.01em; }
.cv .entry .when { color: var(--ink-2); font-size: 0.9375rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cv .entry .org { color: var(--ink-2); font-size: 0.9375rem; margin-top: 2px; }
.cv .entry ul { margin: 8px 0 0; padding-left: 1.1em; }
.cv .entry li { margin: 4px 0; font-size: 0.96875rem; line-height: 1.5; }
.cv .entry li::marker { color: var(--ink-2); }

.cv .skills { display: grid; grid-template-columns: 11rem 1fr; gap: 8px 20px; font-size: 0.96875rem; }
.cv .skills dt { font-weight: 600; }
.cv .skills dd { margin: 0; color: var(--ink); }
@media (max-width: 600px) { .cv .skills { grid-template-columns: 1fr; gap: 2px; } .cv .skills dd { margin-bottom: 10px; } }

@page { size: letter; margin: 0.4in 0.6in; }

@media print {
  :root { --ink: #000; --ink-2: #444; --hair: #bbb; }
  html { scroll-behavior: auto; }
  body { background: #fff; font-size: 10pt; }
  .bar, .foot, .cv-tools, .skip, .screen-only { display: none !important; }
  .cv-page { padding: 0; }
  .cv { max-width: none; padding: 0; }
  .cv header h1 { font-size: 24pt; }
  .cv header .sub { font-size: 11.5pt; }
  .cv header .meta { font-size: 9.5pt; }
  .cv section { padding-top: 11pt; }
  .cv h2 { font-size: 8.5pt; margin-bottom: 8pt; padding-bottom: 4pt; }
  .cv header { padding-bottom: 10pt; }
  .cv header .meta { margin-top: 6pt; }
  .cv .summary { max-width: none; }
  .cv .summary, .cv .entry li, .cv .skills { font-size: 9pt; line-height: 1.36; }
  .cv .entry { margin-bottom: 7pt; }
  .cv .entry ul { margin-top: 3pt; }
  .cv .entry li { margin: 1.5pt 0; }
  .cv .skills { gap: 3pt 14pt; grid-template-columns: 8rem 1fr; }
  /* Spanish runs ~20% longer than English; a quarter point keeps it on two pages. */
  html:lang(es) .cv .summary, html:lang(es) .cv .entry li, html:lang(es) .cv .skills { font-size: 8.8pt; }
  /* Let a long entry continue onto the next page between bullets, not in the
     middle of one — the heading always stays with its first line. */
  .cv .entry { break-inside: auto; }
  .cv .entry li, .cv .entry-head, .cv .entry .org { break-inside: avoid; }
  .cv .entry .org { break-after: avoid; }
  .cv .entry h3 { font-size: 10.5pt; }
  .cv .entry .when, .cv .entry .org { font-size: 9.5pt; }
  .cv h2, .cv .entry-head { break-after: avoid; }
  a { text-decoration: none; }
  .js .reveal { opacity: 1 !important; transform: none !important; }
}

/* ══ Folding sections (home) ═════════════════════════════════════════════════
 * With script, each .fold section starts closed: only its heading shows, as a
 * full-width button. Without script, or in print, everything is open.
 */
.fold-toggle {
  all: unset;
  box-sizing: border-box;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  width: 100%; min-height: 56px;
  cursor: pointer;
  font: inherit; letter-spacing: inherit; line-height: inherit;
  -webkit-tap-highlight-color: transparent;
}
.fold-toggle:focus-visible { outline: 3px solid currentColor; outline-offset: 6px; border-radius: 6px; }
.fold-mark {
  flex: none;
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.9375rem; font-weight: 600; letter-spacing: 0;
  white-space: nowrap;
}
.fold-mark i {
  font-style: normal;
  display: inline-grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1.5px solid currentColor;
  font-size: 1.375rem; line-height: 1;
}
.fold-mark i::before { content: "+"; }
.fold.open .fold-mark i::before { content: "\2212"; }
.js .fold:not(.open) .fold-body { display: none; }
.js .fold:not(.open) { padding-block: clamp(28px, 4vw, 48px); border-top: 1px solid var(--hair); }
.js .fold:not(.open).night { border-top: 0; }
.js .fold:not(.open) .section-head { margin-bottom: 0; }
.js .fold:not(.open) .service-grid { display: block; }
.js .fold:not(.open) .display { font-size: clamp(2rem, 5vw, 3.5rem); }
@media (max-width: 600px) { .fold-mark span { display: none; } }
@media print {
  .js .fold .fold-body { display: revert !important; }
  .fold-mark { display: none !important; }
}
