*,
*::before,
*::after {
  box-sizing: border-box;
  text-rendering: optimizeLegibility;
}

/* Custom Properties, update these for your own design */

:root {
  --ff-primary: "Nunito", sans-serif;
  --ff-secondary: "Source Code Pro", monospace;

  --fw-reg: 300;
  --fw-bold: 900;

  --clr-light: whitesmoke;
  --clr-dark: #303030;
  --clr-accent: #08fdd8;

  --fs-h1: 3rem;
  --fs-h2: 2.25rem;
  --fs-h3: 1.25rem;
  --fs-body: 1rem;

  --bs: 0.25em 0.25em 0.75em rgba(0, 0, 0, 0.25),
    0.125em 0.125em 0.25em rgba(0, 0, 0, 0.15);

  /*Optional Dark Mode*/
  /* filter: invert(1) hue-rotate(180deg); */
}

@media (min-width: 800px) {
  :root {
    --fs-h1: 4.5rem;
    --fs-h2: 3.75rem;
    --fs-h3: 1.5rem;
    --fs-body: 1.125rem;
  }
}

/* General styles */

html {
  scroll-behavior: smooth;
}

body {
  background: var(--clr-light);
  color: var(--clr-dark);
  margin: 0;
  font-family: var(--ff-primary);
  font-size: var(--fs-body);
  line-height: 1.5;
}

body:not(.user-is-tabbing):focus {
  outline: none;
}

body.user-is-tabbing *:focus {
  outline: 3px solid var(--clr-accent);
  outline-offset: 3px;
}

.intro,
.about-me,
.my-skills {
  padding: 4em 2em;
}

.my-work {
  padding: 4em 0;
}

img {
  display: block;
  max-width: 100%;
}

strong {
  font-weight: var(--fw-bold);
}

/* Buttons */

.btn {
  display: inline-block;
  padding: 0.5em 2.5em;
  background: var(--clr-accent);
  color: var(--clr-dark);
  text-decoration: none;
  cursor: pointer;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: var(--fw-bold);
  transition: transform 200ms ease-in-out;
  border-radius: 5px;
}

.btn:hover {
  transform: scale(1.1);
}

/* Typography */

h1,
h2,
h3 {
  line-height: 1;
  margin: 0;
}

h1 {
  font-size: var(--fs-h1);
}
h2 {
  font-size: var(--fs-h2);
}
h3 {
  font-size: var(--fs-h3);
}

.section__title {
  margin-bottom: 0.25em;
}

.section__title--intro {
  font-weight: var(--fw-reg);
}

.section__title--intro strong {
  display: block;
}

.section__subtitle {
  margin: 0;
  font-size: var(--fs-h3);
}

.section__subtitle--intro,
.section__subtitle--about {
  background: var(--clr-accent);
  padding: 0.25em 1em;
  font-family: var(--ff-secondary);
  margin-bottom: 1em;
}

.section__subtitle--work {
  color: var(--clr-accent);
  font-weight: var(--fw-bold);
  margin-bottom: 2em;
}

.color-primary {
  color: var(--clr-accent);
}

/* navbar */

.navbar {
  display: flex;
  position: sticky;
  justify-content: space-between;
  align-items: center;
  background-color: #444;
  color: white;
  top: 0;
  z-index: 1000;
}

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

.navbar-links {
  height: 100%;
}

.navbar-links ul {
  display: flex;
  margin: 0;
  padding: 1rem;
}

.navbar-links li {
  list-style: none;
}

.navbar-links li a {
  display: block;
  text-decoration: none;
  color: white;
  padding: 0 2rem;
}

.navbar-links a i {
  font-size: 20px;
}

.navbar-links li span {
  display: none;
}
.navbar-links a:hover {
  color: #fff;
}
.navbar-links a:hover > i {
  display: none;
}
.navbar-links a:hover > span {
  display: block;
}

.nav-toggle {
  position: absolute;
  top: 1.3rem;
  right: 1rem;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  display: none;
}

.nav-toggle .bar {
  height: 3px;
  width: 100%;
  background-color: white;
  border-radius: 10px;
}

@media (max-width: 800px) {
  .navbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-toggle {
    display: flex;
    justify-content: space-around;
  }

  .navbar-links {
    display: none;
    width: 100%;
  }

  .navbar-links ul {
    width: 100%;
    flex-direction: column;
  }

  .navbar-links ul li {
    text-align: center;
  }

  .navbar-links ul li a {
    padding: 0.5rem;
  }

  .navbar-links.active {
    display: flex;
  }
}

/*  Intro section  */

.intro {
  position: relative;
}

.intro__img {
  box-shadow: var(--bs);
}

/* .section__subtitle--intro {
  display: inline-block;
} */

@media (min-width: 600px) {
  .intro {
    display: grid;
    width: min-content;
    margin: 0 auto;
    grid-column-gap: 1em;
    grid-template-areas:
      "img title"
      "img subtitle";
    grid-template-columns: min-content max-content;
  }

  .intro__img {
    grid-area: img;
    min-width: 250px;
    position: relative;
    z-index: 2;
  }

  .section__subtitle--intro {
    align-self: start;
    grid-column: -1 / 1;
    grid-row: 2;
    text-align: right;
    position: relative;
    left: -1.5em;
    width: calc(100% + 1.5em);
  }
}

@media (max-width: 800px) {
  .section__subtitle--intro {
    align-self: start;
    grid-column: -1/1;
    grid-row: 3;
    text-align: left;
    left: -0.1em;
    width: 100%;
    grid-column-gap: 1em;
    margin-top: 1em;
  }
}

/*  About me section  */

.about-me {
  max-width: 1000px;
  margin: 0 auto;
}

.pyramid {
  width: 200px;
  height: 200px;
  margin: 0 auto;
  position: relative;
  transform-style: preserve-3d;
}

.side {
  position: absolute;
  width: 0;
  height: 0;
  top: 50px;
  left: 20px;
  border-left: 80px solid transparent;
  border-right: 80px solid transparent;
  border-bottom: 160px solid #ccc;
  transform-origin: 50% 0%;
  animation: spin 8s infinite linear;
}

.back {
  animation-delay: -4s;
}

.right {
  animation-delay: -2s;
}

.left {
  animation-delay: -6s;
}

@keyframes spin {
  0% {
    transform: rotateY(0deg) rotateX(30deg);
    border-bottom-color: #21fddc;
    opacity: 0.8;
  }
  25% {
    transform: rotateY(90deg) rotateX(30deg);
    border-bottom-color: #02eac7;
    opacity: 0.8;
  }
  25.1% {
    opacity: 0.8;
  }
  50% {
    transform: rotateY(180deg) rotateX(30deg);
    border-bottom-color: #02c6a9;
  }
  74.9% {
    opacity: 0.8;
  }
  75% {
    transform: rotateY(270deg) rotateX(30deg);
    border-bottom-color: #01b79c;
    opacity: 0.8;
  }
  100% {
    transform: rotateY(360deg) rotateX(30deg);
    border-bottom-color: #21fddc;
    opacity: 0.8;
  }
}

.pyramid > div:nth-child(1)::after {
  position: absolute;
  content: url(/assets/html.png);
  left: -25px;
  top: 70px;
}

.pyramid > div:nth-child(2)::after {
  position: absolute;
  content: url(/assets/css.png);
  left: -25px;
  top: 70px;
}

.pyramid > div:nth-child(3)::after {
  position: absolute;
  content: url(/assets/js.png);
  left: -25px;
  top: 70px;
}

.pyramid > div:nth-child(4)::after {
  position: absolute;
  content: url(/assets/jsframeworks.png);
  left: -55px;
  top: 70px;
}

@media (min-width: 600px) {
  .about-me {
    display: grid;
    grid-template-columns: 1fr 200px;
    grid-template-areas:
      "title title"
      "subtitle subtitle"
      "text pyramid";
    grid-column-gap: 2em;
  }

  .section__title--about {
    grid-area: title;
  }

  .about-me__body {
    grid-area: text;
  }

  .pyramid {
    grid-area: pyramid;
  }

  .section__subtitle--about {
    grid-column: 1 / -1;
    grid-row: 2;
    position: relative;
    left: -1em;
    width: calc(100% + 2em);
    padding-left: 1em;
    padding-right: calc(200px + 4em);
    grid-area: subtitle;
  }
}

/* My work */

.my-work {
  background-color: var(--clr-dark);
  color: var(--clr-light);
  text-align: center;
}

.portfolio {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  /* grid-template-columns: repeat(2, 1fr); */
  grid-template-rows: auto;
  gap: 40px;
  margin: 2em;
}

.portfolio__item {
  background: var(--clr-accent);
  overflow: hidden;
  cursor: pointer;
  border-radius: 5px;
  position: relative;
  display: flex;
  height: 350px;
}

.portfolio__img {
  /* transition: transform 750ms cubic-bezier(0.5, 0, 0.5, 1), opacity 250ms linear; */
  width: 100%;
  height: 100%;
}

.portfolio__info {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  flex-direction: column;
  color: var(--clr-dark);
  padding: 0 0.5em;
  position: absolute;
  overflow: hidden;
  bottom: 0;
  left: 0;
  background: var(--clr-accent);
  transition: all 0.3s cubic-bezier(0.5, 0, 0.5, 1);
  z-index: 2;
  height: 40px;
}

.portfolio__item:hover .portfolio__info {
  width: 100%;
  height: 100%;
  left: 0;
  bottom: 0;
}

.portfolio__info .portfolio__header {
  font-size: var(--fs-h3);
  padding: 0.3em 0;
  font-weight: 600;
}

.portfolio__content {
  text-align: justify;
  padding: 1em 0;
}

.portfolio__links {
  padding: 0.5em 0;
  width: 100%;
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.portfolio__link {
  text-decoration: none;
  font-size: 32px;
}

/* skills */

.my-skills {
  background-color: var(--clr-light);
  color: var(--clr-dark);
  text-align: center;
}

.dev__univ {
  position: relative;
  height: 600px;
  -webkit-transition: all 0.09s ease-in;
  -moz-transition: all 0.09s ease-in;
  -o-transition: all 0.09s ease-in;
  transition: all 0.09s ease-in;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(180deg, #000000, #000033);
}

.star {
  animation-name: flicker;
  animation-timing-function: ease-in-out;
  animation-direction: alternate;
  animation-iteration-count: infinite;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  opacity: 1;
}

@keyframes flicker {
  0% {
    opacity: 1;
  }

  50% {
    opacity: 0.25;
  }

  100% {
    opacity: 1;
  }
}

.dev__univ .star:nth-child(40) {
  animation-delay: 2.33333333s;
  animation-duration: 1.33333333s;
  left: 4vw;
  top: 32vh;
  height: 0.2rem;
  width: 0.2rem;
}

.dev__univ .star:nth-child(39) {
  animation-delay: 3s;
  animation-duration: 3s;
  left: 84vw;
  top: 50vh;
  height: 0.25rem;
  width: 0.25rem;
}

.dev__univ .star:nth-child(38) {
  animation-delay: 1.33333333s;
  animation-duration: 4s;
  left: 82vw;
  top: 35vh;
  height: 0.15rem;
  width: 0.15rem;
}

.dev__univ .star:nth-child(37) {
  animation-delay: 2.25s;
  animation-duration: 2s;
  left: 73vw;
  top: 31vh;
  height: 0.25rem;
  width: 0.25rem;
}

.dev__univ .star:nth-child(36) {
  animation-delay: 4s;
  animation-duration: 1s;
  left: 41vw;
  top: 48vh;
  height: 0.15rem;
  width: 0.15rem;
}

.dev__univ .star:nth-child(35) {
  animation-delay: 0.33333333s;
  animation-duration: 0.33333333s;
  left: 4vw;
  top: 50vh;
  height: 0.15rem;
  width: 0.15rem;
}

.dev__univ .star:nth-child(34) {
  animation-delay: 4s;
  animation-duration: 1s;
  left: 100vw;
  top: 11vh;
  height: 0.25rem;
  width: 0.25rem;
}

.dev__univ .star:nth-child(33) {
  animation-delay: 8s;
  animation-duration: 1s;
  left: 18vw;
  top: 35vh;
  height: 0.25rem;
  width: 0.25rem;
}

.dev__univ .star:nth-child(32) {
  animation-delay: 1s;
  animation-duration: 1s;
  left: 50vw;
  top: 55vh;
  height: 0.15rem;
  width: 0.15rem;
}

.dev__univ .star:nth-child(31) {
  animation-delay: 2.33333333s;
  animation-duration: 1.5s;
  left: 80vw;
  top: 11vh;
  height: 0.25rem;
  width: 0.25rem;
}

.dev__univ .star:nth-child(30) {
  animation-delay: 0.16666667s;
  animation-duration: 1.33333333s;
  left: 57vw;
  top: 46vh;
  height: 0.2rem;
  width: 0.2rem;
}

.dev__univ .star:nth-child(29) {
  animation-delay: 0.83333333s;
  animation-duration: 0.33333333s;
  left: 38vw;
  top: 56vh;
  height: 0.15rem;
  width: 0.15rem;
}

.dev__univ .star:nth-child(28) {
  animation-delay: 2.5s;
  animation-duration: 1s;
  left: 13vw;
  top: 45vh;
  height: 0.15rem;
  width: 0.15rem;
}

.dev__univ .star:nth-child(27) {
  animation-delay: 3s;
  animation-duration: 0.5s;
  left: 73vw;
  top: 52vh;
  height: 0.25rem;
  width: 0.25rem;
}

.dev__univ .star:nth-child(26) {
  animation-delay: 0.75s;
  animation-duration: 1s;
  left: 18vw;
  top: 80vh;
  height: 0.25rem;
  width: 0.25rem;
}

.dev__univ .star:nth-child(25) {
  animation-delay: 0.77777778s;
  animation-duration: 2s;
  left: 75vw;
  top: 30vh;
  height: 0.15rem;
  width: 0.15rem;
}

.dev__univ .star:nth-child(24) {
  animation-delay: 1s;
  animation-duration: 1s;
  left: 45vw;
  top: 50vh;
  height: 0.15rem;
  width: 0.15rem;
}

.dev__univ .star:nth-child(23) {
  animation-delay: 2s;
  animation-duration: 3s;
  left: 5vw;
  top: 56vh;
  height: 0.25rem;
  width: 0.25rem;
}

.dev__univ .star:nth-child(22) {
  animation-delay: 0.16666667s;
  animation-duration: 2s;
  left: 61vw;
  top: 35vh;
  height: 0.15rem;
  width: 0.15rem;
}

.dev__univ .star:nth-child(21) {
  animation-delay: 2s;
  animation-duration: 0.5s;
  left: 60vw;
  top: 32vh;
  height: 0.15rem;
  width: 0.15rem;
}

.dev__univ .star:nth-child(20) {
  animation-delay: 0.42857143s;
  animation-duration: 2s;
  left: 83vw;
  top: 55vh;
  height: 0.25rem;
  width: 0.25rem;
}

.dev__univ .star:nth-child(19) {
  animation-delay: 1.11111111s;
  animation-duration: 1s;
  left: 53vw;
  top: 23vh;
  height: 0.2rem;
  width: 0.2rem;
}

.dev__univ .star:nth-child(18) {
  animation-delay: 0.75s;
  animation-duration: 1.33333333s;
  left: 72vw;
  top: 20vh;
  height: 0.15rem;
  width: 0.15rem;
}

.dev__univ .star:nth-child(17) {
  animation-delay: 8s;
  animation-duration: 4s;
  left: 80vw;
  top: 44vh;
  height: 0.15rem;
  width: 0.15rem;
}

.dev__univ .star:nth-child(16) {
  animation-delay: 1s;
  animation-duration: 4s;
  left: 31vw;
  top: 35vh;
  height: 0.15rem;
  width: 0.15rem;
}

.dev__univ .star:nth-child(15) {
  animation-delay: 1.5s;
  animation-duration: 2s;
  left: 23vw;
  top: 43vh;
  height: 0.15rem;
  width: 0.15rem;
}

.dev__univ .star:nth-child(14) {
  animation-delay: 0.16666667s;
  animation-duration: 0.66666667s;
  left: 16vw;
  top: 54vh;
  height: 0.15rem;
  width: 0.15rem;
}

.dev__univ .star:nth-child(13) {
  animation-delay: 2s;
  animation-duration: 1.33333333s;
  left: 90vw;
  top: 93vh;
  height: 0.15rem;
  width: 0.15rem;
}

.dev__univ .star:nth-child(12) {
  animation-delay: 0.66666667s;
  animation-duration: 4s;
  left: 65vw;
  top: 58vh;
  height: 0.15rem;
  width: 0.15rem;
}

.dev__univ .star:nth-child(11) {
  animation-delay: 0.5s;
  animation-duration: 2s;
  left: 42vw;
  top: 36vh;
  height: 0.15rem;
  width: 0.15rem;
}

.dev__univ .star:nth-child(10) {
  animation-delay: 0.71428571s;
  animation-duration: 1s;
  left: 64vw;
  top: 2vh;
  height: 0.25rem;
  width: 0.25rem;
}

.dev__univ .star:nth-child(9) {
  animation-delay: 3s;
  animation-duration: 3s;
  left: 46vw;
  top: 48vh;
  height: 0.25rem;
  width: 0.25rem;
}

.dev__univ .star:nth-child(8) {
  animation-delay: 0.375s;
  animation-duration: 3s;
  left: 10vw;
  top: 53vh;
  height: 0.2rem;
  width: 0.2rem;
}

.dev__univ .star:nth-child(7) {
  animation-delay: 1s;
  animation-duration: 0.33333333s;
  left: 87vw;
  top: 47vh;
  height: 0.15rem;
  width: 0.15rem;
}

.dev__univ .star:nth-child(6) {
  animation-delay: 2.66666667s;
  animation-duration: 3s;
  left: 91vw;
  top: 45vh;
  height: 0.25rem;
  width: 0.25rem;
}

.dev__univ .star:nth-child(5) {
  animation-delay: 0.5s;
  animation-duration: 1.5s;
  left: 63vw;
  top: 43vh;
  height: 0.15rem;
  width: 0.15rem;
}

.dev__univ .star:nth-child(4) {
  animation-delay: 8s;
  animation-duration: 3s;
  left: 73vw;
  top: 36vh;
  height: 0.15rem;
  width: 0.15rem;
}

.dev__univ .star:nth-child(3) {
  animation-delay: 1.42857143s;
  animation-duration: 1s;
  left: 85vw;
  top: 16vh;
  height: 0.15rem;
  width: 0.15rem;
}

.dev__univ .star:nth-child(2) {
  animation-delay: 0.75s;
  animation-duration: 2s;
  left: 34vw;
  top: 24vh;
  height: 0.2rem;
  width: 0.2rem;
}

.dev__univ .star:nth-child(1) {
  animation-delay: 0.375s;
  animation-duration: 1s;
  left: 33vw;
  top: 34vh;
  height: 0.15rem;
  width: 0.15rem;
}

.dev__skills {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: absolute;
  bottom: -100px;
}

.dev__univ .rocket {
  animation: animate 0.2s ease infinite;
  position: absolute;
  left: 48%;
  bottom: 20em;
}

.dev__univ .rocket::before {
  content: "";
  background: linear-gradient(#00ddff, transparent);
  width: 10px;
  height: 200px;
  bottom: -199px;
  position: absolute;
  filter: blur(5px);
}

.dev__univ .rocket img {
  padding-left: 0.5em;
}

.dev__univ a {
  text-decoration: none;
}

.dev__skills a span {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.skill__title {
  color: var(--clr-light);
  font-size: var(--fs-h3);
  text-align: center;
}

.dev__skills a:nth-child(1) {
  animation-delay: 2s;
}
.dev__skills a:nth-child(2) {
  animation-delay: 1s;
}
.dev__skills a:nth-child(3) {
  animation-delay: 3s;
}
.dev__skills a:nth-child(4) {
  animation-delay: 4s;
}
.dev__skills a:nth-child(5) {
  animation-delay: 2s;
}
.dev__skills a:nth-child(6) {
  animation-delay: 5s;
}
.dev__skills a:nth-child(7) {
  animation-delay: 4s;
}
.dev__skills a:nth-child(8) {
  animation-delay: 1s;
}
.dev__skills a:nth-child(9) {
  animation-delay: 6;
}
.dev__skills a:nth-child(10) {
  animation-delay: 3s;
}
.dev__skills a:nth-child(11) {
  animation-delay: 5s;
}
.dev__skills a:nth-child(12) {
  animation-delay: 2s;
}

@media (max-width: 850px) {
  .dev__skills {
    justify-content: flex-start;
    flex-direction: column;
  }

  .dev__skills a span {
    flex-direction: row;
    padding: 0.5em 1em;
  }

  .dev__skills > a {
    animation: launch-res 7s linear 0s infinite !important;
  }

  @keyframes launch-res {
    0% {
      transform: translateY(80vh);
      opacity: 1;
    }

    10% {
      opacity: 1;
    }

    100% {
      transform: translateY(-80vh);
      opacity: 1;
    }
  }

  .dev__skills .rocket {
    display: none;
  }
}
/* Animations*/

@keyframes animate {
  0% {
    transform: translateY(-2px);
  }
  50% {
    transform: translateY(2px);
  }
}

.dev__skills a {
  animation-iteration-count: infinite;
  animation-timing-function: linear;
  animation-name: launch;
  animation-duration: 4s;
}

.dev__skills a:hover {
  animation-play-state: paused;
}

@keyframes launch {
  0% {
    transform: translateY(-90vh);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  70% {
    opacity: 1;
  }
  100% {
    transform: translateY(0);
    opacity: 0;
  }
}

/* footer */

.footer {
  background: #111;
  color: var(--clr-accent);
  text-align: center;
  padding: 2.5em 0;
  font-size: var(--fs-h3);
}

.footer a {
  color: inherit;
  text-decoration: none;
}

.footer__link {
  font-weight: var(--fw-bold);
}

.footer__link:hover,
.social-list__link:hover {
  opacity: 0.7;
}

.footer__link:hover {
  text-decoration: underline;
}

.social-list {
  list-style: none;
  display: flex;
  justify-content: center;
  /* margin: 2em 0 0; */
  padding: 0;
}

.social-list__item {
  margin: 0 0.5em;
}

.social-list__link {
  padding: 0.5em;
}

.footer__msg {
  font-weight: 900;
  padding: 0 0.5em;
}
