/* Global */

:root {
  /* Color */
  --color-white: #ffffff;
  --color-light-white: #eeeeee;
  --color-dark-white: #bdbdbd;
  --color-green: #5db7b5;
  --color-dark-green: #00867d;
  --color-dark-grey: #4d4d4d;
  --color-grey: #616161;
  --color-light-grey: #7c7979;
  --color-pink: #fe918d;
  --color-blue: #73aace;
  --color-yellow: #fff7d1;
  --color-orange: #feb546;
  --color-black: #000000;

  /* 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;
}

/* Typography */

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

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;
}

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

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

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

ul {
  padding-left: 0;
}

li {
  list-style: none;
}

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

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

#navbar.navbar--dark {
  background-color: #00363a;
  padding: 0 6px;
}

.navbar__menu {
  display: flex;
}

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

.navbar__menu__item {
  padding: 8px 12px;
  margin: 0 4px;
  cursor: pointer;
  border: 1px solid transparent;
}

.navbar__menu__item:hover {
  border: 1px solid white;
  background-color: var(--color-dark-green);
  border-radius: var(--size-border-radius);
  transition: all var(--animation-duration) ease;
}

.navbar__toggle-btn {
  position: absolute;
  top: 20px;
  right: 24px;
  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 {
  color: var(--color-white);
}

.home__contact {
  color: var(--color-white);
  font-size: var(--font-regular);
  font-weight: var(--weight-bold);
  margin: 24px;
  padding: 8px 12px;
  border: 2px solid white;
  border-radius: var(--size-border-radius);
  transition: color, background-color 200ms ease-in;
}

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

/* 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;
  line-height: 170px;
  font-size: 70px;
  margin: auto;
  color: var(--color-blue);
  border: 1px solid var(--color-green);
  border-radius: 50%;
  margin-bottom: 16px;
}

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

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

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

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

.job {
  display: flex;
  align-items: center;
}
.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);
}

.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);
}

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

.skillset__right {
  flex-basis: 40%;
}

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

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

/* Works */

.work__categories {
  margin: 40px;
}

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

.category__btn.selected,
.category__btn:hover {
  background-color: var(--color-green);
  color: var(--color-white);
}

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

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

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

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

.project {
  position: relative;
  width: 280px;
  height: 250px;
  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 {
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: black;
  top: 0;
  left: 0;
  opacity: 0;
  transform: translateY(-10px);
  transition: all var(--animation-duration) ease-in;
}

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

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

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

/* Testimonial */
#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(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(--weight-semi-bold);
}

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

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

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

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

.contact__title {
  margin: 32px 0;
}

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

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

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

/* Scrolling to top */
.arrow-up {
  position: fixed;
  bottom: 50px;
  right: 50px;
  width: 60px;
  height: 60px;
  font-size: 40px;
  color: var(--color-white);
  background-color: var(--color-dark-green);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--animation-duration) 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: 18px;
    --font-regular: 16px;
    --font-small: 14px;
    --font-micro: 12px;
  }
  .navbar__toggle-btn {
    display: block;
    top: 16px;
    right: 16px;
    font-size: var(--font-medium);
  }
  #navbar {
    flex-direction: column;
    align-items: flex-start;
    background-color: #004e5a;
    padding: 15px;
  }

  #navbar.navbar--dark {
    padding: 15px;
    background-color: #004e5a;
  }

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

  .navbar__menu.open {
    display: block;
  }

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

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

  .skillset {
    flex-direction: column;
  }

  .category__btn {
    margin: 4px 0;
    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;
  }

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