:root {
  --background-color: #ffffff;
  --text-color: #000000;
  --button-bg: linear-gradient(90deg, #4d56de, #8c4dde);
  --button-text: #ffffff;
  --link-color: #fff;
  --highlight-color: #4d56de;
  --services-bg: #262626;
  --nav-bg: #ffffff;
  --about-txt: #585555;
  --skills-bg: #c7c5c550;
  --services-hover: #323dd477;
  --services-card-bg: #d4d4d4;
  --layer-hover: linear-gradient(rgba(0, 0, 0, 0.6), #323dd4);
  --layer-text: #ffffff;
}

* {
  margin: 0;
  padding: 0;
  font-family: "Poppins", sans-serif;
  box-sizing: border-box;
}

body.dark-mode {
  --background-color: #080808;
  --text-color: #ffffff;
  --button-bg: linear-gradient(90deg, #4d56de, #8c4dde);
  --button-text: #ffffff;
  --link-color: #ababab;
  --services-bg: #121212;
  --nav-bg: #323030;
  --about-txt: #807b7b;
  --skills-bg: #c7c5c550;
  --services-hover: #323dd477;
  --services-card-bg: #323030;
  --layer-hover: linear-gradient(rgba(0, 0, 0, 0.6), #323dd4);
  --layer-text: #ffffff;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--background-color);
  color: var(--text-color);
}

button {
  background: var(--button-bg);
  color: var(--button-text);
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
}

/* header */

#header {
  width: 100%;
  height: 100vh;
  background: url(assets/static/user2.png) no-repeat fixed;
  background-size: 80%; /* Adjust percentage as needed */
  background-position: left center; /* Aligns image at the bottom center */
}

.container {
  padding: 10px 10%;
}

h1 {
  font-size: 40px;
  color: var(--text-color);
  text-transform: capitalize;
}

nav {
  padding-left: 7%;
  padding-right: 15%;
  padding-top: 10px;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  display: flex;
  position: fixed; /* Makes it fixed */
  top: 0; /* Aligns it to the top of the viewport */
  left: 0; /* Aligns it to the left of the viewport */
  width: 100%; /* Ensures it spans the full width */
  z-index: 1000; /* Keeps it above other content */
  background-color: var(
    --nav-bg
  ); /* Optional: Ensures the background matches your design */
}

nav ul {
  display: none;
}

#menu {
  display: block;
}

nav ul li {
  display: inline-block;
  list-style: none;
  margin: 0 10px;
}

nav ul li a {
  text-decoration: none;
  color: var(--text-color);
  font-size: 18px;
  position: relative; /* Make the <a> the positioning context for ::after */
}

nav ul li a::after {
  content: "";
  width: 0; /* Start with no width */
  height: 3px;
  background: #4d56de;
  position: absolute;
  left: 0;
  bottom: -6px;
  transition: width 0.3s ease; /* Smooth transition */
}

nav ul li a:hover::after {
  width: 100%; /* Expand the underline on hover */
}

.logo {
  width: 140px;
}

.header-text {
  margin-top: 40%;
  font-size: 20px;
  width: 100%;
  flex-wrap: wrap;
  text-transform: uppercase;
}

.header-text h1 {
  font-size: 35px;
  margin-top: 20px;
  text-transform: uppercase;
}

.header-text h1 span {
  color: #4d56de;
}

.header-text h1 span.dark-mode {
  color: #d6f948;
}

/* about */

#about {
  padding: 80px 0;
  color: var(--about-txt);
}

.row {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-wrap: wrap;
}

.about-col-1,
.about-col-2 {
  opacity: 0;
  transform: translateX(-100px); /* Start off-screen to the left */
  transition: transform 0.6s ease-out, opacity 0.6s ease-out;
}

.scroll-in {
  opacity: 1;
  transform: translateX(0); /* Reset to original position */
}

.about-col-1 {
  flex-basis: 35%;
}

.about-col-1 img {
  width: 100%;
  border-radius: 15px;
  transform: scale(1.2);
}

.about-col-2 {
  flex-basis: 60%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.about-col-2 div {
  gap: 20px;
  display: flex;
  flex-direction: column;
}

.about-col-2 p {
  font-size: 15px;
  line-height: 25px;
}

/* Skills */
#skills {
  padding: 50px 0;
  background-color: var(--skills-bg);
}

.skills-list {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 30%;
  margin-top: 50px;
}

.skills-list img {
  width: 35px;
  height: 35px;
}

.skills-list ul {
  display: flex;
  flex-direction: column;
}

.skills-list ul li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: 20px;
  margin-bottom: 20px;
}

.skill-item {
  position: relative;
  opacity: 0;
  transform: translateX(-50px); /* Start from the left */
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.skill-item.visible {
  opacity: 1;
  transform: translateX(0); /* Reset to original position */
}


/* Services */

#services {
  padding: 30px 0;
}

.services-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  grid-gap: 40px;
  margin-top: 50px;
}

.services-list div {
  background: var(--services-card-bg);
  padding: 40px;
  font-size: 13px;
  font-weight: 300;
  border-right: 10px solid #000; /* Added border style and color */
  transition: transform 0.3s, background 0.3s ease; /* Smooth transition for hover effects */
  opacity: 0; /* Hide the element initially */
  transform: translateX(-100px); /* Start from the left */
}

.services-list div.scroll-in {
  opacity: 1; /* Make it visible */
  transform: translateX(0); /* Reset to original position */
  transition: transform 0.6s ease-out, opacity 0.6s ease-out;
}

.services-list div i {
  font-size: 50px;
  margin-bottom: 30px;
}

.services-list div h2 {
  font-size: 30px;
  font-weight: 500;
  margin-bottom: 15px;
}

.services-list div a {
  text-decoration: none;
  color: #fff;
  font-size: 12px;
  margin-top: 20px;
  display: inline-block;
}

.services-list div:hover {
  background: var(--services-hover);
  transform: translateY(-10px);
}

/* Portfolio */

#portfolio {
  padding: 30px 0;
  background-color: var(--skills-bg);
}

.work-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  grid-gap: 40px;
  margin-top: 50px;
}

.work {
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(70px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.work.visible {
  opacity: 1;
  transform: translateY(0);
}

.work img {
  width: 100%;
  height: 200px; /* Fixed height */
  object-fit: cover; /* Ensures the image maintains aspect ratio and fills the height without stretching */
  border-radius: 10px;
  display: block;
  transition: transform 0.5s ease;
}

.layer {
  width: 100%;
  height: 0;
  background: var(--layer-hover);
  border-radius: 10px;
  position: absolute;
  left: 0;
  bottom: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 0 40x;
  text-align: center;
  font-size: 14px;
  transition: height 0.5s ease;
  color: var(--layer-text);
}

.layer h3 {
  font-weight: 500;
  margin-bottom: 20px;
}

.layer a {
  margin-top: 20px;
  color: #4d56de;
  text-decoration: none;
  font-size: 18px;
  line-height: 60px;
  background: #fff;
  width: 60px;
  height: 60px;
  border-radius: 50%;
}

.work:hover img {
  transform: scale(1.1);
}

.work:hover .layer {
  height: 100%;
}

.btn {
  display: block;
  width: fit-content;
  text-decoration: none;
}

/* Contact */

#contact {
  padding: 30px 0;
}

#contact-text {
  margin-top: 20px;
  margin-bottom: 20px;
  justify-self: center;
  text-align: center;
  color: #807b7b;
}
.copyright {
  text-align: center;
  justify-self: center;
  margin-top: 20px;
  margin-bottom: 30px;
}

.copyright span {
  color: #4d56de;
}

#map {
  margin-top: 40px;
}

.contact-left {
  display: flex;
  flex-direction: column;
  justify-content: start;
  gap: 10px;
  margin-bottom: 10px;
}

.contact-left .email:hover {
  color: #4d56de;
  transform: scale(1.0001);
  transition: all 0.3s ease; /* Adds smooth transition */
}

.contact-left p i {
  color: #4d56de;
  margin-right: 15px;
  font-size: 20px;
}

.social-icons {
  margin-top: 30px;
}
.social-icons a {
  text-decoration: none;
  color: #ababab;
  font-size: 30px;
  margin-right: 15px;
  display: inline-block;
}

.social-icons a:hover {
  color: #4d56de;
  transform: translateY(-5px);
}

.btn.btn2 {
  display: inline-block;
  width: 100%;
}

.contact-right {
  flex-basis: 60%;
}

.contact-right form {
  width: 100%;
  display: flex;
  gap: 20px;
  flex-direction: column;
}

form input {
  margin-bottom: 15px;
  height: 45px;
}

form input,
form textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #4d56de;
  border-radius: 5px;
}

/* Responsive Design */

/* Small devices (sm, >600px) */
@media screen and (min-width: 600px) {
  /* Header */
  .header-text {
    margin-top: 40%;
    font-size: 25px;
  }

  .header-text h1 {
    font-size: 45px;
    margin-top: 20px;
  }

  #menu {
    display: none;
  }
  .logo {
    width: 140px;
  }

  nav ul {
    display: flex;
  }

  /* about */

  .row {
    flex-direction: row;
  }

  .about-col-2 p {
    font-size: 13px;
    line-height: 20px;
  }

  .sub-title {
    font-size: 40px;
  }
}

/* Large devices (lg, ≥900px) */
@media screen and (min-width: 900px) {
  /* Header */

  #header {
    background-position: right bottom; /* Aligns image at the bottom center */
    background-size: 40%; /* Adjust percentage as needed */
  }
  .header-text {
    margin-top: 20%;
    font-size: 20px;
    width: 75%;
  }

  .header-text h1 {
    font-size: 50px;
    margin-top: 20px;
  }

  #menu {
    display: none;
  }
  .logo {
    width: 140px;
  }

  nav ul {
    display: flex;
  }

  /* about */
  .about-col-2 p {
    font-size: 15px;
    line-height: 20px;
  }

  .sub-title {
    font-size: 50px;
  }

  /* Contact */

  .contact-right form {
    flex-direction: row;
  }
}

/* Large devices (lg, ≥1200px) */
@media screen and (min-width: 1200px) {
  /* Header */

  .header-text {
    margin-top: 20%;
    font-size: 35px;
  }

  .header-text h1 {
    font-size: 65px;
    margin-top: 20px;
  }

  #menu {
    display: none;
  }
  .logo {
    width: 140px;
  }

  nav ul {
    display: flex;
  }

  /* about */
  .about-col-2 p {
    font-size: 20px;
    line-height: 25px;
  }

  .sub-title {
    font-size: 60px;
  }
}
