:root {
  --paper: #f5f3eb;
  --ink: #30372d;
  --muted: #848779;
  --olive: #7e8762;
  --line: #dcded1;
  --serif: 'Noto Serif SC', 'Songti SC', SimSun, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, 'Microsoft YaHei', sans-serif;
  font-size: 14px;
  line-height: 1.7;
}
body.is-loading { overflow: hidden; }
.cover-loader {
  --loader-progress: 0;
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  color: #293027;
  background: #f1eee5;
  transition: opacity .65s ease, visibility 0s linear .65s;
}
.cover-loader.is-finished {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.cover-loader-inner { width: min(560px, 78vw); }
.cover-loader-brand {
  display: block;
  margin-bottom: 4px;
  font: 300 18px/1.3 'Inter', Arial, sans-serif;
}
.cover-loader strong {
  display: block;
  font: 700 64px/1 'Inter', Arial, sans-serif;
}
.cover-loader-progress {
  height: 1px;
  margin-top: 42px;
  overflow: hidden;
  background: #29302730;
}
.cover-loader-progress i {
  display: block;
  width: 100%;
  height: 100%;
  background: #55624f;
  transform: scaleX(var(--loader-progress));
  transform-origin: left;
  transition: transform .35s ease-out;
}
.cover-loader-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  color: #687064;
  font: 600 9px/1.4 'Inter', Arial, sans-serif;
  letter-spacing: 0;
}
button,
input { font: inherit; }
button,
a,
input { -webkit-tap-highlight-color: transparent; }
button {
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid #a9924b;
  outline-offset: 6px;
}
[hidden] { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.skip-link {
  position: fixed;
  top: -100px;
  left: 20px;
  z-index: 20;
  padding: 12px;
  background: var(--paper);
}
.skip-link:focus { top: 12px; }

.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 5;
  height: 104px;
  padding: 0 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fffbed;
  text-shadow: 0 1px 16px #0007;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 2px;
}
.brand-en {
  margin-left: 9px;
  padding-left: 20px;
  border-left: 1px solid #ffffff65;
  font: 9px Arial;
  letter-spacing: 2px;
}
.site-header nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 13px;
}
.site-header nav a { position: relative; }
.site-header nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width .2s;
}
.site-header nav a:hover::after { width: 100%; }

.hero {
  position: relative;
  height: 100svh;
  min-height: 640px;
  overflow: hidden;
  isolation: isolate;
  color: #fffbed;
}
#stage {
  position: absolute;
  inset: 0;
  z-index: -3;
  overflow: hidden;
  background: #333827;
}
.hero.wallpaper-fallback #stage { background: #333827 url('../media/sunflower.jpg') center / cover no-repeat; }
#wallpaper {
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  transition: opacity 1.2s;
}
#wallpaper.ready { opacity: 1; }
@media (max-width: 650px) {
  .cover-loader-inner { width: 82vw; }
  .cover-loader strong { font-size: 42px; }
  .cover-loader-progress { margin-top: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  .cover-loader { transition: none; }
  .cover-loader-progress i { transition: none; }
}
.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: linear-gradient(90deg, #101a126b, transparent 58%), linear-gradient(0deg, #18241766, transparent 48%);
}
.hero::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  z-index: -1;
  height: 54px;
  background: linear-gradient(transparent, #f5f3eb3d);
}
.hero-title {
  position: absolute;
  left: 7%;
  top: 48%;
  z-index: 1;
  max-width: 760px;
}
.hero-caption {
  position: absolute;
  right: 4.5%;
  bottom: 94px;
  z-index: 1;
  opacity: .72;
  font-size: 8px;
  letter-spacing: 2px;
  text-shadow: 0 2px 12px #111;
}
.eyebrow {
  font-size: 9px;
  line-height: 1.6;
  letter-spacing: 2.1px;
}
.olive { color: var(--olive); }

.section-shell {
  width: 84%;
  max-width: 1130px;
  margin: auto;
}
.section-heading {
  margin-bottom: 45px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}
.section-heading h2 {
  margin: 13px 0 0;
  font: 400 32px/1.5 var(--serif);
  letter-spacing: 1px;
}
.section-heading > p {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.9;
}
.post-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 1px;
}
.post-meta .category { color: var(--olive); }
.post-arrow {
  align-self: center;
  color: #a9ae9b;
  transition: transform .2s;
}

body:not(.reading) .site-header { display: none; }
#article-content h1:focus { outline: none; }
.reading .site-header {
  position: relative;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  text-shadow: none;
}
.reading .brand-en { border-color: var(--line); }
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 15;
  width: 0;
  height: 2px;
  background: #949d73;
}
.article-shell {
  width: 84%;
  max-width: 700px;
  margin: 65px auto 90px;
}
.article-back {
  color: var(--olive);
  font-size: 11px;
}
.article-header {
  padding: 55px 0 35px;
  border-bottom: 1px solid var(--line);
}
.article-header h1 {
  margin: 18px 0;
  font: 400 clamp(28px, 4vw, 39px)/1.6 var(--serif);
}
.article-deck {
  margin: 0;
  color: #8b907c;
  font: 15px/2 var(--serif);
}
.article-body {
  padding: 30px 0 0;
  color: #4a5244;
  font: 16px/2.2 var(--serif);
}
.article-body p { margin: 0 0 24px; }
.article-body a {
  color: #536f91;
  text-decoration: none;
}
.article-body a:hover { color: #536f91; }
.article-body h2 {
  margin: 40px 0 20px;
  font: 500 23px/1.7 var(--serif);
}
.article-body blockquote {
  margin: 34px 0;
  padding: 8px 0 8px 24px;
  border-left: 2px solid #b1b69a;
  color: var(--olive);
  font-size: 19px;
}
.article-body figure { margin: 36px 0; }
.article-body img {
  width: 100%;
  height: auto;
  display: block;
}
.article-body figcaption {
  margin-top: 12px;
  color: #969d86;
  font: 10px/1.8 Arial, sans-serif;
  text-align: center;
}
.article-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 72px;
  padding: 20px 0 32px;
  border-top: 1px solid var(--line);
  color: #959b8b;
  font: 300 9px/1.6 var(--meta-font);
  letter-spacing: .06em;
}
.next-post {
  display: block;
  padding: 25px 0;
  border-top: 1px solid var(--line);
  font: 19px/2 var(--serif);
}
.next-post > span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font: 9px Arial;
  letter-spacing: 2px;
}
.not-found {
  padding: 70px 0;
  font-family: var(--serif);
}

.cover-shell {
  position: relative;
  height: 112svh;
}
.journal { scroll-snap-align: start; }

@media (max-width: 900px) {
  .brand-en { display: none; }
  .section-shell { width: 86%; }
  .section-heading h2 { font-size: 28px; }
}

@media (max-width: 650px) {
  .site-header {
    height: 82px;
    padding: 0 6%;
  }
  .brand {
    gap: 6px;
    font-size: 17px;
  }
  .site-header nav {
    gap: 20px;
    font-size: 11px;
  }
  .section-heading {
    margin-bottom: 30px;
    gap: 15px;
  }
  .section-heading h2 { font-size: 24px; }
  .section-heading > p { display: none; }
  .article-shell {
    width: 86%;
    margin-top: 34px;
  }
  .article-header { padding-top: 32px; }
  .article-header h1 { font-size: 28px; }
  .article-body { font-size: 15px; }
  .article-body h2 { font-size: 21px; }
  .article-body blockquote { font-size: 17px; }
  .article-footer { margin-top: 52px; font-size: 8px; }
  .hero-caption {
    right: 6%;
    bottom: 105px;
    font-size: 7px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cover-shell { height: 100svh; }
  * { transition: none !important; }
}
