@import url("https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap");

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

html {
  scroll-behavior: smooth;
}

body {
  font-size: 18px;
  background-color: black;
  color: white;
  font-family: "Montserrat", sans-serif;
}

.navbar {
  display: flex;
  justify-content: space-between;
  padding: 20px;
  color: white;
  background-color: black;
  z-index: 100;
  position: fixed;
  border-bottom: 1px solid #333;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;

  transition: max-height 0.3s ease-out;
  overflow: hidden;
  max-height: 60px; /* Default height */
}

.navbar.open {
  max-height: 500px; /* Expanded height */
}

.div-nav {
  display: flex;
  color: white;
  justify-content: space-around;
}

#div-nav-1 a {
  color: #c576f6;
  font-size: 1.5rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  transition: none;
}

#div-nav-2 {
  width: 60%;
}

.div-nav a {
  gap: 10px;
  color: white;
  font-size: 1.2rem;
  text-transform: uppercase;
  position: relative;
  transition: color 0.3s ease;
}

a {
  text-decoration: none;
}

.div-nav a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  display: block;
  margin-top: 5px;
  right: 0;
  background: #c576f6;
  transition: width 0.3s ease;
  -webkit-transition: width 0.3s ease;
}

.div-nav a:hover::after {
  width: 100%;
  left: 0;
  background: #c576f6;
}



section::before {
  content: "";
  display: block;
  height: 60px;
  margin-top: -60px;
  visibility: hidden;
}

.menu-icon {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Responsive Design */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    align-items: center;
  }

  .div-nav {
    display: none;
    flex-direction: column;
    align-items: center;
    background-color: black;
    line-height: 2;
    padding: 4px;
    width: 100%;
  }

  #div-nav-2 {
    justify-content: left;
    align-items: flex-start;
  }

  .div-nav a {
    margin: 10px 0;
    text-align: center;
    color: white;
  }

  .navbar {
    border-bottom: 0;
  }

  .menu-icon {
    display: block;
    font-size: 2rem;
    cursor: pointer;
    color: white; /* Ensure the menu icon is visible */
    margin-bottom: 10px; /* Add some space between the menu icon and the nav items */
    position: fixed;
    top: 10px;
    left: 10px;
  }

  .navbar.open .div-nav {
    display: flex;
  }
}

/* section --- home */

section {
  min-height: 100vh;
  padding: 5rem 9% 5rem;
}

.home {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  padding: 2rem;
  background-color: black;
  min-height: 100vh;
}

.home-img,
.home-content {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  text-align: center;
}

.home-img img {
  width: 100%;
  max-width: 300px;
  height: auto;
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.2s linear, box-shadow 0.2s linear;
}

.home-img img:hover {
  box-shadow: 0 0 15px #c576f6;
  transform: scale(1.05);
}


.home-content {
  padding: 2rem;
}

span {
  color: #c576f6;
}

.home .home-content h1 {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1rem;
}

.home-content h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.home-content p {
  font-size: 1rem;
  line-height: 1.6;
  max-width: 600px;
}

.social-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

.social-icon a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 4rem;
  height: 4rem;
  background-color: transparent;
  border: 2px solid #c576f6;
  font-size: 2rem;
  border-radius: 50%;
  margin: 3rem 1.5rem 3rem;
  transition: background 0.5s;
}
.fa-brands {
  color: #333;
}

.fa-brands:hover {
  color: white;
}

.social-icon a:hover {
  color: white;
  /* transform: scale(1.3) translateY(-5px); */
  background-color: #c576f6;
  /* box-shadow: 0 0 25px #c576f6; */
}

.btn {
  display: inline-block;
  padding: 1rem 2.8rem;
  background-color: black;
  border-radius: 6px;
  color: #c576f6;
  letter-spacing: 0.3rem;
  font-weight: 600;
  border: 2px solid #c576f6;
  transition: background 0.5s;
  cursor: pointer;
}

.btn:hover {
  background-color: #c576f6;
  color: white;
}

.typing-text {
  font-size: 34px;
  font-weight: 600;
  min-width: 280px;
}

.typing-text span {
  position: relative;
}

.typing-text span::after {
  /* content: "Web Developer"; */
  color: #c576f6;
  background-color: black;
  animation: words 20s infinite;
}

.typing-text span::before {
  /* content: ""; */
  background-color: black;
  position: absolute;
  width: calc(100% + 8px);
  height: 100%;
  border-left: 3px solid black;
  right: -8px;
  animation: cursor 0.6s infinite;
}

/* skills */

.skills-1 {
  width: 55vw;
  margin: auto;
}

.section-head {
  text-align: center;
  /* width: 15vw; */
  width: fit-content;
  padding: 15px 50px;
  border: 2px solid #c576f6;
  border-radius: 1rem;
  margin: auto;
  text-transform: uppercase;
}

.skills-content {
  height: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px;
}

.skill {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
}

.skill span {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.progress {
  background-color: #333;
  border-radius: 5px;
  overflow: hidden;
  height: 5px;
  width: 100%;
}

.progress-bar {
  background-color: #c576f6;
  height: 100%;
  border-radius: 5px;
  width: 0;
  transition: width 2s ease;
}

/* education */

.edu-main {
  width: 60vw;
  margin: auto;
  margin-top: 20px;
  padding: 10px;
}

.edu-content {
  width: 100%;
  border-bottom: 1px solid #333;
  margin-bottom: 20px;
  line-height: 1.6;
  padding: 10px;
  text-transform: uppercase;
}
.edu-content h3 {
  font-weight: lighter;
}

/* project */

/* project */

.project-list {
  width: 80vw;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 40px;
  margin-top: 50px;
}

.list {
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  height: 350px;
  padding: 10px;
  margin-bottom: 20px;
}

.list img {
  width: 100%;
  border-radius: 10px;
  display: block;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}
.layer {
  width: 100%;
  height: 0; /* Initially height is 0 */
  background: linear-gradient(rgba(0, 0, 0, 0.6), #333);
  border-radius: 10px;
  position: absolute;
  left: 0;
  bottom: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 0 40px;
  text-align: center;
  font-size: 14px;
  transition: height 0.5s;
}

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

.layer a {
  margin-top: 20px;
  color: #333;
  text-decoration: none;
  font-size: 18px;
  line-height: 1.4;
  background: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

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

.project-see-more {
  display: block;
  margin: 50px auto;
  width: fit-content;
  border: 2px solid #c576f6;
  padding: 14px 50px;
  border-radius: 6px;
  text-decoration: none;
  color: #c576f6;
  transition: background 0.5s;
}

.project-see-more:hover {
  background-color: #c576f6;
  color: white;
}



/* Add the necessary CSS rules */
.hidden-projects {
  display: none;
}

.fade-in {
  animation: fadeIn 1s ease-in-out;
}

@keyframes fadeIn {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.contact {
  width: 45vw;
  border: 2px solid #c576f6;
  margin: auto;
  margin-top: 25px;
  border-radius: 6px;
  padding: 25px;
}

.contact div {
  margin-top: 40px;
}

.contact-text {
  font-weight: lighter;
}

#contact-last {
  margin-bottom: 40px;
}

.contact-div {
  line-height: 1.5;
}

.contact-div i {
  margin-right: 10px;
}

.contact-div span {
  color: white;
}

.contact-div p {
  margin-left: 32px;
}

@media (max-width: 768px) {
  .section-head h1 {
    font-size: 1.5rem;
  }

  .contact {
    width: 90%;
  }

  .contact-div {
    flex-direction: column;
    align-items: flex-start;
  }

  .contact-div i {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
  }

  .contact-label {
    font-size: 1rem;
  }

  .contact-text {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .section-head h1 {
    font-size: 1.2rem;
  }

  .contact {
    width: 95%;
    padding: 1rem;
  }

  .contact-div {
    margin-bottom: 1rem;
  }

  .contact-div i {
    font-size: 1rem;
    margin-right: 0;
  }

  .contact-label {
    font-size: 0.9rem;
  }

  .contact-text {
    font-size: 0.8rem;
  }
}




@media screen and (max-width: 1024px) {
  #div-nav-2 {
    margin-right: 40px;
  }
  .logo {
    text-align: center;
    width: 100%;
  }

  .home {
    flex-direction: column;
    text-align: center;
  }

  .home-img {
    margin: 0 0 20px 0;
  }

  .home-img img {
    width: 100px;
    height: 100px;
  }
}

@media screen and (max-width: 768px) {
  .menu-icon {
    font-size: 1.2rem;
  }

  .navbar {
    padding: 10px;
  }

  .home-img img {
    width: 80px;
    height: 80px;
  }

  .home-content h1 {
    font-size: 1.5rem;
  }

  .home-content .typing-text {
    font-size: 1.2rem;
  }

  .home-content p {
    font-size: 0.9rem;
  }
}

@media screen and (max-width: 480px) {
  .menu-icon {
    font-size: 1rem;
  }

  .home-img img {
    width: 70px;
    height: 70px;
  }

  .home-content h1 {
    font-size: 1.2rem;
  }

  .home-content .typing-text {
    font-size: 1rem;
  }

  .home-content p {
    font-size: 0.8rem;
  }
}