/* Global */
:root {
  /* Color */
  --color-white: #ffffff;
  --color-light-white: #eeeeee;
  --color-dark-white: #bdbdbd;
  --color-pink: #fe918d;
  --color-dark-pink: #ff6863;
  --color-black: #4d4d4d;
  --color-dark-grey: #4d4d4d;
  --color-grey: #616161;
  --color-light-grey: #7c7979;
  --color-blue: #73aace;
  --color-dark-blue: #1980c5;
  --color-yellow: #fff7d1;
  --color-orange: #feb546;
  --color-black: #000000;

  /* Font size */
  --font-large: 36px;
  --font-medium: 28px;
  --font-regular: 18px;
  --font-small: 16px;
  --font-micro: 14px;

  /* Font weight */
  --weight-bold: 700;
  --weight-semi-bold: 600;
  --weight-regular: 400;

  /* Size */
  --size-border-radius: 4px;

  /* Annimation */
  --animation-duration: 300ms;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Open Sans', sans-serif;
  cursor: default;
}

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

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

button {
  cursor: pointer;
  background: transparent;
  outline: none;
  border: none;
}

/* Common */
.section {
  padding: 75px;
  text-align: center;
  margin: auto;
}

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

/* Header */
#header {
  position: fixed;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: transparent;
  padding: 16px;
  z-index: 1;
  transition: all var(--animation-duration) ease;
}

#header.dark {
  background-color: var(--color-dark-blue);
  padding: 8px;
}

.header__logo {
  display: flex;
  align-items: center;
  color: var(--color-white);
}

.header__logo__img {
  width: 24px;
  height: 24px;
  margin-right: 8px;
}

.header__logo__title {
  font-weight: bold;
  margin: 0;
}

.header__menu {
  display: flex;
}

.header__menu__item {
  padding: 8px 12px;
  margin: 0 4px;
  border: 1px solid transparent;
  border-radius: var(--size-border-radius);
}

.header__menu__item.active {
  border: 1px solid var(--color-white);
  background-color: var(--color-blue);
}

.header__menu__item:hover {
  background-color: var(--color-blue);
}

.header__toggle-btn {
  position: absolute;
  top: 21px;
  right: 12px;
  font-size: 24px;
  color: var(--color-white);
  display: none;
}

/* Home */
#home {
  background-color: var(--color-blue);
  text-align: center;
  color: var(--color-white);
  padding: 85px;
}

.home__avatar {
  width: 250px;
  height: 250px;
  border: 3px dashed var(--color-white);
  border-radius: 100%;
  box-shadow: 4px 8px 8px rgba(0, 0, 0, 0.38);
}

.home__title {
  font-size: var(--font-large);
}

.home__description {
  font-size: 18px;
}

.home__contact {
  font-size: 22px;
  padding: 8px 12px;
  border: 2px solid var(--color-white);
  border-radius: 4px;
  color: var(--color-white);
  transition: all 150ms ease;
  box-shadow: 4px 8px 8px rgba(0, 0, 0, 0.38);
}

.home__contact:hover {
  background-color: var(--color-dark-blue);
}

/* About */
.about__title {
  font-size: var(--font-large);
}

.about__majors {
  display: flex;
  justify-content: space-between;
  margin: 40px 0;
}

.major__icon {
  width: 170px;
  height: 170px;
  line-height: 170px;
  font-size: 70px;
  margin: auto;
  color: var(--color-dark-blue);
  border: 3px dashed var(--color-dark-grey);
  border-radius: 100%;
}

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

.major__icon:hover i {
  color: var(--color-dark-pink);
  transform: scale(1.1) rotate(-30deg);
}

.about__jobs {
  text-align: start;
}

.job {
  display: flex;
  align-items: center;
}

.job__description {
  margin: 0px 16px;
}

.job__period,
.job__title {
  margin: 3px;
}

/* Skills */
#skills {
  background-color: var(--color-light-white);
}

.skill__title {
  font-size: var(--font-large);
}

.skillset {
  display: flex;
  background-color: var(--color-grey);
  color: var(--color-white);
  box-shadow: 4px 8px 8px rgba(0, 0, 0, 0.38);
}

.skillset__left {
  flex-basis: 60%;
  padding: 16px;
  background-color: var(--color-dark-grey);
}

.skill {
  margin: 32px;
}

.skill__description {
  display: flex;
  justify-content: space-between;
}

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

.skill__value {
  height: 3px;
  background-color: var(--color-dark-blue);
}

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

.tools {
  background-color: var(--color-grey);
  padding: 1px;
  height: 50%;
}

/* Work */
.work__title {
  font-size: var(--font-large);
}

.work__categories {
  margin: 48px 0;
}

.category__button {
  position: relative;
  font-size: 24px;
  padding: 8px 48px;
  border: 1px solid var(--color-light-grey);
  border-radius: 8px;
  color: var(--color-white);
  background-color: var(--color-blue);
  box-shadow: 4px 8px 8px rgba(0, 0, 0, 0.38);
}

.category__button.selected,
.category__button:hover {
  background-color: var(--color-dark-blue);
}

.category__button.selected .category__count,
.category__button:hover .category__count {
  opacity: 1;
  top: 8px;
}

.category__count {
  position: absolute;
  top: -20px;
  right: 16px;
  display: inline-block;
  width: 24px;
  height: 24px;
  border-radius: 100%;
  background-color: var(--color-orange);
  color: var(--color-white);
  opacity: 0;
  transition: all var(--animation-duration) ease-in-out;
}

.work__projects {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  opacity: 1;
  transition: all var(--animation-duration) ease-out;
}

.work__projects.anim-out {
  opacity: 0;
  transform: scale(0.96) translateY(40px);
}

.project {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 280px;
  height: 250px;
  margin: 2px;
  border-radius: 8px;
  background-color: var(--color-light-white);
  display: block;
  overflow: hidden;
}

.project.invisible {
  display: none;
}

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

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

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

.project__description h3 {
  color: var(--color-orange);
}

.project__description h3::after {
  content: '';
  display: block;
  position: relative;
  left: 50%;
  width: 50px;
  height: 2px;
  transform: translate(-50%, 10px);
  background-color: var(--color-white);
}

/* Testimonials */
#testimonials {
  background-color: var(--color-light-white);
}

.testimonials__title {
  font-size: var(--font-large);
}

.testimonials {
  margin: 40px;
}

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

.testimonial__avatar {
  width: 150px;
  height: 150px;
  border-radius: 100%;
  box-shadow: 4px 8px 8px rgba(0, 0, 0, 0.38);
}

.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);
  box-shadow: 4px 8px 8px rgba(0, 0, 0, 0.38);
}

.testimonial__speech-bubble p {
  color: var(--color-light-grey);
}

.testimonial__speech-bubble a {
  color: var(--color-dark-blue);
}

/* Arrow-up */
#arrow-up {
  position: fixed;
  bottom: 50px;
  right: 50px;
  font-size: 48px;
  width: 70px;
  height: 70px;
  opacity: 0;
  pointer-events: none;
  background-color: var(--color-dark-blue);
  text-align: center;
  border-radius: 100%;
  color: var(--color-white);
  box-shadow: 5px 5px 0px 0px rgb(14, 47, 41);
  transition: opacity var(--animation-duration) ease;
}

#arrow-up.visible {
  opacity: 1;
  pointer-events: all;
}

/* Contact */
#contact {
  background-color: var(--color-dark-blue);
  color: var(--color-white);
}

.contact__title {
  font-size: var(--font-large);
}

.contact__email {
  font-size: var(--font-regular);
}

.contact__links {
  font-size: var(--font-large);
}

.contact__links i:hover {
  color: var(--color-blue);
}

@media screen and (max-width: 768px) {
  :root {
    /* Font size */
    --font-large: 26px;
    --font-medium: 18px;
    --font-regular: 16px;
    --font-small: 14px;
    --font-micro: 12px;
  }

  #header {
    flex-direction: column;
    align-items: flex-start;
    background-color: var(--color-dark-blue);
  }

  #header.dark {
    padding: 16px;
  }

  .header__menu {
    flex-direction: column;
    text-align: center;
    width: 100%;
    gap: 3px;
    display: none;
  }

  .header__menu.open {
    display: block;
  }

  .header__menu__item {
    display: flex;
    justify-content: center;
  }

  .header__toggle-btn {
    display: block;
  }

  #home {
    padding: 65px;
  }

  .home__avatar {
    width: 150px;
    height: 150px;
  }

  .home__contact {
    font-size: 18px;
    padding: 5px 8px;
    border: 2px solid var(--color-white);
  }

  .section {
    padding: 16px;
    padding-top: 40px;
  }

  .about__majors {
    flex-direction: column;
  }

  .about__jobs {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .skillset {
    flex-direction: column;
  }

  .work__categories {
    display: flex;
    flex-direction: column;
  }

  .project {
    flex-grow: 1;
  }

  .testimonial {
    flex-direction: column;
    align-items: center;
  }

  .testimonial__avatar {
    width: 120px;
    height: 120px;
  }

  .testimonial__avatar:nth-child(odd),
  .testimonial__avatar:nth-child(even) {
    margin: 0;
    margin-bottom: 8px;
  }

  .testimonial__speech-bubble {
    order: 1;
  }

  #arrow-up {
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    font-size: 30px;
    box-shadow: 3px 3px 0px 0px rgb(14, 47, 41);
  }
}
