@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@400;500;600&family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&display=swap');

/* =========================
   Reset
   ========================= */

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

html,

body {
  margin: 0;
  padding: 0;
}

/* =========================
   Theme Variables
   ========================= */

:root {
  /* Desk */
  --bg: #e8dfd0;

  /* Paper */
  --surface: #fffdf9;

  --text: #2b2722;
  --muted: #72685d;

  --accent: #7c4dff;
  --accent-hover: #d84cb8;

  --border: #ddd3c4;

  --max-width: 72ch;

  --shadow:
    0 1px 2px rgba(0,0,0,.04),
    0 12px 24px rgba(0,0,0,.08),
    0 24px 48px rgba(0,0,0,.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Dark desk */
    --bg: #121015;

    /* Dark paper */
    --surface: #241f29;

    --text: #ece4d8;
    --muted: #b9afc0;

    --accent: #c09bff;
    --accent-hover: #ff93cf;

    --border: #56486a;

    --shadow:
      0 2px 8px rgba(0,0,0,.35),
      0 20px 40px rgba(0,0,0,.45),
      0 40px 80px rgba(0,0,0,.35);
  }
}

/* =========================
   Base Typography
   ========================= */

body {
  /* background: var(--bg); */
  background: var(--bg);
  color: var(--text);

  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
  line-height: 1.75;

  min-height: 100vh;
}

p,
ul,
ol,
blockquote,
table {
  margin-bottom: 1.25rem;
}

/* =========================
   Paper Layout
   ========================= */

.site-header,
main,
.site-footer {
  max-width: calc(var(--max-width) + 8rem);

  margin-left: auto;
  margin-right: auto;

  background: var(--surface);

  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);

  position: relative;
}

.site-header::before,
main::before,
.site-footer::before {
  content: "";

  position: absolute;
  inset: 0;

  pointer-events: none;

  background:
    linear-gradient(
      rgba(255,255,255,.03),
      rgba(255,255,255,0)
    );
}

.site-header {
  margin-top: 5rem;

  padding: 2.5rem 4rem 1rem;

  border-top: 1px solid var(--border);

  box-shadow: var(--shadow);
}

main {
  padding: 1rem 4rem 4rem;

  box-shadow: var(--shadow);
}

.site-footer {
  padding: 1.5rem 4rem 3rem;

  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);

  box-shadow: var(--shadow);

  margin-bottom: 5rem;
}

/* =========================
   Header
   ========================= */

.site-title {
  margin: 0;

  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 2rem;
  font-style: italic;
  font-weight: 400;
  line-height: 1.2;
}

.site-title a {
  color: inherit;
  text-decoration: none;
}

.site-subtitle {
  margin-top: 0.5rem;

  color: var(--muted);

  font-family: "Barlow", sans-serif;
  font-size: 0.95rem;
}

.site-nav {
  margin-top: 1.5rem;
}

.site-nav a {
  margin-right: 1rem;

  font-family: "Barlow", sans-serif;
  font-size: 0.95rem;
  text-decoration: none;
}

/* =========================
   Headings
   ========================= */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Libre Baskerville", Georgia, serif;
  line-height: 1.3;
  font-weight: 400;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

h2 {
  font-size: 1.8rem;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

h3 {
  font-size: 1.4rem;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

h4,
h5,
h6 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

/* =========================
   Links
   ========================= */

a {
  color: var(--accent);

  text-decoration-thickness: 1px;
  text-underline-offset: 2px;

  transition: color 0.15s ease;
}

a:hover,
a:focus {
  color: var(--accent-hover);
}

/* =========================
   Section breaks
   ========================= */

.starbreak {
  margin: 3rem auto;
  text-align: center;
}

.starbreak::before {
  content: "⁂ ⁂ ⁂";
  display: inline-block;
  color: var(--muted);
  /* font-family: "Libre Baskerville", serif; */
  font-size: 1.5rem;
  line-height: 1;
}

/* =========================
   Post Metadata
   ========================= */

.post-meta {
  margin-bottom: 2rem;

  color: var(--muted);

  font-family: "Barlow", sans-serif;
  font-size: 0.9rem;
}

.post-meta time {
  white-space: nowrap;
}

/* =========================
   Lists
   ========================= */

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

li {
  margin-bottom: 0.4rem;
}

/* =========================
   Blog Index
   ========================= */

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

.post-list li {
  margin-bottom: 1.75rem;
  padding-bottom: 1.75rem;

  border-bottom: 1px solid var(--border);
}

.post-list li:last-child {
  border-bottom: none;
}

.post-list a {
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 1.2rem;
  text-decoration: none;
}

.post-list time {
  display: block;
  margin-bottom: 0.25rem;

  color: var(--muted);

  font-family: "Barlow", sans-serif;
  font-size: 0.85rem;
}

/* =========================
   Post Navigation
   ========================= */

.post-nav {
  margin-top: 3rem;
  padding-top: 1.5rem;

  border-top: 1px solid var(--border);
}

.post-nav-links {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
}

/* =========================
   Blockquotes
   ========================= */

blockquote {
  margin: 2rem 0;
  padding-left: 1.25rem;

  border-left: 4px solid var(--accent);

  color: var(--muted);
  font-style: italic;
}

blockquote p:last-child {
  margin-bottom: 0;
}

/* =========================
   Code
   ========================= */

code {
  padding: 0.15rem 0.3rem;

  background: rgba(0,0,0,.04);
  border: 1px solid var(--border);
  border-radius: 4px;

  font-size: 0.9em;
}

pre {
  overflow-x: auto;

  padding: 1rem;

  background: rgba(0,0,0,.03);

  border: 1px solid var(--border);
  border-radius: 8px;
}

pre code {
  border: none;
  padding: 0;
  background: transparent;
}

/* =========================
   Images
   ========================= */

img {
  display: block;
  max-width: 100%;
  height: auto;

  margin: 2rem auto;

  border-radius: 4px;

  box-shadow: var(--shadow);
}

.illustration {
  width: 42%;
  max-width: 340px;
  border-radius: 4px;
}

.illustration.left {
  float: left;
  margin: 0.4rem 1.5rem 1rem 0;
}

.illustration.right {
  float: right;
  margin: 0.4rem 0 1rem 1.5rem;
}

/* =========================
   Tables
   ========================= */

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 0.6rem 0.75rem;
  text-align: left;

  border-bottom: 1px solid var(--border);
}

th {
  font-family: "Barlow", sans-serif;
  font-weight: 600;
}

/* =========================
   Horizontal Rule
   ========================= */

hr {
  margin: 3rem 0;

  border: none;
  border-top: 1px solid var(--border);
}

/* =========================
   Footer
   ========================= */

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

  font-family: "Barlow", sans-serif;
  font-size: 0.9rem;
}

/* =========================
   Mobile
   ========================= */

@media (max-width: 700px) {
  body {
    font-size: 1.05rem;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .site-header,
  main,
  .site-footer {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .site-header {
    margin-top: 2rem;
  }

  .site-footer {
    margin-bottom: 2rem;
  }

  .post-nav-links {
    flex-direction: column;
  }
}
