@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;700&display=swap');

:root {
  --background: #fff;
  --light-gray: #e0e1e6;
  --dark: #42526e;
  --text-dark: #172b4d;
  --text-green: #36b37f;
  --gray: #ebf0ee;
  --hover-state: #36b37f;
  --active-state: #008552;
  --menu-color: #344563;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  font-size: 100%;
  background-color: var(--background);
  line-height: 1.5;
  color: var(--text-dark);
}

a {
  text-decoration: none;
  display: inline-block;
}

.btn {
  padding: 0.8rem 1.2rem;
  color: var(--background);
  background-color: var(--active-state);
  border-radius: 5px;
  border: 0;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
}

.btn:hover {
  background-color: var(--hover-state);
  cursor: pointer;
  transition: 0.3s ease;
}

.btn:focus,
.btn:active {
  background-color: var(--active-state);
}

.heading-2 {
  font-size: 2.5rem;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* Navigation styles */

.nav,
.nav__hamburger,
.hero__social,
.card__tags,
.contact__form form {
  display: flex;
}

.nav__logo a {
  font-size: 1.3rem;
  font-weight: bold;
  color: var(--text-dark);
}

.nav__links {
  display: none;
  width: 100%;
  background-color: #fff;
  z-index: 1;
  transition: 0.5s;
  justify-content: center;
}

.nav__links.show {
  display: block;
  width: 100%;
  height: 100%;
  align-items: center;
}

.nav__links-items {
  display: block;
  list-style-type: none;
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  height: 100%;
  background-color: #fff;
  padding-top: 4rem;
  padding-left: 2rem;
  font-weight: bold;
  font-size: 2rem;
}

.nav__links-items li {
  align-items: center;
  padding-bottom: 1rem;
}

.nav__links-items a {
  color: var(--menu-color);
}

.close {
  display: none;
  z-index: 3;
}

.nav {
  justify-content: space-between;
  align-items: center;
}

.nav__hamburger {
  justify-content: center;
  align-items: center;
}

/* Header Styles */
.hero {
  text-align: center;
  background-image: url(./images/header-illsutration-mobile.svg);
  background-size: cover;
  background-position: top;
}

.hero__title {
  margin-bottom: 3rem;
}

.hero__content {
  margin-bottom: 3rem;
}

.hero__title-dark,
.hero__title-green {
  display: block;
  font-size: 3rem;
  font-weight: 700;
}

.hero__title-dark {
  color: var(--text-dark);
  animation-duration: 3s;
  animation-delay: 1s;
  animation-name: moveInLeft;
  position: relative;
}

.hero__title-green {
  color: var(--text-green);
  animation-duration: 3s;
  animation-delay: 1s;
  animation-name: moveInRight;
  position: relative;
}

.hero__social {
  padding: 1rem;
  list-style: none;
  justify-content: center;
  align-items: center;
}

.hero__social-links,
.nav__links-items a {
  padding: 0 0.5rem;
}

.nav__logo a:active,
.nav__logo a:focus {
  color: var(--text-dark);
}

.hero_arrow-down {
  padding: 2rem;
  cursor: pointer;
  position: relative;
  animation: bounce 1s ease infinite normal;
  top: 0;
}

/* Animation */
@keyframes moveInLeft {
  from {
    left: -50%;
  }

  75% {
    left: 10px;
  }

  to {
    left: 0%;
  }
}

@keyframes moveInRight {
  from {
    right: -50%;
  }

  75% {
    right: 10px;
  }

  to {
    right: 0;
  }
}

@keyframes bounce {
  0% {
    top: 0;
  }

  50% {
    top: 10px;
  }

  to {
    top: 0;
  }
}

/* Recent work styles */
.work__heading {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 3rem;
}

.work__heading-recent,
.work__heading-work {
  display: block;
}

.work__heading-work {
  position: relative;
}

.work__heading-work::before {
  content: "";
  position: absolute;
  bottom: -25px;
  left: 50%;
  right: 50%;
  transform: translate(-50%, -50%);
  height: 3px;
  width: 15%;
  background: var(--text-green);
}

.projects {
  text-align: center;
  display: grid;
}

.card {
  border: 2px solid var(--gray);
  margin-bottom: 1rem;
  border-radius: 5px;
}

.card__img {
  height: 300px;
  width: 100%;
  background-color: var(--gray);
  margin-bottom: 0.5rem;
}

.card__tags-works {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  align-items: center;
  list-style: none;
  padding: 1rem;
}

.card__tags {
  list-style: none;
  flex-wrap: wrap;
  justify-content: center;
}

.card__tags-links {
  background-color: var(--gray);
  color: var(--text-dark);
  padding: 0.5rem;
  border-radius: 5px;
  margin: 10px 5px;
}

/* About */
.about {
  text-align: center;
  background: url(./images/mobile-illustration-1.svg) 100% 0 no-repeat, url(./images/mobile-illustration-2.svg) 0 100% no-repeat;
}

.about__text {
  margin: 1rem 0;
}

/* Skills */
.skills {
  text-align: center;
}

.skills .card {
  background-color: var(--gray);
  padding: 2rem 0;
}

.skills .card__tags .card__tags-links {
  background-color: var(--background);
  color: var(--text-green);
}

/* Contact */
.contact {
  background: url(./images/illustration-contact-mobile.svg) 100% 100% no-repeat;
}

.contact__text .heading-2 {
  font-size: 2rem;
}

.contact__form form {
  text-align: center;
  flex-direction: column;
}

.contact__form-desktop {
  display: none;
}

.btn__submit {
  background-color: var(--active-state);
  align-self: center;
}

.btn__submit:hover {
  background-color: var(--hover-state);
  transition: 0.3s ease;
}

.contact__text {
  text-align: center;
  margin-bottom: 3rem;
}

textarea,
.form-control input {
  padding: 0.8rem;
}

.form-control input,
.form-control textarea {
  width: 100%;
  margin-bottom: 1rem;
  border: 2px solid var(--gray);
}

/* Form validation styles */
.contact__form .form-control input:invalid {
  border: 2px solid red;
}

.contact__form .form-control input:valid {
  border: 2px solid var(--active-state);
}

.valid {
  color: red;
  visibility: hidden;
}

/* Footer */
.footer {
  padding-top: 1rem;
  padding-bottom: 10rem;
  text-align: center;
}

.footer__email {
  text-decoration: none;
  color: var(--dark);
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 40;
  left: 0;
  top: 0;
  height: 100%;
  width: 100%;
  background: rgba(0, 0, 0, 0.8);
  animation-name: openModal;
  animation-duration: 1s;
  text-align: left;
}

.modal .card__tags {
  justify-content: flex-start;
}

#modal-image {
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  height: 10rem;
}

.modal-Heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-Heading #modal-title {
  padding: 1rem 0;
}

.modal-Heading .btn {
  display: none;
  margin-left: 1rem;
}

.modal-btn-content {
  display: flex;
}

.modal-content {
  background-color: #fff;
  padding: 2rem;
  width: 80%;
  margin: 1rem auto;
  border-radius: 10px;
}

.close-btn {
  color: var(--dark);
  padding: 1rem;
  display: block;
  float: right;
  font-size: 2rem;
}

.close-btn:hover {
  cursor: pointer;
  text-decoration: none;
}

@keyframes openModal {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

/* Desktop Styles min width 720px */
@media screen and (min-width: 768px) {
  .nav__logo,
  .nav__hamburger {
    display: none;
  }

  .nav__links.show,
  .nav__links,
  .nav__links-items,
  .hero .container {
    display: flex;
  }

  .nav__links.show {
    justify-content: center;
    align-items: center;
  }

  .nav__links {
    width: 100%;
    justify-content: center;
    background: transparent;
  }

  .nav__links-items {
    background-color: transparent;
    position: static;
    padding-top: 2rem;
    padding-bottom: 0;
    font-size: 1.5rem;
  }

  .nav__links-items a {
    color: var(--dark);
    font-weight: bold;
  }

  header {
    background-image: url(./images/header-illustration-desktop.svg);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: top;
  }

  .hero {
    background-image: none;
  }

  .hero .container {
    padding: 8rem 0 12rem 0;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  .hero__title,
  .hero__content {
    width: 60%;
  }

  .work__heading {
    padding-top: 4rem;
  }

  .work__heading-recent,
  .work__heading-work {
    display: inline-block;
  }

  .work__heading-work::before {
    display: none;
  }

  #modal-image {
    height: 30rem;
  }

  .modal-Heading .btn {
    display: block;
  }

  .modal-footer .btn {
    display: none;
  }
}

/* Desktop styles */
@media screen and (min-width: 840px) {
  .projects {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .about {
    background: url(./images/illustration-about-me-2.svg) 0 50% no-repeat, url(./images/illustration-about-me.svg) 100% 50% no-repeat;
    padding: 3rem 0;
  }

  .about .about__content {
    max-width: 60%;
    margin: 0 auto;
  }
}

/* Desktop styles for 920px */
@media screen and (min-width: 920px) {
  .header {
    padding-bottom: 14.5rem;
  }

  .hero_arrow-down {
    padding-top: 6rem;
  }

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

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

  .contact {
    background: url(./images/illustration-desktop-1.svg) 0 100% no-repeat, url(./images/illustration-desktop-2.svg) 25% 80% no-repeat, url(./images/illustration-desktop-3.svg) 100% 50% no-repeat;
    padding: 6rem 0;
    border-bottom: 2px solid var(--light-gray);
  }

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

  .contact__text {
    padding-top: 3rem;
    text-align: left;
  }

  .contact__form-desktop {
    display: block;
  }

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

  .footer {
    padding-bottom: 1rem;
  }

  .footer__email {
    display: none;
  }
}
