:root {
  color-scheme: light;
  --paper: #f7f8f4;
  --ink: #16231d;
  --muted: #526258;
  --line: #d9e2da;
  --green: #1b593b;
  --display: Georgia, "Songti SC", "Noto Serif CJK SC", "SimSun", serif;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
}
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid #408a62; outline-offset: 4px; }
.skip { position: absolute; z-index: 2; left: 12px; top: 12px; transform: translateY(-160%); background: white; padding: 12px; }
.skip:focus { transform: none; }
.shell { width: min(1120px, calc(100% - 56px)); margin-inline: auto; }
.masthead { border-bottom: 1px solid var(--line); }
.navigation, .footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.navigation { min-height: 74px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-size: 1.375rem; font-weight: 740; letter-spacing: -.05em; }
.brand span { width: 10px; height: 10px; border: 2px solid #487b60; border-radius: 50%; }
nav { display: flex; flex-wrap: wrap; gap: clamp(14px, 3vw, 32px); }
nav a { font-size: .9375rem; padding-block: 8px; }
nav a:hover, .back:hover, .read:hover { text-decoration: underline; text-underline-offset: 5px; }

.hero { margin-top: 28px; min-height: 365px; display: flex; align-items: center; position: relative; isolation: isolate; overflow: hidden; border-radius: 14px; background: #0b1611; color: #f3f9f4; }
.hero-image { position: absolute; inset: 0 0 0 auto; z-index: -2; width: 74%; height: 100%; object-fit: cover; object-position: center 51%; }
.hero::after { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg,#0b1611 12%,#0b1611dd 33%,#0b161133 67%,transparent); }
.hero-copy { padding: 48px clamp(25px, 6vw, 70px); }
.author { color: #c4e4ce; font-size: .9375rem; font-weight: 600; letter-spacing: .08em; }
h1, h2, h3 { font-family: var(--display); }
.hero h1 { font-size: clamp(3rem, 6.2vw, 5.15rem); line-height: 1.13; letter-spacing: -.06em; margin-block: 12px 17px; }
.hero-copy > p:not(.author) { color: #cddcd2; line-height: 1.75; font-size: 1.0625rem; }
.button { display: inline-flex; align-items: center; margin-top: 24px; min-height: 44px; padding: 8px 17px; border-radius: 6px; background: #d0eed9; color: #172d20; font-weight: 650; }
.button:hover { background: #effaf3; }

.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(245px, .4fr); gap: clamp(28px, 6vw, 78px); padding-block: 48px 62px; }
h2 { font-size: clamp(1.45rem, 3vw, 2.1rem); line-height: 1.32; }
#articles, #projects { scroll-margin-top: 24px; }
.articles h2 { margin-bottom: 20px; }
.post-card { border-top: 1px solid var(--line); padding-block: 22px; }
.post-card > h3 { font-size: clamp(1.6rem, 3vw, 2.3rem); margin-top: 8px; }
.post-card h3 a:hover { color: var(--green); }
.post-card p { margin-top: 8px; color: var(--muted); line-height: 1.8; }
.meta { color: var(--muted); font-size: .9375rem; font-variant-numeric: tabular-nums; }
.meta span { margin-left: 16px; }
.read, .back { display: inline-block; color: var(--green); font-size: .9375rem; font-weight: 650; }
.read { margin-top: 15px; }
.projects { align-self: start; padding: 22px; border: 1px solid var(--line); border-radius: 12px; background: #edf2ec; }
.projects h2 { font-size: 1.25rem; }
.projects ul { margin: 9px 0 0; padding: 0; list-style: none; }
.projects li + li { border-top: 1px solid var(--line); }
.projects a { display: flex; flex-direction: column; gap: 5px; padding: 10px 0; }
.projects a:hover strong { color: var(--green); text-decoration: underline; text-underline-offset: 4px; }
.projects span { color: var(--muted); font-size: .875rem; }
.footer { border-top: 1px solid var(--line); color: var(--muted); padding-block: 22px; font-size: .875rem; }

.post { max-width: 720px; padding-block: 48px 70px; }
.post-header { border-bottom: 1px solid var(--line); padding-block: 24px; }
.post h1 { font-size: clamp(2.5rem, 6vw, 4rem); line-height: 1.16; margin-top: 10px; letter-spacing: -.045em; }
.summary { color: var(--muted); font-size: 1.125rem; margin-top: 14px; line-height: 1.65; }
.prose { line-height: 1.9; font-size: 1.0625rem; overflow-wrap: anywhere; }
.prose :is(h2,h3,h4) { margin-top: 1.25em; }
.prose p, .prose pre, .prose ul, .prose ol, .prose blockquote { margin-block: 1em; }
.prose a { color: var(--green); text-decoration: underline; text-underline-offset: 4px; }
.prose img { max-width: 100%; height: auto; }
.prose pre { overflow: auto; background: #e9efe8; border-radius: 8px; padding: 1rem; }
.prose blockquote { margin-inline: 0; padding-inline: 1rem; border-left: 3px solid #82a98c; color: var(--muted); }
@media (max-width: 680px) {
  .shell { width: calc(100% - 32px); }
  .navigation { min-height: 62px; gap: 8px; }
  .brand { font-size: 1.125rem; }
  nav { gap: 12px; }
  nav a { font-size: .875rem; }
  .hero { margin-top: 16px; min-height: 0; align-items: flex-start; }
  .hero-image { inset: auto 0 0; width: 100%; height: 205px; }
  .hero::after { inset: auto 0 0; height: 205px; background: linear-gradient(#0b1611, #0b161133 50%, transparent); }
  .hero-copy { padding: 29px 22px 205px; }
  .hero h1 { font-size: clamp(2.375rem, 9.7vw, 3.3rem); }
  .home-grid { grid-template-columns: 1fr; padding-block: 30px 42px; }
  .footer { flex-wrap: wrap; }
  .post { padding-block: 31px 50px; }
}
