:root {
  color-scheme: light;
  --paper: #f6f8f5;
  --ink: #122b27;
  --muted: #48615c;
  --accent: #225c52;
  --rule: #cdd8d2;
  --serif: "Noto Serif SC", "Songti SC", SimSun, serif;
  --sans: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); }
a { color: inherit; text-underline-offset: .25em; }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }
h1, h2, p, figure { margin: 0; }
.container { width: min(100% - 3.5rem, 72rem); margin-inline: auto; }
.skip { position: absolute; inset: .75rem auto auto .75rem; padding: .5rem 1rem; background: white; transform: translateY(-200%); }
.skip:focus { transform: none; }

.site-header, .site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 5rem;
}
.site-header { border-bottom: 1px solid var(--rule); }
.brand { font-family: var(--serif); font-size: 1.2rem; font-weight: 700; letter-spacing: .06em; text-decoration: none; }
nav { display: flex; gap: clamp(1.4rem, 4vw, 2.5rem); }
nav a { color: var(--muted); text-decoration: none; }
nav a:hover { text-decoration: underline; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 7vw, 6rem);
  align-items: center;
  padding-block: clamp(3.25rem, 8vw, 6.25rem);
}
.eyebrow { color: var(--accent); font-size: .875rem; font-weight: 650; letter-spacing: .17em; text-transform: uppercase; }
h1, h2 { font-family: var(--serif); }
h1 { font-size: clamp(3.4rem, 6.8vw, 6rem); line-height: 1.09; letter-spacing: -.085em; margin-block: 1.05rem 1.5rem; }
h1 span { color: var(--accent); }
.intro { max-width: 24rem; font-size: 1.05rem; line-height: 1.9; color: var(--muted); text-wrap: pretty; }
.button { display: inline-block; margin-top: 1.65rem; padding: .8rem 1.1rem; background: var(--ink); color: white; text-decoration: none; }
.button:hover { background: var(--accent); }
.hero-image { position: relative; background: #dce4de; overflow: hidden; }
.hero-image img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.hero-image figcaption { position: absolute; bottom: 0; left: 0; padding: .55rem .8rem; background: var(--paper); color: var(--muted); font-size: .82rem; }

.notes { padding-bottom: clamp(3rem, 7vw, 5rem); }
.section-heading { border-bottom: 1px solid var(--ink); padding-bottom: 1.1rem; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); line-height: 1.25; }
.section-heading h2 { margin-top: .35rem; }
details { border-bottom: 1px solid var(--rule); }
summary { display: grid; grid-template-columns: 5rem 1fr 1.5rem; gap: 1rem; align-items: center; cursor: pointer; padding: 1.15rem 0; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary:hover .note-title { color: var(--accent); text-decoration: underline; text-underline-offset: .3em; }
.topic { color: var(--muted); font-size: .92rem; }
.note-title { font-weight: 600; }
.toggle { width: 1rem; height: 1rem; display: grid; place-items: center; justify-self: end; color: var(--accent); }
.toggle::before, .toggle::after { content: ""; grid-area: 1 / 1; width: .9rem; height: 1px; background: currentColor; }
.toggle::after { transform: rotate(90deg); }
details[open] .toggle::after { display: none; }
.entry { margin-left: 6rem; margin-bottom: 1.4rem; max-width: 43rem; color: var(--muted); line-height: 1.85; }
.entry p + p { margin-top: .8rem; }
code, kbd { font-size: .92em; background: #e7efea; color: var(--ink); padding: .1em .25em; overflow-wrap: anywhere; }

.about { display: grid; grid-template-columns: minmax(8rem, 1fr) minmax(0, 2.3fr); align-items: start; gap: 1.5rem; padding: clamp(1.5rem, 5vw, 3.2rem); background: #e6eee8; }
.about p { max-width: 36rem; color: var(--muted); line-height: 1.85; }
.site-footer { color: var(--muted); font-size: .86rem; }
.site-footer .brand { font-size: 1rem; }

@media (max-width: 48rem) {
  .container { width: min(100% - 2rem, 36rem); }
  .site-header { min-height: 4rem; }
  .hero { grid-template-columns: 1fr; gap: 2rem; }
  .hero-image img { aspect-ratio: 3 / 2; }
  .about { grid-template-columns: 1fr; gap: .75rem; }
  summary { grid-template-columns: 3rem 1fr 1rem; gap: .6rem; }
  .entry { margin-left: 0; }
}
