/* Page and responsive styles. */

:root {
  --accent: #42b983;
  --background: #091a28;
  --text-color: #b4b4b4;
  --border-color: #0d2538;
  --row-border-color: rgba(180, 180, 180, 0.28);
  --code-background: #0e2233;
  --content-width: 900px;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --background: #fff;
  --text-color: #34495e;
  --border-color: rgba(0, 0, 0, 0.12);
  --code-background: #f8f8f8;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--background);
  color: var(--text-color);
  font-family: "PT Sans", "Source Sans Pro", "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.15s ease-in-out, color 0.15s ease-in-out;
}

a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

#theme-toggle {
  position: absolute;
  top: 75px;
  right: 10px;
  display: block;
  width: 25px;
  height: 25px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-color);
  cursor: pointer;
}

#theme-icon {
  display: block;
  width: 25px;
  height: 25px;
}

.github-corner {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 2;
  width: 70px;
  height: 70px;
  color: #fff;
  border-bottom: 0;
  text-decoration: none;
}

.github-corner svg {
  display: block;
  width: 70px;
  height: 70px;
  fill: var(--accent);
}

.github-corner .octo-arm,
.github-corner .octo-body {
  fill: currentColor;
}

.github-corner:hover .octo-arm {
  animation: octocat-wave 0.56s ease-in-out;
}

#theme-toggle {
  border: 0;
  appearance: none;
}

#theme-toggle:focus-visible,
.github-corner:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

@keyframes octocat-wave {
  0%,
  100% { transform: rotate(0); }
  20%,
  60% { transform: rotate(-25deg); }
  40%,
  80% { transform: rotate(10deg); }
}

.markdown-section {
  position: relative;
  width: min(var(--content-width), 90%);
  margin: 0 auto;
  padding: 90px 15px;
  line-height: 1.6;
}

.markdown-section h1,
.markdown-section h2,
.markdown-section h3 {
  color: var(--text-color);
  font-weight: 600;
}

.markdown-section h1 {
  margin: 0 0 1rem;
  font-size: 2rem;
  line-height: 1.3;
}

.markdown-section h2 {
  margin: 45px 0 0.8rem;
  font-size: 1.75rem;
  line-height: 1.3;
}

.markdown-section h3 {
  margin: 40px 0 0.6rem;
  font-size: 1.5rem;
  line-height: 1.3;
}

.markdown-section p {
  margin: 1.2em 0;
}

.markdown-section img {
  max-width: 100%;
}

.markdown-section table {
  width: 100%;
  margin-bottom: 1rem;
  border-collapse: collapse;
  table-layout: fixed;
}

.markdown-section th,
.markdown-section td {
  padding: 6px 13px;
  border-left: 0;
  border-right: 0;
  text-align: left;
  vertical-align: top;
}

.markdown-section th {
  border-bottom: 2px solid var(--row-border-color);
}

.markdown-section td {
  border-bottom: 1px solid var(--row-border-color);
}

.markdown-section thead tr {
  border-top: 1px solid var(--row-border-color);
}

.markdown-section tbody tr:nth-child(even) td {
  background: var(--code-background);
}

.markdown-section th:first-child,
.markdown-section td:first-child {
  width: 25%;
}

.markdown-section th:last-child,
.markdown-section td:last-child {
  width: 75%;
}

.markdown-section tbody tr:hover td {
  background: var(--code-background);
}

.site-footer {
  padding: 0 15px 90px;
  color: var(--text-color);
  font-size: 0.8rem;
  text-align: center;
  opacity: 0.65;
}

@media (max-width: 640px) {
  #theme-toggle {
    top: 15px;
    right: auto;
    left: 15px;
  }

  .markdown-section {
    width: 100%;
    padding: 90px 15px;
  }

  .markdown-section table,
  .markdown-section tbody,
  .markdown-section tr,
  .markdown-section td {
    display: block;
  }

  .markdown-section table {
    border: 0;
  }

  .markdown-section thead {
    display: none;
  }

  .markdown-section tbody tr {
    padding: 0.75rem 0;
    border-top: 1px solid var(--row-border-color);
  }

  .markdown-section tbody tr:first-child {
    border-top: 0;
  }

  .markdown-section tbody td {
    width: 100% !important;
    padding: 0.2rem 0;
    border: 0;
  }

  .markdown-section tbody td:first-child {
    font-weight: 600;
  }

  .markdown-section tbody tr:hover td {
    background: transparent;
  }

  .site-footer {
    padding-bottom: 90px;
  }
}
