/* Global */
:root {
  /* Color */
  --color-white: #fff;
  --color-light-white: #eee;
  --color-dark-white: #bdbdbd;
  --color-pink: #fe918d;
  --color-dark-pink: #ff6863;
  --color-black: #000;
  --color-dark-grey: #4d4d4d;
  --color-grey: #616161;
  --color-light-grey: #7c7979;
  --color-light-blue: #73aace;
  --color-blue: #2f81f2;
  --color-dark-blue: #1874f0;
  --color-yellow: #fff7d1;
  --color-orange: #feb546;
  --color-dark-orange: #ff9812;

  /* Font size */
  --font-large: 48px;
  --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;

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

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

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

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

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

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

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

h2 {
  font-size: var(--font-medium);
  font-weight: var(--weight-semi-bold);
  color: var(--color-black);
  margin: 8px 0;
}

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

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

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

#navbar.navbar--dark {
  background-color: var(--color-orange);
}

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

.navbar__menu {
  display: flex;
}

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

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

.navbar__menu__item:hover {
  border: 1px solid var(--color-white);
  background-color: var(--color-dark-orange);
}

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

/* Home */
#home {
  background: url("imgs/home-background.png") center/cover no-repeat;
  padding: 40px;
  padding-top: 120px;
  text-align: center;
}

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

.home__title,
.home__description,
.home__description p {
  color: var(--color-white);
}

.home__contact {
  color: var(--color-white);
  font-size: var(--font-regular);
  font-weight: var(--weight-regular);
  margin: 24px;
  padding: 8px 12px;
  border: 2px solid var(--color-white);
  border-radius: var(--size-border-radius);
  transition: all var(--animation-duration) ease-out;
}

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

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

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

/* About */
.about__majors {
  display: flex;
  justify-content: space-between;
  margin: 80px 0;
}

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

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

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

.major__title,
.major__description {
  margin: 0 auto;
  color: var(--color-dark-grey);
}

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

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

.job img {
  width: 50px;
}

.job__description {
  margin: 0 16px;
  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 */
#skills {
  background-color: var(--color-yellow);
}

.skillset {
  display: flex;
  background-color: var(--color-light-grey);
  color: var(--color-light-white);
  margin: 20px 0;
}

.skillset__title {
  color: var(--color-white);
}

.tools ul.tools__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.tools ul.tools__list li {
  margin: 8px;
}

.tools ul.tools__list li img {
  transition: all var(--animation-duration) ease;
}

.tools ul.tools__list li img:hover {
  transform: rotate(-30deg) scale(1.2);
}

.etc ul.etc__list {
  text-align: left;
}

.etc ul.etc__list li {
  margin-bottom: 4px;
  padding: 4px 8px;
  display: inline-block;
  border-radius: 8px;
  background: var(--color-orange);
  color: var(--color-white);
  font-size: var(--font-micro);
  transition: all var(--animation-duration) ease-in-out;
}

.etc ul.etc__list li:hover {
  background: var(--color-dark-orange);
  transform: scale(1.1);
}

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

.skill {
  margin-bottom: 32px;
}

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

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

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

.skillset__right {
  flex-basis: 40%;
}

.tools {
  background-color: var(--color-grey);
}

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

/* Work */
.work__categories {
  margin: 40px;
}

.categories__btn {
  border: 1px solid var(--color-dark-white);
  border-radius: var(--size-border-radius);
  font-size: var(--font-regular);
  padding: 8px 48px;
  position: relative;
}

.categories__btn.selected,
.categories__btn:hover {
  background-color: var(--color-blue);
  color: var(--color-white);
}

.categories__btn.selected .category__count,
.categories__btn:hover .category__count {
  opacity: 1;
  top: 0;
}

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

.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.9) translateY(40px);
}

.project {
  position: relative;
  width: 280px;
  height: auto;
  margin: 2px;
  background-color: var(--color-light-white);
  display: flex;
  justify-content: center;
  align-items: center;
}

.project.invisible {
  display: none;
}

.project img {
  max-width: 100%;
  /* max-height: 100%; */
}

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

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

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

.project__description h3:after {
  content: "";
  width: 50px;
  height: 2px;
  background-color: var(--color-white);
  display: block;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 8px;
}

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

.testimonials {
  margin: 40px;
}

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

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

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

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

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

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

.testimonial__speech-bubble p.name {
  font-weight: bold;
  margin-top: 16px;
  margin-bottom: 8px;
}

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

.testimonial__speech-bubble a:hover {
  color: var(--color-orange);
}

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

.contact__title,
.contact__email,
.contact__links,
.contact__rights {
  color: var(--color-white);
}

.contact__title {
  margin: 32px 0;
}

.contact__links {
  font-size: var(--font-large);
  margin: 24px 0;
}

.contact__email a,
.contact__links i {
  transition: all var(--animation-duration) ease;
}

.contact__email a:hover,
.contact__links i:hover {
  transform: scale(1.1);
  color: var(--color-orange);
}

/* Scroll */
.arrow-up {
  position: fixed;
  bottom: 50px;
  right: 50px;
  width: 70px;
  height: 70px;
  font-size: 50px;
  color: var(--color-white);
  background-color: var(--color-orange);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease-in;
}

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

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

  .navbar__toggle-btn {
    display: block;
    font-size: var(--font-medium);
    top: 18px;
    right: 18px;
  }

  #navbar {
    flex-direction: column;
    align-items: flex-start;
    background-color: var(--color-orange);
  }

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

  .navbar__menu.open {
    display: block;
  }

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

  .home__description {
    font-size: var(--font-medium);
  }

  .about__majors {
    flex-direction: column;
    margin-top: 30px;
    margin-bottom: 0;
  }

  .major {
    margin-bottom: 30px;
  }

  .skillset {
    flex-direction: column;
  }

  .categories__btn {
    margin: 4px;
    width: 100%;
  }

  .project {
    flex-grow: 1;
  }

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

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

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

  .testimonial__speech-bubble {
    order: 1;
  }

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

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

  .arrow-up {
    width: 50px;
    height: 50px;
    font-size: 30px;
    line-height: 50px;
    right: 16px;
    bottom: 16px;
  }
}
