/* Global */
:root {
  /* App Colors */
  --color-primary: var(--color-black);
  --color-primary-variant: var(--color-gray);
  --color-accent: var(--color-blue);
  --color-accent-variant: var(--color-orange);
  --color-text: var(--color-white);

  /* Colors */
  --color-white: #ffffff;
  --color-black: #050a13;
  --color-blue: #03e8f9;
  --color-orange: #fd6413;
  --color-gray: #1b1e26;

  /* Size */
  --size-max-width: 1200px;
}

* {
  box-sizing: border-box;
}

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

h1,
h2,
h3,
p,
ul {
  margin: 0;
}

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

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

button {
  background-color: transparent;
  outline: 0;
  border: 0;
}

button:focus {
  outline: 1px solid transparent;
}

/* Common */
.section {
  padding: 4rem;
  text-align: center;
}

.title {
  font-size: 2.5rem;
  margin: 1rem 0;
}

.description {
  font-size: 1.5rem;
  margin: 0.5rem 0;
}

.max-container {
  max-width: var(--size-max-width);
  margin: auto;
}

/* Header */
.header {
  background-color: transparent;
  position: fixed;
  top: 0;
  width: 100%;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1;
  transition: all 300ms ease-in;
}

.header--dark {
  box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
  background-color: var(--color-primary);
}

.header__logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header__logo__img {
  width: 36px;
  height: 36px;
}

.header__logo__title {
  font-size: 1.8rem;
}

.header__toggle {
  display: none;
  color: white;
  font-size: 1.5rem;
  position: absolute;
  top: 1.3rem;
  right: 1rem;
}

.header__menu {
  display: flex;
  gap: 4px;
}

.header__menu__item {
  display: block;
  padding: 8px 16px;
  border-bottom: 1px solid transparent;
}

.header__menu__item:hover {
  border-bottom: 1px solid var(--color-accent);
}

.header__menu__item.active {
  border: 1px solid var(--color-accent);
  border-radius: 4px;
}

/* Home */
#home {
  background-color: var(--color-primary);
  color: var(--color-text);
  padding: 5rem 1rem;
  padding-top: 7rem;
  text-align: center;
}

.home__avatar {
  width: 250px;
  height: 250px;
  object-fit: cover;
  border-radius: 100%;
  border: 3px solid var(--color-accent);
}

.home__title {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.home__title--strong {
  color: var(--color-accent);
}

.home__description {
  font-size: 1.3rem;
}

.home__contact {
  display: inline-block;
  background-color: var(--color-accent);
  color: var(--color-black);
  padding: 0.5rem 1rem;
  margin: 2rem;
  font-weight: bold;
  border-radius: 4px;
}

.home__contact:hover {
  background-color: transparent;
  color: var(--color-text);
  outline: 2px solid var(--color-accent);
}

/* About */
.majors {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 2.5rem 0;
}

.major {
  background-color: var(--color-primary-variant);
  padding: 2rem 1rem;
  color: var(--color-text);
  border-radius: 1rem;
  cursor: default;
  box-shadow: 0 3px 10px rgb(0, 0, 0, 1);
  flex: 1;
}

.major__icon {
  font-size: 4rem;
  margin: 1rem 0;
  color: var(--color-accent);
  transition: all 300ms ease;
}

.major__title {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.major:hover .major__icon {
  transform: rotate(-15deg) scale(1.2);
}

.schools {
  text-align: start;
}

.school {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 1rem;
}

.school__name {
  color: var(--color-primary);
}

.school__period {
  color: var(--color-primary);
  font-size: 0.8rem;
}

.school__logo {
  width: 5rem;
  height: auto;
}

/* Skills */
#skills {
  background-color: var(--color-primary-variant);
  color: var(--color-text);
}

.skills {
  display: grid;
  grid-template-columns: 6fr 4fr;
  margin: 2rem 3rem;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2.8px 2.2px rgba(0, 0, 0, 0.034),
    0 6.7px 5.3px rgba(0, 0, 0, 0.048), 0 12.5px 10px rgba(0, 0, 0, 0.06),
    0 22.3px 17.9px rgba(0, 0, 0, 0.072), 0 41.8px 33.4px rgba(0, 0, 0, 0.086),
    0 100px 80px rgba(0, 0, 0, 0.12);
}

.skills__title {
  color: var(--color-accent);
  margin: 1rem 0;
  font-size: 1.2 rem;
}

.skills__coding {
  grid-row: span 2;
  padding: 1rem;
  background-color: var(--color-primary);
}

.skills__tools {
  padding: 1rem;
}

.skills__etc {
  padding: 1rem;
  background-color: var(--color-primary);
  filter: brightness(150%);
}

.bar {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  gap: 0.5rem;
}

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

.bar__bg {
  width: 100%;
  height: 3px;
  background-color: var(--color-primary-variant);
}

.bar__value {
  height: 3px;
  background-color: var(--color-accent);
}

/* Work */
#work {
  background-color: var(--color-primary);
  color: var(--color-text);
}

.categories {
  display: flex;
  justify-content: center;
  margin: 2.5rem;
  gap: 1rem;
}

.category {
  position: relative;
  color: var(--color-text);
  font-size: 1.1rem;
  padding: 0.5rem 3rem;
  border-radius: 5px;
  border: 1px solid var(--color-accent);
  cursor: pointer;
  white-space: nowrap;
}

.category--selected {
  background-color: var(--color-accent);
  color: var(--color-primary);
}

.category__count {
  opacity: 0;
  position: absolute;
  top: -20px;
  right: 16px;
  width: 28px;
  height: 28px;
  line-height: 28px;
  border-radius: 100%;
  background-color: var(--color-accent-variant);
  color: var(--color-text);
  transition: all 250ms ease-in;
}

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

.projects {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 200px;
  gap: 1rem;
}

.project {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  height: 100%;
}

.project__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background-color: var(--color-primary-variant);
}

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

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

.project__title:after {
  content: '';
  display: block;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  margin: 0.5rem 0;
  width: 50px;
  height: 2px;
  background-color: var(--color-accent);
}

/* Education */
.educations {
  margin: 3rem;
}

.education {
  display: flex;
  gap: 2rem;
  align-items: center;
  margin-bottom: 2rem;
}

.education:nth-child(even) .education__img {
  order: 1;
}

.education__img {
  width: auto;
  height: 100px;
  border-radius: 10px;
  box-shadow: rgba(6, 24, 44, 0.4) 0px 0px 0px 2px,
    rgba(6, 24, 44, 0.65) 0px 4px 6px -1px,
    rgba(255, 255, 255, 0.08) 0px 1px 0px inset;
}

.education__bubble {
  padding: 1rem;
  border-radius: 8px;
  box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
}

.education__bubble__name {
  color: var(--color-accent);
  font-weight: bold;
  filter: brightness(70%);
}

.education__logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

/* Arrow up */
.arrow-up {
  background-color: var(--color-primary);
  position: fixed;
  bottom: 3rem;
  right: 3rem;
  font-size: 3rem;
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 100%;
  text-align: center;
  box-shadow: 0px 0px 3px 5px var(--color-accent);
  transition: opacity 300ms ease-in;
}

/* Footer */
#contact {
  background-color: var(--color-primary);
  color: var(--color-text);
}

.contact__links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding: 1rem;
  font-size: 2rem;
}

.contact__link {
  transition: color 250ms ease-in;
}

.contact__link:hover {
  color: var(--color-accent);
}

@media screen and (max-width: 768px) {
  .section {
    padding: 4rem 2rem;
  }

  .title {
    font-size: 2rem;
  }

  .description {
    font-size: 1rem;
  }

  .header {
    flex-direction: column;
    align-items: start;
    background-color: var(--color-primary);
  }

  .header__toggle {
    display: block;
  }

  .header__menu {
    display: none;
    flex-direction: column;
    text-align: center;
    margin: 1rem 4rem;
    gap: 1rem;
  }

  .header__menu.open {
    display: flex;
  }

  .header__nav {
    width: 100%;
  }

  #home {
    padding-bottom: 3rem;
  }

  .home__title {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
  }

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

  .major {
    min-width: 25rem;
  }

  .job {
    justify-content: center;
  }

  .skills {
    grid-template-columns: 1fr;
  }

  .categories {
    flex-direction: column;
  }

  .category {
    width: 100%;
  }

  .projects {
    grid-template-columns: repeat(2, 1fr);
  }

  .education {
    flex-direction: column;
  }

  .education:nth-child(even) .education__img {
    order: 0;
  }
}
