:root {
  color-scheme: light dark;
  --paper: #f6efe3;
  --ink: #1f2a44;
  --ink-secondary: #5a6278;
  --accent: #2a56c6;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1a1917;
    --ink: #f6efe3;
    --ink-secondary: #ada79b;
    --accent: #9db7ff;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", "Yu Gothic", sans-serif;
  font-size: 17px;
  line-height: 1.8;
  -webkit-text-size-adjust: 100%;
}

main {
  max-width: 40rem;
  margin: 0 auto;
  padding: 4.5rem 1.5rem 6rem;
}

.name {
  margin: 0 0 3rem;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* The name is a link on the inner pages: its press area is 44px high. */
.name a {
  display: inline-block;
  margin: -0.8125rem 0;
  padding: 0.8125rem 0;
  color: inherit;
  text-decoration: none;
}

/* The longest heading (11 full-width characters) stays on one line from a 320px
   screen up: 7.5vw of the width a character, and never above 36px. */
h1 {
  margin: 0 0 1.5rem;
  font-size: clamp(1.5rem, 7.5vw, 2.25rem);
  font-weight: 800;
  line-height: 1.3;
  line-break: strict;
}

p {
  margin: 0 0 1rem;
}

.quiet {
  color: var(--ink-secondary);
}

nav {
  margin-top: 3rem;
}

nav a {
  display: block;
  padding: 0.5rem 0;
  color: var(--accent);
  text-decoration: none;
}

nav a:hover {
  text-decoration: underline;
}
