:root {
  --fg: #181818;
  --fg-dark: #737373;
  --bg: #e4e4e4;
  --bg-secondary: #d8d8d8;
  --bg-medium: #e0e0e0;
  --bg-dark: #121212;
  --bg-light: #242424;
  --accent-text: var(--fg);
  --accent-fg: #549cd6;
  --accent-bg: #6db1e7;
  --dark-accent-fg: #3072aa;
  --main-font-size: 1.1rem;
  --small-font-size: 0.9rem;
  --font-body: "Open Sans", "DejaVu Sans", sans-serif;
  --font-header: "Libertinus Serif", "Linux Libertine", "Times New Roman", serif;
  --mono-font: "Fira Mono", "DejaVu Sans Mono", monospace;
  --code-font-size: 0.9rem;
  --code-comment: #555555;
  --code-keyword: #1e496c;
  --code-number: #4d8fc4;
  --code-string: #5e6d36;
  --code-type: #376b6b;
  --code-ident: #78436b;
}

/* Basic styling                                                             */
/* ========================================================================= */

body {
  background: var(--bg);
  color: var(--fg);
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: var(--main-font-size);
  line-height: 1.3;
  margin: 0;
  min-height: 100vh;
  padding: 0;
}

main {
  flex: 1;
}

/* Headers                                                                   */
/* ========================================================================= */

h1, h2, h3 {
  font-family: var(--font-header);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

h1 {
  font-size: 3.25rem;
  margin: .25em 0 .75em 0;
}

h2 {
  font-size: 2.75rem;
  margin: .25em 0 .75em 0;
}

h3 {
  font-size: 1.75rem;
  margin: .25em 0 .75em 0;
}

h1:before, h1:after, h2:before, h2:after, h3:before, h3:after {
  content: "";
  border-bottom: 4px solid var(--accent-bg);
  flex: 1;
}

h1:before, h2:before, h3:before {
  margin: 0 .5em 0 0;
}

h1:after, h2:after, h3:after {
  margin: 0 0 0 .5em;
}

/* Footer                                                                    */
/* ========================================================================= */

footer {
  background: var(--bg-secondary);
  font-size: var(--small-font-size);
}

footer p {
  margin: 0 auto;
  padding: 1em 5%;
  max-width: 90em;
  min-width: 16em;
}

/* Links                                                                     */
/* ========================================================================= */

a {
  color: var(--dark-accent-fg);
  font-weight: bold;
  text-decoration-line: none;
  text-decoration-thickness: 2px;
  text-underline-offset: .25em;
}

a:focus, a:hover {
  color: var(--accent-fg);
  text-decoration-line: underline;
}

/* Lists                                                                     */
/* ========================================================================= */

ul {
  list-style-type: square;
  margin: 0 0 0 1em;
  padding: 0;
}

/* Code and syntax highlighting                                              */
/* ========================================================================= */

code {
  font-family: var(--mono-font);
  font-size: var(--code-font-size);
}

code .co {
  color: var(--code-comment);
}

code .kw {
  color: var(--code-keyword);
  font-weight: bold;
}

code .dv, code .bn {
  color: var(--code-number);
}

code .st {
  color: var(--code-string);
}

code .dt {
  color: var(--code-type);
}

code .va {
  color: var(--code-ident);
}
