/* ════════════════════════════════════════════════════════════════
   cruzromeromorales.com — PUERTAS · light rainbow-field edition
   One stylesheet, zero build. The ground is a lightly etched 3-D
   perspective grid washed in the Rainbow anchors (WebGL engine in
   app.js; CSS-layer flow when WebGL is missing; the body background
   below is the JS-off static ground). Doors are grown by app.js.
   ════════════════════════════════════════════════════════════════ */

/* ── CANONICAL: design-systems/TresPies/web-tokens.css · Context A ──
   Night Shift v4 :root, pasted verbatim per convention. Do not edit
   here; edit the canonical file and re-paste. (This page's site layer
   now keys off the Rainbow/Context-D tokens below; the Night Shift
   names remain available and untouched.) ──────────────────────────── */
:root {
  /* ── Night Shift · canonical ─────────────────────────────────── */
  --bg:      #0a0a0f;   /* page — near-black */
  --bg-alt:  #0c0c14;   /* alt band */
  --surface: #111118;   /* card / panel */
  --raised:  #16161f;   /* raised card, hover */
  --text:    #f0f0f5;   /* primary text */
  --muted:   #9a9aa8;   /* secondary text */
  --subtle:  #6e6e80;   /* captions / meta */
  --accent:  #fbbf24;   /* amber — primary accent, CTA, logo */

  --live:    #34d399;   /* positive / active */
  --gated:   #f59e0b;   /* gated / warning */
  --info:    #60a5fa;   /* informational */

  --border:        rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.16);

  /* Signature gradients */
  --grad:       linear-gradient(135deg, #fbbf24 0%, #ec4899 50%, #8b5cf6 100%);  /* amber→pink→purple: eyebrows, section tags, accents */
  --grad-soft:  linear-gradient(135deg, rgba(251,191,36,0.14), rgba(236,72,153,0.14) 50%, rgba(139,92,246,0.14));
  --grad-title: linear-gradient(120deg, #ffffff 0%, #f2f2f7 38%, #cbb6ff 100%);  /* white→lavender: hero titles */
  --grad-cta:   linear-gradient(135deg, #fcd34d 0%, #f472b6 55%, #8b5cf6 100%);  /* primary buttons (brighter than --grad) */

  --r-card:  16px;
  --r-chip:  999px;
  --r-badge: 6px;
  --wrap:    1120px;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", "Fira Mono", Consolas, monospace;

  /* ── Back-compat aliases (old blue/gold names → Night Shift) ─────
     Let existing site CSS keep resolving without a mass rename.
     Prefer the canonical names above in new work. Custom props resolve
     lazily, so same-block var() aliasing is safe. */
  --bg-deep:        #0a0a0f;
  --bg-card:        var(--surface);
  --bg-card-hover:  var(--raised);
  --bg-surface:     rgba(255,255,255,0.03);
  --border-hover:   var(--border-strong);
  --text-secondary: var(--muted);
  --text-muted:     var(--subtle);
  --gold:           var(--accent);
  --gold-soft:      #f59e0b;
  --gold-glow:      rgba(251,191,36,0.15);
  --green:          var(--live);
  --green-glow:     rgba(52,211,153,0.12);
  --purple:         #8b5cf6;   /* software accent → gradient purple */
  --purple-glow:    rgba(139,92,246,0.14);
  --rust:           #ec4899;   /* research accent → gradient pink */
  --rust-glow:      rgba(236,72,153,0.14);
  --radius:         16px;
  --radius-sm:      10px;
  --max-width:      1120px;
}

/* ── CANONICAL: design-systems/TresPies/rainbow-tokens.css · Context D ──
   Logo-derived Rainbow layer, pasted verbatim alongside (all --tp-*,
   zero collision with the block above). Do not edit here. ──────────── */
:root {
  /* ── SPECTRUM · warm sunrise arc ─────────────────────────────────
     (sampled element → measured rgb. The token hex is that sample,
      lightly tidied for harmony; brick & navy ship the exact sample.) */
  --tp-cream:    #FEDC82;   /* mountain snow · sun halo — rgb(254,220,130) */
  --tp-peach:    #FCB75E;   /* dawn dots            — rgb(252,183,94)  */
  --tp-sun:      #FBCE0B;   /* sun core gold        — rgb(253,209,11)  */
  --tp-amber:    #FBA80B;   /* amber glow           — rgb(253,165,11)  */
  --tp-orange:   #F98A0B;   /* sunburst rays        — rgb(249,141,4)   */
  --tp-ember:    #E7630B;   /* burnt-orange rays    — rgb(231,99,11)   */
  --tp-red:      #E73B1F;   /* red ray tips         — rgb(231,55,33)   */
  --tp-brick:    #A11D13;   /* deepest ray shadow   — rgb(161,29,19)   */

  /* ── SPECTRUM · cool land + sky arc ───────────────────────────── */
  --tp-lime:     #84BB2C;   /* chartreuse hills     — rgb(130,185,43)  */
  --tp-emerald:  #37BB8F;   /* emerald river/valley — rgb(55,187,143)  */
  --tp-teal:     #0B7D91;   /* pine teal            — rgb(11,121,143)  */
  --tp-cyan:     #0FA6E6;   /* bright sky cyan      — rgb(11,165,231)  */
  --tp-ocean:    #0E6690;   /* deep ocean/azure     — rgb(11,99,143)   */

  /* ── NEUTRAL SPINE · the dark that holds it together ──────────── */
  --tp-navy:     #0B0B21;   /* ring navy            — rgb(11,11,33)    */
  --tp-ink:      #0C2222;   /* teal-black silhouette— rgb(11,33,33)    */
  --tp-black:    #0A0A0A;   /* deepest outline      — rgb(11,11,11)    */
  --tp-paper:    #FAF7EF;   /* logo field cream (off-white background) */

  /* ── SOFT TINTS · badge / chip / highlight backgrounds ────────────
     Alpha-based so they sit on any surface, light or dark.
     Mirrors the Context-B pattern (--green-bg: rgba(...,.1)). */
  --tp-sun-soft:     rgba(251,206,11,0.15);
  --tp-orange-soft:  rgba(249,138,11,0.15);
  --tp-ember-soft:   rgba(231,99,11,0.15);
  --tp-red-soft:     rgba(231,59,31,0.15);
  --tp-lime-soft:    rgba(132,187,44,0.15);
  --tp-emerald-soft: rgba(55,187,143,0.15);
  --tp-teal-soft:    rgba(11,125,145,0.15);
  --tp-cyan-soft:    rgba(15,166,230,0.15);
  --tp-ocean-soft:   rgba(14,102,144,0.16);

  /* ── DEEP SHADES · text-on-light / hover / pressed ───────────────
     All 9 verified ≥4.5:1 (WCAG AA normal text) on --tp-paper (#FAF7EF),
     so each is safe as body text, a link, or a hover/pressed state. */
  --tp-sun-deep:     #8A6E08;   /* 4.55:1 on paper */
  --tp-orange-deep:  #A85E06;   /* 4.60:1 */
  --tp-ember-deep:   #B44E08;   /* 4.86:1 */
  --tp-red-deep:     #B22318;   /* 6.23:1 */
  --tp-lime-deep:    #567A1B;   /* 4.68:1 */
  --tp-emerald-deep: #22785E;   /* 5.01:1 */
  --tp-teal-deep:    #08596A;   /* 7.41:1 */
  --tp-cyan-deep:    #0B79A8;   /* 4.55:1 */
  --tp-ocean-deep:   #0A4C6C;   /* 8.67:1 */

  /* ── SIGNATURE GRADIENTS · rebuilt from the logo's own light ──── */
  /* The sun and its rays — warm radial burst. */
  --tp-grad-sunburst: radial-gradient(circle at 50% 62%,
        #FBCE0B 0%, #F98A0B 40%, #E7630B 68%, #E73B1F 100%);
  /* Full rainbow sweep — warm → cool, the whole medallion in one line. */
  --tp-grad-spectrum: linear-gradient(120deg,
        #FBCE0B 0%, #F98A0B 20%, #E73B1F 36%,
        #84BB2C 54%, #37BB8F 68%, #0FA6E6 86%, #0E6690 100%);
  /* Dawn — vertical sunrise wash (headers, hero bands). */
  --tp-grad-dawn: linear-gradient(180deg,
        #FEDC82 0%, #FBCE0B 28%, #F98A0B 66%, #E73B1F 100%);
  /* Sky — the cyan/teal/ocean zigzags. */
  --tp-grad-sky: linear-gradient(135deg, #0FA6E6 0%, #0B7D91 55%, #0E6690 100%);
  /* Land — the green hills into the water. */
  --tp-grad-land: linear-gradient(135deg, #84BB2C 0%, #37BB8F 55%, #0B7D91 100%);
  /* Soft spectrum wash — low-alpha, for section backgrounds behind text. */
  --tp-grad-wash: linear-gradient(120deg,
        rgba(251,206,11,0.12), rgba(231,59,31,0.10) 38%,
        rgba(55,187,143,0.10) 68%, rgba(15,166,230,0.12));

  /* ── CATEGORICAL DATA-VIZ SCALE · ordered for max distinctness ───
     Use in this order for series 1..8 (chart lines, bars, map layers).
     Chosen so adjacent series stay separable for most color-vision
     types; pair with shape/label encoding for full accessibility. */
  --tp-cat-1: #FBCE0B;   /* sun gold  */
  --tp-cat-2: #0E6690;   /* ocean     */
  --tp-cat-3: #E7630B;   /* ember     */
  --tp-cat-4: #37BB8F;   /* emerald   */
  --tp-cat-5: #E73B1F;   /* red       */
  --tp-cat-6: #0FA6E6;   /* cyan      */
  --tp-cat-7: #84BB2C;   /* lime      */
  --tp-cat-8: #6B4C8A;   /* (bridge — violet to close the wheel;
                            NOT in logo, added only for an 8th series) */

  /* ── ON-COLOR TEXT · which foreground each anchor needs ──────────
     Verified AA-normal (≥4.5:1) unless flagged. Pale/warm anchors take
     ink; dark anchors take paper. Helpers so components don't guess. */
  --tp-on-cream:    var(--tp-ink);     /* 12.44:1 */
  --tp-on-peach:    var(--tp-ink);     /*  9.53:1 */
  --tp-on-sun:      var(--tp-ink);     /* 10.99:1 */
  --tp-on-amber:    var(--tp-ink);     /*  8.45:1 */
  --tp-on-orange:   var(--tp-ink);     /*  6.84:1 */
  --tp-on-lime:     var(--tp-ink);     /*  7.20:1 */
  --tp-on-emerald:  var(--tp-ink);     /*  6.84:1 */
  --tp-on-cyan:     var(--tp-ink);     /*  6.01:1 */
  --tp-on-ember:    var(--tp-ink);     /*  4.88:1 (ink beats paper's 3.17) */
  --tp-on-brick:    var(--tp-paper);   /*  6.85:1 */
  --tp-on-teal:     var(--tp-paper);   /*  4.50:1 */
  --tp-on-ocean:    var(--tp-paper);   /*  5.90:1 */
  --tp-on-navy:     var(--tp-paper);   /* 18.7:1  */
  --tp-on-red:      var(--tp-ink);     /*  3.98:1 — LARGE-TEXT/UI ONLY;
                                          brand red can't reach AA-normal
                                          in any FG. Use red as a solid bg
                                          only for ≥18.66px bold / ≥24px,
                                          or use --tp-red-deep for body text. */
}

/* ── PUERTAS site layer · LIGHT REGIME ──────────────────────────────
   Ground = paper; text = ink; accent text = *-deep tokens ONLY.
   Cluster hue pairs: raw anchor for light/glow art, deep for text/UI. */
:root {
  --ground:     var(--tp-paper);
  --ink:        var(--tp-ink);        /* 15.5:1 on paper */
  --ink-muted:  #3E5350;              /*  7.7:1 — secondary text */
  --ink-subtle: #566663;              /*  5.6:1 — smallest mono labels */
  --line:        rgba(12,34,34,0.09);
  --line-strong: rgba(12,34,34,0.20);
  --scrim:        rgba(250,247,239,0.84);
  --scrim-strong: rgba(250,247,239,0.94);
  --shadow-soft: 0 8px 30px rgba(12,34,34,0.08);

  --c-infra:     var(--tp-sun);      --c-infra-deep:     var(--tp-sun-deep);
  --c-worker:    var(--tp-ember);    --c-worker-deep:    var(--tp-ember-deep);
  --c-equity:    var(--tp-red);      --c-equity-deep:    var(--tp-red-deep);
  --c-knowledge: var(--tp-cyan);     --c-knowledge-deep: var(--tp-cyan-deep);
  --c-games:     var(--tp-lime);     --c-games-deep:     var(--tp-lime-deep);
  --c-writing:   var(--tp-teal);     --c-writing-deep:   var(--tp-teal-deep);

  /* spectrum rebuilt from the AA-safe deep shades — for text on light */
  --grad-spectrum-deep: linear-gradient(120deg,
      #8A6E08 0%, #B44E08 18%, #B22318 36%,
      #567A1B 54%, #22785E 68%, #0B79A8 84%, #0A4C6C 100%);

  /* CTA — sunrise run of Rainbow anchors; ink text holds AA on every
     stop (on-cream 12.44 · on-sun 10.99 · on-amber 8.45 · on-orange 6.84) */
  --grad-cta-rainbow: linear-gradient(135deg,
      var(--tp-cream) 0%, var(--tp-sun) 45%, var(--tp-amber) 75%, var(--tp-orange) 100%);

  --door-scale: 1;      /* parámetros: door density  */
  --glow-mult:  1;      /* parámetros: glow intensity */
}

/* ── Reset + base ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font-sans);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  /* JS-off / no-WebGL static ground: paper + rainbow wash + flat etched
     grid (the engine's own fallback aesthetic — no navy anywhere). */
  background-color: var(--ground);
  background-image:
    repeating-linear-gradient(0deg,  rgba(12,34,34,.05) 0 1px, transparent 1px 56px),
    repeating-linear-gradient(90deg, rgba(12,34,34,.05) 0 1px, transparent 1px 56px),
    var(--tp-grad-wash);
}

/* the WebGL field — painted over the static ground when compiled */
#bg { position: fixed; inset: 0; z-index: -1; width: 100%; height: 100%; display: none; }
body.gl #bg { display: block; }

/* the CSS-layer flow — no-WebGL fallback (POC-B approach) */
#bgcss { display: none; position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
html.cssflow #bgcss { display: block; }
#bgcss .wash {
  position: absolute; inset: 0; display: block;
  background:
    radial-gradient(120% 90% at 18% 8%,  rgba(251,206,11,.16), transparent 60%),
    radial-gradient(130% 100% at 85% 30%, rgba(15,166,230,.14), transparent 62%),
    radial-gradient(120% 80% at 50% 105%, rgba(231,99,11,.12), transparent 58%);
  animation: washDrift 46s ease-in-out infinite alternate;
}
#bgcss .plane {
  position: absolute; left: -40%; right: -40%; top: 18%; bottom: -46%; display: block;
  transform: perspective(950px) rotateX(57deg) rotate(var(--grid-dir, 8deg));
  transform-origin: 50% 30%;
  background-image:
    repeating-linear-gradient(0deg,  rgba(12,34,34,.10) 0 1px, rgba(255,255,255,.5) 1px 2px, transparent 2px 56px),
    repeating-linear-gradient(90deg, rgba(12,34,34,.10) 0 1px, rgba(255,255,255,.5) 1px 2px, transparent 2px 56px);
  -webkit-mask-image: linear-gradient(180deg, transparent 0 6%, #000 30%);
  mask-image: linear-gradient(180deg, transparent 0 6%, #000 30%);
  animation: planeLoop 14s linear infinite;
  transition: transform 1.2s ease-out;
}
@keyframes planeLoop { to { background-position: 0 280px, 280px 0; } }
@keyframes washDrift { to { transform: translate3d(0, -3.5%, 0) scale(1.06); } }

::selection { background: rgba(251,206,11,0.45); color: var(--ink); }

a { color: inherit; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

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

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
section { padding: 96px 0; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 400;
  background: var(--ink); color: var(--tp-paper);
  padding: 10px 18px; font-weight: 700; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ── TresPies medallion corner mark (every page) ──────────────────── */
.corner-mark {
  position: fixed; right: 14px; bottom: 14px; z-index: 250;
  width: 36px; height: 36px; display: block;
  opacity: .88; transition: opacity .2s, transform .2s;
  filter: drop-shadow(0 2px 6px rgba(12,34,34,.25));
}
.corner-mark:hover { opacity: 1; transform: translateY(-1px); }
.corner-mark img { width: 100%; height: 100%; }

/* ── Nav (sticky header — the page header sticks; scoped so article
       <header class="post-head"> blocks never pin) ─────────────────── */
body > header { position: sticky; top: 0; z-index: 300; }
.site-nav {
  padding: 13px 0;
  background: rgba(250,247,239,0.88);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.brand-door { width: 26px; height: 34px; flex-shrink: 0; }
.brand-name { font-size: 15.5px; font-weight: 800; letter-spacing: -0.3px; color: var(--ink); }
.brand-name span { color: var(--tp-ember-deep); }
.nav-links { display: flex; align-items: center; gap: 24px; list-style: none; }
.nav-links a { text-decoration: none; font-size: 14px; font-weight: 600; color: var(--ink-muted); transition: color .2s; }
.nav-links a:hover { color: var(--ink); }
.lang { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .4px; color: var(--ink-subtle); }
.lang strong { color: var(--ink); font-weight: 700; }
.lang a { color: var(--ink-muted); text-decoration: none; border-bottom: 1px dotted var(--ink-subtle); padding-bottom: 1px; }
.lang a:hover { color: var(--tp-ember-deep); border-color: var(--tp-ember-deep); }
.btn-nav {
  padding: 8px 18px; border-radius: var(--radius-sm);
  background: var(--ink); color: var(--tp-paper) !important;
  font-weight: 700; font-size: 13px; text-decoration: none;
}
.btn-nav:hover { filter: brightness(1.25); }
.nav-toggle { display: none; font-size: 22px; line-height: 1; padding: 4px 8px; color: var(--ink); }

/* ── Hero ─────────────────────────────────────────────────────────── */
/* The hero fills the screen under the sticky header and centres its own
   contents, so the door lands mid-viewport on load instead of sitting under a
   band of empty paper. svh (not vh) keeps it honest on mobile browsers whose
   toolbars come and go. */
.hero {
  padding: 32px 0;
  overflow: hidden;
  position: relative;
  min-height: calc(100svh - var(--header-h, 61px));
  display: flex;
  align-items: center;
}
.hero > .wrap { width: 100%; }
.hero-grid {
  display: grid; grid-template-columns: 1fr 1.12fr;
  gap: 48px; align-items: center; position: relative;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--ink-muted);
  margin-bottom: 22px;
  text-shadow: 0 0 10px var(--tp-paper), 0 0 22px var(--tp-paper);
}
.eyebrow .spark {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--tp-grad-spectrum);
  animation: sparkPulse 2.6s ease-in-out infinite;
}
@keyframes sparkPulse { 0%,100% { opacity: 1; } 50% { opacity: .45; } }
.hero h1 {
  font-size: clamp(40px, 5.6vw, 66px); font-weight: 900;
  line-height: 1.02; letter-spacing: -2.2px; margin-bottom: 18px;
  color: var(--ink);
  text-shadow: 0 0 14px var(--tp-paper), 0 0 34px var(--tp-paper);
}
.hero h1 .apellido {
  background: var(--grad-spectrum-deep);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  text-shadow: none;
}
.thesis {
  font-size: 19px; line-height: 1.55; color: var(--ink-muted);
  max-width: 30ch; margin-bottom: 30px;
  text-shadow: 0 0 12px var(--tp-paper), 0 0 26px var(--tp-paper);
}
.thesis strong { color: var(--ink); font-weight: 700; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 24px; border-radius: var(--radius-sm);
  font-size: 14.5px; font-weight: 700; text-decoration: none;
  transition: transform .2s, box-shadow .2s, filter .2s;
}
.btn-primary { background: var(--grad-cta-rainbow); color: var(--ink); }
.btn-primary:hover { filter: brightness(1.04); transform: translateY(-1px); box-shadow: 0 10px 26px rgba(231,99,11,0.28); }
.btn-ghost { border: 1px solid var(--line-strong); color: var(--ink-muted); background: var(--scrim); }
.btn-ghost:hover { color: var(--ink); border-color: rgba(12,34,34,.4); }

/* the hero doorway — engraved frame, saturated light in the opening.
   Enlarged ~2x (operator ask) so the face in the arch reads clearly. */
.hero-door { display: flex; justify-content: center; }
.hero-door a { display: block; max-width: 450px; width: 100%; text-decoration: none; }
.hero-door svg { display: block; width: 100%; height: auto; }
/* The leaf hinges LEFT, so the ajar gap falls on the right — the side his
   face is on. It also rests further open (.36) than before: a door you can
   actually see someone through beats a door that's merely ajar. */
.hero-leaf {
  transform-box: fill-box; transform-origin: left center;
  transform: scaleX(.36) skewY(-5deg);
  transition: transform .28s ease-out;
}
.hero-door a:hover .hero-leaf,
.hero-door a:focus-visible .hero-leaf { transform: scaleX(.08) skewY(-8deg); }
.hero-door .spill { animation: spill 4.2s ease-in-out infinite; }
@keyframes spill {
  0%, 100% { opacity: calc(.75 * var(--glow-mult)); }
  50%      { opacity: calc(.4  * var(--glow-mult)); }
}
.hero-door-cap {
  margin-top: 12px; text-align: center;
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 600;
  letter-spacing: 1.4px; text-transform: uppercase; color: var(--ink-subtle);
  transition: color .2s;
}
.hero-door a:hover .hero-door-cap { color: var(--tp-ember-deep); }

/* ── Flagship triptych ────────────────────────────────────────────── */
.flagship-band { padding: 8px 0 44px; text-align: center; }
.flagship-line {
  max-width: 52ch; margin: 0 auto 14px;
  font-size: 15.5px; line-height: 1.6; color: var(--ink-muted);
  text-shadow: 0 0 10px var(--tp-paper), 0 0 20px var(--tp-paper);
}
.flagship-band .flagship-tag { display: inline-block; margin-bottom: 16px; }
.flagship-row {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: center;
  gap: 8px 48px;
}
.door-item[data-tier="flagship"] .door-name { font-size: 16.5px; letter-spacing: -0.2px; }
.door-item[data-tier="flagship"] .door-meta { font-size: 11px; margin-top: 3px; }
.door-item[data-tier="flagship"] .door-cap { padding-bottom: 14px; }
.door-item[data-tier="flagship"] .door-btn { border-radius: 8px; }
.flagship-fallback ul { list-style: none; display: flex; justify-content: center; gap: 28px; flex-wrap: wrap; }
.flagship-fallback li { font-size: 15px; font-weight: 600; padding-left: 14px; border-left: 3px solid var(--hue, var(--tp-ember)); }
.flagship-fallback a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line-strong); }
.flagship-fallback a:hover { border-color: var(--hue-deep, var(--tp-ember-deep)); }
.flagship-fallback .fb-status { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .8px; text-transform: uppercase; color: var(--ink-subtle); margin-left: 6px; }

/* ── Stats strip ──────────────────────────────────────────────────── */
.stats {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 52px;
  padding: 30px 24px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: rgba(250,247,239,0.6);
}
.stat { text-align: center; }
.stat-num {
  display: block; font-family: var(--font-mono);
  font-size: 25px; font-weight: 700; line-height: 1.15; color: var(--tp-ember-deep);
}
.stat-label {
  font-size: 10.5px; font-weight: 600; letter-spacing: 1.3px;
  text-transform: uppercase; color: var(--ink-subtle); margin-top: 4px; display: block;
  max-width: 24ch;
}
/* One honest footnote under the stat band carries the "on a team, pre-firm"
   attribution, so the two housing tiles stay short like the others. */
.stats-note {
  font-size: 11px; color: var(--ink-subtle); text-align: center;
  max-width: 62ch; margin: 10px auto 0; line-height: 1.4; letter-spacing: .2px;
}

/* ── Section headers ──────────────────────────────────────────────── */
.sec-head { margin-bottom: 44px; max-width: 640px; }
.sec-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.sec-tag {
  font-family: var(--font-mono); font-size: 12px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  margin-bottom: 12px; display: inline-block;
  background: var(--grad-spectrum-deep);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.sec-head h2 {
  font-size: clamp(27px, 3.4vw, 40px); font-weight: 800; letter-spacing: -1px;
  line-height: 1.12; margin-bottom: 12px; color: var(--ink);
  text-shadow: 0 0 12px var(--tp-paper), 0 0 26px var(--tp-paper);
}
.sec-head p { color: var(--ink-muted); font-size: 16px; text-shadow: 0 0 10px var(--tp-paper), 0 0 20px var(--tp-paper); }

/* ── The doors ────────────────────────────────────────────────────── */
#doors { padding-bottom: 110px; }
.door-controls {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  justify-content: center; margin-bottom: 14px;
}
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 15px; border-radius: var(--r-chip);
  border: 1px solid var(--line-strong); background: var(--scrim);
  color: var(--ink-muted); font-size: 13px; font-weight: 600;
  transition: border-color .2s, color .2s, background .2s;
}
.chip .chip-dot {
  width: 8px; height: 12px; border-radius: 2px 2px 1px 1px;
  background: var(--hue, var(--tp-ember));
  box-shadow: 0 0 8px 0 var(--hue, var(--tp-ember));
  opacity: .9;
}
.chip:hover { border-color: rgba(12,34,34,.4); color: var(--ink); }
.chip[aria-pressed="true"] {
  border-color: var(--hue-deep, var(--tp-ember-deep));
  color: var(--ink); background: rgba(12,34,34,0.05);
}
.chip:focus-visible { outline-color: var(--hue-deep, var(--tp-ocean-deep)); }
.chip .count { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-subtle); font-weight: 600; }

.legend {
  display: flex; flex-wrap: wrap; gap: 8px 26px; justify-content: center;
  margin-bottom: 42px;
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 600; letter-spacing: .6px;
  color: var(--ink-subtle);
}
.legend li { display: inline-flex; align-items: center; gap: 8px; list-style: none; }
.legend svg { width: 13px; height: 19px; }

/* cluster map — the six clusters as a hub-and-spoke constellation, on a
   paper card (same idiom as the door cards) so its ink/deep text stays AA
   over the moving field. Scales to fit; body never scrolls horizontally. */
.cluster-map {
  max-width: 860px; margin: 8px auto 46px; padding: 22px 22px 18px;
  background: var(--scrim-strong);
  backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px);
  border: 1px solid var(--line-strong); border-radius: 16px;
  box-shadow: 0 14px 44px rgba(12,34,34,.10);
}
.cluster-map svg { display: block; width: 100%; height: auto; }
.cluster-map figcaption {
  text-align: center; font-family: var(--font-mono);
  font-size: 11.5px; letter-spacing: .4px; color: var(--ink-subtle);
  margin-top: 14px; padding: 0 8px;
}
@media (max-width: 560px) { .cluster-map { padding: 16px 12px 14px; } }

/* the street itself — doors cast concentrated color on the light field */
.field {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: center;
  gap: 4px 26px; min-height: 300px;
  padding: 12px 6px 0;
}
.door-item {
  position: relative;
  width: calc(var(--w, 140px) * var(--door-scale));
  transition: width .3s ease-out;
}
.door-item.is-hidden { display: none; }
.door-btn { display: block; width: 100%; text-align: center; border-radius: 6px; }
.door-btn:focus-visible { outline: 2px solid var(--hue-deep, var(--tp-ocean-deep)); outline-offset: 4px; }
.door-btn svg { display: block; width: 100%; height: auto; overflow: visible; }

/* leaf mechanics — unchanged; geometry is grown in app.js */
.leaf {
  transform-box: fill-box;
  transition: transform .26s ease-out;
}
.leaf[data-hinge="left"]  { transform-origin: left center; }
.leaf[data-hinge="right"] { transform-origin: right center; }
/* Openness tracks availability: still building = shut (you can't come in yet),
   shipped = ajar, live = swung open. Mirrors the map in app.js. */
.door-item[data-status="wip"] .leaf { transform: none; }
.door-item[data-status="shipped"][data-hinge="left"]  .leaf { transform: scaleX(.8) skewY(-2.5deg); }
.door-item[data-status="shipped"][data-hinge="right"] .leaf { transform: scaleX(.8) skewY(2.5deg); }
.door-item[data-status="live"][data-hinge="left"]  .leaf { transform: scaleX(.3) skewY(-6deg); }
.door-item[data-status="live"][data-hinge="right"] .leaf { transform: scaleX(.3) skewY(6deg); }

.door-btn:hover .leaf[data-hinge="left"], .door-btn:focus-visible .leaf[data-hinge="left"],
.door-item.open .leaf[data-hinge="left"]  { transform: scaleX(.16) skewY(-7deg) !important; }
.door-btn:hover .leaf[data-hinge="right"], .door-btn:focus-visible .leaf[data-hinge="right"],
.door-item.open .leaf[data-hinge="right"] { transform: scaleX(.16) skewY(7deg) !important; }

.glow { opacity: calc(var(--o, .5) * var(--glow-mult)); }
.pulse { animation: doorPulse 3.8s ease-in-out infinite; animation-delay: var(--pd, 0s); }
@keyframes doorPulse {
  0%, 100% { opacity: calc(var(--o, .5) * var(--glow-mult)); }
  50%      { opacity: calc(var(--o, .5) * var(--glow-mult) * .38); }
}

.door-cap { margin-top: 2px; padding-bottom: 26px; }
.door-name { display: block; font-size: 13.5px; font-weight: 700; letter-spacing: -0.1px; color: var(--ink);
  text-shadow: 0 0 8px var(--tp-paper), 0 0 16px var(--tp-paper); }
.door-meta {
  display: block; margin-top: 2px;
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 600;
  letter-spacing: 1px; text-transform: uppercase; color: var(--hue-deep, var(--ink-subtle));
  text-shadow: 0 0 8px var(--tp-paper);
}

/* project card — opens out of the door */
.door-card {
  position: absolute; top: calc(100% - 18px); left: 50%;
  transform: translateX(calc(-50% + var(--shift, 0px)));
  width: min(310px, 88vw); z-index: 40;
  background: var(--scrim-strong);
  backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px);
  border: 1px solid var(--line-strong);
  border-top: 2px solid var(--hue);
  border-radius: 12px; padding: 18px 18px 16px; text-align: left;
  box-shadow: 0 14px 40px rgba(12,34,34,.16), 0 0 30px -8px var(--hue);
  animation: cardIn .22s ease-out;
}
.door-card[hidden] { display: none; }
@keyframes cardIn { from { opacity: 0; translate: 0 8px; } to { opacity: 1; translate: 0 0; } }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; padding-right: 30px; }
.card-cluster {
  font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  letter-spacing: 1.1px; text-transform: uppercase; color: var(--hue-deep, var(--ink-muted));
  display: inline-flex; align-items: center; gap: 7px;
}
.card-cluster i { width: 7px; height: 11px; border-radius: 2px 2px 1px 1px; background: var(--hue); box-shadow: 0 0 7px 0 var(--hue); }
.card-status {
  font-family: var(--font-mono); font-size: 10px; font-weight: 600; letter-spacing: 1.1px;
  text-transform: uppercase; color: var(--ink-subtle);
}
.door-card h3 { font-size: 17px; font-weight: 800; letter-spacing: -0.3px; margin-bottom: 6px; color: var(--ink); }
.door-card p { font-size: 13.5px; line-height: 1.55; color: var(--ink-muted); margin-bottom: 12px; }
.card-links { display: flex; flex-direction: column; gap: 6px; }
.card-link {
  display: inline-flex; align-items: center; gap: 7px; align-self: flex-start;
  font-size: 13px; font-weight: 700; color: var(--tp-ocean-deep);
  text-decoration: none; border-bottom: 1px solid rgba(10,76,108,.35);
}
.card-link:hover { border-color: var(--tp-ocean-deep); }
.card-link .arrow { transition: translate .2s; }
.card-link:hover .arrow { translate: 3px 0; }
.card-soon { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .8px; color: var(--ink-subtle); }
.card-close {
  position: absolute; top: 8px; right: 8px; width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-muted); font-size: 15px; border-radius: 6px;
  background: rgba(12,34,34,.06);
}
.card-close:hover { color: var(--ink); background: rgba(12,34,34,.12); }

/* no-JS fallback list (real markup; app.js replaces it with the field) */
.doors-fallback { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px 32px; }
.doors-fallback h3 {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 1.5px;
  text-transform: uppercase; font-weight: 700; margin-bottom: 10px; color: var(--ink);
  padding-left: 14px; border-left: 3px solid var(--hue, var(--tp-ember));
}
.doors-fallback ul { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.doors-fallback li { font-size: 14px; color: var(--ink-muted); }
.doors-fallback a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line-strong); }
.doors-fallback a:hover { border-color: var(--hue-deep, var(--tp-ember-deep)); }
.doors-fallback .fb-status { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .8px; text-transform: uppercase; color: var(--ink-subtle); }

/* ── Now building ─────────────────────────────────────────────────── */
#building {
  background: rgba(250,247,239,0.66);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.wip-list { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 28px; }
.wip-item {
  display: flex; align-items: center; gap: 18px;
  padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--scrim);
  box-shadow: var(--shadow-soft);
  transition: border-color .2s, background .2s;
}
.wip-item:hover { border-color: var(--line-strong); background: var(--scrim-strong); }
.wip-door { width: 40px; flex-shrink: 0; }
.wip-door svg { display: block; width: 100%; height: auto; overflow: visible; }
.wip-copy { flex: 1; min-width: 0; }
.wip-name { font-size: 15px; font-weight: 700; letter-spacing: -0.2px; color: var(--ink); display: flex; align-items: center; gap: 10px; }
.wip-name a { text-decoration: none; border-bottom: 1px solid var(--line-strong); }
.wip-name a:hover { border-color: var(--hue-deep, var(--tp-ember-deep)); }
.wip-note { font-size: 13px; color: var(--ink-muted); margin-top: 2px; }
.wip-pulse {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  background: var(--hue); box-shadow: 0 0 10px 1px var(--hue);
  animation: wipPulse 2.2s ease-in-out infinite; animation-delay: var(--pd, 0s);
}
@keyframes wipPulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

/* ── Writing ──────────────────────────────────────────────────────── */
.writing-band { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 44px; align-items: start; }
.writing-lead p { color: var(--ink-muted); font-size: 16px; margin-bottom: 18px; max-width: 44ch;
  text-shadow: 0 0 10px var(--tp-paper), 0 0 20px var(--tp-paper); }
.writing-lead p strong { color: var(--ink); font-weight: 700; }
.all-writing {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14.5px; font-weight: 700; color: var(--tp-teal-deep);
  text-decoration: none; border-bottom: 1px solid transparent; padding-bottom: 1px;
}
.all-writing:hover { border-color: var(--tp-teal-deep); }
.post-list { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.post-card {
  display: block; padding: 20px 22px;
  background: var(--scrim); border: 1px solid var(--line); border-radius: 12px;
  border-left: 3px solid var(--tp-teal);
  box-shadow: var(--shadow-soft);
  text-decoration: none; transition: border-color .2s, background .2s, transform .2s;
}
.post-card:hover { border-color: var(--line-strong); border-left-color: var(--tp-teal-deep); background: var(--scrim-strong); transform: translateY(-2px); }
.post-date { font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--ink-subtle); }
.post-card h3 { font-size: 17px; font-weight: 800; letter-spacing: -0.3px; margin: 6px 0 6px; color: var(--ink); }
.post-card p { font-size: 13.5px; line-height: 1.55; color: var(--ink-muted); }
.post-tags { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.post-tag {
  font-family: var(--font-mono); font-size: 10px; font-weight: 600; letter-spacing: .8px;
  padding: 3px 9px; border-radius: var(--r-chip);
  background: var(--tp-teal-soft); color: var(--tp-teal-deep);
}
.post-card.ghost { border-style: dashed; opacity: .8; }
.post-card.ghost h3 { color: var(--ink-muted); }

/* ── What I bring ─────────────────────────────────────────────────── */
.bring-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.bring-group {
  padding: 22px 20px;
  background: var(--scrim); border: 1px solid var(--line); border-radius: 12px;
  border-top: 2px solid var(--hue, var(--tp-ember));
  box-shadow: var(--shadow-soft);
}
.bring-label {
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase; color: var(--hue-deep, var(--ink));
  margin-bottom: 14px;
}
.bring-list { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.bring-list li { font-size: 13.5px; line-height: 1.5; color: var(--ink-muted); padding-left: 16px; position: relative; }
.bring-list li::before {
  content: ''; position: absolute; left: 0; top: 7px;
  width: 6px; height: 9px; border-radius: 2px 2px 1px 1px;
  background: var(--hue, var(--tp-ember)); opacity: .85;
}
.bring-list strong { color: var(--ink); font-weight: 700; }

/* ── Ambitions ────────────────────────────────────────────────────── */
#ambitions {
  background: rgba(250,247,239,0.66);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.amb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.amb-lead p { font-size: 16.5px; line-height: 1.7; color: var(--ink-muted); margin-bottom: 16px; max-width: 46ch; }
.amb-lead p strong { color: var(--ink); font-weight: 700; }
.amb-list { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.amb-item {
  display: flex; gap: 16px; padding: 18px 20px;
  background: var(--scrim); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-soft);
}
.amb-num { font-family: var(--font-mono); font-size: 13px; font-weight: 700; color: var(--tp-ember-deep); padding-top: 2px; }
.amb-item p { font-size: 14.5px; line-height: 1.6; color: var(--ink-muted); }
.amb-item strong { color: var(--ink); font-weight: 700; }

/* ── Book ─────────────────────────────────────────────────────────── */
.book-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 760px; margin: 0 auto; }
.book-card {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: flex-start;
  padding: 28px 26px;
  background: var(--scrim); border: 1px solid var(--line); border-radius: var(--r-card);
  box-shadow: var(--shadow-soft);
  text-decoration: none; color: var(--ink);
  transition: border-color .25s, transform .25s, box-shadow .25s;
}
.book-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--hue); transition: height .25s;
}
.book-card:hover { border-color: var(--line-strong); transform: translateY(-3px); box-shadow: 0 14px 44px rgba(12,34,34,0.14); }
.book-card:hover::before { height: 3px; }
.book-ring { width: 62px; height: 62px; margin-bottom: 16px; }
.book-min {
  font-family: var(--font-mono); font-size: 12px; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase; color: var(--hue-deep, var(--tp-ember-deep)); margin-bottom: 6px;
}
.book-card h3 { font-size: 19px; font-weight: 800; letter-spacing: -0.3px; margin-bottom: 8px; }
.book-card p { font-size: 14px; line-height: 1.6; color: var(--ink-muted); margin-bottom: 18px; flex-grow: 1; }
.book-link { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 700; color: var(--tp-ocean-deep); margin-top: auto; }
.book-card:hover .book-link { gap: 11px; }
.book-note { text-align: center; font-size: 13.5px; color: var(--ink-subtle); margin-top: 26px; }
.book-note a { color: var(--ink-muted); }
.book-note a:hover { color: var(--tp-ember-deep); }

/* ── Footer + parámetros ──────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(250,247,239,0.7);
  padding: 34px 0 40px; font-size: 13px; color: var(--ink-subtle);
}
.footer-top {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 18px; margin-bottom: 14px;
}
.footer-links { display: flex; gap: 20px; list-style: none; flex-wrap: wrap; align-items: center; }
.footer-links a { color: var(--ink-muted); text-decoration: none; }
.footer-links a:hover { color: var(--ink); }
.footer-mark { display: inline-flex; align-items: center; gap: 9px; }
.footer-mark img { width: 26px; height: auto; }
.footer-note { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .4px; }
.footer-note a { color: var(--ink-muted); }

.params { margin-top: 22px; border-top: 1px dashed var(--line-strong); padding-top: 16px; }
.params summary {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: 1.4px;
  text-transform: uppercase; color: var(--ink-muted); cursor: pointer;
  list-style: none; padding: 6px 4px; border-radius: 6px;
}
.params summary::-webkit-details-marker { display: none; }
.params summary::before { content: '›'; font-size: 15px; transition: rotate .2s; color: var(--tp-ember-deep); }
.params[open] summary::before { rotate: 90deg; }
.params summary:hover { color: var(--ink); }
.params-panel {
  margin-top: 14px; padding: 18px 20px;
  display: flex; flex-wrap: wrap; gap: 18px 34px; align-items: center;
  background: var(--scrim-strong); border: 1px solid var(--line-strong); border-radius: 12px;
  max-width: 780px;
}
.param-row { display: flex; align-items: center; gap: 12px; }
.param-row label {
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 600; letter-spacing: 1px;
  text-transform: uppercase; color: var(--ink-muted); white-space: nowrap;
}
.param-row input[type="range"] { accent-color: var(--tp-ember-deep); width: 120px; }
.param-row input[type="number"] {
  width: 74px; padding: 5px 8px; border-radius: 6px;
  background: var(--tp-paper); border: 1px solid var(--line-strong);
  color: var(--ink); font-family: var(--font-mono); font-size: 12.5px;
}
.param-row input[type="checkbox"] { accent-color: var(--tp-ember-deep); width: 15px; height: 15px; }
.param-btn {
  padding: 6px 14px; border-radius: 7px; border: 1px solid var(--line-strong);
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 600; letter-spacing: .8px;
  text-transform: uppercase; color: var(--ink-muted);
  transition: color .2s, border-color .2s;
}
.param-btn:hover { color: var(--ink); border-color: var(--tp-ember-deep); }
.params-hint { flex-basis: 100%; font-size: 11.5px; font-family: var(--font-mono); color: var(--ink-subtle); letter-spacing: .3px; }

/* ── Blog (index + article template) ──────────────────────────────── */
.blog-mast {
  padding: 16px 0; border-bottom: 1px solid var(--line);
  background: rgba(250,247,239,0.9);
}
.blog-mast .wrap { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.mast-home { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 14.5px; color: var(--ink); }
.mast-home svg { width: 18px; height: 25px; }
.mast-home:hover .mast-arrow { translate: -3px 0; }
.mast-arrow { color: var(--ink-subtle); transition: translate .2s; }
.mast-label { font-family: var(--font-mono); font-size: 11.5px; font-weight: 600; letter-spacing: 1.6px; text-transform: uppercase; color: var(--ink-subtle); }

.blog-head { padding: 64px 0 40px; }
.blog-head h1 {
  font-size: clamp(32px, 4.5vw, 48px); font-weight: 900; letter-spacing: -1.4px; margin-bottom: 12px;
  color: var(--ink); text-shadow: 0 0 14px var(--tp-paper), 0 0 30px var(--tp-paper);
}
.blog-head p { color: var(--ink-muted); max-width: 56ch; }
.blog-head p a { color: var(--tp-ember-deep); }
.blog-list-wrap { padding-bottom: 90px; }
.blog-list-wrap .post-list { max-width: 720px; }

/* article page */
.post-page { padding: 56px 0 90px; }
.post-article {
  max-width: 72ch; margin: 0 auto;
  background: var(--scrim); border: 1px solid var(--line); border-radius: 16px;
  padding: clamp(24px, 5vw, 48px);
  box-shadow: var(--shadow-soft);
}
.post-head { margin-bottom: 36px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.post-head .post-date { margin-bottom: 12px; display: inline-block; }
.post-head h1 { font-size: clamp(30px, 4.2vw, 44px); font-weight: 900; letter-spacing: -1.2px; line-height: 1.12; margin-bottom: 14px; color: var(--ink); }
.post-summary { font-size: 17.5px; line-height: 1.6; color: var(--ink-muted); }
.post-body > * + * { margin-top: 20px; }
.post-body p { font-size: 16.5px; line-height: 1.75; color: #22403D; }
.post-body strong { color: var(--ink); }
.post-body h2 {
  font-size: 23px; font-weight: 800; letter-spacing: -0.5px; color: var(--ink);
  margin-top: 40px; padding-top: 8px;
}
.post-body h2::before {
  content: ''; display: block; width: 34px; height: 3px; border-radius: 2px;
  background: var(--tp-grad-spectrum); margin-bottom: 14px;
}
.post-body a { color: var(--tp-ocean-deep); text-decoration: none; border-bottom: 1px solid rgba(10,76,108,.35); }
.post-body a:hover { border-color: var(--tp-ocean-deep); }
.post-body ul, .post-body ol { padding-left: 24px; color: #22403D; font-size: 16px; line-height: 1.7; }
.post-body li + li { margin-top: 8px; }
.post-body blockquote {
  padding: 4px 0 4px 22px; border-left: 3px solid var(--tp-teal);
  color: var(--ink-muted); font-size: 16.5px; font-style: italic;
}
.post-body pre {
  background: #F1EDE0; border: 1px solid var(--line-strong);
  border-radius: 10px; padding: 18px 20px; overflow-x: auto;
  font-family: var(--font-mono); font-size: 13px; line-height: 1.65;
  color: var(--ink);
}
.post-body code { font-family: var(--font-mono); font-size: .92em; }
.post-body p code, .post-body li code {
  background: rgba(12,34,34,.06); border: 1px solid var(--line);
  border-radius: 4px; padding: 1.5px 6px; color: var(--tp-ember-deep);
}
.post-body pre .c  { color: var(--ink-subtle); }          /* comment  */
.post-body pre .k  { color: var(--tp-cyan-deep); }        /* key      */
.post-body pre .s  { color: var(--tp-ember-deep); }       /* string   */
.post-body pre .n  { color: var(--tp-emerald-deep); }     /* number   */
.post-foot {
  margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.post-foot a {
  font-size: 14px; font-weight: 700; color: var(--tp-ocean-deep);
  text-decoration: none; display: inline-flex; align-items: center; gap: 8px;
}
.post-foot a:hover { color: var(--ink); }

/* ── Scroll reveals (JS-gated: without .js everything is visible) ── */
html.js .reveal {
  opacity: 0; transform: translateY(18px);
  transition: opacity .65s ease-out, transform .65s ease-out;
  transition-delay: var(--d, 0ms);
}
html.js .reveal.in { opacity: 1; transform: none; }

/* JS-only chrome hidden when JS is off */
html:not(.js) .door-controls,
html:not(.js) .legend,
html:not(.js) .params { display: none; }

/* ── Motion off: reduced-motion preference OR the parámetros toggle ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html.js .reveal { opacity: 1; transform: none; }
  .pulse, .wip-pulse, .hero-door .spill, .eyebrow .spark { animation: none !important; opacity: calc(var(--o, .8) * var(--glow-mult)); }
}
html.no-motion { scroll-behavior: auto; }
html.no-motion *, html.no-motion *::before, html.no-motion *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
html.no-motion .reveal { opacity: 1 !important; transform: none !important; }
html.no-motion .pulse, html.no-motion .wip-pulse,
html.no-motion .hero-door .spill, html.no-motion .eyebrow .spark { animation: none !important; opacity: calc(var(--o, .8) * var(--glow-mult)); }

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; text-align: center; }
  .thesis { margin-left: auto; margin-right: auto; }
  .hero-ctas { justify-content: center; }
  .hero-door { order: -1; }
  .hero-door a { max-width: 315px; }
  .writing-band, .amb-grid { grid-template-columns: 1fr; gap: 30px; }
  .bring-grid { grid-template-columns: 1fr 1fr; }
  .wip-list { grid-template-columns: 1fr; }
  .doors-fallback { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  section { padding: 68px 0; }
  .nav-links {
    display: none;
  }
  .nav-links.open {
    display: flex; flex-direction: column; align-items: flex-start;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--tp-paper); border-bottom: 1px solid var(--line-strong);
    box-shadow: 0 14px 30px rgba(12,34,34,.12);
    padding: 18px 24px; gap: 15px;
  }
  .nav-toggle { display: block; }
  .stats { gap: 18px 30px; }
  .stat-num { font-size: 21px; }
}

/* the hallway — mobile is a lit corridor, not a shrunken grid */
@media (max-width: 720px) {
  .field {
    flex-direction: column; align-items: center; flex-wrap: nowrap;
    gap: 30px; padding: 34px 0 10px; position: relative;
  }
  /* corridor walls: two faint engraved rails */
  .field::before, .field::after {
    content: ''; position: absolute; top: 0; bottom: 0; width: 1px;
    background: linear-gradient(180deg, transparent, var(--line-strong) 30%, var(--line-strong) 70%, transparent);
  }
  .field::before { left: 7%; }
  .field::after { right: 7%; }
  .door-item { width: min(66vw, 270px) !important; }
  .door-card {
    position: static; transform: none; width: 100%; margin: 6px auto 0;
  }
  /* flagships stack in order right after the face door */
  .flagship-band { padding-bottom: 24px; }
  .flagship-row { flex-direction: column; align-items: center; gap: 30px; }
  .door-item[data-tier="flagship"] { width: min(76vw, 310px) !important; }
  .book-grid, .bring-grid, .doors-fallback { grid-template-columns: 1fr; }
  .footer-top { flex-direction: column; align-items: flex-start; }
  .corner-mark { width: 30px; height: 30px; right: 10px; bottom: 10px; }
}
