:root {
  color-scheme: light;
  --paper: #f5f6f1;
  --ink: #202923;
  --muted: #56635c;
  --line: #d6ddd3;
  --moss: #2b4438;
  --mist: #e4ece1;
  --serif: "Instrument Serif", "Songti SC", "Noto Serif CJK SC", SimSun, serif;
  --sans: "Inter", system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 1.25rem; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  line-height: 1.65;
}
main { flex: 1; }
a { color: inherit; }
a:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }
.shell { width: min(1104px, calc(100% - 80px)); margin-inline: auto; }

.skip-link {
  position: absolute;
  inset: .5rem auto auto 1rem;
  z-index: 2;
  padding: .5rem 1rem;
  background: var(--paper);
  transform: translateY(-200%);
}
.skip-link:focus { transform: translateY(0); }

.header-inner, .site-nav, .footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-inner { min-height: 76px; }
.brand, .site-nav a, .footer-inner a { text-decoration: none; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .06em; }
.site-nav { gap: 30px; font-size: .875rem; }
.site-nav a { padding-block: .2rem; color: var(--muted); }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--ink); }
.site-nav a[aria-current] { box-shadow: 0 1px var(--moss); }

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  min-height: clamp(370px, 44vw, 450px);
  overflow: hidden;
  border-radius: 10px;
  color: #fff;
  background: #273b32;
}
.hero-image, .hero::after { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-image { z-index: -2; object-fit: cover; object-position: center 53%; }
.hero::after {
  content: "";
  z-index: -1;
  background: linear-gradient(90deg, rgb(12 29 23 / 83%), rgb(17 31 25 / 55%) 43%, rgb(17 29 23 / 6%) 90%);
}
.hero-copy { padding: clamp(28px, 7vw, 82px); }
.hero-copy h1, .reading h1 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: .035em;
  line-height: 1.17;
}
.hero-copy h1 { margin: 0; font-size: clamp(3rem, 7vw, 5.5rem); }
.hero-copy p { margin: 1rem 0 2rem; font-size: clamp(.9rem, 2vw, 1.125rem); letter-spacing: .1em; }
.hero-copy a {
  display: inline-flex;
  gap: 22px;
  align-items: center;
  padding: .45rem 0;
  border-bottom: 1px solid rgb(255 255 255 / 65%);
  text-decoration: none;
  font-size: .875rem;
}
.hero-copy a:hover { border-color: #fff; }

.posts { margin: 52px auto 69px; }
.section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-head h2 { margin: 0; font-family: var(--serif); font-size: 2rem; line-height: 1.3; }
.filters { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.filters a { padding: .28rem .78rem; border: 1px solid transparent; border-radius: 28px; color: var(--muted); font-size: .8125rem; text-decoration: none; }
.filters a:hover { border-color: var(--line); color: var(--ink); }
.filters a[aria-current] { color: var(--moss); background: var(--mist); font-weight: 650; }
.post-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.post-list li { border-bottom: 1px solid var(--line); }
.post-row {
  display: grid;
  grid-template-columns: 134px minmax(0, 1fr) 36px;
  align-items: center;
  gap: 20px;
  padding: 22px 8px;
  text-decoration: none;
}
.post-row:hover { background: #edf1e8; }
.post-meta { display: grid; gap: .18rem; color: var(--muted); font-size: .8125rem; font-variant-numeric: tabular-nums; }
.post-copy h3 { margin: 0; font-size: 1.25rem; font-weight: 650; line-height: 1.45; }
.post-copy p { margin: .3rem 0 0; color: var(--muted); font-size: .9rem; }
.post-arrow { justify-self: end; color: var(--moss); font-size: 1.25rem; }
.empty { padding-block: 1rem; border-top: 1px solid var(--line); }

.reading { width: min(100%, 710px); margin: clamp(42px, 8vw, 88px) auto; }
.reading header { margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
.reading h1 { margin: 0; overflow-wrap: anywhere; font-size: clamp(2.15rem, 6vw, 4rem); }
.article-meta { display: flex; gap: 1rem; margin-bottom: 1rem; color: var(--muted); font-size: .875rem; }
.summary { margin: 1rem 0 0; color: var(--muted); }
.article-body { font-size: 1.06rem; line-height: 1.95; overflow-wrap: anywhere; }
.article-body p { margin: 0 0 1.4em; }
.back { display: inline-block; margin-bottom: 2rem; color: var(--moss); font-size: .875rem; text-underline-offset: .24rem; }
.article-body + .back { margin: 0; }
.footer-inner { min-height: 74px; border-top: 1px solid var(--line); color: var(--muted); font-size: .8125rem; }
.footer-inner a:hover { text-decoration: underline; }

@media (max-width: 650px) {
  .shell { width: calc(100% - 32px); }
  .header-inner { min-height: 64px; }
  .site-nav { gap: 20px; }
  .hero { min-height: 340px; }
  .hero-image { object-position: 58% center; }
  .hero::after { background: linear-gradient(90deg, rgb(12 29 23 / 81%), rgb(17 31 25 / 39%)); }
  .posts { margin-block: 36px 50px; }
  .section-head { gap: 10px; }
  .post-row { grid-template-columns: minmax(0, 1fr) 24px; gap: 6px 10px; padding: 16px 2px; }
  .post-meta { display: flex; gap: 10px; }
  .post-copy { grid-row: 2; }
  .post-copy h3 { font-size: 1.125rem; }
  .post-arrow { grid-column: 2; grid-row: 1 / span 2; }
}

@media (max-width: 360px) {
  .section-head { align-items: flex-start; flex-direction: column; }
}
