:root {
  --bg: #f6f4ef;
  --text: #1d1c1a;
  --muted: #6c6860;
  --rule: #ddd8cd;
  --accent: #9a3412;
  --serif: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", "STSong", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Noto Sans CJK SC", "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171614;
    --text: #e9e5dc;
    --muted: #a19c92;
    --rule: #34312c;
    --accent: #eb9a74;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.85 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

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

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

.page {
  max-width: 720px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 44px 24px 28px;
  display: flex;
  flex-direction: column;
}

.masthead {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.95rem;
}

.masthead a {
  text-decoration: none;
}

.wordmark {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 700;
}

main {
  flex: 1;
}

.intro {
  margin: 112px 0 88px;
}

h1 {
  margin: 0 0 22px;
  font-family: var(--serif);
  font-size: clamp(2rem, 6vw, 2.9rem);
  font-weight: 700;
  line-height: 1.3;
}

.intro p {
  max-width: 34em;
  margin: 0;
  color: var(--muted);
}

p {
  text-wrap: pretty;
}

h2 {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
}

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

.project {
  padding: 30px 0 28px;
  border-bottom: 1px solid var(--rule);
}

h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 700;
}

.project p {
  margin: 10px 0 0;
}

.project__links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
  font-size: 0.95rem;
}

/* The ICP record stays centred at the bottom of the page. */
.footer {
  margin-top: 104px;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

.footer p {
  margin: 2px 0;
}

@media (max-width: 560px) {
  body {
    font-size: 16px;
  }

  .page {
    padding: 28px 20px 24px;
  }

  .intro {
    margin: 72px 0 64px;
  }
}
