/* Global */

:root {
  /* Color */
  --color-white: #ffffff;
  --color-light-white: #eeeeee;
  --color-dark-white: #bdbdbd;
  --color-pink: #fe918d;
  --color-dark-pink: #ff6863;
  --color-dark-grey: #4d4d4d;
  --color-grey: #616161;
  --color-light-grey: #7c7979;
  --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: 0.2;
}

/* 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: 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;
  z-index: 1;
}

#navbar.navbar--dark {
  background-color: var(--color-grey);
  height: 70px;
  padding: 16px;
}

.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: 1px solid transparent;
  border-radius: var(--size-border-radius);
}

.navbar__menu__item:hover {
  border: var(--color-white);
}

.navbar__menu__item:hover {
  background-color: var(--color-light-grey);
}

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

/* Home */
#home {
  background-color: var(--color-grey);
  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 var(--color-white);
  border-radius: var(--size-border-radius);
}

/* 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-blue);
  border-radius: 50%;
  margin-bottom: 16px;
}

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

.major__description {
  font-size: var(--font-small);
  max-width: 180px;
}

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

.job__description {
  margin: 0 16px;
  text-align: left;
}

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

.job__period {
  color: var(--color-light-grey);
  font-size: var(--font-micro);
}

.job__logo {
  min-width: 90px;
  max-width: 90px;
}

/* Work */
.work__projects {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

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

.project__image {
  max-width: 100%;
  max-height: 100px;
}

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

.project:hover .project__description {
  opacity: 0.8;
}

.project__description h3 {
  color: var(--color-white);
  transform: translateY(0px);
}

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

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

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

.contact__title {
  margin: 32px 0;
}

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

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

/* For below 768px screen width */
@media screen and (max-width: 768px) {
  .navbar__toggle-btn {
    display: block;
  }

  #navbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .major__description {
    max-width: 100%;
  }

  .navbar__menu {
    flex-direction: column;
    background-color: var(--color-grey);
    text-align: center;
    width: 100%;
    display: none;
  }

  .about__majors {
    flex-direction: column;
  }

  .major {
    margin-bottom: 38px;
  }

  .navbar__menu.open {
    display: block;
  }

  .project {
    flex-grow: 1;
  }
}
