/* VARIABLES, DEFAULTS, RESETS */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  border: 0;
  outline: 0;
  text-decoration: none;
  list-style: none;
  scroll-behavior: smooth;
}

:root {
  --color-primary: #6c63ff;
  --color-danger: #ff589b;
  --color-white: #fff;
  --color-light: rgba(255, 255, 255, 0.8);
  --color-black: #131313;
  --color-bg: #1f2641;
  --color-bg1: #2e3267;
  --color-bg2: #424890;

  --container-width-lg: 76%;
  --container-width-md: 90%;
  --container-width-sm: 94%;

  --transition: all 400ms ease;

  --font-size-h2-md: 2.2rem;
  --font-size-h3-md: 1.7rem;
  --font-size-h4-md: 1.4rem;
  --font-size-h5-md: 1.2rem;
  --font-size-h2-lg: 2.4rem;
  --font-size-h3-lg: 2rem;
  --font-size-h4-lg: 1.6rem;
  --font-size-h5-lg: 1.2rem;

  --font-family-default: "Poppins";
}

body {
  font-family: var(--font-family-default);
  line-height: 1.7;
  color: var(--color-white);
  background: var(--color-bg);
}

/* LAYOUT */
.container {
  width: var(--container-width-lg);
  margin: 0 auto;
}

section {
  padding: 6rem 0;
  transition: transform 1s, opacity 1s;
}

section h3 {
  text-align: center;
  margin-bottom: 4rem;
}

.section--hidden {
  opacity: 0;
  transform: translateY(8rem);
}

h2 {
  font-size: var(--font-size-h2-lg);
}

h3 {
  font-size: var(--font-size-h3-lg);
}

h4 {
  font-size: var(--font-size-h4-lg);
}

h5 {
  font-size: var(--font-size-h5-lg);
}

a {
  color: var(--color-white);
}

img {
  width: 100%;
  display: block;
  object-fit: cover;
}

/* BUTTONS */
.btn {
  padding: 1rem 2rem;
  display: inline-block;
  background-color: var(--color-white);
  color: var(--color-black);
  border: 1px solid transparent;
  font-weight: 500;
  cursor: pointer;
}

.btn:hover {
  background: transparent;
  color: var(--color-white);
  border-color: var(--color-white);
}

.btn-primary {
  background-color: var(--color-danger);
  color: var(--color-white);
}

/* NAVBAR */
.window-scroll {
  background: var(--color-primary);
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.2);
}

nav {
  width: 100vw;
  height: 5rem;
  position: fixed;
  top: 0;
  z-index: 999;
  background-color: transparent;
}

.nav__container {
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: 4rem;
}

.close-menu-btn,
.open-menu-btn {
  display: none;
}

.nav__menu a {
  font-size: 0.9rem;
  transition: var(--transition);
}

.nav__menu a:hover {
  color: var(--color-bg2);
}

/* HEADER */
header {
  position: relative;
  top: 5rem;
  overflow: hidden;
  height: 100vh;
  margin-bottom: 5rem;
}

.header__container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 5rem;
  height: 100%;
}

.header__description p {
  margin: 1rem 0 2.4rem;
}

/* SKILLS */
.skills {
  background-color: var(--color-bg1);
  height: 29rem;
}

.skills h2 {
  line-height: 1;
  margin-bottom: 3rem;
}

.skills__container {
  display: grid;
  grid-template-columns: 40% 60%;
}

.skills__description {
  margin-right: 4rem;
}

.skills__description p {
  margin: 1rem 0 3rem;
}

.skills__tiles {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.2rem;
}

.skill {
  background-color: var(--color-bg2);
  padding: 1rem;
  border-radius: 2rem;
  transition: var(--transition);
  width: 8rem;
  height: 8rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.skill:hover {
  box-shadow: 0 .5rem 1rem rgba(0, 0, 0, 0.3);
  z-index: 1;
}

.skill img {
  width: 3rem;
  height: 3rem;
}

.skill h5 {
  text-align: center;
  font-size: .8rem;
}

.skill p {
  font-size: 0.85rem;
}

/* PROJECTS */
.projects {
  margin-top: 10rem;
}

.projects__container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.project {
  background: var(--color-bg1);
  text-align: center;
  border: 1px solid transparent;
}

.project:hover {
  background: transparent;
  border-color: var(--color-primary);
}

.project__img {
  height: 15rem;
}

.project__img img {
  height: inherit;
  padding: .5rem;
}


.project__info {
  padding: 2rem;
}

.project__info p {
  margin: 1.2rem 0 2rem;
  font-size: 0.9rem;
}

/* CONTACT */
.contact__container {
  background: var(--color-bg1);
  padding: 4rem;
  display: grid;
  grid-template-columns: 40% 60%;
  gap: 4rem;
  height: 30rem;
  margin: 7rem auto;
  border-radius: 1rem;
}

.contact__aside {
  background: var(--color-primary);
  padding: 3rem;
  border-radius: 1rem;
  position: relative;
  bottom: 10rem;
}

.aside__image {
  width: 12rem;
  margin-bottom: 2rem;
}

.contact__aside h3 {
  text-align: left;
  margin-bottom: 1rem;
}

.contact__details li {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  align-items: center;
}

.contact__socials {
  display: flex;
  gap: 0.8rem;
  margin-top: 3rem;
}

.contact__socials a {
  background: var(--color-bg2);
  padding: 0.5rem;
  border-radius: 50%;
  font-size: 0.9rem;
  transition: var(--transition);
}

.contact__socials a:hover {
  background: transparent;
}

.contact__form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  margin-right: 4rem;
}

.form__name {
  display: flex;
  gap: 1.2rem;
}

.contact__form input[type="text"] {
  width: fit-content 50%;
}

input,
textarea {
  width: 100%;
  background: var(--color-bg);
  padding: 1rem;
  color: var(--color-white);
}

::placeholder {
  color: var(--color-white);
  opacity: 0.8;
  font-family: var();
  font-family: var(--font-family-default);
}

.contact__form .btn {
  width: max-content;
  margin-top: 1rem;
}

/* FOOTER */
footer {
  background-color: var(--color-bg1);
  padding-top: 5rem;
  font-size: 0.9rem;
}

.footer__container {
  display: grid;
  grid-template-columns: 2fr auto auto;
  gap: 5rem;
}

.footer__container > div h5 {
  margin-bottom: 1.2rem;
}

.footer__description {
  width: 45vw;
}

.footer__description p {
  margin: 0 0 2rem;
}

footer ul li {
  margin-bottom: 0.7rem;
}

footer ul li a:hover {
  text-decoration: underline;
}

.footer__contact-details p {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer__socials {
  display: flex;
  gap: 1rem;
  font-size: 1.2rem;
  margin-top: 1rem;
}

.footer__copyright {
  text-align: center;
  margin-top: 4rem;
  padding-bottom: 1.2rem;
}

/* TABLET BREAKPOINT */
@media screen and (max-width: 1244px) {
  .container {
    width: var(--container-width-md);
  }

  h2 {
    font-size: var(--font-size-h2-md);
  }

  h3 {
    font-size: var(--font-size-h3-md);
  }

  h4 {
    font-size: var(--font-size-h4-md);
  }

  h5 {
    font-size: var(--font-size-h5-md);
  }

  /* NAVBAR */
  nav button.open-menu-btn {
    display: inline-block;
  }

  nav button {
    display: inline-block;
    background: transparent;
    font-size: 1.8rem;
    color: var(--color-white);
    cursor: pointer;
  }

  .nav__menu {
    position: fixed;
    top: 5rem;
    right: 0;
    height: fit-content;
    width: 18rem;
    gap: 0;
    flex-direction: column;
    display: none;
  }

  .nav__menu li {
    width: 100%;
    height: 5.8rem;
    animation: animateNavItem 500ms linear forwards;
    transform-origin: top right;
    opacity: 0;
  }

  .nav__menu li:nth-child(2) {
    animation-delay: 50ms;
  }
  .nav__menu li:nth-child(3) {
    animation-delay: 100ms;
  }
  .nav__menu li:nth-child(4) {
    animation-delay: 150ms;
  }
  .nav__menu li:nth-child(5) {
    animation-delay: 200ms;
  }

  @keyframes animateNavItem {
    100% {
      opacity: 1;
    }
  }

  .nav__menu li a {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    box-shadow: -4rem 6rem 10rem rgba(0, 0, 0, 0.6);
    background: var(--color-primary);
  }

  .nav__menu li a:hover {
    color: var(--color-white);
    background: var(--color-bg1);
  }

  /* HEADER */
  header {
    height: 52vh;
    margin-bottom: 4rem;
  }

  .header__container {
    gap: 0;
    padding-bottom: 3rem;
  }

  /* skills */
  .skills {
    height: auto;
  }

  .skills__container {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .skills__description {
    margin-right: 0;
  }

  /* COURSES */
  .courses {
    margin-top: 0;
  }

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

  /* CONTACT */
  .contact {
    padding-bottom: 0;
  }

  .contact__container {
    gap: 1.5rem;
    height: auto;
    margin-top: 3rem;
    padding: 1.5rem;
  }

  .contact__aside {
    width: auto;
    padding: 1.5rem;
    bottom: 0;
  }

  .contact__form {
    align-self: center;
    margin-right: 1.5rem;
  }
}

@media screen and (max-width: 992px) {
  
}

/* MOBILE BREAKPOINT */
@media screen and (max-width: 768px) {
  .container {
    width: var(--container-width-sm);
  }

  /* HEADER */
  header {
    height: 100vh;
  }

  .header__container {
    grid-template-columns: 1fr;
    text-align: center;
    margin-top: 0;
  }

  .header__description p {
    margin-bottom: 1.3 rem;
  }

  /* skills */
  .skills__description {
    grid-template-columns: 1fr 1fr;
    gap: 0.7rem;
  }

  .category {
    padding: 1rem;
    border-radius: 1rem;
  }

  .category__icon {
    margin-top: 0.25rem;
    display: inline-block;
  }

  /* COURSES */
  .courses__container {
    grid-template-columns: 1fr;
  }

  /* CONTACT */
  .contact__container {
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-top: 0;
    padding: 0;
  }

  .contact__form {
    margin: 0 1.5rem 3rem;
  }

  .form__name {
    flex-direction: column;
  }

  .form__name input[type="text"] {
    width: 100%;
  }

  /* FOOTER */
  .footer__container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }

  .footer__description {
    width: auto;
  }

  .footer__description p {
    margin: 1rem auto;
  }

  .footer__contact-details {
    text-align: center;
  }

  .footer__contact-details p {
    justify-content: center;
  }

  .footer__socials {
    justify-content: center;
  }
}