:root {
  --bg: #0a0a0a;
  --fg: #e8e8e6;
  --fg-dim: #8a8a86;
  --accent: #d8d3c4;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, "Helvetica Neue", Helvetica, Arial, "Segoe UI", sans-serif;
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  max-width: 68ch;
  margin: 0 auto;
  padding: 12vh 1.5rem 20vh;
}

a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

a:hover {
  border-bottom-color: var(--accent);
}

h1, h2, h3 {
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0 0 0.4em;
}

/* site title / home link */
.site-title {
  display: inline-block;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0;
  margin-bottom: 6rem;
}

/* home: post index */
.post-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.post-list li {
  margin-bottom: 2.25rem;
}

.post-list .post-title {
  display: block;
  font-size: 1.5rem;
  font-weight: 500;
}

.post-list time {
  display: block;
  color: var(--fg-dim);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

.intro {
  color: var(--fg-dim);
  font-size: 1.05rem;
  margin-bottom: 4rem;
  max-width: 50ch;
}

/* single post */
.post-header {
  margin-bottom: 3rem;
}

.post-header h1 {
  font-size: 2.4rem;
}

.post-header time {
  display: block;
  color: var(--fg-dim);
  font-size: 0.95rem;
  margin-top: 0.75rem;
}

.post-content {
  font-size: 1.15rem;
}

.post-content p {
  margin: 0 0 1.4em;
}

.post-content a {
  border-bottom: 1px solid var(--fg-dim);
}

.post-content a:hover {
  border-bottom-color: var(--accent);
}

.post-content h2 {
  font-size: 1.5rem;
  margin-top: 2.2em;
}

.post-content h3 {
  font-size: 1.2rem;
  margin-top: 1.8em;
}

.post-content code {
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  font-size: 0.9em;
  background: #171717;
  padding: 0.15em 0.4em;
  border-radius: 3px;
}

.post-content pre {
  background: #111;
  padding: 1.2rem;
  overflow-x: auto;
  border-radius: 4px;
}

.post-content pre code {
  background: none;
  padding: 0;
}

.post-content blockquote {
  margin: 1.5em 0;
  padding-left: 1.2em;
  border-left: 2px solid #2a2a2a;
  color: var(--fg-dim);
}

.post-content img {
  max-width: 100%;
}

::selection {
  background: #2a2a2a;
}
