:root {
  --text: #1a1a1a;
  --text-muted: #5c5c5c;
  --bg: #fff;
  --border: #e6e6e6;
  --link: #0b57d0;
  --link-hover: #083ea0;
  --code-bg: #f4f4f4;
  --measure: 40rem;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Courier New", monospace;
}

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

html {
  font-size: 18px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

.wrapper {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.page-content {
  padding: 2rem 0 3rem;
}

.site-header {
  border-bottom: 1px solid var(--border);
  padding: 0.9rem 0;
}

.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.site-title {
  font-size: 1rem;
  font-weight: 650;
  color: var(--text);
  text-decoration: none;
}

.site-title:hover {
  color: var(--text);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 1.15rem;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
}

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

.nav-links a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.home,
.post {
  max-width: var(--measure);
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text);
  font-weight: 650;
  line-height: 1.25;
  margin: 2em 0 0.7em;
}

h1 {
  font-size: 1.85rem;
  margin-top: 0;
}

h2 {
  font-size: 1.25rem;
}

h3 {
  font-size: 1.1rem;
}

p {
  margin: 0 0 1.15em;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  color: var(--link-hover);
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

ul, ol {
  margin: 0 0 1.15em;
  padding-left: 1.3em;
}

li {
  margin-bottom: 0.4em;
}

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

.profile-section {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  margin-bottom: 1.75rem;
}

.profile-image {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.profile-info h1 {
  margin: 0;
  font-size: 1.75rem;
}

.card {
  margin: 2rem 0;
}

.card h2 {
  margin-top: 0;
}

.writing-list,
.post-list {
  list-style: none;
  padding-left: 0;
  margin: 0 0 1.25em;
}

.post-list li {
  margin-bottom: 0.65em;
}

.post-list .post-meta {
  display: inline-block;
  min-width: 7.5rem;
  margin-right: 0.6rem;
}

.writing-list li {
  margin-bottom: 1.4em;
}

.writing-list .post-meta {
  display: block;
  margin-bottom: 0.15em;
}

.writing-list .post-link {
  font-weight: 600;
}

.post-dek {
  margin: 0.25em 0 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.post-kind {
  color: var(--text-muted);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 0.35em;
}

.post-title {
  margin-bottom: 0.35em;
}

.post-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5em;
}

.post-nav {
  margin-top: 2.5em;
  padding-top: 1em;
  border-top: 1px solid var(--border);
}

.notes-link,
.rss-subscribe {
  color: var(--text-muted);
  font-size: 0.95rem;
}

code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: var(--code-bg);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

pre {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  line-height: 1.45;
  background: var(--code-bg);
  padding: 1rem 1.1rem;
  border-radius: 6px;
  overflow-x: auto;
  margin: 1.5em 0;
}

pre code {
  background: none;
  padding: 0;
  font-size: inherit;
}

div.highlight {
  background: var(--code-bg);
  border-radius: 6px;
  margin: 1.5em 0;
  overflow-x: auto;
}

div.highlight pre {
  margin: 0;
  background: none;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.25rem 0 2rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--text-muted);
}

.site-footer a:hover {
  color: var(--text);
}

@media (max-width: 640px) {
  html {
    font-size: 17px;
  }

  .page-content {
    padding: 1.5rem 0 2.5rem;
  }

  .profile-section {
    align-items: flex-start;
  }

  .profile-image {
    width: 72px;
    height: 72px;
  }

  .profile-info h1 {
    font-size: 1.5rem;
  }

  h1,
  .post-title {
    font-size: 1.5rem;
  }

  .post-list .post-meta {
    display: block;
    min-width: 0;
    margin-bottom: 0.1em;
  }
}

@media print {
  .site-header,
  .site-footer,
  .post-nav {
    display: none;
  }

  body {
    font-size: 12pt;
    line-height: 1.4;
  }
}
