@font-face {
  font-family: "Roboto";
  src: url("./fonts/Roboto/Roboto-VariableFont_wdth,wght.ttf")
    format("truetype");
  font-weight: normal;
  font-style: normal;
}

* {
  box-sizing: border-box;
  font-family: "Roboto", sans-serif;
  max-width: 100vw;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  height: 100%;
  min-height: 100vh;
  margin: 0;
}

body {
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  padding-top: calc(120px + env(safe-area-inset-top));
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  background-color: var(--primary-color);
  box-shadow: 5px 10px;
  width: 100%;
  height: 120px;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  color: var(--navbar-color);
  font-size: clamp(12px, 2.5vw, 30px);
}

.nav_container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 100%;
  margin: 0 auto;
  padding: 2rem 5vw;
  overflow: hidden;
}

#nav_links {
  list-style: none;
  display: flex;
  gap: 3rem;
}

#nav_links a {
  text-decoration: none;
  color: var(--navbar-color);
  font-weight: 500;
  transition: color 0.3 ease;
}

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

.nav_logo {
  font-size: clamp(20px, 4vw, 40px);
}

.burger {
  display: none;
  font-size: 2rem;
  cursor: pointer;
}

.nav_container .icon {
  display: none;
}

.progress_container {
  width: 100%;
  height: 0.5vh;
  background: transparent;
}

.progress_bar {
  height: 0.5vh;
  background-color: var(--secondary-color);
  filter: brightness(1.1);
  width: 0%;
}

.about_me {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5rem;
  padding: 2vw 4vw;
  flex-wrap: wrap;
  position: static;
}

.about_me_text {
  width: 45%;
}

.about_me img {
  width: 40%;
  max-width: 1000px;
  height: auto;
  border-radius: 5%;
  flex-shrink: 0;
}

.about_me p {
  flex: 1;
  min-width: 200px;
  text-align: justify;
  line-height: 1.75;
}

.cv {
  font-size: clamp(12px, 2.5vw, 25px);
  margin: 1vw;
  padding: 1vw;
}

.cv_container {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 1vw;
  width: 100%;
  margin: 0 auto;
  border: 0.5vw dotted var(--secondary-color);
}

.cv_entry {
  flex: 1 1 45%;
  display: flex;
  flex-direction: column;
}

.projects {
  font-size: clamp(12px, 2.5vw, 25px);
  padding: 2%;
  width: 100%;
  overflow-x: hidden;
}

.project_entry {
  width: 100%;
  overflow: hidden;
  line-height: 1.75;
  text-align: justify;
  gap: 5rem;
  display: flex;
  align-items: flex-start;
}

.project_text {
  flex: 1;
  width: 40%;
}

.project_text a {
  text-decoration: none;
  color: var(--secondary-color);
}

.project_swiper {
  flex: 1;
}

.swiper {
  width: 100%;
  margin: 2rem auto;
  overflow: hidden;
}

.swiper-slide {
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background-color: var(--navbar-color);
  border: 1px solid var(--primary-color);
}

.swiper-button-next,
.swiper-button-prev {
  color: var(--secondary-color);
}

.swiper-pagination-bullet {
  width: 1vw;
  border-radius: 0px;
}
.swiper-pagination-bullet-active {
  background-color: var(--secondary-color);
  width: 1vw;
  height: 1vh;
}

/* Footer */
footer {
  width: 100%;
  padding: 5vw 4vw;
  background-color: var(--primary-color);
  color: var(--footer-color);
  display: flex;
  justify-content: center;
  align-items: center;
}

.footer_content {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  justify-content: space-between;
  line-height: 1.5;
  width: 100%;
  margin: 1%;
  gap: 12rem;
}

.footer_content .left_container {
  flex: 3;
  text-align: justify;
}

.footer_content .right_container {
  flex: 3;
  text-align: justify;
  display: grid;
  grid-template-columns: auto auto;
  font-family: "Roboto", sans-serif;
  font-size: clamp(5px, 2vw, 25px);
}

.right_container div {
  margin-top: 2vw;
  margin-bottom: 2vw;
}

.right_container .right_column {
  color: var(--contact-font-color);
  filter: brightness(2);
}

.footer_heading {
  font-size: clamp(10px, 4vw, 50px);
  margin: 0 0 0.5rem 0;
}

.footer_information {
  font-size: clamp(5px, 2vw, 25px);
  line-height: 1.5;
}

button {
  font-size: clamp(12px, 3vw, 30px);
  padding: 1em;
  width: 100%;
  background-color: var(--secondary-color);
  color: var(--footer-color);
  border: none;
  cursor: pointer;
}

/* The Modal (background) */
.modal {
  display: none;
  position: fixed;
  z-index: 10000;
  padding-top: 100px;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
}

/* Modal Content */
.modal-content {
  background-color: #fefefe;
  margin: auto;
  padding: 2%;
  border: 1px solid #888;
  width: 40vw;
  color: #000;
  font-size: clamp(12px, 2.5vw, 30px);
}

.modal-content input {
  min-width: 100%;
  font-size: clamp(10px, 2vw, 20px);
}

.modal-content textarea {
  min-width: 100%;
  font-size: clamp(10px, 2vw, 20px);
}

/* The Close Button */
.close {
  color: #aaaaaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.close:hover,
.close:focus {
  color: #000;
  text-decoration: none;
  cursor: pointer;
}

/* ======================= */
/* MEDIA QUERIES           */
/* ======================= */
@media (max-width: 600px) {
  .about_me {
    position: relative;
    top: 1%;
  }

  html,
  body {
    overflow-x: hidden;
    overflow-y: auto;
  }

  footer {
    padding: 5vw 4vw;
  }

  .footer_content {
    flex-direction: column;
    justify-content: center;
    width: 100%;
  }

  .footer_content .left_container,
  .footer_content .right_container {
    width: 100%;
    text-align: left;
  }

  .footer_heading {
    font-size: 1.5rem;
  }

  .footer_information {
    font-size: 1rem;
  }

  button {
    width: 100%;
    font-size: 1rem;
    padding: 1rem;
  }
}

@media (max-width: 900px) {
  .about_me,
  .cv,
  .projects {
    font-size: clamp(15px, 3vw, 35px);
  }

  /* Navigation */
  .nav_container .icon {
    display: block;
    cursor: pointer;
    font-size: 3rem;
    color: var(--navbar-color);
  }

  .nav_logo {
    font-size: 2rem;
  }

  /* Fix für Safari (iPhone / iPad) */
  #nav_links {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--primary-color-light);
    z-index: 3000;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2%;
    gap: 1rem;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.4s ease, max-height 0.4s ease;
    -webkit-transition: opacity 0.4s ease, max-height 0.4s ease;
    -webkit-transform: translateZ(0);
    will-change: opacity, max-height;
  }

  #nav_links.open {
    opacity: 0.9;
    max-height: 500px;
  }

  /* Links im Menü */
  #nav_links a {
    display: block;
    width: 80%;
    text-align: center;
    padding: 1rem 0;
    text-decoration: none;
    color: var(--primary-color);
    font-size: 1.2rem;
    background-color: transparent;
    border-radius: 10px;
    transition: background-color 0.3s ease;
  }

  #nav_links a:hover {
    background-color: var(--secondary-color);
    color: var(--primary-color);
  }

  .nav_container .icon:hover {
    color: var(--secondary-color);
  }

  /* About Me */
  .about_me {
    position: relative;
    top: 1%;
    flex-direction: column;
    gap: 2rem;
    text-align: center;
  }
  .about_me img,
  .about_me_text {
    width: 80%;
  }

  .about_me img {
    width: 70%;
  }

  .cv_heading {
    position: relative;
    left: 10%;
  }

  .cv_container {
    flex-direction: column;
    position: relative;
    width: 80%;
  }

  .cv_entry {
    flex: 1 1 80%;
  }

  /* Projekte */
  .projects {
    position: relative;
    left: 10%;
  }

  .project_entry {
    flex-direction: column;
    text-align: justify;
    gap: 2rem;
    width: 80%;
  }
  .project_text,
  .project_swiper {
    width: 100%;
  }
  .swiper {
    width: 100%;
    height: 35vh;
  }

  .footer_content {
    gap: 2rem;
  }

  .footer_content .right_container,
  .footer_information {
    font-size: clamp(15px, 2.5vw, 35px);
  }

  .footer_content .left_container {
    flex: 2;
  }

  .footer_content .right_container {
    line-height: 2.5;
  }

  button {
    font-size: clamp(8px, 4vw, 40px);
    width: 100%;
  }

  /* Modal Content */
  .modal-content {
    margin: auto;
    padding: 2%;
    width: 80%;
    font-size: clamp(12px, 4vw, 30px);
  }

  .modal-content input {
    min-width: 90%;
    font-size: 18px;
  }

  .modal-content textarea {
    min-width: 100%;
    font-size: 18px;
  }

  .close {
    font-size: 45px;
  }
}

@media (min-width: 900px) {
  .about_me,
  .cv,
  .projects {
    font-size: clamp(8px, 1.6vw, 13px);
  }

  .nav_links a {
    display: block;
  }

  .about_me {
    position: relative;
    top: 1%;
  }

  .footer_content .right_container,
  .footer_information {
    font-size: clamp(4px, 1.8vw, 20px);
  }

  button {
    font-size: clamp(8px, 1.75vw, 20px);
  }

  .swiper {
    max-width: 100%;
    height: 30vh;
  }
}

@media (min-width: 1000px) {
  .about_me,
  .cv,
  .projects {
    font-size: clamp(8px, 1.5vw, 15px);
  }

  .footer_content .right_container,
  .footer_information {
    font-size: clamp(2.5px, 1.4vw, 16px);
  }

  button {
    font-size: clamp(8px, 1.75vw, 22px);
  }

  .swiper {
    max-width: 100%;
    height: 34vh;
  }

  footer {
    min-height: clamp(11vh, 30vh, 35vh);
  }

  .about_me {
    position: relative;
    top: 1%;
  }

  .about_me img {
    width: 40%;
  }
}
@media (min-width: 1100px) {
  .about_me img {
    width: 45%;
  }
}

@media (min-width: 1150px) {
  .about_me,
  .cv,
  .projects {
    font-size: clamp(10px, 1.75vw, 15px);
  }

  .about_me img {
    width: 40%;
  }
}

@media (min-width: 1200px) {
  .about_me,
  .cv,
  .projects {
    font-size: clamp(10px, 1.75vw, 16px);
  }

  .footer_content .right_container,
  .footer_information {
    font-size: clamp(3px, 1.5vw, 16px);
  }

  button {
    font-size: clamp(8px, 1.75vw, 22.5px);
  }

  .swiper {
    max-width: 100%;
    height: 35vh;
  }

  footer {
    min-height: clamp(12vh, 35vh, 40vh);
  }

  .about_me {
    position: relative;
    top: 2%;
  }
}

@media (min-width: 1400px) {
  .about_me,
  .cv,
  .projects {
    font-size: clamp(10px, 1.8vw, 18.5px);
  }

  .footer_content .right_container,
  .footer_information {
    font-size: clamp(8px, 1.85vw, 18.5px);
  }

  button {
    font-size: clamp(10px, 2vw, 23px);
  }

  .swiper {
    max-width: 80%;
    height: 45vh;
  }
}

@media (min-width: 1600px) {
  .about_me,
  .cv,
  .projects {
    font-size: clamp(12px, 2vw, 21px);
  }
}

@media (min-width: 1700px) {
  .about_me,
  .cv,
  .projects {
    font-size: clamp(12px, 2vw, 22px);
  }
}

@media (min-width: 1800px) {
  .about_me,
  .cv,
  .projects {
    font-size: clamp(12px, 2.5vw, 25px);
  }

  .footer_content .right_container,
  .footer_information {
    font-size: clamp(8px, 1.85vw, 28px);
  }

  button {
    font-size: clamp(10px, 2vw, 30px);
  }

  .swiper {
    max-width: 80%;
    height: 45vh;
  }

  footer {
    min-height: clamp(15vh, 40vh, 45vh);
  }
}

@supports (-webkit-touch-callout: none) {
  body #nav_links {
    transform: translateZ(0);
  }
}
