/* CV directo: misma identidad que el juego (noche, rojo puente, ámbar), pero página de lectura normal. */
:root {
  --red: #c0362c;
  --amber: #f2c14e;
  --ink: #070a1c;
  --panel: #0e1330;
  --line: rgba(243, 236, 221, 0.14);
  --paper: #f3ecdd;
  --muted: rgba(243, 236, 221, 0.64);
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0; color: var(--paper); font-family: var(--mono); font-size: 14px; line-height: 1.6;
  background: linear-gradient(180deg, #04061a 0, #0c1236 46%, #141a3c 100%) fixed var(--ink);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }

.bar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 24px;
  background: rgba(7, 10, 28, 0.82); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.bar-name { font-family: var(--display); font-weight: 800; font-size: 18px; letter-spacing: -0.01em; text-decoration: none; }
.bar-links { display: flex; gap: 8px; }

.btn {
  display: inline-block; padding: 9px 16px; border-radius: 999px; text-decoration: none; white-space: nowrap;
  font: 600 12px var(--mono); letter-spacing: 0.04em;
  color: var(--ink); background: var(--amber); border: 1px solid transparent;
}
.btn:hover { background: #ffd36a; }
.btn.ghost { color: var(--paper); background: transparent; border-color: var(--line); }
.btn.ghost:hover { border-color: var(--amber); color: var(--amber); background: transparent; }
.btn:focus-visible, .jump a:focus-visible { outline: 2px solid var(--paper); outline-offset: 2px; }

main { max-width: 880px; margin: 0 auto; padding: 0 24px 96px; }
section { padding-top: 64px; }

.eyebrow { margin: 0 0 10px; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--amber); }
h1 { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(44px, 9vw, 92px); line-height: 0.95; letter-spacing: -0.04em; }
.lede { margin: 18px 0 0; font-family: var(--display); font-size: clamp(19px, 2.6vw, 26px); line-height: 1.25; max-width: 30ch; text-wrap: balance; }

.facts { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 8px; }
.facts li { display: flex; gap: 14px; align-items: baseline; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.facts b { flex: none; width: 92px; font-size: 10px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }

.jump { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 8px; }
.jump a { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.jump a:hover { color: var(--amber); border-color: var(--amber); }

h2 { margin: 0 0 22px; font-family: var(--display); font-weight: 800; font-size: 30px; letter-spacing: -0.02em; display: flex; align-items: baseline; gap: 12px; }
h2 span { font: 500 11px var(--mono); letter-spacing: 0.1em; color: var(--amber); }

/* Línea de tiempo: un cable rojo con luces ámbar, como los puentes. */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 148px; top: 8px; bottom: 8px; width: 2px; background: var(--red); border-radius: 2px; }
.timeline > li { display: grid; grid-template-columns: 124px 1fr; column-gap: 48px; position: relative; padding-bottom: 34px; }
.timeline > li:last-child { padding-bottom: 0; }
.timeline > li::before {
  content: ""; position: absolute; left: 143px; top: 7px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--amber); box-shadow: 0 0 14px var(--amber);
}
.when { padding-top: 3px; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
h3 { margin: 0; font-family: var(--display); font-weight: 800; font-size: 21px; line-height: 1.15; letter-spacing: -0.01em; }
.org { margin: 4px 0 0; font-size: 12px; color: var(--amber); }
.what ul { margin: 12px 0 0; padding-left: 18px; }
.what li + li { margin-top: 6px; }

.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: grid; grid-template-columns: 124px 1fr; column-gap: 24px; row-gap: 2px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.rows span { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.rows b { font-family: var(--display); font-weight: 600; font-size: 16px; }
.rows i { grid-column: 2; font-style: normal; font-size: 12px; color: var(--muted); }

.lessons { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.lessons li { padding: 14px 18px; border-left: 3px solid var(--red); background: var(--panel); border-radius: 0 10px 10px 0; font-family: var(--display); font-size: 18px; line-height: 1.3; }

.plain { margin: 0; padding-left: 18px; }
/* About corto: la edad como subtítulo de cada etapa. */
.story-open { margin: 0 0 22px; font-family: var(--display); font-size: clamp(20px, 2.6vw, 26px); line-height: 1.2; }
.ages { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; max-width: 640px; }
.ages li { display: grid; grid-template-columns: 78px 1fr; column-gap: 20px; align-items: baseline; padding: 14px 0; border-top: 1px solid var(--line); }
.ages li:last-child { border-bottom: 1px solid var(--line); }
.age { font-family: var(--display); font-weight: 800; font-size: 34px; line-height: 1; letter-spacing: -0.03em; color: var(--amber); font-variant-numeric: tabular-nums; }
.age small { display: block; margin-top: 4px; font: 500 9.5px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.ages p { margin: 0; font-size: 14px; line-height: 1.5; }
.story-close { margin: 20px 0 30px; font-family: var(--display); font-size: 18px; color: var(--muted); }
@media (max-width: 640px) { .ages li { grid-template-columns: 62px 1fr; column-gap: 14px; } .age { font-size: 28px; } }

/* About: la historia, una frase por línea, colgada de un cable rojo como los puentes. */
.story { list-style: none; margin: 0 0 30px; padding: 0 0 0 22px; border-left: 2px solid var(--red); display: grid; gap: 11px; max-width: 62ch; }
.story li { position: relative; font-size: 14.5px; line-height: 1.5; color: var(--muted); }
.story li::before { content: ""; position: absolute; left: -27px; top: 0.55em; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); border: 2px solid var(--red); }
.story li:first-child, .story li:last-child { font-family: var(--display); font-size: clamp(19px, 2.4vw, 23px); line-height: 1.25; color: var(--paper); }
.story li:first-child::before, .story li:last-child::before { top: 0.4em; background: var(--amber); border-color: var(--amber); box-shadow: 0 0 12px var(--amber); }
.story li:last-child { margin-top: 6px; }
.about { list-style: none; padding: 0; display: grid; gap: 10px; margin-bottom: 26px; }
.about li { font-family: var(--display); font-size: clamp(18px, 2.4vw, 23px); line-height: 1.3; max-width: 34ch; text-wrap: balance; }
h3.sub { margin: 34px 0 6px; font: 600 11px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--amber); }
h2 + h3.sub { margin-top: 0; }
.note { margin: -10px 0 18px; font-size: 12px; color: var(--muted); }
.rows a { text-underline-offset: 3px; }
.rows a:hover { color: var(--amber); }

.projects { display: grid; gap: 10px; }
.project { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 0 18px; }
.project[open] { border-color: rgba(242, 193, 78, 0.5); padding-bottom: 16px; }
.project summary { cursor: pointer; list-style: none; padding: 16px 28px 16px 0; position: relative; display: grid; gap: 3px; }
.project summary::-webkit-details-marker { display: none; }
.project summary::after { content: "+"; position: absolute; right: 0; top: 14px; font: 500 20px var(--mono); color: var(--amber); }
.project[open] summary::after { content: "–"; }
.project summary b { font-family: var(--display); font-weight: 800; font-size: 20px; letter-spacing: -0.01em; }
.project summary i { font-style: normal; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--amber); }
.project summary span { font-size: 13px; color: var(--muted); }
.project summary:focus-visible { outline: 2px solid var(--paper); outline-offset: 4px; border-radius: 8px; }
.project ul { margin: 0; padding-left: 18px; }
.project li + li { margin-top: 6px; }
.tags { margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags span { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); font-size: 10.5px; letter-spacing: 0.04em; color: var(--muted); }
.end .note { margin: 12px 0 0; font-family: var(--display); font-size: 20px; color: var(--amber); }
.plain li + li { margin-top: 8px; }


/* Huecos de imagen. Vacíos solo se ven en local (body.show-slots); con un <img> dentro, siempre. */
.img-slot {
  position: relative; display: none; place-items: center; margin: 16px 0 0;
  width: 100%; max-width: 440px; aspect-ratio: 16 / 9; overflow: hidden;
  border: 1px dashed var(--line); border-radius: 12px; background: rgba(243, 236, 221, 0.03);
}
.img-slot::after { content: "Image · " attr(data-img); padding: 8px 12px; text-align: center; font: 500 10.5px var(--mono); letter-spacing: 0.04em; color: var(--muted); word-break: break-all; }
.img-slot:has(img) { display: grid; border-style: solid; }
.img-slot:has(img)::after { content: none; }
.img-slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
body.show-slots .img-slot { display: grid; }
.img-slot.portrait { width: 132px; aspect-ratio: 1; border-radius: 50%; margin: 0 0 22px; }
.img-slot.portrait::after { font-size: 9px; }
.what a, .project a { text-underline-offset: 3px; }
.org a { color: inherit; }
.what a:hover, .org a:hover { color: var(--paper); }
@media print { .img-slot:not(:has(img)) { display: none !important; } }

/* Galería de charlas. */
.talks { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.talk { margin: 0; display: none; }
.talk .img-slot { margin: 0; max-width: none; aspect-ratio: 4 / 3; }
.talk figcaption { margin-top: 10px; display: grid; gap: 2px; }
.talk figcaption b { font-family: var(--display); font-weight: 600; font-size: 16px; line-height: 1.2; }
.talk figcaption span { font-size: 11.5px; color: var(--muted); }
.talk:has(img), body.show-slots .talk { display: block; }
#talks, .jump a[href="#talks"] { display: none; }
#talks:has(.talk img), body.show-slots #talks { display: block; }
body:has(.talk img) .jump a[href="#talks"], body.show-slots .jump a[href="#talks"] { display: inline-block; }

/* Logos: icono del dominio de cada organización (o monograma si no tiene web propia). */
.logo { display: inline-block; width: 18px; height: 18px; margin-right: 8px; vertical-align: -3px; border-radius: 4px; object-fit: contain; background: rgba(243, 236, 221, 0.92); }
.logo.mono { display: inline-grid; place-items: center; background: var(--red); color: var(--paper); font: 600 8.5px var(--mono); letter-spacing: 0; }
@media print { .logo { display: none; } }

.end { text-align: center; padding-top: 96px; }
.big { display: block; margin: 0; font-size: clamp(34px, 6vw, 64px); line-height: 1; letter-spacing: -0.03em; text-wrap: balance; }
.end-actions { margin-top: 24px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

@media (max-width: 640px) {
  .bar { padding: 10px 16px; }
  .bar-links .ghost { display: none; }
  main { padding: 0 16px 72px; }
  section { padding-top: 48px; }
  .timeline::before { left: 5px; }
  .timeline > li { grid-template-columns: 1fr; padding-left: 28px; }
  .timeline > li::before { left: 0; }
  .when { text-align: left; padding: 0 0 4px; }
  .rows li { grid-template-columns: 1fr; }
  .rows span { text-align: left; }
  .rows i { grid-column: 1; }
  .facts li { flex-direction: column; gap: 2px; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

@media print {
  body { background: #fff; color: #111; }
  .bar, .jump, .end-actions .ghost { display: none; }
  .project { background: none; }
  .eyebrow, h2 span, .org { color: #a02a22; }
  .when, .rows span, .rows i, .facts b { color: #555; }
  .lessons li { background: none; }
  .timeline > li::before { box-shadow: none; background: #a02a22; }
  section { padding-top: 28px; }
}
