.theme-iskra {
  --color-background: #1f1f1f;
  --color-text: #fffffff0;
  --color-primary: #DCDCAA;
  --color-secondary: #CE9178;
}

.theme-blue {
  --color-background: #2f1f2f;
  --color-text: #ffffff;
  --color-primary: #B5C7EB;
  --color-secondary: #94AEE3;
}

.theme-blue-light {
  --color-background: #ffffff;
  --color-text: #2f1f2f;
  --color-primary: #B5C7EB;
  --color-secondary: #CE9178;
}

body {
  font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji;
  margin: 0;
  padding: 0;
  background-repeat: no-repeat;
  background-color: var(--color-background);
  background-attachment: fixed;
  background-image:
  radial-gradient(
    ellipse at top left,
    color-mix(in srgb, var(--color-primary) 50%, transparent),
    transparent 50%
  ),
  radial-gradient(
    ellipse at top right,
    color-mix(in srgb, var(--color-primary) 10%, transparent),
    transparent 50%
  ),
  radial-gradient(
    ellipse at bottom left,
    color-mix(in srgb, var(--color-primary) 10%, transparent),
    transparent 50%
  ),
  radial-gradient(
    ellipse at bottom right,
    color-mix(in srgb, var(--color-primary) 30%, transparent),
    transparent 50%
  );
}

body {
  display: flex;
  flex-direction: column;
}

body > main {
  flex: 1;
}


/* ========================== Header ========================== */

header {
  color: var(--color-text);
  box-shadow:
    rgba(0, 0, 0, 0.1) 0px 2px 4px -1px,
    rgba(0, 0, 0, 0.07) 0px 4px 5px 0px,
    rgba(0, 0, 0, 0.06) 0px 1px 10px 0px;
  backdrop-filter: blur(3px);
}

header .menu-item {
  border-bottom: 2px solid transparent;
}
header .menu-item:hover, header .menu-item:active {
  color: #569CD6;
  border-bottom: 2px solid #569CD6;
}
header .menu-item.active {
  color: #73C991;
  border-bottom: 2px solid #73C991;
}

.header-content {
  display: flex;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
}

.header-center {
  margin: 0.1rem 1rem 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.header-logo {
  display: flex;
}

.header-logo img,
.header-logo svg {
  height: 6.5rem;
  color: var(--color-primary);
}

.header-info {
  font-size: smaller;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  text-align: right;
}

.header-title {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2rem;
  font-weight: bold;
}

.header-menu {
  flex: 1;
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.header-menu > * {
  text-decoration: none;
  padding: 0 0.5rem;
  color: inherit;

  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.header-slogan {
  text-align: center;
  margin-bottom: 0.5em;
}

@media (max-width: 800px) {
  .header-title { font-size: 1.4rem; }
}

@media (max-width: 660px) {
  .header-info { display: none; }
}

@media (max-width: 480px) {
  html, body, .markdown-body {
    font-size: 14px;
  }
  .header-center { margin: 0.1rem 0.3rem 0; }
  .header-logo img { height: 4.3rem; }
  .header-slogan { font-size: 0.8rem; margin-bottom: 0.2em; }
}

@media (max-width: 400px) {
  .header-title { font-size: 1.2rem; }
}


/* ========================== footer ========================== */


footer {
  color: var(--color-text);
  text-align: center;
  font-size: small;
  padding-bottom: 1rem;
}

/* ========================== github and lightbox shit ========================== */

main {
  padding: 1rem 0;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
}

.container pre {
  background: none;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.container table tr {
  background: none;
  border: none;
}

.container table thead tr {
  background: color-mix(in srgb, var(--color-secondary) 10%, transparent);
}

.container table tbody tr:nth-child(2n) {
  background: color-mix(in srgb, var(--color-secondary) 5%, transparent);
}

.container table tbody tr:hover {
  background: color-mix(in srgb, var(--color-secondary) 15%, transparent);
}

.container table tr td,
.container table tr th {
  border: none;
}

.container {
  overflow: hidden;
  padding: 0 1rem;
  backdrop-filter: blur(3px);
  background: color-mix(in srgb, var(--color-background) 50%, transparent);
  color: var(--color-text);
}
.container a {
  color: var(--color-secondary)
}
.container code {
  background: color-mix(in srgb, var(--color-text) 10%, transparent);
}
.container h1,
.container h2,
.container h3,
.container h4,
.container h5,
.container h6 {
  color: var(--color-primary);
}

.container > * {
  margin-bottom: 1rem;
}

#app {
  min-width: 200px;
  margin: 0 auto;
  padding: 45px;
  border: 1px solid #e1e4e8;
  border-radius: 6px;
}
@media (max-width: 768px) {
  #app {
    padding: 15px;
  }
}
@media (max-width: 990px) {
  main {
    padding: 15px;
  }
  .header-info {
    padding-right: 15px;
  }
}
#lightbox {
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  position: fixed;
  display: table;
  background: rgba(0,0,0,0.9);
}
#lightbox > p {
  display: table-cell;
  vertical-align: middle;
  text-align: center;
}
#lightbox > p > img {
  max-width: 100%;
  max-height: 100vh;
  margin: 0 auto;
}

#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100%;
  z-index: -1;
}

.pdf-icon {
  height: 1em;
  display: inline-block;
}