/* estebanetayo.es · diseño «Cota» 2026
   Cuaderno topográfico: yeso, tinta, curvas de nivel y una marca roja. */

:root {
  --paper: #f1eee8;
  --paper-2: #e9e5dc;
  --paper-3: #e1dcd1;
  --ink: #191b1a;
  --muted: #5b625d;
  --line: #d5d0c5;
  --topo: #cfc8ba;
  --red: #b8361f;
  --green: #24402f;
  --focus: #b8361f;
  --img-filter: none;

  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --wrap: min(77.5rem, 100% - 2 * var(--gutter));
  --read: 42.5rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --sec: clamp(4.5rem, 9vw, 7rem);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #121413;
    --paper-2: #171a18;
    --paper-3: #1d201e;
    --ink: #e7e3db;
    --muted: #9aa29c;
    --line: #2a2e2b;
    --topo: #2b302c;
    --red: #e0674c;
    --green: #8db79a;
    --focus: #e0674c;
    --img-filter: brightness(0.92);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --paper: #121413;
  --paper-2: #171a18;
  --paper-3: #1d201e;
  --ink: #e7e3db;
  --muted: #9aa29c;
  --line: #2a2e2b;
  --topo: #2b302c;
  --red: #e0674c;
  --green: #8db79a;
  --focus: #e0674c;
  --img-filter: brightness(0.92);
  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.0625rem, 0.3vw + 1rem, 1.1875rem);
  font-optical-sizing: auto;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--red); color: var(--paper); }

img { max-width: 100%; height: auto; filter: var(--img-filter); }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }

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

.mono {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  font-weight: 400;
}

.kicker {
  margin: 0 0 0.9rem;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
}

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 60;
  padding: 0.5rem 0.8rem; background: var(--ink); color: var(--paper);
}
.skip:focus { top: 0.6rem; }

svg { flex: none; }
svg.arrow, .icon-btn svg { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Cabecera ---------- */

.mast {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  border-bottom: 1px solid var(--line);
  transition: transform 0.25s ease;
}
.mast.is-hidden { transform: translateY(-100%); }

.mast-inner {
  width: var(--wrap); margin: 0 auto;
  display: flex; align-items: center; gap: 1.5rem;
  min-height: 3.75rem;
}

.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; margin-right: auto; }
.brand-name { font-size: 1.15rem; font-weight: 500; letter-spacing: -0.01em; }

.mark {
  display: inline-grid; place-items: center;
  width: 2.1rem; height: 2.1rem; border: 1px solid var(--ink); border-radius: 50%;
  font-family: var(--mono); font-size: 0.68rem; font-weight: 500; letter-spacing: 0.04em;
  position: relative;
}
.mark::after {
  content: ""; position: absolute; right: -2px; top: 3px; width: 6px; height: 6px;
  border-radius: 50%; background: var(--red);
}

.nav { display: flex; gap: 0.25rem; }
.nav a, .icon-btn {
  white-space: nowrap;
  display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 0.7rem;
  text-decoration: none; font-size: 1rem; color: var(--muted); position: relative;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0.7rem; right: 0.7rem; bottom: 0.55rem; height: 1px; background: var(--red);
}
.icon-btn { color: var(--ink); padding: 0 0.5rem; }

/* ---------- Bloques ---------- */

.band { width: var(--wrap); margin: 0 auto; padding: var(--sec) 0 0; }
.band.tight { padding-top: 2rem; }

.sec-head {
  display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 0 2rem;
  border-top: 1px solid var(--ink); padding-top: 1.1rem; margin-bottom: 2rem;
}
.sec-head .kicker { grid-column: 1 / -1; }
.sec-head h2 { margin: 0; font-weight: 350; font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1.05; letter-spacing: -0.02em; }
.sec-lede { max-width: 38rem; color: var(--muted); margin: -0.75rem 0 2.25rem; }

.more {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-family: var(--mono); font-size: 0.78rem; text-decoration: none; text-transform: uppercase; letter-spacing: 0.06em;
  min-height: 2.75rem;
}
.more:hover { color: var(--red); }
.more:hover .arrow { transform: translateX(4px); }
.arrow { transition: transform 0.2s ease; }

.btn {
  display: inline-flex; align-items: center; gap: 0.6rem; min-height: 3rem; padding: 0 1.4rem;
  background: var(--ink); color: var(--paper); text-decoration: none;
  font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase;
  border: 1px solid var(--ink); border-radius: 999px;
}
.btn:hover { background: var(--red); border-color: var(--red); }
.btn:hover .arrow { transform: translateX(4px); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { border-color: var(--red); color: var(--red); }
.cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 2rem 0 0; }

/* ---------- Curvas de nivel ---------- */

.topo { position: absolute; pointer-events: none; fill: none; stroke: var(--topo); stroke-width: 0.9; }
.topo .major { stroke: color-mix(in srgb, var(--topo) 60%, var(--muted)); stroke-width: 1.1; }
.topo path { stroke-dasharray: 4000; stroke-dashoffset: 4000; animation: draw 2.4s cubic-bezier(.2,.7,.2,1) forwards; }
.topo path:nth-child(3n) { animation-delay: 0.15s; }
.topo path:nth-child(3n+1) { animation-delay: 0.3s; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- Portada ---------- */

.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero .topo { right: -12%; top: -10%; width: min(62rem, 95vw); height: 120%; }
.hero-inner { position: relative; width: var(--wrap); margin: 0 auto; padding: clamp(3.5rem, 9vw, 7.5rem) 0 clamp(3rem, 7vw, 5.5rem); }

.display {
  margin: 0; font-weight: 300; font-size: clamp(4rem, 13vw, 10.5rem);
  line-height: 0.88; letter-spacing: -0.045em; font-variation-settings: "opsz" 72;
}
.display-m {
  margin: 0; font-weight: 350; font-size: clamp(2.5rem, 6vw, 4.75rem);
  line-height: 1; letter-spacing: -0.03em; font-variation-settings: "opsz" 72; text-wrap: balance;
}
.display-s { font-weight: 350; font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1.05; letter-spacing: -0.02em; margin-block: 0; }

.claim {
  max-width: 34rem; margin: 2rem 0 0; font-size: clamp(1.3rem, 2vw, 1.6rem); line-height: 1.35; font-weight: 350;
}
.claim em { color: var(--red); }

.stats { display: flex; flex-wrap: wrap; gap: 0.4rem 1.6rem; margin: 2rem 0 0; color: var(--muted); }
.stats span::before { content: "— "; color: var(--red); }

/* ---------- Proyectos ---------- */

.plist { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--line); }
.prow { border-top: 1px solid var(--line); }
.prow[hidden] { display: none; }
.prow a {
  display: grid; grid-template-columns: 7.5rem minmax(0, 1fr) 15rem 1.5rem; gap: 0 1.75rem; align-items: baseline;
  padding: 1.6rem 0; text-decoration: none;
}
.prow .cota { color: var(--muted); padding-top: 0.5rem; }
.pname { margin: 0; font-weight: 400; font-size: clamp(1.6rem, 2.6vw, 2.2rem); line-height: 1.1; letter-spacing: -0.02em; }
.psum { display: block; margin-top: 0.35rem; color: var(--muted); max-width: 36rem; }
.pmeta { display: flex; flex-direction: column; gap: 0.35rem; align-items: flex-start; }
.prow .arrow { align-self: center; width: 1.4rem; height: 1.4rem; color: var(--muted); }
.prow a:hover .pname, .prow a:hover .cota { color: var(--red); }
.prow a:hover .arrow { transform: translateX(4px); color: var(--red); }
.domain, .sector { color: var(--muted); }
.draft { color: var(--red); border: 1px dashed currentColor; padding: 0.05rem 0.4rem; border-radius: 3px; font-size: 0.68rem; }
.plist.compact .prow a { grid-template-columns: 6rem minmax(0, 1fr) 1.5rem; padding: 1.1rem 0; }
.plist.compact .pmeta { display: none; }
.plist.compact .pname { font-size: 1.4rem; }

.state { display: inline-flex; align-items: center; gap: 0.45rem; font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.02em; }
.state i { width: 0.55rem; height: 0.55rem; border-radius: 50%; border: 1.5px solid var(--muted); }
.state-activo { color: var(--green); }
.state-activo i { background: var(--green); border-color: var(--green); }
.state-pausa i { background: linear-gradient(90deg, var(--muted) 50%, transparent 50%); }

/* ---------- Línea de tiempo ---------- */

.timeline {
  list-style: none; margin: 0; padding: 0 0 0.5rem; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(9rem, 1fr);
  overflow-x: auto; scrollbar-width: thin; position: relative;
}
.timeline::before { content: ""; position: absolute; left: 0; right: 0; top: 0.45rem; height: 1px; background: var(--ink); }
.timeline li { position: relative; }
.timeline a { display: block; padding: 0 1.25rem 0 0; text-decoration: none; }
.timeline .mono { display: block; color: var(--muted); height: 1.6rem; }
.timeline a::before {
  content: ""; display: block; width: 0.7rem; height: 0.7rem; border-radius: 50%;
  background: var(--paper); border: 1.5px solid var(--ink); margin: 0.1rem 0 0.9rem;
  position: relative;
}
.timeline a span:last-child { font-size: 1.1rem; line-height: 1.25; display: block; }
.timeline a:hover span:last-child { color: var(--red); }

/* ---------- Blog / estratos ---------- */

.histo { display: flex; align-items: flex-end; gap: 0.4rem; height: 7.5rem; margin: 0 0 2.5rem; max-width: 34rem; }
.histo > * { flex: 1; display: grid; grid-template-rows: 1fr auto auto; height: 100%; text-decoration: none; text-align: center; }
.histo .bar { align-self: end; height: var(--h); background: var(--paper-3); border-top: 2px solid var(--ink); transition: background 0.2s; }
.histo a:hover .bar { background: var(--red); border-color: var(--red); }
.histo .yr { margin-top: 0.4rem; }
.histo .n { color: var(--muted); font-size: 0.68rem; }

.picks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.picks li { border-bottom: 1px solid var(--line); }
.picks li + li { border-left: 1px solid var(--line); }
.picks a { display: flex; flex-direction: column; gap: 0.6rem; padding: 1.5rem 1.5rem 1.75rem 0; text-decoration: none; height: 100%; }
.picks li + li a { padding-left: 1.5rem; }
.picks .mono { color: var(--muted); }
.picks .ptitle { font-size: 1.35rem; line-height: 1.2; letter-spacing: -0.01em; }
.picks .pexc { color: var(--muted); font-size: 0.98rem; }
.picks a:hover .ptitle { color: var(--red); }

.strata { margin-top: 3rem; }
.stratum {
  padding: 2.75rem 0 2.25rem;
  background: color-mix(in srgb, var(--paper-2) calc(var(--s) * 14%), var(--paper));
  border-top: 1px solid var(--line);
}
.stratum[hidden] { display: none; }
.stratum > * { width: var(--wrap); margin-left: auto; margin-right: auto; }
.stratum .yr { display: flex; align-items: baseline; gap: 1rem; margin-bottom: 1rem; }
.stratum .yr .mono { color: var(--muted); }

.elist { list-style: none; margin-block: 0; padding: 0; }
.erow[hidden] { display: none; }
.erow a {
  display: grid; grid-template-columns: 7rem minmax(0, 1fr) 13rem; gap: 1.5rem; align-items: baseline;
  padding: 0.85rem 0; border-bottom: 1px solid var(--line); text-decoration: none;
}
.erow time { color: var(--muted); }
.etitle { font-size: 1.15rem; line-height: 1.3; }
.etopics { color: var(--muted); text-align: right; }
.erow a:hover .etitle { color: var(--red); }

.finder { margin: 2.25rem 0 2.5rem; max-width: 34rem; }
.finder label { display: block; margin-bottom: 0.5rem; color: var(--muted); }
.finder-row { display: flex; align-items: center; gap: 0.75rem; border-bottom: 1.5px solid var(--ink); }
.finder-row svg { width: 1.3rem; height: 1.3rem; fill: none; stroke: var(--muted); stroke-width: 1.5; }
.finder input {
  flex: 1; min-width: 0; padding: 0.75rem 0; border: 0; background: transparent; color: inherit;
  font: inherit; font-size: 1.35rem; outline: none;
}
.finder input::placeholder { color: var(--muted); opacity: 0.7; }
.finder-row:focus-within { border-color: var(--red); }
.result-count { color: var(--red); min-height: 1.2em; margin: 0.5rem 0 0; }
.empty { color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.5rem; }
.chip {
  display: inline-flex; align-items: center; gap: 0.5rem; min-height: 2.5rem; padding: 0 1rem;
  border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink);
  font: inherit; font-size: 0.95rem; text-decoration: none; cursor: pointer;
}
.chip .mono { color: var(--muted); font-size: 0.7rem; }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip[aria-pressed="true"] .mono { color: inherit; opacity: 0.7; }

/* ---------- Cabeceras de página ---------- */

.page-head { width: var(--wrap); margin: 0 auto; padding: clamp(2.5rem, 6vw, 4.5rem) 0 1rem; position: relative; }
.with-topo { overflow: visible; }
.with-topo > *:not(.topo) { position: relative; }
.topo-s { right: calc(-1 * var(--gutter)); top: 0; width: min(36rem, 70vw); height: 100%; opacity: 0.9; z-index: 0; }
.lede { max-width: 38rem; font-size: clamp(1.2rem, 1.6vw, 1.4rem); line-height: 1.45; color: var(--muted); margin: 1.25rem 0 0; font-weight: 350; }

.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.25rem 0.5rem; padding: 0; margin: 0 0 1.75rem; font-family: var(--mono); font-size: 0.72rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 0.5rem; color: var(--line); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--red); }

/* ---------- Entradas ---------- */

.post { width: min(52rem, 100% - 2 * var(--gutter)); margin: 0 auto; padding-bottom: 2rem; }
.post-head { max-width: 52rem; padding: clamp(2.5rem, 6vw, 4.5rem) 0 0; }
.post-meta { color: var(--muted); margin: 0 0 1rem; }
.cats { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.5rem 0 0; }
.tag { font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; text-decoration: none; padding: 0.35rem 0.7rem; border: 1px solid var(--line); border-radius: 999px; }
.tag:hover { border-color: var(--red); color: var(--red); }

.historic {
  display: flex; align-items: center; gap: 0.6rem; max-width: var(--read);
  margin: 2rem 0 0; padding: 0.75rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted);
}
.historic .dot { width: 0.5rem; height: 0.5rem; border: 1.5px solid var(--red); border-radius: 50%; }

.callout { max-width: var(--read); margin: 1.5rem 0 0; padding: 1rem 1.25rem; background: var(--paper-2); border-left: 2px solid var(--red); }
.callout .kicker { display: block; margin-bottom: 0.35rem; }
.callout a { display: inline; text-decoration: none; }
.callout a:hover strong { color: var(--red); }

.prose { max-width: var(--read); margin-top: 2.25rem; font-size: 1.15em; line-height: 1.68; }
.prose > :first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose figure, .prose table, .prose pre { margin: 0 0 1.25em; }
.prose h2, .prose h3, .prose h4 { font-weight: 450; line-height: 1.2; letter-spacing: -0.01em; margin: 2em 0 0.6em; }
.prose h2 { font-size: 1.6em; }
.prose h3 { font-size: 1.3em; }
.prose a { color: var(--ink); text-decoration-color: var(--red); }
.prose a:hover { color: var(--red); }
.prose blockquote { margin-left: 0; padding-left: 1.25rem; border-left: 2px solid var(--red); font-style: italic; color: var(--muted); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: 0.3em 0; }
.prose li::marker { color: var(--red); }
.prose pre, .prose code { font-family: var(--mono); font-size: 0.82em; }
.prose pre { overflow-x: auto; padding: 1rem; background: var(--paper-2); border: 1px solid var(--line); }
.prose table { border-collapse: collapse; display: block; overflow-x: auto; font-size: 0.9em; }
.prose td, .prose th { border: 1px solid var(--line); padding: 0.4rem 0.6rem; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.5em 0; }

/* Imágenes antiguas tratadas como documentos: paspartú y pie en mono. */
.prose img { display: block; background: var(--paper-2); }
.prose p > a > img, .prose p > img, .prose figure img { border: 1px solid var(--line); padding: 0.6rem; background: var(--paper-2); }
.prose img.icon, .prose img[width="57"], .prose img[width="64"], .prose img[width="72"] {
  display: inline-block; vertical-align: middle; width: auto; max-width: 7.5rem; padding: 0.75rem; margin: 0 0.5rem;
}
.prose figure { margin-left: 0; margin-right: 0; }
.prose figcaption, .prose .wp-caption-text { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); margin-top: 0.5rem; }
.prose .gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: 0.6rem; margin: 0 0 1.25em; }
.prose .gallery a { display: block; border: 1px solid var(--line); background: var(--paper-2); padding: 0.5rem; }
.prose .gallery img { border: 0; padding: 0; width: 100%; height: 11rem; object-fit: contain; background: transparent; }
.prose .gallery a:hover { border-color: var(--red); }
.prose .video, .prose iframe { max-width: 100%; }
.prose .video { position: relative; aspect-ratio: 16 / 9; margin: 0 0 1.25em; }
.prose .video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.tags { color: var(--muted); max-width: var(--read); margin: 2rem 0 0; }
.note { color: var(--muted); }

.comments { max-width: var(--read); margin: 3rem 0 0; border-top: 1px solid var(--ink); }
.comments summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 1rem; padding: 1.1rem 0; cursor: pointer; list-style: none; }
.comments summary::-webkit-details-marker { display: none; }
.comments summary .kicker { width: 100%; margin: 0; }
.comments summary strong { font-weight: 450; font-size: 1.35rem; }
.comments summary strong::after { content: " +"; color: var(--red); }
.comments details[open] summary strong::after { content: " −"; }
.comments summary > .mono:last-child { color: var(--muted); }
.comments ol { list-style: none; margin: 0; padding: 0; }
.comment { padding: 1rem 0; border-top: 1px solid var(--line); font-size: 1rem; }
.comment.reply { margin-left: 2rem; padding-left: 1rem; border-left: 2px solid var(--line); }
.comment .who { color: var(--muted); margin: 0 0 0.35rem; }
.comment .who b { color: var(--ink); font-weight: 500; }
.comment p { margin: 0 0 0.5rem; }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; max-width: var(--read); margin: 3.5rem 0 0; border-top: 1px solid var(--ink); padding-top: 1.25rem; }
.post-nav a { text-decoration: none; display: flex; flex-direction: column; }
.post-nav .next { text-align: right; grid-column: 2; }
.post-nav strong { font-weight: 400; font-size: 1.15rem; line-height: 1.3; }
.post-nav a:hover strong { color: var(--red); }
.post-nav .kicker { margin-bottom: 0.35rem; color: var(--muted); }

/* ---------- Ficha de proyecto ---------- */

.project { width: var(--wrap); margin: 0 auto; }
.project .page-head { width: auto; }
.project-grid { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 3rem; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--ink); }
.project-grid .prose { margin-top: 0; }
.facts { margin: 0; display: grid; gap: 1.1rem; align-content: start; }
.facts dt { color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.68rem; margin-bottom: 0.2rem; }
.facts dd { margin: 0; }
.miles, .origin { margin: 4rem 0 0 calc(15rem + 3rem); max-width: var(--read); }
.miles ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--ink); }
.miles li { display: grid; grid-template-columns: 7rem 1fr; gap: 1rem; padding: 0.6rem 0 0.6rem 1.25rem; position: relative; }
.miles li::before { content: ""; position: absolute; left: -0.35rem; top: 1.05rem; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--paper); border: 1.5px solid var(--red); }
.miles .mono { color: var(--muted); padding-top: 0.25rem; }
.origin .erow a { grid-template-columns: 8rem minmax(0, 1fr); }
.origin .etopics { display: none; }
.next-project { margin: 5rem 0 0; border-top: 1px solid var(--ink); }
.next-project a { display: grid; grid-template-columns: 1fr auto; align-items: center; padding: 1.5rem 0; text-decoration: none; }
.next-project .kicker { grid-column: 1 / -1; color: var(--muted); }
.next-project strong { font-weight: 350; font-size: clamp(2rem, 5vw, 3.5rem); letter-spacing: -0.03em; line-height: 1; }
.next-project .arrow { width: 2rem; height: 2rem; }
.next-project a:hover strong, .next-project a:hover .arrow { color: var(--red); }
.next-project a:hover .arrow { transform: translateX(6px); }

.today { max-width: 52rem; margin-top: 2rem; }
.today .lede { color: var(--ink); margin: 0 0 1.5rem; }
.today .note { margin-top: 1rem; }

.topic-list { list-style: none; margin: 0; padding: 0; columns: 2 20rem; column-gap: 3rem; }
.topic-list li { break-inside: avoid; }
.topic-list a { display: grid; grid-template-columns: 1fr auto 1.2rem; gap: 1rem; align-items: baseline; padding: 0.9rem 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.topic-list .tname { font-size: 1.25rem; }
.topic-list .mono { color: var(--muted); }
.topic-list a:hover .tname { color: var(--red); }

/* ---------- Contacto y pie ---------- */

.contact-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; padding-bottom: 1rem; }
.contact-band p { margin: 0; }

.foot { margin-top: var(--sec); border-top: 1px solid var(--ink); }
.foot-inner {
  width: var(--wrap); margin: 0 auto; padding: 2.5rem 0 2rem;
  display: grid; grid-template-columns: 1.2fr 2fr; gap: 1.5rem 3rem; align-items: start;
}
.foot-sign { display: flex; gap: 1rem; align-items: flex-start; }
.foot-sign p { margin: 0; color: var(--muted); font-size: 0.98rem; line-height: 1.45; }
.foot-sign strong { color: var(--ink); font-weight: 500; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 0 1.25rem; }
.foot-nav a { text-decoration: none; min-height: 2.75rem; display: inline-flex; align-items: center; }
.foot-nav a:hover { color: var(--red); }
.coords { color: var(--muted); margin: 0; }
.foot-proj { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.1rem 1.4rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
.foot-proj p { margin: 0 0.5rem 0 0; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); flex-basis: 100%; }
.foot-proj a { text-decoration: none; font-size: 1.05rem; min-height: 2.5rem; display: inline-flex; align-items: center; }
.foot-proj a:hover { color: var(--red); }

/* Proyectos relacionados y enlace a la web del proyecto */
.go { margin-top: 1.5rem; }
.relp { max-width: var(--read); margin: 3rem 0 0; }
.relp ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem 2rem; }
.relp li { display: flex; flex-direction: column; gap: 0.35rem; padding-top: 1rem; border-top: 1px solid var(--ink); }
.relp .rp-name { font-size: 1.5rem; text-decoration: none; line-height: 1.15; }
.relp .rp-name:hover { color: var(--red); }
.relp span { color: var(--muted); line-height: 1.45; }
.relp .rp-out { font-size: 0.78rem; color: var(--ink); text-decoration-color: var(--red); }
.theme-toggle { justify-self: start; background: none; border: 0; color: var(--muted); padding: 0.5rem 0; min-height: 2.75rem; cursor: pointer; }
.theme-toggle span { padding: 0.1rem 0.15rem; }
:root:not([data-theme="dark"]) .theme-toggle .sun { color: var(--ink); text-decoration: underline; text-decoration-color: var(--red); }
:root[data-theme="dark"] .theme-toggle .moon { color: var(--ink); text-decoration: underline; text-decoration-color: var(--red); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .theme-toggle .sun { color: var(--muted); text-decoration: none; }
  :root:not([data-theme]) .theme-toggle .moon { color: var(--ink); text-decoration: underline; text-decoration-color: var(--red); }
}

/* ---------- Visor de imágenes ---------- */

.lightbox { border: 0; padding: 0; max-width: 94vw; max-height: 92vh; background: transparent; color: #f1eee8; }
.lightbox::backdrop { background: rgba(10, 12, 11, 0.88); }
.lightbox img { display: block; max-width: 94vw; max-height: 82vh; margin: 0 auto; filter: none; background: #fff; }
.lightbox p { display: flex; justify-content: space-between; gap: 1rem; margin: 0.6rem 0 0; font-family: var(--mono); font-size: 0.75rem; }
.lightbox button { background: none; border: 1px solid currentColor; color: inherit; border-radius: 999px; min-height: 2.5rem; padding: 0 1rem; font: inherit; cursor: pointer; }

/* ---------- Móvil ---------- */

@media (max-width: 860px) {
  .prow a { grid-template-columns: minmax(0, 1fr) 1.5rem; gap: 0.35rem 1rem; padding: 1.35rem 0; }
  .prow .cota { grid-column: 1; padding: 0; order: -1; }
  .prow .pmain { grid-column: 1; }
  .prow .pmeta { grid-column: 1; flex-direction: row; flex-wrap: wrap; gap: 0.35rem 1rem; margin-top: 0.5rem; }
  .prow .arrow { grid-column: 2; grid-row: 1 / span 3; }
  .erow a { grid-template-columns: 4.5rem minmax(0, 1fr); gap: 0.75rem; }
  .etopics { display: none; }
  .project-grid { grid-template-columns: 1fr; gap: 2rem; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .miles, .origin { margin-left: 0; }
  .foot-inner { grid-template-columns: 1fr; }
  .picks li + li { border-left: 0; }
  .picks li + li a { padding-left: 0; }
}

@media (max-width: 620px) {
  .brand-name { display: none; }
  .mast-inner { gap: 0.25rem; min-height: 3.5rem; }
  .nav a { padding: 0 0.34rem; font-size: 0.9rem; }
  .nav a[aria-current="page"]::after { left: 0.34rem; right: 0.34rem; }
  .icon-btn { padding: 0 0.3rem; }
  .hero .topo { right: -45%; top: -5%; width: 140vw; opacity: 0.7; }
  .sec-head { grid-template-columns: 1fr; }
  .sec-head .more { justify-self: start; margin-top: 0.5rem; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav .next { grid-column: 1; text-align: left; }
  .comment.reply { margin-left: 1rem; }
  .miles li { grid-template-columns: 1fr; gap: 0; }
  .topo-s { width: 100vw; opacity: 0.55; }
  .timeline { grid-auto-columns: minmax(8rem, 42vw); }
}


/* ==========================================================================
   Interacción
   ========================================================================== */

/* Sonda topográfica de la portada */
.hero svg.topo { transition: transform 0.6s cubic-bezier(.2,.7,.2,1); }
.topo path { transition: stroke 0.25s ease, stroke-width 0.25s ease; }
.topo path.hot { stroke: var(--red); stroke-width: 1.8; }
.probe {
  position: absolute; left: 0; top: 0; z-index: 2; pointer-events: none;
  display: grid; gap: 0.1rem; padding: 0.45rem 0.6rem; margin: 1rem 0 0 1rem;
  background: var(--paper); border: 1px solid var(--ink); color: var(--ink);
  font-size: 0.7rem; line-height: 1.35; white-space: nowrap;
  opacity: 0; transition: opacity 0.2s ease;
}
.probe::before {
  content: ""; position: absolute; left: -1rem; top: -1rem; width: 0.9rem; height: 0.9rem;
  border-left: 1px solid var(--red); border-top: 1px solid var(--red);
}
.probe b { color: var(--red); font-weight: 500; }
.hero.probing .probe { opacity: 1; }
.hero.probing { cursor: crosshair; }
.hero-inner { pointer-events: none; }
.hero-inner a, .hero-inner p, .hero-inner h1 { pointer-events: auto; }

/* Línea de tiempo con pestañas */
.tl { display: grid; gap: 1.5rem; }
.timeline [role="tab"] { cursor: pointer; }
.timeline [role="tab"][aria-selected="true"] span:last-child { color: var(--red); }
.timeline [role="tab"][aria-selected="true"]::before { background: var(--red); border-color: var(--red); transform: scale(1.35); }
.timeline a::before { transition: transform 0.2s ease, background 0.2s ease; }
.tl-panels { min-height: 9.5rem; }
.tl-panel { max-width: 40rem; padding: 1.25rem 1.5rem; background: var(--paper-2); border-left: 2px solid var(--red); animation: rise 0.35s ease both; }
.tl-panel h3 { margin: 0 0 0.4rem; font-weight: 400; font-size: 1.6rem; line-height: 1.15; letter-spacing: -0.015em; }
.tl-panel p:not(.kicker) { margin: 0 0 0.5rem; color: var(--muted); }
.tl-panel .kicker { margin-bottom: 0.5rem; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Mapa de proyectos */
.view-toggle { display: inline-flex; gap: 0.5rem; margin-left: auto; }
.pmap { margin-top: 0.5rem; }
.pmap-scroll { overflow-x: auto; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); }
.pmap-canvas { position: relative; min-width: 46rem; aspect-ratio: 1200 / 560; }
.pmap-canvas .map-topo { position: absolute; inset: 0; width: 100%; height: 100%; }
.summits { list-style: none; margin: 0; padding: 0; position: absolute; inset: 0; }
.summit { position: absolute; transform: translate(-50%, -50%); }
.summit[hidden] { display: none; }
.summit > a { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; text-decoration: none; padding: 0.4rem; }
.summit i {
  width: 0; height: 0; border-left: 0.5rem solid transparent; border-right: 0.5rem solid transparent;
  border-bottom: 0.85rem solid var(--ink); position: relative; transition: transform 0.2s ease;
}
.summit[data-state="activo"] i { border-bottom-color: var(--green); }
.summit[data-state="cerrado"] i, .summit[data-state="vendido"] i { border-bottom-color: var(--muted); opacity: 0.55; }
.sname { font-size: 1rem; line-height: 1.1; white-space: nowrap; background: color-mix(in srgb, var(--paper) 80%, transparent); padding: 0 0.25rem; }
.summit > a:hover i, .summit > a:focus-visible i { transform: translateY(-3px) scale(1.25); border-bottom-color: var(--red); opacity: 1; }
.summit > a:hover .sname, .summit > a:focus-visible .sname { color: var(--red); }
.tip {
  position: absolute; left: 50%; bottom: calc(100% + 0.25rem); z-index: 3; width: 17rem;
  transform: translate(-50%, 4px); padding: 0.75rem 0.9rem; font-size: 0.92rem; line-height: 1.4;
  background: var(--paper); border: 1px solid var(--ink); color: var(--ink);
  opacity: 0; visibility: hidden; transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  pointer-events: none;
}
.tip .mono { display: block; color: var(--red); margin-bottom: 0.3rem; font-size: 0.68rem; }
.summit:hover .tip, .summit:focus-within .tip { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.summit:hover, .summit:focus-within { z-index: 4; }
.summit { transition: z-index 0s 0.2s; }
.summit:hover, .summit:focus-within { transition: none; }
.pmap-axis { position: absolute; left: 0; right: 0; bottom: 0; height: 2rem; border-top: 1px solid var(--line); }
.pmap-axis span { position: absolute; bottom: 0.45rem; transform: translateX(-50%); color: var(--muted); font-size: 0.68rem; }
.pmap-axis span::before { content: ""; position: absolute; left: 50%; top: -0.55rem; height: 0.4rem; border-left: 1px solid var(--muted); }
.pmap .note { margin-top: 0.75rem; }
.swipe { display: none; color: var(--red); }
@media (max-width: 760px) { .swipe { display: inline; } }
.pmap-axis .now { color: var(--red); white-space: nowrap; }
.tip-l .tip { left: 0; transform: translate(0, 4px); }
.tip-r .tip { left: auto; right: 0; transform: translate(0, 4px); }
.tip-below .tip { bottom: auto; top: calc(100% + 0.25rem); }
.summit.tip-l:hover .tip, .summit.tip-l:focus-within .tip, .summit.tip-r:hover .tip, .summit.tip-r:focus-within .tip { transform: none; }
.pmap-axis .now::before { display: none; }
.map-topo path { stroke-dasharray: none; stroke-dashoffset: 0; animation: none; }

/* Filtros del blog */
.histo button {
  flex: 1; display: grid; grid-template-rows: 1fr auto auto; height: 100%; padding: 0; border: 0;
  background: none; color: inherit; font: inherit; cursor: pointer; text-align: center;
}
.histo button:hover .bar, .histo button[aria-pressed="true"] .bar { background: var(--red); border-color: var(--red); }
.histo button[aria-pressed="true"] .yr { color: var(--red); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.filters-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; color: var(--ink); margin: 1rem 0 0; }
.filters-bar .clear { border: 1px solid var(--line); background: none; color: var(--red); border-radius: 999px; min-height: 2.25rem; padding: 0 0.9rem; font: inherit; cursor: pointer; }
.filters-bar .clear:hover { border-color: var(--red); }
kbd { font-family: var(--mono); font-size: 0.68rem; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 0.35rem; margin-left: 0.35rem; color: var(--muted); }
mark { background: color-mix(in srgb, var(--red) 22%, transparent); color: inherit; padding: 0 0.05em; border-radius: 2px; }

/* Progreso de lectura */
.progress { position: fixed; left: 0; right: 0; top: 0; z-index: 40; height: 2px; background: var(--red); transform-origin: 0 50%; transform: scaleX(0); }

/* Aparición suave */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.6s ease, transform 0.6s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 620px) {
  .view-toggle { margin-left: 0; }
  .tl-panel { padding: 1rem 1.1rem; }
}
@media (hover: none) { .probe { display: none; } }


/* ==========================================================================
   Proyectos actuales primero
   ========================================================================== */

.pcards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(22rem, 100%), 1fr)); gap: 0 2.5rem; }
.pcards[hidden] { display: none; }
.pcard { display: flex; flex-direction: column; gap: 0.6rem; padding: 1.6rem 0 1.8rem; border-top: 1px solid var(--ink); min-width: 0; }
.pc-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1rem; margin: 0; color: var(--muted); }
.pc-name { margin: 0.4rem 0 0; font-weight: 350; font-size: clamp(2.1rem, 3.6vw, 3rem); line-height: 1; letter-spacing: -0.03em; }
.pc-name a { text-decoration: none; }
.pc-name a:hover { color: var(--red); }
.pc-sum { margin: 0; color: var(--muted); font-size: 1.1rem; max-width: 30rem; }
.pc-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1.5rem; margin: auto 0 0; padding-top: 0.6rem; }
.pc-visit { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 2.75rem; color: var(--ink); text-decoration-color: var(--red); }
.pc-visit:hover { color: var(--red); }
.pcard:hover .pc-name a { color: var(--red); }

.archive-strip { padding-top: 3rem; }
.archive-strip a {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.2rem 2rem; align-items: center;
  padding: 1.4rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); text-decoration: none; color: var(--muted);
}
.archive-strip .kicker { grid-column: 1; margin: 0; color: var(--muted); }
.archive-strip .as-title { grid-column: 1; font-size: 1.35rem; color: var(--ink); }
.archive-strip .as-sub { grid-column: 1; font-size: 0.98rem; }
.archive-strip .arrow { grid-column: 2; grid-row: 1 / span 3; width: 1.4rem; height: 1.4rem; }
.archive-strip a:hover .as-title, .archive-strip a:hover .arrow { color: var(--red); }

.past { border-top: 1px solid var(--line); margin-top: 3rem; }
.past summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 1rem; padding: 1.2rem 0; cursor: pointer; list-style: none; color: var(--muted); }
.past summary::-webkit-details-marker { display: none; }
.past summary .kicker { width: 100%; margin: 0; color: var(--muted); }
.past summary strong { font-weight: 400; font-size: 1.3rem; color: var(--ink); }
.past summary strong::after { content: " +"; color: var(--red); }
.past[open] summary strong::after { content: " −"; }
.past .plist { opacity: 0.85; }

.now-strip { max-width: var(--read); margin: 3rem 0 0; padding: 1.4rem 1.5rem; background: var(--paper-2); border-top: 2px solid var(--green); }
.now-strip .kicker { color: var(--green); }
.now-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: 0.75rem 1.5rem; margin-bottom: 0.75rem; }
.now-links a { display: flex; flex-direction: column; text-decoration: none; }
.now-links strong { font-weight: 450; font-size: 1.15rem; }
.now-links span { font-family: var(--mono); font-size: 0.7rem; color: var(--muted); }
.now-links a:hover strong { color: var(--red); }

.historic a { color: var(--ink); margin-left: 0.25rem; text-decoration-color: var(--red); }
.historic { display: block; }
.historic .dot { display: inline-block; margin-right: 0.5rem; vertical-align: 0.05em; }
.today .camino { margin-top: 3rem; }
.today .tl { margin-bottom: 1rem; }


/* Vídeo de proyecto */
.pvideo { margin: 4rem 0 0 calc(15rem + 3rem); max-width: 48rem; }
.video-card {
  position: relative; display: flex; align-items: flex-end; gap: 1.25rem; overflow: hidden;
  aspect-ratio: 16 / 9; max-width: 100%; padding: 1.5rem; text-decoration: none;
  background: var(--paper-2); border: 1px solid var(--ink);
}
.video-card .topo-v { position: absolute; inset: 0; width: 100%; height: 100%; }
.vc-play { position: relative; display: grid; place-items: center; width: 4rem; height: 4rem; border-radius: 50%; background: var(--ink); color: var(--paper); flex: none; transition: background 0.2s, transform 0.2s; }
.vc-play .play { width: 1.6rem; height: 1.6rem; fill: currentColor; margin-left: 0.2rem; }
.vc-text { position: relative; display: flex; flex-direction: column; gap: 0.2rem; }
.vc-text .mono { color: var(--red); }
.vc-text strong { font-weight: 400; font-size: clamp(1.2rem, 2.2vw, 1.6rem); line-height: 1.2; letter-spacing: -0.01em; max-width: 26rem; }
.video-card:hover .vc-play { background: var(--red); transform: scale(1.06); }
.video-frame { position: relative; aspect-ratio: 16 / 9; max-width: 100%; border: 1px solid var(--ink); }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (max-width: 860px) { .pvideo { margin-left: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .topo path { stroke-dashoffset: 0; }
  html { scroll-behavior: auto; }
}

@media print {
  .mast, .foot, .topo, .post-nav, .cta { display: none; }
  body { background: #fff; color: #000; }
}
