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

html {
  font-family: "Inter", sans-serif;
}

:root {
  --green-color: #36b37e;
  --blue-color1: #28352f;
  --blue-main: #172b4d;
  --gray: rgba(235, 240, 238, 1);
}

/* ================ Navbar Styles ================= */

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  color: var(--blue-color);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #fff;
}

.logo a,
.nav-links li a {
  text-decoration: none;
  color: var(--blue-color);
  font-size: 24px;
  font-weight: 550;
}

.nav-icon {
  display: block;
  cursor: pointer;
  position: absolute;
  top: 20px;
  right: 20px;
}

.nav-links-container {
  display: none;
}

.social li {
  list-style: none;
}

.lang-stack li {
  list-style: none;
  background-color: #fff;
  text-align: center;
  padding: 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
  color: var(--green-color);
}

.nav-links-container.open {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 20px;
  left: 0;
  right: 0;
  top: 40px;
  bottom: 40px;
  height: 100vh;
  background-color: #fff;
  border-radius: 0 0 20px 20px;
  box-shadow: 0 48px 48px rgba(37, 47, 137, 0.08);
}

.nav-links-container.open ul {
  list-style-type: none;
  margin: 8px;
}

.nav-links-container.open ul li {
  padding: 10px 10px;
  color: rgba(58, 74, 66, 1);
  font-size: 32px;
  font-weight: 600;
}

.hidden {
  display: none;
}

/* ================== Hero Section ================ */

.headline {
  background: url(./assets/bg.svg);
  background-repeat: no-repeat;
  background-size: cover;
  padding: 100px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 24px;
}

.introduction h1 {
  font-weight: 700;
  font-size: 40px;
  text-align: center;
  margin: 6px 0;
}

.intro {
  color: var(--blue-main);
}

.intro1 {
  color: var(--green-color);
}

.introduction p {
  color: var(--blue-main);
  font-size: 20px;
  text-align: center;
}

.social {
  display: flex;
  flex-direction: row;
  gap: 1em;
  margin-top: 18px;
  justify-content: center;
}

.social li a {
  text-decoration: none;
  color: #505f79;
}

.scroll-down {
  display: flex;
  justify-content: center;
  margin-top: 80px;
}

.scroll-down i {
  color: var(--blue-main);
}

/* =============== Works Section ================ */

.work-heading > h1 {
  text-align: center;
  font-size: 35px;
  font-weight: 700;
  color: var(--blue-main);
}

hr {
  width: 20%;
  margin: 18px auto 40px auto;
  border: none;
  height: 5px;
  border-radius: 50px;
  background-color: var(--green-color);
}

.card-container {
  display: grid;
  grid-template-rows: repeat(3, auto);
  grid-gap: 24px;
  padding: 7px;
}

.card {
  display: flex;
  align-items: flex-end;
  background-color: var(--gray);
  border: 2px solid var(--gray);
  margin: 10px;
  border-radius: 8px;
  height: 490px;
}

.card-item {
  background-color: #fff;
  width: 100%;
  height: 45%;
  border-radius: 8px 8px 5px 5px;
}

.popup-content h1 {
  font-family: 'Inter', sans-serif;
  font-style: normal;
  font-weight: 600;
  font-size: 32px;
  line-height: 44px;
  color: #172b4d;
}

.card div > h1 {
  text-align: center;
  margin-top: 16px;
  color: rgba(58, 74, 66, 1);
  font-weight: 600;
}

.stack-container {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  padding: 10px;
}

.stack-item {
  list-style: none;
  background-color: var(--gray);
  padding: 8px 12px;
  font-size: 12px;
  flex-grow: 1;
  color: rgba(58, 74, 66, 1);
  font-weight: 600;
  border-radius: 5px;
  text-align: center;
}

.project-button {
  text-align: center;
  margin: 30px;
}

button {
  padding: 12px;
  background-color: var(--green-color);
  border: none;
  border-radius: 4px;
  color: #fff;
  font-size: 17px;
  font-weight: 500;
  cursor: pointer;
}

/* ================ Popup Mobile ========================= */

.popup-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgb(193, 199, 208);
  display: flex;
  align-items: center;
  justify-content: center;
}

.popup-content {
  position: relative;
  width: 90%;
  height: 95%;
  overflow: auto;
  background-color: #fff;
  padding: 20px;
  border-radius: 16px;
}

.popup-content br {
  display: none;
}

.popup-content .stack-item {
  flex-grow: 0;
}

.close-button {
  position: absolute;
  top: 10px;
  right: 10px;
  cursor: pointer;
  font-weight: bold;
}

.popup-content p {
  margin-top: 12px;
  font-family: 'Inter', sans-serif;
  font-style: normal;
  font-weight: 400;
  font-size: 16px;
  line-height: 26px;
}

.popup-content img {
  margin-top: 15px;
  max-width: 100%;
  height: auto;
  margin-bottom: 20px;
}

.popup-buttons {
  margin-top: 15px;
  display: flex;
  justify-content: space-between;
}

.popup-buttons button {
  padding: 12px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
}

.buttons-desktop {
  display: none;
}

/* ================== About me =================== */

/* About me heading and resume */

.about-heading {
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-image: url("./assets/vector2.png"), url("./assets/vector1.png");
  background-position: left bottom, right top;
  background-repeat: no-repeat;
}

.about-title {
  text-align: center;
  color: var(--blue-main);
  font-size: 40px;
  font-weight: 700;
}

.about-heading > p {
  text-align: center;
  font-size: 20px;
  font-weight: 400;
  color: var(--blue-main);
  margin-top: 24px;
}

.about-button {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

/* Skills Stack */

.skills {
  display: grid;
  grid-template-rows: repeat(3, 1fr);
  gap: 20px;
}

.skills-item {
  height: 316px;
  background-color: var(--gray);
  margin: 24px;
  border-radius: 8px;
  padding: 24px 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 24px;
}

.circle {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 80px;
  height: 80px;
  background-color: #fff;
  border-radius: 50%;
}

.lang-stack {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ============== Contact me ================ */

.contact {
  display: flex;
  flex-direction: column;
  background: url(./assets/Frame.png);
  background-repeat: no-repeat;
  background-position: right bottom;
  background-size: auto;
}

.contact-heading {
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: 40px;
  text-align: center;
  color: var(--blue-main);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  list-style: none;
  margin-top: 10px;
  padding: 20px;
}

.input {
  padding: 1rem;
  width: 100%;
  font-family: "Inter", sans-serif;
  font-style: italic;
  font-size: 15px;
  color: #6b778c;
  border: 1px solid #d0d9d4;
  border-radius: 4px;
}

/* =========Form Validation========== */
.error-message {
  display: none;
  color: red;
  font-size: 12px;
  font-weight: 500;
  margin-top: 5px;
}

.footer-btn {
  display: flex;
  justify-content: center;
}

/* Footer */

.contact-email {
  display: flex;
  justify-content: center;
  font-family: "Inter", sans-serif;
  font-weight: 400;
  font-size: 20px;
  color: var(--blue-main);
}

.footer {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
}

/* ============ Desktop Screen ============= */

@media (min-width: 768px) {
  /* Navigation */

  nav {
    justify-content: space-around;
    position: relative;
    background-color: transparent;
  }

  .nav-icon {
    display: none;
  }

  .nav-links-container {
    display: block;
  }

  .nav-links-container.open {
    display: none;
  }

  .nav-links {
    display: flex;
    gap: 24px;
    list-style: none;
  }

  /* Hero Section */

  .top {
    background: url(./assets/desktop-header.png);
    background-repeat: no-repeat;
    background-size: cover;
    height: 1407.45px;
  }

  .logo {
    display: none;
  }

  .headline {
    background: none;
    margin-top: 10em;
  }

  .introduction br {
    display: none;
  }

  .intro,
  .intro1 {
    font-size: 48px;
  }

  .introduction p {
    max-width: 920px;
    padding: 10px 75px;
  }

  /* Works Section */

  main {
    padding: 80px 0 0 0;
  }

  .works br {
    display: none;
  }

  hr {
    display: none;
  }

  .card-container {
    margin: 80px 0 80px 0;
    grid-template-rows: repeat(2, 1fr);
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 0 135px;
  }

  /* ================ Popup Desktop========================= */

  .popup-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #c1c7d0f1;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .popup-content {
    position: relative;
    width: 50%;
    height: 90%;
    background-color: #fff;
    padding: 24px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
  }

  .close-button {
    margin: 1px 10px;
    cursor: pointer;
    font-weight: bold;
    background: rgba(235, 236, 240, 1);
    color: rgba(103, 121, 142, 1);
    padding: 5px;
    border-radius: 4px;
  }

  .popup-title-container {
    display: inline-flex;
    justify-content: space-between;
  }

  .popup-content img {
    margin-top: 30px;
    width: 100%;
    height: 60%;
    align-self: center;
  }

  .popup-content h1 {
    font-family: 'Inter', sans-serif;
    font-style: normal;
    font-weight: 600;
    font-size: 32px;
    line-height: 44px;
    color: #172b4d;
  }

  .popup-content p {
    margin-top: 10px;
    font-family: 'Inter', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
  }

  .popup-buttons button {
    padding: 12px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
  }

  .buttons-desktop {
    display: flex;
    gap: 8px;
  }

  .buttons-desktop button:first-child {
    width: 115px;
    height: 48px;
  }

  .buttons-desktop button:last-child {
    width: 139px;
    height: 48px;
  }

  .popup-buttons {
    display: none;
  }

  /* About Me */

  .about-heading {
    background-image: url("./assets/Group\ 73.png");
    background-size: cover;
    background-repeat: no-repeat;
    padding: 80px 0;
  }

  .about-heading p {
    width: 920px;
    padding: 0 75px;
  }

  /* Skills Stack */

  .skills {
    grid-template-rows: none;
    grid-template-columns: repeat(3, 1fr);
    padding: 0 133px;
  }

  /* Contact Me */

  .contact {
    flex-direction: row;
    padding: 0 135px 200px 135px;
    gap: 24px;
    margin-top: 80px;
    background-image: url("./assets/Group\ 72.png");
    background-size: cover;
    background-repeat: no-repeat;
  }

  .contact-heading {
    font-size: 30px;
    max-width: 463px;
    align-self: center;
  }

  .contact-item {
    flex: 2;
  }

  .footer-btn {
    justify-content: flex-start;
  }

  /* Footer */

  .footer {
    padding: 16px 0;
    border-top: 1px solid #dfe1e6;
  }
}

/* =============Animations================= */

button:hover {
  background-color: #a1e6c4; /* lighter */
}

button:active {
  background-color: #268455; /* darker */
}

input::placeholder {
  transition: transform 0.2s ease-out;
}

input:hover::placeholder {
  transform: translateX(10px);
}

.card:hover {
  transform: scale(1.1);
  transition: transform 0.5s ease-out;
}

.skills-item:hover {
  transform: scale(1.1);
  transition: transform 0.5s ease-out;
}

.hover:hover {
  background-color: #268455;
  color: white;
  padding: 10px;
  border-radius: 5px;
}

#rotated {
  animation: rotation 4s infinite linear;
}

@keyframes rotation {
  from {
    transform: rotate(0turn);
  }

  to {
    transform: rotate(2turn);
  }
}
