@import "https://fonts.googleapis.com/css?family=Montserrat:300, 400, 700&display=swap";
* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}
html {
  font-size: 10px;
  font-family: "Montserrat", sans-serif;
  scroll-behavior: smooth;
}
a {
  text-decoration: none;
}
.container {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
img {
  height: 100%;
  width: 100%;
  object-fit: cover;
}
p {
  color: black;
  font-size: 1.4rem;
  margin-top: 5px;
  line-height: 2.5rem;
  font-weight: 300;
  letter-spacing: 0.05rem;
}
.section-title {
  font-size: 4rem;
  font-weight: 300;
  color: black;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2rem;
  text-align: center;
}
.section-title span {
  color: crimson;
}

.cta {
  display: inline-block;
  padding: 10px 30px;
  color: white;
  background-color: transparent;
  border: 2px solid crimson;
  font-size: 2rem;
  text-transform: uppercase;
  letter-spacing: 0.1rem;
  margin-top: 30px;
  transition: 0.3s ease;
  transition-property: background-color, color;
}
/* Add spacing between buttons */
.button-spacing {
  margin-left: 20px; /* Adjust as needed */
}

#hero .cta {
  margin-bottom: 30px; /* Creates space below the button */
}
.cta:hover {
  color: white;
  background-color: crimson;
}
.brand h1 {
  font-size: 3rem;
  text-transform: uppercase;
  color: white;
}
.brand h1 span {
  color: crimson;
}

/* Header section */
#header {
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100vw;
  height: auto;
}
#header .header {
  min-height: 8vh;
  background-color: rgba(31, 30, 30, 0.24);
  transition: 0.3s ease background-color;
}
#header .nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  max-width: 1300px;
  padding: 0 10px;
}
#header .nav-list ul {
  list-style: none;
  position: absolute;
  background-color: rgb(31, 30, 30);
  width: 100vw;
  height: 100vh;
  left: 100%;
  top: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1;
  overflow-x: hidden;
  transition: 0.5s ease left;
}
#header .nav-list ul.active {
  left: 0%;
}
#header .nav-list ul a {
  font-size: 2.5rem;
  font-weight: 500;
  letter-spacing: 0.2rem;
  text-decoration: none;
  color: white;
  text-transform: uppercase;
  padding: 20px;
  display: block;
}
#header .nav-list ul a::after {
  content: attr(data-after);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  color: rgba(240, 248, 255, 0.021);
  font-size: 13rem;
  letter-spacing: 50px;
  z-index: -1;
  transition: 0.3s ease letter-spacing;
}
#header .nav-list ul li:hover a::after {
  transform: translate(-50%, -50%) scale(1);
  letter-spacing: initial;
}
#header .nav-list ul li:hover a {
  color: crimson;
}
#header .hamburger {
  height: 60px;
  width: 60px;
  display: inline-block;
  border: 3px solid white;
  border-radius: 50%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  cursor: pointer;
  transform: scale(0.8);
  margin-right: 20px;
}
#header .hamburger:after {
  position: absolute;
  content: "";
  height: 100%;
  width: 100%;
  border-radius: 50%;
  border: 3px solid white;
  animation: hamburger_puls 1s ease infinite;
}
#header .hamburger .bar {
  height: 2px;
  width: 30px;
  position: relative;
  background-color: white;
  z-index: -1;
}
#header .hamburger .bar::after,
#header .hamburger .bar::before {
  content: "";
  position: absolute;
  height: 100%;
  width: 100%;
  left: 0;
  background-color: white;
  transition: 0.3s ease;
  transition-property: top, bottom;
}
#header .hamburger .bar::after {
  top: 8px;
}
#header .hamburger .bar::before {
  bottom: 8px;
}
#header .hamburger.active .bar::before {
  bottom: 0;
}
#header .hamburger.active .bar::after {
  top: 0;
}
/* End Header section */

/* Hero Section */
#hero {
  background-image: url(./img/hero-bg.png);
  background-size: cover;
  background-position: top center;
  position: relative;
  z-index: 1;
}
#hero::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 100%;
  background-color: black;
  opacity: 0.7;
  z-index: -1;
}
#hero .hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 50px;
  justify-content: flex-start;
}
#hero h1 {
  display: block;
  width: fit-content;
  font-size: 4rem;
  position: relative;
  color: transparent;
  animation: text_reveal 0.5s ease forwards;
  animation-delay: 1s;
}
#hero h1:nth-child(1) {
  animation-delay: 1s;
}
#hero h1:nth-child(2) {
  animation-delay: 2s;
}
#hero h1:nth-child(3) {
  animation: text_reveal_name 0.5s ease forwards;
  animation-delay: 3s;
}
#hero h1 span {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  background-color: crimson;
  animation: text_reveal_box 1s ease;
  animation-delay: 0.5s;
}
#hero h1:nth-child(1) span {
  animation-delay: 0.5s;
}
#hero h1:nth-child(2) span {
  animation-delay: 1.5s;
}
#hero h1:nth-child(3) span {
  animation-delay: 2.5s;
}

/* End Hero Section */

/* Services Section */
#services .services {
  flex-direction: column;
  text-align: center;
  max-width: 1500px;
  margin: 0 auto;
  padding: 100px 0;
}
#services .service-top {
  max-width: 500px;
  margin: 0 auto;
}
#services .service-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 50px;
}
#services .service-item {
  flex-basis: 80%;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  padding: 30px;
  border-radius: 10px;
  background-image: url(./img/img-1.png);
  background-size: cover;
  margin: 10px 5%;
  position: relative;
  z-index: 1;
  overflow: hidden;
}
#services .service-item::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 100%;
  background-image: linear-gradient(60deg, #29323c 0%, #485563 100%);
  opacity: 0.9;
  z-index: -1;
}
#services .service-bottom .icon {
  height: 80px;
  width: 80px;
  margin-bottom: 20px;
}
#services .service-item h2 {
  font-size: 2rem;
  color: white;
  margin-bottom: 10px;
  text-transform: uppercase;
  text-align: left; /* Change this from 'center' to 'left' */
}
#services .service-item p {
  color: white;
  text-align: left;
}
/* End Services Section */

/* Projects section */

/* Apply fade effect to the last project */
.project-item:last-child {
  position: relative;
}

/* Fading overlay starting from the middle of the last project */
.project-item:last-child::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%; /* Adjust to control fade start */
  background: linear-gradient(
    to bottom,
    rgba(26, 26, 26, 0) 30%,
    rgba(26, 26, 26, 0.4) 60%,
    rgba(26, 26, 26, 1) 100%
  );
  pointer-events: none;
}

#projects .projects {
  flex-direction: column;
  max-width: 1200px;
  margin: 0 auto;
  padding: 100px 0;
}
#projects .projects-header h1 {
  margin-bottom: 50px;
}
#projects .all-projects {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
#projects .project-item {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  width: 80%;
  margin: 20px auto;
  overflow: hidden;
  border-radius: 10px;
}
#projects .project-info {
  padding: 30px;
  flex-basis: 50%;
  height: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  background-image: linear-gradient(60deg, #29323c 0%, #485563 100%);
  color: white;
}
#projects .project-info h1 {
  font-size: 4rem;
  font-weight: 500;
}
#projects .project-info h2 {
  font-size: 1.8rem;
  font-weight: 500;
  margin-top: 10px;
}
#projects .project-info p {
  color: white;
}
#projects .project-img {
  flex-basis: 50%;
  height: 300px;
  overflow: hidden;
  position: relative;
}
#projects .project-img:after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 100%;
  background-image: linear-gradient(60deg, #29323c 0%, #485563 100%);
  opacity: 0.7;
}
#projects .project-img img {
  transition: 0.3s ease transform;
  width: 100%;
  height: 100%;
}
#projects .project-item:hover .project-img img {
  transform: scale(1.1);
}
/* End Projects section */

/* About Section */
#about .about {
  flex-direction: column-reverse;
  text-align: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 100px 20px;
}
#about .col-left {
  width: 250px;
  height: 360px;
}
#about .col-right {
  width: 100%;
}
#about .col-right h2 {
  font-size: 1.8rem;
  font-weight: 500;
  letter-spacing: 0.2rem;
  margin-bottom: 10px;
}
#about .col-right p {
  margin-bottom: 20px;
}
#about .col-right .cta {
  color: black;
  margin-bottom: 50px;
  padding: 10px 20px;
  font-size: 2rem;
}
#about .col-left .about-img {
  height: 100%;
  width: 100%;
  position: relative;
  border: 10px solid white;
}
#about .col-left .about-img::after {
  content: "";
  position: absolute;
  left: -33px;
  top: 19px;
  height: 98%;
  width: 98%;
  border: 7px solid crimson;
  z-index: -1;
}
/* End About Section */

/* contact Section */
#contact .contact {
  flex-direction: column;
  max-width: 1200px;
  margin: 0 auto;
  width: 90%;
}
#contact .contact-items {
  /* max-width: 400px; */
  width: 100%;
}
#contact .contact-item {
  width: 80%;
  padding: 20px;
  text-align: center;
  border-radius: 10px;
  padding: 30px;
  margin: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  box-shadow: 0px 0px 18px 0 #0000002c;
  transition: 0.3s ease box-shadow;
}
#contact .contact-item:hover {
  box-shadow: 0px 0px 5px 0 #0000002c;
}
#contact .icon {
  width: 70px;
  margin: 0 auto;
  margin-bottom: 10px;
}
#contact .contact-info h1 {
  font-size: 2.5rem;
  font-weight: 500;
  margin-bottom: 5px;
}
#contact .contact-info h2 {
  font-size: 1.3rem;
  line-height: 2rem;
  font-weight: 500;
}
/*End contact Section */

/* Footer */
#footer {
  background-image: linear-gradient(60deg, #29323c 0%, #485563 100%);
}
#footer .footer {
  min-height: 200px;
  flex-direction: column;
  padding-top: 30px;
  padding-bottom: 10px;
}
#footer h2 {
  white-space: nowrap; /* Prevent text wrapping */
  overflow: hidden; /* Hide overflow */
  text-overflow: ellipsis; /* Add "..." if text overflows */
  max-width: 100%; /* Ensure it doesn't exceed container width */
  color: white;
  font-weight: 500;
  font-size: 1.8rem;
  letter-spacing: 0.1rem;
  margin-top: 10px;
  margin-bottom: 10px;
}
#footer .social-icon {
  display: flex;
  margin-bottom: 30px;
}
#footer .social-item {
  height: 50px;
  width: 50px;
  margin: 0 5px;
}
#footer .social-item img {
  filter: grayscale(1);
  transition: 0.3s ease filter;
}
#footer .social-item:hover img {
  filter: grayscale(0);
}
#footer p {
  white-space: nowrap; /* Prevent text wrapping */
  overflow: hidden; /* Hide overflow */
  text-overflow: ellipsis; /* Add "..." if text overflows */
  max-width: 100%; /* Ensure it doesn't exceed container width */
  color: white;
  font-size: 1.3rem;
}
/* End Footer */

/* Keyframes */
@keyframes hamburger_puls {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.4);
  }
}
@keyframes text_reveal_box {
  50% {
    width: 100%;
    left: 0;
  }
  100% {
    width: 0;
    left: 100%;
  }
}
@keyframes text_reveal {
  100% {
    color: white;
  }
}
@keyframes text_reveal_name {
  100% {
    color: crimson;
    font-weight: 500;
  }
}
/* End Keyframes */
/* Optional: Adjust font size for very small screens */
@media only screen and (max-width: 480px) {
  #footer p {
    font-size: 1.2rem !important; /* Slightly smaller font */
  }
  #services .service-item h2 {
    font-size: 1.5rem; /* Even smaller font for mobile devices */
  }
}
/* Mobile-Specific Fixes */

@media only screen and (max-width: 767px) {
  /* General Adjustments */

  .service-top p {
    margin-left: 20px;
    margin-right: 20px;
    width: calc(100% - 40px); /* Ensures text doesn't overflow */
  }

  /* Push hero content down below the fixed header */
  #hero .hero {
    padding-top: 60px; /* Adjust based on header height */
  }

  /* Reduce typewriter text size */
  .typewriter {
    font-size: 5rem !important; /* Force smaller font */
  }

  .typewriter-text {
    font-size: 5rem !important; /* Match the typewriter */
  }
  html {
    font-size: 8px; /* Smaller base font size for mobile */
  }

  .container {
    padding: 0 20px; /* Add padding to avoid content touching the edges */
  }

  /* Header */
  #header .brand h1 {
    font-size: 2.5rem; /* Smaller brand name */
  }

  #header .hamburger {
    transform: scale(0.7); /* Smaller hamburger icon */
    margin-right: 10px;
  }

  /* Hero Section */
  #hero h1 {
    font-size: 5rem; /* Smaller hero text */
  }

  .social-icons a {
    width: 3rem;
    height: 3rem;
    font-size: 1.5rem; /* Smaller social icons */
  }

  .cta {
    font-size: 1.8rem; /* Smaller call-to-action button */
    padding: 8px 20px;
  }

  /* Services Section */
  #services .service-item {
    flex-basis: 100%; /* Full width for service items */
    margin: 10px; /* Adjust margins */
  }
  #services .service-item h2 {
    font-size: 1.8rem; /* Slightly smaller font for tablets */
  }
  /* Projects Section */
  #projects .project-item {
    flex-direction: column; /* Stack project info and image vertically */
  }

  #projects .project-info,
  #projects .project-img {
    flex-basis: 100%; /* Full width for project info and image */
  }

  #projects .project-img {
    height: 200px; /* Smaller project image height */
  }

  /* About Section */
  #about .about {
    flex-direction: column; /* Stack about content vertically */
  }

  #about .col-left {
    width: 100%; /* Full width for profile image */
    height: auto;
    margin-bottom: 20px;
  }

  #about .col-right {
    text-align: center; /* Center-align text */
  }

  /* Contact Section */
  #contact .contact-items {
    flex-direction: column; /* Stack contact items vertically */
  }

  #contact .contact-item {
    width: 100%; /* Full width for contact items */
    margin: 10px 0;
  }

  /* Footer */
  #footer h2 {
    font-size: 1.5rem; /* Smaller footer text */
  }
}
/* Media Query For Tablet */
@media only screen and (min-width: 768px) {
  #hero .hero {
    padding-top: 60px; /* Adjust based on header height */
  }
  .cta {
    font-size: 2.5rem;
    padding: 20px 60px;
  }
  h1.section-title {
    font-size: 6rem;
  }

  /* Hero */
  #hero h1 {
    font-size: 5rem;
  }
  /* End Hero */

  /* Services Section */
  #services .service-bottom .service-item {
    flex-basis: 45%;
    margin: 2.5%;
    min-height: 400px;
  }
  /* End Services Section */

  /* Project */
  #projects .project-item {
    flex-direction: row;
  }
  #projects .project-item:nth-child(even) {
    flex-direction: row-reverse;
  }
  #projects .project-item {
    height: 400px;
    margin: 0;
    width: 100%;
    border-radius: 0;
  }
  #projects .all-projects .project-info {
    height: 100%;
  }
  #projects .all-projects .project-img {
    height: 100%;
  }
  /* End Project */

  /* About */
  #about .about {
    flex-direction: row;
  }
  #about .col-left {
    width: 600px;
    height: 400px;
    padding-left: 60px;
  }
  #about .about .col-left .about-img::after {
    left: -45px;
    top: 34px;
    height: 98%;
    width: 98%;
    border: 10px solid crimson;
  }
  #about .col-right {
    text-align: left;
    padding: 30px;
  }
  #about .col-right h1 {
    text-align: left;
  }
  /* End About */

  /* contact  */
  #contact .contact {
    flex-direction: column;
    padding: 100px 0;
    align-items: center;
    justify-content: center;
    min-width: 20vh;
  }
  #contact .contact-items {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    margin: 0;
  }
  #contact .contact-item {
    width: 30%;
    margin: 0;
    flex-direction: row;
  }
  #contact .contact-item .icon {
    height: 100px;
    width: 100px;
  }
  #contact .contact-item .icon img {
    object-fit: contain;
  }
  #contact .contact-item .contact-info {
    width: 100%;
    text-align: left;
    padding-left: 20px;
  }
  /* End contact  */
}
/* End Media Query For Tablet */

/* Media Query For Desktop */
@media only screen and (min-width: 1200px) {
  /* header */
  #header .hamburger {
    display: none;
  }
  #header .nav-list ul {
    position: initial;
    display: block;
    height: auto;
    width: fit-content;
    background-color: transparent;
  }
  #header .nav-list ul li {
    display: inline-block;
  }
  #header .nav-list ul li a {
    font-size: 1.8rem;
  }
  #header .nav-list ul a:after {
    display: none;
  }
  /* End header */

  #services .service-bottom .service-item {
    flex-basis: 22%;
    margin: 1.5%;
    min-height: 400px;
  }
}
/* End  Media Query For Desktop */

/* ============================= */
/* Typewriter Effect Styling */
/* ============================= */

/* Typewriter Effect */
.typewriter-text {
  color: crimson; /* Red text effect */
  font-weight: bold;
  font-size: 4rem;
}

.typewriter {
  font-size: 4rem;
  color: white;
}
/* Blinking Cursor Animation */
h1 label {
  font-size: 1.8rem;
  font-weight: bold;
  color: white;
  animation: blink 0.8s infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* Social Icons Under Typewriter */
.social-icons a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 4rem;
  height: 4rem;
  background-color: transparent;
  border: 0.2rem solid crimson;
  font-size: 2rem;
  border-radius: 50%;
  margin: 3rem 1.5rem 3rem 0;
  transition: 0.3s ease;
  color: crimson;
}

.social-icons a:hover {
  color: black;
  transform: scale(1.3) translateY(-5px);
  background-color: crimson;
  box-shadow: 0 0 25px crimson;
}

/* Red checkmark styling */
.red-check {
  color: crimson;
  font-weight: bold;
  margin-right: 8px;
  font-size: 1.3rem;
}
/* email styling */
.email-container {
  display: flex;
  align-items: center; /* Ensures the icon and email are aligned */
  gap: 10px; /* Adds spacing between icon and email */
  white-space: nowrap; /* Prevents email from wrapping */
}

.email-link {
  text-decoration: none; /* Removes underline */
  color: black; /* Ensures email is black */
  font-size: 1.2rem; /* Adjust the size if needed */
  font-weight: 500;
  overflow-wrap: break-word; /* Breaks long emails properly */
}

/* Ensure the modal appears above all other elements */
.modal {
  display: none; /* Hidden by default */
  position: fixed;
  z-index: 9999; /* Increased to 9999 to override header and other elements */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.9);
}

/* Modal Content (image) */
.modal-content {
  margin: auto;
  display: block;
  width: auto; /* Override global 'width: 100%' */
  height: auto; /* Override global 'height: 100%' */
  object-fit: contain; /* Ensures the image fits without distortion */
}
/* Fix the project-img pseudo-element blocking clicks */
#projects .project-img::after {
  pointer-events: none; /* Allow clicks to pass through the overlay */
}

/* Ensure images inside .project-img are clickable */
.project-img img {
  pointer-events: auto; /* Explicitly enable clicks */
}

/* Ensure the close button is visible and functional */
.close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  z-index: 10000; /* Higher than the modal */
  cursor: pointer;
}
