:root {
  --bg-color: #ffffff;
  --text-color: rgb(51, 65, 85);
  --border-color: #e8e8e8;
  --header-border: #424242;
  --code-bg: #f5f5f5;
}

[data-theme="dark"] {
  --bg-color: #1a1a2e;
  --text-color: #e0e0e0;
  --border-color: #3a3a4a;
  --header-border: #6a6a7a;
  --code-bg: #2a2a3e;
}

html {
  background-color: var(--bg-color);
  transition: background-color 0.3s;
}

body {
  /* borrowed from metaredux.com */
  font: 400 16px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";
  margin: 0;
  padding: 0;
  color: var(--text-color);
  background-color: var(--bg-color);
  transition: background-color 0.3s, color 0.3s;
}

h1, h2, h3 {
  font-weight: 800;
}

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

.wrapper {
  max-width: 800px;
  margin: 0 auto 0 auto;
  padding: 0 15px;
}

h2 {
  margin-bottom: 0;
  margin-top: 0;
}

p {
  margin-top: 0.2em;
}

.site-header {
  border-top: 2px solid var(--header-border);
  border-bottom: 1px solid var(--border-color);
  min-height: 55.95px;
  position: relative;
}

.site-title {
  margin: 0;
}

.site-nav {
  float: right;
  line-height: 4rem;
}

.site-nav .page-link:not(:last-child) {
  margin-right: 20px;
}

.page-link {
  text-decoration: none;
  vertical-align: middle;
}

.page-icon {
  vertical-align: middle;
}

ul.index {
  list-style: none;
  padding-left: 0;
}

.index li {
  margin-bottom: 1em;
}

code {
  white-space: pre;
}

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

.theme-toggle {
  background: none;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  cursor: pointer;
  padding: 4px 8px;
  vertical-align: middle;
  margin-left: 10px;
  line-height: 1;
}

.icon-theme-auto::before,
.icon-theme-dark::before,
.icon-theme-light::before {
  color: var(--text-color);
}

.icon-theme-auto::before {
  content: 'brightness_6';
  font-family: 'Material Symbols Rounded';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  display: inline-block;
  line-height: 1;
  text-transform: none;
  letter-spacing: normal;
  word-wrap: normal;
  white-space: nowrap;
  direction: ltr;
  position: relative;
  top: 2px;
  font-variation-settings:
    'FILL' 1,
    'wght' 300,
    'GRAD' 0,
    'opsz' 24;
}

.icon-theme-dark::before {
  content: 'dark_mode';
  font-family: 'Material Symbols Rounded';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  display: inline-block;
  line-height: 1;
  text-transform: none;
  letter-spacing: normal;
  word-wrap: normal;
  white-space: nowrap;
  direction: ltr;
  position: relative;
  top: 2px;
  font-variation-settings:
    'FILL' 1,
    'wght' 300,
    'GRAD' 0,
    'opsz' 24;
}

.icon-theme-light::before {
  content: 'light_mode';
  font-family: 'Material Symbols Rounded';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  display: inline-block;
  line-height: 1;
  text-transform: none;
  letter-spacing: normal;
  word-wrap: normal;
  white-space: nowrap;
  direction: ltr;
  position: relative;
  top: 2px;
  font-variation-settings:
    'FILL' 1,
    'wght' 300,
    'GRAD' 0,
    'opsz' 24;
}

[data-theme="dark"] pre[class*="language-"],
[data-theme="dark"] code[class*="language-"] {
  background: var(--code-bg);
  color: var(--text-color);
  text-shadow: none;
  box-shadow: none;
  border: none;
}

[data-theme="dark"] .line-numbers .line-numbers-rows {
  border-right: 1px solid var(--border-color);
}

[data-theme="dark"] .line-numbers-rows > span::before {
  color: #6a6a7a;
}

[data-theme="dark"] .token.comment,
[data-theme="dark"] .token.prolog,
[data-theme="dark"] .token.doctype,
[data-theme="dark"] .token.cdata {
  color: #8a8a9a;
}

[data-theme="dark"] .token.string {
  color: #a5d6a7;
}

[data-theme="dark"] .token.keyword {
  color: #ce93d8;
}

[data-theme="dark"] .token.function {
  color: #90caf9;
}

code .token.entity,
code .token.operator,
code .token.url {
  background: none !important;
}
