:root {
  --bg: #fdfdfc;
  --text: #2d2923;
  --muted: #707478;
  --line: #dfe3e4;
  --link: #5f6870;
  --code: #f2f3f4;
  --shade: #f4efe5;
  --measure: 700px;
  --measure-article: 700px;
  --space-xs: 0.25rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.15rem;
  --space-xl: 2rem;
  --space-rule: 2.25rem;
  --space-2xl: 2.5rem;
  --space-nav: 0.9rem;
  --font-small: 0.85rem;
  --font-meta: 0.92rem;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 18px;
  text-size-adjust: 100%;
}

body {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  flex-direction: column;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Source Sans 3", sans-serif;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.site-header,
.page,
.site-footer {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--space-md);
}

.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-md);
  padding-top: 1.8rem;
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--line);
  font-size: var(--font-small);
  line-height: 1.2;
}

h1,
h2,
.page-intro,
.page-about p,
.post {
  font-family: Lora, serif;
}

.site-nav {
  display: flex;
  gap: var(--space-nav);
  white-space: nowrap;
}

.page {
  padding-top: var(--space-xl);
  padding-bottom: 3rem;
}

.page-home {
  padding-bottom: var(--space-md);
}

h1,
h2 {
  margin-top: 0;
  font-weight: normal;
  line-height: 1.25;
}

h1 {
  margin-bottom: var(--space-md);
  font-size: 2.1rem;
}

h2 {
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-sm);
  font-size: 1.25rem;
}

p,
ul,
ol,
blockquote,
pre {
  margin-top: 0;
  margin-bottom: var(--space-lg);
}

.page-intro,
.post-header p {
  color: var(--muted);
}

a {
  color: var(--link);
  text-decoration: none;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

a:hover,
a:focus {
  color: var(--text);
  text-decoration: underline;
}

.site-header a:hover,
.site-header a:focus,
.site-header a[aria-current="page"] {
  color: var(--text);
  text-decoration: none;
}

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

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

ul,
ol {
  padding-left: 1.25rem;
}

li + li {
  margin-top: var(--space-xs);
}

.writing-list {
  font-family: "Source Sans 3", sans-serif;
  font-size: var(--font-small);
  line-height: 1.55;
}

.writing-list time {
  color: var(--text);
}

.writing-list a {
  font-family: Lora, serif;
}

.page-about,
.page-writing,
.page-post {
  max-width: var(--measure-article);
}

.page-about p {
  font-size: var(--font-small);
  line-height: 1.68;
}

.post {
  font-size: var(--font-small);
  line-height: 1.6;
}

.post p {
  margin-bottom: var(--space-md);
}

.post-header p {
  font-family: "Source Sans 3", sans-serif;
  font-size: var(--font-meta);
}

.post-header p:not(:last-child) {
  margin-bottom: var(--space-xs);
}

.post h2 {
  font-size: 1.15rem;
  font-weight: 500;
}

strong {
  font-weight: 500;
}

em {
  font-style: italic;
}

u {
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

blockquote {
  margin-left: 0;
  padding-left: var(--space-md);
  border-left: 2px solid var(--line);
  color: var(--muted);
}

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

.note {
  max-width: 600px;
  margin-inline: auto;
  margin-bottom: var(--space-lg);
  border: 1px solid #3d3933;
  padding: 1.25rem 1.4rem;
}

.note-shaded {
  background: var(--shade);
}

.note-small p {
  font-size: 0.82rem;
  line-height: 1.6;
}

.note-small p:not(.note-title) {
  padding-left: 0.25rem;
}

.note .note-title {
  margin-bottom: var(--space-sm);
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.85rem;
  font-style: italic;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.note > :last-child {
  margin-bottom: 0;
}

.note-tight p:not(.note-title) {
  margin-bottom: 0.5rem;
}

.faq-question {
  margin-bottom: 0.3rem;
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.85rem;
  color: var(--muted);
}

.faq-answer {
  margin-bottom: var(--space-xl);
}

code,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

code {
  background: var(--code);
  padding: 0.08rem 0.22rem;
  font-size: 0.9em;
}

pre {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  background: var(--code);
  padding: var(--space-md);
  font-size: var(--font-small);
  line-height: 1.5;
  tab-size: 2;
}

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

.site-footer {
  margin-top: auto;
  padding-top: var(--space-md);
  padding-bottom: var(--space-md);
  border-top: 1px solid var(--line);
  text-align: center;
}

.site-footer-home {
  max-width: 980px;
  padding-top: 1.25rem;
  border-top: 0;
}

.footer-illustration {
  display: block;
  width: 100%;
  height: auto;
  opacity: 0.94;
}

.site-footer .footer-links,
.site-footer .copyright {
  margin: var(--space-sm) 0 0;
  font-size: var(--font-small);
}

.copyright {
  color: var(--muted);
  font-size: 0.8rem;
  opacity: 0.45;
}

::selection {
  background: #dce5eb;
}

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

  .site-header,
  .site-footer {
    max-width: none;
  }

  .site-header {
    padding-top: 1.25rem;
    padding-bottom: var(--space-md);
  }

  h1 {
    font-size: 1.8rem;
  }

  .site-footer {
    padding-inline: 0;
  }

  .site-footer .footer-links,
  .site-footer .copyright {
    padding-inline: var(--space-md);
  }
}
