:root {
  color-scheme: light dark;

  --light-bg: #dddde4;
  --light-card-bg: #fff8;
  --light-fg: #444;
  --light-fg-bold: black;
  --light-accent: #789abc;

  --dark-bg: #111118;
  --dark-card-bg: #00000080;
  --dark-fg: #ccc;
  --dark-fg-bold: white;
  --dark-accent: #abcdef;

  --banner-location: url("/imgs/header-image.png");
  --font: 'Noto Sans', sans-serif;
  --monospace-font: 'Noto Sans Mono', monospace;
}

body {
  margin: 0 auto;
  width: 1000px;
  font-family: var(--font);
  font-variant-ligatures: none;
  background-color: light-dark(var(--light-bg), var(--dark-bg));
}

@media (width <= 1020px) {
  body {
    width: unset;
    margin: 0 10px;
  }
}

@media (width <= 600px) {
  body {
    width: unset;
    margin: 0;
  }

  .navbar {
    display: none !important;
  }

  .mobile-menu {
    display: block !important;
  }

  .breadcrumb {
    display: none !important;
  }

  .footer-row {
    display: none !important;
  }
}

/* Mobile Navbar */
.mobile-menu {
  display: none
}

.mobile-menu .header {
  display: flex;
  gap: 20px;
  background-image: linear-gradient(90deg, rgba(0,0,0,0.5) 30%, rgba(0,0,0,0) 100%), var(--banner-location);
  background-position: center;
  background-size: cover;
  padding: 0 20px;
  color: white;
  font-weight: bold;
  font-size: 1.25rem;
  position: sticky;
  top: 0;
  width: 100%;
  box-sizing: border-box;
  z-index: 5;
}

.mobile-menu .header>* {
  margin: 15px 0;
  color: white;
}

.mobile-menu .header a {
  color: white;
  text-decoration: underline; 
  cursor: pointer;
}

.mobile-menu .header span {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  -webkit-line-clamp: 1;
  line-clamp: 1;
}

.mobile-menu .menu-container {
  display: flex;
  width: 100vw;
  height: 100vh;
  position: fixed;
  top: 0;
  right: 100vw;
  transition: .3s;
  backdrop-filter: blur(5px) brightness(.5);
  z-index: 10;
}

.mobile-menu .menu-container .menu {
  background-color: light-dark(var(--light-card-bg), var(--dark-card-bg));
  margin: 0;
  width: 80vw;
  height: 100vh;
  flex-shrink: 0;
}

.mobile-menu .menu-container .gutter {
  width: 100%;
}

.mobile-menu .menu-container .menu .button-container {
  display: flex;
  gap: 20px;
  background-image: linear-gradient(90deg, rgba(0,0,0,.5) 30%, rgba(0,0,0,0) 100%), var(--site-banner-location);
  background-position: right 20% center;
  background-size: cover;
  padding: 0 20px;
  height: 8em;
  position: relative;
}

.mobile-menu .menu-container .menu .button-container>a {
  display: block;
  color: white;
  font-size: 1.25rem;
  padding: 15px 0;
  font-weight: bold;
  cursor: pointer;
  /* text-decoration: none; */
}

.mobile-menu .menu-container .menu .button-container .bottom-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  color: var(--dark-fg);
  padding: 15px 20px;
  box-sizing: border-box;
  width: 100%;
  background-image: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.5) 100%);
}

.mobile-menu .menu-container .menu .button-container .bottom-bar a {
  color: var(--dark-fg-bold);
  text-decoration: none;
}

.mobile-menu .menu-container .menu ul {
  margin: 10px 0 0 0;
  padding: 0;
  list-style: none;
}

.mobile-menu .menu-container .menu ul li {
  position: relative;
}

.mobile-menu .menu-container .menu ul li a {
  padding: 10px 20px;
  display: block;
  color: light-dark(var(--light-fg), var(--dark-fg));
  text-decoration: none;
}

.mobile-menu .menu-container .menu ul li a i {
  width: 1em;
  margin-right: .5em;
  text-align: center;
}

.mobile-menu .menu-container .menu ul li a:hover {
  background-color: #fff3;
}

.mobile-menu .menu-container .menu ul li a.active {
  color: light-dark(var(--light-fg-bold), var(--dark-fg-bold));
  font-weight: bold;
}

.mobile-menu .menu-container .menu ul li:has(> a.active)::before {
  content: '';
  display: block;
  height: 100%;
  width: 3px;
  background-color: light-dark(var(--light-fg-bold), var(--dark-fg-bold));
  position: absolute;
}

/* Desktop Navbar */
.navbar {
  display: flex;
  /* width: 60vw; */
  flex-direction: column;
  margin-top: .5em;
}

.navbar .tabs {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
}

.navbar .tabs a {
  display: inline-block;
  margin: 0 0.5em 0 0;
  background-color: /* #f9c37c */ light-dark(#f2b669, #f9c37c);
  padding: 0.25em 0.75em 0.5em;
  border-radius: 5px 5px 0 0;
  position: relative;
  top: 0.25em;
  transition: 0.1s cubic-bezier(0.34, 1.56, 1, 1);
  color: black;
  text-decoration: none;
  white-space: nowrap;
}

.navbar .tabs a:last-child {
  margin-right: 0;
}

.navbar .tabs a.active {
  top: 0;
  background-color: light-dark(#f9c37c, #f9d089);
}

.navbar .tabs a:hover:not(.active) {
  top: 0.1em;
}

.navbar .banner {
  display: flex;
  align-items: flex-end;
  background-image: var(--banner-location);
  background-size: cover;
  background-position: 90% center;
  box-sizing: border-box;
  width: 100%;
  height: 10em;
  z-index: 1;
  box-shadow: 5px 5px 5px #0003;
}

.navbar .banner .bottom-bar {
  background-image: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.5) 100%);
  box-sizing: border-box;
  width: 100%;
  padding: 10px 15px;
}

.navbar .banner .bottom-bar .attribution {
  color: var(--dark-fg);
}

.navbar .banner .bottom-bar .attribution a {
  color: var(--dark-fg-bold);
  text-decoration: none;
}

.navbar .banner .bottom-bar .attribution a:hover {
  text-decoration: underline;
}

.navbar .banner .bottom-bar .externalbutton {
  float: right;
  color: var(--dark-fg-bold);
  transition: .2s;
}

.navbar .banner .bottom-bar .externalbutton:hover {
  scale: 1.2;
}

/* Footer */
.footer-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: .5em;
  margin-bottom: .5em;
}
.footer-row>*{
  display: block;
}
.footer-row img{
  display: block;
  image-rendering: pixelated;
}
.footer-row a {
  transition: .1s;
}
.footer-row a:hover {
  scale: 1.25;
  filter: brightness(1.25);
  z-index: 1;
}

/* Page breadcrumbs */
nav.breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: block;
}

nav.breadcrumb ol li {
  display: inline;
}

nav.breadcrumb li.active {
  color: light-dark(var(--light-fg-bold), var(--dark-fg-bold));
}

nav.breadcrumb ol li:not(:last-child)::after {
  content: ' / ';
  color: light-dark(var(--light-fg), var(--dark-fg));
}

nav.breadcrumb a {
  color: light-dark(var(--light-fg), var(--dark-fg));
  text-decoration: none;
}

nav.breadcrumb a:hover {
  color: light-dark(var(--light-fg-bold), var(--dark-fg-bold));
  text-decoration: underline;
}

/* Cards */
.card {
  background-color: light-dark(var(--light-card-bg), var(--dark-card-bg));
  padding: 10px;
  box-shadow: 5px 5px 5px #0003;
  margin-bottom: .5em;
  color: light-dark(var(--light-fg), var(--dark-fg));
}

.card :is(h1, h2, h3, h4, h5, h6, strong) {
  color: light-dark(var(--light-fg-bold), var(--dark-fg-bold));
}

.card a {
  color: light-dark(var(--light-accent), var(--dark-accent));
  text-decoration: none;
}

.card a:hover {
  color: light-dark(var(--light-fg-bold), var(--dark-fg-bold));
  text-decoration: underline;
}

.card>:last-child {
  margin-bottom: 0;
}

.card>:is(nav,h1,h2,h3,h4,h5,h6,p,span):first-child {
  margin-top: .5em;
}

.card li {
  margin-bottom: .5em;
}

.card li:last-child {
  margin-bottom: 0;
}

.card :is(img, iframe) {
  max-width: 100%;
  border: none;
  z-index: 1;
  filter: drop-shadow(5px 5px 5px #0003);
  display: block;
}

.card p img {
  display: inline;
}

/* Miscellaneous */
.passageFormatting {
  text-indent: 2.5em;
  line-height: 1.75;
  font-family: sans-serif;
  margin: 0 2em;
  text-align: justify;
}

@media (width <= 600px) {
  .passageFormatting {
    margin: 0 1em;
  }
}

details {
  margin: .5em 0;
  padding: .5em;
  background-color: light-dark(var(--light-card-bg), var(--dark-card-bg));
  box-shadow: 5px 5px 5px #0003;
}

details summary {
  cursor: s-resize;
}

details summary::marker {
  margin-right: .5em;
}

details[open] summary {
  cursor: n-resize;
  margin-bottom: .5em;
}

details .content {
  border-top: 1px solid light-dark(var(--light-fg), var(--dark-fg));
  padding: .75em 0 .5em;
  margin: 0;
}

details .content :last-child {
  margin-bottom: 0;
}

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

code {
  font-family: var(--monospace-font);
}

pre:has(> code) {
  background-color: light-dark(var(--light-bg), var(--dark-bg));
  border: solid 1px light-dark(var(--light-fg), var(--dark-fg));
  padding: 1.25em;
  border-radius: .35em;
}

li>ul {
  margin-top: .5em;
}