:root {
  color-scheme: light dark;
  --text: #1c1c1e;
  --secondary: #6c6c70;
  --background: #ffffff;
  --rule: #e5e5ea;
  --accent: #0a66d8;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #f2f2f7;
    --secondary: #a1a1a6;
    --background: #000000;
    --rule: #2c2c2e;
    --accent: #4b9bff;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-text-size-adjust: 100%;
}

/* Chinese names PingFang first: Safari on iOS 26 (the simulator, at least) draws Chinese as
   empty boxes when the system font comes first, rather than falling back to PingFang. */
:lang(zh) {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

header,
main,
footer {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 20px;
}

header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 20px;
  padding-top: 28px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
}

header .name {
  margin-right: auto;
  font: 800 20px/1.2 ui-rounded, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  text-decoration: none;
}

header nav {
  display: flex;
  gap: 16px;
  font-size: 15px;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1 {
  margin: 36px 0 4px;
  font-size: 32px;
  line-height: 1.25;
}

h2 {
  margin: 36px 0 8px;
  font-size: 21px;
  line-height: 1.3;
}

h3 {
  margin: 24px 0 4px;
  font-size: 17px;
}

p,
ul {
  margin: 0 0 14px;
}

ul {
  padding-left: 22px;
}

li {
  margin-bottom: 6px;
}

.lead {
  font-size: 19px;
}

.date {
  color: var(--secondary);
  font-size: 15px;
}

.contact {
  padding: 16px 18px;
  border: 1px solid var(--rule);
  border-radius: 14px;
}

.contact p:last-child {
  margin-bottom: 0;
}

footer {
  margin-top: 48px;
  padding-top: 16px;
  padding-bottom: 40px;
  border-top: 1px solid var(--rule);
  color: var(--secondary);
  font-size: 14px;
}
