/*
  Josh's Custom CSS Reset
  https://www.joshwcomeau.com/css/custom-css-reset/
*/

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

* {
  margin: 0;
}

body {
  -webkit-font-smoothing: antialiased;
}

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

input, button, textarea, select {
  font: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

p {
  text-wrap: pretty;
}

h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
}

#root, #__next {
  isolation: isolate;
}

/* end of reset. fun starts */

@font-face {
  font-family: Triplicate;
  src: url('/triplicate.woff2') format('woff2');
  font-display: swap;
}

@font-face {
  font-family: Triplicate;
  src: url('/triplicate-italic.woff2') format('woff2');
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: Triplicate;
  src: url('/triplicate-bold.woff2') format('woff2');
  font-weight: bold;
  font-display: swap;
}

body, h1, h2, h3, h4, h5, h6, code, pre {
  font-family: var(--font-family);
  font-size: 13px;
  line-height: var(--line-height);
}

pre:has(code) {
  background-color: var(--background-color-alt);
  border-radius: 4px;
}

code {
  border-radius: 4px;
  padding: 0 2px;
  background-color: var(--background-color-alt);
}

body {
  max-width: 600px;
  padding: 24px;
  padding-top: 17px;
  margin: 0 auto;
  background: var(--background-color);
  color: var(--text-color);
}

h1 {
  text-align: center;
  padding: calc(3 * var(--line-height)) 0;
  font-style: italic;
  font-weight: normal;
  font-variant-numeric: oldstyle-nums;
}

h2, h3 {
  padding: var(--line-height) 0;
  font-style: normal;
  font-weight: normal;
  font-family: var(--font-family);
  font-variant-caps: small-caps;
  text-transform: lowercase;
  letter-spacing: 0.8px;
}

h2 {
  text-align: center
}

h3 {
  text-align: left;
}

blockquote {
  border-left: 4px solid var(--background-color-alt);
  padding: 0 11px;
}

li {
  margin: var(--line-height) 0;
}

::selection {
  background-color: var(--blue);
  color: var(--background-color);
}

a {
  color: var(--text-color);
  text-decoration: none;
}

a:hover {
  background-color: color-mix(in srgb, var(--blue) 30%, transparent);
}

a::after {
  content: "﻿°";
  color: var(--blue);
}

p {
  margin-bottom: var(--line-height);
}

:root {
  --font-family: "Triplicate", monospace;
  --text-color: #fff;
  --text-color-alt: #aaa;
  --background-color: #000;
  --background-color-alt: #333;
  --line-height: 1.1rem;
  --blue: #0081f1;
}

@media (prefers-color-scheme: light) {
  :root {
    --text-color: #000;
    --text-color-alt: #666;
    --background-color: #fff;
    --background-color-alt: #eee;
  }

  a:hover {
    background-color: color-mix(in srgb, var(--blue) 10%, transparent);
  }
}

/* debug */

/*
body {
    background: repeating-linear-gradient(
    to bottom,
    var(--background-color-alt),
    var(--background-color-alt),
    var(--background-color) 1px,
    var(--background-color) var(--line-height));
    background-size: 100% var(--line-height);
}
*/
