/* Reset & base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  --nerdhut-blue: #264788;
  --nerdhut-blue-dark: #122b5f;
  --nerdhut-orange: #f06d26;
  --nerdhut-orange-dark: #c54615;
  --font-light: #fff;
  --font-dark: #000;
  --font-light-accent: #ddd;
  --font-dark-accent: #666;
  --background-light: #fff;
  --background-light-accent: #f9f9f9;
  --background-dark: #2c3038;
  --background-dark-accent: #212429;
  /* Actual theme variables */
  --background: var(--background-light);
  --background-accent: var(--background-light-accent);
  --foreground: var(--font-dark);
  --foreground-light: var(--font-dark-accent);
  --accent: var(--nerdhut-blue);
  --accent-dark: var(--nerdhut-blue-dark);
  --accent-foreground: var(--font-light);
  /* Layout variables */
  --footer-height: 60px;
  --fab-distance: 25px;
  --fab-size: 64px;
}

body {
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  background-color: var(--background);
  color: var(--foreground);
  position: relative;
  min-height: 100vh;
  margin: 0;
  padding-bottom: var(--footer-height);
}

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

a:hover {
  text-decoration: underline;
}

p {
  margin-bottom: 17px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1rem 0;
  border-radius: 5px;
}

/* Header */
header {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  align-content: center;
  justify-content: center;
  border-bottom: 1px solid var(--background-accent);
  margin-bottom: 2rem;
  box-shadow: 0 2px 5px -4px rgba(0, 0, 0, 0.5);
  padding-bottom: 10px;
  user-select: none;
}

header h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.site-logo {
  width: 300px !important;
}

/* Navigation Bar */

header nav {
  width: 100%;
  height: 40px;
  display: flex;
  flex-direction: row;
  align-items: baseline;
  justify-content: space-evenly;
}

.nav-mobile,
.menu-toggle {
  display: none !important;
}

.navigation {
  gap: 5px;
  margin: 0;
  list-style-type: none;
}

.navigation li {
  float: left;
  position: relative;
  list-style: none;
}

.navigation li a {
  color: var(--foreground);
  font-size: 12px;
  border-radius: 5px;
  padding: 5px 15px;
  display: block;
  font-weight: bold;
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 25px;
  margin-left: 5px;
}

.navigation ul li a {
  border-radius: 0;
  padding: 5px 10px;
  margin: 5px;
  font-weight: normal;
  text-transform: initial;
}

/* First level navigation list */
.navigation li > ul {
  display: none; /* hidden by default */
  flex-direction: column;
  background: var(--accent);
  position: absolute;
  list-style-type: none;
  top: 35px;
  margin: 0;
  padding: 0;
  box-shadow: 1px 1px 0px 1px var(--accent-dark);
  border-radius: 0 5px 5px 5px;
  left:5px;
  min-width: 100%;
  font-weight: bold;
  color: var(--accent-foreground);
}

.navigation li:hover > ul {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
}

/* Show top-level entry as active on first-level navigation hover */
.navigation .nested > .first-level:hover ~ a,
.navigation .nested > .first-level li:hover ~ a {
  background-color: var(--accent);
  border-radius: 5px 5px 0 0;
  box-shadow: 1px 1px 0px 1px var(--accent-dark);
  color: var(--accent-foreground);
  font-weight: bold;
}

/* First level navigation list entries */
.navigation li ul li {
  display: block;
  width: 100%;
  float: none;
  margin-left: 0;
}

.navigation li ul li a {
  color: var(--accent-foreground);
  font-weight: bold;
  text-decoration: none;
}

/* First level navigation list entries (hover) */
.navigation li ul li a:hover {
  text-decoration: underline;
  box-shadow: none !important
}

.navigation > li a:hover, .navigation li.current > a {
  background-color: var(--accent);
  box-shadow: 1px 1px 0px 1px var(--accent-dark);
  color: var(--accent-foreground);
  font-weight: bold;
}

.icon-down-dir::after {
  font-family: "fontello";
  content: '\e9c8';
  margin-left: .3em;
}

/* Main content */
main {
  max-width: 800px;
  margin: 0 auto 4rem;
}

/* Footer */
footer {
  display: flex;
  flex-direction: column;
  justify-items: center;
  justify-content: center;
  text-align: center;
  position: absolute;
  width: 100%;
  bottom: 0;
  left: 0;
  height: var(--footer-height);
  font-size: 0.7rem;
  padding: 1.5rem 0;
  color: var(--font-light);
  background-color: var(--background-dark);
  border-top: 1px solid var(--background-dark-accent);
}

.orange-button {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  background-color: var(--nerdhut-orange);
  color: var(--accent-foreground);
  border: none;
  cursor: pointer;
  padding: 20px;
  text-decoration: none !important;
  transition: all 0.2s ease;
  box-shadow: none;
  user-select: none;
}

.orange-button:hover {
  box-shadow: 1px 1px 0px 1px var(--nerdhut-orange-dark);
  transform: translate(-1px, -1px);
}

.orange-button:active {
  box-shadow: none;
  transform: translate(2px, 2px);
  transition: all 0.1s ease;
}

.fab {
  position: fixed;
  bottom: var(--fab-distance);
  right: var(--fab-distance);
  width: var(--fab-size);
  height: var(--fab-size);
  font-size: 24px;
  z-index: 1000;
}

/* Code formatting */

pre.highlight, pre.highlight code {
  display: block;
  max-width: 100% !important;
  overflow-x: auto;
  white-space: pre;
  box-sizing: border-box;
}
