/* Editorial Clarity theme */
:root {
  --ink: #191919;
  --ink-primary: #242424;
  --ink-2: #6b6b6b;
  --ink-muted: #757575;
  --paper: #ffffff;
  --paper-warm: #fafafa;
  --hair: #f2f2f2;
  --hair-strong: #e6e6e6;
  --outline: #c4c7c7;
  --green: #1a8917;
  --green-hover: #156f12;
  --green-bg: #edf7ee;
  --code-bg: #1e1e1e;
  --code-bar: #252526;
  --serif: 'Newsreader', Georgia, serif;
  --prose: 'Source Serif 4', Charter, Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', Menlo, monospace;
  color-scheme: light;
}
:root[data-theme='dark'] {
  --ink: #f2f2f2;
  --ink-primary: #e2e2e2;
  --ink-2: #a3a3a3;
  --ink-muted: #8a8a8a;
  --paper: #121212;
  --paper-warm: #1a1a1a;
  --hair: #222222;
  --hair-strong: #2e2e2e;
  --outline: #4a4a4a;
  --green: #4cc04a;
  --green-hover: #6ad468;
  --green-bg: #15301a;
  --code-bg: #0d0d0d;
  --code-bar: #1a1a1a;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-padding-top: 5.5rem;
}
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink-primary);
  font: 400 15px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}
::selection {
  background: var(--hair-strong);
  color: var(--ink);
}
a {
  color: inherit;
  text-decoration: none;
}
img {
  max-width: 100%;
  height: auto;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}
.icon {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 18px;
  line-height: 1;
  display: inline-block;
  vertical-align: middle;
  white-space: nowrap;
  -webkit-font-smoothing: antialiased;
}
.mono {
  font-family: var(--mono);
}
.muted {
  color: var(--ink-muted);
}
.green {
  color: var(--green);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.wrap {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.25rem;
  width: 100%;
}
@media (min-width: 768px) {
  .wrap {
    padding: 0 2rem;
  }
}

/* ---------- header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 95%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hair-strong);
}
.site-header .wrap {
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  display: grid;
  place-items: center;
  font: 600 12px var(--sans);
  letter-spacing: 0.05em;
  flex-shrink: 0;
}
.brand-name {
  display: block;
  white-space: nowrap;
  font: 700 16px/1.2 var(--serif);
  color: var(--ink);
  letter-spacing: -0.01em;
}
.brand-sub {
  display: none;
  font-size: 12px;
  color: var(--ink-muted);
  line-height: 1.2;
}
@media (min-width: 640px) {
  .brand-sub {
    display: block;
  }
}
.main-nav {
  display: none;
  gap: 1.75rem;
  font-size: 14px;
}
.main-nav a {
  color: var(--ink-2);
  padding: 0.25rem 0;
  transition: color 0.15s;
}
.main-nav a:hover,
.main-nav a.active {
  color: var(--ink);
}
.main-nav a.active {
  font-weight: 600;
}
@media (min-width: 768px) {
  .main-nav {
    display: flex;
  }
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}
.chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  border-radius: 999px;
  background: var(--paper-warm);
  border: 1px solid var(--hair-strong);
  color: var(--ink-2);
  font-size: 12px;
  transition:
    color 0.15s,
    border-color 0.15s;
}
.chip-btn:hover {
  color: var(--ink);
  border-color: var(--outline);
}
.chip-btn .icon {
  font-size: 16px;
  color: var(--ink-muted);
}
.chip-btn .label {
  display: none;
}
.gh-chip {
  display: none;
}
.gh-chip .count {
  padding: 0 0.375rem;
  border-radius: 999px;
  background: var(--hair);
  color: var(--ink);
  font-weight: 600;
  font-size: 11px;
}
@media (min-width: 480px) {
  .gh-chip {
    display: inline-flex;
  }
}
@media (min-width: 640px) {
  .chip-btn .label {
    display: inline;
  }
}
kbd {
  font: 10px var(--mono);
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  background: var(--hair);
  border: 1px solid var(--hair-strong);
  color: var(--ink-2);
}
.chip-btn kbd {
  display: none;
}
@media (min-width: 640px) {
  .chip-btn kbd {
    display: inline;
  }
}
.round-btn {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--paper-warm);
  border: 1px solid var(--hair-strong);
  display: grid;
  place-items: center;
  color: var(--ink-2);
  transition:
    color 0.15s,
    border-color 0.15s;
}
.round-btn:hover {
  color: var(--ink);
  border-color: var(--outline);
}
.round-btn .icon {
  font-size: 16px;
}
.menu-btn {
  display: grid;
}
@media (min-width: 768px) {
  .menu-btn {
    display: none;
  }
}
.mobile-nav {
  display: none;
  border-top: 1px solid var(--hair-strong);
  padding: 0.5rem 1.25rem 1rem;
}
.mobile-nav.open {
  display: flex;
  flex-direction: column;
}
.mobile-nav a {
  padding: 0.5rem 0;
  color: var(--ink-2);
}
.mobile-nav a.active {
  color: var(--ink);
  font-weight: 600;
}

main {
  flex: 1;
  padding-top: 4rem;
}
.page-body {
  padding-block: 1.75rem 3.5rem;
}

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--hair-strong);
  padding: 1.75rem 0;
  font-size: 12px;
  color: var(--ink-muted);
}
.site-footer .wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.site-footer strong {
  color: var(--ink);
  font-weight: 500;
}
.site-footer .links {
  display: flex;
  gap: 1rem;
}
.site-footer .links a:hover {
  color: var(--ink);
}
@media (min-width: 768px) {
  .site-footer .wrap {
    flex-direction: row;
  }
}

/* ---------- shared bits ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.625rem;
  border-radius: 999px;
  background: var(--paper-warm);
  border: 1px solid var(--hair);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 500;
  transition:
    background 0.15s,
    color 0.15s;
}
a.pill:hover {
  background: var(--hair-strong);
  color: var(--ink);
}
.pill.solid {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.pill.green {
  background: var(--green-bg);
  color: var(--green);
  border-color: transparent;
}
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}
.eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  font-weight: 600;
}
.card {
  border: 1px solid var(--hair-strong);
  background: var(--paper-warm);
  border-radius: 1rem;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 12px;
  color: var(--ink-2);
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.breadcrumb a {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.breadcrumb a:hover {
  color: var(--ink);
}
.breadcrumb .icon {
  font-size: 14px;
}
.breadcrumb .sep {
  font-family: var(--mono);
  color: var(--outline);
}
.breadcrumb .current {
  color: var(--ink);
  font-weight: 500;
}

/* ---------- home grid ---------- */
.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem;
}
@media (min-width: 1024px) {
  .home-grid {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    gap: 2rem;
  }
  /* sticky sidebar; the divider lives on the posts column so it spans the full height */
  .profile {
    position: sticky;
    top: 5.5rem;
    align-self: start;
    max-height: calc(100vh - 6.5rem);
    overflow-y: auto;
    scrollbar-width: none;
  }
  .home-grid > section {
    border-left: 1px solid var(--hair-strong);
    padding-left: 3rem;
  }
}
.profile {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.profile-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.profile-avatar {
  position: relative;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: var(--paper-warm);
  border: 1px solid var(--hair-strong);
  display: grid;
  place-items: center;
  font: 700 24px var(--serif);
  color: var(--ink);
}
.profile-avatar .dot {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 0.875rem;
  height: 0.875rem;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 2px var(--paper);
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: var(--green-bg);
  color: var(--green);
  font-size: 12px;
  font-weight: 500;
}
.status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  50% {
    opacity: 0.4;
  }
}
.profile h2 {
  margin: 0 0 0.375rem;
  font: 700 24px/1.2 var(--serif);
  color: var(--ink);
  letter-spacing: -0.02em;
}
.profile p {
  margin: 0;
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.65;
}
.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.stat {
  padding: 0.75rem;
  border-radius: 0.5rem;
  background: var(--paper-warm);
  border: 1px solid var(--hair);
  display: flex;
  flex-direction: column;
}
.stat span:first-child {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  font-weight: 500;
}
.stat span:last-child {
  font-size: 14px;
  color: var(--ink);
  font-weight: 600;
  margin-top: 0.125rem;
}
.stack .pill {
  color: var(--ink);
  border-color: var(--hair-strong);
  font-weight: 400;
  padding: 0.25rem 0.625rem;
}
.socials {
  display: flex;
  gap: 0.375rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--hair-strong);
}
.socials a {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--ink-muted);
  transition:
    color 0.15s,
    background 0.15s;
}
.socials a:hover {
  color: var(--ink);
  background: var(--paper-warm);
}
.section-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 14px;
}
.section-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  color: var(--ink-2);
  transition:
    background 0.15s,
    color 0.15s;
}
.section-nav a:hover {
  background: var(--paper-warm);
  color: var(--ink);
}
.section-nav a.active {
  background: var(--paper-warm);
  color: var(--ink);
  font-weight: 600;
}
.section-nav a > span:first-child {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.section-nav .icon {
  font-size: 16px;
  color: var(--ink-muted);
}
.section-nav a.active .icon {
  color: var(--green);
}
.section-nav .count {
  font: 12px var(--mono);
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  background: var(--hair);
  color: var(--ink-2);
}
.section-nav .count.plain {
  background: none;
  color: var(--ink-muted);
}

/* ---------- listing ---------- */
.list-head {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--hair-strong);
}
@media (min-width: 640px) {
  .list-head {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }
}
.list-head .path {
  display: flex;
  gap: 0.5rem;
  font: 12px var(--mono);
  color: var(--ink-muted);
  margin-bottom: 0.375rem;
}
.list-head h1 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  font: 700 30px/1.15 var(--serif);
  color: var(--ink);
  letter-spacing: -0.02em;
}
@media (min-width: 640px) {
  .list-head h1 {
    font-size: 36px;
  }
}
.list-head h1 .pill {
  font-family: var(--sans);
  font-weight: 400;
  border-color: var(--hair-strong);
}
.switcher {
  display: flex;
  padding: 0.25rem;
  border-radius: 999px;
  background: var(--paper-warm);
  border: 1px solid var(--hair-strong);
  align-self: flex-start;
}
.switcher button {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 12px;
  color: var(--ink-2);
}
.switcher button .icon {
  font-size: 15px;
}
.switcher button[aria-pressed='true'] {
  background: var(--paper);
  color: var(--ink);
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
.cat-filter {
  margin-top: 1rem;
}

.posts-list {
  display: flex;
  flex-direction: column;
}
.post-row {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: space-between;
  padding: 1.25rem 0.5rem;
  border-bottom: 1px solid var(--hair-strong);
  transition: background 0.15s;
}
.post-row:last-child {
  border-bottom: 0;
}
.post-row:hover {
  background: color-mix(in srgb, var(--paper-warm) 60%, transparent);
}
@media (min-width: 768px) {
  .post-row {
    flex-direction: row;
    align-items: center;
  }
}
.post-row .lead {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  min-width: 0;
}
.post-row .num {
  font: 500 12px var(--mono);
  color: var(--ink-muted);
  padding-top: 0.3rem;
  transition: color 0.15s;
}
.post-row:hover .num {
  color: var(--green);
}
.post-row .body {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  min-width: 0;
}
.post-row .title {
  font: 700 18px/1.35 var(--serif);
  color: var(--ink);
  letter-spacing: -0.01em;
  transition: color 0.15s;
}
.post-row .title::after {
  content: '';
  position: absolute;
  inset: 0;
} /* whole row clickable */
.post-row .pills {
  position: relative;
  z-index: 1;
}
.post-row:hover .title {
  color: var(--ink-2);
}
.post-row .excerpt {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  font: 15px/1.6 var(--prose);
  color: var(--ink-2);
  margin: 0;
}
@media (min-width: 640px) {
  .post-row .title {
    font-size: 19px;
  }
}
.post-row .meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-shrink: 0;
  font-size: 12px;
  color: var(--ink-muted);
}
@media (min-width: 768px) {
  .post-row .meta {
    justify-content: flex-end;
  }
}
.post-row .meta .icon {
  transition:
    transform 0.15s,
    color 0.15s;
}
.post-row:hover .meta .icon {
  color: var(--ink);
  transform: translateX(2px);
}

/* expanded (card) view */
.posts-list.cards {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0 2rem;
}
@media (min-width: 768px) {
  .posts-list.cards {
    grid-template-columns: 1fr 1fr;
  }
}
.posts-list.cards .post-row {
  flex-direction: column;
  align-items: stretch;
  padding: 1.25rem;
  border: 1px solid var(--hair-strong);
  border-radius: 0.75rem;
  background: var(--paper-warm);
}
.posts-list.cards .post-row:hover {
  border-color: var(--outline);
}
.posts-list.cards .excerpt {
  -webkit-line-clamp: 3;
  line-clamp: 3;
}
.posts-list.cards .meta {
  justify-content: space-between;
}

.year-head {
  margin: 2rem 0 0.25rem;
  font: 600 13px var(--mono);
  color: var(--ink-muted);
}

/* pagination */
.pager {
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--hair-strong);
  font-size: 12px;
  color: var(--ink-muted);
}
@media (min-width: 640px) {
  .pager {
    flex-direction: row;
  }
}
.pager b {
  color: var(--ink);
  font-weight: 600;
}
.pager nav {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem;
  border-radius: 999px;
  background: var(--paper-warm);
  border: 1px solid var(--hair-strong);
}
.pager nav > a,
.pager nav > span {
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.5rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  color: var(--ink-2);
  transition:
    background 0.15s,
    color 0.15s;
}
.pager nav > a:hover {
  background: var(--paper);
  color: var(--ink);
}
.pager nav .current {
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
}
.pager nav .disabled {
  opacity: 0.4;
}
.pager nav .gap {
  min-width: 1rem;
  padding: 0;
  color: var(--ink-muted);
}
.pager .icon {
  font-size: 16px;
}
.pager .word {
  display: none;
}
@media (min-width: 640px) {
  .pager .word {
    display: inline;
  }
}

.feed-tip {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 0.75rem;
  background: var(--paper-warm);
  border: 1px solid var(--hair-strong);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font: 12px var(--mono);
  color: var(--ink-2);
}
.feed-tip > span {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex-wrap: wrap;
}
.feed-tip code {
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--hair-strong);
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
  font-size: 11px;
  word-break: break-all;
}
.feed-tip button {
  display: none;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  border-radius: 0.375rem;
  background: var(--paper);
  border: 1px solid var(--hair-strong);
  font: 500 12px var(--sans);
}
.feed-tip button:hover {
  color: var(--ink);
  border-color: var(--outline);
}
@media (min-width: 640px) {
  .feed-tip button {
    display: inline-flex;
  }
}

/* ---------- article ---------- */
.article-head {
  padding-bottom: 1.5rem;
}
.article-head .pills {
  margin-bottom: 1rem;
}
.article-head .pills a {
  background: var(--hair);
  color: var(--ink-primary);
  border: 0;
  padding: 0.25rem 0.75rem;
}
.article-title {
  margin: 0 0 1.25rem;
  max-width: 56rem;
  font: 700 34px/1.18 var(--serif);
  color: var(--ink);
  letter-spacing: -0.025em;
}
@media (min-width: 640px) {
  .article-title {
    font-size: 42px;
  }
}
@media (min-width: 1024px) {
  .article-title {
    font-size: 46px;
  }
}
.byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 0;
  border-block: 1px solid var(--hair-strong);
}
.byline .who {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.byline .avatar {
  width: 2.75rem;
  height: 2.75rem;
  font: 700 14px var(--mono);
}
.byline .name {
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
}
.byline .sub {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 12px;
  color: var(--ink-2);
  flex-wrap: wrap;
}
.byline .sub .icon {
  font-size: 13px;
}
.byline .actions {
  display: flex;
  gap: 0.5rem;
}
.outline-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--hair-strong);
  font-size: 12px;
  color: var(--ink-primary);
  transition: background 0.15s;
}
.outline-btn:hover {
  background: var(--hair);
}
.outline-btn .icon {
  font-size: 15px;
}

.article-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem;
  align-items: start;
}
@media (min-width: 1024px) {
  .article-grid {
    grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
  }
}
.toc {
  display: none;
  position: sticky;
  top: 6rem;
  padding: 1.25rem;
}
@media (min-width: 1024px) {
  .toc {
    display: block;
  }
}
.toc-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--hair-strong);
  font: 600 12px var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-2);
  gap: 0.5rem;
}
.toc-head > span:first-child {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}
.toc-head .icon {
  font-size: 16px;
  color: var(--ink);
}
.toc-head .muted {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}
.toc nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 13px;
  max-height: 60vh;
  overflow-y: auto;
}
.toc nav a {
  padding: 0.375rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  color: var(--ink-2);
  transition:
    background 0.15s,
    color 0.15s;
}
.toc nav a.sub {
  padding-left: 1.5rem;
  font-size: 12px;
}
.toc nav a:hover {
  color: var(--ink);
  background: var(--hair);
}
.toc nav a.active {
  background: var(--paper);
  color: var(--ink);
  font-weight: 600;
  border-color: var(--hair-strong);
}
.toc-meta {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--hair-strong);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 12px;
  color: var(--ink-2);
}
.toc-meta div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.toc-meta .mono {
  color: var(--ink);
  font-weight: 500;
  text-align: right;
}

/* prose (rendered markdown) */
.prose {
  min-width: 0;
  font: 19px/1.78 var(--prose);
  color: var(--ink-primary);
  overflow-wrap: break-word;
}
.prose > :first-child {
  margin-top: 0;
}
.prose p,
.prose ul,
.prose ol,
.prose table,
.prose blockquote,
.prose .highlighter-rouge,
.prose figure.highlight {
  margin: 0 0 1.75rem;
}
.prose h1,
.prose h2,
.prose h3,
.prose h4 {
  font-family: var(--serif);
  color: var(--ink);
  letter-spacing: -0.015em;
  line-height: 1.3;
  font-weight: 700;
  margin: 2.75rem 0 1rem;
}
.prose h1,
.prose h2 {
  font-size: 28px;
}
.prose h3 {
  font-size: 24px;
}
.prose h4 {
  font-size: 20px;
}
@media (min-width: 640px) {
  .prose h1,
  .prose h2 {
    font-size: 30px;
  }
  .prose h3 {
    font-size: 26px;
  }
}
.prose a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--outline);
  text-underline-offset: 3px;
}
.prose a:hover {
  text-decoration-color: var(--ink);
}
.prose strong {
  color: var(--ink);
  font-weight: 600;
}
.prose ul,
.prose ol {
  padding-left: 1.5rem;
}
.prose li {
  margin: 0.35rem 0;
}
.prose li::marker {
  color: var(--ink-muted);
}
.prose hr {
  border: 0;
  border-top: 1px solid var(--hair-strong);
  margin: 2.5rem 0;
}
.prose img {
  border-radius: 6px;
  border: 1px solid var(--hair-strong);
}
.prose blockquote {
  border-left: 4px solid var(--ink);
  background: var(--paper-warm);
  border-radius: 0 0.75rem 0.75rem 0;
  padding: 1rem 1.25rem;
  font: 500 16px/1.65 var(--sans);
  color: var(--ink);
}
.prose blockquote p {
  margin: 0 0 0.5rem;
}
.prose blockquote > :last-child {
  margin-bottom: 0;
}
.prose :not(pre) > code {
  padding: 0.1rem 0.375rem;
  border-radius: 4px;
  background: var(--hair);
  border: 1px solid var(--hair-strong);
  font: 0.78em var(--mono);
  color: var(--ink);
}
.prose table {
  display: block;
  overflow-x: auto;
  border-collapse: collapse;
  font: 14px/1.5 var(--sans);
}
.prose th,
.prose td {
  border: 1px solid var(--hair-strong);
  padding: 0.5rem 0.75rem;
  text-align: left;
  vertical-align: top;
}
.prose th {
  background: var(--paper-warm);
  color: var(--ink);
  font-weight: 600;
}

/* code blocks */
.codeblock {
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid var(--hair-strong);
  background: var(--code-bg);
  margin: 0 0 1.75rem;
}
.codeblock-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  background: var(--code-bar);
  border-bottom: 1px solid #333;
  font: 12px var(--mono);
  color: #a3a3a3;
}
.codeblock-bar > span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #e5e5e5;
}
.codeblock-bar .icon {
  font-size: 15px;
  color: #a3a3a3;
}
.codeblock-bar button {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font: 12px var(--sans);
  color: #a3a3a3;
}
.codeblock-bar button:hover {
  color: #fff;
}
.codeblock-bar button .icon {
  font-size: 14px;
}
.codeblock .highlighter-rouge,
.codeblock figure.highlight,
.codeblock div.highlight {
  margin: 0;
}
.prose pre {
  margin: 0;
  padding: 1rem;
  overflow-x: auto;
  background: var(--code-bg);
  color: #e5e5e5;
  font: 13px/1.65 var(--mono);
  tab-size: 4;
}
.prose pre code {
  font: inherit;
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
}
.prose figure.highlight {
  margin: 0;
}
.prose .lineno {
  color: #6b6b6b;
  padding-right: 1rem;
  user-select: none;
}
/* rouge tokens */
.highlight .c,
.highlight .c1,
.highlight .cm,
.highlight .cs,
.highlight .cp,
.highlight .cpf {
  color: #737373;
  font-style: italic;
}
.highlight .k,
.highlight .kd,
.highlight .kn,
.highlight .kr,
.highlight .kc,
.highlight .kp,
.highlight .ow {
  color: #34d399;
  font-weight: 500;
}
.highlight .kt,
.highlight .nb,
.highlight .bp,
.highlight .nc,
.highlight .nn {
  color: #7dd3fc;
}
.highlight .nf,
.highlight .fm,
.highlight .nd {
  color: #fef08a;
  font-weight: 600;
}
.highlight .s,
.highlight .s1,
.highlight .s2,
.highlight .sb,
.highlight .sc,
.highlight .sd,
.highlight .se,
.highlight .sh,
.highlight .si,
.highlight .sx,
.highlight .sr,
.highlight .ss,
.highlight .dl {
  color: #6ee7b7;
}
.highlight .m,
.highlight .mi,
.highlight .mf,
.highlight .mh,
.highlight .mo,
.highlight .il,
.highlight .no {
  color: #fdba74;
}
.highlight .na,
.highlight .nt,
.highlight .nv,
.highlight .vi,
.highlight .vg {
  color: #7dd3fc;
}
.highlight .o,
.highlight .p {
  color: #d4d4d4;
}
.highlight .gd {
  color: #fca5a5;
}
.highlight .gi {
  color: #86efac;
}
.highlight .err {
  color: inherit;
  background: none;
}

/* below-article */
.author-card {
  margin-top: 1rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
  font-family: var(--sans);
}
@media (min-width: 640px) {
  .author-card {
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
  }
}
.author-card .avatar {
  width: 4rem;
  height: 4rem;
  font: 700 20px var(--mono);
}
.author-card h3 {
  margin: 0 0 0.5rem;
  font: 700 20px var(--serif);
  color: var(--ink);
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}
@media (min-width: 640px) {
  .author-card h3 {
    justify-content: flex-start;
  }
}
.author-card p {
  margin: 0 0 0.5rem;
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.65;
}
.author-card .links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  font-size: 12px;
  color: var(--ink-2);
  flex-wrap: wrap;
}
@media (min-width: 640px) {
  .author-card .links {
    justify-content: flex-start;
  }
}
.author-card .links a {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.author-card .links a:hover {
  color: var(--ink);
}
.author-card .links .icon {
  font-size: 15px;
}
.post-nav {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}
@media (min-width: 640px) {
  .post-nav {
    grid-template-columns: 1fr 1fr;
  }
}
.post-nav a {
  display: block;
  padding: 1.25rem;
  border-radius: 1rem;
  border: 1px solid var(--hair-strong);
  transition:
    border-color 0.15s,
    background 0.15s;
}
.post-nav a:hover {
  border-color: var(--outline);
  background: var(--paper-warm);
}
.post-nav a.next {
  text-align: right;
}
.post-nav .eyebrow {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-family: var(--mono);
  font-weight: 400;
  margin-bottom: 0.375rem;
}
.post-nav a.next .eyebrow {
  justify-content: flex-end;
}
.post-nav .eyebrow .icon {
  font-size: 14px;
}
.post-nav strong {
  font: 700 18px/1.35 var(--serif);
  color: var(--ink);
  transition: color 0.15s;
}
.post-nav a:hover strong,
.related a:hover h4 {
  color: var(--green);
}
.related {
  margin-top: 4rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--hair-strong);
}
.related-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.related-head h3 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font: 700 24px var(--serif);
  color: var(--ink);
  letter-spacing: -0.015em;
}
@media (min-width: 640px) {
  .related-head h3 {
    font-size: 28px;
  }
}
.related-head a {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font: 500 12px var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-2);
}
.related-head a:hover {
  color: var(--ink);
}
.related-grid {
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 768px) {
  .related-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.related-grid a {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.25rem;
  transition:
    border-color 0.15s,
    background 0.15s;
}
.related-grid a:hover {
  border-color: var(--outline);
}
.related-grid h4 {
  margin: 0.625rem 0 0;
  font: 700 18px/1.35 var(--serif);
  color: var(--ink);
  transition: color 0.15s;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.related-grid .foot {
  display: flex;
  justify-content: space-between;
  padding-top: 0.5rem;
  border-top: 1px solid var(--hair-strong);
  font: 12px var(--mono);
  color: var(--ink-muted);
}
.comments {
  margin-top: 3rem;
}

/* simple pages */
.page-narrow {
  max-width: 45rem;
}
.page-title {
  margin: 0 0 1.5rem;
  font: 700 36px/1.15 var(--serif);
  color: var(--ink);
  letter-spacing: -0.02em;
}
@media (min-width: 640px) {
  .page-title {
    font-size: 42px;
  }
}

/* projects */
.projects-intro {
  margin: 1.25rem 0 0;
  max-width: 46rem;
  font: 18px/1.7 var(--prose);
  color: var(--ink-2);
}
.projects-intro p {
  margin: 0;
}
.highlights {
  font-family: var(--sans);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1.75rem;
}
@media (min-width: 768px) {
  .highlights {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.highlights .stat span:first-child {
  font: 700 26px/1.2 var(--serif);
  color: var(--ink);
  text-transform: none;
  letter-spacing: -0.01em;
}
.highlights .stat {
  padding: 1rem;
  gap: 0.375rem;
}
.highlights .stat span:nth-child(2) {
  font: 400 13px/1.45 var(--sans);
  color: var(--ink-2);
  text-transform: none;
  letter-spacing: 0;
}
.highlights .stat small {
  margin-top: auto;
  padding-top: 0.5rem;
  font: 11px var(--mono);
  color: var(--green);
}
.proj-section {
  margin-top: 3.5rem;
}
.section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--hair-strong);
  font: 700 26px var(--serif);
  color: var(--ink);
  letter-spacing: -0.015em;
}
.section-title .icon {
  font-size: 22px;
  color: var(--green);
}

ol.timeline {
  list-style: none;
  margin: 1.5rem 0 1.75rem;
  padding: 0;
}
.timeline > li {
  margin: 0;
}
.job {
  position: relative;
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  gap: 1rem;
  padding-bottom: 2rem;
}
.job:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 1.25rem;
  top: 2.75rem;
  bottom: 0.25rem;
  width: 1px;
  background: var(--hair-strong);
}
.job-mark {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--paper-warm);
  border: 1px solid var(--hair-strong);
  display: grid;
  place-items: center;
}
.job-mark .icon {
  font-size: 18px;
  color: var(--ink-2);
}
.job:first-child .job-mark {
  background: var(--green-bg);
  border-color: transparent;
}
.job:first-child .job-mark .icon {
  color: var(--green);
}
.job h4 {
  margin: 0.45rem 0 0.75rem;
  font: 700 20px var(--serif);
  color: var(--ink);
}
.job h4 a:hover {
  color: var(--green);
}
.role {
  padding: 0 0 1rem;
}
.role + .role {
  padding-top: 1rem;
  border-top: 1px dashed var(--hair-strong);
}
.role-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  font-size: 14px;
}
.role-head strong {
  color: var(--ink);
  font-weight: 600;
}
.role-head .mono {
  font-size: 12px;
}
.role p {
  margin: 0.5rem 0 0;
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.65;
}
.role ul {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
  font-size: 14px;
  color: var(--ink-primary);
  line-height: 1.65;
}
.role li {
  margin: 0.2rem 0;
}
.role li::marker {
  color: var(--green);
}

.tag-filter {
  margin: 1.5rem 0 0;
}
.tag-filter button.pill {
  cursor: pointer;
}
.tag-filter button.pill.active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.projects-grid {
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 640px) {
  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  .projects-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.project-card[hidden] {
  display: none !important;
}
.project-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
/* generated cover: accent gradient + faint grid + big icon + command line */
.cover {
  position: relative;
  aspect-ratio: 16 / 9;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1rem 1.1rem;
  color: #fff;
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px) 0 0 / 22px 22px,
    radial-gradient(
      120% 90% at 85% 10%,
      color-mix(in srgb, var(--accent) 55%, #fff) 0%,
      var(--accent) 55%,
      color-mix(in srgb, var(--accent) 70%, #000) 100%
    );
}
.cover .icon {
  font-size: 44px;
  opacity: 0.95;
}
.cover code {
  align-self: flex-start;
  font: 12px var(--mono);
  background: rgba(0, 0, 0, 0.28);
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cover::after {
  content: '';
  position: absolute;
  right: -2.5rem;
  bottom: -2.5rem;
  width: 9rem;
  height: 9rem;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 0 0 1.25rem rgba(255, 255, 255, 0.05);
}
.project-card .inner {
  padding: 1.1rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  flex: 1;
}
.project-card h3 {
  margin: 0;
  font: 700 18px/1.35 var(--serif);
  color: var(--ink);
}
.project-card h3 a:hover {
  color: var(--green);
}
.project-card .inner > p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-2);
}
.project-card .foot {
  margin-top: auto;
  padding-top: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  font-size: 12px;
  color: var(--ink-muted);
}
.project-card .foot .links {
  display: flex;
  gap: 0.75rem;
}
.project-card .foot a {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--ink-2);
}
.project-card .foot a:hover {
  color: var(--ink);
}
.project-card .foot .icon {
  font-size: 15px;
}
.more-oss {
  margin-top: 1.5rem;
  border-top: 1px solid var(--hair-strong);
}
.more-row {
  flex-direction: row;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid var(--hair-strong);
  font-size: 14px;
  overflow: visible;
}
.more-row strong {
  color: var(--ink);
  font-weight: 600;
}
.more-row:hover {
  background: var(--paper-warm);
}
.more-row:hover strong {
  color: var(--green);
}
.small {
  font-size: 12px;
  margin-top: 1rem;
}
.creds {
  display: grid;
  gap: 1rem;
}
@media (min-width: 768px) {
  .creds {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.cred {
  display: flex;
  gap: 0.875rem;
  align-items: flex-start;
  padding: 1rem 1.1rem;
  border-radius: 0.75rem;
}
.cred > .icon {
  font-size: 22px;
  color: var(--green);
}
.cred strong {
  display: block;
  font-size: 14px;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.4;
}
.cred .muted {
  font-size: 12px;
}

/* search dialog */
.search-dialog {
  width: min(40rem, calc(100% - 2rem));
  margin: 12vh auto auto;
  padding: 0;
  border: 1px solid var(--hair-strong);
  border-radius: 1rem;
  background: var(--paper);
  color: var(--ink-primary);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}
.search-dialog::backdrop {
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(2px);
}
.search-field {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--hair-strong);
}
.search-field .icon {
  color: var(--ink-muted);
}
.search-field input {
  flex: 1;
  border: 0;
  outline: 0;
  background: none;
  font: 15px var(--sans);
  color: var(--ink);
}
.search-results {
  list-style: none;
  margin: 0;
  padding: 0.5rem;
  max-height: 55vh;
  overflow-y: auto;
}
.search-results a {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.625rem 0.75rem;
  border-radius: 0.5rem;
}
.search-results a:hover,
.search-results a.sel {
  background: var(--hair);
}
.search-results .t {
  font: 600 15px/1.35 var(--serif);
  color: var(--ink);
}
.search-results .d {
  flex-shrink: 0;
  font: 12px var(--mono);
  color: var(--ink-muted);
}
.search-results .empty {
  padding: 1rem 0.75rem;
  font-size: 13px;
  color: var(--ink-muted);
}

/* share menu */
.share {
  position: relative;
}
.share-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  z-index: 20;
  min-width: 12rem;
  padding: 0.375rem;
  border-radius: 0.75rem;
  background: var(--paper);
  border: 1px solid var(--hair-strong);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
}
.share-menu[hidden] {
  display: none;
}
.share-menu a,
.share-menu button {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.625rem;
  border-radius: 0.5rem;
  font-size: 13px;
  color: var(--ink-primary);
  text-align: left;
}
.share-menu a:hover,
.share-menu button:hover,
.share-menu a:focus-visible,
.share-menu button:focus-visible {
  background: var(--hair);
  color: var(--ink);
  outline: none;
}
.share-menu .icon,
.share-menu .brand-icon {
  width: 16px;
  font-size: 16px;
  color: var(--ink-2);
}
.share-menu button[hidden] {
  display: none;
}

/* about: skill icon grid (skillicons.dev icons + local tiles for logos it lacks) */
.skill-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 1.75rem;
}
.prose .skill-icons img {
  border: 0;
  border-radius: 0;
  width: 48px;
  height: 48px;
}
.skill-tile {
  width: 48px;
  height: 48px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #fff;
}
.skill-tile .brand-icon {
  width: 26px;
  height: 26px;
}
.brand-digitalocean {
  background: #0080ff;
}
.brand-hetzner {
  background: #d50c2d;
}
.only-dark,
[data-theme='dark'] .only-light {
  display: none;
}
[data-theme='dark'] .only-dark {
  display: inline;
}

/* 404 */
.not-found {
  max-width: 46rem;
  padding: 2rem 0 1rem;
}
.not-found .path {
  display: flex;
  gap: 0.5rem;
  font: 12px var(--mono);
  color: var(--ink-muted);
  margin-bottom: 0.5rem;
}
.not-found h1 {
  margin: 0 0 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font: 700 40px/1.15 var(--serif);
  color: var(--ink);
  letter-spacing: -0.02em;
}
.not-found h1 .icon {
  font-size: 36px;
  color: var(--green);
}
.not-found p {
  margin: 0 0 1.5rem;
  font: 18px/1.7 var(--prose);
  color: var(--ink-2);
}
.not-found .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  margin-bottom: 2.5rem;
}
.not-found .actions .chip-btn {
  font-size: 13px;
  padding: 0.5rem 0.875rem;
  color: var(--ink-primary);
}
