:root {
  --font: "Ubuntu", sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  width: 100%;
  background: linear-gradient(135deg, #241e19 0%, #2b4162 100%);
  background-attachment: fixed;

  display: flex;
  /* justify-content: center; */
  align-items: center;
  flex-direction: column;
}

main {
  max-width: 1200px;
}

header {
  width: 100%;
}

/* Nav items */

#nav-bar {
  display: flex;
  flex-flow: wrap;
  list-style: none;
  justify-content: center;
  align-items: center;
  width: 100vw;
  padding: 10px;
  font-size: 1.5em;
  font-family: var(--font);
  position: fixed;
  top: 0;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.7) 0%,
    rgba(255, 255, 255, 0.4) 0%
  );
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  z-index: 3;
}

.nav-items {
  margin: 20px;
  cursor: pointer;
  user-select: none;
}

.nav-links {
  text-decoration: none;
  color: black;
}

.active {
  color: #eeeeee;
  font-weight: bold;
}

/* Container for github link and CV download */

#gh-cv-container {
  display: flex;
  flex-direction: column;
  position: fixed;
  background-color: rgb(202, 202, 202);
  padding: 30px 15px 30px 15px;
  left: 0;
  top: 35%;
  border-bottom-right-radius: 15px;
  border-top-right-radius: 15px;
  justify-content: center;
}

#gh-logo {
  cursor: pointer;
}

#cv {
  font-family: var(--font);
  font-size: 3em;
  margin-top: 20px;
  cursor: pointer;
}

/* The landing page design */

#full-name {
  position: relative;
  right: 205px;
  top: 40px;
}

#first-name,
#middle-name,
#last-name {
  font-size: 3em;
  color: aliceblue;
  text-align: left;
}

#jonas-bilde {
  border-radius: 0 40px 0 40px;
}

#landing-page {
  height: 110vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  align-items: center;
  justify-content: center;
}

#pic-and-name {
  display: flex;
}

#info-text {
  font-size: 3em;
  text-align: left;
  color: aliceblue;
  position: relative;
  left: 265px;
  bottom: 122px;
}

#top-text {
  margin-bottom: 20px;
}

#triangle-icon {
  margin-top: 25px;
  animation-name: floating;
  animation-duration: 3s;
  animation-iteration-count: infinite;
  animation-timing-function: ease-in-out;
  margin-left: 30px;
  user-select: none;
}

@keyframes floating {
  0% {
    transform: translate(0, 0px);
  }
  50% {
    transform: translate(0, 15px);
  }
  100% {
    transform: translate(0, -0px);
  }
}

/* New section with the about me page */

#about-me-page {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  flex-direction: column;
}

.about-me-text {
  color: aliceblue;
  font-size: 0.8em;
}

#part-one {
  margin-top: 80px;
}

#part-one,
#part-two,
#part-three {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  font-size: 2em;
}

#jonas-about-photo,
#third-about-photo {
  margin-right: 50px;
  border-radius: 5px;
}

#part-three {
  margin: 0 40px 0 0;
}

#second-about-photo {
  margin-left: 50px;
  border-radius: 5px;
}

/* Section with projects */

#projects-page {
  position: relative;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

h2 {
  font-family: var(--font);
  color: aliceblue;
  text-align: center;
  background-color: rgba(10, 10, 10, 0.9);
  padding: 1.5rem;
  position: relative;
  bottom: 4.7rem;
  border-radius: 5px 5px 0 0;
}

.project-link {
  font-family: var(--font);
  color: aliceblue;
  text-align: center;
  width: fit-content;
  position: relative;

  display: flex;
  justify-content: center;
  align-items: center;
}

.project-link img {
  margin-left: 20px;
}

.project-link a {
  display: flex;
  height: fit-content;
  align-items: center;
  text-decoration: none;
  color: aliceblue;
}
.page-link img {
  margin-left: 20px;
}

.page-link a {
  display: flex;
  height: fit-content;
  align-items: center;
  text-decoration: none;
  color: aliceblue;
}

#carousel {
  width: 70vw;
  height: 69vh; /* Nice */
  position: relative;
}

#carousel > ul {
  list-style: none;
}

#carousel-container {
  display: flex;
  justify-content: center;
  width: 100vh;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: 200ms opacity ease-in-out;
  transition-delay: 200ms;
  display: flex;
  flex-direction: column;
  align-items: center;
  user-select: none;
}

.slide > img {
  display: block;
  width: 100%;
  max-height: 575px;
  object-fit: cover;
  object-position: top;
  border-radius: 7px;
}

.slide[data-active] {
  position: absolute;
  z-index: 1;
  opacity: 1;
  transition-delay: 0ms;
}

.carousel-button {
  position: absolute;
  background: none;
  border: none;
  font-size: 4rem;
  color: aliceblue;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  border-radius: 0.25rem;
  padding: 0 0.5rem;
  background-color: rgba(0, 0, 0, 0.5);
  user-select: none;
  z-index: 2;
}

.carousel-button:hover {
  color: white;
  background-color: rgba(0, 0, 0, 0.9);
}

.carousel-button:focus {
  outline: 1px solid black;
}

#prev-button {
  left: 1rem;
}

#next-button {
  right: 1rem;
}

/* Contact form section */

#form {
  min-height: 100vh;
  font-family: var(--font);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

#send-text {
  color: aliceblue;
  margin-bottom: 20px;
}

input {
  font-family: var(--font);
  width: 20%;
  padding: 5px 10px;
  margin-top: 10px;
  font-size: 1.5em;
  border-radius: 8px;
  border: none;
}

textarea {
  padding: 5px 10px;
  height: 50%;
  width: 20%;
  font-family: var(--font);
  margin: 10px;
  font-size: 1.5em;
  border-radius: 8px;
  border: none;
}

#send-button {
  margin-top: 10px;
  font-family: var(--font);
  padding: 10px 20px;
  background-color: aliceblue;
  color: #241e19;
  font-size: 1.2em;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

#send-button:hover {
  background-color: #241e19;
  color: aliceblue;
}

.style {
  color: aliceblue;
  background-color: #241e19;
  border-radius: 8px;
  padding: 20px 10px;
  margin-top: 20px;
  border: 2px solid aliceblue;
}

/* Media queries */
@media (min-width: 768px) and (max-width: 1024px) {
  .nav-items {
    margin: 10px;
    flex-direction: row;
  }

  #gh-cv-container {
    position: fixed;
    bottom: 200px;
    height: 200px;
    justify-content: space-around;
  }

  #jonas-bilde {
    width: 30vw;
    margin: auto;
  }

  #full-name {
    font-size: 1rem;
  }

  #info-text {
    font-size: 1.3rem;
  }

  .about-me-text,
  h2 {
    font-size: 1.5em;
  }

  #pic-and-name,
  #part-one,
  #part-two,
  #part-three {
    flex-direction: column;
    justify-content: center;
    font-size: 1em;
    width: 100vw;
    justify-content: center;
  }

  #part-two {
    flex-direction: column-reverse;
  }

  input,
  textarea {
    width: 60%;
  }

  #about-me-page {
    width: 60ch;
  }

  #about-me-page .about-me-text {
    margin: 20px 0;
  }

  #about-me-page img {
    margin-bottom: 20px;
  }
}

@media (max-width: 767px) {
  #nav-bar {
    flex-direction: row;
    justify-content: space-evenly;
  }

  .nav-items {
    margin: 5px;
    font-size: 0.5em;
  }

  #gh-cv-container {
    z-index: 3;
    width: 50px;
    height: 100px;
  }

  #gh-cv-container img {
    height: 25px;
    margin-right: auto;
  }

  #full-name h1 {
    font-size: 1em;
  }

  #info-text {
    margin: 100px;
  }

  #info-text p {
    font-size: 1rem;
  }

  #triangle-icon {
    display: none;
  }

  #pic-and-name {
    display: flex;
    align-items: center;
    width: 50vw;
  }

  #jonas-bilde {
    width: 70%;
  }

  #full-name,
  #info-text {
    text-align: center;
    right: 0;
    left: 0;
  }

  .about-me-text,
  h2 {
    font-size: 1.2em;
    margin: auto;
  }

  .about-me-text {
    text-align: left;
  }

  #pic-and-name,
  #part-one,
  #part-two,
  #part-three {
    width: 100vw;
    justify-content: center;
    flex-direction: column;
    font-size: 1em;
    margin: auto;
  }

  #part-one {
    text-align: center;
  }

  #jonas-about-photo {
    margin: auto;
  }

  #part-two {
    flex-direction: column-reverse;
    text-align: center;
  }

  #second-about-photo {
    margin: auto;
  }

  #about-me-text {
    text-align: center;
  }

  #third-about-photo {
    margin: auto;
  }

  input,
  textarea {
    width: 80%;
  }

  #carousel {
    width: 90vw;
  }

  .carousel-button {
    margin-top: 20px;
  }

  .carousel-text {
    margin-top: 1px;
    font-size: 0.76em;
  }

  .slide > img {
    height: auto;
  }

  #about-me-page .about-me-text {
    margin: 20px 0;
  }

  .project-link {
    margin-top: 80px;
  }
}
