:root {
  color-scheme: light dark;
  --bg: #fbfaf7;
  --text: #24292f;
  --muted: #6b6f76;
  --line: #e6e3dc;
  --accent: #2f6f5e;
  --code-bg: #f1efe9;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17181a;
    --text: #e4e2dd;
    --muted: #9a9ea6;
    --line: #2d2f33;
    --accent: #7cc4ad;
    --code-bg: #212327;
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei',
    'Noto Sans CJK SC', sans-serif;
  font-size: 17px;
  line-height: 1.8;
}

.page {
  max-width: 42rem;
  margin: 0 auto;
  padding: 3.5rem 1rem 2rem;
}

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

a:hover {
  text-decoration: underline;
}

/* 目录页 */

.site-title {
  margin: 0;
  font-size: 1.75rem;
  letter-spacing: 0.02em;
}

.site-intro {
  margin: 0.5rem 0 2.5rem;
  color: var(--muted);
}

.note-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.note-list li {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
}

.note-list time {
  display: block;
  color: var(--muted);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

.note-list h2 {
  margin: 0.15rem 0 0.35rem;
  font-size: 1.125rem;
  line-height: 1.5;
}

.note-list p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* 笔记页 */

.back {
  display: inline-block;
  margin-bottom: 2rem;
  font-size: 0.9375rem;
}

.note-title {
  margin: 0;
  font-size: 1.625rem;
  line-height: 1.45;
}

.note-date {
  display: block;
  margin: 0.5rem 0 2rem;
  color: var(--muted);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

.note h2 {
  margin: 2.25rem 0 0.75rem;
  font-size: 1.1875rem;
}

.note p,
.note ul,
.note ol {
  margin: 0 0 1rem;
}

.note li + li {
  margin-top: 0.35rem;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.875em;
}

:not(pre) > code {
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: var(--code-bg);
}

pre {
  margin: 0 0 1.25rem;
  padding: 0.875rem 1rem;
  overflow-x: auto;
  border-radius: 6px;
  background: var(--code-bg);
  line-height: 1.6;
}

/* 页脚 */

.site-footer {
  margin-top: 3.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8125rem;
  text-align: center;
}

.site-footer a {
  color: inherit;
}
