:root {
  color-scheme: light;
  --background: #f1f5f1;
  --text: #202822;
  --muted: #3d453f;
  --accent: #315744;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 18px;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--background);
  color: var(--text);
  font-family: Georgia, "Times New Roman", Times, serif;
  line-height: 1.5;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.12em;
}

a:hover {
  text-decoration-thickness: 0.1em;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  transform: translateY(-200%);
  background: var(--background);
  padding: 0.25rem 0.5rem;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header,
main,
.site-footer {
  width: min(100% - 3rem, 1440px);
  margin-inline: auto;
}

.site-header {
  padding-block: 1.4rem 1.6rem;
}

h1,
h2,
h3 {
  margin-top: 0;
}

h1 {
  margin-bottom: 0.35rem;
  font-size: clamp(1.75rem, 1.4rem + 2vw, 2.25rem);
  line-height: 1.14;
  font-weight: 700;
}

.name-zh {
  font-size: 0.6em;
  font-weight: 400;
  white-space: nowrap;
}

.site-role {
  color: var(--muted);
}

h2 {
  margin-bottom: 0.65rem;
  font-size: 1.4rem;
  line-height: 1.2;
}

h3 {
  margin-bottom: 0.45rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.35;
  font-weight: 700;
}

ul + h3 {
  margin-top: 1.3rem;
}

p {
  margin: 0;
}

.section p + p {
  margin-top: 0.5rem;
}

ul {
  margin: 0 0 0 1.25rem;
  padding: 0;
}

li + li {
  margin-top: 0.65rem;
}

.math {
  font-style: italic;
}

.section {
  margin-bottom: 2.2rem;
  overflow-wrap: anywhere;
}

.site-footer {
  padding-bottom: 1.8rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.site-footer::before {
  content: "";
  display: block;
  width: 3rem;
  margin-bottom: 0.8rem;
  border-top: 1px solid #c7d2ca;
}

@media (max-width: 700px) {
  html {
    font-size: 16px;
  }

  .site-header,
  main,
  .site-footer {
    width: min(100% - 2rem, 40rem);
  }

  .site-header {
    padding-block: 1.15rem 1.35rem;
  }

  h2 {
    font-size: 1.3rem;
  }

  .section {
    margin-bottom: 1.9rem;
  }
}
