html {
  --nav-color: #505055;
  --background-color: #020202;
  --text-color: white;
  background-color: var(--background-color);
  --nav-a-color: white;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
}

html:has(option[value="light"]:checked) {
  --nav-color: #335765;
  --background-color: #B6D9E0;
  --text-color: black;
}

html:has(option[value="dark"]:checked) {
  --nav-color: #505055;
  --background-color: #020202;
  --text-color: white;
}

html {
  --select-background-color: var(--nav-color);
  --select-text-color: var(--nav-a-color)
}

.content {
  display: flex;
  width: min(1000px, 90%);
}

content main {
  width: 100%;
}

.nav {
  height: 39px;
  width: min(1000px, 90%);
  margin: auto;
  background-color: var(--nav-color);
  padding-top:  3px;
  padding-bottom: 3px;
  border-radius: 2em;
  margin-bottom: 10px;
}

nav {
    text-align: center;
}

nav ul {
    padding: 0;
    margin: 0.5em;
}

nav a {
  color: var(--nav-a-color);
}

nav li:has(a:hover){
  box-shadow: 4px 4px 5px rgba(0, 0, 0, 0.1), -2px -2px 5px rgba(0, 0, 0, 0.1);
}

nav li {
    display: inline-block;
    padding: 0 1em;
    margin: 0;
    border-radius: 5px;
}

caption-image {
  display: flex;
  gap: 20px;
  height: 200px;
  align-items: center;
}

img {
  width: 200px;
  height: 200px;
}

#demo-img {
  width: 49%;
  height: auto;
}

#demo-gif {
  height: 80vh;
  width: auto;
}

.selection {
  width: min(1000px, 90%);
  margin-bottom: 2em;
  display: flex;
  justify-content: space-between;
}

p, h2 {
  color: var(--text-color)
}

select {
  background-color: var(--select-background-color);
  text-align: center;
  color: var(--select-text-color);
  border-radius: 5px;
  border: 0px;
  width: 80px;
  padding-top: 3px;
  padding-bottom: 3px;
}

contenthead {
  text-align: center;
}

content, content-index {
  display: flex;
  width: 100%;
}

language {
  background-color: var(--nav-color);
  display: flex;
  padding: 2px 15px;
  border-radius: 5px;
  gap: 15px;
}

language a {
  color: var(--nav-a-color);
}

language :not(#active) {
  text-decoration: none;
}

sidebar {
  border-radius: 10px;
  background-color: var(--nav-color);
  padding: 10px 30px 0px 10px;
}

sidebar ul {
  list-style-type: none;
}

sidebar li {
  margin-bottom: 2px
}

contact h3 {
  text-align: center;
  color: var(--nav-a-color);
}

contact a {
  color: var(--nav-a-color);
}

main {
  color: var(--text-color);
  padding-left: 20px;
}

content-index main p, content-index main li {
  max-width: 95%;
}

main li {
  margin-bottom: 4px;
}

main a {
  color: var(--text-color);
}

content-index hr {
  margin-right: 20px;
}

@media only screen and (orientation:portrait) and (max-device-width: 480px){
  html {
    font-size: 35px;
  }
  
  .nav {
    height: 80px;
    border-radius: 5em;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .selection select {
    height: 40px;
    width: 150px;
    font-size: 27px;
  }

  .content {
    min-height: 80vh;
  }
  
  content-index {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
  
  sidebar ul {
    margin-top: 5px;
    display: flex;
    justify-content: space-around
  }
  
  sidebar li {
    width: 25%;
    text-align: center;
  }
  
  sidebar h3 {
    margin-bottom: 0px;
  }

  content-index hr {
    margin-right: 0px;
  }

  #demo-img {
    width: 100%;
  }

  #demo-gif {
    width: 100%;
    height: auto;
  }
}

traffic-lights {
  display: flex;
  justify-content: center;
}

housing {
  border: 2px solid black;
  height: 350px;
  width: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
  border-radius: 1em;
  background-color: white;
}

inner {
  border: 2px solid black;
  height: 300px;
  width: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
  border-radius: 1em;
  background-color: gray;
}

face {
  border: 2px solid black;
  height: 30%;
  width: 60%;
  border-radius: 50%;
}

.r {
  background-color: #800000;
}

.y {
  background-color: #808000;
}

.g {
  background-color: #008000;
}

traffic-lights #active {
  filter: brightness(200%);
  border: 2px solid white;
  box-shadow: 0 0 10px white;
}
