@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600;700;800;900&display=swap");
:root {
  --primary-color: #3abff8;
  --page-color: #fafafa;
}

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

/* Optional: remove default list styles and anchor decorations */
ul,
ol {
  list-style: none;
}

a {
  text-decoration: none;
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
  border: none;
  outline: none;
  background: none;
}

/* end basic reset */
html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--page-color);
  font-family: "Poppins", sans-serif;
  line-height: 1.6;
  font-size: 15px;
  color: rgb(117, 117, 117);
}

.page-wrapper {
  max-width: 1200px;
  margin-right: auto;
  margin-left: auto;
  padding: 30px;
  padding-top: 0;
}

/* heading styles */

h1,
h2,
h3 {
  line-height: 1.7;
  color: #333;
  font-weight: 600;
}

h1 {
  font-size: 3rem;
}
h2 {
  font-size: 2.5rem;
}
h4 {
  font-size: 16px;
  line-height: 1.5;
  color: #757575;
  font-weight: 600;
}
p {
  margin-bottom: 1rem;
}

/* link styles */

a:hover {
  color: var(--primary-color);
}

a:active {
  color: var(--primary-color);
}

/* button styles  */
button {
  cursor: pointer;
}
.btn {
  background-color: hsl(0, 0%, 20%);
  color: white;
  font-size: 16px;
  padding: 1rem 2rem;
  border-radius: 16px;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.btn:hover {
  background-color: hsl(0, 0%, 8%);
  color: white;
}

/* section styles */
section {
  margin-top: 5rem;
  padding: 2rem;
}
.hero-title {
  padding-bottom: 3rem;
}
.section-title {
  text-align: center;
  margin-bottom: 2rem;
}
nav {
  position: sticky;
  width: 100vw;
  top: 0;
  z-index: 10;
  display: flex;
  font-size: 14px;
  font-weight: 600;
  color: #333333;
  background-color: hsl(0, 0%, 98%);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.nav-contents {
  max-width: 1200px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  margin-right: auto;
  margin-left: auto;
  width: 100%;
}

.logo {
  font-size: 16px;
  font-weight: 600;
}

.nav-links ul {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.nav-links li {
  cursor: pointer;
  font-weight: 500;
}

/* about section  */
.about-img {
  float: right;
  margin: 0 0 1rem 2rem;
  width: 30%; /* or whatever fits your design */
  height: auto;
  border-radius: 8px;
}

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5rem;
}

.hero-title h4 {
  color: var(--primary-color);
}

.hero-socials ul li {
  margin-bottom: 0.5rem;
}

/* tech section */
#tech {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tech-skills {
  display: flex;
  flex-direction: column;
  max-width: 90%;
  margin-right: auto;
  margin-left: auto;
  align-items: center;
  justify-contents: center;
  text-align: center;
}
.tech-skills h3 {
  margin-bottom: 0.5rem;
}

.stack {
  margin-left: auto;
  margin-right: auto;
  max-width: 1000px;
  padding: 1.5rem;
}

.tech-skills > div span {
  display: inline-block;
  padding: 0.5rem 1rem;
  margin: 0.3rem;
  background: hsl(0, 0%, 90%);
  border-radius: 8px;
  font-weight: 500;
  width: 16rem;
  text-align: left;
}
.tech-skills > div span.last-skill {
  display: block;
  margin: 0.3rem auto;
  text-align: center;
}
.tech-skills div span > img {
  margin-right: 8px;
  vertical-align: middle;
  width: 24px;
}
gray {
  filter: grayscale(100%);
}

/* services section  */
.services-section {
  display: flex;
  gap: 2rem;
  padding: 2rem;
  justify-content: center;
  align-items: center;
}

.show-services {
    margin-top: 0.75rem; 
    display: flex;
    align-items: center;
    color: var(--primary-color);
    font-weight: 500;
  }

.service-card {
  width: 300px;
  padding: 4rem 2rem;
  padding-top: 6rem;
  border-radius: 8px;
  border: 1px solid hsla(0, 0%, 0%, 0.05);
  box-shadow: 0 6px 16px hsla(0, 0%, 0%, 0.1);
}

.service-list-card {
  position: fixed;
  z-index: 999;
  width: 500px;
  height: 500px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: left;
  padding-left: 100px;
  justify-content: center;
  background-color: var(--page-color);
  border-radius: 1.5rem;
  box-shadow: 0 6px 16px hsla(0, 0%, 0%, 0.1);
  transition: all 0.3s ease-in-out;
}
.service-list{
  max-width: 300px;
}
.list-card-title {
  margin-bottom: 0.25rem
}

.service-list > li {
  list-style-type: none;
}

#close-list-card {
  position: absolute;
  top: 1rem;
  right: 1rem;
  cursor: pointer;
  color: #333;
}


.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5); /* dark transparent background */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000; /* higher than nav and other elements */
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}
.overlay.active {
  visibility: visible;
  opacity: 1;
}

/* contact section  */
.contact {
  display: flex;
  flex-wrap: wrap;
  /* gap: 2rem; */
  padding: 4rem 2rem;
}

.contact > div {
  flex: 1 1 300px;
}

/* Left Side Placeholder */
.contact > div:first-child {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #666;
  background-color: rgb(245, 245, 245);
  min-height: 300px;
  text-align: center;
  border-radius: 1.5rem;
}

/* Form Styling */
.contact-form {
  background: var(--page-color);
  margin: 0 2rem;
  max-width: 400px;
}

.contact-form form {
  display: flex;
  flex-direction: column;
}

.contact-form button {
  /* margin-top: 1.5rem; */
}

.form-group {
  position: relative;
  margin-top: 2rem;
}

.form-group label {
  position: absolute;
  top: -0.8rem;
  left: 1rem;
  background: var(--page-color, #fff); /* fallback color */
  padding: 0 0.5rem;
  font-size: 14px;
  color: #333;
  font-weight: 500;
  z-index: 1;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #ccc;
  border-radius: 1rem;
  font-size: 1rem;
  background-color: var(--page-color);
  position: relative;
  z-index: 0;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary-color);
  background: var(--page-color);
  outline: none;
}
.g-recaptcha {
  margin-top: 0.75rem;
  margin: 0.75rem auto 0;
  justify-content: center;
}

/* footer styles */

footer {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  align-items: center;
  padding: 4rem;
  border: none;
  border-top: 1px solid hsla(0, 0%, 80%, 0.7);
}

footer h3 {
  font-size: 1.75rem;
}

footer ul {
  display: flex;
  gap: 1rem;
}

/* responsive styles */
@media (min-width: 770px) {
  .lg-none {
    display: none;
  }
  @media (max-width: 850px) {
    .contact > div:first-child {
      display: none;
    }
  }
}

@media (max-width: 768px) {
  section {
    paadding: 1rem;
    margin-top: 1rem;
  }
  .page-wrapper {
    padding: 1.5rem;
  }

  /*About section */

  #about {
    flex-direction: column;
    gap: 2rem;
    text-align: justify;
    hyphens: auto;
    margin-top: 0px;
  }

  .hero {
    display: block;
    gap: 2em;
  }
  .hero-wrapper {
    display: flex;
    align-items: center;
  }

  .about-img {
    width: 50%;
    float: none;
    margin: 0 auto 1rem 1.5rem;
  }
  .about-img.md-none {
    display: none;
  }

  /* Tech section */

  .stack > span {
    max-width: 46%;
  }
  .mobile-skill {
    min-width: 90%;
  }

  /* Services section */
  .services-section {
    gap: 0.5rem;
    padding: 1rem;
  }

  .contact {
    flex-direction: column;
    padding: 2rem 1rem;
  }
  .contact > div:first-child {
    display: none;
  }

  .contact > div {
    margin-bottom: 2rem;
  }

  .contact-form {
    margin: 0 auto;
  }

  footer {
    padding: 2rem 1rem;
    text-align: center;
  }

  footer ul {
    flex-wrap: wrap;
    justify-content: center;
  }

  .tech-skills > div span {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 480px) {
  h1,
  h2,
  h3 {
    line-height: 1.5;
  }

  h1 {
    font-size: 2.4rem;
  }
  h2 {
    font-size: 2.2rem;
  }
  nav {
    position: fixed; !important;
    top: auto; !important;
    bottom: 0; !important
    left: 0;
    max-width: 96vw;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
    margin-left: 2vw;
    margin-right: 2vw;
  }
  .nav-contents {
    flex-direction: column;
    align-items: center;
  }
  .nav-links ul {
    gap: 0.75rem;
  }
  section {
    paadding: 0.75rem;
    margin-top: 0.5rem;
  }
  .page-wrapper {
    padding: 1rem;
  }

  /*About section */

  .about-img {
    width: 60%;
    float: none;
    margin: 0 auto 1rem 1.5rem;
  }

  /* Tech section */

  .stack > span {
    max-width: 400px;
  }

  /* Services section */
  .services-section {
    flex-wrap: wrap;
  }

  .service-list-card {
  width: 80vw;
  height: 80vw;
  padding-left: 15vw;
}

  .contact {
    flex-direction: column;
    padding: 2rem 1rem;
  }
  .contact > div:first-child {
    display: none;
  }

  .contact > div {
    margin-bottom: 2rem;
  }

  .contact-form {
    margin: 0 auto;
  }

  footer {
    padding: 2rem 1rem;
    text-align: center;
    margin-bottom: 4rem;
  }

  footer ul {
    flex-wrap: wrap;
    justify-content: center;
  }

  .tech-skills > div span {
    width: 100%;
    text-align: center;
  }
  .sm-none {
    display: none;
  }
}

@media (max-width: 380px) {
  #contactForm {
   margin-left: -9vw;
  }
}

