@font-face {
  font-display: swap;
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 300;
  src: url("./fonts/cormorant-garamond-v21-latin-300.woff2") format("woff2");
}

:root {
  --bg: #f8fcff;
  --text: #000;
  --link: #000080;
  --code-bg: #f0f0f0;
  --border: #ccc;
  --muted: #666;
  -webkit-font-smoothing: auto;
  -moz-osx-font-smoothing: auto;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1a1a;
    --text: #e0e0e0;
    --link: #a2c4e9;
    --code-bg: #2a2a2a;
    --border: #444;
    --muted: #999;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}

body {
  font-family: Georgia, serif;
  margin: 0 auto;
  max-width: 650px;
  line-height: 1.6;
  font-size: 18px;
  padding: 1.2em;
  background-color: var(--bg);
  color: var(--text);
}

h1,
h2,
h3 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 300;
  line-height: 1.2;
  text-wrap: balance;
}

h1 {
  font-size: 2.75em;
  margin-top: 0.75em;
  margin-bottom: 0.6em;
}

.archive-title {
  font-size: 2.2em;
  font-weight: 700;
}

h2 {
  font-size: 2em;
  margin-top: 2em;
  margin-bottom: 0.6em;
}

h3 {
  margin-top: 1.75em;
  margin-bottom: 0.5em;
  font-size: 1.5em;
}

a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 0.1em;
  text-decoration-thickness: 0.05em;
}

a:hover {
  opacity: 0.5;
}

li {
  margin-bottom: 0.5em;
}

.page-shell {
  margin: 0 auto;
}

.site-title {
  display: block;
  color: var(--muted);
  font-family: "Cormorant Garamond", serif;
  font-weight: 300;
  line-height: 1.2;
  font-size: 1.5em;
  margin-top: 0.5em;
  margin-bottom: 0.5em;
  text-wrap: balance;
  text-decoration: none;
}

.post-meta {
  color: var(--muted);
  margin-bottom: 0.75em;
}

.post-footer {
  margin-top: 3em;
  padding-top: 1em;
  border-top: 1px solid var(--border);
  font-size: 0.9em;
}

.post-footer p {
  margin: 0.5em 0;
}

code {
  font-size: 0.8em;
  padding: 0.1em 0.3em;
  background-color: var(--code-bg);
}

pre {
  font: inherit;
  padding: 0.6em;
  background-color: var(--code-bg);
  overflow-x: auto;
}

.post-body pre code {
  background-color: transparent;
  padding: 0;
}

blockquote {
  margin-left: 1.5em;
}

aside {
  border-left: 3px solid var(--border);
  padding: 0.6em;
  margin-left: 0;
}

img {
  display: block;
  max-width: 100%;
  max-height: 300px;
  width: auto;
  height: auto;
  margin: auto;
}

@media (max-width: 600px) {
  body {
    font-size: 16px;
  }

  h1 {
    font-size: 2.2em;
  }

  .archive-title {
    font-size: 1.8em;
  }

  h2 {
    font-size: 1.6em;
  }

  h3 {
    font-size: 1.3em;
  }

  .site-title {
    font-size: 1.3em;
  }
}
