/* CSS */
/* STYLING SCROLLBAR */
::-webkit-scrollbar {
  width: 15px;
}

/* Track */
::-webkit-scrollbar-track {
  background: var(--cream);
}

/* Handle */
::-webkit-scrollbar-thumb {
  background: #346d8b;
  background: linear-gradient(
    0deg,
    rgba(52, 109, 139, 1) 0%,
    rgba(245, 231, 222, 1) 50%,
    rgba(36, 114, 101, 1) 100%
  );
  border-radius: 100px;
  border: 2px solid var(--cream);
}

/* Hover effect */
::-webkit-scrollbar-thumb:hover {
  background: #346d8b;
  background: linear-gradient(
    0deg,
    rgb(40, 84, 108) 0%,
    rgb(221, 209, 200) 50%,
    rgb(33, 105, 92) 100%
  );
}

.header {
  width: 100%;
  height: 80px;
  background-color: var(--cream);
  box-shadow: 0 4px 15px 10px rgba(0, 0, 0, 0.25);
  padding: 20px 30px;
  position: fixed;
  z-index: 3;
  transform: translateY(0);
  visibility: visible;
  opacity: 1;
  transition: transform 0.3s linear, opacity 0.5s ease-in-out,
    visibility 0.5s ease-in-out;
}

.hide {
  transform: translateY(-100%);
  visibility: hidden;
  opacity: 0;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.navbar__list {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 50%;
}

.navbar__link {
  text-decoration: none;
  font-family: var(--secondary-font);
  font-size: 1.5rem;
  font-weight: 500;
  position: relative;
  color: var(--blue);
}

.navbar__link:hover {
  color: var(--green);
}

.navbar__link::after {
  content: "";
  position: absolute;
  bottom: -3px;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: var(--green);
  transition: all 0.3s ease-in-out;
  transform: translateX(-50%);
}

.navbar__link:hover::after {
  width: 100%;
}

/* OPEN MOBILE NAVBAR */
.navbar__toggle {
  display: none;
}

/* NAVBAR MOBILE */
.navbar-mobile,
.navbar-mobile__overlay {
  opacity: 0;
  visibility: hidden;
}

.navbar-mobile {
  width: 60%;
  height: 100vh;
  background-color: var(--cream);
  position: fixed;
  top: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 20px;
  box-shadow: 0px 4px 15px 10px rgba(0, 0, 0, 0.6);
  z-index: 3;
  transition: transform 0.4s ease-in-out, opacity 0.5s ease-in-out,
    visibility 0.5s ease-in-out;
  transform: translateX(100%);
}

.navbar-mobile__list {
  display: flex;
  flex-direction: column;
  gap: 30px;
  align-items: flex-end;
  padding: 15px 10px;
}

.navbar-mobile__link {
  text-decoration: none;
  font-size: 1.5rem;
  color: var(--blue);
}

.navbar-mobile__toggle {
  background: none;
  border: none;
  font-size: 2rem;
  padding: 10px;
  color: var(--blue);
}

.navbar-mobile__overlay {
  z-index: 1;
  background-color: rgba(0, 0, 0, 0.4);
  width: 100%;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  transition: opacity 0.4s ease-in-out;
  z-index: 4;
}

/* HOME HERO */
.hero {
  width: 100%;
  height: 100vh;
  background-image: linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0) 70%,
      var(--cream) 100%
    ),
    url("../img/hero-bg.png");
  background-position: top;
  background-repeat: no-repeat;
  background-size: cover;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.2) 75%,
    rgba(255, 255, 255, 0) 100%
  );
  z-index: 1;
}

.hero > * {
  position: relative;
  z-index: 2;
}

.hero__title {
  font-family: var(--primary-font);
  font-size: 4.375rem;
  text-align: center;
  margin-top: 20px;
  color: white;
  border-right: 3px solid white;
  white-space: nowrap;
  overflow: hidden;
  width: 0;
  animation: typing 3s steps(20, end) forwards, blink 0.7s infinite;
}

/* TITLE TYPING ANIMATION */
@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 13ch;
  }
  /*match characters in text*/
}

@keyframes blink {
  50% {
    border-color: transparent;
  }
}

.hero__subtitle {
  font-family: var(--secondary-font);
  font-size: 2rem;
  color: white;
}

.hero__button--projects {
  padding: 15px 30px;
  border: none;
  border-radius: 16px;
  background-color: var(--cream);
  box-shadow: 0px 10px 20px 0px rgba(0, 0, 0, 0.8);
  margin: 20px 0;
  text-decoration: none;
  font-size: 0.85rem;
  font-family: var(--secondary-font);
  font-weight: 600;
  color: var(--blue);
  transition: transform 0.3s ease-in-out;
}

.hero__button--projects:hover {
  transform: scale(1.2);
  color: var(--green);
}

/* ABOUT SECTION */
#featured,
#about,
#skills,
#projects,
#contacts {
  width: 100%;
  height: 80vh;
  background-color: var(--blue);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.featured__title,
.about__title,
.skills__title,
.projects__title,
.contacts__title {
  font-family: var(--primary-font);
  color: var(--cream);
  font-size: 2.5rem;
}

.featured__container,
.about__container,
.skills__main-container {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 5%;
  width: 80%;
  color: var(--cream);
}

.about__photo {
  width: 350px;
  height: 350px;
  object-fit: cover;
  border-radius: 50%;
  outline: 10px double var(--blue);
  outline-offset: -15px;
}

.featured__description,
.about__description {
  font-family: var(--secondary-font);
  font-size: 1.125rem;
  text-align: justify;
  font-weight: 300;
  padding: 20px;
  line-height: 1.8;
}

.about__span--bold {
  color: var(--cream);
  font-weight: 600;
}

/* FEATURED SECTION */
#featured {
  background-color: var(--cream);
  padding: 20px 0;
}

.featured__title {
  color: var(--green);
}

.featured__container-description {
  width: 50%;
  padding: 20px;
}

.featured__description-title {
  font-family: var(--primary-font);
  font-size: 1.75rem;
  margin-bottom: 30px;
}

.featured__description {
  width: 100%;
  padding: 0;
}

.featured__description a {
  color: var(--green);
  font-weight: 700;
  text-decoration: none;
}

.featured__description a:hover {
  text-decoration: underline;
}

.featured__container {
  color: var(--green);
  justify-content: center;
}

/* SKILLS SECTION */
#skills {
  background-color: var(--cream);
  position: relative;
  padding: 30px 0;
}

.skills__title {
  color: var(--blue);
  margin-bottom: 30px;
}

.skills__main-container {
  color: var(--blue);
  justify-content: center;
}

.skills__container {
  border: 5px solid var(--blue);
  border-radius: 10px;
  min-width: 300px;
  max-width: 400px;
  width: 400px;
  height: auto;
  min-height: 500px;
}

.skills__container-title {
  font-family: var(--primary-font);
  font-size: 1.75rem;
  width: 100%;
  text-align: center;
  padding: 20px;
  border-bottom: 5px solid var(--blue);
}

.skills__container-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 20px 50px;
  list-style: disc;
  font-family: var(--secondary-font);
  font-size: 1.125rem;
  gap: 15px;
}

/* SKILLS SECTION BUBBLES */
.skills__bubble {
  position: absolute;
  border-radius: 50%;
  transition: transform 0.3s linear;
}

.skills__bubble--big-blue,
.skills__bubble--big-green {
  background-color: var(--blue);
  width: 185px;
  height: 185px;
  top: -50px;
  left: -50px;
}

.skills__bubble--little-blue,
.skills__bubble--little-green {
  background-color: var(--blue);
  width: 90px;
  height: 90px;
  top: 60%;
  left: 70%;
}

.skills__bubble--little-blue:hover,
.skills__bubble--little-green:hover {
  transform: translatex(-20%);
}

.skills__bubble--big-green {
  background-color: var(--green);
  bottom: -100px;
  top: auto;
  right: 50px;
  left: auto;
}

.skills__bubble--little-green {
  background-color: var(--green);
  top: -90px;
  right: -20px;
  left: auto;
}

/* PROJECTS SECTION */
#projects {
  background-color: var(--green);
}

.projects__title {
  margin-bottom: 30px;
}

.carousel {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  overflow: hidden;
}

.carousel__btn-container {
  display: flex;
  gap: 30px;
  width: 100%;
  justify-content: center;
  padding: 20px 20px 10px 20px;
}

.projects__container {
  display: flex;
  transition: transform 0.6s ease;
}

.carousel__btn {
  width: 50px;
  background-color: var(--cream);
  border: none;
  font-size: 2rem;
  border-radius: 50%;
  cursor: pointer;
  padding: 0.4rem 0.7rem;
  transition: background-color 0.3s;
  color: var(--green);
  transition: transform 0.2s ease-in-out;
}

.carousel__btn:hover {
  background-color: lightgray;
  transform: scale(1.2);
}

.project {
  min-width: 100%;
  background: var(--cream);
  border-radius: 20px;
  padding: 10px;
  height: 400px;
  cursor: pointer;
}

.project__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 15px;
}

.project__main-container {
  height: 100%;
  width: 100%;
  position: relative;
  overflow: hidden;
  border-radius: 15px;
}

.project__container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  box-shadow: 0px 0px 30px rgba(227, 228, 237, 0.37);
  border-radius: 15px;
  padding: 30px;
  gap: 20px;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transform: translateY(100%);
  transition: transform 0.4s ease-in-out, opacity 0.5s ease-in-out,
    visibility 0.5s ease-in-out;
  color: var(--cream);
}

.project:hover .project__container {
  opacity: 1;
  visibility: visible;
  transform: translateY(0%);
}

.project__info {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.project__title {
  font-size: 1.5rem;
  font-family: var(--primary-font);
}

.project__description {
  font-family: var(--secondary-font);
  font-size: 1rem;
  font-weight: 300;
  text-align: justify;
}

.project__tag--container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.project__tag {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
  width: 100px;
  height: 50px;
  padding: 10px;
  border-radius: 10px;
  text-align: center;
  font-family: var(--secondary-font);
  font-size: 0.875rem;
  font-weight: 600;
}

/* CONTACTS SECTION */
.footer {
  height: 200px;
  width: 100%;
  background-color: var(--green);
  position: relative;
  overflow: hidden;
}

#contacts {
  width: 60%;
  height: 500px;
  background-color: var(--cream);
  border-radius: 50%;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  justify-content: flex-start;
  padding: 40px 0;
  gap: 20px;
}

.contacts__title {
  color: var(--blue);
}

.contacts__info {
  display: flex;
  gap: 20px;
  margin-top: 20px;
}

.contacts__social {
  width: 50px;
  transition: transform 0.2s ease-in-out;
}

.contacts__social:hover {
  transform: scale(1.2);
}

/* MEDIA QUERY */
@media screen and (min-width: 1440px) {
  /* NAVBAR */
  .navbar__list {
    width: 50%;
  }

  /* ABOUT SECTION */
  .about__container,
  .featured__container {
    width: 70%;
  }
}

@media screen and (min-width: 2300px) {
  /* NAVBAR */
  .navbar__list {
    width: 30%;
  }

  /* ABOUT SECTION */
  .about__container,
  .featured__container {
    width: 40%;
  }

  /* SKILLS SECTION */
  #skills,
  #projects {
    height: 80vh;
  }
}

@media screen and (max-width: 1080px) {
  /* NAVBAR */
  .navbar__list {
    width: 80%;
  }

  /* ABOUT SECTION */
  #about,
  #featured,
  #skills,
  #projects {
    justify-content: center;
    gap: 50px;
    height: auto;
    padding: 40px 0;
  }

  .about__container,
  .featured__container {
    flex-direction: column;
    gap: 30px;
  }

  .featured__container-description {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  .featured__description {
    text-align: center;
  }

  .featured__description-title {
    text-align: center;
  }
}

@media screen and (max-width: 768px) {
  /* NAVBAR */
  .navbar {
    justify-content: flex-end;
  }

  .navbar__list {
    display: none;
  }

  .navbar__toggle {
    display: block;
    background-color: transparent;
    border: none;
    font-size: 1.5rem;
    z-index: 1;
    color: var(--blue);
  }

  .navbar-mobile.show,
  .navbar-mobile__overlay.show {
    opacity: 1;
    visibility: visible;
  }

  .navbar-mobile.show {
    transform: translateX(0%);
  }

  /* HOME HERO */
  .hero__title {
    font-family: var(--primary-font);
    font-size: 3.5rem;
    text-align: center;
    margin-top: 20px;
    color: white;
    border-right: none;
    white-space: normal;
    overflow: hidden;
    width: 100%;
    animation: none;
  }

  .hero__subtitle {
    font-size: 1.5rem;
  }

  /* FEATURED SECTION */
  .featured__pdf {
    display: none;
  }

  /* ABOUT SECTION */
  #about,
  #featured {
    height: auto;
    padding: 40px 0;
  }

  .about__container,
  .featured__container {
    width: 100%;
  }

  .about__description,
  .featured__description {
    font-size: 1rem;
  }

  .about__photo {
    width: 250px;
    height: 250px;
  }

  /* SKILLS SECTION */
  .skills__main-container {
    flex-direction: column;
    gap: 20px;
  }

  .skills__container {
    width: 300px;
  }

  .skills__bubble {
    display: none;
  }

  /* CONTACTS SECTION */
  #contacts {
    width: 100%;
    gap: 0;
  }

  .contacts__title {
    margin-top: 20px;
  }

  .contacts__social {
    margin-top: 0;
    width: 40px;
  }
}

/* ROTATING SCREEN MOBILE MEDIA QUERY */
@media screen and (max-height: 700px) {
  /* NAVBAR */
  .header {
    height: 60px;
    padding: 15px;
    width: 100%;
  }

  /* ABOUT SECTION */
  #about,
  #featured,
  #skills,
  #projects {
    height: auto;
    padding: 30px;
  }

  .about__container,
  .featured__container {
    width: 80%;
  }

  .about__description,
  .featured__description {
    font-size: 1rem;
  }

  .about__photo {
    width: 250px;
    height: 250px;
  }
}
