* {
  box-sizing: border-box;
}

html {
  overscroll-behavior: none;
  scrollbar-gutter: stable;
}

/* Floating scrollbar styling */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(107, 68, 35, 0.5);
  border-radius: 6px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(107, 68, 35, 0.7);
  background-clip: padding-box;
}

:root {
  color-scheme: light dark;
  /* Retro 70s/80s Color Palette */
  --burnt-orange: #d4693c;
  --mustard: #e6a83c;
  --olive: #8b9556;
  --teal: #5b8c8a;
  --rust: #a0522d;
  --cream: #f5e6d3;
  --brown: #6b4423;
  --light-brown: #b89968;
}

body {
  margin: 0;
  min-width: min-content;
  width: 100vw;
  font-family: 'Lexend', sans-serif;
  background: 
    repeating-linear-gradient(
      45deg,
      var(--cream) 0px,
      var(--cream) 20px,
      #ede0cd 20px,
      #ede0cd 40px
    );
  color: var(--brown);
  padding-top: 180px;
  overscroll-behavior: none;
  overflow-y: overlay;
}

#main-wrapper {
  width: 100vw;
  min-height: calc(100vh - 180px);
  display: flex;
}

main {
  padding: 40px;
  width: calc(100% - 280px);
  flex: 1;
}

main .content {
  background: var(--cream);
  border: 8px solid var(--burnt-orange);
  border-radius: 30px;
  box-shadow: 
    12px 12px 0 var(--rust),
    12px 12px 0 2px var(--brown);
  font-size: 18px;
  line-height: 1.7em;
  color: var(--brown);
  padding: 40px 50px;
  position: relative;
  overflow: hidden;
}

main .content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
  background: repeating-linear-gradient(
    90deg,
    var(--burnt-orange) 0px,
    var(--burnt-orange) 30px,
    var(--mustard) 30px,
    var(--mustard) 60px,
    var(--olive) 60px,
    var(--olive) 90px,
    var(--teal) 90px,
    var(--teal) 120px
  );
}

header {
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  height: 180px;
  margin: 0;
  background: var(--brown);
  color: var(--cream);
  border-bottom: 12px solid;
  border-image: repeating-linear-gradient(
    90deg,
    var(--burnt-orange) 0%,
    var(--burnt-orange) 25%,
    var(--mustard) 25%,
    var(--mustard) 50%,
    var(--olive) 50%,
    var(--olive) 75%,
    var(--teal) 75%,
    var(--teal) 100%
  ) 1;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  overflow: hidden;
}

header::before {
  content: '';
  position: absolute;
  top: 0;
  left: -10%;
  width: 120%;
  height: 100%;
  background: repeating-linear-gradient(
    -45deg,
    transparent 0px,
    transparent 40px,
    rgba(245, 230, 211, 0.05) 40px,
    rgba(245, 230, 211, 0.05) 80px
  );
  pointer-events: none;
}

header > .logo-container {
  display: flex;
  align-items: center;
  padding: 0 30px;
  z-index: 1;
}

header > .logo-container svg {
  width: 90px;
  height: 90px;
  filter: drop-shadow(4px 4px 0 var(--burnt-orange));
}

header > .logo-container.github {
  margin-left: auto;
  padding: 0 30px;
}

header > .logo-container.github a {
  display: flex;
  align-items: center;
}

header > .logo-container.github img {
  width: 50px;
  height: 50px;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

header > .title {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
  margin-left: 20px;
  z-index: 1;
}

header > .title h1 {
  margin: 0 0 8px 0;
  line-height: 1.1;
  font-size: 3em;
  font-family: 'Righteous', sans-serif;
  color: #ffd700;
  text-shadow: 
    3px 3px 0 var(--burnt-orange),
    6px 6px 0 var(--rust);
  letter-spacing: 2px;
}

header > .title h4 {
  margin: 0;
  font-weight: 400;
  line-height: 1.2;
  font-size: 1.1em;
  color: var(--cream);
  opacity: 0.9;
}

footer {
  width: 100%;
  min-height: 120px;
  background: var(--rust);
  color: var(--cream);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px;
  margin-top: 64px;
  border-top: 8px solid var(--burnt-orange);
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Righteous', sans-serif;
  letter-spacing: 1px;
}

h1 {
  font-weight: 400;
  font-size: 2.5em;
  color: var(--rust);
  text-shadow: 
    2px 2px 0 var(--mustard),
    4px 4px 0 var(--burnt-orange);
  margin-top: 40px;
  margin-bottom: 20px;
}

main .content h1:first-child {
  margin-top: 0;
}

h2 {
  font-weight: 400;
  padding-top: 30px;
  font-size: 2em;
  color: var(--brown);
  border-bottom: 4px solid var(--burnt-orange);
  padding-bottom: 10px;
  margin-bottom: 20px;
}

h3 {
  font-weight: 400;
  font-size: 1.5em;
  color: var(--rust);
  margin-top: 30px;
}

h4 {
  font-weight: 400;
  color: var(--brown);
}

p > code,
a > code {
  background-color: var(--light-brown);
  color: var(--cream);
  border-radius: 6px;
  font-weight: 500;
  padding: 3px 8px;
  margin: 0 4px;
  border: 2px solid var(--rust);
}

header h1,
header h2,
header h3 {
  width: auto;
  margin: 0;
}

nav {
  display: block;
  min-width: 280px;
  width: 280px;
  font-size: 17px;
  background: var(--olive);
  padding: 25px;
  border-right: 8px solid var(--rust);
  font-family: 'Lexend', sans-serif;
  position: relative;
}

nav > h4 {
  color: var(--cream);
  margin: 0;
  margin-top: 30px;
  margin-bottom: 10px;
  padding-top: 20px;
  text-transform: uppercase;
  font-family: 'Righteous', sans-serif;
  font-weight: 400;
  letter-spacing: 2px;
  font-size: 1.1em;
  text-shadow: 2px 2px 0 var(--brown);
  border-top: 3px solid var(--rust);
}

nav > h4:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

nav > a {
  color: var(--cream);
  display: block;
  text-decoration: none;
  padding: 10px 0;
  padding-left: 15px;
  border-left: 4px solid transparent;
  transition: all 0.2s;
  position: relative;
  z-index: 1;
}

nav > a:hover {
  border-left-color: var(--burnt-orange);
  background: rgba(245, 230, 211, 0.1);
  padding-left: 20px;
}

nav.collection {
  border: none;
}

nav.collection > ul {
  padding: 0;
  list-style: none;
}

nav.collection > ul > li {
  padding: 4px 0;
}

nav.collection > ul > li.selected {
  font-weight: 600;
}

nav.collection a {
  text-decoration: none;
}

nav.collection a:hover {
  text-decoration: underline;
}

section.demo {
  width: calc(100% - 50px);
  margin: 20px 0;
  padding: 25px;
  background: var(--light-brown);
  border: 4px dashed var(--rust);
  border-radius: 20px;
}

section.demo h2 {
  padding-top: 0;
  margin-top: 0;
  margin-bottom: 30px;
  border-bottom: none;
}

.table-wrapper {
  overflow-x: auto;
  border: 4px solid var(--burnt-orange);
  border-radius: 15px;
  background: white;
}

table {
  border-collapse: collapse;
  width: 100%;
}

table th {
  background: var(--rust);
  color: var(--cream);
  padding: 15px;
  text-align: left;
  font-family: 'Righteous', sans-serif;
  letter-spacing: 1px;
}

table td {
  padding: 12px 15px;
  border-bottom: 2px solid var(--light-brown);
}

table tr:last-child td {
  border-bottom: none;
}

.mobile-header {
  display: none;
}

.mobile-menu-button {
  display: none;
  background: transparent;
  border: 3px solid var(--cream);
  cursor: pointer;
  padding: 10px;
  border-radius: 12px;
  transition: all 0.2s;
}

.mobile-menu-button:hover {
  background-color: rgba(245, 230, 211, 0.15);
  transform: scale(1.05);
}

.mobile-menu-button:active {
  background-color: rgba(245, 230, 211, 0.25);
}

.mobile-menu-button svg {
  filter: brightness(0) invert(1);
}

#page-title {
  margin-top: 0;
  margin-bottom: 30px;
  padding: 0;
  padding-bottom: 15px;
  font-family: 'Lora', serif;
  font-style: italic;
  font-weight: 400;
  color: var(--olive);
  font-size: 1.3em;
  border-bottom: 3px dotted var(--olive);
}

#version {
  background-color: var(--rust);
  padding: 8px 15px;
  color: var(--cream);
  border-radius: 20px;
  margin-top: 15px;
  display: inline-block;
  border: 3px solid var(--burnt-orange);
  font-family: 'Righteous', sans-serif;
}

#open-issues {
  border-radius: 15px;
  border: 4px solid var(--burnt-orange);
  font-size: 16px;
  background-color: var(--mustard);
  color: var(--brown);
  padding: 12px 20px;
  font-weight: bold;
  margin-top: 15px;
}

pre[class*="language-"] {
  border: 6px solid var(--rust) !important;
  border-radius: 20px !important;
  background: #2a2a2a !important;
  box-shadow: 6px 6px 0 var(--burnt-orange) !important;
}

a {
  color: var(--teal);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--burnt-orange);
}

strong {
  color: var(--rust);
  font-weight: 600;
}

@media only screen and (max-device-width: 490px) {
  body {
    padding-top: 70px;
  }

  header {
    height: 70px;
  }

  header .mobile-menu-button {
    margin-left: 15px;
    margin-top: 5px;
  }

  header .logo-container {
    display: none;
  }

  header .title {
    margin-top: 15px;
  }

  header > .title h1 {
    text-shadow: none;
    font-size: 1.5em;
  }

  header .title h4 {
    display: none;
  }

  .mobile-header {
    display: block;
    padding: 10px;
  }

  .mobile-header a > img {
    width: 33%;
  }

  .mobile-header h1 {
    color: var(--cream);
  }

  nav {
    display: none;
  }

  .menu-open nav {
    position: fixed;
    background: var(--olive);
    top: 70px;
    width: 80%;
    height: calc(100vh - 70px);
    display: block;
    z-index: 1000;
    overflow-y: auto;
  }

  #main-wrapper {
    min-height: calc(100vh - 70px);
  }

  .mobile-menu-button {
    margin-top: 15px;
    display: inline-block;
  }

  main {
    margin: 0;
    padding: 15px;
    width: 100%;
  }

  main .content {
    padding: 20px;
    border-width: 4px;
  }
}
