:root {
  color-scheme: light dark;
  --background: #fbfaf7;
  --text: #22201d;
  --muted: #716d66;
  --link: #2457a6;
  --rule: #dedbd4;
  --code: #f0eee8;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #171716;
    --text: #e7e3dc;
    --muted: #aaa59d;
    --link: #8bb9ff;
    --rule: #393735;
    --code: #222220;
  }
}

* {
  box-sizing: border-box;
}

html {
  font-size: 19px;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

main {
  width: min(100% - 2rem, 42rem);
  margin: 0 auto;
  padding: 3.5rem 0 2rem;
}

h1,
h2,
h3 {
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 {
  margin: 0.2rem 0 1.7rem;
  font-size: clamp(2rem, 8vw, 3.15rem);
  font-weight: 650;
}

h2 {
  margin-top: 2.4rem;
  font-size: 1.55rem;
}

h3 {
  margin-top: 2rem;
  font-size: 1.22rem;
}

p,
ul,
ol,
pre,
blockquote {
  margin: 1.1rem 0;
}

a {
  color: var(--link);
  text-decoration-thickness: 0.07em;
  text-underline-offset: 0.13em;
}

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

nav,
footer,
.note-description {
  color: var(--muted);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.78rem;
}

nav {
  margin-bottom: 2.8rem;
}

nav a,
footer a {
  color: inherit;
}

.site-header {
  margin-bottom: 3.6rem;
}

.site-header h1 {
  margin-bottom: 0.4rem;
}

.site-header p {
  max-width: 31rem;
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.note-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.note-list li {
  display: grid;
  gap: 0.15rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--rule);
}

.note-list li:first-child {
  border-top: 1px solid var(--rule);
}

.note-list a {
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
}

.note-list a:hover {
  color: var(--link);
  text-decoration: underline;
}

.note-description {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.45;
}

blockquote {
  margin-left: 0;
  padding-left: 1rem;
  border-left: 3px solid var(--rule);
  color: var(--muted);
}

code,
pre {
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.84rem;
}

code {
  padding: 0.12rem 0.28rem;
  border-radius: 0.2rem;
  background: var(--code);
}

pre {
  overflow-x: auto;
  padding: 1rem;
  border: 1px solid var(--rule);
  border-radius: 0.25rem;
  background: var(--code);
  line-height: 1.45;
}

pre code {
  padding: 0;
  background: transparent;
}

img {
  max-width: 100%;
  height: auto;
}

hr {
  margin: 2.8rem 0;
  border: 0;
  border-top: 1px solid var(--rule);
}

footer {
  display: flex;
  gap: 0.55rem;
  margin-top: 4rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--rule);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 34rem) {
  main {
    padding-top: 2rem;
  }
}
