html {
  scroll-behavior: smooth;
}

main {
  vertical-align: center;
}

section {
  height: auto;
  position: relative;
  margin: 0;
  display: flex;
  vertical-align: center;
  padding: 0;
  width: 100%;
}

#container {
  flex-direction: column;
  align-items: center;
  background-image: url(background.png);
  background-size: cover;
  min-height: 100%;
}

#container2 {
  flex-direction: column;
  align-items: center;
  background-image: url(ill1.png);
  background-position: -8rem 100%;
  background-size: 20%;
  background-repeat: no-repeat;
}

header {
  background-color: white;
  flex-direction: row;
  justify-content: right;
  align-items: center;
  display: flex;
  height: 2rem;
  width: 100%;
  margin: 0;
}

footer {
  margin-top: 2rem;
  justify-content: center;
  align-items: center;
}

.menu {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  height: 1.8rem;
  width: 2rem;
  border: none;
  background-color: transparent;
  cursor: pointer;
  position: relative;
  top: 0;
  right: 1rem;
  gap: 0.2rem;
}

.line {
  width: 100%;
  height: 3px;
  background-color: #333;
}

.line2 {
  display: block;
  border: 0.2rem solid #2c9f6f;
  border-radius: 10px;
  margin: 1rem 43%;
}

.aboutme {
  font-family: Inter, sans-serif;
  font-style: normal;
  font-weight: 700;
  justify-content: center;
  text-align: center;
  flex-direction: column;
  height: fit-content;
  margin: 2rem 10%;
}

h1,
#topic h2 {
  font-family: Inter, sans-serif;
  margin: 10%;
  margin-bottom: 0;
  text-align: center;
  font-size: 2.6rem;
  font-weight: 700;
  padding: 0 10px;
  color: #172b4d;
  width: 80%;
}

p {
  font-family: Inter, sans-serif;
  font-weight: 400;
  font-size: 20px;
  margin-bottom: 0;
  color: #172b4d;
  line-height: 28px;
}

.job {
  color: #36b37e;
  font-size: 2.4rem;
  padding: 0;
  width: 90%;
  margin: auto;
}

.icon-bar {
  display: flex;
  position: relative;
  width: 100%;
  height: max-content;
  justify-content: center;
  margin: 0 auto;
}

a {
  text-decoration: none;
  margin-top: 0;
}

.iconan {
  padding: 0 0.8rem;
}

ul {
  display: inline-block;
  list-style: none;
  align-items: center;
  padding: 0;
  margin: 0;
}

li {
  align-items: center;
  display: inline-block;
  margin: 0;
}

i:hover {
  filter: brightness(80%);
}

.work {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.work-card {
  display: flex;
  position: relative;
  flex-direction: column;
  background-color: #d2d2d2;
  border: 1px solid #d0d9d4;
  border-radius: 8px;
  margin: 1rem 1rem;
  text-align: center;
  height: 474px;
}

.work-card:enabled {
  border: 2px solid rgb(40, 184, 246);
}

.text {
  display: flex;
  flex-direction: column;
  position: absolute;
  width: 100%;
  bottom: 0;
  border-radius: 8px;
  background-color: white;
}

.work-card2 {
  display: flex;
  background-color: #ebf0ee;
  flex-direction: column;
  border: 1px solid #d0d9d4;
  border-radius: 8px;
  margin: 1rem 1rem;
  text-align: center;
  padding: 2rem 1rem;
}

#topic {
  justify-content: center;
  width: 100%;
}

h3 {
  font-family: Poppins, sans-serif;
  font-weight: 500px;
  line-height: 2rem;
  text-align: center;
  color: #172b4d;
}

.tags {
  min-width: fit-content;
  padding: 0.3rem;
  border: none;
  margin: 0 auto;
}

button {
  border: none;
  padding: 0.5rem;
  font-family: Inter, sans-serif;
  color: #3a4a42;
}

.see_project {
  background-color: #2aa874;
  align-items: center;
  margin: 0 auto;
  font-family: Inter, sans-serif;
  color: #d2d2d2;
  border-radius: 5px;
}

/* fit ancor tag to button size */
.work-card a,
.project-ancor {
  width: fit-content;
  margin: 1rem auto;
  height: fit-content;
  border-radius: 10px;
}

.project-ancor {
  margin-bottom: 2rem;
}

.aboutme p {
  margin-bottom: 1rem;
}

.but {
  background-color: #fff;
  margin: 5px 3px;
  color: #3dc58c;
  border-radius: 5px;
}

/* add form */

#contact-form {
  display: flex;
  flex-direction: column;
  background-image: url(Frame.png);
  background-position-y: 96%;
  background-position-x: 100%;
  background-repeat: no-repeat;
  align-items: center;
  gap: 24px;
}

#form {
  display: flex;
  flex-direction: column;
  padding: 1rem 0;
  margin-top: 1rem;
  gap: 24px;
  width: 327px;
}

#contact-form h2 {
  width: 20.438rem;
  height: 363px;
  font-size: 40px;
  line-height: 52px;
  font-family: 'Inter', sans-serif;
  font-style: normal;
  font-weight: 700;
  text-align: center;
  color: #172b4d;
}

input {
  box-sizing: border-box;
  height: 48px;
  width: 100%;
  border: 1px solid #d0d9d4;
  border-radius: 4px;
}

input::placeholder {
  font-style: italic;
  color: #6b778c;
}

textarea {
  box-sizing: border-box;
  border: 1px solid #60c095;
  border-radius: 4px;
  height: 114px;
  width: 100%;
  color: #42526e;
  font-size: 15px;
  font-weight: 400;
}

input:hover,
textarea:hover {
  border: 2px solid rgb(40, 184, 246);
}

#form button:enabled {
  display: flex;
  color: #fff;
  margin: auto;
  border-radius: 4px;
  height: 48px;
  letter-spacing: 0.03em;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 17px;
  padding: 12px;
  gap: 10px;
  background-color: #36b37f;
}

#form button:hover {
  background: #36b37f;
  box-shadow: 0 8px 16px rgba(54, 179, 127, 0.24);
  border-radius: 4px;
}

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

#form a {
  width: 100%;
  color: #42526e;
  text-align: center;
  font-family: 'Inter', sans-serif;
  font-size: 20px;
  font-style: normal;
  font-weight: 400;
  margin: 1rem auto;
}

.line3 {
  border: 2px solid #0d151e;
  width: 134px;
  height: 5px;
  left: calc(50% - 134px / 2 - 0.5px);
  bottom: 8px;
  background: #0d151e;
  border-radius: 10px;
  margin: 0.5rem auto;
}

/* end-form */

/* -------------Desktop version ---------- */

@media screen and (min-width: 768px) {
  header {
    display: none;
  }

  #desktop-nav {
    display: flex;
  }

  #mobile-nav {
    display: none;
  }

  .work,
  #container2,
  #contact-form {
    width: 90%;
    margin: 1rem auto;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }

  .work-card {
    padding: 0;
    margin: 0;
  }

  .work-card2 {
    height: 316px;
  }

  #container {
    min-height: max-content;
    align-items: center;
    background-image: url(desktopback.svg);
    background-size: 100%;
    background-repeat: no-repeat;
    height: 55rem;
    width: 100%;
  }

  .background2 {
    background-image: url(ill2.png);
    background-position: 100% 0;
    background-size: cover;
    position: absolute;
    top: 0;
    right: -4rem;
    width: 100%;
    height: 50%;
    z-index: -1;
  }

  .intro {
    display: flex;
    flex-direction: column;
    width: 68%;
    margin: 0 auto;
    align-items: right;
  }

  #action {
    margin: 0 auto;
    border-radius: 50%;
  }

  #contact-form {
    flex-direction: row;
    background-image: none;
  }

  #contact-form h2 {
    width: 53%;
    font-size: 30px;
    text-align: left;
    line-height: 53px;
    padding: 0;
    padding-left: 0.6rem;
  }

  #form {
    width: 47%;
    padding-right: 2rem;
  }

  .formbackground1 {
    background-image: url(lastb1.svg);
    background-position: 0 0;
    background-size: contain;
    background-repeat: no-repeat;
    position: absolute;
    bottom: 0;
    left: -4rem;
    width: 100%;
    height: 60%;
    z-index: 1;
  }

  .formbackground2 {
    background-image: url(lastb2.svg);
    background-size: contain;
    background-repeat: no-repeat;
    position: absolute;
    bottom: 5%;
    left: 25%;
    width: 20%;
    height: 20%;
    z-index: -1;
  }

  .formbackground3 {
    background-image: url(lastb3.svg);
    background-position: 100% 100%;
    background-size: contain;
    background-repeat: no-repeat;
    position: absolute;
    bottom: 0;
    right: -4rem;
    width: 100%;
    height: 60%;
    z-index: -1;
  }

  .line3,
  .line2 {
    display: none;
  }
}

/* media query to solve the responsive problem in desktop-nav with background */
@media (max-width: 1034px) and (min-width: 768px) {
  #container {
    background-size: 110%;
  }
}

/* media query to solve responsive problem in .work-card2 */
@media (max-width: 1110px) and (min-width: 768px) {
  .work-card2 {
    height: 400px;
  }
}

#desktop-nav {
  width: 100%;
  justify-content: center;
}

#desktop-nav ul li {
  color: #344563;
  gap: 8px;
  width: 87px;
  text-align: center;
  padding: 10px 12px;
}

#desktop-nav ul li a {
  text-decoration: none;
  color: #344563;
  font-family: Inter, sans-serif;
  font-style: bold;
  font-size: 15px;
  line-height: 20px;
  transition: font-size 2s font-weight 2s color 2s;
}

/* media query for hide desktop-nav in mobile version */
@media only screen and (max-width: 768px) {
  #desktop-nav {
    display: none;
  }

  #mobile-nav {
    display: flex;
  }
}

/* adding animation */

#desktop-nav ul li a:hover {
  font-size: 1.2rem;
  color: #36b37e;
  font-weight: 500;
  border: 1px solid #36b37e;
  border-radius: 4rem;
  padding: 0.4rem;
}
