@import url('https://fonts.googleapis.com/css2?family=Literata:ital,opsz,wght@0,7..72,200..900;1,7..72,200..900&&family=Domine:wght@400..700&display=swap');

:root {
  --color-bg: #fffff9;
  --color-title: #2a221c;
  --color-text-time: #78675a;
  --color-link-active: #8b4700;
  --color-link-active-hover: #5e442b;
  --color-link-visited: #beac99;
  --color-link-visited-hover: #beac99;

  --color-text-50: #f8f2f1;
  --color-text-100: #f0e2df;
  --color-text-200: #e3c6be;
  --color-text-300: #d9ac9e;
  --color-text-400: #ce8f79;
  --color-text-500: #b07966;
  --color-text-600: #926555;
  --color-text-700: #765043;
  --color-text-800: #5e3f34;
  --color-text-900: #442d25;
  --color-text-950: #38241d;
}

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

* {
  margin: 0;
  padding: 0;
}

html {
  color-scheme: light dark;
  hanging-punctuation: first last;
}

body {
  min-height: 100vh;
}

img,
picture,
svg,
video {
  display: block;
  max-width: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  :has(:target) {
    scroll-behavior: smooth;
    scroll-padding-top: 3rem;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    interpolate-size: allow-keywords;
  }
}

body {
  font-family: 'Literata', serif;
  font-optical-sizing: auto;
  font-size: 19px;

  font-weight: 450;
  font-style: normal;
  letter-spacing: 0.25px;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  background: var(--color-bg);
  color: var(--color-text-950);

  /* --opsz: 1em; */
  /* font-variation-settings: 'opsz' tan(atan2(var(--opsz), 1px)); */

  &.no-scroll {
    overflow: hidden;
  }
}

a {
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  font-weight: bold;

  &:link {
    color: var(--color-link-active);
  }
  &:hover {
    background: var(--color-link-active);
    color: var(--color-bg);
  }
  &:visited {
    color: var(--color-link-visited);

    &:hover {
      background: var(--color-link-visited);
      color: var(--color-bg);
    }
  }
}

main {
  max-width: 1440px;
  padding: 16px;
  margin: 0 auto 32px auto;

  &.wide {
    max-width: 4096px;
  }
}

.page-title {
  font-size: 32px;
  margin: 32px 0 16px 0;
}

.table-of-contents {
  list-style: none;

  li {
    margin: 0 0 18px 0;
  }

  h3 {
    margin: 0 0 8px 0;
  }

  time {
    color: var(--color-text-time);
  }

  p {
    font-weight: 500;
  }
}
