* {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  /* overflow-x: hidden; */
}

body {
  /* background-color: rgb(0, 0, 33); */
  /* background: linear-gradient(to bottom, rgb(0, 0, 33),rgb(15, 15, 83) , rgb(100, 113, 211)); */
  background: linear-gradient(
    135deg,
    rgb(0, 0, 30) 30%,
    rgb(1, 1, 56) 40%,
    rgb(10, 10, 70) 50%,
    rgb(20, 20, 97) 60%,
    rgb(40, 50, 135) 70%,
    rgb(35, 46, 130) 75%,
    rgb(90, 100, 200) 90%,
    rgb(120, 130, 230) 100%
  );
  color: white;
  font-family: "Poppins", sans-serif;
  width: 100vw;
  background-size: 600% 600%;
  overflow-x: hidden;
  animation: flow 14s ease-out infinite;
}

@keyframes flow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 60%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.left {
  font-size: 1.5rem;
  position: relative;
}
nav {
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 60px;
  /* background-color: rgb(1, 1, 56); */
}

nav ul {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

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

nav ul li a {
  text-decoration: none;
  color: white;
}
nav ul li a:hover {
  font-size: 1.01rem;
  color: rgb(184, 184, 246);
}

nav .right ul li a.active {
  color: #6b75c2;
  border-bottom: 2px solid #6b75c2;
}

.firstSection {
  display: flex;
  justify-content: space-around;
  margin: 30px 0;
  align-items: center;
  height: 68vh;
}

.leftSection {
  width: 40%;
  font-size: 2.7rem;
}
.rightSection {
  width: 25%;
}
.rightSection img {
  width: 100%;
  margin: 20px 0;
}

.purple,
#element {
  color: rgb(162, 83, 235);
}

.secondSection {
  padding-top: 30px;
  margin: auto;
  max-width: 85vw;
  min-height: 60vh;
}

.text-gray {
  color: grey;
  font-size: smaller;
}

.skills {
  position: relative;
  left: 30px;
}

.secondSection {
  display: flex;
  justify-content: space-around;
  gap: 200px;
}

.footer {
  /* background-color: rgb(0, 0, 33); */
  color: #f0f0f0;
  padding: 40px 20px 20px;
  font-family: "Poppins", sans-serif;
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 40px;
  max-width: 1000px;
  margin: auto;
}

.footer-left h3 {
  margin-bottom: 10px;
  color: rgb(162, 83, 235);
}

.footer-center ul {
  list-style: none;
  padding: 0;
}

.footer-center ul li {
  margin-bottom: 8px;
}

.footer-center ul li a {
  color: #f0f0f0;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-center ul li a:hover {
  color: #b4a580;
}

.footer-right .social-icons a {
  color: #f0f0f0;
  font-size: 20px;
  margin-right: 15px;
  transition: color 0.3s ease;
}

.footer-right .social-icons a:hover {
  color: #6b75c2;
}

.footer-bottom {
  text-align: center;
  margin-top: 30px;
  font-size: 14px;
  border-top: 1px solid #444;
  padding-top: 15px;
}
.btn {
  background-color: #6b75c2; /* Theme Purple */
  color: white;
  padding: 12px 24px;
  margin: 10px 10px 0 0;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-family: "Poppins", sans-serif;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn:hover {
  background-color: #545eb0;
  transform: translateY(-2px);
}

.btn-outline {
  background-color: transparent;
  color: #6b75c2;
  border: 2px solid #6b75c2;
}

.btn-outline:hover {
  background-color: #6b75c2;
  color: white;
}

/* Optional: Wrap buttons nicely */
.button-group {
  display: flex;
  flex-wrap: wrap;
  margin-top: 20px;
}

/* Hamburger Menu (initially hidden) */
/* Always hidden by default on larger screens */
.menu-toggle {
  position: relative;
  top: -10px;
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
  padding: 10px;
  background-color: #545eb0;
  border-radius: 18%;
  border: 2px solid #6565e8;
  transition: all 0.2s ease;
}

.menu-toggle:hover {
  background-color: #4646c1;
}
.menu-toggle:active {
  background-color: #4646c1;
  transform: scale(0.95);
  box-shadow: 0 2px 5px rgba(134, 133, 133, 0.231);
}

.menu-toggle div {
  width: 25px;
  height: 3px;
  background-color:#0e155e;
  border-radius: 15%;
}

/* ---------- Mobile Styles ---------- */
@media (max-width: 768px) {
  nav {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;  
    padding: 20px;
  }

  nav .right ul {
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
  }

  .firstSection {
    flex-direction: column;
    text-align: center;
    padding: 40px 20px;
  }

  .leftSection,
  .rightSection {
    width: 100%;
    padding: 10px 0;
  }
  hr {
    height: 0vh;
    padding-bottom: 0;
    margin-bottom: 0;
    border: none;
  }
  .rightSection img {
    max-width: 100%;
    height: auto;
  }

  .secondSection {
    flex-direction: column;
    padding: 0px 20px;
    margin-top: 0;
  }

  .container1 {
    width: 100%;
    margin-bottom: 30px;
    position: relative;
    top: 30vh;
  }

  .skills ul li {
    font-size: 16px;
  }

  .position-acad {
    position: relative;
    top: 10vh;
  }

  .position-inist {
    position: relative;
    top: -11vh;
  }

  .button-group {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 250px;
    margin: 10px 0;
    text-align: center;
  }

  .footer-container {
    flex-direction: column;
    text-align: center;
    gap: 30px;
  }

  .footer-right .social-icons {
    justify-content: center;
  }

  .card-container {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .card {
    width: 100%;
  }

  /* Show hamburger menu on mobile */
  .menu-toggle {
    display: flex;
    align-self: flex-end;
  }

  /* Hide nav links by default */
  .right {
    position: absolute;
    top: 80px;    /* adjust based on your nav height */
    right: 0;
    background-color: rgb(7, 7, 73); /* match your nav bg */
    width: 95%;
    margin-right: 10px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.4s ease;
    z-index: 999;
    border-radius: 15%;
  }

  .right.show {
    max-height: 500px;
    opacity: 1;
    transform: translateY(0);
  }

  .right ul {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin: 0;
    padding: 0;
  }
  .right ul li {
    width: 100%;
  }
  .right ul li a {
    display: block;
    width: 100%;
    padding: 15px;
    color: white;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.2);
  }
}
