/* Global */
:root {
  /* Color */
  --color-white: #ffffff;
  --color-grey-white: #f7f6ee;
  --color-light-grey: #bfbfbf;
  --color-grey: #949494;
  --color-light-pink: #ffdada;
  --color-light-yellow: #fffec3;
  --color-light-orange: #fad665;
  --color-olive-green: #5d9f40;
  --color-black: #000000;
  /* Font Size */
  --font-large: 40px;
  --font-medium: 22px;
  --font-regular: 15px;
  --font-small: 12px;
  --font-micro: 10px;
  /* Font Weight */
  --weight-bold: 700;
  --weight-semi-bold: 600;
  --weight-regular: 400;
  /* Size */
  --size-border-radius: 4px;
  /* Animation Duration */
  --animation-duration: 300ms;
}

/* Universal Tags */
* {
  box-sizing: border-box;
}

body {
  background: url('img/Home_Background.png') center/cover no-repeat;
  margin: 0px;
  font-family: "Audiowide", sans-serif;
  cursor: default;
}

a {
  text-decoration: none;
  color: var(--color-grey);
}

ul {
  list-style: none;
  padding-left: 0px;
}

li {
  list-style: none;
}

span {
  color: var(--color-grey);
}
button {
  background-color: transparent;
  cursor: pointer;
  border: none;
  outline: none;
  color: var(--color-grey);
}

/* Typography */
h1 {
  font-size: var(--font-large);
  font-weight: var(--weight-bold);
  color: var(--color-olive-green);
  margin: 16px 0px;
}

h2 {
  font-size: var(--font-medium);
  font-weight: var(--weight-regular);
  color: var(--color-olive-green);
  margin: 8px 0px;
}

h3 {
  font-size: var(--font-regular);
  font-weight: var(--weight-regular);
  color: var(--color-grey);
  margin: 8px 0px;
}

p {
  font-size: var(--font-regular);
  font-weight: var(--weight-regular);
  color: var(--color-grey);
  margin: 4px 0px;
}

/* Navbar */
#navbar {
  position: fixed;
  margin: 0 0 -20px 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--color-olive-green);
  padding: 16px;
  transition: all var(--animation-duration) ease-in-out;
  z-index: 1;
}

#navbar.navbar--dark {
  background-color: var(--color-black);
  padding: 8px;
  height: 65px;
}

.navbar__menu {
  display: flex;
}

.navbar__logo {
  font-size: var(--font-medium);
  font-weight: var(--weight-semi-bold);
}

.logo {
  position: relative;
  width: 75px;
  height: 75px;
  top: -10px;
  left: -10%;
}

.navbar__menu__item {
  position: relative;
  top: -15px;
  padding: 8px 12px;
  margin: 0px 4px;
  cursor: pointer;
  border-radius: var(--size-border-radius);
}

.navbar__menu__item:hover {
  border: 1px solid var(--color-olive-green);
}

.navbar__toggle-btn {
  position: absolute;
  top: 24px;
  right: 32px;
  font-size: 24px;
  display: none;
}

/* Home */
#home {
  padding: 40px;
  padding-top: 120px;
  text-align: center;
}

.home__avatar {
  width: 250px;
  height: 250px;
  border-radius: 50%;
  border: 2px solid var(--color-white);
}

.home__title {
  font-size: 30px;
  color: var(--color-olive-green);
}

.home__discription {
  color: var(--color-olive-green);
}

.home__contact {
  font-size: var(--font-regular);
  font-weight: var(--weight-bold);
  margin: 24px;
  padding: 8px 12px;
  border-radius: var(--size-border-radius);
  color: var(--color-light-grey);
}
.home__contact:hover {
  border: 2px solid var(--color-light-grey);
}

/* Section common */
.section {
  padding: 50px;
  text-align: center;
  margin: auto;
}

.section__container {
  max-width: 1200px;
  margin: auto;
}

/* About */

.about__majors {
  display: flex;
  justify-content: center; /* Centers horizontally */
  align-items: center; /* Centers vertically if needed */
  flex-wrap: wrap; /* Allows items to wrap in smaller screens */
  margin: 80px 0px;
}

.major {
  /* Add margins for spacing between items if needed */
  width: 250px;
  height: 250px;
  margin: 10px;
}

.major__icon {
  width: 170px;
  height: 170px;
  line-height: 170px;
  font-size: 70px;
  color: var(--color-light-grey);
  margin: auto;
  border: 1px solid var(--color-light-grey);
  border-radius: 50%;
  margin-bottom: 16px;
}

.major__icon i {
  transition: all var(--animation-duration) ease;
}

.major__icon:hover i {
  color: var(--color-light-pink);
  transform: rotate(-15deg) scale(1.2);
}

.about__jobs {
  text-align: center; /* Centers text inside the job descriptions */
  margin: 0 auto; /* Centers the about__jobs div */
  display: flex;
  justify-content: center; /* Centers the job divs horizontally */
  flex-wrap: wrap; /* Allows job divs to wrap on smaller screens */
  gap: 30px;
}

.job__logo {
  width: 135px;
  height: 100px;
  margin: 5px 20px;
}
.job {
  /* Add margins for spacing between job items */
  text-align: center;
  width: 135px;
  height: 100px;
  margin: 5px 20px;
}

.job__discription {
  margin: 5px 20px;
  text-align: left;
}

.job__name,
.job__period {
  color: var(--color-light-grey);
}

.job__name {
  font-size: var(--font-small);
}

.job__period {
  font-size: var(--font-micro)
}

/* Skills */
.skillset {
  display: flex;
  margin: 20px 0px;
}

.skillset__left {
  flex-basis: 60%;
  background-color: var(--color-grey-white);
}

.skill {
  margin-bottom: 8px;
}

.skill__description {
  display: flex;
  justify-content: space-between;
  padding: 20px 40px;
}

.skill__bar {
  width: 100%;
  height: 3px;
  margin: 0px 33px 0px 33px;
  background-color: var(--color-light-grey);
}

.skill__value {
  height: 3px;
  background-color: var(--color-light-orange);
}

.skillset__right {
  flex-basis: 60%;
  background-color: var(--color-grey-white);
}

.tools, .etc {
  padding: 30px;
}

/* Work */

.work__categories {
  margin: 40px;
}
.category__btn {
  border: 1px solid;
  border-radius: var(--size-border-radius);
  font-size: var(--font-regular);
  padding: 8px 48px;
}

.category__btn:hover,
.category__btn.active {
  background-color: var(--color-light-grey);
  color: var(--color-grey-white);
}
.category__brn.active .category__count,
.category__btn:hover .category__count {
  opacity: 1;
  top: 0;
}
.category__count {
  background-color: var(--color-light-orange);
  border-radius: 50%;
  color: var(--color-white);
  width: 18px;
  height: 18px;
  line-height: 18px;
  display: inline-block;
  position: relative;
  top: -20px;
  left: 4px;
  opacity: 0;
  transition: all var(--animation-duration) ease-in;
}

.work__projects {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  opacity: 1;
}

.work__projects.anim-out {
  opacity: 0;
  transform: scale(0.96) translateY(40px);
  transition: all var(--animation-duration) ease-out;
}

.project {
  position: relative;
  width: 280px;
  height: 250px;
  margin: 2px;
  justify-content: center;
  align-items: center;
}

.project.invisible {
  display: none;
}

.project__img {
  max-width: 100%;
  max-height: 100%;
}

.project__description {
  position: absolute;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: var(--color-white);
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background-color: var(--color-black);
  opacity: 0.0;
  transform: translateY(10px);
  transition: all var(--animation-duration) ease-in;
}

.project:hover .project__description {
  opacity: 0.8;
  transform: translateY(0px);
}

.project__description h3:after {
  content: '';
  display: block;
  position: relative;
  left: 50%;
  margin-left: -12px;
  margin-top: 8px;
  width: 25px;
  height: 2px;
  opacity: 0.8;
  background-color: var(--color-grey-white);
}

/* Testimonials */
#testimonials {
  background-color: var(--color-grey-white);
  margin: 35px 35px;
  border-radius: 0.7%;
}

.testimonials {
  margin: 40px;
}

.testimonial {
  display: flex;
  margin: 32px 0px;
}

.testimonial__avatar {
  width: 150px;
  height: 150px;
  border-radius: 50%;
}

.testimonial__avatar:nth-child(odd) {
  margin-right: 40px;
}
.testimonial__avatar:nth-child(even) {
  margin-left: 40px;
}

.testimonial__speech-bubble {
  padding: 18px;
  background-color: var(--color-white);
  border-radius: var(--size-border-radius);
}

/* Contact */
.contact__links {
  font-size: var(--font-medium);
  margin: 15px;
}

.contact__links i:hover {
  transform: scale(1.1);
  color: var(--color-olive-green);
}

@media screen and (max-width: 767px) {
  /* Adjust navbar for mobile view */
  .navbar__toggle-btn {
    display: block;
  }

  #navbar {
    flex-direction: column;
    align-items: center;
    background-color: var(--color-black);
    padding: 16px;
  }

  .navbar__menu {
    flex-direction: column;
    text-align: center;
    width: 100%;
    display: none;
  }

  .navbar__menu.open {
    display: block;
  }

  /* Adjust major sections in About for mobile view */
  .about__majors {
    flex-direction: column;
  }

  .major {
    margin-bottom: 20px;
    width: auto;
  }

  /* Skillset section adjustments */
  .skillset {
    padding: 0; /* Remove any padding that might cause layout issues */
  }

  .skillset__left, .skillset__right {
    padding: 0 10px; /* Add some padding to prevent content from touching the screen edges */
  }

  .skill {
    margin-bottom: 20px; /* Add more space between skill bars */
  }

  .skill__description {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%; /* Ensures the description takes up the full width */
  }

  .skill__bar {
    background-color: var(--color-light-grey);
    height: 20px; /* Set a fixed height for the skill bars */
    width: calc(100% - 50px); /* Subtract width to make room for the percentage */
    margin-right: 10px; /* Ensure there's space between the bar and the percentage */
    position: relative; /* Needed for absolute positioning of child elements */
  }

  .skill__value {
    background-color: var(--color-light-orange);
    width: auto; /* Allow the width to be defined inline based on skill level */
    max-width: 100%; /* Ensure it doesn't extend beyond the bar */
    height: 100%; /* Match the height of the parent */
    position: absolute;
    left: 0;
    top: 0;
    border-radius: var(--size-border-radius);
    display: flex;
    align-items: center; /* Center the percentage text vertically */
    justify-content: center; /* Center the percentage text horizontally */
  }

  .skill__value span {
    position: absolute;
    right: -40px; /* Position the percentage text to the right of the bar */
    top: 0;
    color: var(--color-white); /* Choose a color that contrasts with the skill bar */
  }

  /* Adjust project layout for mobile view */
  .project {
    width: 100%;
    margin: 10px 0;
  }

  /* Testimonial avatar size adjustment */
  .testimonial__avatar {
    width: 80px;
    height: 80px;
  }
}
