/* ────────────────────────────────────────────────────────────
   Investment tile — logo + name on top row, description below
   ──────────────────────────────────────────────────────────── */
.investment .company-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: inherit;
  margin-bottom: 0.65rem;
}
.investment .company-link .logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--rule);
  padding: 4px;
  object-fit: contain;
  flex-shrink: 0;
  box-sizing: border-box;
}
.investment .company-link .company {
  font-size: 1.15rem;
  font-variation-settings: "opsz" 18, "wdth" 100, "wght" 600;
  line-height: 1.2;
  letter-spacing: -0.012em;
  color: var(--ink);
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  transition: color .2s ease;
}
.investment .company-link .ext-arrow {
  font-size: 0.85rem;
  color: var(--faint);
  flex-shrink: 0;
  transition: color .2s ease, transform .2s ease;
}
.investment .company-link:hover .company { color: var(--teal); }
.investment .company-link:hover .ext-arrow { color: var(--teal); transform: translate(2px, -2px); }

/* ────────────────────────────────────────────────────────────
   mattsilver.ai — Editorial redesign
   "Operator's Notebook" — serif spine, teal/vermillion/gold
   ──────────────────────────────────────────────────────────── */

:root {
  /* Paper & ink — clean modern */
  --paper:        #FAFAFA;
  --paper-2:      #FFFFFF;
  --paper-edge:   #EBEBEB;
  --ink:          #111111;
  --ink-2:        #2B2B2B;
  --muted:        #6A6A6A;
  --faint:        #9C9C9C;
  --rule:         #E5E5E5;

  /* Accent blue (canonical name — use this, not --teal/--vermillion which are misnamed) */
  --accent-blue:      #2563EB;
  --accent-blue-2:    #1D4ED8;
  --accent-blue-soft: rgba(37, 99, 235, 0.10);

  /* Warm modern accents — coral + indigo */
  --teal:         #FF385C;          /* primary — coral (was emerald) */
  --teal-2:       #FF5A7E;
  --teal-soft:    rgba(255, 56, 92, 0.10);
  --vermillion:   #5B47FB;          /* secondary — indigo */
  --vermillion-2: #7A6BFF;
  --vermillion-soft: rgba(91, 71, 251, 0.10);
  --gold:         #FF9F1C;          /* tertiary — warm amber */
  --gold-2:       #FFB347;
  --gold-soft:    rgba(255, 159, 28, 0.14);

  /* Type families — modern sans default (the var is misnamed but used everywhere; keep) */
  --serif: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --mono:  "JetBrains Mono", "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --display: "Inter", -apple-system, sans-serif;

  /* Geometry — Apple rounded */
  --measure: 36rem;
  --radius:  16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-pill: 999px;

  /* Glass + 3D shadows */
  --glass-bg:   rgba(255, 255, 255, 0.55);
  --glass-bg-2: rgba(255, 255, 255, 0.72);
  --glass-stroke: rgba(255, 255, 255, 0.65);
  --glass-stroke-2: rgba(17, 17, 17, 0.06);
  --shadow-sm: 0 1px 2px rgba(17,17,17,0.04), 0 2px 8px rgba(17,17,17,0.04);
  --shadow-md: 0 1px 2px rgba(17,17,17,0.05), 0 8px 24px -6px rgba(17,17,17,0.10), 0 16px 40px -12px rgba(17,17,17,0.08);
  --shadow-lg: 0 2px 4px rgba(17,17,17,0.05), 0 14px 32px -6px rgba(17,17,17,0.14), 0 30px 60px -16px rgba(17,17,17,0.12);
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --paper:       #0C141C;
    --paper-2:     #131D27;
    --paper-edge:  #1F2A35;
    --ink:         #E8EEF3;
    --ink-2:       #C8D2DB;
    --muted:       #7E8B97;
    --faint:       #4D5A66;
    --rule:        #232E39;
    --teal:        #5DC9AE;
    --teal-2:      #76D6BD;
    --teal-soft:   rgba(93, 201, 174, 0.14);
    --vermillion:  #6FA9E8;
    --vermillion-2:#8BBEF0;
    --vermillion-soft: rgba(111, 169, 232, 0.14);
    --gold:        #6BC0CC;
    --gold-2:      #88D2DC;
    --gold-soft:   rgba(107, 192, 204, 0.16);
    --glass-bg:    rgba(19, 29, 39, 0.55);
    --glass-bg-2:  rgba(19, 29, 39, 0.72);
    --glass-stroke: rgba(255, 255, 255, 0.12);
    --glass-stroke-2: rgba(255, 255, 255, 0.08);
  }
}
:root[data-theme="dark"] {
  --paper:       #0C141C;
  --paper-2:     #131D27;
  --paper-edge:  #1F2A35;
  --ink:         #E8EEF3;
  --ink-2:       #C8D2DB;
  --muted:       #7E8B97;
  --faint:       #4D5A66;
  --rule:        #232E39;
  --teal:        #5DC9AE;
  --teal-2:      #76D6BD;
  --teal-soft:   rgba(93, 201, 174, 0.14);
  --vermillion:  #6FA9E8;
  --vermillion-2:#8BBEF0;
  --vermillion-soft: rgba(111, 169, 232, 0.14);
  --gold:        #6BC0CC;
  --gold-2:      #88D2DC;
  --gold-soft:   rgba(107, 192, 204, 0.16);
  --glass-bg:    rgba(19, 29, 39, 0.55);
  --glass-bg-2:  rgba(19, 29, 39, 0.72);
  --glass-stroke: rgba(255, 255, 255, 0.12);
  --glass-stroke-2: rgba(255, 255, 255, 0.08);
}

/* ───────── Reset + base ───────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100dvh;
  position: relative;
  overflow-x: hidden;
}

/* Newsprint texture — subtle */
/* Aurora gradient — soft Apple-style light source */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(60% 50% at 12% 0%, rgba(255, 56, 92, 0.18), transparent 60%),
    radial-gradient(50% 45% at 95% 8%, rgba(91, 71, 251, 0.16), transparent 60%),
    radial-gradient(55% 50% at 80% 95%, rgba(255, 159, 28, 0.14), transparent 60%);
}

a { color: inherit; text-decoration: none; }
::selection { background: var(--vermillion); color: var(--paper); }

/* ───────── Layout ───────── */
.shell {
  position: relative;
  z-index: 1;
  max-width: 78rem;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

/* ───────── Masthead — newspaper banner ───────── */
.masthead {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.5rem;
  padding: 0.85rem 1.25rem;
  position: sticky;
  top: clamp(0.5rem, 1.5vw, 1rem);
  z-index: 50;
  margin: clamp(0.5rem, 1.5vw, 1rem) 0 1.75rem;
  border-radius: 16px;

  /* Liquid glass */
  background: var(--glass-bg);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid var(--glass-stroke-2);
  box-shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 12px 40px -16px rgba(17, 17, 17, .22);
  isolation: isolate;
}
.masthead::before {
  /* Specular top edge — Apple-style chisel */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(180deg, var(--glass-stroke), transparent 35%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}
.masthead::after { content: none; }

@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] .masthead {
    box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 18px 50px -16px rgba(0, 0, 0, .55);
  }
}
:root[data-theme="dark"] .masthead {
  box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 18px 50px -16px rgba(0, 0, 0, .55);
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: .5rem;
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.wordmark .vol {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 400;
}

.nav {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 1.4rem;
}
.nav a {
  font-family: var(--sans);
  font-size: 0.92rem;
  font-variation-settings: "wght" 500;
  letter-spacing: -0.005em;
  text-transform: none;
  color: var(--ink-2);
  padding: 0.3rem 0;
  position: relative;
  transition: color .2s ease;
}
.nav a:hover { color: var(--vermillion); }
.nav a[aria-current="page"] {
  color: var(--ink);
}
.nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  background: var(--vermillion);
}

.masthead-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.masthead-meta .date { white-space: nowrap; }

.theme-toggle {
  appearance: none;
  border: 1px solid var(--rule);
  background: transparent;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--ink);
  padding: 0.35rem 0.6rem;
  border-radius: 2px;
  cursor: pointer;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background .2s ease, border-color .2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
}
.theme-toggle:hover { background: var(--vermillion-soft); border-color: var(--vermillion); }

@media (max-width: 820px) {
  .masthead { grid-template-columns: auto auto; row-gap: 1rem; }
  .nav { grid-column: 1 / -1; justify-content: flex-start; flex-wrap: wrap; }
  .masthead-meta .date { display: none; }
}
@media (max-width: 540px) {
  .theme-toggle .label-text { display: none; }
}

/* ───────── Hero / intro ───────── */
.intro {
  padding: clamp(3rem, 8vw, 5.5rem) 0 clamp(2.5rem, 6vw, 4rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 22rem);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
  border-bottom: 1px solid var(--rule);
  position: relative;
}
@media (max-width: 880px) {
  .intro { grid-template-columns: 1fr; }
}

.intro-main { display: grid; gap: 1.5rem; max-width: 38rem; }
.intro-side { display: grid; gap: 1.5rem; }

.kicker {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--vermillion);
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}
.kicker::before {
  content: "§";
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--gold);
}

.lede {
  font-family: var(--display);
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.05;
  letter-spacing: -0.022em;
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}
.lede em {
  font-style: normal;
  font-weight: 700;
  color: var(--accent-blue);
}
/* Kept (empty) so other usages of the keyframe don't error. */
@keyframes lede-em-sweep {
  0%, 100% { background-position: 0% 50%; }
}

/* General emphasis — playful, not italic */
.sub em, .about em, .post em, .pod em, .investment em, p em {
  font-style: normal;
  font-weight: 600;
  color: var(--teal);
  background: linear-gradient(180deg, transparent 62%, var(--teal-soft) 62%, var(--teal-soft) 92%, transparent 92%);
  padding: 0 .12em;
  border-radius: 3px;
}
.lede a {
  color: var(--ink);
  border-bottom: 1px solid color-mix(in oklab, var(--ink) 28%, transparent);
  text-decoration: none;
  transition: color .2s ease, border-color .2s ease;
}
.lede a:hover { color: var(--accent-blue); border-bottom-color: var(--accent-blue); }

.sub {
  font-family: var(--sans);
  font-size: 1.12rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 36rem;
  margin: 0;
  text-wrap: pretty;
}
.sub em { color: var(--vermillion); font-weight: 600; background: linear-gradient(180deg, transparent 62%, var(--vermillion-soft) 62%, var(--vermillion-soft) 92%, transparent 92%); padding: 0 .12em; border-radius: 3px; }

.status-line {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 0.7rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--rule);
  background: var(--paper-2);
  border-radius: 2px;
  width: fit-content;
  margin-top: 0.5rem;
}
.status-line .pulse {
  width: 7px; height: 7px;
  background: var(--vermillion);
  border-radius: 50%;
  margin-right: 0.5rem;
  position: relative;
}
.status-line .pulse::after {
  content: "";
  position: absolute; inset: -3px;
  border-radius: 50%;
  background: var(--vermillion);
  opacity: .35;
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0%   { transform: scale(0.8); opacity: .5; }
  80%  { transform: scale(2.4); opacity: 0; }
  100% { transform: scale(2.4); opacity: 0; }
}
.status-line .label {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink);
  font-weight: 500;
}
.status-line .sep { color: var(--faint); }

/* ───────── Page head (subpages) ───────── */
.page-head {
  padding: clamp(2.5rem, 7vw, 4.5rem) 0 clamp(2rem, 4vw, 3rem);
  display: grid;
  gap: 1.25rem;
  max-width: 50rem;
  border-bottom: 1px solid var(--rule);
}
.page-head h1 {
  font-family: var(--display);
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 0.98;
  letter-spacing: -0.028em;
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}
.page-head h1 em {
  font-style: normal;
  font-weight: 700;
  background: linear-gradient(120deg, var(--teal), var(--vermillion), var(--gold));
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: lede-em-sweep 9s ease-in-out infinite alternate;
}
.page-head .sub {
  font-size: 1.18rem;
  color: var(--ink-2);
  max-width: 38rem;
}

/* ───────── Editor's note (writing.html) ───────── */
.editors-note {
  margin: clamp(1.75rem, 3vw, 2.5rem) 0 clamp(2rem, 4vw, 3rem);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(1.25rem, 3vw, 2.25rem);
  align-items: start;
  padding: clamp(1.4rem, 3vw, 2.1rem) clamp(1.4rem, 3vw, 2.25rem);
  background:
    linear-gradient(180deg, transparent, transparent 1.4rem, var(--rule) 1.4rem, var(--rule) calc(1.4rem + 1px), transparent calc(1.4rem + 1px)) 0 0/100% 1.45rem,
    var(--paper-2);
  background-blend-mode: multiply;
  border: 1px solid var(--rule);
  border-left: 3px solid var(--vermillion);
  border-radius: 4px;
  position: relative;
  max-width: 56rem;
  box-shadow:
    0 1px 0 rgba(0,0,0,.02),
    0 12px 30px -22px rgba(0,0,0,.18);
}
.editors-note::before {
  content: "EDITORIAL · COLOPHON";
  position: absolute;
  top: -.55rem;
  left: 1.5rem;
  background: var(--paper);
  padding: 0 .55rem;
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .22em;
  color: var(--muted);
  font-weight: 600;
}

/* Postal stamp */
.en-stamp {
  width: 5.6rem;
  height: 5.6rem;
  border-radius: 999px;
  border: 2px dashed var(--vermillion);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  position: relative;
  color: var(--vermillion);
  background: var(--vermillion-soft);
  transform: rotate(-7deg);
  transition: transform .4s cubic-bezier(.2,.7,.2,1);
}
.editors-note:hover .en-stamp { transform: rotate(-3deg) scale(1.04); }
.en-stamp::before {
  content: "";
  position: absolute;
  inset: .35rem;
  border-radius: 999px;
  border: 1px solid var(--vermillion);
  opacity: .35;
}
.en-stamp-inner {
  display: grid;
  place-items: center;
  text-align: center;
  font-family: var(--display);
  line-height: 1;
}
.en-stamp-top, .en-stamp-bot {
  font-size: .72rem;
  letter-spacing: .14em;
  font-weight: 700;
  text-transform: uppercase;
}
.en-stamp-mid {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--teal);
  margin: .15rem 0;
}

/* Body */
.en-body { min-width: 0; }
.en-body p {
  font-family: var(--serif);
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0 0 .75rem;
  text-wrap: pretty;
}
.en-body p:last-child { margin-bottom: 0; }
.en-lede {
  font-family: var(--display) !important;
  font-size: 1.18rem !important;
  font-weight: 600 !important;
  color: var(--ink) !important;
  letter-spacing: -0.015em;
  margin-bottom: 1rem !important;
}
.en-lede em {
  font-style: normal;
  font-weight: 700;
  color: var(--vermillion);
  background: linear-gradient(180deg, transparent 62%, var(--vermillion-soft) 62%, var(--vermillion-soft) 92%, transparent 92%);
  padding: 0 .12em;
  border-radius: 3px;
}
.en-body em {
  font-style: italic;
  color: var(--ink);
  font-weight: 500;
}
.en-body a {
  color: var(--ink);
  border-bottom: 1px solid var(--teal);
  padding-bottom: 1px;
  transition: color .2s ease, background .2s ease;
}
.en-body a:hover { color: var(--teal); background: var(--teal-soft); }

.en-old-url, .en-new-url {
  font-family: var(--mono);
  font-size: .88em;
  padding: .08em .38em;
  border-radius: 3px;
  letter-spacing: -.005em;
  white-space: nowrap;
}
.en-old-url {
  background: var(--paper);
  border: 1px solid var(--rule);
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: var(--vermillion);
  text-decoration-thickness: 1.5px;
}
.en-new-url {
  background: var(--teal-soft);
  color: var(--teal);
  font-weight: 600;
  border: 1px solid var(--teal-soft);
}

.en-quote {
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink);
  background: linear-gradient(180deg, transparent 62%, var(--gold-soft) 62%, var(--gold-soft) 92%, transparent 92%);
  padding: 0 .15em;
}

.en-sign {
  font-family: var(--display) !important;
  font-size: .92rem !important;
  color: var(--ink) !important;
  margin-top: 1rem !important;
  padding-top: .9rem !important;
  border-top: 1px solid var(--rule);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.en-sign-meta {
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: .06em;
  margin-left: .25rem;
}

@media (max-width: 640px) {
  .editors-note {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .en-stamp {
    width: 4.4rem;
    height: 4.4rem;
    transform: rotate(-7deg);
  }
  .en-stamp-top, .en-stamp-bot { font-size: .58rem; }
  .en-stamp-mid { font-size: 1.1rem; }
}

/* ───────── Sections ───────── */
section { padding: clamp(2.5rem, 6vw, 4rem) 0; position: relative; }
section + section { border-top: 1px solid var(--rule); }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 0.75rem;
}
.section-head h2 {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink);
  margin: 0;
}
.section-head .count {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ───────── Corridor map (signature graphic) ───────── */
.corridor {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}
.corridor .land {
  fill: none;
  stroke: var(--rule);
  stroke-width: 1;
  stroke-dasharray: 2 3;
}
.corridor .border {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1;
  stroke-dasharray: 4 3;
  opacity: 0.4;
}
.corridor .route {
  fill: none;
  stroke: var(--vermillion);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 1px 0 rgba(200,70,46,.15));
}
.corridor .route-anim {
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  animation: drawRoute 2.6s cubic-bezier(.6,.05,.2,1) .3s forwards;
}
@keyframes drawRoute {
  to { stroke-dashoffset: 0; }
}
.corridor .city { fill: var(--ink); }
.corridor .city-pulse {
  fill: var(--vermillion);
  transform-origin: center;
  transform-box: fill-box;
  animation: cityPulse 3.2s ease-in-out infinite;
}
.corridor .city-pulse:nth-child(2) { animation-delay: .4s; }
.corridor .city-pulse:nth-child(3) { animation-delay: .8s; }
.corridor .city-pulse:nth-child(4) { animation-delay: 1.2s; }
.corridor .city-pulse:nth-child(5) { animation-delay: 1.6s; }
@keyframes cityPulse {
  0%, 100% { opacity: .9; transform: scale(1); }
  50%      { opacity: 1; transform: scale(1.4); }
}
.corridor .label {
  font-family: var(--mono);
  font-size: 9px;
  fill: var(--muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.corridor .label-key {
  font-family: var(--mono);
  font-size: 9px;
  fill: var(--vermillion);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 500;
}

/* Spine — thin route line that runs through subpages as decorative element */
.spine {
  position: absolute;
  left: 0; top: 0;
  width: 1px; height: 100%;
  background: linear-gradient(to bottom,
    transparent,
    var(--vermillion) 20%,
    var(--vermillion) 80%,
    transparent);
  opacity: .25;
  pointer-events: none;
}

/* ───────── Writing list ───────── */
.posts, .pods { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.post, .pod {
  display: grid;
  grid-template-columns: 4rem 1fr auto;
  align-items: baseline;
  gap: 1.5rem;
  padding: 1.4rem 1.5rem;
  margin-bottom: .85rem;
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-stroke-2);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s ease, background .25s ease;
}
.post:last-child, .pod:last-child { border-bottom: 1px solid var(--glass-stroke-2); }
.post::before, .pod::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0;
  background: linear-gradient(180deg, var(--teal), var(--vermillion));
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
  transition: width .25s ease;
}
.post:hover::before, .pod:hover::before { width: 4px; }
.post:hover, .pod:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  background: var(--glass-bg-2);
}

.post .num, .pod .num {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--gold);
  letter-spacing: 0.06em;
  align-self: start;
  padding-top: 0.55rem;
  text-transform: uppercase;
}
.post .title-block, .pod .title-block { display: grid; gap: 0.4rem; min-width: 0; }
.post .title {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2.4vw, 1.65rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.018em;
  color: var(--ink);
  text-wrap: balance;
}
.post .excerpt {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.5;
  text-wrap: pretty;
  max-width: 40rem;
  }
.post .date, .pod .date {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  white-space: nowrap;
  align-self: start;
  padding-top: 0.6rem;
  text-transform: uppercase;
}
.post a, .pod a { display: contents; }
.post:hover .title { color: var(--vermillion); }

/* Podcast row */
.pod .show {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2.4vw, 1.65rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.018em;
  color: var(--ink);
  display: inline-flex;
  align-items: baseline;
  gap: 0.45em;
}
.pod .show .arrow {
  display: inline-block;
  font-size: 0.78em;
  color: var(--vermillion);
  transition: transform .25s ease;
  font-family: var(--mono);
}
.pod .episode {
  font-family: var(--serif);
  font-size: 1.04rem;
  color: var(--ink-2);
  font-weight: 400;
  line-height: 1.4;
  text-wrap: pretty;
  max-width: 44rem;
}
.pod .pod-meta {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-top: 0.2rem;
  text-transform: uppercase;
}
.pod:hover .show { color: var(--vermillion); }
.pod:hover .show .arrow { transform: translate(3px, -2px); }

@media (max-width: 640px) {
  .post, .pod { grid-template-columns: 3rem 1fr; gap: 1rem; }
  .post .date, .pod .date { grid-column: 2; padding-top: 0; }
}

/* Year header */
.year-header {
  margin: 2.5rem 0 0.5rem;
  font-family: var(--display);
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ink);
  background: linear-gradient(135deg, var(--teal), var(--vermillion));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
  display: flex; align-items: baseline; gap: 1rem;
}
.year-header::after {
  content: "";
  flex: 1; height: 1px;
  background: var(--rule);
  transform: translateY(-0.5rem);
}
.year-header:first-of-type { margin-top: 0; }

/* ───────── Investing ───────── */
.investments {
  list-style: none; padding: 0; margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
  gap: 0;
  border-top: 1px solid var(--ink);
}
.investment {
  padding: 1.4rem 1.5rem;
  display: grid;
  grid-template-rows: auto 1fr;
  grid-auto-rows: max-content;
  align-content: start;
  gap: 0.5rem;
  position: relative;
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-stroke-2);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s ease, background .25s ease;
}
.investment:hover {
  background: var(--glass-bg-2);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.investment:hover .company { color: var(--vermillion); }
.investment .meta {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding-left: 1.5rem;
}
.investment .meta .stage { color: var(--gold); }
.investment .company {
  font-family: var(--sans);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
  letter-spacing: -0.012em;
  padding-left: 0;
  transition: color .2s ease;
}
.investment .thesis {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--ink-2);
  line-height: 1.5;
  margin: 0;
  padding-left: 0;
}
.investment::before {
  content: "";
  position: absolute;
  left: 0; top: 1.4rem;
  width: 3px; height: 1.4rem;
  background: var(--teal);
  opacity: 0;
  transition: opacity .25s ease;
}
.investment:hover::before { opacity: 1; background: var(--vermillion); }

/* ───────── About ───────── */
.about { display: grid; gap: 0; max-width: 40rem; }
.about p {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2.2vw, 1.4rem);
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink-2);
  margin: 0 0 1.6rem;
  text-wrap: pretty;
  letter-spacing: -0.012em;
}
.about p:first-of-type::first-letter {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 4.5em;
  float: left;
  line-height: 0.85;
  margin: 0.1em 0.12em -0.1em 0;
  color: var(--vermillion);
}
.about p:last-of-type { margin-bottom: 0; }
.about p em { color: var(--vermillion); font-weight: 600; background: linear-gradient(180deg, transparent 62%, var(--vermillion-soft) 62%, var(--vermillion-soft) 92%, transparent 92%); padding: 0 .12em; border-radius: 3px; }
.about p a {
  color: var(--ink);
  border-bottom: 1px solid var(--teal);
  padding-bottom: 1px;
  transition: color .2s ease;
}
.about p a:hover { color: var(--teal); }

/* ───────── Now card — glass surface ───────── */
.now-card {
  padding: 1.6rem 1.75rem 1.75rem;
  background: var(--glass-bg-2);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid var(--glass-stroke);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  position: relative;
  max-width: 24rem;
  overflow: hidden;
}
.now-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,.5), rgba(255,255,255,0) 40%);
  pointer-events: none;
  mix-blend-mode: overlay;
}
.now-card .label {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal);
  display: flex; align-items: center; gap: 0.5rem;
  margin-bottom: 0.9rem;
  font-weight: 500;
}
.now-card .label::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.now-card dl {
  margin: 0;
  display: grid;
  grid-template-columns: 5.25rem 1fr;
  row-gap: 0.65rem;
  column-gap: 1rem;
}
.now-card dt {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding-top: 0.15rem;
}
.now-card dd {
  margin: 0;
  font-family: var(--serif);
  color: var(--ink-2);
  font-size: 0.98rem;
  font-weight: 400;
  line-height: 1.4;
}
.now-card dd em {
  color: var(--teal);
  font-weight: 600;
  background: linear-gradient(180deg, transparent 62%, var(--teal-soft) 62%, var(--teal-soft) 92%, transparent 92%);
  padding: 0 .12em;
  border-radius: 3px;
}

/* ───────── Marginalia (pull quotes / sidenotes) ───────── */
.marginalia {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--muted);
  border-left: 2px solid var(--gold);
  padding: 0.3rem 0 0.3rem 1rem;
  max-width: 22rem;
}
.marginalia .cite {
  display: block;
  margin-top: 0.4rem;
  font-family: var(--mono);
  font-style: normal;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ───────── Footer ───────── */
footer.foot {
  padding: clamp(3rem, 6vw, 4rem) 0 clamp(2rem, 4vw, 3rem);
  border-top: 2px solid var(--ink);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: end;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 3rem;
}
footer.foot a { color: var(--ink-2); transition: color .2s ease; border-bottom: 1px solid transparent; padding-bottom: 1px; }
footer.foot a:hover { color: var(--vermillion); border-bottom-color: var(--vermillion); }
footer.foot .links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
footer.foot .colophon { color: var(--faint); text-align: right; }
@media (max-width: 640px) {
  footer.foot { grid-template-columns: 1fr; }
  footer.foot .colophon { text-align: left; }
}

/* ───────── Topic cloud (home sidebar) ───────── */
.topic-cloud {
  position: relative;
  display: grid;
  gap: .75rem;
}
.topic-cloud .kicker { color: var(--muted); }
.topic-cloud .kicker::before { content: "✦"; color: var(--gold); font-weight: 700; }
.cloud {
  position: relative;
  width: 100%;
  height: 22rem;
  border: 1px solid var(--rule);
  background:
    linear-gradient(var(--rule) 1px, transparent 1px) 0 0/100% 22px,
    var(--paper-2);
  background-blend-mode: multiply;
  overflow: hidden;
  border-radius: 2px;
}
:root[data-theme="dark"] .cloud,
:root[data-theme="auto"] .cloud { background-blend-mode: normal; }
.cloud::before, .cloud::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 1;
}
.cloud::before {
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, var(--teal-soft), transparent 55%),
    radial-gradient(circle at 75% 70%, var(--vermillion-soft), transparent 55%),
    radial-gradient(circle at 60% 20%, var(--gold-soft), transparent 50%);
  opacity: .7;
}
.cloud::after {
  inset: 0;
  box-shadow: inset 0 0 40px var(--paper-2);
}
.cloud .t {
  position: absolute;
  left: var(--x);
  top: var(--y);
  font-family: var(--serif);
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  line-height: 1;
  letter-spacing: -0.018em;
  transform: translate(-50%, -50%);
  animation: drift var(--dur, 14s) ease-in-out var(--d, 0s) infinite alternate;
  z-index: 2;
}
.cloud .t-xs { font-size: .85rem; opacity: .7; }
.cloud .t-sm { font-size: 1rem;  opacity: .85; }
.cloud .t-md { font-size: 1.35rem; }
.cloud .t-lg { font-size: 1.85rem; font-weight: 500; }
.cloud .t-xl { font-size: 2.3rem; font-weight: 700; letter-spacing: -.02em; }
.cloud .t-teal { color: var(--teal); }
.cloud .t-verm { color: var(--vermillion); font-weight: 600; }
.cloud .t-gold { color: var(--gold); }
@keyframes drift {
  0%   { transform: translate(-50%, -50%) translate(0, 0)         rotate(0deg); }
  25%  { transform: translate(-50%, -50%) translate(6px, -8px)    rotate(-.6deg); }
  50%  { transform: translate(-50%, -50%) translate(-4px, 6px)    rotate(.5deg); }
  75%  { transform: translate(-50%, -50%) translate(-7px, -4px)   rotate(-.4deg); }
  100% { transform: translate(-50%, -50%) translate(5px, 7px)     rotate(.6deg); }
}
@media (prefers-reduced-motion: reduce) {
  .cloud .t { animation: none; }
}
@media (max-width: 880px) {
  .cloud { height: 18rem; }
}
/* ───────── Font set switcher (sans-only) ───────── */
:root[data-font="inter"] {
  --serif: "Inter", -apple-system, sans-serif;
  --sans:  "Inter", -apple-system, sans-serif;
  --display: "Inter", sans-serif;
}
:root[data-font="geist"] {
  --serif: "Geist", -apple-system, sans-serif;
  --sans:  "Geist", -apple-system, sans-serif;
  --display: "Geist", sans-serif;
  --mono:  "Geist Mono", ui-monospace, Menlo, monospace;
}
:root[data-font="grotesk"] {
  --serif: "Space Grotesk", -apple-system, sans-serif;
  --sans:  "Space Grotesk", -apple-system, sans-serif;
  --display: "Space Grotesk", sans-serif;
}
:root[data-font="dmsans"] {
  --serif: "DM Sans", -apple-system, sans-serif;
  --sans:  "DM Sans", -apple-system, sans-serif;
  --display: "DM Sans", sans-serif;
}
:root[data-font="plexsans"] {
  --serif: "IBM Plex Sans", -apple-system, sans-serif;
  --sans:  "IBM Plex Sans", -apple-system, sans-serif;
  --display: "IBM Plex Sans", sans-serif;
}
:root[data-font="general"] {
  --serif: "General Sans", -apple-system, sans-serif;
  --sans:  "General Sans", -apple-system, sans-serif;
  --display: "General Sans", sans-serif;
}
:root[data-font="manrope"] {
  --serif: "Manrope", -apple-system, sans-serif;
  --sans:  "Manrope", -apple-system, sans-serif;
  --display: "Manrope", sans-serif;
}
:root[data-font="satoshi"] {
  --serif: "Satoshi", -apple-system, sans-serif;
  --sans:  "Satoshi", -apple-system, sans-serif;
  --display: "Satoshi", sans-serif;
}

/* Fun typefaces — strictly for the typeface picker. Use at your own risk. */
:root[data-font="comic"] {
  --serif: "Comic Sans MS", "Comic Sans", "Chalkboard SE", system-ui, sans-serif;
  --sans:  "Comic Sans MS", "Comic Sans", "Chalkboard SE", system-ui, sans-serif;
  --display: "Comic Sans MS", "Comic Sans", "Chalkboard SE", sans-serif;
}
:root[data-font="caveat"] {
  --serif: "Caveat", "Bradley Hand", cursive;
  --sans:  "Caveat", "Bradley Hand", cursive;
  --display: "Caveat", "Bradley Hand", cursive;
}

.font-picker {
  position: fixed;
  right: clamp(1rem, 2vw, 1.5rem);
  bottom: clamp(1rem, 2vw, 1.5rem);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .5rem;
  font-family: var(--mono);
}
.font-picker .toggle {
  appearance: none;
  border: 1px solid var(--glass-stroke);
  background: var(--glass-bg-2);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  color: var(--ink);
  padding: .7rem 1rem;
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  text-transform: none;
  cursor: pointer;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  box-shadow: var(--shadow-md);
  transition: transform .25s cubic-bezier(.2,.7,.2,1), box-shadow .25s ease;
}
.font-picker .toggle:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.font-picker .toggle:active { transform: translateY(0) scale(.98); }
.font-picker .toggle .glyph {
  font-family: var(--display);
  font-size: 1.05rem;
  line-height: 1;
  font-weight: 700;
  background: linear-gradient(135deg, var(--teal), var(--vermillion));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.font-picker .panel {
  display: none;
  background: var(--glass-bg-2);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid var(--glass-stroke);
  padding: .65rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  min-width: 17rem;
  transform: translateY(8px) scale(.96);
  opacity: 0;
  transition: transform .25s cubic-bezier(.2,.7,.2,1), opacity .2s ease;
  pointer-events: none;
}
.font-picker.open .panel {
  display: grid; gap: .15rem;
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}
.font-picker .opt {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  text-align: left;
  padding: .7rem .85rem;
  cursor: pointer;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: baseline;
  border-radius: 12px;
  transition: background .15s ease, transform .15s ease;
}
.font-picker .opt:hover { background: var(--teal-soft); transform: translateX(2px); }
.font-picker .opt[aria-pressed="true"] {
  background: linear-gradient(135deg, var(--teal-soft), var(--vermillion-soft));
  color: var(--ink);
}
.font-picker .opt[aria-pressed="true"]::after {
  content: "";
  width: 8px; height: 8px;
  background: linear-gradient(135deg, var(--teal), var(--vermillion));
  border-radius: 999px;
  align-self: center;
  box-shadow: 0 0 0 3px rgba(255,56,92,.18);
}
.font-picker .opt .name { font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; color: var(--muted); }
.font-picker .opt .preview { font-size: 1.05rem; letter-spacing: -.01em; }
.font-picker .opt[data-font="inter"] .preview { font-family: "Inter", sans-serif; font-weight: 600; letter-spacing: -.025em; }
.font-picker .opt[data-font="geist"] .preview { font-family: "Geist", sans-serif; font-weight: 600; letter-spacing: -.02em; }
.font-picker .opt[data-font="grotesk"] .preview { font-family: "Space Grotesk", sans-serif; font-weight: 600; letter-spacing: -.01em; }
.font-picker .opt[data-font="dmsans"] .preview { font-family: "DM Sans", sans-serif; font-weight: 600; letter-spacing: -.02em; }
.font-picker .opt[data-font="plexsans"] .preview { font-family: "IBM Plex Sans", sans-serif; font-weight: 600; }
.font-picker .opt[data-font="general"] .preview { font-family: "General Sans", sans-serif; font-weight: 600; letter-spacing: -.02em; }
.font-picker .opt[data-font="manrope"] .preview { font-family: "Manrope", sans-serif; font-weight: 700; letter-spacing: -.025em; }
.font-picker .opt[data-font="satoshi"] .preview { font-family: "Satoshi", sans-serif; font-weight: 700; letter-spacing: -.025em; }
.font-picker .opt[data-font="comic"]   .preview { font-family: "Comic Sans MS", "Comic Sans", "Chalkboard SE", cursive; font-weight: 700; letter-spacing: -.01em; }
.font-picker .opt[data-font="caveat"]  .preview { font-family: "Caveat", "Bradley Hand", cursive; font-weight: 700; font-size: 1.25rem; letter-spacing: 0; }
.font-picker .group-label {
  font-family: var(--sans);
  font-size: .62rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 600;
  padding: .6rem .85rem .3rem;
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .9s cubic-bezier(.2,.65,.2,1), transform .9s cubic-bezier(.2,.65,.2,1);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* Initial entrance (above-the-fold) */
@media (prefers-reduced-motion: no-preference) {
  .intro > *, .page-head > * {
    opacity: 0;
    transform: translateY(10px);
    animation: rise .9s cubic-bezier(.2,.65,.2,1) forwards;
  }
  .intro .intro-main > *:nth-child(1) { animation-delay: .05s; }
  .intro .intro-main > *:nth-child(2) { animation-delay: .15s; }
  .intro .intro-main > *:nth-child(3) { animation-delay: .25s; }
  .intro .intro-main > *:nth-child(4) { animation-delay: .35s; }
  .intro-side { animation-delay: .45s; }
  .page-head .kicker { animation-delay: .05s; }
  .page-head h1     { animation-delay: .15s; }
  .page-head .sub   { animation-delay: .30s; }
  @keyframes rise { to { opacity: 1; transform: translateY(0); } }
}


/* ───────── Wordmark — mattsilver.ai ───────── */
.wordmark {
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  position: relative;
  padding: .35rem .65rem .35rem .35rem;
  border-radius: var(--radius-pill);
  transition: background .25s ease, transform .25s cubic-bezier(.2,.7,.2,1);
}
.wordmark::before {
  content: "";
  width: 1.3rem;
  height: 1.3rem;
  margin-right: .5rem;
  border-radius: 999px;
  background-image: url("assets/matt-portrait.png");
  background-size: cover;
  background-position: center 30%;
  background-repeat: no-repeat;
  border: 1px solid rgba(0,0,0,.12);
  box-shadow:
    0 1px 2px rgba(255,255,255,.6) inset,
    0 2px 6px -2px rgba(0,0,0,.18);
  flex-shrink: 0;
  transition: transform .35s cubic-bezier(.2,.7,.2,1);
}
.wordmark:hover::before {
  transform: scale(1.08) rotate(-3deg);
}
@keyframes mark-spin {
  to { transform: rotate(360deg); }
}
.wordmark:hover { background: var(--glass-bg-2); transform: translateY(-1px); }
.wordmark .wm-name {
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  line-height: 1;
}
.wordmark .wm-tld {
  background: linear-gradient(135deg, var(--teal), var(--vermillion));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-left: -0.32em;
  position: relative;
  display: inline-flex;
  align-items: center;
  line-height: 1;
}
.wordmark .wm-tld::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: -2px;
  height: 2px;
  background: linear-gradient(135deg, var(--teal), var(--vermillion), var(--gold));
  border-radius: 999px;
  transform-origin: left;
  transition: transform .35s cubic-bezier(.2,.7,.2,1);
}
@media (prefers-reduced-motion: reduce) {
  .wordmark::before { animation: none; }
}

/* ───────── Hero (full viewport, no scroll) ───────── */
body.hero-page { overflow: hidden; }
.shell-hero {
  height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 0;
  padding-bottom: 0;
}
.shell-hero .masthead { padding: .65rem 0 .65rem; border-bottom: 0; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  min-height: 0;
  padding: 1rem 0 2rem;
}
.hero-copy {
  display: grid;
  gap: 1.4rem;
  align-content: center;
  max-width: 36rem;
}
.hero-copy .kicker { color: var(--muted); }
.hero-copy .lede {
  font-size: clamp(2.2rem, 4.6vw, 3.6rem);
  line-height: 1.02;
  margin: 0;
}
.hero-copy .sub {
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  color: var(--ink-2);
  max-width: 34rem;
  line-height: 1.55;
  margin: 0;
}
.hero-cta { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: .25rem; }
.cta {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .85rem 1.35rem;
  font-family: var(--sans);
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: -0.005em;
  border-radius: var(--radius-pill);
  transition: transform .25s cubic-bezier(.2,.7,.2,1), box-shadow .25s ease, background .2s ease;
  cursor: pointer;
}
.cta-primary {
  background: var(--accent-blue);
  color: #fff;
  white-space: nowrap;
  box-shadow: 0 10px 22px -10px rgba(37,99,235,.55), 0 2px 4px rgba(17,24,50,.08);
}
.cta-primary:hover { background: var(--accent-blue-2); transform: translateY(-1px); box-shadow: 0 14px 28px -10px rgba(37,99,235,.6), 0 3px 6px rgba(17,24,50,.10); }
.cta-primary:active { transform: translateY(0) scale(.98); }
.cta-ghost {
  background: var(--glass-bg-2);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  color: var(--ink);
  border: 1px solid var(--glass-stroke-2);
}
.cta-ghost:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* ───────── Sky (interactive cloud canvas) ───────── */
/* ───────── Sky (cloud canvas — transparent, no panel chrome) ───────── */
.sky {
  position: relative;
  height: 100%;
  min-height: 30rem;
  background: transparent;
}
/* Atmospheric wash — bleeds into the page; no border, no card.
   Warm near the sun, cool at the far edge. The sun's CSS vars drive it. */
.sky-wash {
  position: absolute;
  inset: -2rem -2rem -2rem -1rem;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 70% 55% at var(--sun-x, 72%) var(--sun-y, 22%),
      rgba(255, 220, 160, 0.42) 0%,
      rgba(255, 200, 180, 0.22) 25%,
      rgba(220, 210, 240, 0.14) 55%,
      transparent 78%),
    radial-gradient(ellipse 90% 70% at 30% 80%,
      rgba(200, 215, 245, 0.22) 0%,
      transparent 60%);
  filter: blur(12px);
  mask-image: linear-gradient(180deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
  transition: background .8s ease;
}

/* ───────── Sun (Chicago weather-driven) ───────── */
.sun {
  position: absolute;
  width: 14rem;
  height: 14rem;
  left: var(--sun-x, 72%);
  top: var(--sun-y, 22%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 1;
  border-radius: 999px;
  background:
    radial-gradient(circle, #FFFCE0 0%, rgba(255,225,140,.85) 18%, rgba(255,195,110,.55) 38%, rgba(255,170,140,.25) 60%, transparent 78%);
  filter: blur(3px);
  transition: background .8s ease, filter .8s ease, opacity .8s ease, width .8s ease, height .8s ease, left .8s cubic-bezier(.2,.7,.2,1), top .8s cubic-bezier(.2,.7,.2,1);
}
.sun--cloudy {
  background:
    radial-gradient(circle, #FFF8E6 0%, rgba(255,215,160,.55) 25%, rgba(220,205,210,.32) 55%, transparent 78%);
  filter: blur(8px);
  opacity: .9;
}
.sun--overcast {
  background:
    radial-gradient(circle, #F2EEE8 0%, rgba(220,212,200,.55) 35%, rgba(180,180,190,.30) 65%, transparent 80%);
  filter: blur(14px);
  opacity: .7;
}
.sun--storm {
  background:
    radial-gradient(circle, #E0DCD2 0%, rgba(160,160,180,.45) 35%, rgba(120,120,150,.25) 65%, transparent 80%);
  filter: blur(16px);
  opacity: .55;
}
.sun--night {
  width: 8rem;
  height: 8rem;
  background:
    radial-gradient(circle, #F5F1E8 0%, rgba(220,220,230,.7) 40%, rgba(150,160,200,.25) 70%, transparent 85%);
  filter: blur(2px);
  opacity: .85;
}

/* ───────── Floating circular portrait + caption + thought-tail ───────── */
.portrait {
  position: absolute;
  /* Lower-half of the sky — clouds occupy the upper half above */
  left: 50%;
  top: 65%;
  transform: translate(-50%, -50%);
  margin: 0;
  z-index: 6;
  width: clamp(9rem, 16vw, 12rem);
  pointer-events: none;
  display: grid;
  justify-items: center;
  gap: .85rem;
}
.portrait-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid rgba(17,17,17,.10);
  box-shadow:
    0 1px 0 rgba(255,255,255,.9) inset,
    0 22px 38px -14px rgba(17,24,50,.24),
    0 8px 18px -8px rgba(17,24,50,.14);
  overflow: hidden;
  animation: portrait-bob 6s ease-in-out infinite;
}
.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
  transform: scale(1.08);
  transform-origin: 50% 30%;
}
.portrait-caption {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(17,17,17,.55);
  text-align: center;
  line-height: 1.3;
  white-space: nowrap;
}
.portrait-caption .kicker {
  display: inline-block;
  padding: .25rem .55rem;
  background: rgba(255,255,255,.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 999px;
  border: 1px solid rgba(17,17,17,.06);
}

/* Thought-tail: 3 dots rising from above the portrait into the cloud field */
.portrait-bubble {
  position: absolute;
  left: 58%;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff 0%, #fafbff 100%);
  border: 1px solid rgba(17,17,17,.08);
  box-shadow:
    0 1px 0 rgba(255,255,255,.9) inset,
    0 6px 14px -6px rgba(17,24,50,.18);
  z-index: 5;
}
.portrait-bubble-1 {
  width: 1.1rem; height: 1.1rem;
  bottom: calc(100% + 1.5rem);
  transform: translateX(0);
  animation: bubble-rise 6s ease-in-out infinite;
}
.portrait-bubble-2 {
  width: .8rem; height: .8rem;
  bottom: calc(100% + 3.4rem);
  transform: translateX(40%);
  animation: bubble-rise 6s ease-in-out .9s infinite;
  opacity: .85;
}
.portrait-bubble-3 {
  width: .55rem; height: .55rem;
  bottom: calc(100% + 5rem);
  transform: translateX(90%);
  animation: bubble-rise 6s ease-in-out 1.7s infinite;
  opacity: .7;
}

:root[data-theme="dark"] .portrait-frame { background: #1a1a1a; border-color: rgba(255,255,255,.12); }
:root[data-theme="dark"] .portrait-frame img { filter: invert(1); }
:root[data-theme="dark"] .portrait-caption { color: rgba(255,255,255,.6); }
:root[data-theme="dark"] .portrait-caption .kicker { background: rgba(30,30,40,.7); border-color: rgba(255,255,255,.08); }
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] .portrait-frame { background: #1a1a1a; border-color: rgba(255,255,255,.12); }
  :root[data-theme="auto"] .portrait-frame img { filter: invert(1); }
  :root[data-theme="auto"] .portrait-caption { color: rgba(255,255,255,.6); }
  :root[data-theme="auto"] .portrait-caption .kicker { background: rgba(30,30,40,.7); border-color: rgba(255,255,255,.08); }
}

@keyframes portrait-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-5px); }
}
@keyframes bubble-rise {
  0%, 100% { transform: translateY(0) translateX(var(--bx, 0)); opacity: .85; }
  50%      { transform: translateY(-6px) translateX(var(--bx, 0)); opacity: 1; }
}
.portrait-bubble-1 { --bx: 0; }
.portrait-bubble-2 { --bx: 40%; }
.portrait-bubble-3 { --bx: 90%; }

@media (prefers-reduced-motion: reduce) {
  .portrait-frame, .portrait-bubble { animation: none; }
}
@media (max-width: 980px) {
  .portrait { width: clamp(8rem, 28vw, 11rem); left: 50%; top: 50%; }
}

/* Animatable drift offsets — registered so we can animate them as length values
   and fold them into the .cloud-item transform alongside parallax (mx/my). */
@property --dx { syntax: "<length>"; inherits: false; initial-value: 0px; }
@property --dy { syntax: "<length>"; inherits: false; initial-value: 0px; }

.cloud-item {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(
    calc(-50% + var(--mx, 0px) + var(--dx, 0px)),
    calc(-50% + var(--my, 0px) + var(--dy, 0px))
  );
  transition: filter .3s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  will-change: transform;
  display: inline-grid;
  grid-template-areas: "stack";
  place-items: center;
  padding: var(--c-padY) var(--c-padX);
  /* Padding makes the SVG (which fills the box via inset:0) larger than the text,
     so the cloud silhouette extends beyond the text on all sides. */
  animation: cloud-drift var(--drift-dur, 14s) ease-in-out var(--drift-delay, 0s) infinite alternate;
}
.cloud-item .cloud-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  /* Drop-shadow lives on the SVG <path> via the inline filter in sky.js,
     not here — putting filter: drop-shadow on the <svg> element itself
     can produce a rectangular halo on some renderers. */
  z-index: 0;
}
.cloud-item .cloud-text {
  grid-area: stack;
  position: relative;
  font-family: 'Kalam', 'Caveat', cursive;
  font-weight: 700;
  letter-spacing: 0;
  white-space: nowrap;
  pointer-events: none;
  font-size: var(--c-fs);
  color: var(--c-text);
  line-height: 1;
  z-index: 2;
  transform: rotate(var(--c-rot, 0deg));
}
.cloud-item .cloud-glow {
  grid-area: stack;
  position: absolute;
  inset: -25%;
  border-radius: 50%;
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
  z-index: -1;
  background: radial-gradient(circle, color-mix(in oklab, var(--c-accent) 40%, transparent), transparent 70%);
  filter: blur(20px);
}
.cloud-item:hover .cloud-glow { opacity: 1; }
.cloud-item:hover .cloud-svg { filter: drop-shadow(0 12px 28px rgba(17, 24, 50, 0.28)); }
.cloud-item:hover { --dy: -4px; }
.cloud-item.popped { animation: cloud-pop .55s cubic-bezier(.25,1.5,.4,1); }
@keyframes cloud-drift {
  0%   { --dx: 0px;  --dy: 0px; }
  50%  { --dx: 8px;  --dy: -6px; }
  100% { --dx: -6px; --dy: 4px; }
}
@keyframes cloud-pop {
  0%   { transform: translate(calc(-50% + var(--mx, 0px)), calc(-50% + var(--my, 0px))) scale(1); }
  40%  { transform: translate(calc(-50% + var(--mx, 0px)), calc(-50% + var(--my, 0px) - 8px)) scale(1.1); }
  100% { transform: translate(calc(-50% + var(--mx, 0px)), calc(-50% + var(--my, 0px))) scale(1); }
}

/* Status line on hero */
.hero-copy .status-line {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--mono);
  font-size: .68rem;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-top: .25rem;
}
.hero-copy .status-line .pulse {
  width: 6px; height: 6px;
  border-radius: 999px;
  background: #16C172;
  box-shadow: 0 0 0 0 rgba(22, 193, 114, .6);
  animation: pulse 2s ease-out infinite;
}
.hero-copy .status-line .sep { color: var(--faint); }

@media (max-width: 980px) {
  body.hero-page { overflow: auto; }
  .shell-hero { height: auto; min-height: 100dvh; }
  .hero { grid-template-columns: 1fr; }
  .sky { min-height: 26rem; }
}


/* ───────── Big footer (Clay-style) ───────── */
.bigfoot {
  margin: 5rem -2rem 0;
  padding: clamp(2.5rem, 5vw, 4rem) clamp(2rem, 5vw, 4rem) 0;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  background:
    radial-gradient(60% 50% at 15% 100%, rgba(255, 56, 92, 0.18), transparent 60%),
    radial-gradient(50% 50% at 85% 0%, rgba(91, 71, 251, 0.20), transparent 60%),
    linear-gradient(180deg, #0E1218 0%, #16191F 100%);
  color: #E8EAEE;
  position: relative;
  overflow: hidden;
}
.bigfoot::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(40% 30% at 50% 0%, rgba(255,255,255,.06), transparent);
  pointer-events: none;
}
.bigfoot-tagline {
  display: grid;
  gap: .9rem;
  margin-bottom: clamp(2.5rem, 4vw, 3.5rem);
  position: relative;
  z-index: 1;
}
.bigfoot-kicker {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.55);
}
.bigfoot-headline {
  font-family: var(--display);
  font-size: clamp(2.4rem, 6.4vw, 5.4rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: .98;
  margin: 0;
  color: #fff;
  text-wrap: balance;
}
.bigfoot-headline em {
  font-style: normal;
  background: linear-gradient(120deg, #FF7A93 0%, #B5A6FF 50%, #FFC56B 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: lede-em-sweep 9s ease-in-out infinite alternate;
}

.bigfoot-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
  position: relative;
  z-index: 1;
}
.bigfoot-col { display: grid; gap: .55rem; align-content: start; }
.bigfoot-col-title {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.45);
  margin-bottom: .35rem;
}
.bigfoot-col a {
  color: rgba(255,255,255,.85);
  font-weight: 500;
  font-size: 1rem;
  transition: color .2s ease, transform .2s ease;
  display: inline-block;
  width: fit-content;
}
.bigfoot-col a:hover { color: #FFC56B; transform: translateX(2px); }
.bigfoot-status {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-size: .95rem;
  color: rgba(255,255,255,.85);
  font-weight: 500;
}
.bigfoot-pulse {
  width: 7px; height: 7px;
  border-radius: 999px;
  background: #16C172;
  box-shadow: 0 0 0 0 rgba(22,193,114,.6);
  animation: pulse 2s ease-out infinite;
}
.bigfoot-meta {
  font-size: .85rem;
  color: rgba(255,255,255,.5);
}

.bigfoot-mark {
  position: relative;
  z-index: 1;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(5rem, 18vw, 16rem);
  letter-spacing: -0.06em;
  line-height: .85;
  text-align: center;
  padding: 1rem 0 .5rem;
  margin-top: 1rem;
  user-select: none;
}
.bigfoot-mark .bf-name {
  background: linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,.04));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.bigfoot-mark .bf-tld {
  background: linear-gradient(135deg, #FF385C, #5B47FB);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@media (max-width: 880px) {
  .bigfoot-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
  .bigfoot { margin: 4rem -1.25rem 0; padding: 2.5rem 1.5rem 0; }
}
@media (max-width: 520px) {
  .bigfoot-grid { grid-template-columns: 1fr; }
}

/* Hide masthead .date on small screens */
@media (max-width: 760px) {
  .masthead-meta .date { display: none; }
}


/* ───────── Get in touch — glass cards ───────── */
.touch-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}
.touch-card {
  display: grid;
  gap: .55rem;
  padding: 1.6rem 1.8rem 1.8rem;
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-stroke-2);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s ease, background .25s ease;
}
.touch-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--touch-aura, transparent);
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
  border-radius: inherit;
}
.touch-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  background: var(--glass-bg-2);
}
.touch-card:hover::before { opacity: 1; }
.touch-cargado  { --touch-aura: radial-gradient(60% 80% at 100% 0%, rgba(255, 56, 92, 0.18), transparent 60%); }
.touch-x        { --touch-aura: radial-gradient(60% 80% at 100% 0%, rgba(17, 17, 17, 0.10), transparent 60%); }
.touch-linkedin { --touch-aura: radial-gradient(60% 80% at 100% 0%, rgba(63, 135, 221, 0.20), transparent 60%); }
.touch-email    { --touch-aura: radial-gradient(60% 80% at 100% 0%, rgba(91, 71, 251, 0.18), transparent 60%); }

.touch-kicker {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.touch-title {
  font-family: var(--display);
  font-size: clamp(1.4rem, 2.4vw, 1.8rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ink);
  line-height: 1.1;
}
.touch-sub {
  font-size: .98rem;
  color: var(--ink-2);
  line-height: 1.5;
  max-width: 30rem;
}
.touch-cta {
  margin-top: .5rem;
  font-family: var(--mono);
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}
.touch-cargado .touch-cta { color: var(--teal); }
.touch-linkedin .touch-cta { color: #1F4F87; }
.touch-email .touch-cta { color: var(--vermillion); }

@media (max-width: 760px) {
  .touch-grid { grid-template-columns: 1fr; }
}

/* ────────────────────────────────────────────────────────
   Blog post layout — .post-article + .prose
   Used by /blog/{slug}.html (built from Beehiiv content).
   ──────────────────────────────────────────────────────── */
.post-article {
  max-width: 44rem;
  margin: 0 auto;
  padding: 1rem 0 4rem;
}

/* Editorial hero — compact dateline, tightened title, italic subtitle, tag row */
.post-head {
  margin: 0 0 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--rule);
}
.post-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 0 0 1rem;
}
.post-dateline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.74rem;
  font-variation-settings: "wght" 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0;
  min-width: 0;
}
.post-dateline .kick { color: var(--vermillion); }
.post-dateline .num  {
  color: var(--gold);
  font-feature-settings: "tnum";
  letter-spacing: 0.04em;
}
.post-dateline .dot  { color: var(--faint); }
.post-dateline time  { color: var(--muted); }
.post-dateline .post-readtime { color: var(--muted); font-feature-settings: "tnum"; }

.post-share-top {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}
.post-share-top .post-share-btn {
  width: 30px;
  height: 30px;
  font-size: 0.82rem;
  border-radius: 8px;
}
.post-share-btn-es {
  font-size: 0.7rem !important;
  font-variation-settings: "wght" 700;
  letter-spacing: 0.04em;
}

.post-head h1 {
  font-family: var(--sans);
  font-size: clamp(1.7rem, 3.2vw, 2.25rem);
  letter-spacing: -0.024em;
  line-height: 1.12;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 0.85rem;
}

.post-subtitle {
  font-size: 1.08rem;
  line-height: 1.55;
  color: var(--ink-2);
  font-style: italic;
  margin: 0 0 1.1rem;
  max-width: 40rem;
  border-left: 2px solid color-mix(in oklch, var(--vermillion) 50%, var(--rule));
  padding: 0.05rem 0 0.05rem 0.95rem;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
}
.post-tag {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-variation-settings: "wght" 500;
  letter-spacing: 0.005em;
  color: var(--muted);
  background: var(--paper-2);
  border: 1px solid var(--rule);
  text-decoration: none;
  transition: color .15s ease, background .15s ease, border-color .15s ease, transform .15s ease;
}
a.post-tag:hover {
  color: var(--vermillion);
  background: var(--vermillion-soft);
  border-color: color-mix(in oklch, var(--vermillion) 30%, var(--rule));
  transform: translateY(-1px);
}

/* Cover image — Beehiiv thumbnail rendered as a hero figure */
.post-cover {
  margin: 0 0 2rem;
}
.post-cover img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--rule);
  box-shadow: var(--shadow-sm);
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* AI audio narration — sits between cover image and prose */
.post-audio {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin: 0 0 2rem;
  padding: 0.7rem 0.9rem 0.7rem 1.05rem;
  border-radius: 14px;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  flex-wrap: wrap;
}
.post-audio-kicker {
  font-size: 0.72rem;
  font-variation-settings: "wght" 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  flex-shrink: 0;
  white-space: nowrap;
}
.post-audio audio {
  flex: 1 1 18rem;
  min-width: 0;
  height: 40px;
  max-width: 100%;
}
@media (max-width: 600px) {
  .post-audio { gap: 0.55rem; padding: 0.65rem 0.75rem; }
  .post-audio audio { width: 100%; flex-basis: 100%; }
}

/* Share row — appears below the article body */
.post-share {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 2.5rem 0 1.6rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}
.post-share-label {
  font-size: 0.72rem;
  font-variation-settings: "wght" 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 0.35rem;
}
.post-share-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 0.95rem;
  font-variation-settings: "wght" 600;
  cursor: pointer;
  text-decoration: none;
  transition: color .15s ease, background .15s ease, border-color .15s ease, transform .15s ease;
}
.post-share-btn:hover {
  color: var(--vermillion);
  border-color: color-mix(in oklch, var(--vermillion) 30%, var(--rule));
  background: var(--vermillion-soft);
  transform: translateY(-1px);
}

/* Subscribe CTA — soft tinted card at the bottom of every post */
.post-subscribe {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  margin: 1.4rem 0 0;
  padding: 1.2rem 1.3rem;
  border-radius: 14px;
  background: linear-gradient(135deg,
                color-mix(in oklch, var(--vermillion-soft) 75%, transparent),
                color-mix(in oklch, var(--gold-soft) 55%, transparent));
  border: 1px solid color-mix(in oklch, var(--vermillion) 18%, var(--rule));
  flex-wrap: wrap;
}
.post-subscribe-text {
  flex: 1 1 16rem;
  min-width: 0;
}
.post-subscribe-kicker {
  display: block;
  font-size: 0.7rem;
  font-variation-settings: "wght" 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--vermillion);
  margin-bottom: 0.35rem;
}
.post-subscribe-title {
  font-family: var(--sans);
  font-size: 1.15rem;
  font-variation-settings: "wght" 700;
  color: var(--ink);
  margin: 0 0 0.35rem;
  letter-spacing: -0.012em;
  line-height: 1.25;
}
.post-subscribe-sub {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--ink-2);
  margin: 0;
  max-width: 28rem;
}
.post-subscribe-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.15rem;
  background: var(--ink);
  color: var(--paper-2);
  font-size: 0.92rem;
  font-variation-settings: "wght" 600;
  letter-spacing: 0.005em;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .15s ease, opacity .15s ease;
}
.post-subscribe-cta:hover {
  transform: translateY(-1px);
  opacity: 0.92;
}

@media (max-width: 600px) {
  .post-subscribe { flex-direction: column; align-items: flex-start; }
  .post-cover img { aspect-ratio: auto; }
}

/* Legacy .page-head support for blog posts (now superseded by .post-head),
   keep tight so existing /blog/*.html snapshots don't blow up. */
.post-article .page-head { margin-bottom: 1.6rem; }
.post-article .page-head h1 {
  font-size: clamp(1.7rem, 3.2vw, 2.25rem);
  letter-spacing: -0.024em;
  line-height: 1.12;
  margin: 0.4rem 0 0.7rem;
  font-weight: 700;
}
.post-meta {
  font-size: 0.88rem;
  color: var(--muted);
  font-variation-settings: "wght" 500;
  margin: 0;
}
.post-meta .sep { color: var(--faint); margin: 0 0.4rem; }
.post-meta-sub { color: var(--ink-2); }
.post-footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.post-footer .more {
  font-size: 0.85rem;
  font-variation-settings: "wght" 600;
  letter-spacing: 0.01em;
  color: var(--vermillion);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in oklch, var(--vermillion) 35%, transparent);
  padding-bottom: 1px;
  transition: color .15s ease, border-color .15s ease;
}
.post-footer .more:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* The prose container — typography for Beehiiv-injected HTML.
   Uses Inter; intentionally generous spacing. Resets common Beehiiv
   inline-style noise (font-family, sizes, paddings) so this CSS wins. */
.prose {
  font-family: var(--sans);
  font-size: 1.06rem;
  line-height: 1.7;
  color: var(--ink-2);
  letter-spacing: -0.005em;
}

/* Neutralize Beehiiv-shaped element classes & inline padding wrappers */
.prose [id="content-blocks"] > div,
.prose > div[style*="padding"] {
  padding: 0 !important;
}

/* Block elements
   Beehiiv wraps each paragraph in <div><p>...</p></div>; spacing has to
   live on the wrapping <div> so adjacent blocks read as separate paragraphs. */
.prose > div {
  margin: 0 0 1.4rem !important;
}
.prose > div:last-child { margin-bottom: 0 !important; }

.prose p {
  margin: 0 !important;
  font-family: var(--sans) !important;
  font-size: 1.06rem !important;
  line-height: 1.7 !important;
  color: var(--ink-2) !important;
  text-align: left !important;
}

.prose h1, .prose h2, .prose h3, .prose h4 {
  font-family: var(--sans) !important;
  color: var(--ink) !important;
  letter-spacing: -0.018em !important;
  margin: 2.6rem 0 0.9rem !important;
  font-weight: 700 !important;
}
.prose h1 { font-size: 1.85rem !important; line-height: 1.15 !important; }
.prose h2 { font-size: 1.45rem !important; line-height: 1.25 !important; }
.prose h3 { font-size: 1.15rem !important; line-height: 1.35 !important; }
.prose h4 { font-size: 1.02rem !important; line-height: 1.4 !important; }
.prose h2:first-child,
.prose h3:first-child { margin-top: 0 !important; }
/* Beehiiv wraps each heading in its own <div>; let the heading's margin
   carry the section break, and zero out the wrapper div's spacing. */
.prose > div:has(> h1),
.prose > div:has(> h2),
.prose > div:has(> h3),
.prose > div:has(> h4) {
  margin: 0 !important;
}

/* Beehiiv section divider — emitted as <div style="border-top:3px solid…">.
   Re-skin to a refined hairline that respects light/dark mode. */
.prose > div:has(> div[style*="border-top"]) {
  margin: 2.6rem 0 !important;
}
.prose div[style*="border-top"] {
  border-top: 1px solid var(--rule) !important;
  width: 40% !important;
  margin: 0 auto !important;
}

/* Lists */
.prose ul, .prose ol {
  margin: 0 0 1.15rem;
  padding-left: 1.4rem;
  color: var(--ink-2);
}
.prose li {
  margin: 0.3rem 0;
  font-family: var(--sans) !important;
  font-size: 1.06rem !important;
  line-height: 1.65 !important;
  color: var(--ink-2) !important;
}
.prose li > p {
  margin: 0 0 0.4rem !important;
}

/* Inline */
.prose a {
  color: var(--vermillion);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in oklch, var(--vermillion) 30%, transparent);
  padding-bottom: 1px;
  transition: color .15s ease, border-color .15s ease;
}
.prose a:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}
.prose strong, .prose b {
  font-variation-settings: "wght" 700;
  color: var(--ink);
}
.prose em, .prose i {
  font-style: italic;
}
.prose code {
  font-family: var(--mono);
  font-size: 0.92em;
  background: color-mix(in oklch, var(--vermillion-soft) 60%, var(--paper-2));
  border: 1px solid var(--rule);
  border-radius: 5px;
  padding: 0.05em 0.35em;
  color: var(--ink);
}
.prose pre {
  font-family: var(--mono);
  font-size: 0.88rem;
  line-height: 1.55;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 1rem 1.2rem;
  overflow-x: auto;
  margin: 1.4rem 0;
}
.prose pre code {
  background: transparent;
  border: 0;
  padding: 0;
}

/* Quotes */
.prose blockquote {
  margin: 1.6rem 0;
  padding: 0.4rem 1.1rem;
  border-left: 3px solid var(--vermillion);
  color: var(--ink);
  font-style: italic;
  font-size: 1.08rem;
  line-height: 1.55;
  background: color-mix(in oklch, var(--vermillion-soft) 50%, transparent);
  border-radius: 0 6px 6px 0;
}
.prose blockquote p {
  margin: 0.4rem 0 !important;
  font-style: italic !important;
  color: var(--ink) !important;
}

/* Divider */
.prose hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 2.4rem 0;
}

/* Media */
.prose img,
.prose video {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.6rem auto;
  border-radius: 12px;
  border: 1px solid var(--rule);
  box-shadow: var(--shadow-sm);
}
.prose iframe {
  display: block;
  max-width: 100%;
  margin: 1.6rem auto;
  border-radius: 12px;
  border: 1px solid var(--rule);
  aspect-ratio: 16 / 9;
  width: 100%;
  height: auto;
}

/* Tables */
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.4rem 0;
  font-size: 0.95rem;
}
.prose th, .prose td {
  border: 1px solid var(--rule);
  padding: 0.55rem 0.75rem;
  text-align: left;
  vertical-align: top;
}
.prose th {
  background: var(--paper-2);
  font-variation-settings: "wght" 600;
  color: var(--ink);
}

/* Buttons / CTAs Beehiiv emits — neutralize and restyle */
.prose [class*="bh__cta"],
.prose a[role="button"] {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  background: var(--ink);
  color: var(--paper-2) !important;
  border: 0 !important;
  border-radius: 999px;
  font-size: 0.92rem;
  font-variation-settings: "wght" 600;
  letter-spacing: 0.005em;
  text-decoration: none;
  margin: 0.6rem 0;
}

/* Hide Beehiiv-only chrome that survives */
.prose .bh__byline_wrapper,
.prose .bh__byline_social_wrapper,
.prose [id="web-header"],
.prose [id*="footer"],
.prose [class*="subscribe"] { display: none !important; }

/* ───────── Hero subscribe (homepage inline form) ───────── */
.hero-subscribe {
  display: flex;
  align-items: stretch;
  gap: .5rem;
  margin-top: 1rem;
  max-width: 28rem;
  padding: .35rem;
  border-radius: var(--radius-pill);
  background: var(--paper-2);
  border: 1px solid var(--rule);
  box-shadow: 0 1px 2px rgba(17,24,50,.04);
}
.hero-subscribe-input {
  flex: 1;
  min-width: 0;
  padding: .55rem .9rem;
  font-family: var(--sans);
  font-size: .95rem;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
}
.hero-subscribe-input::placeholder { color: var(--muted); }
.hero-subscribe-button {
  flex-shrink: 0;
  padding: .55rem 1.1rem;
  font-family: var(--sans);
  font-weight: 600;
  font-size: .9rem;
  color: #fff;
  background: var(--accent-blue);
  border: 0;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.hero-subscribe-button:hover { background: var(--accent-blue-2); transform: translateY(-1px); }
.hero-subscribe-button[disabled] { opacity: .6; cursor: not-allowed; transform: none; }
.hero-subscribe-status {
  margin: .55rem .25rem 0;
  font-family: var(--mono);
  font-size: .8rem;
  color: var(--muted);
  min-height: 1.2em;
}
.hero-subscribe-status.success { color: var(--accent-blue); font-variation-settings: "wght" 600; }
.hero-subscribe-status.error   { color: #C0392B; }

/* ───────── Bigfoot subscribe (footer inline form) ───────── */
.bigfoot-subscribe {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr minmax(0, 1.1fr);
  gap: 2rem;
  align-items: center;
  margin-bottom: clamp(2.5rem, 4vw, 3.5rem);
  padding-bottom: clamp(2rem, 3.5vw, 2.75rem);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.bigfoot-subscribe-copy { display: grid; gap: .35rem; }
.bigfoot-subscribe-kicker {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.55);
}
.bigfoot-subscribe-headline {
  font-family: var(--display);
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  font-weight: 600;
  line-height: 1.3;
  color: #fff;
}
.bigfoot-subscribe-form { display: grid; gap: .5rem; }
.bigfoot-subscribe-row {
  display: flex;
  align-items: stretch;
  gap: .5rem;
  padding: .35rem;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
}
.bigfoot-subscribe-input {
  flex: 1;
  min-width: 0;
  padding: .55rem .9rem;
  font-family: var(--sans);
  font-size: .95rem;
  color: #fff;
  background: transparent;
  border: 0;
  outline: 0;
}
.bigfoot-subscribe-input::placeholder { color: rgba(255,255,255,.45); }
.bigfoot-subscribe-button {
  flex-shrink: 0;
  padding: .55rem 1.1rem;
  font-family: var(--sans);
  font-weight: 600;
  font-size: .9rem;
  color: #0E1218;
  background: linear-gradient(135deg, #FFC56B 0%, #FF7A93 60%, #B5A6FF 100%);
  border: 0;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: transform .2s ease, filter .2s ease;
}
.bigfoot-subscribe-button:hover { transform: translateY(-1px); filter: brightness(1.05); }
.bigfoot-subscribe-button[disabled] { opacity: .65; cursor: not-allowed; transform: none; }
.bigfoot-subscribe-status {
  font-family: var(--mono);
  font-size: .78rem;
  color: rgba(255,255,255,.6);
  min-height: 1.2em;
  margin: 0;
}
.bigfoot-subscribe-status.success { color: #FFC56B; font-variation-settings: "wght" 600; }
.bigfoot-subscribe-status.error   { color: #FF8FA3; }
@media (max-width: 880px) {
  .bigfoot-subscribe { grid-template-columns: 1fr; gap: 1.25rem; }
}
