@font-face {
  font-family: "DM Sans";
  src: url("./fonts/dm-sans-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
}

@font-face {
  font-family: "LXGW WenKai Lite";
  src: url("./fonts/lxgw-wenkai-lite-light-footer.woff2") format("woff2");
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  unicode-range: U+3002, U+4E00, U+56DB, U+58F0, U+5982, U+5E1B, U+5F26, U+5F53,
    U+5FC3, U+62E8, U+6536, U+66F2, U+753B, U+7EC8, U+88C2, U+FF0C;
}

:root {
  color-scheme: light;
  --ink: #202723;
  --muted: #52605a;
  --green: #276456;
  --line: #e1e7e3;
  font-family: "DM Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: #fff;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
}

main { flex: 1; }
img { max-width: 100%; height: auto; }
h1, h2, p { margin: 0; }
h1, h2, p, a { overflow-wrap: anywhere; }
a { color: inherit; text-underline-offset: .25em; }
a:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; }

.shell {
  width: min(calc(100% - clamp(2rem, 8vw, 7rem)), 70rem);
  margin-inline: auto;
}

.site-header, .site-header nav, .wordmark {
  display: flex;
  align-items: center;
}

.site-header {
  justify-content: space-between;
  gap: .75rem;
  padding-block: 1.25rem;
}

.wordmark {
  gap: .55rem;
  font-size: clamp(1.25rem, 2.3vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -.04em;
  text-decoration: none;
}

.wordmark img { width: clamp(2rem, 5vw, 2.75rem); }
.site-header nav { gap: clamp(.75rem, 3.4vw, 2rem); }
.site-header nav a { display: flex; align-items: center; min-height: 2.75rem; }
.site-header nav a:not(:hover):not([aria-current]) { text-decoration: none; }

.journal {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr);
  align-items: start;
  gap: clamp(1.75rem, 5vw, 5rem);
  padding-block: clamp(3rem, 12vw, 9rem) 2rem;
}

.page-title {
  font-size: clamp(3.5rem, 8vw, 6.875rem);
  line-height: .95;
  font-weight: 400;
  letter-spacing: -.07em;
}

.empty-state, .post-list { border-top: 1px solid var(--line); }
.empty-state { padding-block: 1.5rem; color: var(--muted); }
.post-list { list-style: none; padding: 0; margin: 0; }
.post-list li { border-bottom: 1px solid var(--line); padding-block: 1.5rem; }

time {
  color: var(--muted);
  font-size: .875rem;
  font-variant-numeric: tabular-nums;
}

.post-list h2 { margin-block: .25rem; font-size: clamp(1.375rem, 3vw, 2rem); font-weight: 400; }
.post-list h2 a:not(:hover) { text-decoration: none; }
.post-list p { color: var(--muted); line-height: 1.6; }

.reading {
  width: min(100%, 43rem);
  margin-inline: auto;
  padding-block: clamp(2.5rem, 8vw, 6rem) 2rem;
}

.reading h1 {
  margin-block: .5rem 1.5rem;
  font-weight: 400;
  font-size: clamp(2rem, 6vw, 3.75rem);
  line-height: 1.15;
}

.prose { font-size: 1.0625rem; line-height: 1.85; overflow-wrap: anywhere; }
.prose :is(p, ul, ol, blockquote, pre) { margin-block: 0 1.35em; }
.prose :is(h2, h3, h4) { margin-block: 1.6em .5em; line-height: 1.35; }
.prose a, .back-link { color: var(--green); }
.prose blockquote { margin-inline: 0; padding-inline-start: 1rem; border-inline-start: 2px solid var(--line); color: var(--muted); }
.prose pre { padding: 1rem; background: #f5f7f6; overflow: auto; overflow-wrap: normal; }
.prose table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.prose :is(td, th) { padding: .35em .65em; border: 1px solid var(--line); }
.back-link { display: inline-block; margin-top: 1.75rem; }

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 2rem;
  margin-top: clamp(2.5rem, 6vw, 5rem);
  padding-block: 1.125rem 2rem;
  border-top: 1px solid var(--line);
}

.footer-verse {
  color: #34463e;
  font-family: "LXGW WenKai Lite", "Songti SC", SimSun, serif;
  font-size: clamp(.9375rem, 1.4vw, 1.125rem);
  font-weight: 300;
  letter-spacing: .08em;
  line-height: 1.8;
}

.footer-verse span { white-space: nowrap; }

.footer-home {
  display: inline-flex;
  flex: none;
  align-items: center;
  min-height: 2.75rem;
  color: var(--green);
  font-size: .875rem;
  font-weight: 600;
  text-decoration: none;
}

.footer-home:hover { text-decoration: underline; }

@media (max-width: 42rem) {
  .journal { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 36rem) {
  .site-footer { flex-wrap: wrap; padding-block: 1.125rem 1.5rem; }
  .footer-home { margin-inline-start: auto; }
}
