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

html {
  scroll-behavior: smooth;
}

:root {
  --primary: #172b4d;
  --h-color: #3a4a42;
  --secondary: #36b37e;
  --secondary-btn: #36b37f;
  --weight: bold;
  --background: #ebf0ee;
}

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

.d-flex {
  display: flex;
}

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

.h2-size {
  color: var(--primary);
  font-size: 40px;
  font-weight: var(--weight);
  line-height: 52px;
}

.mobile-invisible {
  display: block;
}

.desktop-invisible {
  display: none;
}

body {
  width: 100%;
  min-height: 100vh;
  font-family: 'Inter', sans-serif;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

header {
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 24px;
}

header h2 {
  position: relative;
  animation: crane-float 2s alternate 5 ease-in-out both;
}

@keyframes crane-float {
  0% {
    transform: translateY(0);
  }

  100% {
    transform: translateY(-10px);
  }
}

nav .nav-menu {
  visibility: hidden;
  transform: translateY(-100%);
}

footer .mail-container a {
  margin: 3em 0 147px;
  color: #42526e;
  text-decoration: none;
  font-size: 20px;
  font-weight: 400;
  line-height: 32px;
  letter-spacing: 0.4px;
}

/* Hamburger Menu Mobile  Icons */

nav .nav-menu.open,
nav .nav-menu.hide {
  visibility: visible;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  transition: all 1s ease-in-out;
  transform: translateY(0%);
  width: 100%;
  height: 100%;
  padding-left: 28px;
  padding-top: 62px;
  background-color: #fff;
}

nav .nav-menu.hide {
  visibility: hidden;
  transform: translateY(-100%);
}

nav .nav-menu.open .nav-link,
nav .nav-menu.hide .nav-link {
  font-size: 32px;
  line-height: 44px;
  font-weight: 600;
  margin: 12px;
}

nav .nav-menu.open .nav-link a,
nav .nav-menu.hide .nav-link a {
  text-decoration: none;
  color: var(--h-color);
}

nav .show-menu-btn {
  width: 22px;
  height: 16px;
  font-weight: var(--weight);
}

nav .closed-menu-btn {
  display: none;
  position: fixed;
  top: 38px;
  right: 38px;
  z-index: 2;
}

main {
  width: 100%;
}

ul {
  list-style: none;
}

.main-section {
  background-image: url("../images/header-illsutration-mobile@2x.png");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center top;
  width: 100%;
  margin: 0 auto;
  text-align: center;
  padding: 0 24px 0;
}

.main-section-title {
  padding-top: 64px;
  animation: top-bottom 1s ease-in-out;
}

@keyframes top-bottom {
  0% {
    transform: translateY(-50%);
  }

  100% {
    transform: translateY(0);
  }
}

.main-section-title h2 {
  color: var(--secondary);
}

.main-section p {
  max-width: 90%;
  margin: 58px auto 60px;
  color: var(--primary);
  font-size: 20px;
  line-height: 28px;
  animation: left-right 1s ease-in-out;
}

@keyframes left-right {
  0% {
    transform: translateX(-30%);
  }

  100% {
    transform: translateX(0);
  }
}

.card .img-card {
  background: var(--background);
  height: 250px;
  width: 100%;
  padding: 2%;
}

.card .img-card:hover {
  transition: all 0.4s ease-in-out;
  cursor: pointer;
}

.card img {
  width: 96%;
  height: 96%;
  margin-top: 1.5%;
  border-radius: 4px;
  opacity: 0.5;
  transition: all 0.4s ease-in-out;
}

.social-media-icons li a img {
  padding: 0 12px;
  margin: 5px 0;
  transition: all 0.3s ease-in-out;
}

.card img:hover {
  opacity: 0.9;
}

.social-media-icons li a img:hover {
  transform: scale(1.4);
}

.scroll-down-icon {
  margin: 64px 0 22px;
}

.works-section {
  text-align: center;
  flex-flow: column nowrap;
}

.works-section-title h2 {
  max-width: 70%;
  margin: 0 auto;
  padding: 0 24px;
}

.works-section-title h2::after {
  content: " ";
  display: block;
  max-width: 48px;
  height: 4px;
  margin: 24px auto 62px;
  background-color: var(--secondary);
}

.card-container {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(1, 1fr);
  grid-gap: 24px;
  grid-auto-rows: calc(474px + 20px);
  padding: 10px;
  text-align: center;
}

.card-container .card {
  width: 327px;
  max-height: 474px;
  margin: 0 auto;
  border: 1px solid #d0d9d4;
  border-radius: 8px;
  justify-self: center;
  align-items: center;
  flex-flow: column nowrap;
  transition: all 0.4s ease;
}

.card-container .card:hover {
  transform: scale(1.04);
}

.card h3 {
  padding: 16px;
  font-weight: 600;
  font-size: 24px;
  line-height: 32px;
  color: #3a4a42;
}

.card ul,
.cards ul {
  width: 100%;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  text-align: center;
}

.card .program-lang li {
  font-weight: 600;
  font-size: 12px;
  line-height: 16px;
  border-radius: 4px;
  padding: 8px 12px;
  margin: 0 4px;
  color: #3a4a42;
  background: var(--background);
}

.card button {
  margin: 24px 0 20px;
  height: 48px;
  padding: 12px;
  font-size: 17px;
  line-height: 24px;
  font-weight: 500;
  color: #fff;
  border: none;
  border-radius: 4px;
  background-color: var(--secondary-btn);
  transition: all 0.4s ease 0.2s;
}

button:hover {
  background-color: var(--secondary-btn);
  cursor: pointer;
  box-shadow: 10px 8px 16px rgba(54, 179, 127, 0.24);
  transform: scale(0.9);
}

button:active {
  background-color: #008552;
}

/* Details Popup Window */

article {
  visibility: hidden;
  display: flex;
  justify-content: center;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  background-color: #c1c7d0c0;
  backdrop-filter: blur(5px);
  border: 1px solid #d0d9d4;
}

.fixed {
  margin: 26px 16px 46px;
  background-color: #3a4a42;
  background-color: #fff;
  position: relative;
  z-index: 4;
  border-radius: 16px;
  overflow-y: hidden;
}

.card-popup {
  display: none;
  width: 100%;
  height: auto;
  padding: 0;
  margin: 0;
  z-index: 5;
}

.inActive {
  animation: zooms-in 1s ease;
}

@keyframes zooms-in {
  0% {
    transform: scale(0);
  }

  100% {
    transform: scale(1);
  }
}

.outActive {
  animation: zooms-out 1s ease;
}

@keyframes zooms-out {
  0% {
    transform: scale(1);
  }

  100% {
    transform: scale(0);
  }
}

.card-popup::-webkit-scrollbar {
  display: none;
}

.card-popup.active {
  display: block;
}

.card-popup .project-img {
  width: 100%;
  height: auto;
  padding: 16px;
  text-align: center;
}

.card-popup .card-img {
  position: relative;
  max-width: 100%;
  border-radius: 8px;
}

.card-popup .hide-icon {
  position: absolute;
  top: 3%;
  right: 4%;
  z-index: 6;
  width: 45px;
  height: 45px;
  padding: 5px;
}

.card-popup .article {
  width: 100%;
  min-width: 311px;
  padding: 0 16px;
}

.card-popup h3 {
  width: 70%;
  min-width: 259px;
  font-weight: 600;
  font-size: 32px;
  line-height: 44px;
  color: var(--primary);
}

.card-popup ul {
  width: 100%;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: wrap;
  text-align: center;
}

.card-popup .program-lang li {
  font-weight: 600;
  font-size: 12px;
  line-height: 16px;
  border-radius: 4px;
  padding: 8px 12px;
  margin: 12px 4px;
  color: #3a4a42;
  background: var(--background);
}

.cards .languages li {
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  letter-spacing: 0.03em;
  padding: 12px;
  margin: 4px;
  color: var(--secondary);
  background: #fff;
  border-radius: 8px;
}

/* .card-popup .program-lang li:nth-child(4) {
  display: none;
} */

.card-popup p {
  width: 90%;
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
  color: #344563;
}

.card-popup button {
  margin: 16px 0;
  height: 48px;
  padding: 12px 14px;
  font-size: 17px;
  line-height: 24px;
  font-weight: 500;
  color: #fff;
  border: none;
  border-radius: 4px;
  background-color: var(--secondary-btn);
  transition: all 0.4s ease 0.2s;
}

.contact-form-section button {
  margin-top: 7px;
  transition: all 0.4s ease 0.2s;
}

.about button,
.contact-form-section button {
  height: 48px;
  width: 159px;
  font-size: 17px;
  line-height: 24px;
  font-weight: 500;
  color: #fff;
  border: none;
  border-radius: 4px;
  background-color: var(--secondary-btn);
  letter-spacing: 0.03em;
  padding: 12px;
  margin-bottom: 10px;
  transition: all 0.4s ease 0.2s;
}

.card-popup button:first-child {
  margin-right: 8px;
}

.card-popup button span {
  margin-right: 8px;
}

.card-popup button:hover {
  cursor: pointer;
  box-shadow: 10px 8px 16px rgba(54, 179, 127, 0.24);
  transform: scale(0.9);
}

.card-popup button:active {
  background-color: #008552;
}

.about-section {
  background: url("../images/illustration\ 2-about\ me\ mobile@2x.png") left 21% no-repeat, url("../images/illustration\ 1-\ about\ me-mobile@2x.png")  right 2%  no-repeat;
  background-size: 13%;
  padding-bottom: 60px;
}

.about-section .about {
  flex-direction: column;
  text-align: center;
  width: 100%;
  padding: calc(68px + 15px) 24px 15px;
}

.about h2 {
  margin: 0 auto;
  padding-bottom: 24px;
}

.about p {
  width: 90%;
  font-size: 20px;
  line-height: 32px;
  letter-spacing: 0.4px;
  font-weight: 400;
  color: #42526e;
  padding-bottom: 24px;
}

.about button:active {
  background-color: #008552;
}

.card-wrapper {
  width: 100%;
  margin-top: 39px;
  display: grid;
  grid-gap: 24px;
  grid-template-columns: repeat(1, 1fr);
  grid-auto-rows: calc(352px + 20px);
  padding: 0 10px;
  text-align: center;
}

.card-wrapper .cards {
  width: 327px;
  height: 352px;
  margin: 0 auto;
  border: 1px solid #c1c7d0;
  border-radius: 8px;
  justify-self: center;
  flex-direction: column;
  background: var(--background);
  transition: all 0.4s ease;
}

.card-wrapper .cards:hover {
  transform: scale(1.05);
}

.cards .tools-img {
  width: 140px;
  min-height: 140px;
}

.cards h3 {
  font-size: 24px;
  line-height: 32px;
  font-weight: 600;
  letter-spacing: 0.4px;
  color: #344563;
  margin-bottom: 24px;
}

section.contact-form-section {
  flex-direction: column;
  justify-content: space-around;
  text-align: center;
  background-image: url("../images/illustration-contact-form@2x.png");
  background-repeat: no-repeat;
  background-size: 10%;
  background-position: right 98%;
}

.form-sub-container {
  min-width: 307px;
  width: 80%;
}

.contact-form-section h2 {
  width: 100%;
  padding: 0 0 58px;
}

.contact-form-section input {
  margin: 5px 5px 24px;
  border: 1px solid #d0d9d4;
  border-radius: 4px;
  padding: 15px 16px;
  width: 95%;
  font-size: 16px;
}

.contact-form-section textarea {
  margin-bottom: 24px;
  border-radius: 4px;
  padding: 12px;
  width: 95%;
  font-size: 16px;
}

input:focus,
textarea:focus {
  border: none;
  border: 1.3px solid #60c095;
  outline: none;
}

input:hover::placeholder,
textarea:hover::placeholder {
  transition: 0.5s;
  transform: translateX(5px);
}

.btn-submit-alert {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.footer-icons {
  width: 100%;
  padding: 46px 0 19px;
}

footer .mail-container {
  text-align: center;
  margin-bottom: 147px;
}

footer::after {
  content: " ";
  display: block;
  width: 128px;
  height: 5px;
  border-radius: 2px;
  margin: 0 auto 10px;
  background: var(--primary);
}

/* Small devices (portrait tablets and large phones, 600px and up) */

@media screen and (min-width: 600px) {
  .main-section-title h1,
  .main-section-title h2 {
    font-weight: 800;
    letter-spacing: 0.4px;
  }

  .main-section p {
    max-width: 900px;
    letter-spacing: 0.6px;
  }

  .card-container .card,
  .card-wrapper .cards {
    width: 369px;
  }

  .card-wrapper {
    padding: 0 24px;
  }

  .card-popup button:first-child {
    margin-right: 12px;
  }

  .card-popup button span {
    margin-right: 16px;
  }
}

/* Medium devices (landscape tablets, 768px and up) */

@media screen and (min-width: 768px) {
  header {
    position: fixed;
    left: 0;
    right: 0;
    justify-content: center;
    background-color: #fff;
    z-index: 1;
  }

  header h2,
  nav .show-menu-btn {
    display: none;
  }

  nav .nav-menu {
    display: flex;
    justify-self: center;
    visibility: visible;
    transform: translateY(0%);
  }

  .nav-menu .nav-link a {
    display: flex;
    justify-self: center;
    padding: 5px 15px;
    margin: 3px;
    font-size: 16px;
    color: var(--primary);
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.5s ease-in-out;
  }

  .nav-menu .nav-link:first-child a {
    color: #008552;
  }

  .nav-menu .nav-link a:hover {
    color: #008552;
    background-color: #f4f4f4;
  }

  main {
    position: relative;
    padding-bottom: 58px;
  }

  .main-section {
    margin-top: 32px;
    background-image: none;
    background-image: url("../images/Header-llustration-desktop@2x.png");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
  }

  .main-section-title {
    padding-top: 170px;
  }

  .main-section p {
    width: 70%;
    margin: 24px auto 44px;
  }

  .social-media-icons li a img {
    padding: 0 12px;
  }

  .works-section-title h2 {
    padding: 80px 0 32px;
  }

  .works-section-title h2::after {
    display: none;
  }

  .scroll-down-icon {
    margin: 64px 0 245px;
  }

  .card-container,
  .card-wrapper {
    width: calc(654px + 24px + 20px);
    padding: 10px 10px;
    grid-template-columns: repeat(2, 1fr);
    grid-gap: 24px;
    margin: 0 auto;
    text-align: center;
  }

  .card-container .card,
  .card-wrapper .cards {
    width: 327px;
    align-self: center;
    justify-self: center;
  }

  .card-wrapper .cards:last-child {
    grid-column: 1/span 2;
  }

  .card-popup {
    width: 75%;
  }

  .about p {
    width: calc(654px - 24px);
  }

  .form-sub-container {
    width: calc(654px + 24px);
    padding-top: 28px;
  }

  footer {
    display: none;
  }

  .footer-icons ul {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 58px;
    padding: 0;
    margin: 0;
    padding-top: 5px;
    border-top: 1px solid #dfe1e6;
  }

  .footer-icons ul li a img {
    padding: 0 12px;
    width: 38px;
  }
}

/* Large devices (laptops/desktops, 992px and up) */

@media screen and (min-width: 992px) {
  .mobile-invisible {
    display: none;
  }

  .desktop-invisible {
    display: block;
  }

  .card-container,
  .card-wrapper {
    width: calc(738px + 24px + 20px);

    /* padding: 0 10px; */
  }

  .card-container .card,
  .card-wrapper .cards {
    width: 369px;
    max-height: 474px;
  }

  .card-popup {
    /* width: 70%; */
    max-width: 920px;
  }

  .card-popup .project-img {
    margin-top: 48px;
  }

  .card-popup .hide-icon {
    position: absolute;
    top: 16px;
    right: 16px;
  }

  .card-popup .article {
    width: 100%;
    padding-bottom: 44px;
    position: relative;
  }

  .card-popup h3 {
    width: 60%;
  }

  .card-popup .article .btns-popup {
    position: absolute;
    top: 0;
    right: 16px;
  }

  .card-popup button {
    margin: 0;
    padding: 8px 10px;
    font-size: 15px;
    line-height: 20px;
    font-weight: 600;
    color: #fff;
    border: none;
    border-radius: 6px;
    background-color: var(--secondary-btn);
    transition: all 0.4s ease 0.2s;
  }

  .card-popup button:first-child {
    margin-right: 6px;
  }

  .about-section {
    background-image: none;
    background-image:
      url("../images/illustration-about-me-2-desktop@2x.png"),
      url("../images/illustration-about\ me-1-desktop@2x.png");
    background-position: left 17%, right 3%;
    background-size: 15%;
    background-repeat: no-repeat;
    padding-bottom: 164px;
  }

  .about-section .about {
    width: calc(738px + 24px);
    margin: 0 auto;
    padding-top: calc(68px + 15px);
    padding-bottom: 52px;
  }

  .about p {
    width: 100%;
  }

  section.contact-form-section {
    width: 100%;
    background-image: none;
    background-image:
      url("../images/illustration-1-contact-form-desktop@2x.png"),
      url("../images/illustration-2-contact-form-desktop@2x.png"),
      url("../images/contact\ form-illustratoin-3-desktop@2x.png");
    background-position:
      left bottom,
      30% bottom,
      right bottom;
    background-size: 14%;
    background-repeat: no-repeat;
  }

  .form-sub-container {
    width: calc(738px + 24px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    height: 490px;
    padding-top: 0;
  }

  .contact-form-section h2 {
    width: 39%;
    font-size: 30px;
    line-height: 48px;
  }

  .contact-form-section form {
    width: 58%;
  }
}

/* Extra large devices (large laptops and desktops, 1200px and up) */

@media screen and (min-width: 1100px) {
  .card-container,
  .card-wrapper {
    width: calc(981px + 48px + 20px);

    /* padding: 0 10px; */
    margin: 0 auto;
    grid-template-columns: repeat(3, 1fr);
    text-align: center;
  }

  .card-container .card,
  .card-wrapper .cards {
    width: 327px;
    margin: 0 auto;
  }

  .card-wrapper .cards:last-child {
    grid-column: 3/span 1;
  }

  .about-section .about {
    width: calc(981px + 48px);
  }

  .form-sub-container {
    width: calc(981px + 48px);
  }
}
