:root[theme="dark"] {
  --bg: #292424;
  --fg: #dfd9d9;
  --m-bg: #161414;
  --m-fg: #878686;
  --code-bg: #221b21;
  --transition-time: 0s;
}

:root {
  --bg: rgb(253, 253, 253);
  --fg: rgb(39, 36, 36);
  --m-bg: #ebebeb;
  --m-fg: rgb(36, 35, 35);
  --code-bg: #2e3432;
  --transition-time: 0s;
}

h1 {
  margin-bottom: 0.1em;
}

header > span {
  font-size: 0.9em;
  color: rgb(133, 133, 133);
}

#content > h2,
#content > h3 {
  padding-top: 20px;
}

h2 {
  margin-top: 1.6em;
}

p {
  font-size: 1.1em;
  line-height: 1.6em;
  font-family: Georgia, "Times New Roman", Times, serif;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: Arial, Helvetica, sans-serif;
}

.postList > span {
  font-size: 0.8em;
  color: rgb(133, 133, 133);
}

#logo {
  margin: 0;
  /* font-size: 1.7em; */
  /* display: block; */
  /* width: 50px; */
}

#logo > a {
  border-radius: 5px;
  background: rgb(77, 63, 63);
  text-decoration: none;
  /* color: rgb(94, 94, 94); */
  color: white;
  font-size: 0.7em;
  padding: 4px 10px;
  padding-top: 6px;
}

#logo > a:hover {
  text-decoration: none;
  /* color: #000; */
  background: rgb(43, 43, 43);
}

.row {
  display: flex;
  align-items: center;
}

.tags {
  list-style: none;
  margin: 0;
}

.tags > li {
  margin-right: 15px;
}

.tags > li > a {
  text-decoration: none;
  color: var(--m-fg);
}

.tags > li::before {
  content: "#";
  margin-right: 1px;
  /* font-size: 0.8em; */
  color: gray;
}

@media only screen and (max-width: 1120px) {
  #toc {
    position: static !important;
  }
}

@media only screen and (max-width: 768px) {
  /* For mobile phones: */
  content > .container {
    padding: 20px;
  }

  .tags {
    overflow-x: auto;
    width: auto;
    padding-left: 5px;
  }

  .taxonomy > div {
    display: flex;
    flex-direction: column;
  }

  .taxonomy > div > span:first-child {
    font-size: 0.8em;
  }
}

code {
  font-family: Menlo, monospace;
}

pre {
  overflow-x: auto;
}

.container {
  max-width: 760px;
  margin: auto;
}

#menu {
  -webkit-user-select: none;
  padding: 10px 20px;
  background: var(--m-bg);
}

.postList > h2 {
  margin-bottom: 2px;
}

h2 > a {
  text-decoration: none;
  color: var(--fg);
}

/* Code blocks */
pre {
  padding: 20px;
  border-radius: 10px;
  font-size: 0.9em;
  line-height: 1.9em;
  background: var(--code-bg) !important;
}

.taxonomy > h2::before {
  content: "#";
  color: rgb(133, 133, 133);
  margin-right: 3px;
  text-align: center;
}

/* theme toggle */
.switch {
  margin-left: auto;
  position: relative;
  display: inline-block;
  width: 58px;
  height: 29px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  -webkit-transition: var(--transition-time);
  transition: var(--transition-time);
  border-radius: 4px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 29px;
  width: 29px;
  left: 0;
  bottom: 0;
  background-color: #bebdbd;
  -webkit-transition: var(--transition-time);
  transition: var(--transition-time);
  border-radius: 5px;
}

input:checked + .slider:before {
  background-color: rgb(112, 112, 112);
}

input:checked + .slider {
  background: var(--bg);
}

input:focus + .slider {
  box-shadow: 0 0 1px #2196f3;
}

input:checked + .slider:before {
  -webkit-transform: translateX(29px);
  -ms-transform: translateX(29px);
  transform: translateX(29px);
}

footer {
  padding: 20px;
  margin-top: auto;
  text-align: center;
  color: rgb(97, 92, 92);
  font-size: 0.9em;
}

.taxonomy > div > span > a {
  color: var(--fg);
  text-decoration: none;
  font-size: 1.2em;
}

.taxonomy > div > span {
  color: gray;
}

.taxonomy > div {
  padding-bottom: 0.8em;
}

#toc {
  position: fixed;
  top: 50px;
  left: 50px;
}

#toc > ul {
  list-style: none;
  opacity: 0.4;
}

#toc > ul > li > a {
  text-decoration: none;
  color: var(--fg);
}

#toc > ul > li {
  padding: 3px 0px;
}

#toc > ul > li > a:hover {
  opacity: 0.6;
  cursor: pointer;
}

#toc > ul > .H3 {
  padding-left: 0.5em;
  font-size: 0.95em;
}

#toc > ul > .H4 {
  padding-left: 0.8em;
}
