html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  height: 100%;
}

:root {
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace;

  --bg-color: #b8c2b9;
  --fg-color: #382b26;

  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;

  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-color: #382b26;
    --fg-color: #b8c2b9;
  }
}

input, textarea, button, select {
  font-family: inherit;
  font-size: inherit;
  letter-spacing: inherit;
}

* {
  cursor: url('cursor.png'), auto;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 700;
  line-height: 1.2;
}

h1 { font-size: 2rem; margin: 1rem 0; }
h2 { font-size: 1.5rem; margin: 1rem 0; }
h3, h4, h5, h6 { font-size: 1.1rem; margin: 0.5rem 0; }

strong, b {
  font-weight: 700;
  background-color: var(--fg-color);
  color: var(--bg-color);
  padding: 0 4px;
}

em, i {
  font-style: italic;
}

code, pre, kbd, samp {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

pre {
  background-color: var(--fg-color);
  color: var(--bg-color);
  padding: 12px;
  overflow-x: auto;
  white-space: pre;
  border-radius: 3px;
}

body {
  background-color: var(--bg-color);
  color: var(--fg-color);
  font-family: var(--font-sans);
  margin: 0;
  min-height: 100vh;

  display: grid;
  grid-template-columns: minmax(10em, auto) 1fr;
  grid-template-rows: auto 1fr auto;
  grid-template-areas:
    "header  header"
    "sidebar content"
    "footer  footer";
}

header {
  grid-area: header;
}

body > nav, #side-bar {
  grid-area: sidebar;
  border-right: 1px dotted var(--fg-color);
  padding-right: 1em;
}

article {
  grid-area: content;
  padding-left: 1.5em;
  padding-right: 1.5em;
}

footer {
  grid-area: footer;
  display: flex;
  justify-content: space-between;
  border-top: 1px dotted var(--fg-color);
  padding: 0.5rem 0;
}

header nav {
  display: flex;
  justify-content: space-between;
  color: var(--bg-color);
  background-color: var(--fg-color);
  padding: 0.5rem;
}

nav a, header a { text-decoration: none; color: inherit; }
header h1 span { margin-left: 1em; font-size: 1rem; font-weight: normal; }
nav ul { display: flex; flex-direction: column; list-style-type: none; list-style-position: outside; padding-left: 0; }
nav li ul { padding-left: 1em; }

header nav a,
header nav a:visited,
header nav a:hover,
header nav a:focus {
  text-decoration: none;
  color: inherit;
}

a, a:hover, a:focus, a:visited {
  color: var(--fg-color);
  text-decoration: none;
}

@media (max-width: 768px) {
  body {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto 1fr auto;
    grid-template-areas:
      "header"
      "sidebar"
      "content"
      "footer";
  }

  body > nav, #side-bar {
    border-right: none;
    border-bottom: 1px dotted var(--fg-color);
    padding-right: 0;
    padding-bottom: 1em;
  }

  article {
    padding-left: 0;
    padding-right: 0;
  }

  * {
    cursor: auto;
  }
}
