.writing,
.writing-hero,
.tag-filter,
.field-log,
.blog-pagination,
.tag-archive-heading,
.post-page,
.blog-footer {
  width: min(100%, 1240px);
  margin-inline: auto;
  padding-inline: 48px;
}

/* Homepage writing: one spread, not a second homepage. */
.writing {
  width: min(100%, 1480px);
  padding-top: 48px;
  padding-bottom: 74px;
  border-top: 2px solid rgba(58, 53, 45, 0.12);
}

/* Shared Writing showcase: album rail + independent writing, with notes below. */
.writing-showcase {
  display: grid;
  gap: 42px;
  min-width: 0;
}

.writing-showcase--index {
  width: min(100%, 1240px);
  margin-inline: auto;
  padding: 8px 48px 78px;
}

.writing-showcase__main {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(260px, 3fr);
  gap: 28px;
  align-items: start;
}

.writing-region {
  min-width: 0;
}

.writing-region__heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1.5px solid rgba(58, 53, 45, 0.22);
}

.writing-region__heading h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--hand);
  font-size: clamp(1.65rem, 2.4vw, 2.25rem);
  line-height: 1;
}

.writing-region__kicker,
.album-slide__sequence,
.writing-card__meta {
  margin: 0;
  color: var(--blue);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.11em;
}

.album-carousel {
  min-width: 0;
  touch-action: pan-y;
}

.album-stage {
  position: relative;
  min-height: 510px;
  overflow: clip;
  perspective: 1400px;
  perspective-origin: 48% 42%;
  touch-action: pan-y;
}

.album-slide {
  --album-depth: 0;
  position: absolute;
  inset: 10px 5% auto;
  z-index: calc(20 - var(--album-depth));
  display: grid;
  grid-template-columns: minmax(190px, 0.86fr) minmax(220px, 1.14fr);
  gap: 26px;
  width: 90%;
  min-height: 455px;
  padding: 24px;
  border: 1.5px solid rgba(58, 53, 45, 0.36);
  border-radius: 6px;
  background: rgba(var(--paper-card-rgb), 0.96);
  box-shadow: 10px 13px 0 rgba(64, 49, 31, 0.065);
  opacity: clamp(0, calc(1 - var(--album-depth) * 0.24), 1);
  transform: translateX(calc(var(--album-offset) * 38%)) rotateY(calc(var(--album-offset) * -22deg));
  transform-origin: center;
  transition: transform 360ms cubic-bezier(0.22, 0.72, 0.2, 1), opacity 240ms ease, box-shadow 240ms ease;
  cursor: pointer;
}

.album-slide[aria-current="true"] {
  cursor: default;
}

.album-slide[aria-current="false"] .album-slide__copy {
  opacity: 0.28;
}

.album-slide:focus-visible,
.album-cover-link:focus-visible,
.album-carousel__controls button:focus-visible,
.independent-card a:focus-visible,
.small-talk-card a:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 4px;
}

.album-cover {
  position: relative;
  display: grid;
  min-height: 365px;
  overflow: hidden;
  place-items: center;
  border: 1.5px solid rgba(58, 53, 45, 0.4);
  border-radius: 3px 7px 7px 3px;
  background:
    linear-gradient(145deg, rgba(39, 91, 168, 0.82), rgba(27, 55, 92, 0.96)),
    var(--blue);
  box-shadow: inset 13px 0 18px rgba(0, 0, 0, 0.16), 7px 8px 0 rgba(64, 49, 31, 0.08);
}

.album-cover-link {
  display: grid;
  min-width: 0;
  color: inherit;
}

.album-cover::after {
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  content: "";
  pointer-events: none;
}

.album-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Album detail covers should read like a book, not a full-bleed poster. */
.album-page__cover {
  width: min(100%, 180px);
  min-height: 0;
  margin: 4px auto 28px;
}

.album-page__cover img {
  display: block;
  height: auto;
  object-fit: contain;
}

.album-cover__monogram {
  color: rgba(255, 255, 255, 0.9);
  font-family: var(--hand);
  font-size: clamp(5rem, 12vw, 8rem);
  font-weight: 950;
  text-shadow: 3px 4px 0 rgba(0, 0, 0, 0.14);
}

.album-slide__copy {
  align-self: center;
  min-width: 0;
  transition: opacity 220ms ease;
}

.album-slide__copy h3 {
  margin: 16px 0 12px;
  color: var(--ink);
  font-family: var(--hand);
  font-size: clamp(1.8rem, 3.2vw, 2.85rem);
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.album-slide__copy h3 a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.album-slide__description {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.6;
}

.album-track-list {
  display: grid;
  gap: 0;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.album-track-list li {
  border-top: 1px solid rgba(58, 53, 45, 0.16);
}

.album-track-list a {
  display: grid;
  grid-template-columns: 2ch minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  min-height: 44px;
  padding: 10px 0;
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.4;
}

.album-track__number {
  color: var(--blue);
  font-family: var(--mono);
  font-size: 0.65rem;
}

.album-slide__empty {
  margin: 24px 0 0;
  color: var(--muted);
  font-family: var(--hand);
}

.album-carousel__controls {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
}

.album-carousel__controls button {
  width: 44px;
  height: 44px;
  border: 1.5px solid var(--blue);
  border-radius: 50%;
  color: var(--blue);
  background: rgba(var(--paper-card-rgb), 0.78);
  font-size: 1.2rem;
  cursor: pointer;
}

.album-carousel__controls button:disabled {
  opacity: 0.3;
  cursor: default;
}

.album-carousel__controls p {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.69rem;
  text-align: center;
}

.independent-list {
  display: grid;
  gap: 12px;
}

.independent-card {
  min-width: 0;
}

.independent-card__link {
  display: block;
  padding: 18px 18px 20px;
  border: 1.5px solid rgba(58, 53, 45, 0.3);
  border-radius: 4px;
  color: inherit;
  background: rgba(var(--paper-card-rgb), 0.62);
  text-decoration: none;
  transition: border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.independent-card__link:hover {
  border-color: rgba(39, 91, 168, 0.5);
  background: rgba(var(--paper-card-rgb), 0.88);
  transform: translateY(-2px);
}

.independent-card h3 {
  margin: 10px 0 0;
  color: var(--ink);
  font-family: var(--hand);
  font-size: 1.18rem;
  line-height: 1.2;
}

.independent-card__summary {
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.55;
}

.writing-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin-top: 14px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.64rem;
}

.writing-small-talks {
  grid-column: 1 / -1;
}

.small-talk-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.small-talk-card {
  display: grid;
  min-height: 160px;
  padding: 22px 24px;
  border: 1.5px solid rgba(58, 53, 45, 0.32);
  border-radius: 4px;
  background: rgba(var(--paper-card-rgb), 0.58);
  box-shadow: 5px 7px 0 rgba(64, 49, 31, 0.045);
}

.small-talk-card:nth-child(3n + 1) { transform: rotate(0.25deg); }
.small-talk-card:nth-child(3n + 2) { transform: rotate(-0.22deg); }

.small-talk-card__link {
  display: grid;
  grid-template-rows: 1fr auto;
  height: 100%;
  color: inherit;
}

.small-talk-card__link > p {
  margin: 0;
  color: var(--ink);
  line-height: 1.65;
}

.small-talk-card footer {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.68rem;
}

.small-talk-card__arrow {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--blue);
  border-radius: 50%;
  color: var(--blue);
}

.writing-region-empty {
  display: grid;
  min-height: 124px;
  padding: 24px;
  place-items: center;
  border: 1.5px dashed rgba(58, 53, 45, 0.3);
  color: var(--muted);
  background: rgba(var(--paper-card-rgb), 0.34);
  font-family: var(--hand);
  text-align: center;
}

.writing-region-empty p { margin: 0; }
.writing-region-empty--albums { min-height: 420px; }

.home-writing-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 22px;
  align-items: stretch;
}

.home-essay,
.home-note,
.home-writing-empty {
  position: relative;
  border: 2px solid rgba(58, 53, 45, 0.4);
  border-radius: 5px;
  background: rgba(var(--paper-card-rgb), 0.78);
  box-shadow: 8px 10px 0 rgba(64, 49, 31, 0.055);
}

.home-essay {
  min-height: 360px;
  padding: 36px 38px;
  overflow: hidden;
}

.home-essay::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 24px;
  width: 2px;
  background: rgba(39, 91, 168, 0.28);
  content: "";
}

.home-writing-kicker,
.writing-kicker,
.post-ledger {
  margin: 0;
  color: var(--blue);
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.12em;
}

.home-essay h3 {
  max-width: 760px;
  margin: 24px 0 16px;
  color: var(--ink);
  font-family: var(--hand);
  font-size: clamp(2rem, 3.5vw, 3.3rem);
  line-height: 1.08;
  text-wrap: balance;
}

.home-essay > p:not(.home-writing-kicker) {
  max-width: 680px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.02rem;
  line-height: 1.75;
}

.home-essay-meta,
.home-note-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 24px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.76rem;
}

.home-writing-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-top: 28px;
  color: var(--blue);
  font-family: var(--hand);
  font-size: 1.05rem;
  font-weight: 900;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.home-notes {
  display: grid;
  gap: 18px;
}

.home-essay--only,
.home-notes--only { grid-column: 1 / -1; }

.home-essay--only {
  width: min(100%, 1060px);
  min-height: 0;
  padding: 32px 34px 34px;
  justify-self: start;
}

.home-essay--only h3 {
  max-width: 720px;
  margin-top: 20px;
  margin-bottom: 14px;
  font-size: clamp(1.9rem, 3vw, 2.75rem);
  line-height: 1.12;
}

.home-essay--only > p:not(.home-writing-kicker) {
  max-width: 660px;
  line-height: 1.68;
}

.home-essay--only .home-essay-meta { margin-top: 18px; }
.home-essay--only .home-writing-link { margin-top: 20px; }

.home-notes--only { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.home-note {
  padding: 24px 26px;
}

.home-note:nth-child(odd) { transform: rotate(0.45deg); }
.home-note:nth-child(even) { transform: rotate(-0.35deg); }

.home-note-body {
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.72;
}

.home-note-body > :first-child { margin-top: 0; }
.home-note-body > :last-child { margin-bottom: 0; }

.home-writing-empty {
  grid-column: 1 / -1;
  min-height: 210px;
  padding: 40px;
}

.home-writing-empty h3 {
  margin: 0 0 12px;
  color: var(--blue);
  font-family: var(--hand);
  font-size: 1.9rem;
}

.home-writing-empty p { margin: 0; color: var(--muted); line-height: 1.7; }

/* Writing shell */
.blog-body {
  min-height: 100vh;
  overflow-x: clip;
}

.blog-body > main {
  padding-top: 78px;
}

.writing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 48px;
  align-items: end;
  padding-top: 86px;
  padding-bottom: 52px;
}

.writing-hero h1,
.tag-archive-heading h1 {
  margin: 8px 0 12px;
  color: var(--ink);
  font-family: var(--hand);
  font-size: clamp(4.4rem, 9vw, 6rem);
  font-weight: 950;
  line-height: 0.82;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
}

.writing-hero > div > p:last-child,
.tag-archive-heading > p:last-child {
  max-width: 670px;
  margin: 24px 0 0;
  color: var(--ink-soft);
  font-size: 1.08rem;
  line-height: 1.7;
}

.writing-index-note {
  display: grid;
  gap: 12px;
  min-width: 245px;
  padding: 20px 22px;
  border: 1.5px solid rgba(58, 53, 45, 0.35);
  border-radius: 4px;
  background: rgba(var(--paper-card-rgb), 0.62);
  font-family: var(--mono);
  font-size: 0.72rem;
  transform: rotate(1deg);
}

.writing-index-note span { display: flex; align-items: center; gap: 10px; }

.writing-index-note b,
.tag-filter b {
  font: inherit;
}

.legend-dot,
.field-node {
  display: block;
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  border: 2px solid var(--blue);
  border-radius: 50%;
  background: var(--paper);
}

.legend-dot--essay { background: var(--blue); }

.tag-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  padding-top: 18px;
  padding-bottom: 30px;
  border-top: 1.5px solid rgba(58, 53, 45, 0.18);
}

.tag-filter a,
.field-tags a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 12px;
  border: 1.5px solid rgba(58, 53, 45, 0.27);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(var(--paper-card-rgb), 0.35);
  font-family: var(--hand);
  font-size: 0.88rem;
  font-weight: 850;
}

.tag-filter a span { font-family: var(--mono); font-size: 0.67rem; }

.tag-filter a:hover,
.tag-filter a.active {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue);
}

.field-log {
  position: relative;
  padding-top: 12px;
  padding-bottom: 70px;
}

.field-log::before {
  position: absolute;
  top: 12px;
  bottom: 70px;
  left: 220px;
  width: 2px;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(39, 91, 168, 0.5) 0 10px,
      transparent 10px 16px
    );
  content: "";
}

.field-entry {
  position: relative;
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 50px;
  padding: 30px 0 42px;
}

.field-entry[hidden] { display: none; }

.field-node {
  position: absolute;
  top: 38px;
  left: 165px;
  z-index: 2;
  width: 14px;
  height: 14px;
}

.field-entry--essay .field-node { background: var(--blue); }

.field-entry-meta {
  display: grid;
  align-content: start;
  justify-items: end;
  gap: 7px;
  padding-top: 3px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.7rem;
  text-align: right;
}

.field-entry-meta span:first-child {
  color: var(--blue);
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.field-entry-content {
  min-width: 0;
  padding-bottom: 40px;
  border-bottom: 1.5px solid rgba(58, 53, 45, 0.2);
}

.field-entry--essay .field-entry-content {
  position: relative;
  padding: 30px 34px 32px;
  border: 1.5px solid rgba(58, 53, 45, 0.36);
  border-radius: 4px;
  background: rgba(var(--paper-card-rgb), 0.62);
  box-shadow: 7px 9px 0 rgba(64, 49, 31, 0.05);
}

.field-entry--note .field-entry-content {
  position: relative;
  width: min(100%, 760px);
  padding: 27px 32px 30px;
  border: 1.5px solid rgba(58, 53, 45, 0.34);
  border-radius: 4px;
  background: rgba(var(--paper-card-rgb), 0.56);
  box-shadow: 6px 8px 0 rgba(64, 49, 31, 0.045);
}

.field-entry--note .field-entry-content::before {
  position: absolute;
  top: -8px;
  left: 32px;
  width: 58px;
  height: 13px;
  background: rgba(102, 165, 106, 0.25);
  transform: rotate(-1deg);
  content: "";
}

.field-entry--essay .field-entry-content::before {
  position: absolute;
  top: -10px;
  right: 48px;
  width: 74px;
  height: 18px;
  background: rgba(231, 185, 54, 0.25);
  transform: rotate(1deg);
  content: "";
}

.field-entry h2 {
  max-width: 850px;
  margin: 0 0 14px;
  color: var(--ink);
  font-family: var(--hand);
  font-size: clamp(1.7rem, 3vw, 2.65rem);
  line-height: 1.12;
  text-wrap: balance;
}

.field-entry h2 a:hover { color: var(--blue); }

.field-summary {
  max-width: 760px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.75;
}

.field-note-body {
  max-width: 760px;
  color: var(--ink);
  font-size: 1.03rem;
  line-height: 1.85;
}

.field-note-body > :first-child { margin-top: 0; }
.field-note-body > :last-child { margin-bottom: 0; }

.field-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.field-tags a { min-height: 28px; padding-inline: 10px; font-size: 0.8rem; }
.field-tags a:hover { border-color: var(--blue); color: var(--blue); }

.field-permalink {
  display: inline-flex;
  gap: 8px;
  margin-top: 20px;
  color: var(--blue);
  font-family: var(--hand);
  font-size: 0.92rem;
  font-weight: 900;
}

.field-permalink:hover { text-decoration: underline; text-underline-offset: 5px; }

.writing-empty,
.filter-empty {
  margin-left: 198px;
  padding: 58px 54px;
  border: 1.5px dashed rgba(58, 53, 45, 0.35);
  background: rgba(var(--paper-card-rgb), 0.35);
}

.writing-empty > span { color: var(--blue); font-family: var(--hand); font-size: 3rem; }
.writing-empty h2 { margin: 6px 0 10px; font-family: var(--hand); font-size: 2rem; }
.writing-empty p,
.filter-empty { color: var(--muted); }

.blog-pagination {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: center;
  padding-top: 28px;
  padding-bottom: 70px;
  border-top: 1.5px solid rgba(58, 53, 45, 0.2);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.78rem;
}

.blog-pagination > :last-child { justify-self: end; }
.blog-pagination a { color: var(--blue); font-weight: 800; }

.tag-archive-heading {
  position: relative;
  padding-top: 86px;
  padding-bottom: 50px;
  border-bottom: 1.5px solid rgba(58, 53, 45, 0.2);
}

.tag-archive-heading > a {
  position: absolute;
  top: 88px;
  right: 48px;
  color: var(--blue);
  font-family: var(--hand);
  font-weight: 900;
}

.tag-archive-heading h1 { max-width: 900px; overflow-wrap: anywhere; font-size: clamp(3.8rem, 8vw, 7rem); }

/* Post: notebook margin becomes the reading structure. */
.post-page {
  padding-top: 72px;
  padding-bottom: 90px;
}

.post-heading {
  width: min(100%, 760px);
  margin-inline: auto;
  padding-bottom: 36px;
}

.post-heading h1 {
  max-width: 760px;
  margin: 16px 0 18px;
  color: var(--ink);
  font-family: var(--hand);
  font-size: clamp(2.5rem, 4vw, 3.55rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.post-deck {
  max-width: 680px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1.7;
}

.post-language-note {
  width: fit-content;
  max-width: 680px;
  margin: 18px 0 0;
  padding: 8px 12px;
  border-left: 3px solid var(--marker);
  background: rgba(231, 185, 54, 0.12);
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 0.74rem;
  line-height: 1.6;
}

.post-margin-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-top: 22px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.7rem;
  text-align: left;
}

.post-margin-meta > span:first-child {
  color: var(--blue);
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.post-margin-meta ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  width: 100%;
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
}

.post-margin-meta a { color: var(--blue); }

.post-body {
  position: relative;
  width: min(100%, 760px);
  margin-inline: auto;
  padding-top: 46px;
  border-top: 2px solid rgba(58, 53, 45, 0.25);
}

.post-body::before {
  position: absolute;
  top: -2px;
  left: -38px;
  width: 18px;
  height: 18px;
  border: 2px solid var(--blue);
  border-radius: 50%;
  background: var(--paper);
  content: "";
}

.post-page--essay .post-body::before { background: var(--blue); }

.prose {
  color: var(--ink);
  font-size: 1.06rem;
  line-height: 1.9;
  overflow-wrap: break-word;
}

.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose p,
.prose ul,
.prose ol,
.prose blockquote,
.prose pre,
.prose table { margin: 1.35em 0; }

.prose h2,
.prose h3,
.prose h4 {
  color: var(--ink);
  font-family: var(--hand);
  line-height: 1.25;
  scroll-margin-top: 30px;
}

.prose h2 { margin: 2.1em 0 0.7em; font-size: 2.15rem; }
.prose h3 { margin: 1.8em 0 0.6em; font-size: 1.55rem; color: var(--blue); }
.prose a { color: var(--blue); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.prose strong { font-weight: 850; }
.prose li + li { margin-top: 0.42em; }

.prose blockquote {
  padding: 8px 0 8px 25px;
  border-left: 4px solid var(--marker);
  color: var(--ink-soft);
  font-family: var(--hand);
  font-size: 1.15em;
}

.prose blockquote > :first-child { margin-top: 0; }
.prose blockquote > :last-child { margin-bottom: 0; }

.prose code {
  padding: 0.12em 0.34em;
  border-radius: 3px;
  background: rgba(39, 91, 168, 0.09);
  color: #174d92;
  font-family: var(--mono);
  font-size: 0.88em;
}

.prose pre {
  max-width: 100%;
  padding: 22px;
  overflow-x: auto;
  border: 1.5px solid rgba(58, 53, 45, 0.35);
  border-radius: 4px;
  background: #272925;
  color: #f6f0df;
}

.prose pre code { padding: 0; background: transparent; color: inherit; }
.prose img { width: 100%; height: auto; margin: 2em 0 0.7em; border: 1.5px solid rgba(58, 53, 45, 0.32); border-radius: 4px; }
.prose hr { margin: 3em 0; border: 0; border-top: 2px dashed rgba(58, 53, 45, 0.25); }

.prose table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.prose th,
.prose td { padding: 10px 12px; border: 1px solid rgba(58, 53, 45, 0.25); text-align: left; }
.prose th { background: rgba(200, 216, 238, 0.3); }
.prose .footnotes { margin-top: 4em; padding-top: 1.5em; border-top: 1.5px solid rgba(58, 53, 45, 0.2); font-size: 0.88rem; }

.post-navigation {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: center;
  width: min(100%, 980px);
  margin: 80px auto 0;
  padding-top: 30px;
  border-top: 1.5px solid rgba(58, 53, 45, 0.2);
}

.post-navigation > a:not(.post-back) {
  display: grid;
  max-width: 300px;
  color: var(--ink);
  font-family: var(--hand);
  font-weight: 850;
}

.post-navigation small { margin-bottom: 7px; color: var(--muted); font-family: var(--mono); font-size: 0.66rem; }
.post-navigation .post-next { justify-self: end; text-align: right; }
.post-back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--blue);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 850;
}

/* Quiet reader navigation: useful at a glance, recessive beside the writing. */
.reader-toolbar {
  position: sticky;
  top: 70px;
  z-index: 24;
  width: min(100%, 920px);
  margin: 0 auto 42px;
  border-top: 1px solid rgba(58, 53, 45, 0.22);
  border-bottom: 1px solid rgba(58, 53, 45, 0.22);
  background: rgba(var(--paper-rgb), 0.96);
  transition: background-color 200ms ease, border-color 200ms ease;
}

@supports ((-webkit-backdrop-filter: blur(10px)) or (backdrop-filter: blur(10px))) {
  .reader-toolbar {
    background: rgba(var(--paper-rgb), 0.88);
    -webkit-backdrop-filter: blur(14px) saturate(1.06);
    backdrop-filter: blur(14px) saturate(1.06);
  }
}

.reader-toolbar__inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  min-height: 56px;
  padding: 5px 8px;
}

.reader-toolbar__back,
.reader-toolbar__contents {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  color: var(--blue);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 850;
}

.reader-toolbar__back { padding-inline: 8px; }

.reader-toolbar__contents {
  padding: 0 12px;
  border: 1px solid rgba(39, 91, 168, 0.42);
  border-radius: 999px;
  background: rgba(var(--paper-card-rgb), 0.78);
  cursor: pointer;
}

.reader-toolbar__contents[hidden],
.reader-toc[hidden] {
  display: none;
}

.reader-toolbar__section {
  min-width: 0;
  margin: 0;
}

.reader-toolbar__eyebrow,
.reader-toolbar__current {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reader-toolbar__eyebrow {
  margin-bottom: 2px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.reader-toolbar__current {
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 720;
}

.reader-toolbar__percent {
  min-width: 4ch;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.69rem;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  text-align: right;
}

.reader-progress {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  overflow: hidden;
}

.reader-progress > span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 90ms linear;
}

.reader-layout {
  display: grid;
  grid-template-columns: minmax(0, 68ch);
  justify-content: center;
  width: 100%;
  font-size: 1.08rem;
}

.reader-layout .post-body {
  grid-column: 1;
  width: 100%;
  max-width: 68ch;
  margin-inline: 0;
}

.post-heading {
  width: 100%;
  max-width: 68ch;
  font-size: 1.08rem;
}

.reader-toc {
  display: none;
}

.reader-toc > p,
.reader-dialog__header h2 {
  margin: 0;
  color: var(--blue);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.reader-toc ol,
.reader-dialog ol {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.reader-toc ol { margin-top: 14px; }

.reader-toc li,
.reader-dialog li { min-width: 0; }

.reader-toc li[data-reader-level="h3"] a,
.reader-dialog li[data-reader-level="h3"] a { padding-left: 24px; }

.reader-toc a,
.reader-dialog a {
  display: block;
  min-height: 40px;
  padding: 9px 8px 9px 12px;
  border-left: 2px solid transparent;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.reader-toc a[aria-current="location"],
.reader-dialog a[aria-current="location"] {
  border-left-color: var(--blue);
  color: var(--blue);
  font-weight: 850;
}

.reader-dialog {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  color: var(--ink);
  background: transparent;
}

.reader-dialog[open] {
  display: grid;
  align-items: end;
}

.reader-dialog::backdrop {
  background: rgba(27, 27, 24, 0);
  transition: background-color 240ms ease-out;
}

.reader-dialog.is-open::backdrop {
  background: rgba(27, 27, 24, 0.42);
}

.reader-dialog__sheet {
  width: 100%;
  max-height: min(76dvh, 640px);
  padding: 20px 18px calc(24px + env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(58, 53, 45, 0.3);
  border-bottom: 0;
  border-radius: 16px 16px 0 0;
  background: var(--paper-card);
  box-shadow: 0 -12px 36px rgba(64, 49, 31, 0.13);
  transform: translateY(100%);
  transition: transform 240ms cubic-bezier(0.22, 0.72, 0.2, 1);
}

.reader-dialog.is-open .reader-dialog__sheet { transform: translateY(0); }

.reader-dialog__header {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(58, 53, 45, 0.18);
}

.reader-dialog__header button {
  display: grid;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(58, 53, 45, 0.28);
  border-radius: 50%;
  place-items: center;
  color: var(--ink-soft);
  background: transparent;
  font-size: 1.45rem;
  cursor: pointer;
}

.reader-dialog a { min-height: 44px; padding-block: 11px; }

.reader-toolbar a:focus-visible,
.reader-toolbar button:focus-visible,
.reader-toc a:focus-visible,
.reader-dialog a:focus-visible,
.reader-dialog button:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

.prose {
  font-size: 1.08rem;
  line-height: 1.88;
}

.prose h2,
.prose h3,
.prose h4 { scroll-margin-top: 158px; }

.prose h2 { margin: 2.35em 0 0.72em; font-size: clamp(1.9rem, 3vw, 2.2rem); }
.prose h3 { margin: 2em 0 0.65em; font-size: clamp(1.42rem, 2.2vw, 1.58rem); }

@media (min-width: 1240px) {
  .reader-layout {
    grid-template-columns: minmax(164px, 180px) minmax(0, 68ch) minmax(164px, 180px);
    gap: 22px;
  }

  .reader-layout .post-body { grid-column: 2; }

  .reader-toc {
    position: sticky;
    top: 140px;
    display: block;
    grid-column: 1;
    grid-row: 1;
    align-self: start;
    max-height: calc(100vh - 184px);
    padding: 16px 0;
    overflow-y: auto;
    border-top: 1px solid rgba(58, 53, 45, 0.22);
    border-bottom: 1px solid rgba(58, 53, 45, 0.22);
  }

  .reader-toolbar__contents { display: none; }
}

@media (min-width: 700px) {
  .album-page {
    display: grid;
    grid-template-columns: minmax(220px, 0.42fr) minmax(0, 1fr);
    column-gap: clamp(32px, 4.5vw, 64px);
    align-items: start;
  }

  .album-page__heading {
    grid-column: 1 / -1;
  }

  .album-page__cover {
    grid-row: 2;
    grid-column: 1;
    justify-self: end;
    width: min(100%, 320px);
    margin: 8px 0 0;
  }

  .album-page__tracks {
    grid-row: 2;
    grid-column: 2;
    width: 100%;
    max-width: 760px;
    margin: 8px 0 0;
    padding-top: 28px;
  }

  .album-page .post-navigation {
    grid-column: 1 / -1;
  }
}

.blog-footer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 30px;
  align-items: center;
  padding-top: 32px;
  padding-bottom: 42px;
  border-top: 1.5px solid rgba(58, 53, 45, 0.2);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
}

.blog-footer p { margin: 0; text-align: center; }
.blog-footer a {
  display: inline-flex;
  align-items: center;
  min-width: 44px;
  min-height: 44px;
  justify-self: end;
  color: var(--blue);
  font-weight: 850;
}

@media (max-width: 980px) {
  .writing,
  .writing-hero,
  .tag-filter,
  .field-log,
  .blog-pagination,
  .tag-archive-heading,
  .post-page,
  .blog-footer { padding-inline: 30px; }

  .home-writing-grid { grid-template-columns: 1fr; }
  .writing-showcase--index { padding-inline: 30px; }
  .writing-showcase__main { grid-template-columns: minmax(0, 1fr); }
  .small-talk-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-notes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .writing-hero { grid-template-columns: 1fr; align-items: start; }
  .writing-index-note { width: fit-content; }
  .field-log::before { left: 154px; }
  .field-entry { grid-template-columns: 92px minmax(0, 1fr); gap: 42px; }
  .field-node { left: 118px; }
  .writing-empty,
  .filter-empty { margin-left: 134px; }
  .post-heading { max-width: 68ch; }
  .post-body { max-width: 68ch; }
}

@media (max-width: 900px) {
  .blog-body .site-header {
    border-bottom: 1px solid rgba(58, 53, 45, 0.16);
    background: rgba(var(--paper-rgb), 0.96);
  }
}

@media (max-width: 640px) {
  .writing,
  .writing-hero,
  .tag-filter,
  .field-log,
  .blog-pagination,
  .tag-archive-heading,
  .post-page,
  .blog-footer { padding-inline: 18px; }

  .writing { padding-bottom: 52px; }
  .writing-showcase { gap: 32px; }
  .writing-showcase--index { padding-inline: 18px; }
  .album-stage { min-height: 760px; overflow: clip; touch-action: pan-y; }
  .album-slide {
    inset-inline: 3%;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    width: 94%;
    min-height: 700px;
    padding: 15px;
    transform: translateX(calc(var(--album-offset) * 76%)) rotateY(calc(var(--album-offset) * -22deg));
  }
  .album-cover {
    min-height: 0;
    aspect-ratio: 4 / 5;
  }
  .album-slide__copy { align-self: start; }
  .album-slide__copy h3 { font-size: clamp(1.45rem, 7vw, 2rem); }
  .album-slide__description { font-size: 0.84rem; }
  .album-track-list { margin-top: 14px; }
  .album-track-list a { font-size: 0.78rem; }
  .small-talk-list { grid-template-columns: 1fr; }
  .home-essay { min-height: 0; padding: 28px 24px 30px 34px; }
  .home-essay::before { left: 18px; }
  .home-notes { grid-template-columns: 1fr; }
  .blog-body > main { padding-top: 72px; }
  .writing-hero { gap: 30px; padding-top: 58px; padding-bottom: 38px; }
  .writing-hero h1 { font-size: min(5rem, 20vw); }
  .writing-index-note { min-width: 0; width: 100%; }
  .tag-filter { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 22px; scrollbar-width: none; }
  .tag-filter::-webkit-scrollbar { display: none; }
  .tag-filter a { flex: 0 0 auto; }
  .field-log::before { left: 25px; }
  .field-entry { grid-template-columns: 1fr; gap: 14px; padding: 28px 0 34px 28px; }
  .field-node { top: 35px; left: 1px; }
  .field-entry-meta { display: flex; flex-wrap: wrap; justify-items: start; gap: 7px 12px; padding: 0; text-align: left; }
  .field-entry--essay .field-entry-content { padding: 24px 20px; }
  .field-entry--note .field-entry-content { padding: 24px 20px; }
  .field-entry h2 { font-size: 1.8rem; }
  .writing-empty,
  .filter-empty { margin-left: 28px; padding: 36px 24px; }
  .tag-archive-heading { padding-top: 58px; }
  .tag-archive-heading > a { position: static; display: inline-block; margin: 16px 0; }
  .tag-archive-heading h1 { font-size: clamp(3.2rem, 17vw, 5rem); }
  .post-page { padding-top: 56px; padding-bottom: 60px; }
  .reader-toolbar { top: 70px; margin-bottom: 34px; }
  .reader-toolbar__inner { gap: 6px; padding-inline: 3px; }
  .reader-toolbar__back { padding-inline: 7px; }
  .reader-toolbar__eyebrow { display: none; }
  .reader-toolbar__current { font-size: 0.72rem; }
  .post-margin-meta { gap: 8px 14px; }
  .post-margin-meta ul { margin-top: 2px; }
  .post-heading h1 { font-size: clamp(2.2rem, 10vw, 3rem); line-height: 1.14; }
  .post-body { padding-top: 34px; }
  .post-body::before { display: none; }
  .prose { font-size: 1rem; line-height: 1.84; }
  .prose h2 { font-size: 1.85rem; }
  .post-navigation { grid-template-columns: 1fr 1fr; }
  .post-back { grid-column: 1 / -1; grid-row: 1; justify-self: center; }
  .blog-footer { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .blog-footer a { justify-self: center; }
}

@media (prefers-reduced-motion: reduce) {
  .album-slide,
  .album-slide__copy,
  .independent-card__link,
  .reader-toolbar,
  .reader-progress > span,
  .reader-dialog::backdrop,
  .reader-dialog__sheet {
    transition: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-note { transform: none; }
}
