@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap");

:root {
  --primary-color: #a855f7;
  --primary-color-dark: #9333ea;
  --secondary-color: #ca8a04;
  --text-dark: #1f2937;
  --text-light: #6b7280;
  --extra-light: #faf5ff;
  --max-width: 1200px;
}

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

html, body {
  overflow-x: hidden;
}

a {
  text-decoration: none;
}

h1 {
  text-align: center;
  font-size: 2.4rem;
  font-weight: 600;
  margin-bottom: 2rem;
  margin-top: 2rem;
}

body {
  overflow-x: hidden;
  font-family: "Poppins", sans-serif;
  background-color: var(--extra-light);
}



nav {
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  background-color: #ffffff;
  z-index: 99;
  transition: top 0.3s; /* add a smooth transition effect */
}

nav.scrolled {
  top: -100%; /* move the nav out of view when scrolled down */
}

.nav__content {
  max-width: var(--max-width);
  margin: auto;
  padding: 1.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

nav .logo a {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary-color);
  transition: 0.3s;
}
nav .logo a:hover {
  color: var(--primary-color-dark);
}

nav .checkbox {
  display: none;
}

nav input {
  display: none;
}
nav .checkbox i {
  font-size: 2rem;
  color: var(--primary-color);
  cursor: pointer;
}

nav ul {
  display: flex;
  align-items: center;
  gap: 1rem;
  list-style: none;
  transition: left 0.3s;
}

nav ul li a {
  padding: 0.5rem 1rem;
  border: 2px solid transparent;
  text-decoration: none;
  font-weight: 600;
  color: var(--text-dark);
  transition: 0.3s;
}

nav ul li a:hover {
  color: var(--secondary-color);
}

.active-nav {
  border-bottom-color: var(--secondary-color);
  color: var(--secondary-color);
}

.sun, .moon{
  width: 20px;
  height: 20px;
}

.sun{
  display: none;
}

.dark-mode-btn{
  background-color: transparent;
  border: none;
}

.main_container {
  min-height: 100vh;
  max-width: var(--max-width);
  margin: auto;
  padding: 1rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4rem;
}

.content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-top: 4.5rem;
}

.subtitle {
  letter-spacing: 2px;
  color: var(--text-light);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.title {
  font-size: 2.4rem;
  font-weight: 400;
  line-height: 3rem;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.title span {
  font-weight: 600;
}

.description {
  line-height: 1.5rem;
  color: var(--text-light);
  margin-bottom: 2rem;
}

.black{
  color: black;
}

.action__btns {
  display: flex;
  gap: 1rem;
}

.action__btns button {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 2px;
  padding: 1rem 2rem;
  outline: none;
  border: 2px solid var(--primary-color);
  border-radius: 10px;
  transition: 0.3s;
  cursor: pointer;
}

.about_btn {
  background-color: var(--primary-color-dark);
  color: white;
}

.resume_btn {
  color: var(--primary-color);
}

.resume_btn:hover {
  background-color: var(--primary-color-dark);
  color: #ffffff;
}


.image {
  display: grid;
  place-items: center;
}

.image img {
  width: min(25rem, 90%);
  border-radius: 100%;
}




/********** Experience  **********/

.experience_container {
    min-height: 100vh;
    max-width: var(--max-width);
    margin: auto;
    grid-template-columns: repeat(2, 1fr);
    gap: 4rem; 
}

.work {
    position: relative;
    margin: 2.125rem auto; 
    max-width: 60rem; 
}

.work::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%; /* Position at 50% of the parent's width */
    transform: translateX(-50%); /* Move the element back by half of its own width */
    width: 0.125rem; 
    height: 100%;
    background-color: black;
}


.work-experience {
    max-width: 26rem; 
}

.work-experience .company a {
    color: var(--primary-color);
    transition: 0.3s;
    font-size: 2rem; 
    font-weight: 400;
    margin-bottom: 0.3125rem; 
}

.company a:hover {
    color: var(--primary-color-dark);
}

.work-experience .duration {
    color: black;
    font-weight: 600;
    margin-bottom: 0.3125rem;
}

.work-experience .description ul {
    list-style-type: disc;
    flex-wrap: wrap;
    padding: 0;
    margin-left: 1.25rem; 
}

.right {
    margin-left: auto;
}



/********** Skills  **********/
.skills {
  max-width: 800px;
  margin: 50px auto;
  padding: 0px 20px;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: 20px;
}

.skill {
  #background-color: #EE82EE;
  padding: 20px;
  border: 1px solid #ddd;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.skill i {
  font-size: 24px;
  margin-bottom: 10px;
}

.skill h3 {
  margin-top: 0;
}

.progress-bar {
  height: 10px;
  background-color: #ddd;
  border-radius: 10px;
  overflow: hidden;
}

.progress {
  height: 100%;
  background-color: #a855f7;
  border-radius: 10px;
  transition: width 0.5s ease-in-out;
}

/* Responsive Styles */

@media (max-width: 600px) {
 .skills-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 400px) {
 .skill {
    padding: 15px;
  }
 .progress-bar {
    height: 8px;
  }
}






/****** Contact Me ******/
.contact-div {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1.2rem;
}

.contact-content {
  display: flex;
}

.contact-info {
  width: 50%;
  padding: 1.2rem;
}

.contact-info img {
  width: 100%;
  margin-bottom: 3rem;
}

.contact-info p {
  margin-bottom: 1.5rem;
  color: #666;
  font-size: 1rem;
}

.contact-info a {
  color: #0077cc;
  text-decoration: none;
}

.contact-info a:hover {
  text-decoration: underline;
}

.contact-form {
  width: 55%;
  padding: 1.5rem;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  color: #666;
  font-weight: bold;
}

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  padding: 10px;
  font-size: 16px;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-sizing: border-box;
}

textarea {
  resize: vertical;
  height: 120px;
}

button[type="submit"] {
  background-color: var(--primary-color);
  color: #fff;
  padding: 0.8rem 1rem;
  border: none;
  border-radius: 0.3125rem;
  cursor: pointer;
}

button[type="submit"]:hover {
  background-color: var(--primary-color-dark);
}

.social-icons ul {
  display: flex;
  padding: 0px;
}

.social-icons ul li {
  margin-right: 1rem;
  list-style: none;
}

.social-icons ul li .fab {
  font-size: 1.25rem;
  line-height: 2.375rem;
  transition: 0.3s ease;
  color: #000;
}

.social-icons ul li a {
  display: block;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background-color: rgb(245, 243, 243);
  text-align: center;
  box-shadow: 0 0.25rem 0.5rem 0 rgba(0, 0, 0, 0.2);
  transition: 0.6s;
}

.social-icons ul li a:hover {
  transform: translate(0%,-10%);
}


.social-icons ul li:nth-child(1) a:hover {
  background-color: rgb(60, 132, 240);
}

.social-icons ul li:nth-child(2) a:hover {
  background-color: rgb(247, 17, 208);
}

.social-icons ul li:nth-child(3) a:hover {
  background-color: rgb(0, 102, 255);
}

.social-icons ul li:nth-child(4) a:hover {
  background-color: rgb(0, 0, 0);
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  animation: fadeInModal 0.5s ease-in-out;
}

@keyframes fadeInModal {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

.modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
  text-align: center;
}

@keyframes slideInModal {
  0% { transform: translate(-50%, -70%); }
  100% { transform: translate(-50%, -50%); }
}

/* Checkmark Icon Styles */
.checkmark {
  width: 48px;
  height: 48px;
  stroke-width: 3;
  stroke: #4CAF50;
  fill: none;
  stroke-dasharray: 78;
  stroke-dashoffset: 78;
  animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

@keyframes stroke {
  0% {
    stroke-dashoffset: 78;
  }
  100% {
    stroke-dashoffset: 0;
  }
}

.checkmark__circle {
  stroke-dasharray: 64;
  stroke-dashoffset: 64;
  animation: stroke-circle 0.6s cubic-bezier(0.65, 0, 0.45, 1) 0.3s forwards;
}

@keyframes stroke-circle {
  0% {
    stroke-dashoffset: 64;
  }
  100% {
    stroke-dashoffset: 0;
  }
}

.checkmark__check {
  transform-origin: 50% 50%;
  stroke-dasharray: 50;
  stroke-dashoffset: 50;
  animation: stroke-check 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.9s forwards;
}

@keyframes stroke-check {
  0% {
    stroke-dashoffset: 50;
    transform: scale(0);
  }
  100% {
    stroke-dashoffset: 0;
    transform: scale(1);
  }
}

/* Responsive Styles */
@media (max-width: 500px) {
  .contact-info img {
    margin-bottom: 2rem;
  }

  .contact-info p {
    margin-bottom: 1.5rem;
    font-size: 0.8rem;
  }

  .social-icons ul li {
    margin-right: 0.5rem;
  }

  .social-icons ul li .fab {
    font-size: 1rem;
    line-height: 1.8rem;
  }

  .social-icons ul li a {
    width: 1.8rem;
    height: 1.8rem;
  }

  button[type="submit"] {
    padding: 0.8rem 0.6rem;
    border-radius: 0.3rem;
  }

  .contact-form {
    padding: 0.4rem;
  }

  textarea {
    height: 100px;
  }
}








/****** Footer ******/

footer {
  background-color: #333;
  color: #fff;
  text-align: center;
  padding: 1.5rem 0rem;
  width: 100%;
}







/****** Responsive ******/
@media (max-width: 750px) {
nav .checkbox {
    display: block;
}

nav ul {
    position: absolute;
    width: 100%;
    height: calc(100vh - 85px);
    left: -100%;
    top: 85px;
    background-color: var(--extra-light);
    flex-direction: column;
    justify-content: center;
    gap: 3rem;
}

nav #check:checked ~ ul {
    left: 0;
}

nav ul li a {
    font-size: 1.25rem;
}

.main_container {
    padding: 10rem 1rem 5rem 1rem;
    text-align: center;
    grid-template-columns: repeat(1, 1fr);
}

.image {
    grid-area: 1 / 1 / 2 / 2;
}

.action__btns {
    margin: auto;
}

.action__btns button {
    font-size: 1rem;
    letter-spacing: 1px;
    padding: 0.8rem 1rem;
}

.experience_container {
    gap: 2rem;
}

.work {
    margin: 1rem auto;
    padding: 0.5rem;
}

.work::before {
    display: none;
}

.work-experience {
    max-width: 100%;
}

.work-experience .company a {
    font-size: 1.5rem;
}

.work-experience .description {
    font-size: 0.8rem;
}

footer {
    padding: 1rem 0;
    font-size: 1rem;
}

}




@media (max-width: 999px) and (min-width: 751px) {
    .experience_container {
        gap: 2rem; /* Decrease gap between items */
    }

    .work {
        margin: 1.5rem auto; /* Adjust margin for smaller screens */
        padding: 1rem; /* Add padding to separate items */
    }

    .work::before {
        display: none; /* Hide the center line on smaller screens */
    }

    .work-experience {
        max-width: 100%; /* Ensure full width on smaller screens */
    }

    .work-experience .company a {
        font-size: 1.8rem; /* Decrease font size for smaller screens */
    }
}









/***** Animations *****/

    .content, .work-experience, .skill, .contact-info {
      transform: translateX(-100%);
      opacity: 0;
      transition: transform 0.5s, opacity 0.5s;
    }

    .image, .right, .r, .contact-form {
      transform: translateX(100%);
      opacity: 0;
      transition: transform 0.5s, opacity 0.5s;
    }

    .main_container.animate, .work.animate, .skills-grid.animate, .contact-content.animate {
      .image, .right, .r, .contact-form {
        transform: translateX(0);
        opacity: 1;
      }
      .content, .work-experience, .skill, .contact-info {
        transform: translateX(0);
        opacity: 1;
      }
    }







/****** Dark mode styles ******/

.dark-mode {
  background-color: #333;
  color: #fff;
  transition: background-color 1s;
}

.dark-mode .nav__content {
  background-color: #444;
  transition: background-color 1s;
}

 .dark-mode .resume_btn:hover {
  background-color: #444;
  color: #ffffff;
}

.dark-mode body, .dark-mode nav, .dark-mode .nav__content ul, .dark-mode .nav__content label, .dark-mode footer {
  background-color: #444;
}


.dark-mode .black, .dark-mode .duration, .dark-mode label {
  color: skyblue;
}
.dark-mode p, .dark-mode ul,.dark-mode ul li a, .dark-mode h3 {
  color: #fff;
}

.dark-mode a:hover {
  color: #ccc;
}



@media (pointer: coarse) {
    .social-icons ul li a:hover {
        transform: none;
    }

    .nav ul li a:hover,
    .resume_btn:hover,
    .company a:hover,
    .button[type="submit"]:hover {
	      color: initial;
         background-color: initial;
    }

    .contact-info a:hover {
        text-decoration: none;
    }

}
