@import url('/theme.css?v=rose-1');

:root {
  --color-bg: var(--paper);
  --color-text: var(--ink);
  --color-text-sub: var(--body-ink);
  --color-text-mute: var(--muted);
  --color-border: var(--line);
  --color-border-faint: var(--line);
  --color-accent: var(--accent);
  --color-accent-weak: var(--accent-soft);
  --color-hover: #f2f2f2;
  --color-selection: var(--highlight);
  --color-code-bg: var(--code-surface);
  --color-header-bg: #fcfcfbf2;
  --color-pre-bg: #f5f5f5;
  --color-pre-text: var(--ink);
  --color-pre-lang: var(--muted);
  --font-sans: var(--sans);
  --font-mono: var(--mono);
  --header-h: 96px;
}

html, body { font-family: var(--sans); font-weight: 400; background: var(--paper); color: var(--ink); }
body { letter-spacing: -.02em; line-height: 1.8; }
.writing-page .page, .site-header .container { max-width: 1160px; padding-left: 48px; padding-right: 48px; }
.writing-page .header { padding: 24px 0; border-bottom-color: var(--rule); }
.writing-page .name, .site-label { font-family: var(--sans); font-size: 24px; line-height: 1.4; font-weight: 300; letter-spacing: -.035em; }
.writing-page .name span { display: none; }
.site-header { border-bottom: 1px solid var(--line); }
.site-header .container { height: var(--header-h); }
.site-header.is-scrolled { border-bottom-color: var(--rule); }

/* The existing remote archive layout: a category rail and a continuous feed. */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.blog-skip { position: absolute; top: -100px; left: 22px; padding: 8px 12px; background: white; z-index: 30; }
.blog-skip:focus { top: 8px; }
.rail-identity { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.rail-portfolio { display: inline-block; margin-bottom: 28px; padding: 4px 0; color: var(--accent); font-size: 13px; font-weight: 300; text-decoration: none; }
.rail-portfolio:hover { text-decoration: underline; text-underline-offset: 4px; }
.rail-portfolio:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.writing-archive .rail-name { font-family: var(--sans); font-size: 24px; font-weight: 300; letter-spacing: -.035em; color: var(--accent); margin: 0; padding: 0; }
.rail-identity .primary-nav a { width: 32px; height: 32px; }
.rail-identity .primary-nav svg { width: 24px; height: 24px; }
.writing-archive .item { opacity: 1; animation: none; }
.writing-archive .i-title { font-weight: 300; }
.writing-archive .rail-cats button, .writing-archive .rail-cats .n { font-weight: 300; }
.writing-archive .rail-cats button.is-on, .writing-archive .rail-cats button.is-on .n { font-weight: 400; color: var(--accent); }
.writing-archive .i-meta { margin: 0; }
@media (max-width: 860px) {
  .rail-identity { padding-top: 28px; margin-bottom: 16px; }
  .rail-portfolio { margin-bottom: 16px; }
  .writing-archive .rail-cats { background: #fcfcfbf2; }
  .writing-archive .feed { padding-top: 16px; }
}

/* Article: a readable measure, quiet emphasis, and generous section spacing. */
.post-layout { --header-h: 0px; max-width: 1160px; padding: 0 48px; grid-template-columns: minmax(0, 760px) 200px; gap: 56px; justify-content: start; }
.post-header, .post-body, .post-nav, .post-back, .toc { opacity: 1; animation: none; transform: none; }
.post-main { grid-column: 1; min-width: 0; }
.post { padding: 48px 0 24px; }
.post-cover { border-radius: 0; aspect-ratio: 2.4 / 1; margin-bottom: 32px; }
.post-header { margin-bottom: 40px; padding-bottom: 32px; border-bottom-color: var(--rule); }
.post-top-back { display: inline-block; font-size: 13px; line-height: 1.7; color: var(--muted); margin-bottom: 32px; }
.post-top-back:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.post-meta { font: 12px/1.7 var(--sans); letter-spacing: 0; margin-bottom: 12px; }
.post-category { color: var(--accent); }
.post-title { font-size: clamp(30px, 3vw, 40px); font-weight: 300; line-height: 1.45; letter-spacing: -.04em; text-wrap: wrap; }
.post-body { font-size: 17px; line-height: 1.95; color: var(--body-ink); }
.post-body > :first-child { margin-top: 0; }
.post-body p { margin: 0 0 24px; }
.post-body h1, .post-body h2, .post-body h3 { color: var(--ink); font-weight: 400; letter-spacing: -.03em; line-height: 1.5; scroll-margin-top: 24px; }
.post-body h1 { font-size: 30px; margin: 64px 0 24px; }
.post-body h2 { font-size: 26px; margin: 56px 0 20px; }
.post-body h3 { font-size: 21px; margin: 36px 0 16px; }
.post-body strong { font-weight: 400; color: var(--ink); background: var(--highlight); padding: 1px 2px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.post-body img { border-radius: 0; margin: 32px auto; }
.post-body figure { margin: 32px 0; }
.post-body figcaption { font-size: 13px; line-height: 1.8; }
.post-body ul, .post-body ol { margin: 24px 0; padding-left: 24px; }
.post-body li { margin: 8px 0; }
.post-body li::marker { color: var(--accent); }
.post-body blockquote { border: 0; border-left: 2px solid var(--accent); background: var(--quote-surface); color: var(--ink); padding: 20px 24px; margin: 32px 0; font-size: 17px; line-height: 1.85; }
.post-body blockquote p { margin: 0 0 14px; }
.post-body blockquote > :first-child { margin-top: 0; }
.post-body blockquote > :last-child { margin-bottom: 0; }
.post-body blockquote strong { background: none; padding: 0; }
.post-body blockquote blockquote { background: transparent; border-left-color: var(--accent-soft); margin: 18px 0; padding: 4px 0 4px 18px; }
.post-body code { font-size: .85em; line-height: inherit; font-weight: 400; border-radius: 2px; overflow-wrap: anywhere; }
.post-body pre { max-width: 100%; border: 1px solid var(--line); border-radius: 0; padding: 36px 24px 24px; font: 13px/1.8 var(--mono); margin: 32px 0; }
.post-body pre code, .post-body pre code.hljs { display: block; padding: 0; font-family: inherit; line-height: inherit; overflow-wrap: normal; word-break: normal; white-space: pre; }
.post-body pre[data-lang]::before { font-size: 11px; font-weight: 400; letter-spacing: .02em; }
.post-body .hljs-keyword, .post-body .hljs-selector-tag { color: #444444; font-weight: 400; }
.post-body .hljs-string { color: #606060; }
.post-body .hljs-comment { color: var(--muted); }
.post-body .hljs-title { color: #555555; font-weight: 400; }
.post-body hr { margin: 48px 0; }
.post-body table { display: block; width: 100%; max-width: 100%; overflow-x: auto; margin: 32px 0; font-size: 14px; line-height: 1.8; }
.post-body th { background: var(--code-surface); color: var(--ink); font-weight: 400; }
.post-body th, .post-body td { padding: 12px 16px; }

.toc { display: block; grid-column: 2; margin-top: 48px; padding: 0 0 0 20px; top: calc(var(--header-h) + 32px); border-left: 1px solid var(--line); }
.toc-title { font: 12px/1.7 var(--sans); letter-spacing: 0; margin-bottom: 12px; text-transform: lowercase; }
.toc-item a { font-size: 13px; line-height: 1.7; padding: 6px 0; }
.toc-item--h2 a { padding-left: 0; }
.toc-item--h3 a { padding-left: 12px; }
.toc-item a.is-active { font-weight: 400; color: var(--accent); }
.post-nav { margin-top: 48px; padding-top: 24px; gap: 32px; }
.post-nav-item { padding: 8px 0; }
.post-nav-label { font-family: var(--sans); font-size: 12px; letter-spacing: 0; text-transform: lowercase; }
.post-nav-title { font-size: 17px; font-weight: 400; line-height: 1.7; }
.post-back { padding: 32px 0 64px; }

@media (max-width: 1100px) {
  .post-layout { grid-template-columns: minmax(0, 760px); justify-content: center; gap: 0; }
  .toc { display: none; }
}
@media (max-width: 600px) {
  :root { --header-h: 76px; }
  .writing-page .page, .site-header .container, .post-layout { padding-left: 22px; padding-right: 22px; }
  .writing-page .header { padding: 16px 0; }
  .writing-page .name, .site-label { font-size: 22px; }
  .post { padding-top: 32px; }
  .post-header { padding-bottom: 24px; margin-bottom: 32px; }
  .post-top-back { margin-bottom: 24px; }
  .post-title { font-size: 30px; line-height: 1.5; }
  .post-body { font-size: 16px; line-height: 1.95; }
  .post-body h1 { font-size: 26px; }
  .post-body h2 { font-size: 23px; margin-top: 48px; }
  .post-body h3 { font-size: 19px; }
  .post-body pre { font-size: 12px; padding: 32px 16px 20px; }
  .post-body blockquote { padding: 16px 18px; font-size: 16px; }
  .post-nav { grid-template-columns: 1fr; gap: 24px; }
  .post-nav-item--next { grid-column: 1; text-align: left; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print {
  .site-header, .toc, .post-top-back, .post-nav, .post-back { display: none; }
  .post-layout { display: block; max-width: none; padding: 0; }
  .post { padding: 0; }
  html, body { background: white; }
  .post-body blockquote { background: none; border-left-color: var(--muted); }
}
