:root {
  --primary-color: #000;
  --secondary-color: #fff;
  --tertiary-color: #888;
  --highlight: #006aff;
}

body,
html {
  font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
  background-color: var(--primary-color);
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  box-sizing: border-box;
}

figcaption {
  text-align: left;
  margin-top: 5px;
  font-size: 1em;
  color: var(--tertiary-color);
}

.container, #about {
  display: flex;
  max-width: 100vw;
}

.image {
  max-width: 22%;
}

.image img {
  max-width: 97%;
}

.stars,
.twinkling {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.stars {
  background: #000 url(assets/stars.png) repeat top center;
  z-index: 0;
}

.twinkling {
  background: transparent url(assets/twinkling.png) repeat top center;
  z-index: 1;
  animation: move-twinkle-back 600s linear infinite;
}

#hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--secondary-color);
  font-size: xx-large;
  height: 100vh;
}

#links {
  text-align: center;
  font-size: 150%;
  z-index: 10;
}

#links h1 a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: color 0.3s;
}

#links h1 a:hover {
  color: var(--highlight);
}

#links nav a {
  color: var(--tertiary-color);
  text-decoration: none;
  transition: color 0.3s;
}

#links nav a:hover {
  color: var(--secondary-color);
}

#about {
  flex-direction: row;
  width: 100vw;
  height: auto;
  background-color: var(--secondary-color);
}

#text {
  flex-basis: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: var(--secondary-color);
  color: var(--primary-color);
  width: fit-content;
}

#intro {
  font-size: 2.5vh;
  text-align: justify;
  margin: 1%;
}

#projects {
  flex-direction: column;
  font-size: 2.4vh;
}

#projects li a {
  color: var(--highlight);
  text-decoration: none;
  transition: color 0.3s;
}

#projects li a:hover {
  color: var(--tertiary-color);
}

#back a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s;
}

#back a:hover {
  color: var(--tertiary-color);
}

#footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: var(--secondary-color);
  width: auto;
}

#footer hr {
  width: 50%;
  text-align: center;
}

#footer nav a {
  color: var(--tertiary-color);
  text-decoration: none;
  transition: color 0.3s;
}

#footer nav a:hover {
  color: var(--primary-color);
}

@media only screen and (max-device-width: 480px) {
  
  figure {
    display: none;
  }

  #links {
    font-size: 200%;
  }
  
  #intro {
    text-align: center;
    margin: 0 0 10 10;
  }

  #text {
    flex-basis: 100%;
    margin: 2%;
  }

  #footer hr,
  #badges {
    display: none;
  }

  #footer h4, nav {
    padding: 30px 10px 10px;
    text-align: center;
    font-size: xxx-large;
  }
}

@keyframes move-twinkle-back {
  from {
    background-position: 0 0;
  }
  to {
    background-position: -10000px 5000px;
  }
}
