:root {
  color-scheme: light dark;

  /* colors adapted from rust documentation */
  /* TODO: light/dark mode */
  --bg-color: light-dark(#161923, #161923);
  --text-color: light-dark(#bcbdd0, #bcbdd0);
  --alt-bg-color: light-dark(#1e222d, #1e222d);
  --main-header-bg-color: light-dark(#aaaaaa, #1e222d);
}

* {
  margin: 0;
  padding: 0;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body, html {
  font-family: "Roboto";
  width: 100%;
  height: 100%;
  background-color: var(--bg-color);
  color: var(--text-color);
}

main {
/*
  display: flow-root;
  padding: 80px 20px 20px 20px;
  min-height: 100%;
  position: relative;
*/
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: 80px 20px 20px 20px;
  min-height: 100vh;
}

main > *:not(script) {
  width: 100%;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background-color: var(--main-header-bg-color);
  z-index: 1000;
  transition: transform 0.3s ease-in-out;
}

.main-header > nav {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  font-size: 24px;
  height: 100%;
}

.main-header > nav > div {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 32px;
}

.main-header a {
  color: inherit;
  text-decoration: none;
  opacity: 0.5;
  transition: opacity 0.1s ease-in-out;
}

.main-header a:hover {
  opacity: 1.0;
}

.main-header.scroll-down {
  transform: translateY(-100%);
}

.main-social {
  display: flex;
  align-items: center;
  flex-direction: row;
  gap: 12px;
}

.main-social > img {
  width: 32px;
}

/* MOBILE COMPATIBILITY */
@media (max-width: 600px) and (orientation: portrait), 
       (max-width: 950px) and (orientation: landscape) {
  .main-header > nav {
    padding: 0 16px;
  }

  .main-header > nav > div {
    gap: 16px;
  }
}
