* {
  box-sizing: border-box;
}

body {
  font-family: Hack, monospace;
  margin: 0;
}

.header__container {
  width: 100%;
  text-align: center;
  color: #8F8F8F;
}

.header__span {
  font-size: 12px;
}

.header__name {
  position: relative;
  margin: 16px auto;
  font-size: 50px;
  text-transform: uppercase;
  width: max-content;
}

.nav__container {
  display: flex;
  justify-content: space-between;

  background-color: #F9F9F9;
  padding: 30px;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16);
}

.nav__link {
  position: relative;
  font-size: 20px;
  color: #8F8F8F;
  text-decoration: none;
  text-transform: uppercase;
}

/* hover effect based on https://codepen.io/grohit/pen/jObGzdG */
.header__name::before,
.nav__link::before {
  content: attr(data-fill-animate);
  transition: all 0.5s ease-in-out;
  color: #8254ff;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  width: 0;
  overflow: hidden;
  white-space: nowrap;
}

.header__name:hover::before,
.nav__link:hover::before {
  width: 100%;
}

.section__container {
  width: 100%;
  background-color: #F9F9F9;
  margin-top: 40px;
  padding: 30px;
  font-size: 18px;
  color: #8F8F8F;
  text-align: center;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16);
}

.section__title {
  margin: 0 0 16px 0;
  font-size: 24px;
  color: #8F8F8F;
  text-transform: uppercase;
}

.about__image {
  border-radius: 50%;
}

.about__text,
.project__text {
  margin: 20px 0 0 0;
}



.projects__section,
.project__ring,
.project__cimage {
  position: absolute;
  width:100%;
  height: 100%;
  transform-style: preserve-3d;
  user-select:none;
}

.project__ring.locked {
  pointer-events: none;
}

.projects__section {
  position: relative;
}

.project__container {
  overflow:hidden;
}

.project__carousel {
  display: none;
  position: absolute;
  perspective: 2000px;
  width: 300px;
  height: 400px;  
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  transition: opacity 200ms ease-in-out;
}

.project__carousel.hidden {
  opacity: 0.075;
}


.project__detail {
  position: relative;
  transition: opacity 200ms ease-in-out;
}

.project__close {
  position: absolute;
  top: 0;
  right: 50px;
  display: none;
  pointer-events: none;
  cursor: pointer;

  border: none;
  background: none;
  font-size: 0;
}

.project__image {
  width: 282px;
  height: 400px;
  object-fit: cover;
}

.project__controls {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
}

.project__select-btn {
  background: none;
  border: none;
  opacity: 0.15;
}

.project__select-btn:enabled {
  cursor: pointer;
  opacity: 1;
}

.project__select-btn--prev img {
  transform: rotateY(180deg);
}

.project__link {
  padding: 8px 18px;
  background-color: #8254FF;
  border-radius: 4px;

  font-size: 14px;
  color: #FFFFFF;
  text-decoration: none;
  text-transform: uppercase;
}

.skills__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 25px;

  list-style: none;
  margin: 0;
  padding: 0;
}

.skill__item > a {
  all: unset;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  text-transform: uppercase;
  cursor: pointer;
}

.skill__icon {
  width: 69px;
  filter: grayscale(100%);
  transition: filter 200ms ease-in-out;
}

.skill__icon:hover {
  filter: grayscale(0);
}

.contact__list {
  display: flex;
  justify-content: space-evenly;

  list-style: none;
  margin: 0;
  padding: 0;
}

.contact__item {
  text-decoration: none;
  font-size: 0;
}

.contact__item > img {
  width: 40px;
  height: 40px;
}

.footer__container {
  padding: 10px;
  text-align: center;
}

.nav__container,
.about__section,
.project__detail,
.skills__section,
.contact__section {
  max-width: 810px;
  margin-right: auto;
  margin-left: auto;
}


@media screen and (min-width: 1280px) {
  .nav__container,
  .section__container {
    padding: 50px;
  }

  .about__content {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 50px;
    align-items: center;
  }

  .about__image {
    width: 282px;
  }

  .project__carousel {
    display: initial;
  }

  .project__detail {
    opacity: 0;
    pointer-events: none;
    display: grid;
    column-gap: 50px;
    grid-template-rows: 1fr 40px;
    grid-template-areas: "img text"
                         "img controls";
  }

  .project__detail.show {
    opacity: 1;
    pointer-events: initial;
  }  

  .project__detail.show .project__close {
    display: initial;
    pointer-events: initial;
  }

  .project__image {
    grid-area: img;
  }

  .project__text {
    align-self: center;
    grid-area: text
  }

  .project__controls {
    grid-area: controls;
  }

  .project__detail {
    padding: 0 50px;
  }  

  .skills__list {
    gap: 50px;
  }  

  .skill__icon {
    width: 100px;
  }

  .contact__item > img {
    width: 80px;
    height: 80px;
  }
}