/* from normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
html {
  line-height: 1.15;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
}
main {
  display: block;
}
h1 {
  font-size: 2em;
  margin: 0.67em 0;
}
hr {
  box-sizing: content-box;
  height: 0;
  width: 50%;
  overflow: visible;
}
pre {
  font-family: var(--font-family-mono);
  font-size: .85em;
}
a {
  background-color: transparent;
}
abbr[title] {
  border-bottom: none;
  text-decoration: underline;
  text-decoration: underline dotted;
}
b,
strong {
  font-weight: var(--bold-weight);
}
code,
kbd,
samp {
  font-family: var(--font-family-mono);
  font-size: .85em;
}
small {
  font-size: 80%;
}
sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}
sub {
  bottom: -0.25em;
}
sup {
  top: -0.5em;
}
img {
  border-style: none;
}
details {
  display: block;
}
summary {
  display: list-item;
}
template {
  display: none;
}
[hidden] {
  display: none;
}

/* custom */
@font-face {
  font-family: 'Roboto Serif';
  font-style: normal;
  font-weight: 200 300 400 600 700;
  src: url('/fonts/RobotoSerif-VariableFont_GRAD,opsz,wdth,wght.woff2') format('woff2');
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 200;
  src: url('/fonts/JetBrainsMono-ExtraLight.woff2') format('woff2');
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: italic;
  font-weight: 200;
  src: url('/fonts/JetBrainsMono-ExtraLightItalic.woff2') format('woff2');
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 300;
  src: url('/fonts/JetBrainsMono-Thin.woff2') format('woff2');
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: italic;
  font-weight: 300;
  src: url('/fonts/JetBrainsMono-ThinItalic.woff2') format('woff2');
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  src: url('/fonts/JetBrainsMono-Regular.woff2') format('woff2');
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: italic;
  font-weight: 400;
  src: url('/fonts/JetBrainsMono-Italic.woff2') format('woff2');
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 600;
  src: url('/fonts/JetBrainsMono-Medium.woff2') format('woff2');
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: italic;
  font-weight: 600;
  src: url('/fonts/JetBrainsMono-MediumItalic.woff2') format('woff2');
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 700;
  src: url('/fonts/JetBrainsMono-Bold.woff2') format('woff2');
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: italic;
  font-weight: 700;
  src: url('/fonts/JetBrainsMono-BoldItalic.woff2') format('woff2');
}

@font-face {
  font-family: Oxanium;
  font-style: normal;
  font-weight: 200 300 400 600 700;
  src: url('/fonts/Oxanium-VariableFont_wght.woff2') format('woff2');
}


:root {
  --font-family-serif: 'Times New Roman', serif;
  --font-family-sans: 'JetBrains Mono', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Droid Sans', 'Helvetica Neue', sans-serif;
  --font-family-mono: Consolas, Monaco, 'Andale Mono', 'San Francisco Mono', 'Ubuntu Mono', 'Roboto Mono', monospace;
  --base-color-dark: #242122;
  --base-color-light: #fff5d8;
  --base-color-accent: #f9ba12;
  --base-color-highlight: #f23846;
}

body {
  --color-dark: var(--base-color-dark);
  --color-light: var(--base-color-light);
  --color-accent: var(--base-color-accent);
  --thin-weight: 300;
  --regular-weight: 400;
  --bold-weight: 700;

  --color-dark-2: hsl(from var(--color-dark) h s calc(l * 1.1));
  --color-light-2: hsl(from var(--color-light) h s calc(l * 1.1));
  --color-on-accent: var(--base-color-dark);
  --color-sep: var(--color-dark);
}

body.dark-theme {
  --color-light: var(--base-color-dark);
  --color-dark: var(--base-color-light);
  --color-accent: hsl(from var(--base-color-accent) h s calc(l * 0.8));
  --thin-weight: 200;
  --regular-weight: 300;
  --bold-weight: 600;
}
body.dark-theme img {
  filter: brightness(.8) contrast(1.2);
}

@media (prefers-color-scheme: dark) {
  body {
    --color-light: var(--base-color-dark);
    --color-dark: var(--base-color-light);
    --color-accent: hsl(from var(--base-color-accent) h s calc(l * 0.8));
    --thin-weight: 200;
    --regular-weight: 300;
    --bold-weight: 600;
  }

  body.light-theme {
    --color-dark: var(--base-color-dark);
    --color-light: var(--base-color-light);
    --color-accent: var(--base-color-accent);
    --thin-weight: 300;
    --regular-weight: 400;
    --bold-weight: 700;
  }

  img {
    filter: brightness(.8) contrast(1.2);
  }

  body.light-theme img {
    filter: none;
  }
}

body {
  font-family: var(--font-family-serif);
  font-weight: var(--regular-weight);
  font-size: 1.5rem;
  color: var(--color-dark);
  background-color: var(--color-light);
  padding: 0 1rem;
}

h1, h2, h3, h4 {
  font-family: var(--font-family-sans);
  font-weight: var(--thin-weight);
}

@media (min-width: 100px) and (max-width: 500px) {
  body {
    font-size: 4vw;
  }
}

nav {
  margin-top: 0.5rem;
}

nav ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: flex-start;
  font-size: 150%;
}

nav ul li {
  margin: 0 1em;
  line-height: 2.4rem;
}

nav ul li a {
}

nav ul span.skip {
  margin-inline: auto;
}

nav ul li:first-child, nav ul li:last-child {
  margin: 0 0;
}

#theme-toggle {
  border: 0;
  background-color: var(--color-light);
  border: 1px solid var(--color-light);
  color: var(--color-dark);
  font-size: 120%;
  padding-top: 0;
  padding-bottom: 0;
}

#theme-toggle:hover, #theme-toggle:focus {
  border: 1px solid var(--color-dark);
  border-radius: 12px;
}

#theme-toggle .sun { display: none; }
#theme-toggle .moon { display: inline; padding-left: .5rem; }

body.dark-theme #theme-toggle .sun { display: inline; padding: 0 .25rem; }
body.dark-theme #theme-toggle .moon { display: none; }

@media (prefers-color-scheme: dark) {
  #theme-toggle .sun { display: inline; padding: 0 .25rem; }
  #theme-toggle .moon { display: none; }

  body.light-theme #theme-toggle .sun { display: none; }
  body.light-theme #theme-toggle .moon { display: inline; padding-left: .5rem; }
}

a {
  color: var(--color-dark);
}
