@font-face {
  font-family: Manrope;
  src: url("/fonts/ManropeV5VF.woff2") format("woff2");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}

@font-face {
  font-family: Gilroy;
  src: url("/fonts/Gilroy-ExtraBold.woff2") format("woff2");
  font-style: normal;
  font-weight: 800;
  font-display: swap;
}

:root {
  color-scheme: light dark;

  --paper: #f7f6f2;
  --ink: #1b1b1a;
  --muted: #6b6a66;
  --line: #e2e0d9;

  @media (prefers-color-scheme: dark) {
    --paper: #161615;
    --ink: #e9e7e1;
    --muted: #96948d;
    --line: #2c2b29;
  }
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Manrope, Arial, sans-serif;
  font-size: 1.125rem;
  font-size-adjust: from-font;
  line-height: 1.65;
  overflow-wrap: break-word;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;

  &:hover {
    text-decoration-thickness: 2px;
  }
}

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

h1,
h2 {
  margin: 0;
  font-family: Gilroy, Arial, sans-serif;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.5rem, 1.75rem + 3vw, 4rem);
}

time {
  color: var(--muted);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

.page {
  width: min(100% - 2.5rem, 38rem);
  margin-inline: auto;
  padding-block: clamp(4rem, 2rem + 10vw, 9rem) 6rem;
}

.intro {
  margin-top: 2rem;
  font-size: 1.25rem;

  p {
    margin: 0 0 1em;
    text-wrap: pretty;
  }
}

.posts {
  margin: 4rem 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);

  li {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.25rem 1.5rem;
    padding-block: 1rem;
    border-bottom: 1px solid var(--line);
  }

  a {
    font-weight: 600;
    text-decoration: none;

    &:hover {
      text-decoration: underline;
    }
  }
}

.home {
  display: inline-block;
  margin-bottom: 4rem;
  font-family: Gilroy, Arial, sans-serif;
  font-weight: 800;
  text-decoration: none;
}

article > time {
  display: block;
  margin-top: 1rem;
}

.prose {
  margin-top: 3rem;

  > * {
    margin-block: 0;
  }

  > * + * {
    margin-top: 1.2em;
  }

  p,
  li,
  blockquote {
    text-wrap: pretty;
  }

  h2 {
    margin-top: 2.2em;
    font-size: 1.75rem;
  }

  h3 {
    margin-top: 2em;
    font-size: 1.15rem;
  }

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

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

  code {
    font-family: ui-monospace, Menlo, monospace;
    font-size: 0.88em;
  }

  pre {
    padding: 1rem 1.25rem;
    border: 1px solid var(--line);
    border-radius: 4px;
    overflow-x: auto;
  }

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

  hr {
    height: 1px;
    margin-block: 3em;
    border: 0;
    background: var(--line);
  }
}
