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

html {
  font-size: clamp(12px, 1.2vw + 1rem, 16px);
  scroll-behavior: smooth;
}

body {
  background-color: #f3f3f3;
  font-family: "Inter", sans-serif;
}

a {
  text-decoration: none;
  /* color: none; */
}

.header {
  background-color: #d8dfe5;
  border-bottom-left-radius: 200px;
  border-bottom-right-radius: 200px;
}

.header__nav {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding-top: 1rem;
}

.header__name {
  text-align: center;
}

.header__name h1 {
  text-transform: uppercase;
  font-size: 4rem;
  line-height: 80px;
  margin-top: 10rem;
}

.header__name p {
  margin-top: 1.5rem;
}

.header__image {
  position: relative;
  display: inline-block;
  /* max-width: 350px; */
  width: 100%;
}

.header__image img {
  margin-top: 5rem;
  width: 100%;
  height: 37rem;
  object-fit: cover;
  border-radius: 300px;
  /* aspect-ratio: 1/1; */
  object-position: center 10%;
}

.header_btn {
  width: 20rem;
  padding: 1rem;
  background-color: bisque;
  color: rgb(55, 55, 55);
  border: none;
  border-radius: 140px;
  position: absolute;
  top: 93%;
  left: 36%;
  font-size: 2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.header_btn:hover {
  transform: scale(1.05);
  border: 0.2px solid white;
}

.header__about {
  margin-top: 5rem;
  text-align: center;
  padding-bottom: 6rem;
}

.header__about p {
  line-height: 30px;
  margin-top: 10rem;
}

/* --------------------------------- */

.main {
  margin-top: 10rem;
}

.main__techStack h2 {
  text-transform: uppercase;
  text-align: center;
  font-size: 4rem;
}

.main__techStack p {
  text-align: center;
}

.main__techStack__grid {
  margin-top: 7rem;
  display: grid;
  grid-template-areas:
    "aa bb cc"
    "ee bb hh";
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 17rem 17rem;
  width: 100%;
  height: auto;
  overflow: hidden;
  gap: 1rem;
}

.main__techStack__grid i {
  font-size: 4rem;
  margin-left: 1rem;
  margin-bottom: 1.3rem;
}

.main__techStack__grid__1 {
  grid-area: aa;
  width: 100%;
  height: 17rem;
  border-right: 0.5px dashed rgb(69, 69, 69);
  border-bottom: 0.5px dashed rgb(69, 69, 69);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.main__techStack__grid__1__icon {
  justify-items: center;
  align-items: center;
  display: flex;
}

.main__techStack__grid__1 i:nth-child(1) {
  color: #f1692e;
}

.main__techStack__grid__1 i:nth-child(2) {
  color: #0873bc;
}

.main__techStack__grid__1 i:nth-child(3) {
  color: #f0dc54;
}

.main__techStack__grid__1 i:nth-child(4) {
  color: #65dbfb;
}

.main__techStack__grid__2 {
  grid-area: cc;
  width: 100%;
  height: 17rem;
  border-left: 0.5px dashed rgb(69, 69, 69);
  border-bottom: 0.5px dashed rgb(69, 69, 69);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.main__techStack__grid__2 i:nth-child(1) {
  color: #84bf08;
}

.main__techStack__grid__2 i:nth-child(2) {
  color: #f0dc54;
}

.main__techStack__grid__3 {
  grid-area: ee;
  width: 100%;
  height: 17rem;
  border-right: 0.5px dashed rgb(69, 69, 69);
  border-top: 0.5px dashed rgb(69, 69, 69);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.main__techStack__grid__3 i:nth-child(1) {
  color: #2f64cc;
}

.main__techStack__grid__3 i:nth-child(2) {
  color: #51aa4f;
}

.main__techStack__grid__4 {
  grid-area: hh;
  width: 100%;
  height: 17rem;
  border-left: 0.5px dashed rgb(69, 69, 69);
  border-top: 0.5px dashed rgb(69, 69, 69);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.main__techStack__grid__4 i:nth-child(1) {
  color: #006fb6;
}

.main__techStack__grid__4 i:nth-child(3) {
  color: #ff9c08;
}

.main__techStack__grid__5 {
  grid-area: bb;
  overflow: hidden;
}

.main__techStack__grid__5 img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 30px;
  object-position: 30% center;
}

/* -------------------------------- */

.main__project {
  margin-top: 14rem;
}

.main__project h2 {
  text-align: center;
  text-transform: uppercase;
  font-size: 4rem;
}

.main__project__grid {
  margin-top: 5rem;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: auto;
  width: 100%;
  height: auto;
  overflow: hidden;
  gap: 1rem;
  grid-template-areas:
    "aa bb cc"
    "ee ee cc";
}

.main__project__grid h3,
.main__project__grid p {
  padding: 0.7rem;
}

.main__project__grid__1 {
  grid-area: aa;
  overflow: hidden;
  cursor: pointer;
  border-radius: 30px;
  background-color: white;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  /* height: 25rem; */
  justify-content: space-between;
}

.main__project__grid__1:hover img {
  transform: scale(1.05);
}

.main__project__grid__2 {
  overflow: hidden;
  cursor: pointer;
  border-radius: 30px;
  grid-area: bb;
  background-color: white;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  /* height: 25rem; */
  justify-content: space-between;
}

.main__project__grid__2:hover img {
  transform: scale(1.05);
}

.main__project__grid__3 {
  overflow: hidden;
  padding: 1rem;
  cursor: pointer;
  border-radius: 30px;
  grid-area: ee;
  background-color: white;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
}

.main__project__grid__3 p {
  padding-right: 1.2rem;
}

.main__project__grid__3 img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  border-radius: 30px;
  transition: transform 0.5s ease;
}

.main__project__grid__3:hover img {
  transform: scale(1.05);
}

.main__project__grid__5 {
  cursor: pointer;
  overflow: hidden;
  border-radius: 30px;
  padding: 1rem;
  grid-area: cc;
  background-color: white;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.main__project__grid__1 img,
.main__project__grid__2 img {
  width: 100%;
  height: 230px;
  margin-top: 1rem; /* cách phần text phía trên */
  margin-bottom: 0.3rem;
  object-fit: cover;
  border-radius: 30px;
  transition: transform 0.5s ease;
}

.main__project__grid__5 img {
  width: 100%;
  height: 90%;
  margin-top: 1rem;
  margin-bottom: 0.3rem;
  object-fit: cover;
  border-radius: 30px;
  transition: transform 0.5s ease;
}

.main__project__grid__5:hover img {
  transform: scale(1.05);
}

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

.main__project__2 h2 {
  font-size: 2rem;
}

.project {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  position: relative;
  padding: 2rem;
  margin-top: 3rem;
}

/* Ảnh bên phải */
.project__2__image {
  position: relative;
  flex: 1;
}

.project__2__image img {
  width: 100%;
  height: 40rem;
  border-radius: 30px;
  display: block;
  object-fit: cover;
}

/* Div chữ chồng lên 1 khúc ảnh */
.project__text {
  flex: 1;
  background: rgba(25, 25, 40, 0.8);
  padding: 2rem;
  border-radius: 15px;
  position: relative;
  z-index: 2;
  margin-right: -5rem; /* đây là phần “chồng lên ảnh” */
  backdrop-filter: blur(6px);
  background: rgba(151, 151, 156, 0.7); /* nền mờ đẹp */
  color: white;
  padding: 1.5rem;
  border-radius: 30px;
  max-width: 45%;
  backdrop-filter: blur(6px); /* hiệu ứng kính mờ */
}

.project {
  display: flex;
  align-items: center;
  gap: 2rem;
  position: relative;
  padding: 2rem;
}

/* khi thêm class .reverse thì đảo ngược vị trí */
.project.reverse {
  flex-direction: row-reverse;
}

/* Cập nhật lại phần margin chồng lên */
.project__text {
  flex: 1;
  background: rgba(25, 25, 40, 0.8);
  color: white;
  padding: 2rem;
  border-radius: 30px;
  position: relative;
  z-index: 2;
  margin-right: -5rem; /* mặc định chồng qua ảnh bên phải */
}

.project__text:hover {
  cursor: pointer;
}


.project.reverse .project__text {
  margin-right: 0;
  margin-left: -5rem; /* khi đảo ngược thì chồng qua ảnh bên trái */
}

.icons {
  font-size: 2rem;
  transition: transform 0.5s ease;
}

.project__text i {
  transition: transform 0.3s ease;
}

.project__text:hover i {
  transform: scale(1.5);
}

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

.main__philosophy__text {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.main__philosophy__text p {
  font-size: 1.2rem;
}

.main__philosophy__text h2 {
  font-size: 3rem;
}

.main__philosophy__card {
  margin-top: 5rem;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2rem;
}

.main__philosophy__card__1 {
  border-radius: 20px;
  background-color: white;
  padding: 1rem;
}

.main__philosophy__card__1 h3 {
  padding: 0.6rem;
  font-weight: bold;
  background-color: black;
  border-radius: 20px;
  color: white;
}

.main__philosophy__card__1 p {
  margin-top: 1.5rem;
}

/* -------------------------------- */

.footer {
  margin-top: 10rem;
  border-top-left-radius: 200px;
  border-top-right-radius: 200px;
  background-color: #d8dfe5;
}
.contact h2 {
  text-align: center;
  font-size: 4rem;
  padding-top: 7rem;
}

.contact__div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  justify-items: center;
}

.contact__div__form {
  display: flex;
  flex-direction: column;
  padding: 5rem;
}

.contact__div__form label {
  margin-top: 3rem;
  margin-bottom: 5px;
}

.contact__div__form input,
.contact__div__form textarea {
  padding: 1rem;
  border-radius: 20px;
  border: 0.5px solid black;
  /* margin-top: 3rem; */
}

.contact__div__form button {
  width: 10rem;
  border-radius: 25px;
  padding: 0.8rem;
  margin: 3rem auto;
}

.contact__div__card {
  width: 20rem;
  height: 30rem;
  background-color: #f3f3f3;
  text-align: start;
  border-radius: 25px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: start;
  height: 30rem;
  padding-left: 3rem;
}

.contact__div__card img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border: 0.5px solid black;
  padding: 5px;
  border-radius: 50%;
  margin-bottom: 4rem;
  object-position: top;
}

.contact__div__card i {
  font-size: 2.5rem;
  margin-top: 2rem;
  margin-left: 0.7rem;
  transition: transform 0.3s ease;
}

.contact__div__card:hover i {
  cursor: pointer;
  transform: scale(1.3);
}

@media (max-width: 900px) {
  .header__image img {
    border-radius: 70% / 100%;
  }

  .header_btn {
    left: 26%;
  }

  .main__techStack__grid {
    display: flex;
    flex-direction: column;
  }
  .main__project__grid {
    display: flex;
    flex-direction: column;
  }

  .main__philosophy__text {
    display: flex;
    flex-direction: column;
  }
}

@media (max-width: 750px) {
  .header__image img {
    height: 22rem;
  }

  .header_btn {
    left: 19%;
    padding: 0.3rem;
    font-size: 1.5rem;
  }

  .project__2__image img {
    height: 30rem;
  }

  .main__philosophy__card {
    display: flex;
    flex-direction: column;
  }

  .contact__div {
    display: flex;
    flex-direction: column;
  }

  .contact__div__form {
    padding: 0;
  }

  .contact__div__card {
    margin-top: 5rem;
    margin-bottom: 3rem;
  }
}

@media (max-width: 500px) {
  .header__name h1 {
    line-height: 59px;
    margin-top: 5rem;
  }

  .header__image img {
    height: 15rem;
  }

  .header {
    border-bottom-left-radius: 80px;
    border-bottom-right-radius: 80px;
  }

  .header_btn {
    left: 30%;
    padding: 0.3rem;
    font-size: 1.5rem;
    width: 10rem;
  }

  .header__name h1,
  .main__techStack h2,
  .main__project h2 {
    font-size: 3rem;
  }

  .main__project__2 h2 {
    font-size: 2rem;
  }

  .project {
    flex-direction: column;
    border: 0.2px solid black;
    border-radius: 30px;
    margin-top: 3rem;
  }

  .project__text {
    max-width: 100%;
    margin-right: 0;
  }

  .project.reverse {
    flex-direction: column;
  }

  .project.reverse .project__text {
    margin-right: 0;
    margin-left: 0;
  }

   .project__2__image img {
    height: 25rem;
  }


  .footer {
    border-top-left-radius: 80px;
    border-top-right-radius: 80px;
  }

  .contact h2 {
    font-size: 3rem;
  }
}
