:root {
  --color-background: #f3f5fe;
  --color-background-soft: #d5dcf1;
  --color-background-mute: #d6dcf4;

  --color-border: rgba(60, 60, 60, 0.12);
  --color-border-hover: rgba(60, 60, 60, 0.29);

  --color-heading: #3c3833;
  --color-text: #010101;
  --color-primary: #11c88c;
  --color-secondary: #ff22228a;
  --color-ternary: #820fe2;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-background: #1f232d;
    --color-background-soft: #262e33;
    --color-background-mute: #35435c;

    --color-border: rgba(84, 84, 84, 0.48);
    --color-border-hover: rgba(84, 84, 84, 0.65);

    --color-heading: #f7e8e8;
    --color-text: rgba(235, 235, 235, 0.64);
    --color-primary: #a3be8c;
    --color-secondary: #8fbcbb;
    --color-ternary: #ebcb8b;
  }
}

@font-face {
  font-family: Silkscreen;
  src: url("silkscreen-regular-webfont.woff2") format("woff2"),
    url("silkscreen-regular-webfont.woff") format("woff");
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  font-weight: normal;
}

html {
  font-size: 16px;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  color: var(--color-text);
  background: var(--color-background);
  transition:
    color 0.5s,
    background-color 0.5s;
  line-height: 1.65;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Roboto,
    Oxygen,
    Ubuntu,
    Cantarell,
    'Fira Sans',
    'Droid Sans',
    'Helvetica Neue',
    sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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


/* Firefox */
* {
  scrollbar-width: auto;
  scrollbar-color: var(--color-ternary) var(--color-background);
}

/* Chrome, Edge, and Safari */
*::-webkit-scrollbar {
  width: 8px;
}

*::-webkit-scrollbar-track {
  background: var(--color-background);
  border-radius: 3px;
}

*::-webkit-scrollbar-thumb {
  background: var(--color-ternary);
  border-radius: 3px;
}

em,
i,
b,
a,
p {
  font-size: 1em;
}


h1,
h2,
h3,
h4,
h5 {
  font-family: Silkscreen, sans-serif;
  line-height: 1.16;
  margin: .4em 0 0.2em 0;
}

h1,
.text-size-h1 {
  font-weight: 700;
  font-size: 3.05em;
}

h2,
.text-size-h2 {
  font-size: 2.44em;
}

h3,
.text-size-h3 {
  font-size: 1.95em;
}

h4,
.text-size-h4 {
  font-size: 1.56em;
}

h5,
.text-size-h5 {
  font-size: 1.25em;
}

.text-caption {
  font-size: 0.8em;
}

small,
.text-small {
  font-size: 0.64em;
}

b,
strong {
  font-weight: bold;
}


.content p,
.content ul li,
.content ol li {
  font-size: 1.25em;
}

.content p,
.content pre,
.content ul,
.content ol,
.content table {
  margin-bottom: 2em;
}

table {
  margin: .5rem 0 1rem 0;
  border-collapse: collapse;
  table-layout: auto;
}

table thead tr th {
  border-bottom: 2px solid var(--color-background-mute);
  font-weight: 700;
}

table thead tr th,
table tbody tr td {
  padding: .5em;
  width: 33%;
  text-align: center;
  border-right: 1px solid var(--color-background-mute);
}

table thead tr th:last-of-type,
table tbody tr td:last-of-type {
  border-right: 0;
}

img {
  max-width: 100%;
  height: auto;
}

button,
a.button {
  display: inline-block;
  position: relative;
  padding: 0.2em 0.5em;
  font-size: 0.95em;
  text-transform: uppercase;
  background-color: var(--color-background);
  color: var(--color-text);
  border: none;
  transition: all 100ms ease-in-out;
  cursor: pointer;
}

@media screen and (min-width: 50rem) {

  button,
  a.button {
    padding: 0.5em 0.7em;
    font-size: 1.16em;
  }
}


button *,
a.button * {
  position: static;
  z-index: 3;
}

button:before,
a.button:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: -1px;
  background: linear-gradient(125deg, var(--color-background-soft), var(--color-background-mute));
  color: var(--color-ternary);
  z-index: -1;
  transition: all 300ms ease-in-out;
}


a.button:hover,
a.button:focus,
button:hover,
button:focus {
  color: var(--color-ternary);
  background: linear-gradient(150.5deg, var(--color-background-soft), var(--color-background-mute))
}

a.button:hover::before,
a.button:focus::before,
button:hover::before,
button:focus::before {
  background: linear-gradient(45deg, var(--color-secondary), var(--color-ternary));
}


.icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  stroke-width: 0;
  stroke: currentColor;
  fill: currentColor;
  vertical-align: middle;
  margin-bottom: .25em;
}

article .content p code {
  color: var(--color-ternary);
}