:root {
  --bg: #ffffff;
  --fg: #111111;
  --muted: #6b6b6b;
  --link: #111111;
  --rule: #e6e6e6;
  --max-width: 680px;
  --gutter: 24px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0e0e;
    --fg: #ededed;
    --muted: #8a8a8a;
    --link: #ededed;
    --rule: #232323;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scrollbar-gutter: stable both-edges;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Berkeley Mono", "SFMono-Regular", ui-monospace, "Menlo",
    "Consolas", "Liberation Mono", monospace;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 96px var(--gutter) 120px;
}

.name {
  margin: 0 0 16px;
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.hero {
  margin: 0 0 72px;
  font-size: 1rem;
}

.section {
  margin: 0 0 56px;
}

.section:last-child {
  margin-bottom: 0;
}

.section-heading {
  margin: 0 0 20px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.section-heading .arrow {
  font-weight: 400;
}

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

.list li {
  margin: 0 0 12px;
  padding-left: 1.6em;
  text-indent: -1.6em;
}

.list li:last-child {
  margin-bottom: 0;
}

.list li::before {
  content: "- ";
  color: var(--muted);
}

a {
  color: var(--link);
  text-decoration: none;
  background-image: linear-gradient(var(--link), var(--link));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 1px;
  transition: background-size 0.15s ease, color 0.15s ease;
}

a:hover {
  background-size: 0% 1px;
  color: var(--muted);
}

.muted {
  color: var(--muted);
}

em {
  font-style: italic;
}

/* Navigation */
.nav {
  display: flex;
  gap: 20px;
  margin: 0 0 64px;
  font-size: 0.9rem;
}

.nav a {
  background-image: none;
  color: var(--muted);
}

.nav a:hover {
  background-image: none;
  color: var(--fg);
}

/* Blog index */
.blog-title {
  margin: 0 0 32px;
  font-size: 1.15rem;
}

.blog-intro {
  margin: 0 0 56px;
}

.blog-intro p {
  margin: 0 0 12px;
}

.blog-intro p:last-child {
  margin-bottom: 0;
}

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

.post-list li {
  margin: 0 0 16px;
}

.post-list li:last-child {
  margin-bottom: 0;
}

.post-link {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  background-image: none;
}

.post-link:hover {
  background-image: none;
}

.post-arrow {
  color: var(--muted);
}

.post-title {
  font-weight: 600;
  background-image: linear-gradient(var(--link), var(--link));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 1px;
  transition: background-size 0.15s ease;
}

.post-link:hover .post-title {
  background-size: 0% 1px;
}

.post-date {
  color: var(--muted);
  font-weight: 400;
}

/* Article */
.post-header {
  margin: 0 0 48px;
}

.article h1 {
  margin: 0 0 8px;
  font-size: 1.4rem;
  font-weight: 600;
}

.post-meta {
  margin: 0;
  color: var(--muted);
}

.article h2 {
  margin: 44px 0 16px;
  font-size: 1.15rem;
  font-weight: 600;
}

.article h3 {
  margin: 28px 0 12px;
  font-size: 1rem;
  font-weight: 600;
}

.article p {
  margin: 0 0 16px;
}

.article hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 44px 0;
}

@media (max-width: 480px) {
  body {
    font-size: 15px;
  }

  .page {
    padding: 64px 20px 88px;
  }

  .name {
    font-size: 2.125rem;
    margin-bottom: 12px;
  }

  .hero {
    margin-bottom: 56px;
  }

  .section {
    margin-bottom: 44px;
  }

  .nav {
    margin-bottom: 48px;
  }
}
