:root {
  color-scheme: light;
  --bg: #f4f0ec;
  --surface: #fffdfa;
  --surface-soft: #e8e3dc;
  --surface-warm: #eee2d6;
  --text: #383a37;
  --muted: #7b7c76;
  --line: #d8d0c7;
  --accent: #8fa69a;
  --accent-strong: #596f66;
  --accent-soft: #dce4df;
  --mark: #b99a95;
  --mark-soft: #eadbd8;
  --gold: #b9a77e;
  --blue: #9aa9b5;
  --code-bg: #ebe8e3;
  --shadow: 0 24px 70px rgba(80, 77, 70, 0.14);
  --content: 760px;
}

body.theme-dark {
  color-scheme: dark;
  --bg: #242522;
  --surface: #302f2b;
  --surface-soft: #383833;
  --surface-warm: #3a332e;
  --text: #efede8;
  --muted: #bbb5aa;
  --line: #504d47;
  --accent: #aab8ad;
  --accent-strong: #d7ddd6;
  --accent-soft: #424a44;
  --mark: #d2afa8;
  --mark-soft: #4b3d3a;
  --gold: #d1c093;
  --blue: #b6c0c8;
  --code-bg: #20211f;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

* {
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  min-height: 100%;
  background-color: var(--bg);
  background-image:
    linear-gradient(90deg, color-mix(in srgb, var(--accent) 12%, transparent) 1px, transparent 1px),
    linear-gradient(180deg, color-mix(in srgb, var(--blue) 12%, transparent) 1px, transparent 1px);
  background-size: 42px 42px;
  color: var(--text);
}

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 40;
  transform: translateY(-150%);
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--surface);
  color: var(--accent-strong);
  font-weight: 800;
  text-decoration: none;
  box-shadow: var(--shadow);
}

.skip-link:focus {
  transform: translateY(0);
  outline: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  z-index: 5;
  width: var(--scroll-progress, 0%);
  height: 3px;
  background: var(--accent);
}

.burger__container {
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
  justify-content: space-between;
}

.burger__meat {
  background: var(--text);
}

.nav {
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.nav__list {
  width: auto;
  text-align: left;
}

.nav__list a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 0.75rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: 0;
}

.nav__list a::before,
.search-toggle::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  margin-right: 0.5rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  opacity: 0.55;
}

.nav__list a.active,
.nav__list a:hover,
.nav__list a:focus-visible,
.search-toggle:hover,
.search-toggle:focus-visible {
  background: var(--accent-soft);
  color: var(--accent-strong);
  outline: none;
}

.not-found-modern {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(15rem, 0.7fr);
  gap: clamp(1.25rem, 4vw, 3rem);
  width: min(100%, 1060px);
  margin: 0 auto;
  padding: clamp(1.4rem, 4vw, 3rem);
  border: 1px solid color-mix(in srgb, var(--line) 78%, var(--accent));
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent-soft) 56%, transparent), transparent 46%),
    color-mix(in srgb, var(--surface) 86%, transparent);
  box-shadow: var(--shadow);
}

.not-found-modern__copy span,
.not-found-modern__routes span,
.not-found-latest a span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
  text-transform: uppercase;
}

.not-found-modern h1 {
  margin: 0.45rem 0 0;
  color: var(--text);
  font-size: clamp(2.4rem, 8vw, 5.8rem);
  line-height: 0.95;
}

.not-found-modern__copy p {
  max-width: 42rem;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.65;
}

.not-found-search {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: end;
  margin-top: 1.5rem;
}

.not-found-search label {
  display: grid;
  flex: 1 1 16rem;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
  text-transform: uppercase;
}

.not-found-search input {
  min-height: 2.75rem;
  width: 100%;
  border: 1px solid color-mix(in srgb, var(--line) 80%, var(--accent));
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  color: var(--text);
  font: inherit;
  padding: 0.7rem 0.85rem;
}

.not-found-search button {
  min-height: 2.75rem;
  padding: 0 1rem;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: var(--surface);
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.not-found-search input:focus,
.not-found-search button:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 42%, transparent);
  outline-offset: 2px;
}

.not-found-modern__routes,
.not-found-latest__items {
  display: grid;
  gap: 0.75rem;
}

.not-found-modern__routes a,
.not-found-latest__items a {
  display: grid;
  gap: 0.3rem;
  min-width: 0;
  padding: 1rem;
  border: 1px solid color-mix(in srgb, var(--line) 84%, var(--accent));
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-warm) 48%, transparent);
  color: var(--text);
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.not-found-modern__routes a:hover,
.not-found-modern__routes a:focus-visible,
.not-found-latest__items a:hover,
.not-found-latest__items a:focus-visible {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: var(--accent-soft);
  outline: none;
}

.not-found-modern__routes strong,
.not-found-latest__items strong {
  overflow-wrap: anywhere;
  line-height: 1.28;
}

.not-found-latest {
  grid-column: 1 / -1;
  display: grid;
  gap: 0.8rem;
}

.not-found-latest h2 {
  margin: 0;
  color: var(--text);
  font-size: 1.2rem;
}

.not-found-latest__items {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.not-found-latest__items small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 780;
}

.search-toggle {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 0.75rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: 0;
  cursor: pointer;
}

.mobile-search-toggle {
  display: none;
  min-height: 34px;
  padding: 0 0.75rem;
  border: 1px solid color-mix(in srgb, var(--line) 80%, var(--accent));
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  color: var(--muted);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 750;
}

.mobile-search-toggle:hover,
.mobile-search-toggle:focus-visible {
  border-color: var(--accent);
  color: var(--accent-strong);
  outline: none;
}

main {
  width: 100%;
  min-height: 100vh;
  overflow-x: clip;
}

body.is-inner-page main {
  display: flow-root;
}

body.is-inner-page main::before {
  content: "";
  position: fixed;
  inset: 0 0 0 132px;
  z-index: -1;
  background: transparent;
  pointer-events: none;
}

.splash-container {
  display: grid;
  align-items: center;
  min-height: calc(100vh - 5rem);
  padding: clamp(1.25rem, 4vw, 3rem) 0;
}

.splash {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(17rem, 0.72fr);
  column-gap: clamp(2rem, 6vw, 5rem);
  row-gap: 1.25rem;
  align-items: center;
  width: min(100%, 1060px);
  margin: 0 auto;
  min-height: clamp(24rem, 54vh, 32rem);
  padding: clamp(2rem, 5vw, 3.5rem);
  border-left: 6px solid var(--accent);
  border-radius: 0 8px 8px 0;
  background:
    linear-gradient(115deg, color-mix(in srgb, var(--surface) 88%, transparent), color-mix(in srgb, var(--surface-warm) 56%, transparent)),
    color-mix(in srgb, var(--surface) 76%, transparent);
  box-shadow: 0 24px 70px rgba(80, 77, 70, 0.1);
  backdrop-filter: blur(10px);
}

.home-highlights {
  display: grid;
  grid-template-columns: minmax(180px, 0.72fr) minmax(0, 1.65fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  width: min(100%, 1060px);
  margin: 0 auto 4rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid color-mix(in srgb, var(--line) 74%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  box-shadow: 0 20px 60px rgba(80, 77, 70, 0.08);
  backdrop-filter: blur(10px);
}

.home-highlights__intro span {
  color: var(--mark);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.home-highlights__intro h2 {
  margin-top: 0.45rem;
  color: var(--text);
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 1;
}

.home-highlights__intro p {
  color: var(--muted);
}

.home-highlights__list {
  display: grid;
  gap: 0.8rem;
}

.home-highlight {
  display: grid;
  gap: 0.4rem;
  padding: 1rem;
  border: 1px solid color-mix(in srgb, var(--line) 84%, var(--accent));
  border-radius: 8px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--accent-soft) 42%, transparent), transparent 46%),
    color-mix(in srgb, var(--surface) 88%, transparent);
  color: var(--text);
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.home-highlight:hover,
.home-highlight:focus-visible {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
  outline: none;
}

.home-highlight span,
.home-highlight small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.home-highlight h3 {
  margin: 0;
  line-height: 1.25;
}

.home-highlight p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.reading-history-panel {
  display: grid;
  grid-template-columns: minmax(180px, 0.72fr) minmax(0, 1.65fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  width: min(100%, 1060px);
  margin: -2.5rem auto 4rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid color-mix(in srgb, var(--line) 80%, var(--mark));
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--gold) 16%, transparent), transparent 42%),
    color-mix(in srgb, var(--surface-warm) 72%, transparent);
  box-shadow: 0 20px 60px rgba(80, 77, 70, 0.08);
  backdrop-filter: blur(10px);
}

.reading-history-panel__head span {
  color: var(--mark);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.reading-history-panel__head h2 {
  margin: 0.45rem 0 0;
  color: var(--text);
  font-size: clamp(1.65rem, 3.5vw, 2.6rem);
  line-height: 1;
}

.reading-history-panel__items {
  display: grid;
  gap: 0.8rem;
}

.reading-history-panel__items a {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
  padding: 1rem;
  border: 1px solid color-mix(in srgb, var(--line) 82%, var(--mark));
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  color: var(--text);
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.reading-history-panel__items a:hover,
.reading-history-panel__items a:focus-visible {
  transform: translateY(-2px);
  border-color: var(--mark);
  background: color-mix(in srgb, var(--surface) 92%, var(--gold));
  outline: none;
}

.reading-history-panel__items span,
.reading-history-panel__items small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 820;
}

.reading-history-panel__items strong {
  overflow-wrap: anywhere;
  line-height: 1.28;
}

.home-content-map {
  display: grid;
  grid-template-columns: minmax(180px, 0.72fr) minmax(0, 1.65fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  width: min(100%, 1060px);
  margin: -2.5rem auto 4rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid color-mix(in srgb, var(--line) 78%, var(--accent));
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--blue) 18%, transparent), transparent 42%),
    color-mix(in srgb, var(--surface) 78%, transparent);
  box-shadow: 0 20px 60px rgba(80, 77, 70, 0.08);
  backdrop-filter: blur(10px);
}

.home-map__intro span,
.home-topic-rail > span {
  color: var(--mark);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.home-map__intro h2 {
  margin: 0.45rem 0 0;
  color: var(--text);
  font-size: clamp(1.75rem, 4vw, 2.85rem);
  line-height: 1;
}

.home-map__intro p {
  color: var(--muted);
}

.home-map__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.home-map-card {
  display: grid;
  align-content: space-between;
  min-height: 9.5rem;
  padding: 1rem;
  border: 1px solid color-mix(in srgb, var(--line) 84%, var(--accent));
  border-radius: 8px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 88%, transparent), color-mix(in srgb, var(--surface-warm) 48%, transparent));
  color: var(--text);
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.home-map-card span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.home-map-card strong {
  color: var(--accent-strong);
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  line-height: 1;
}

.home-map-card small {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.home-map-card:hover,
.home-map-card:focus-visible {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
  outline: none;
}

.home-topic-rail {
  grid-column: 2;
  display: grid;
  gap: 0.7rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.home-topic-rail__items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.home-topic-rail__items a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2rem;
  padding: 0.25rem 0.7rem;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent-soft) 74%, var(--surface));
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
}

.home-topic-rail__items small {
  color: color-mix(in srgb, currentColor 66%, transparent);
  font-size: 0.72rem;
}

.home-topic-rail__items a:hover,
.home-topic-rail__items a:focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
  outline: none;
}

.subscribe-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  width: min(100%, 1060px);
  margin: -2.5rem auto 4rem;
  padding: clamp(1rem, 3vw, 1.4rem);
  border: 1px solid color-mix(in srgb, var(--line) 82%, var(--accent));
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--gold) 18%, transparent), transparent 42%),
    color-mix(in srgb, var(--surface) 82%, transparent);
  box-shadow: 0 20px 60px rgba(80, 77, 70, 0.08);
  backdrop-filter: blur(10px);
}

.subscribe-panel--post {
  width: 100%;
  margin: 2rem 0 0;
  box-shadow: none;
}

.subscribe-panel__copy {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.subscribe-panel__copy span {
  color: var(--mark);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.subscribe-panel__copy h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.25rem, 3vw, 1.8rem);
  line-height: 1.15;
}

.subscribe-panel__copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.subscribe-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.subscribe-panel__actions a,
.subscribe-panel__actions button {
  display: inline-flex;
  align-items: center;
  min-height: 2.15rem;
  padding: 0.3rem 0.75rem;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  color: var(--accent-strong);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}

.subscribe-panel__actions a:hover,
.subscribe-panel__actions a:focus-visible,
.subscribe-panel__actions button:hover,
.subscribe-panel__actions button:focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
  outline: none;
}

.splash::after {
  content: "2020-2021";
  position: absolute;
  right: clamp(1.2rem, 4vw, 3rem);
  bottom: clamp(1rem, 4vw, 2.5rem);
  z-index: -1;
  color: color-mix(in srgb, var(--accent) 15%, transparent);
  font-size: clamp(4rem, 12vw, 9rem);
  font-weight: 850;
  line-height: 0.8;
  pointer-events: none;
}

.splash::before {
  content: "Personal archive / Code, coffee and notes";
  grid-column: 1 / -1;
  justify-self: start;
  display: inline-flex;
  margin-bottom: 0.25rem;
  padding: 0.42rem 0.72rem;
  border: 1px solid color-mix(in srgb, var(--accent) 36%, var(--line));
  border-radius: 999px;
  color: var(--accent-strong);
  background: color-mix(in srgb, var(--accent-soft) 82%, var(--surface));
  font-size: 0.78rem;
  font-weight: 700;
}

.splash h1,
#post__title {
  margin-top: 0;
  color: var(--text);
  line-height: 1.04;
  letter-spacing: 0;
}

#post__title {
  max-width: 100%;
  font-size: clamp(2.1rem, 4vw, 3.7rem);
  line-height: 1.08;
}

.splash h1 {
  grid-column: 1;
  grid-row: 2 / span 3;
  align-self: center;
  max-width: 10.5em;
  margin: 0;
  font-size: clamp(2.6rem, 5.4vw, 4.9rem);
  text-wrap: balance;
}

.splash h4,
.handle,
.post__date {
  color: var(--muted);
}

.handle {
  grid-column: 2;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 2.25rem;
  margin: 0;
  padding: 0.35rem 0.75rem;
  border: 1px solid color-mix(in srgb, var(--line) 78%, var(--accent));
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 76%, transparent);
  font-size: 1.05rem;
  font-weight: 700;
}

.splash h4 {
  grid-column: 2;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin: 0;
  padding: 0.55rem 0.8rem;
  border-left: 3px solid var(--mark);
  background: color-mix(in srgb, var(--mark-soft) 55%, transparent);
  font-size: 0.98rem;
  font-weight: 780;
}

.fancy {
  color: var(--mark);
}

.social-icons {
  grid-column: 2;
  justify-content: flex-start;
  align-self: start;
  gap: 0.65rem;
  margin-top: 0.25rem;
}

.social-icons__link {
  position: relative;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--social-color, var(--accent)) 28%, var(--line));
  border-radius: 999px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--social-color, var(--accent)) 16%, var(--surface)), var(--surface) 68%);
  color: var(--social-color, var(--accent-strong));
  box-shadow: 0 10px 28px rgba(80, 77, 70, 0.08);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.social-icons__link::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid color-mix(in srgb, currentColor 13%, transparent);
  border-radius: inherit;
  pointer-events: none;
}

.social-icons__link:not(:last-child) {
  margin-right: 0;
}

.social-icons__link:hover,
.social-icons__link:focus-visible {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, currentColor 48%, var(--line));
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--social-color, var(--accent)) 24%, var(--surface)), var(--surface) 70%);
  box-shadow: 0 16px 36px rgba(80, 77, 70, 0.14);
  outline: none;
}

.social-icons__link .social-icons__icon {
  width: 1.22rem;
  height: 1.22rem;
  background-color: currentColor;
  background-image: none !important;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  -webkit-mask: var(--social-mask) center / contain no-repeat;
  mask: var(--social-mask) center / contain no-repeat;
}

.social-icons__link[title="GitHub"] {
  --social-color: #5f6560;
  --social-mask: url("/svg/github.svg");
}

.social-icons__link[title="LinkedIn"] {
  --social-color: #627f9f;
  --social-mask: url("/svg/linkedin.svg");
}

.social-icons__link[title="Email"] {
  --social-color: #9d7b71;
  --social-mask: url("/svg/email.svg");
}

.social-icons__link[title="Weibo"] {
  --social-color: #b17876;
  --social-mask: url("/svg/weibo.svg");
}

.social-icons__link[title="Music"] {
  --social-color: #9f6d78;
  --social-mask: url("/svg/music.svg");
}

.social-icons__link[title="Instagram"] {
  --social-color: #8f789d;
  --social-mask: url("/svg/instagram.svg");
}

.post-list__container,
.post,
.post__container {
  width: 100%;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  width: min(100%, 1080px);
  max-width: 1080px;
  margin: 0 auto 1rem;
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: capitalize;
}

.breadcrumbs a {
  color: var(--accent-strong);
  text-decoration: none;
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

.post-list__container {
  display: grid;
  grid-template-columns: minmax(190px, 0.72fr) minmax(0, 1.9fr);
  gap: clamp(1.75rem, 5vw, 4rem);
  align-items: start;
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid color-mix(in srgb, var(--line) 74%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 76%, transparent);
  box-shadow: 0 20px 60px rgba(80, 77, 70, 0.08);
  backdrop-filter: blur(10px);
}

.post-list__container::before {
  content: "Archive";
  display: block;
  grid-column: 1;
  grid-row: 1;
  margin-bottom: 1.75rem;
  color: var(--text);
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 780;
  line-height: 1;
}

.post-list {
  position: relative;
  grid-column: 2;
  grid-row: 1 / span 4;
  display: grid;
  gap: 0.75rem;
  padding: 0;
  list-style: none;
}

.post-list::before {
  content: "";
  position: absolute;
  top: 0.75rem;
  bottom: 0.75rem;
  left: 0.52rem;
  width: 1px;
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--accent) 42%, var(--line)), transparent);
}

.post-list__container > .tags__list {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  margin: 0;
  padding: 1rem 0 0;
  border-top: 1px solid var(--line);
}

.post-list__container > .tags__list::before {
  content: "Topics";
  flex-basis: 100%;
  margin-bottom: 0.75rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.post-list__container:not(:has(> .tags__list)) {
  grid-template-columns: minmax(190px, 0.72fr) minmax(0, 1.9fr);
  gap: clamp(1.75rem, 5vw, 4rem);
}

.post-list__container:not(:has(> .tags__list)) .archive-tools {
  grid-row: 2;
  margin-top: 0;
}

.archive-tools {
  grid-column: 1;
  grid-row: 3;
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.archive-tools::after {
  content: var(--visible-items);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.archive-stats {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 0.55rem;
  align-items: baseline;
}

.archive-stats strong {
  color: var(--text);
  font-size: 1.65rem;
  line-height: 1;
}

.archive-stats span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.archive-filter {
  display: grid;
  gap: 0.4rem;
}

.archive-filter span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.archive-filter input {
  width: 100%;
  min-height: 2.35rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  color: var(--text);
  font: inherit;
  padding: 0 0.75rem;
}

.archive-filter input:focus {
  border-color: var(--accent);
  outline: none;
}

.archive-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.archive-chips button {
  min-height: 1.9rem;
  padding: 0.2rem 0.65rem;
  border: 1px solid color-mix(in srgb, var(--line) 78%, var(--accent));
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  color: var(--muted);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.archive-chips button.is-active,
.archive-chips button:hover,
.archive-chips button:focus-visible {
  background: var(--accent-soft);
  color: var(--accent-strong);
  outline: none;
}

.archive-chips span {
  color: color-mix(in srgb, currentColor 72%, transparent);
}

.taxonomy-explorer {
  grid-column: 1;
  grid-row: 3;
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

body:has(.taxonomy-explorer) .post-list__container > .tags__list {
  display: none;
}

body:has(.taxonomy-explorer) .post-list__container::before {
  margin-bottom: 0.5rem;
}

body:has(.taxonomy-explorer) .taxonomy-explorer {
  grid-row: 2;
  margin-top: 0;
}

.taxonomy-summary {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 0.55rem;
  align-items: baseline;
}

.taxonomy-summary strong {
  color: var(--text);
  font-size: 1.65rem;
  line-height: 1;
}

.taxonomy-summary span,
.taxonomy-filter span,
.taxonomy-recent > span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.taxonomy-filter {
  display: grid;
  gap: 0.4rem;
}

.taxonomy-filter input {
  width: 100%;
  min-height: 2.35rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  color: var(--text);
  font: inherit;
  padding: 0 0.75rem;
}

.taxonomy-filter input:focus {
  border-color: var(--accent);
  outline: none;
}

.taxonomy-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.taxonomy-cloud__item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2rem;
  padding: 0.25rem 0.7rem;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--line));
  border-radius: 999px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent-soft) 72%, transparent), color-mix(in srgb, var(--surface) 88%, transparent));
  color: var(--accent-strong);
  font-size: calc(0.82rem * var(--weight, 1));
  font-weight: 800;
  text-decoration: none;
}

.taxonomy-cloud__item small {
  color: color-mix(in srgb, currentColor 66%, transparent);
  font-size: 0.72em;
}

.taxonomy-cloud__item:hover,
.taxonomy-cloud__item:focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
  outline: none;
}

.taxonomy-empty {
  margin: 0;
  padding: 0.85rem;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
}

.taxonomy-recent {
  display: grid;
  gap: 0.55rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.taxonomy-recent a {
  display: grid;
  gap: 0.25rem;
  padding: 0.75rem;
  border: 1px solid color-mix(in srgb, var(--line) 84%, var(--accent));
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-warm) 42%, transparent);
  color: var(--text);
  text-decoration: none;
}

.taxonomy-recent a:hover,
.taxonomy-recent a:focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
  outline: none;
}

.taxonomy-recent small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.year-divider {
  display: grid;
  grid-template-columns: auto minmax(2rem, 1fr);
  gap: 0.75rem;
  align-items: center;
  margin: 0.65rem 0 -0.25rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0;
}

.year-divider::after {
  content: "";
  height: 1px;
  background: var(--line);
}

.post-list__container.is-filtered-empty .post-list::after {
  content: "No matching entries.";
  display: block;
  padding: 1rem;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
}

.post-list > .post,
.pagination__item {
  border: 1px solid color-mix(in srgb, var(--line) 84%, transparent);
  border-radius: 8px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--surface-warm) 46%, transparent), transparent 48%),
    color-mix(in srgb, var(--surface) 84%, transparent);
  box-shadow: none;
}

.post-list > .post {
  position: relative;
  margin-left: 1.25rem;
  min-height: 7.1rem;
  padding: 1.1rem 1.2rem 1.45rem;
  overflow: hidden;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.post-list > .post::after {
  content: "";
  position: absolute;
  left: 1.2rem;
  bottom: 0.82rem;
  width: clamp(5.5rem, 18vw, 10.5rem);
  height: 4px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, var(--accent) 0 42%, var(--mark) 42% 68%, var(--gold) 68% 100%);
  opacity: 0.72;
}

.post-list > .post::before {
  content: "";
  position: absolute;
  top: 1.15rem;
  left: -1.32rem;
  width: 0.72rem;
  height: 0.72rem;
  border: 2px solid color-mix(in srgb, var(--accent) 70%, var(--surface));
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--surface) 76%, transparent);
}

.post-list > .post:hover {
  transform: translateX(3px);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--accent-soft) 54%, transparent), transparent 50%),
    color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: 0 14px 34px rgba(80, 77, 70, 0.1);
}

.post-list > .post.is-clickable {
  cursor: pointer;
}

.post-list > .post.is-clickable:focus-visible {
  transform: translateX(3px);
  border-color: var(--accent);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--accent-soft) 58%, transparent), transparent 50%),
    color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent), 0 14px 34px rgba(80, 77, 70, 0.1);
  outline: none;
}

.post-list > .post:hover::before {
  background: var(--accent);
  border-color: var(--surface);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent-soft) 82%, transparent);
}

.post-list > .post.is-clickable:focus-visible::before {
  background: var(--accent);
  border-color: var(--surface);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent-soft) 82%, transparent);
}

.post__title a,
.pagination__title {
  color: var(--text);
}

.post-list .post__header {
  display: grid;
  grid-template-areas:
    "date kind"
    "title title";
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem 0.75rem;
  align-items: start;
  margin: 0;
  padding: 0;
  border-bottom: 0;
}

.post-list .post__header::after {
  display: none;
}

.post-list .post__date {
  grid-area: date;
  display: inline-flex;
  align-items: center;
  justify-self: start;
  min-height: 1.65rem;
  padding: 0.15rem 0.55rem;
  border: 1px solid color-mix(in srgb, var(--line) 80%, var(--accent));
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 800;
}

.post-list .post__title {
  grid-area: title;
  margin-top: 0.4rem;
  margin-bottom: 0;
}

.post-list .post__title a {
  display: inline;
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.post__title a:hover,
.post__content a:hover,
.pagination__item:hover .pagination__title {
  color: var(--accent-strong);
}

.post-card-footer {
  grid-area: kind;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  align-self: start;
  margin: 0;
}

.post-card-footer span {
  display: inline-flex;
  align-items: center;
  min-height: 1.85rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 850;
}

.post-card-footer span {
  border: 1px solid color-mix(in srgb, var(--line) 84%, var(--mark));
  background: color-mix(in srgb, var(--surface-warm) 52%, transparent);
  color: var(--muted);
}

.tags__list {
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0.45rem;
  padding: 0;
}

.tag__item {
  margin-right: 0;
  line-height: 1;
}

.tag__link {
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent-soft) 74%, var(--surface));
  color: var(--accent-strong);
  font-weight: 700;
}

.tag__link:hover {
  background: color-mix(in srgb, var(--accent-soft) 70%, var(--surface));
}

.flex-wrapper {
  display: grid;
  grid-template-columns: minmax(0, var(--content)) minmax(12.5rem, 14rem);
  gap: clamp(1rem, 2vw, 1.35rem);
  align-items: start;
  width: min(100%, 1080px);
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(1rem, 2vw, 1.5rem);
  border: 1px solid color-mix(in srgb, var(--line) 74%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  box-shadow: 0 20px 60px rgba(80, 77, 70, 0.08);
  backdrop-filter: blur(10px);
}

.post__container {
  min-width: 0;
}

.post {
  max-width: var(--content);
  margin: 0;
  padding: 0 0 4rem;
}

.post__header {
  position: relative;
  margin-bottom: 2.5rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--line);
}

.post__header::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 7rem;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--mark), var(--gold));
}

.post__header h5 {
  display: inline-flex;
  margin-top: 1rem;
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.75rem;
}

.post-meta-modern {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.post-meta-modern span {
  display: inline-flex;
  align-items: center;
  min-height: 1.8rem;
  padding: 0.25rem 0.65rem;
  border: 1px solid color-mix(in srgb, var(--line) 80%, var(--accent));
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-warm) 54%, transparent);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.mobile-outline {
  display: none;
  margin: -1rem 0 2rem;
  border: 1px solid color-mix(in srgb, var(--line) 82%, var(--accent));
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent-soft) 46%, transparent), transparent),
    color-mix(in srgb, var(--surface) 88%, transparent);
  overflow: hidden;
}

.mobile-outline summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3rem;
  padding: 0.75rem 1rem;
  color: var(--text);
  cursor: pointer;
  list-style: none;
}

.mobile-outline summary::-webkit-details-marker {
  display: none;
}

.mobile-outline summary span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.mobile-outline summary strong {
  color: var(--accent-strong);
  font-size: 0.82rem;
}

.mobile-outline nav {
  display: grid;
  gap: 0.15rem;
  padding: 0 1rem 1rem;
}

.mobile-outline__link {
  display: block;
  padding: 0.45rem 0.65rem;
  border-left: 2px solid transparent;
  border-radius: 0 8px 8px 0;
  color: var(--muted);
  line-height: 1.35;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.mobile-outline__link--h3 {
  margin-left: 0.75rem;
  font-size: 0.9rem;
}

.mobile-outline__link:hover,
.mobile-outline__link:focus-visible {
  border-left-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
  outline: none;
}

.reading-map {
  display: grid;
  gap: 0.85rem;
  min-width: 0;
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid color-mix(in srgb, var(--line) 78%, var(--mark));
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--mark-soft) 52%, transparent), transparent 48%),
    color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow: 0 12px 32px rgba(80, 77, 70, 0.08);
}

.reading-map__head {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.reading-map__head span,
.reading-map__next span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.reading-map__head strong {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.reading-map__meter {
  overflow: hidden;
  height: 0.42rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line) 70%, transparent);
}

.reading-map__meter span {
  display: block;
  width: var(--reading-progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--mark), var(--gold));
  transition: width 120ms ease;
}

.reading-map__meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.reading-map__meta span {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
  padding: 0.65rem 0.55rem;
  border: 1px solid color-mix(in srgb, var(--line) 86%, var(--accent));
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-warm) 42%, transparent);
}

.reading-map__meta strong {
  color: var(--accent-strong);
  font-size: 1rem;
  line-height: 1;
}

.reading-map__meta small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.reading-map__next {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
  padding: 0.75rem;
  border: 1px solid color-mix(in srgb, var(--line) 84%, var(--accent));
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 76%, transparent);
  color: var(--text);
  text-decoration: none;
}

.reading-map__next strong {
  color: var(--text);
  font-size: 0.86rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.reading-map__next:hover,
.reading-map__next:focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
  outline: none;
}

.toc-container .reading-map {
  margin: 0;
}

.toc-container .reading-map {
  gap: 0.65rem;
  padding: 0.8rem;
  box-shadow: none;
}

.toc-container .reading-map__meta {
  grid-template-columns: 1fr;
  gap: 0.4rem;
}

.toc-container .reading-map__meta span {
  grid-template-columns: auto 1fr;
  align-items: baseline;
  padding: 0.5rem 0.55rem;
}

.toc-container .reading-map__next {
  padding: 0.65rem;
}

.post__content {
  color: var(--text);
  font-size: 1.05rem;
}

body.is-friends-page .flex-wrapper {
  display: block;
  width: min(100%, 1060px);
  max-width: 1060px;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 2.2rem);
}

body.is-friends-page .post__container,
body.is-friends-page .post {
  width: 100%;
  max-width: none;
}

body.is-friends-page .post {
  padding-bottom: 2rem;
}

body.is-friends-page .post__header,
body.is-friends-page .post__content,
body.is-friends-page .post__footer {
  width: min(100%, 880px);
  margin-right: auto;
  margin-left: auto;
}

body.is-friends-page #post__title {
  font-size: clamp(2.8rem, 6vw, 4.8rem);
}

.friend-page-modern {
  display: block;
}

.friend-grid-modern {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem 1rem;
  margin: 1.65rem auto 0;
}

.friend-card-modern {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  gap: 0.95rem;
  align-items: center;
  min-width: 0;
  padding: 1rem;
  border: 1px solid color-mix(in srgb, var(--line) 82%, var(--accent));
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent-soft) 54%, transparent), transparent 58%),
    color-mix(in srgb, var(--surface) 90%, transparent);
  color: var(--text);
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.friend-card-modern:hover,
.friend-card-modern:focus-visible {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
  outline: none;
}

.friend-card-modern__thumb {
  display: block;
  width: 3.5rem;
  height: 3.5rem;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line) 70%, var(--mark));
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--surface-warm) 72%, transparent), transparent),
    color-mix(in srgb, var(--surface) 82%, var(--accent-soft));
  box-shadow: 0 0.5rem 1.1rem rgb(78 84 77 / 0.08);
}

.friend-card-modern__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.friend-card-modern__body {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.friend-card-modern__body strong {
  line-height: 1.25;
  overflow-wrap: break-word;
}

.friend-card-modern__body small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  overflow-wrap: anywhere;
}

body.is-friends-page .post__footer {
  display: grid;
  justify-items: center;
  gap: 1rem;
  margin-top: 2.5rem;
}

body.is-friends-page .post__footer .social-icons {
  grid-column: auto;
  justify-self: center;
  justify-content: center;
  margin: 0;
}

body.is-friends-page .post__footer p {
  margin: 0;
  text-align: center;
}

.post__content p,
.post__content li,
.post__content td,
.post__content th {
  line-height: 1.78;
}

.post__content h2,
.post__content h3 {
  margin-top: 2.5rem;
  color: var(--text);
  line-height: 1.25;
}

.post__content h2 {
  padding-left: 0.8rem;
  border-left: 4px solid var(--accent);
}

.post__content h3 {
  color: var(--accent-strong);
}

.post__content h2[id],
.post__content h3[id] {
  scroll-margin-top: 5.5rem;
}

.post__content a {
  color: var(--accent-strong);
}

.post__content h2 .anchor,
.post__content h3 .anchor,
.heading-copy {
  margin-left: 0.45rem;
  color: var(--muted);
  opacity: 0;
  transition: opacity 140ms ease, color 140ms ease, background 140ms ease;
}

.post__content h2:hover .anchor,
.post__content h3:hover .anchor,
.post__content h2:focus-within .anchor,
.post__content h3:focus-within .anchor,
.post__content h2:hover .heading-copy,
.post__content h3:hover .heading-copy,
.post__content h2:focus-within .heading-copy,
.post__content h3:focus-within .heading-copy {
  opacity: 1;
}

.heading-copy {
  min-height: 1.55rem;
  padding: 0 0.45rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 850;
  cursor: pointer;
  vertical-align: middle;
}

.post__content h2 .anchor:hover,
.post__content h3 .anchor:hover,
.heading-copy:hover,
.heading-copy:focus-visible {
  border-color: color-mix(in srgb, var(--line) 76%, var(--accent));
  background: var(--accent-soft);
  color: var(--accent-strong);
  opacity: 1;
  outline: none;
}

.post__content img {
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

pre,
code {
  background: var(--code-bg);
}

code.has-jax {
  border: inherit;
  background: inherit;
  color: inherit;
  font: inherit;
  font-size: 100%;
}

pre {
  position: relative;
  padding-top: 2.65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.code-block-enhanced::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2.3rem;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  border-radius: 8px 8px 0 0;
  background: color-mix(in srgb, var(--surface-warm) 68%, transparent);
  pointer-events: none;
}

.code-language {
  position: absolute;
  top: 0.72rem;
  left: 0.8rem;
  z-index: 1;
  max-width: calc(100% - 6.5rem);
  overflow: hidden;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-code {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 1;
  min-height: 1.8rem;
  padding: 0 0.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}

.copy-code:hover,
.copy-code:focus-visible {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-strong);
  outline: none;
}

blockquote {
  padding: 1rem 1.2rem;
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  background: color-mix(in srgb, var(--surface-warm) 52%, transparent);
  color: var(--muted);
}

blockquote::before {
  content: none;
}

table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table thead {
  background: var(--surface-soft);
}

table th,
table td {
  border-color: var(--line);
}

.toc-container {
  position: sticky;
  top: 1.5rem;
  display: grid;
  gap: 0.85rem;
  min-width: 0;
  max-height: calc(100vh - 3rem);
  overflow: auto;
  padding-left: 0.75rem;
  border-left: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
}

.toc-post-title {
  display: block;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

#TableOfContents {
  padding-top: 0.8rem;
  border-top: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
}

#TableOfContents::before {
  content: "On this page";
  display: block;
  margin-bottom: 0.45rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

#TableOfContents ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

#TableOfContents a {
  display: block;
  border-left: 2px solid transparent;
  padding: 0.25rem 0 0.25rem 0.6rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
  text-decoration: none;
  overflow-wrap: anywhere;
}

#TableOfContents a.active,
#TableOfContents a[aria-current="location"],
#TableOfContents a:hover {
  border-left-color: var(--accent);
  color: var(--accent-strong);
}

.pagination {
  gap: 1rem;
}

.pagination__item {
  padding: 1rem;
}

footer {
  color: var(--muted);
  background: transparent;
}

.post__footer {
  display: grid;
  gap: 1rem;
}

.post__footer .social-icons {
  justify-content: center;
  margin: 0;
}

.post__footer p {
  margin: 0;
  text-align: center;
}

.theme-toggle {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 10;
  display: inline-grid;
  min-width: 4.25rem;
  height: 44px;
  place-items: center;
  padding: 0 0.9rem;
  border: 1px solid color-mix(in srgb, var(--line) 70%, var(--accent));
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  color: var(--text);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  box-shadow: 0 12px 34px rgba(29, 37, 34, 0.12);
  cursor: pointer;
}

.back-to-top {
  position: fixed;
  right: 1rem;
  bottom: 4.4rem;
  z-index: 10;
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--line) 70%, var(--accent));
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  color: var(--text);
  box-shadow: 0 12px 34px rgba(29, 37, 34, 0.12);
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover,
.back-to-top:focus-visible {
  border-color: var(--accent);
  color: var(--accent-strong);
  outline: none;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  border-color: var(--accent);
  color: var(--accent-strong);
  outline: none;
}

.search-dialog {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: start center;
  padding: 12vh 1rem 1rem;
  background: rgba(56, 58, 55, 0.28);
  backdrop-filter: blur(8px);
}

.search-dialog[hidden] {
  display: none;
}

.search-panel {
  width: min(100%, 720px);
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line) 78%, var(--accent));
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: var(--shadow);
}

.search-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  padding: 1rem;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-warm) 56%, transparent);
}

.search-input {
  width: 100%;
  min-height: 2.7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  padding: 0 0.9rem;
}

.search-input:focus {
  border-color: var(--accent);
  outline: none;
}

.search-close {
  width: 2.7rem;
  min-height: 2.7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 1.4rem;
  cursor: pointer;
}

.search-results {
  display: grid;
  gap: 0.65rem;
  max-height: min(52vh, 520px);
  overflow: auto;
  padding: 0.6rem;
}

.search-summary {
  padding: 0 0.25rem 0.15rem;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.search-group {
  display: grid;
  gap: 0.45rem;
}

.command-section {
  display: grid;
  gap: 0.6rem;
  padding-bottom: 0.25rem;
}

.command-section + .search-summary {
  border-top: 1px solid var(--line);
  padding-top: 0.75rem;
}

.command-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

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

.search-group h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.command-section h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.search-group h3 span {
  display: inline-grid;
  min-width: 1.45rem;
  height: 1.45rem;
  place-items: center;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent-soft) 70%, transparent);
  color: var(--accent-strong);
  font-size: 0.72rem;
}

.command-section h3 span {
  display: inline-grid;
  min-width: 1.45rem;
  height: 1.45rem;
  place-items: center;
  border-radius: 999px;
  background: color-mix(in srgb, var(--mark-soft) 70%, transparent);
  color: var(--mark);
  font-size: 0.72rem;
}

.search-result {
  display: grid;
  gap: 0.25rem;
  padding: 0.85rem;
  border: 1px solid color-mix(in srgb, var(--line) 84%, var(--accent));
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  color: var(--text);
  text-decoration: none;
}

.search-result:hover,
.search-result:focus-visible,
.search-result.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  outline: none;
}

.search-result span {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  font-weight: 800;
}

.search-result mark {
  padding: 0.1rem 0.42rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--mark-soft) 78%, var(--surface));
  color: var(--mark);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.search-result small {
  color: var(--muted);
}

.search-empty,
.search-hint {
  color: var(--muted);
  font-size: 0.82rem;
}

.search-empty {
  margin: 0;
  padding: 0.85rem;
}

.search-hint {
  padding: 0.75rem 1rem 1rem;
  border-top: 1px solid var(--line);
}

.resource-list-modern {
  display: grid;
  gap: 0.85rem;
  margin-top: 2rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
}

.resource-list-modern__head {
  display: grid;
  gap: 0.25rem;
}

.resource-list-modern__head span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.resource-list-modern__head h2 {
  margin: 0;
  color: var(--text);
  font-size: 1.25rem;
  line-height: 1.25;
}

.resource-list-modern__items {
  display: grid;
  gap: 0.65rem;
}

.resource-list-modern__items a {
  display: grid;
  gap: 0.3rem;
  min-width: 0;
  padding: 0.85rem;
  border: 1px solid color-mix(in srgb, var(--line) 84%, var(--accent));
  border-radius: 8px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--blue) 14%, transparent), transparent 42%),
    color-mix(in srgb, var(--surface) 82%, transparent);
  color: var(--text);
  text-decoration: none;
}

.resource-list-modern__items span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.resource-list-modern__items strong {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.resource-list-modern__items a:hover,
.resource-list-modern__items a:focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
  outline: none;
}

.post__header + .reading-map,
.mobile-outline + .reading-map {
  margin: -0.5rem 0 2rem;
}

@media screen and (min-width: 800px) {
  .nav {
    width: 132px;
    padding: 2rem 1rem;
  }

  main {
    padding: 3rem 2rem 2rem calc(132px + 3rem);
  }

  .nav__list li {
    margin-bottom: 0.75rem;
  }
}

@media screen and (max-width: 799px) {
  html,
  body {
    width: 100%;
    min-width: 0;
    overflow-x: clip;
  }

  main {
    width: 100%;
    min-width: 0;
    height: auto;
    padding: 6rem 1rem 2rem;
  }

  body:not(.is-inner-page) main {
    min-height: 0;
  }

  .splash-container,
  .home-highlights,
  .home-content-map,
  .reading-history-panel,
  .subscribe-panel {
    max-width: 100%;
  }

  .nav--active .nav {
    background: color-mix(in srgb, var(--surface) 96%, transparent);
  }

  .nav__list a {
    font-size: 1.45rem;
  }

  .search-toggle {
    font-size: 1.45rem;
  }

  .mobile-search-toggle {
    display: inline-flex;
    align-items: center;
  }

  .not-found-modern {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  .not-found-search button {
    flex: 1 1 auto;
  }

  .not-found-latest__items {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .splash {
    display: grid;
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 1.4rem;
  }

  .splash::before,
  .splash h1,
  .handle,
  .splash h4,
  .splash .social-icons {
    grid-column: 1;
  }

  .splash::after {
    right: 1rem;
    bottom: 1rem;
    font-size: clamp(3rem, 22vw, 5.5rem);
  }

  .splash h1 {
    grid-row: auto;
    max-width: 100%;
  }

  .handle,
  .splash h4 {
    width: fit-content;
  }

  .home-highlights {
    display: block;
    margin: 1rem 0 3rem;
    padding: 1rem;
  }

  .home-highlights__list {
    margin-top: 1rem;
  }

  .home-content-map,
  .reading-history-panel {
    display: block;
    margin: -1.5rem 0 3rem;
    padding: 1rem;
  }

  .reading-history-panel__items {
    margin-top: 1rem;
  }

  .home-map__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 1rem;
  }

  .home-map-card {
    min-height: 8.25rem;
  }

  .home-topic-rail {
    margin-top: 1rem;
  }

  .subscribe-panel {
    grid-template-columns: 1fr;
    margin: -1.5rem 0 3rem;
    padding: 1rem;
  }

  .subscribe-panel--post {
    margin: 2rem 0 0;
  }

  .subscribe-panel__actions {
    justify-content: flex-start;
  }

  .subscribe-panel__actions a,
  .subscribe-panel__actions button {
    flex: 1 1 auto;
    justify-content: center;
  }

  body.is-inner-page main::before {
    inset: 4rem 0 0;
  }

  .splash h1,
  #post__title {
    max-width: 100%;
  }

  .flex-wrapper {
    display: block;
  }

  .post {
    max-width: none;
  }

  .social-icons {
    flex-wrap: wrap;
  }

  .post-list__container::before {
    margin-top: 0.5rem;
  }

  .post-list__container {
    display: block;
    padding: 1rem;
  }

  .post-list {
    margin-top: 1.5rem;
  }

  .post-list__container > .tags__list {
    display: flex;
    margin-bottom: 1.5rem;
  }

  body.is-friends-page .flex-wrapper {
    padding: 1rem;
  }

  body.is-friends-page .post__header,
  body.is-friends-page .post__content,
  body.is-friends-page .post__footer {
    width: 100%;
  }

  .friend-grid-modern {
    grid-template-columns: 1fr;
  }

  .archive-tools {
    margin-bottom: 1.5rem;
  }

  .taxonomy-explorer {
    margin-bottom: 1.5rem;
  }

  .search-dialog {
    place-items: start stretch;
    padding-top: 5rem;
  }

  .command-grid {
    grid-template-columns: 1fr;
  }

  .breadcrumbs {
    margin-bottom: 0.75rem;
  }

  .mobile-outline {
    display: block;
    margin: -1rem 0 2rem;
    border: 1px solid color-mix(in srgb, var(--line) 82%, var(--accent));
    border-radius: 8px;
    background:
      linear-gradient(135deg, color-mix(in srgb, var(--accent-soft) 56%, transparent), transparent),
      color-mix(in srgb, var(--surface) 88%, transparent);
    overflow: hidden;
  }

  .mobile-outline summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 3rem;
    padding: 0.8rem 1rem;
    color: var(--text);
    cursor: pointer;
    list-style: none;
  }

  .mobile-outline summary::-webkit-details-marker {
    display: none;
  }

  .mobile-outline summary span {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 850;
    text-transform: uppercase;
  }

  .mobile-outline summary strong {
    color: var(--accent-strong);
    font-size: 0.82rem;
  }

  .mobile-outline nav {
    display: grid;
    gap: 0.15rem;
    padding: 0 1rem 1rem;
  }

  .mobile-outline__link {
    display: block;
    padding: 0.5rem 0.65rem;
    border-left: 2px solid transparent;
    border-radius: 0 8px 8px 0;
    color: var(--muted);
    line-height: 1.35;
    text-decoration: none;
    overflow-wrap: anywhere;
  }

  .mobile-outline__link--h3 {
    margin-left: 0.75rem;
    font-size: 0.9rem;
  }

  .mobile-outline__link:hover,
  .mobile-outline__link:focus-visible {
    border-left-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent-strong);
    outline: none;
  }

  .reading-map {
    margin: -1rem 0 2rem;
    padding: 0.9rem;
  }

  .reading-map__meta {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

}

@media screen and (max-width: 459px) {
  .not-found-latest__items {
    grid-template-columns: 1fr;
  }

  .home-map__grid {
    grid-template-columns: 1fr;
  }

  .reading-map__meta {
    grid-template-columns: 1fr;
  }

  .home-map-card {
    min-height: 7rem;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media print {
  html,
  body {
    background: #fff !important;
    color: #111 !important;
  }

  body::before,
  .burger__container,
  .nav,
  .theme-toggle,
  .back-to-top,
  .search-dialog,
  .breadcrumbs,
  .toc-container,
  .resource-list-modern,
  .subscribe-panel,
  .social-icons,
  .post__footer {
    display: none !important;
  }

  main {
    min-height: 0;
    padding: 0 !important;
  }

  .flex-wrapper,
  .post {
    display: block !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
  }

  #post__title {
    max-width: none;
    font-size: 28pt;
    line-height: 1.15;
  }

  .post__content {
    font-size: 11pt;
  }

  .post__content a::after {
    content: " (" attr(href) ")";
    color: #555;
    font-size: 9pt;
  }

  pre,
  blockquote,
  table {
    break-inside: avoid;
  }
}
