:root {
  --paper: #f5f0e6;
  --paper-deep: #e9e0d0;
  --ink: #26231f;
  --muted: #726b61;
  --moss: #496c69;
  --cinnabar: #a6483b;
  --line: #cfc5b3;
  --display: "LXGW WenKai", "STKaiti", "KaiTi", "Noto Serif SC", serif;
  --body: "Noto Serif SC", "Source Han Serif SC", "Songti SC", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background-color: var(--paper);
  background-image: radial-gradient(rgba(38, 35, 31, .045) .55px, transparent .7px);
  background-size: 7px 7px;
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.9;
}
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { color: var(--moss); }
a:focus-visible { outline: 3px solid var(--cinnabar); outline-offset: 4px; }
.skip-link { position: fixed; top: -5rem; left: 1rem; z-index: 2; padding: .5rem 1rem; background: var(--ink); color: var(--paper); }
.skip-link:focus { top: 1rem; }
.site-header, main, .site-footer { width: min(100% - 3rem, 1020px); margin-inline: auto; }
.site-header { display: flex; align-items: baseline; justify-content: space-between; gap: 2rem; padding: 2rem 0; }
.brand { font-family: var(--display); font-size: 1.6rem; font-weight: 700; text-decoration: none; }
nav { display: flex; flex-wrap: wrap; gap: 1.25rem; font-family: var(--display); font-size: 1rem; }
nav a { text-decoration: none; }
nav .is-current { color: var(--cinnabar); }
.intro { max-width: 760px; padding: 6.5rem 0 5rem; }
.eyebrow, .post-meta { margin: 0; color: var(--muted); font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: .75rem; letter-spacing: .12em; line-height: 1.5; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.35; }
.intro h1 { margin: .5rem 0 1.5rem; font-size: clamp(3.25rem, 9vw, 7rem); letter-spacing: .02em; }
.lede { max-width: 34rem; margin: 0; font-family: var(--display); font-size: clamp(1.3rem, 2.3vw, 1.8rem); line-height: 1.75; }
.today { display: inline-block; margin-top: 2.8rem; padding: .6rem 1rem; border: 1px solid var(--line); background: rgba(245, 240, 230, .55); color: var(--muted); font-size: .95rem; }
.today span { color: var(--cinnabar); }
.bookmarks { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.bookmarks a { min-height: 9rem; padding: 1.25rem; border-right: 1px solid var(--line); display: flex; flex-direction: column; justify-content: space-between; font-family: var(--display); font-size: 1.4rem; text-decoration: none; }
.bookmarks a:last-child { border-right: 0; }
.bookmarks span { color: var(--cinnabar); font-family: ui-monospace, monospace; font-size: .75rem; }
.writing { padding: 7rem 0; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; }
.section-heading h2, .about h2 { margin: 0; font-size: clamp(2rem, 4vw, 3rem); }
.post-card { max-width: 720px; padding: clamp(1.5rem, 4vw, 3rem); border: 1px solid var(--line); background: rgba(255, 253, 246, .55); box-shadow: 8px 9px 0 rgba(73, 108, 105, .08); }
.post-card h3 { margin: .75rem 0; font-size: clamp(1.8rem, 3vw, 2.4rem); }
.post-card h3 a { text-decoration: none; }
.post-card p:not(.post-meta) { margin-bottom: 1.4rem; }
.read-more { color: var(--moss); font-family: var(--display); font-weight: 700; }
.read-more span { color: var(--cinnabar); }
.about { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 7vw, 7rem); padding: 5rem 0 7rem; border-top: 1px solid var(--line); }
.about p:last-child { margin: 0; color: #4a463f; }
.site-footer { display: flex; justify-content: space-between; gap: 1rem; padding: 2rem 0 3rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.site-footer p { margin: 0; }
.article-layout { width: min(100% - 3rem, 760px); padding: 5rem 0 6rem; }
.article { padding-bottom: 3rem; }
.article h1 { margin: .7rem 0 1.5rem; font-size: clamp(3rem, 8vw, 5.4rem); }
.article-lede { color: var(--moss); font-family: var(--display); font-size: 1.35rem; }
.article hr { width: 3rem; margin: 3.5rem 0 2.5rem; border: 0; border-top: 2px solid var(--cinnabar); }
.signature { font-family: var(--display); }
.back-link { font-family: var(--display); }
.error-page { display: grid; min-height: 100vh; place-items: center; padding: 2rem; text-align: center; }
.error-page main { width: min(100%, 620px); }
.error-page h1 { margin: .5rem 0 1rem; font-size: clamp(2.8rem, 8vw, 5.5rem); }
@media (max-width: 680px) {
  body { font-size: 17px; }
  .site-header { align-items: flex-start; flex-direction: column; gap: .75rem; }
  .intro { padding: 3.75rem 0 3.5rem; }
  .bookmarks { display: flex; overflow-x: auto; }
  .bookmarks a { min-width: 8rem; min-height: 7rem; }
  .writing { padding: 4.5rem 0; }
  .section-heading, .about { display: block; }
  .section-heading h2 { margin-top: .5rem; }
  .about { padding: 3.5rem 0 4.5rem; }
  .about p:last-child { margin-top: 1.5rem; }
  .site-footer { align-items: flex-start; flex-direction: column; }
  .article-layout { padding: 3rem 0 4rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
