@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* ----- Main body of the page ----- */
body {
    margin: 0;
    overflow-x: hidden;
    background-image: radial-gradient(circle, #4d4d4d, #222222, #222222); /*rgb(34, 34, 34);*/
}

/* ----- Navigation Menu ----- */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-around;
    margin-top: 1px;
    padding-top: 2.5rem;
    z-index: 1000;
}

.navlinks {
    display: flex;
    gap: clamp(20px, 5vw, 50px);
    padding: 10px;
    list-style: none;
    align-items: center;
    margin-top: 25px;
}

.navlinks a {
    color: aliceblue;
    text-decoration: none;
    font-size: 1.1rem;
    font-family: 'Poppins', sans-serif;
    font-weight: bolder;
    position: relative;
}

.navlinks a:hover {
    color: #A074C8;
    transition: color 0.4s;
}

.navlinks a::before {
  content: '';
  position: absolute;
  bottom: -7px;
  right: 0;
  width: 0;
  height: 3px;
  border-radius: 20px;
  background-color: #A074C8;
  transition: all .3s;
}

.navlinks a:hover::before {
  width: 100%;
}

/* ----- Top left Logo ----- */
.logo img {
  width: clamp(180px, 22vw, 260px);
  height: auto;
}


/* ----- Navigation Sidebar for responsive size ----- */

/* Overlay covers the whole screen */
.menu-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: flex-end;
  background: rgba(0, 0, 0, 0);
  pointer-events: none;
  opacity: 0;
  transition: background 0.3s ease, opacity 0.3s ease;
  z-index: 3000;
  min-height: 120vh;
  min-height: 120dvh;
}

/* Sidebar (dropdown) */
.dropdown_menu {
  width: 250px;
  margin-top: 0;
  height: 120vh;
  height: 120dvh;
  list-style: none;
  background-color: rgba(63, 63, 63, 0.980);
  backdrop-filter: blur(30px);
  box-shadow: -10px 0 15px rgba(0, 0, 0, 0.4);
  transform: translateX(100%);
  transition: transform 0.35s ease;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  z-index: 3000;
}

/* Active state */
.menu-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.menu-overlay.active .dropdown_menu {
  transform: translateX(0);
}

.dropdown_menu a {
    color: aliceblue;
    text-decoration: none;
    font-size: 1.5rem;
    font-family: 'Poppins', sans-serif;
    width: 80%;
    font-weight: bold;
    padding: 15px 20px;
    display: flex;
    margin-top: 40px;
}

.dropdown_menu a:hover {
    color: #A074C8;
    transition: color 0.4s ease;
    border-radius: 2px;
}

#menuLogo {
    width: 75%;
    height: auto;
    margin-top: 25%;
}

#menuButton {
    display: none;
}

#menuButton svg {
  cursor: pointer;
  padding: 6px;
}

/* ----- Speration line under the nav bar ----- */
.cutoff {
  width: 80%;
  height: 2px;
  background-color: rgb(92, 92, 92);
  margin: 2px auto;
  border-radius: 20px;
  position: relative;
}

@media screen and (width <=1100px){
    .navlinks {
        display: none;
    }

    #menuButton {
        display: flex;
    }

    .cutoff {
      display: none;
    }

    .navbar {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      background-color: rgba(34, 34, 34, 0.8);
      backdrop-filter: blur(10px);
      margin-top: 0;
      padding-bottom: 20px;
  }

    main {
      padding-top: 90px; /* adjust to navbar height */
    }
}

/* ----- Homepage ----- */
.homepage {
  width: min(90%, 1200px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin: clamp(40px, 4vw, 40px) auto 0;
  padding: clamp(80px, 8vw, 100px);
}


.homepage h1 {
  color: aliceblue;
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-family: 'Poppins', sans-serif;
}

.homepage h2 {
  color: aliceblue;
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  font-family: 'Poppins', sans-serif;
}

.homepage h1,
.homepage h2 {
  margin-top: -30px;
  margin-bottom: 70px;
}

.homepage-btns {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.homepage a {
    text-decoration: none;
    background-color: #A074C8;
    border: none solid rgb(100, 100, 100);
    margin-top: 40px;
    font-family: 'Poppins', sans-serif;
    width: 220px;
    padding: 15px 15px;
    border-radius: 50px;
    font-size: 1.3rem;
    cursor: pointer;
    color: aliceblue;
}

.homepage a:hover {
    background-color: aliceblue;
    color: #A074C8;
    transition: all 0.2s ease;
}

@media (max-width: 700px) {
  .homepage-btns {
    flex-direction: column;
    width: 100%;
    align-items: center;
  }

  .homepage a {
    width: 100%;
    max-width: 300px;
  }
}


/* ----- Footer ----- */
footer {
    background-color: rgb(54, 54, 54);
    text-align: center;
    border-top: #272727 1px solid;
    padding: 10px;
    color: aliceblue;
    bottom: auto;
}

footer p {
    font-family: 'Poppins', sans-serif;
}

/* Particle canvas */
#particle-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1; /* behind all content */
  pointer-events: none; /* doesn’t block clicks */
  background: radial-gradient(circle, #222222, #111111);
}

.toTop {
  background-color: #A074C8;
  color: aliceblue;
  padding: 10px;
  border-radius: 10px;
  position: fixed;
  bottom: 2rem;
  right: 2rem;
}

.toTop:hover {
  background-color: aliceblue;
  color: #A074C8;
  transition: all 0.2s ease;
}

@keyframes appear { /* appear is the name of the animation we are making */
  from {
    opacity: 0;
    scale: 0.5;
  }
  to {
    opacity: 1;
    scale: 1;
  }
}

@keyframes slideinleft {
  from {
    opacity: 0;
    transform: translateX(-200px);
  }
  to {
    opacity: 1;
    transform: translateX(0px);
  }
}

@keyframes slideinright {
  from {
    opacity: 0;
    transform: translateX(200px);
  }
  to {
    opacity: 1;
    transform: translateX(0px);
  }
}

.skill-box {
  animation: appear linear;
  animation-timeline: view();
  animation-range: entry 0 cover 20%;
}

.me-container, .section1 {
  animation: slideinleft linear;
  animation-timeline: view();
  animation-range: entry 0 cover 30%;
}