
:root {
  --bg:        #0e0f10;
  --bg-2:      #151617;
  --panel:     #1a1b1d;
  --line:      #26282b;
  --line-2:    #2f3236;
  --text:      #e8e6e1;
  --text-2:    #a8a6a0;
  --text-3:    #6e6c66;
  --accent:    oklch(0.78 0.14 160);  /* mint green */
  --accent-2:  oklch(0.82 0.12 175);  /* teal secondary */
  --danger:    oklch(0.70 0.16 25);
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Geist", "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --serif: "Instrument Serif", ui-serif, Georgia, serif;
}
html.light {
  --bg:        #f6f4ef;
  --bg-2:      #eeeae1;
  --panel:     #ffffff;
  --line:      #e2ddd0;
  --line-2:    #cec9ba;
  --text:      #14130f;
  --text-2:    #55524a;
  --text-3:    #8a877c;
  --accent:    oklch(0.55 0.14 160);
  --accent-2:  oklch(0.55 0.12 175);
}
* { box-sizing: border-box; }
html, body { margin:0; padding:0; background:var(--bg); color:var(--text); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; font-size: 15px; line-height: 1.55; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: #0e0f10; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

/* ===== Layout ===== */
.app {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  max-width: 1440px;
  margin: 0 auto;
  min-height: 100vh;
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
}

/* ===== Sidebar ===== */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--line);
  padding: 28px 24px 20px;
  display: flex; flex-direction: column; gap: 22px;
  background: var(--bg);
}
@media (max-width: 900px) {
  .sidebar {
    position: static; height: auto;
    border-right: 0; border-bottom: 1px solid var(--line);
    padding: 14px 20px;
    gap: 12px;
  }
  .sidebar .brand { padding-bottom: 12px; }
  .sidebar .nav {
    flex-direction: row; flex-wrap: wrap; gap: 4px;
  }
  .sidebar .nav-item { padding: 6px 10px; font-size: 12.5px; }
  .sidebar .nav-key { display: none; }
  .sidebar .nav-dot { display: none; }
  /* Hide the secondary sidebar chrome on mobile — tags + social are reachable via top nav */
  .sidebar .sidebar-section-title,
  .sidebar .tags-cloud,
  .sidebar .sidebar-footer { display: none; }
}
.brand {
  display: flex; align-items: center; gap: 12px;
  padding-bottom: 18px;
  border-bottom: 1px dashed var(--line-2);
}
.avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid; place-items: center;
  color: #0e0f10; font-family: var(--mono); font-weight: 600; font-size: 15px;
  flex-shrink: 0;
  position: relative;
}
.avatar::after {
  content: ""; position: absolute; inset: -3px;
  border: 1px solid var(--accent); border-radius: 50%; opacity: .4;
}
.brand-name {
  font-family: var(--mono); font-weight: 600; font-size: 15px;
  letter-spacing: -0.01em;
  display: flex; align-items: baseline; gap: 6px;
}
.brand-name .prompt { color: var(--accent); }
.brand-tag { font-size: 11.5px; color: var(--text-3); font-family: var(--mono); margin-top: 2px; letter-spacing: 0.02em; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 6px;
  font-size: 13.5px; color: var(--text-2);
  cursor: pointer;
  transition: all .15s ease;
  font-family: var(--mono);
}
.nav-item:hover { background: var(--bg-2); color: var(--text); }
.nav-item.active { background: var(--bg-2); color: var(--text); }
.nav-item.active .nav-dot { background: var(--accent); }
.nav-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--line-2); flex-shrink: 0; }
.nav-key { margin-left: auto; font-size: 11px; color: var(--text-3); }

.sidebar-section-title {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 0 10px 8px;
}

.tags-cloud { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 6px; }
.tag-chip {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-2);
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: all .15s;
}
.tag-chip:hover { border-color: var(--accent); color: var(--text); }
.tag-chip.active { border-color: var(--accent); color: var(--accent); background: color-mix(in oklab, var(--accent) 8%, transparent); }

.sidebar-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px dashed var(--line-2);
  display: flex; flex-direction: column; gap: 10px;
}
.social-row { display: flex; gap: 10px; }
.social-btn {
  width: 30px; height: 30px; border-radius: 6px;
  border: 1px solid var(--line);
  display: grid; place-items: center;
  color: var(--text-2);
  transition: all .15s;
}
.social-btn:hover { border-color: var(--accent); color: var(--text); background: var(--bg-2); }
.footer-meta { font-family: var(--mono); font-size: 10.5px; color: var(--text-3); line-height: 1.5; }
.footer-meta .blink::after {
  content: "▊"; color: var(--accent); margin-left: 3px;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.theme-toggle {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px;
  font-family: var(--mono); font-size: 11.5px; color: var(--text-2);
  width: fit-content;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--text); }

/* ===== Main ===== */
.main { padding: 28px 56px 80px; min-width: 0; }
@media (max-width: 900px) { .main { padding: 20px; } }

/* Top bar */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 36px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.breadcrumb {
  font-family: var(--mono); font-size: 12px; color: var(--text-3);
  display: flex; align-items: center; gap: 6px;
}
.breadcrumb .crumb-link { cursor: pointer; color: var(--text-2); }
.breadcrumb .crumb-link:hover { color: var(--accent); }
.breadcrumb .sep { color: var(--text-3); opacity: .6; }
.topbar-right { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 12px; color: var(--text-3); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 8px color-mix(in oklab, var(--accent-2) 60%, transparent); }

/* ===== Home ===== */
.hero {
  margin-bottom: 52px;
  padding: 4px 0 0;
}
.hero h1 {
  font-family: var(--serif);
  font-size: 64px;
  line-height: 1.02;
  margin: 0 0 20px;
  font-weight: 400;
  letter-spacing: -0.02em;
  max-width: 760px;
  text-wrap: pretty;
}
.hero h1 em { font-style: italic; color: var(--accent); }
.hero-sub {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-2);
  max-width: 560px;
  line-height: 1.7;
}
.hero-meta {
  display: flex; gap: 20px; margin-top: 22px;
  font-family: var(--mono); font-size: 11.5px; color: var(--text-3);
  letter-spacing: 0.04em;
}
.hero-meta .dot { color: var(--accent); }

.section-label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 24px;
}
.section-label::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}

/* Post list */
.post-list { display: flex; flex-direction: column; }
.post-card {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 28px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
  cursor: pointer;
  transition: background .2s;
  align-items: start;
}
.post-card:last-child { border-bottom: 1px solid var(--line); }
.post-card:hover { background: linear-gradient(to right, color-mix(in oklab, var(--accent) 3%, transparent), transparent 60%); }
.post-card:hover .post-title { color: var(--accent); }
.post-card:hover .post-arrow { transform: translate(3px, -3px); color: var(--accent); }

.post-date {
  font-family: var(--mono); font-size: 11.5px; color: var(--text-3);
  line-height: 1.4;
  padding-top: 4px;
}
.post-date .year { color: var(--text); font-weight: 500; display: block; font-size: 14px; }

.post-body-col { min-width: 0; }
.post-cats { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.cat-pill {
  font-family: var(--mono); font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 2px 8px;
  border: 1px solid color-mix(in oklab, var(--accent) 30%, transparent);
  border-radius: 3px;
  background: color-mix(in oklab, var(--accent) 6%, transparent);
}
.post-title {
  font-family: var(--serif);
  font-size: 30px;
  line-height: 1.15;
  font-weight: 400;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
  transition: color .2s;
  text-wrap: balance;
}
.post-excerpt {
  color: var(--text-2);
  font-size: 14.5px;
  line-height: 1.6;
  margin: 0 0 12px;
  max-width: 640px;
  text-wrap: pretty;
}
.post-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.post-tags .tag {
  font-family: var(--mono); font-size: 11px; color: var(--text-3);
}
.post-tags .tag::before { content: "#"; opacity: .5; }

.post-arrow-col { padding-top: 8px; }
.post-arrow {
  font-family: var(--mono); color: var(--text-3); font-size: 18px;
  transition: all .2s;
  display: inline-block;
}
.post-read { display: block; font-family: var(--mono); font-size: 10.5px; color: var(--text-3); margin-top: 8px; letter-spacing: 0.04em; }

@media (max-width: 700px) {
  .post-card { grid-template-columns: 1fr; gap: 10px; }
  .post-arrow-col { display: none; }
  .hero h1 { font-size: 40px; }
}
@media (max-width: 420px) {
  .hero h1 { font-size: 34px; }
  .article-title { font-size: 30px; }
}

/* ===== Post detail ===== */
.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 48px;
  align-items: start;
}
@media (max-width: 1100px) {
  .post-layout { grid-template-columns: 1fr; }
  .toc { display: none; }
}

.article { max-width: 720px; min-width: 0; }
.article-header { margin-bottom: 40px; }
.article-cats { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.article-title {
  font-family: var(--serif);
  font-size: 54px;
  line-height: 1.05;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  text-wrap: balance;
}
@media (max-width: 700px) { .article-title { font-size: 36px; } }
.article-meta {
  display: flex; gap: 20px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 11.5px;
  color: var(--text-3); letter-spacing: 0.04em;
  padding-top: 16px; border-top: 1px dashed var(--line-2);
}
.article-meta strong { color: var(--text-2); font-weight: 500; }

.article-actions { display: flex; gap: 8px; margin-top: 16px; }
.tts-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.04em;
  color: var(--text-2);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: all .15s;
}
.tts-btn:hover { border-color: var(--accent); color: var(--text); }
.tts-btn.active { border-color: var(--accent); color: var(--accent); }
.tts-btn.tts-stop { padding: 7px 10px; }

.article-body { font-size: 16px; line-height: 1.72; color: var(--text); }
.article-body p { margin: 0 0 1.1em; text-wrap: pretty; }
.article-body h1, .article-body h2, .article-body h3 {
  font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em;
  margin: 1.8em 0 0.6em;
  text-wrap: balance;
  scroll-margin-top: 32px;
}
.article-body h1 { font-size: 34px; }
.article-body h2 { font-size: 28px; position: relative; padding-left: 18px; }
.article-body h2::before {
  content: ""; position: absolute; left: 0; top: 0.35em; bottom: 0.35em;
  width: 3px; background: var(--accent); border-radius: 2px;
}
.article-body h3 { font-size: 20px; color: var(--text); font-family: var(--sans); font-weight: 600; }
.article-body strong { color: var(--text); font-weight: 600; }
.article-body em { font-family: var(--serif); font-style: italic; font-size: 1.05em; }
.article-body a { color: var(--accent); border-bottom: 1px solid color-mix(in oklab, var(--accent) 40%, transparent); }
.article-body a:hover { border-bottom-color: var(--accent); }
.article-body ul, .article-body ol { padding-left: 24px; margin: 0 0 1.1em; }
.article-body li { margin: 0 0 .5em; }
.article-body ol { counter-reset: n; list-style: none; padding-left: 0; }
.article-body ol > li { counter-increment: n; position: relative; padding-left: 44px; }
.article-body ol > li::before {
  content: counter(n, decimal-leading-zero);
  position: absolute; left: 0; top: 2px;
  font-family: var(--mono); font-size: 12px;
  color: var(--accent);
  font-weight: 500;
}
.article-body code {
  font-family: var(--mono); font-size: .9em;
  background: var(--bg-2); padding: 2px 6px; border-radius: 4px;
  color: var(--text);
  border: 1px solid var(--line);
}
.article-body pre {
  background: #0a0b0c; border: 1px solid var(--line);
  border-radius: 8px;
  margin: 1.4em 0;
  overflow: hidden;
  font-family: var(--mono); font-size: 13px; line-height: 1.6;
}
html.light .article-body pre { background: #1a1b1d; }
.code-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px; border-bottom: 1px solid var(--line);
  background: color-mix(in oklab, var(--bg-2) 50%, #000 20%);
  font-size: 11px; color: var(--text-3);
}
.code-head .lang { font-family: var(--mono); text-transform: lowercase; letter-spacing: 0.06em; }
.code-head .copy {
  font-family: var(--mono); font-size: 10.5px; color: var(--text-3);
  cursor: pointer; padding: 2px 6px; border-radius: 3px;
}
.code-head .copy:hover { color: var(--accent); background: var(--bg); }
.article-body pre code {
  display: block; padding: 14px; background: transparent; border: 0; color: #e8e6e1;
  overflow-x: auto; border-radius: 0;
}
.article-body .kw { color: oklch(0.78 0.14 65); }
.article-body .fn { color: oklch(0.78 0.14 160); }
.article-body .str { color: oklch(0.78 0.10 30); }
.article-body .cmt { color: var(--text-3); }
.article-body .flag { color: oklch(0.78 0.14 280); }

.article-body .callout {
  border-left: 3px solid var(--accent);
  background: color-mix(in oklab, var(--accent) 6%, transparent);
  padding: 14px 18px;
  border-radius: 0 6px 6px 0;
  margin: 1.4em 0;
  font-style: italic;
  color: var(--text);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.5;
}
.article-body blockquote {
  margin: 1.4em 0; padding: 16px 20px;
  border-left: 3px solid var(--line-2);
  background: var(--bg-2);
  border-radius: 0 6px 6px 0;
  color: var(--text-2);
}
.article-body blockquote .cite { display: block; margin-top: 10px; font-family: var(--mono); font-size: 11.5px; color: var(--text-3); }
.article-body blockquote pre { margin: 10px 0; background: #0a0b0c; }

.article-body .figure {
  margin: 1.6em 0;
}
.article-body .figure .img-ph {
  aspect-ratio: 16/9;
  background:
    repeating-linear-gradient(135deg, var(--bg-2) 0 8px, var(--panel) 8px 16px);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid; place-items: center;
  font-family: var(--mono); font-size: 12px; color: var(--text-3);
  text-align: center; padding: 20px;
}
.article-body .figure figcaption {
  margin-top: 8px;
  font-family: var(--mono); font-size: 11.5px;
  color: var(--text-3); text-align: center;
}

.article-footer {
  margin-top: 60px;
  padding-top: 24px;
  border-top: 1px dashed var(--line-2);
  display: flex; flex-direction: column; gap: 24px;
}
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.article-tag {
  font-family: var(--mono); font-size: 11.5px; color: var(--text-2);
  padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px;
  cursor: pointer;
}
.article-tag:hover { border-color: var(--accent); color: var(--accent); }

.author-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-2);
}
.author-card .avatar { width: 48px; height: 48px; font-size: 17px; }
.author-card .name { font-family: var(--mono); font-size: 13px; color: var(--text); font-weight: 500; }
.author-card .bio { font-size: 12.5px; color: var(--text-2); margin-top: 3px; }
.author-card .follow {
  font-family: var(--mono); font-size: 11.5px;
  padding: 7px 14px; border: 1px solid var(--line-2); border-radius: 999px;
  color: var(--text);
}
.author-card .follow:hover { border-color: var(--accent); color: var(--accent); }

.next-prev {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
@media (max-width: 700px) { .next-prev { grid-template-columns: 1fr; } }
.np-card {
  padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px;
  cursor: pointer; transition: all .15s;
}
.np-card:hover { border-color: var(--accent); background: var(--bg-2); }
.np-label { font-family: var(--mono); font-size: 10.5px; color: var(--text-3); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 6px; }
.np-title { font-family: var(--serif); font-size: 18px; line-height: 1.2; }
.np-card.right { text-align: right; }

/* TOC */
.toc {
  position: sticky; top: 28px;
  max-height: calc(100vh - 56px);
  overflow: auto;
  padding-left: 24px;
  border-left: 1px solid var(--line);
}
.toc-title {
  font-family: var(--mono); font-size: 10.5px; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.12em;
  margin-bottom: 14px;
}
.toc-list { display: flex; flex-direction: column; gap: 8px; list-style: none; padding: 0; margin: 0; }
.toc-item {
  font-size: 12.5px; color: var(--text-3); cursor: pointer;
  padding-left: 10px;
  border-left: 2px solid transparent;
  line-height: 1.4;
  transition: all .15s;
}
.toc-item.h3 { padding-left: 20px; font-size: 12px; }
.toc-item:hover { color: var(--text); }
.toc-item.active { color: var(--accent); border-left-color: var(--accent); }

.reading-progress {
  margin-top: 20px; padding-top: 16px; border-top: 1px dashed var(--line-2);
  font-family: var(--mono); font-size: 10.5px; color: var(--text-3);
}
.progress-bar { height: 3px; background: var(--bg-2); border-radius: 2px; overflow: hidden; margin-top: 6px; }
.progress-fill { height: 100%; background: var(--accent); transition: width .1s; }

/* ===== Tab pages ===== */
.page-head { margin-bottom: 36px; }
.page-title {
  font-family: var(--serif); font-size: 44px; font-weight: 400; letter-spacing: -0.02em; margin: 0 0 8px;
}
.page-sub { color: var(--text-2); font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.04em; }

.about-grid { display: grid; grid-template-columns: 1fr 280px; gap: 48px; align-items: start; }
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; } }
.about-prose { font-size: 16px; line-height: 1.7; color: var(--text); max-width: 640px; }
.about-prose p { margin: 0 0 1em; }
.about-prose em { font-family: var(--serif); font-style: italic; }
.about-card {
  padding: 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2);
  display: flex; flex-direction: column; gap: 14px;
}
.about-row { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 12px; }
.about-row .k { color: var(--text-3); }
.about-row .v { color: var(--text); }

/* Archives */
.archive-year {
  display: grid; grid-template-columns: 80px 1fr; gap: 32px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}
.archive-year:last-child { border-bottom: 1px solid var(--line); }
.archive-year .year-label {
  font-family: var(--serif); font-size: 44px; color: var(--text-2); line-height: 1; position: sticky; top: 28px;
}
.archive-year .year-posts { display: flex; flex-direction: column; gap: 18px; }
.archive-row {
  display: grid; grid-template-columns: 72px 1fr; gap: 20px;
  cursor: pointer;
  align-items: baseline;
}
.archive-row .date { font-family: var(--mono); font-size: 12px; color: var(--text-3); }
.archive-row .title { font-family: var(--serif); font-size: 22px; line-height: 1.2; }
.archive-row:hover .title { color: var(--accent); }

/* Categories / Tags */
.grid-cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.cat-card {
  padding: 18px; border: 1px solid var(--line); border-radius: 10px;
  cursor: pointer;
  transition: all .15s;
  background: var(--bg-2);
}
.cat-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.cat-card .count {
  font-family: var(--mono); font-size: 11px; color: var(--text-3);
  margin-bottom: 10px;
}
.cat-card .count strong { color: var(--accent); font-weight: 500; }
.cat-card .name { font-family: var(--serif); font-size: 24px; letter-spacing: -0.01em; }
.cat-card .tags-inline { margin-top: 10px; font-family: var(--mono); font-size: 11px; color: var(--text-3); }

.tags-page .tag-big {
  font-family: var(--mono);
  display: inline-flex; align-items: baseline; gap: 6px;
  padding: 6px 12px;
  margin: 0 6px 8px 0;
  border: 1px solid var(--line); border-radius: 999px;
  cursor: pointer;
  transition: all .15s;
}
.tags-page .tag-big:hover { border-color: var(--accent); color: var(--accent); }
.tags-page .tag-big .n { color: var(--text-3); font-size: 11px; }

/* Filtered results banner */
.filter-banner {
  padding: 12px 16px;
  border: 1px dashed var(--line-2);
  border-radius: 8px;
  margin-bottom: 24px;
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--mono); font-size: 12px; color: var(--text-2);
}
.filter-banner strong { color: var(--accent); }
.filter-banner .clear { color: var(--text-3); cursor: pointer; }
.filter-banner .clear:hover { color: var(--text); }

/* Tweaks panel */
.tweaks {
  position: fixed; right: 20px; bottom: 20px;
  width: 280px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  font-family: var(--mono); font-size: 12px;
  box-shadow: 0 20px 40px rgba(0,0,0,.35);
  z-index: 50;
}
.tweaks h4 { margin: 0 0 10px; font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.12em; font-family: var(--mono); font-weight: 500; }
.tweak-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); }
.tweak-row:first-of-type { border-top: 0; }
.tweak-row label { color: var(--text-2); font-size: 12px; }
.tweak-swatches { display: flex; gap: 4px; }
.tweak-sw { width: 18px; height: 18px; border-radius: 4px; border: 1px solid var(--line); cursor: pointer; }
.tweak-sw.active { outline: 2px solid var(--text); outline-offset: 1px; }
.tweak-toggle {
  padding: 3px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--text-2); font-size: 11px;
  cursor: pointer;
}
.tweak-toggle.on { border-color: var(--accent); color: var(--accent); }


/* ===== Jekyll-specific additions ===== */

/* Rouge highlighter wraps code in .highlight — make it look like our custom pre */
.article-body .highlight, .article-body figure.highlight {
  margin: 1.4em 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #0a0b0c;
}
html.light .article-body .highlight { background: #1a1b1d; }
.article-body .highlight pre {
  margin: 0; border: 0; border-radius: 0; background: transparent;
}
.article-body .highlighter-rouge .highlight { margin: 1.4em 0; }

/* Jekyll post images */
.article-body img {
  max-width: 100%;
  border-radius: 8px;
  border: 1px solid var(--line);
}
.article-body img.shadow { box-shadow: 0 12px 32px rgba(0,0,0,.35); }

/* Inline loading state while posts.json fetches */
.spa-loading {
  display: grid; place-items: center;
  min-height: 60vh;
  font-family: var(--mono); color: var(--text-3); font-size: 13px;
}
.spa-loading .cursor {
  display: inline-block; width: 8px; height: 14px; background: var(--accent);
  margin-left: 4px; animation: blink 1s steps(1) infinite;
  vertical-align: middle;
}


/* ===== Kramdown prompt callouts (.prompt-tip / info / warning / danger) ===== */
.article-body blockquote.prompt-tip,
.article-body blockquote.prompt-info,
.article-body blockquote.prompt-warning,
.article-body blockquote.prompt-danger {
  background: var(--bg-2);
  border-left: 3px solid var(--line-2);
  padding: 14px 18px 14px 44px;
  border-radius: 0 6px 6px 0;
  margin: 1.4em 0;
  position: relative;
  color: var(--text);
  font-style: normal;
  font-family: var(--sans);
}
.article-body blockquote.prompt-tip::before,
.article-body blockquote.prompt-info::before,
.article-body blockquote.prompt-warning::before,
.article-body blockquote.prompt-danger::before {
  position: absolute; left: 16px; top: 14px;
  font-family: var(--mono); font-size: 14px; font-weight: 600;
  line-height: 1;
}
.article-body blockquote.prompt-tip { border-left-color: oklch(0.78 0.14 160); background: color-mix(in oklab, oklch(0.78 0.14 160) 6%, var(--bg-2)); }
.article-body blockquote.prompt-tip::before { content: "✓"; color: oklch(0.78 0.14 160); }
.article-body blockquote.prompt-info { border-left-color: oklch(0.78 0.14 230); background: color-mix(in oklab, oklch(0.78 0.14 230) 6%, var(--bg-2)); }
.article-body blockquote.prompt-info::before { content: "i"; color: oklch(0.78 0.14 230); font-style: italic; }
.article-body blockquote.prompt-warning { border-left-color: oklch(0.78 0.14 65); background: color-mix(in oklab, oklch(0.78 0.14 65) 6%, var(--bg-2)); }
.article-body blockquote.prompt-warning::before { content: "!"; color: oklch(0.78 0.14 65); }
.article-body blockquote.prompt-danger { border-left-color: oklch(0.70 0.16 25); background: color-mix(in oklab, oklch(0.70 0.16 25) 6%, var(--bg-2)); }
.article-body blockquote.prompt-danger::before { content: "×"; color: oklch(0.70 0.16 25); }
.article-body blockquote[class^="prompt-"] p:last-child { margin-bottom: 0; }

/* ===== Post cover image (when post.image.path set in frontmatter) ===== */
.post-cover {
  width: 100%;
  aspect-ratio: 2/1;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
  margin-bottom: 28px;
}
