* {
  margin: 0;
  padding: 0;
}
.container {
  padding: 40px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(3, auto);
  grid-template-areas:
    "header header header header"
    "main main main main"
    "footer footer footer footer";
  background-color: black;
  color: #fcfcfc;
  font-family: "Inter", sans-serif;
  line-height: 1.5;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}
.mobile {
  display: none;
  color: black;
  font-size: 30px;
  cursor: pointer;
}
h1 {
  font-size: 3rem;
}
/* Header Section */
header {
  grid-area: header;
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  justify-content: center;
  text-align: center;
  border-bottom: 1px solid #91d8f7;
}
.logo {
  display: flex;
  flex: 1 1 0;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 50px;
}
.logo > img {
  width: 30vw;
  max-width: 150px;
  min-width: 100px;
}
nav > ul {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  flex: 1 1 0;
  gap: 10px;
}
nav > ul > li > a {
  position: relative;
  color: #fcfcfc;
  text-decoration: none;
  transition: color 0.3s ease;
}
.git {
  position: relative;
  color: #91d8f7;
  text-decoration: none;
  transition: color 0.3s ease;
}
.git::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0%;
  height: 2px;
  background-color: #91d8f7;
  transition: width 0.3s ease-in-out;
}
.git:hover::after {
  width: 100%;
}
nav > ul > li > a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0%;
  height: 2px;
  background-color: #91d8f7;
  transition: width 0.3s ease-in-out;
}

nav > ul > li > a:hover::after {
  width: 100%;
}
.hero {
  display: flex;
  flex: 1 1 0;
  align-items: center;
  justify-content: space-evenly;
  text-align: left;
  margin-bottom: 30px;
}
.pics {
  width: 20%;
  order: 1;
}
.pics > img {
  width: 100%;
  border-radius: 2rem;
}
.infom {
  width: 40%;
}
/* Main section */
main {
  grid-area: main;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(3, auto);
  grid-template-areas:
    "projects projects projects projects"
    "about-me about-me about-me about-me"
    "contact contact contact contact";
  gap: 10px;
}
/* Projects Section */
.projects {
  grid-area: projects;
  border-bottom: 1px solid #91d8f7;
  margin-top: 20px;
}
.project {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex: 1 1 0;
  gap: 20px;
  width: 100%;
  margin-bottom: 50px;
}
.proj {
  gap: 20px;
  align-self: flex-start;
}
.proj > h1 {
  margin-bottom: 20px;
}
.proj > p {
  margin-bottom: 30px;
}
.project-card {
  width: 70%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr;
  justify-content: center;
  align-items: center;
}
.img {
  width: 60%;
  padding: 20px;
  border-radius: 10px;
  background-color: grey;
}
.img > img {
  width: 100%;
  border-radius: 10px;
}
.details {
  padding: 20px;
}
.details > h3 {
  margin-bottom: 10px;
}
.details > p {
  margin-bottom: 20px;
}
.details > a {
  position: relative;
  color: #91d8f7;
  text-decoration: none;
  margin-right: 10px;
  transition: color 0.3s ease;
}

.details > a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0%;
  height: 2px;
  background-color: #91d8f7;
  transition: width 0.3s ease-in-out;
}

.details > a:hover::after {
  width: 100%;
}

/* About Section*/
.about-me {
  grid-area: about-me;
  border-bottom: 1px solid #91d8f7;
}
.about {
  margin-top: 20px;
  margin-bottom: 20px;
  display: flex;
  flex: 1 1 0;
  justify-content: space-between;
  align-items: flex-start;
}
.details-about {
  width: 60%;
  line-height: 1.5;
}
.details-about > h3 {
  margin-bottom: 10px;
}
/* Contact Section */
.contact {
  grid-area: contact;
  border-bottom: 1px solid #91d8f7;
  display: flex;
  flex: 1 1 0;
  justify-content: space-around;
  align-items: flex-start;
}
.connect {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  justify-content: center;
  align-items: flex-start;
}
.con > p > a {
  position: relative;
  color: #91d8f7;
  text-decoration: none;
  transition: color 0.3s ease;
}

.con > p > a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0%;
  height: 2px;
  background-color: #91d8f7;
  transition: width 0.3s ease-in-out;
}

.con > p > a:hover::after {
  width: 100%;
}
.social > ul {
  list-style: none;
  display: flex;
  flex: 1 1 0;
  align-items: center;
  justify-content: space-around;
  gap: 10px;
  font-size: 25px;
}
.social > ul > li > a {
  color: #fcfcfc;
  transition: color 0.3s ease;
}

.social > ul > li > a:hover {
  color: #91d8f7;
}
form {
  width: 30%;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: flex-start;
}
label {
  font-size: 15px;
}
input {
  width: 60%;
  padding: 10px 20px;
  border-radius: 5px;
  border: none;
  outline: none;
  background-color: #333;
  color: white;
  margin-bottom: 20px;
}
textarea {
  width: 60%;
  padding: 10px 20px;
  border-radius: 5px;
  border: none;
  outline: none;
  background-color: #333;
  color: white;
}
input[type="submit"] {
  margin-top: 10px;
  background-color: #91d8f7;
  color: #333;
  border: none;
  cursor: pointer;
  font-weight: 700;
}
input[type="submit"]:hover {
  background-color: transparent;
  border: 1px solid #91d8f7;
  color: white;
}
/* Footer Section */
footer {
  grid-area: footer;
}
.explain {
  border-bottom: 1px solid #91d8f7;
}

/* ===================== */
/* Thank You Page Styles */
/* ===================== */
.thank-you-container {
  animation: fadeIn 1.2s ease-in-out;
  background-color: #111;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 0 15px rgba(145, 216, 247, 0.2);
  max-width: 500px;
  width: 90%;
  margin: 100px auto;
  text-align: center;
  color: #fcfcfc;
  font-family: "Inter", sans-serif;
}

.thank-you-container img {
  width: 150px;
  margin-bottom: 20px;
}

.thank-you-container h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  color: #91d8f7;
}

.thank-you-container p {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 30px;
}

.back-home {
  text-decoration: none;
  background-color: #91d8f7;
  color: black;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.3s ease;
  display: inline-block;
}

.back-home:hover {
  background-color: transparent;
  color: #91d8f7;
  border: 1px solid #91d8f7;
  transform: scale(1.05);
}

/* Animation keyframes */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive styles for thank-you */
@media (max-width: 500px) {
  .thank-you-container {
    padding: 30px 20px;
  }

  .thank-you-container h1 {
    font-size: 2rem;
  }

  .thank-you-container p {
    font-size: 1rem;
  }

  .back-home {
    font-size: 0.9rem;
    padding: 10px 20px;
  }
}

@media (max-width: 400px) {
  .container {
    grid-template-columns: 1fr;
    grid-template-areas:
      "header"
      "main"
      "footer";
    text-align: center;
  }
  h1 {
    font-size: 2rem;
  }
  nav {
    display: none;
  }
  .mobile {
    color: #91d8f7;
  }
  #nav-menu {
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    flex-direction: column;
    gap: 20px;
    padding: 20px 0;
    align-items: center;
    transform: translateY(-200%);
    transition: transform 0.3s ease-in-out;
    z-index: 1000;
  }

  #nav-menu.show-nav {
    transform: translateY(0);
  }

  #nav-menu ul {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  #nav-menu.show-nav {
    display: flex;
  }
  .hero {
    flex-direction: column;
    text-align: center;
    justify-content: center;
  }
  .infom {
    width: 100%;
  }
  .pics {
    order: -1;
    padding: 10px;
    width: 80%;
  }
  .pics > img {
    width: 100%;
    border-radius: 1rem;
  }
  main {
    grid-template-columns: 1fr;
    grid-template-areas:
      "projects"
      "about-me"
      "contact";
  }
  .project-card {
    grid-template-columns: 1fr;
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 100%;
  }
  .img {
    width: 80%;
    padding: 10px;
  }
  .details {
    width: 70%;
  }
  .about {
    flex-direction: column;
    text-align: center;
    gap: 20px;
    justify-content: center;
    align-items: center;
  }
  .details-about {
    width: 90%;
  }
  .contact {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 20px;
  }
  form {
    width: 90%;
    padding: 20px;
  }
  input {
    width: 80%;
  }
  textarea {
    width: 80%;
  }
  input[type="submit"] {
    width: 40%;
    align-self: center;
  }
}
/* Scroll to Top Button Styles */
#scrollToTopBtn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
  background-color: #00b894;
  color: white;
  border: none;
  padding: 12px 14px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

#scrollToTopBtn:hover {
  background-color: #019875;
  transform: scale(1.1);
}

#scrollToTopBtn.show {
  opacity: 1;
  visibility: visible;
}
/* ---------------------- */
/* 📱 Devices < 768px (Tablets & Phones) */
@media (max-width: 768px) {
  .container {
    padding: 20px;
  }

  h1 {
    font-size: 2.2rem;
  }

  nav {
    display: none;
  }

  .mobile {
    display: block; /* 👈 Show the hamburger icon */
    color: #91d8f7;
  }

  #nav-menu {
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    flex-direction: column;
    gap: 20px;
    padding: 20px 0;
    align-items: center;
    transform: translateY(-200%);
    transition: transform 0.3s ease-in-out;
    z-index: 1000;
  }

  #nav-menu.show-nav {
    display: flex;
    transform: translateY(0);
  }

  #nav-menu ul {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .hero {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }

  .infom {
    width: 100%;
  }

  .pics {
    width: 70%;
  }

  .project-card {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .img,
  .details {
    width: 90%;
  }

  .about {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .details-about {
    width: 95%;
    text-align: center;
  }

  .contact {
    flex-direction: column;
    gap: 30px;
  }

  form {
    width: 90%;
  }

  input,
  textarea {
    width: 100%;
  }

  input[type="submit"] {
    width: 60%;
    align-self: center;
  }
}

/* ---------------------- */
/* 📱 Devices < 600px (Large Phones) */
@media (max-width: 600px) {
  h1 {
    font-size: 2rem;
  }

  .logo > img {
    width: 140px;
  }

  .project-card {
    padding: 10px;
  }
}

/* ---------------------- */
/* 📱 Devices < 400px (Small Phones) */
@media (max-width: 400px) {
  h1 {
    font-size: 1.8rem;
  }

  .pics {
    width: 90%;
  }

  .img,
  .details {
    width: 95%;
  }

  .logo > img {
    width: 120px;
  }

  input[type="submit"] {
    font-size: 14px;
    padding: 10px;
  }
}
* {
  word-break: break-word;
  box-sizing: border-box;
}

body {
  overflow-x: hidden;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
@media (max-width: 350px) {
  .hero {
    flex-direction: column;
    align-items: center;
  }

  .pics {
    width: 90%;
  }

  .details,
  .details-about,
  form,
  input,
  textarea {
    width: 100%;
  }

  h1 {
    font-size: 1.6rem;
  }

  .project-card {
    width: 100%;
    padding: 10px;
  }
}
