:root {
  --fg: #ffffff;
  --bg: #000000;
  /* --hl: rgba(200, 200, 255, 0.4); */
  --hl: rgba(250, 210, 170, 0.7);
}

html,
body {
  background-color: var(--bg);
  color: var(--fg);
  font-family: monospace;
  font-size: 16px;
  overflow-x: hidden;
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  position: relative;
}

::selection {
  background-color: var(--hl);
}

img {
  max-width: min(100%, 400px);
}

a {
  background: none;
  color: var(--fg);
  width: fit-content;
  text-align: left;
  border: none;
  text-decoration: underline;
  font-family: inherit;
  font-size: inherit;
  cursor: default;
  line-height: inherit;
  display: inline;
  font-weight: bold;
}

a:hover {
  color: rgba(255, 255, 255, 0.6);
}

/* a:not(.unstyle)::before { */
/*   content: "["; */
/*   opacity: 0.75; */
/*   font-weight: normal; */
/* } */
/* a:not(.unstyle)::after { */
/*   content: "]"; */
/*   opacity: 0.75; */
/*   font-weight: normal; */
/* } */

#bg {
  position: absolute;
  top: -10px;
  left: calc(3% - 50px);
  /* left: -50px; */
  z-index: 1;
}

#bg img,
#bg video {
  max-width: revert;
  opacity: 0.5;
}

#fg {
  position: relative;
  z-index: 10;
  width: calc(100% - 20px);
  height: 100%;
  min-height: 100vh;
  margin: 0 10px 0 10px;

  display: flex;
  flex-direction: row;
  gap: 0;
}

#content {
  width: 100%;
  overflow-y: auto;
  margin-bottom: 3em;
  margin-left: max(10em, 20%);
}

#content::-webkit-scrollbar {
  display: none;
}

#home {
  margin-top: calc(3em + 10px);
  opacity: 0.8;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;

  a::before,
  a::after {
    content: "";
  }
}

#about {
  margin-top: 1em;
}

#projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
  max-width: 1200px;
  gap: 1em;
  margin: 0 auto;
  justify-content: center;
}
#projects img {
  opacity: 0.8;
  transition: opacity 0.2s ease;
  display: block;
  margin: 0 auto;
}
#projects img:hover {
  opacity: 1;
}

.card {
  background-color: rgba(255, 255, 255, 0.01);
  padding: 0px 1em 0px 1em;
  border: 2px solid rgba(255, 255, 255, 0.2);
  margin: 1em;
}

#contact a::before,
#contact a::after {
  content: "";
}

#posts {
  margin-top: 1em;
  li {
    margin: 0.5em 0;
  }
}

@media (min-width: 801px) {
  #content {
    margin-right: min(10em, max(calc(100vw - 1200px), 0px));
  }
}

@media (max-width: 800px) {
  html,
  body {
    overflow-y: auto;
  }

  #fg {
    flex-direction: column;
    height: auto;
  }

  #fg #content {
    overflow-y: visible;
    box-sizing: border-box;
    margin-bottom: 0;
    margin-left: 0;
  }
  #home {
    margin-top: 0;
    margin-bottom: 10px;
  }
  #content {
    align-items: center;
    margin-top: 15em;
  }
  #projects {
    justify-items: center;
  }
}

@media (max-width: 400px) {
  #bg {
    left: -115px;
  }
}
