:root {
  --text: #212121;
  --muted: #767676;
  --rule: #dcdcdc;
  --bg: #fff;
  color-scheme: light;
}

* { box-sizing: border-box; }

html {
  font-family: Georgia, serif;
  font-size: 1.1875em;
  line-height: 1.45;
  font-feature-settings: "kern" 1, "liga" 1;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 3rem 1rem 5rem;
  max-width: 36rem;
  margin-inline: auto;
  color: var(--text);
  background: var(--bg);
}

header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 3rem;
}

.name {
  text-decoration: none;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 1rem;
}

nav a[aria-current="page"] { color: var(--text); }

nav a:hover,
.name:hover { text-decoration: underline; }

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

h1, h2, h3 {
  font-size: 1rem;
  font-weight: normal;
  line-height: 1.4;
  margin: 2.5rem 0 1rem;
}

main > h1, article > h1 { margin-top: 0; }

h1 { font-size: 1.25rem; }

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

.date {
  color: var(--muted);
  margin-top: -0.75rem;
  margin-bottom: 2rem;
}

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

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

code {
  font-family: Menlo, Consolas, monospace;
  font-size: 0.85em;
}

pre {
  overflow-x: auto;
  padding: 1rem;
  border: 1px solid var(--rule);
}

sup {
  font-size: 0.7em;
  line-height: 0;
  vertical-align: super;
}

sup a { text-decoration: none; }

.footnotes {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-size: 0.9rem;
  color: var(--muted);
}

.footnotes ol { padding-left: 1.25rem; }
.footnotes a { text-decoration: none; }

/* Writing index */
.posts {
  list-style: none;
  padding: 0;
}

.posts li {
  display: flex;
  gap: 1.25rem;
  align-items: baseline;
  padding: 0.4rem 0;
}

.posts time {
  color: var(--muted);
  flex: 0 0 7.5rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.posts a { text-decoration: none; }
.posts a:hover { text-decoration: underline; }

@media (max-width: 30rem) {
  html { font-size: 1.0625em; }
  body { padding-top: 2rem; }
  .posts li { display: block; padding: 0.6rem 0; }
  .posts time { display: block; font-size: 0.85rem; }
}
