/* Original implementation inspired by Astro Nano's restrained editorial layout. */
:root {
  --paper: #f5f6f7; --ink: #282b31; --muted: #666b74; --line: #dedfe3; --accent: #282b31;
  --selection-bg: #d8dfe8; --selection-ink: #252c36;
  --content-width: 760px; --font-body: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-heading: var(--font-body); color-scheme: light;
}
:root[data-appearance="dark"] { --paper: #1c1e22; --ink: #e8e9ec; --muted: #a7aab2; --line: #383b42; --accent: #e8e9ec; --selection-bg: #414751; --selection-ink: #f3f4f6; color-scheme: dark; }
@media (prefers-color-scheme: dark) {
  :root:not([data-appearance]) { --paper: #1c1e22; --ink: #e8e9ec; --muted: #a7aab2; --line: #383b42; --accent: #e8e9ec; --selection-bg: #414751; --selection-ink: #f3f4f6; color-scheme: dark; }
}
::selection { background-color: var(--selection-bg); color: var(--selection-ink); text-shadow: none; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body { min-height: 100vh; display: flex; flex-direction: column; font-size: 15px; line-height: 1.85; letter-spacing: .005em; }
a { transition: color .18s, border-color .18s, background .18s; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.site-header { position: fixed; inset: 0 0 auto; z-index: 20; padding: 22px 0; border: 0; background: color-mix(in srgb, var(--paper) 85%, transparent); backdrop-filter: blur(12px); }
.header-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px 20px; max-width: var(--content-width); width: 100%; padding: 0 28px; margin: auto; }
.brand { font-size: 14px; font-weight: 600; letter-spacing: 0; }
nav { align-items: center; gap: 9px; color: var(--muted); }
nav a { font-size: 13px; color: var(--muted); text-decoration-color: var(--line); }
nav a:hover { color: var(--ink); }
main { flex: 1; min-height: auto; padding: 136px 0 80px; }
h1, h2, h3 { font-family: var(--font-heading); font-weight: 600; letter-spacing: -.025em; }
.nano-intro { margin-bottom: 60px; }
.nano-intro h1 { font-size: 18px; margin: 0 0 22px; }
.nano-intro h1 span { margin-left: 7px; color: var(--muted); }
.nano-intro p, .nano-connect p { color: var(--muted); margin: 14px 0; }
.intro-note { max-width: 56ch; }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; margin-bottom: 17px; }
.section-heading h2, .nano-connect h2 { font-size: 14px; margin: 0; }
.section-heading a { color: var(--muted); font-size: 12px; text-decoration-color: var(--line); }
.nano-posts { display: grid; gap: 12px; }
.nano-post { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; }
.nano-post:hover { border-color: var(--muted); background: color-mix(in srgb, var(--ink) 3%, transparent); }
.post-text { min-width: 0; }
.post-text h2 { margin: 0; font-size: 14px; line-height: 1.65; }
.post-text p { margin: 3px 0 0; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.post-side { display: flex; align-items: center; gap: 16px; flex-shrink: 0; color: var(--muted); }
.post-side time { font-size: 11px; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.post-arrow { display: inline-block; transition: transform .18s; }
.nano-post:hover .post-arrow { transform: translate(2px, -2px); }
.nano-connect { margin-top: 56px; }
.nano-connect a { text-underline-offset: 4px; margin: 0 3px; }
.archive-heading { margin-bottom: 35px; }
.archive-heading h1 { font-size: 26px; margin: 23px 0 10px; }
.archive-heading p, .back-link { color: var(--muted); font-size: 13px; }
.article-header { margin: 0 0 38px; }
.article-header h1 { font-size: clamp(25px, 5vw, 34px); margin: 12px 0 18px; }
.article-author { font-size: 12px; color: var(--muted); }
.footer-links { margin: 12px 0 0; color: var(--muted); }
.footer-links a { color: inherit; }
.footer-row > span { min-width: 0; }
.appearance { flex-shrink: 0; }
.tags { gap: 12px; }
.tags a { color: var(--muted); text-decoration-color: var(--line); }
.prose { color: var(--muted); }
.prose > p, .prose > ul, .prose > ol, .prose blockquote { font-family: Georgia, "Noto Serif CJK SC", serif; font-size: 16px; line-height: 2; }
.prose h2, .prose h3, .prose strong { color: var(--ink); }
.prose h2 { font-size: 21px; }
.prose img { border-radius: 6px; }
pre { background: color-mix(in srgb, var(--ink) 3%, transparent); font-size: 13px; }
button { border-radius: 6px; }
.intro { padding: 0 0 24px; }
.intro h1 { font-size: 27px; }
.site-footer { border: 0; padding: 0 0 26px; margin: 0; font-size: 12px; }
.footer-top { text-align: right; margin-bottom: 22px; }
.footer-top a { color: var(--muted); text-decoration: none; }
.footer-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.footer-row > span > span { margin: 0 6px; }
.appearance { display: flex; gap: 3px; }
.appearance button { display: grid; place-items: center; width: 32px; height: 32px; padding: 7px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); }
.appearance button[aria-pressed="true"], .appearance button:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 7%, transparent); }
.appearance svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.skip-link { position: fixed; z-index: 30; top: -80px; left: 20px; background: var(--paper); padding: 8px 16px; }
.skip-link:focus { top: 8px; }
.nano-enter { animation: nano-enter .5s ease-out both; }
@keyframes nano-enter { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
@media (max-width: 520px) { .header-inner { padding: 0 18px; } main { padding-top: 114px; } .nano-post { padding: 14px; } .post-side time { display: none; } .nano-intro { margin-bottom: 44px; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
