@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  border: none;
  outline: none;
  scroll-behavior: smooth;
  font-family: "Poppins", sans-serif;
}

:root {
  --bg-color: #081b29;
  --second-bg-color: #112e42;
  --text-color: #edededdf;
  --main-color: #c400f0d8;
}

html {
  font-size: 62.5%;
  overflow-x: hidden;
}

body {
  background: var(--bg-color);
  color: var(--text-color);
}

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

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 2rem 9%;
  background: var(--bg-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  transition: 0.3s;
}

.logo {
  font-size: 2.5rem;
  color: var(--text-color);
  font-weight: 600;
}

.navbar a {
  font-size: 1.7rem;
  color: var(--text-color);
  font-weight: 500;
  margin-left: 3.5rem;
  transition: 0.3s;
}

.navbar a:hover,
.navbar a.active {
  color: var(--main-color);
}

#menu-icon {
  font-size: 3.6rem;
  color: var(--text-color);
  cursor: pointer;
  display: none;
}

/* Home Section */
.home {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 9%;
}

.home-content {
  max-width: 60rem;
}

.home-content h1 {
  font-size: 5.6rem;
  font-weight: 700;
  line-height: 1.3;
}

.home-content .text-animate {
  font-size: 3.2rem;
}

.home-content .text-animate span {
  color: var(--main-color);
}

.home-content p {
  font-size: 1.6rem;
  margin: 2rem 0 4rem;
}

.my-img {
  width: 35vw;
  text-align: center;
  margin-top: 5rem;
}

.my-img img {
  width: 30rem;
  max-width: 100%;
  border-radius: 50%;
  border: 0.2rem solid var(--main-color);
}

.home-sci {
  margin-top: 2rem;
  display: flex;
  gap: 2rem;
  align-items: center;
}

.social-item {
  text-align: center;
}

.social-item p {
  font-size: 1.2rem;
  margin-top: 0.5rem;
}

.home-sci a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 4rem;
  height: 4rem;
  background: transparent;
  border: 0.2rem solid var(--main-color);
  border-radius: 50%;
  font-size: 2rem;
  color: var(--main-color);
  transition: 0.5s;
}

.home-sci a:hover {
  background: var(--main-color);
  color: var(--bg-color);
}

/* About Section */
.about {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  background: var(--second-bg-color);
}

.about-img {
  position: relative;
  width: 30rem;
  height: 30rem;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.about-img img {
  width: 90%;
  border-radius: 50%;
  border: 0.2rem solid var(--main-color);
}

.about-img .circle-spin {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(0);
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border-top: 0.2rem solid var(--second-bg-color);
  border-bottom: 0.2rem solid var(--second-bg-color);
  border-left: 0.2rem solid var(--main-color);
  border-right: 0.2rem solid var(--main-color);
  animation: aboutSpinner 8s linear infinite;
}

.about-details {
  text-align: center;
  max-width: 70rem;
}

.heading {
  font-size: 5rem;
  margin-bottom: 3rem;
  text-align: center;
}

.heading span {
  color: var(--main-color);
}

.about-content h3 {
  font-size: 2.6rem;
}

.about-content p {
  font-size: 1.6rem;
  margin: 2rem 0 3rem;
}

@keyframes aboutSpinner {
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* Experience & Education Section */
#experience,
.education,
.achievements {
  background-color: var(--bg-color);
}

#experience {
  background: var(--second-bg-color);
}

.education-column {
  flex: 1 1 40rem;
}

.education-box {
  border-left: 0.2rem solid var(--main-color);
}

.education-content {
  position: relative;
  padding-left: 2rem;
}

.education-content::before {
  content: "";
  position: absolute;
  top: 0;
  left: -1.1rem;
  width: 2rem;
  height: 2rem;
  background: var(--main-color);
  border-radius: 50%;
}

.education-content .content {
  position: relative;
  padding: 1.5rem;
  border: 0.2rem solid var(--main-color);
  border-radius: 0.6rem;
  margin-bottom: 2rem;
  overflow: hidden;
}

.education-content .content::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: var(--second-bg-color);
  z-index: -1;
  transition: 0.5s;
}

.education-content .content:hover::before {
  width: 100%;
}

.education-content .content .year {
  font-size: 1.5rem;
  color: var(--main-color);
  padding-bottom: 0.5rem;
}

.education-content .content h3 {
  font-size: 2rem;
}

.education-content .content p,
.education-content .content ul {
  font-size: 1.6rem;
  padding-top: 0.5rem;
}

.education-content ul {
  list-style-position: inside;
}

/* Tech Stack Section */
.tech-stack {
  background: var(--bg-color);
}

.tech-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.tech-category {
  background: var(--second-bg-color);
  padding: 2.5rem;
  border-radius: 0.8rem;
  text-align: center;
  transition: transform 0.3s ease;
}

.tech-category:hover {
  transform: translateY(-10px);
}

.tech-category h3 {
  font-size: 2rem;
  color: var(--main-color);
  margin-bottom: 1.5rem;
}

.tech-category ul {
  list-style: none;
  padding: 0;
}

.tech-category ul li {
  font-size: 1.6rem;
  line-height: 1.8;
}

/* Portfolio Section */
.portfolio {
  background: var(--second-bg-color);
}

.portfolio-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2.5rem;
}

.portfolio-box {
  position: relative;
  border-radius: 2rem;
  box-shadow: 0 0 1rem var(--bg-color);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.portfolio-box img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: 0.5s ease;
}

.portfolio-box:hover img {
  transform: scale(1.1);
}

.portfolio-layer {
  padding: 2rem;
  background: var(--bg-color);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.portfolio-layer h4 {
  font-size: 2.2rem;
}

.portfolio-layer p {
  font-size: 1.4rem;
  margin: 1rem 0;
  flex-grow: 1;
}

.project-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.8rem;
  background: var(--main-color);
  border-radius: 4rem;
  font-size: 1.6rem;
  color: var(--bg-color);
  font-weight: 600;
  transition: 0.3s ease;
}

.project-link i {
  margin-right: 0.8rem;
}

.project-link:hover {
  background: #fff;
  color: var(--main-color);
}

/* Contact Section */
.form-section {
  padding: 60px 9%;
  background: var(--bg-color);
}

.section-title {
  text-align: center;
  font-size: 4rem;
  font-weight: 700;
  margin-bottom: 40px;
  color: var(--text-color);
}

.form-wrapper {
  display: flex;
  flex-wrap: wrap;
  max-width: 1100px;
  margin: 0 auto;
  background-color: var(--second-bg-color);
  border-radius: 15px;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.contact-info,
.contact-form-box {
  flex: 1;
  padding: 40px;
  min-width: 300px;
}

.contact-info p {
  font-size: 1.6rem;
  margin-bottom: 2rem;
}

.info-item {
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  font-size: 1.6rem;
}

.info-item i {
  font-size: 2rem;
  margin-right: 15px;
  color: var(--main-color);
}

.contact-form-box h2 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 15px;
  margin-bottom: 20px;
  border: 1px solid var(--main-color);
  border-radius: 10px;
  font-size: 1.6rem;
  background: transparent;
  color: var(--text-color);
}

.contact-form button {
  padding: 12px 25px;
  background-color: var(--main-color);
  color: var(--bg-color);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1.6rem;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.contact-form button:hover {
  background-color: #fff;
  color: var(--main-color);
}

.hire-me {
  text-align: center;
  margin-top: 30px;
}

.hire-button {
  display: inline-block;
  padding: 1.5rem 4rem;
  background-color: var(--main-color);
  color: var(--bg-color);
  font-size: 1.8rem;
  font-weight: bold;
  border-radius: 60px;
  transition: background-color 0.3s ease, transform 0.2s;
}

.hire-button:hover {
  background-color: #fff;
  color: var(--main-color);
  transform: scale(1.05);
}

/* Footer */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  padding: 2rem 9%;
  background: var(--second-bg-color);
}

.footer-text p {
  font-size: 1.6rem;
}

.footer-iconTop a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 0.8rem;
  background: var(--main-color);
  border-radius: 0.8rem;
  transition: 0.5s ease;
}

.footer-iconTop a:hover {
  box-shadow: 0 0 1rem var(--main-color);
}

.footer-iconTop a i {
  font-size: 2.4rem;
  color: var(--bg-color);
}

/* -------------------- */
/* RESPONSIVE BREAKPOINTS */
/* -------------------- */

/* For Tablets */
@media (max-width: 991px) {
  .header {
    padding: 2rem 3%;
  }
  section {
    padding: 10rem 3% 2rem;
  }
  .footer {
    padding: 2rem 3%;
  }
  .home {
    flex-direction: column-reverse;
    text-align: center;
  }
  .home-content h1 {
    font-size: 5rem;
  }
  .home-content {
    order: 2;
  }
  .my-img {
    width: 70vw;
    margin-bottom: 4rem;
  }
  .home-sci {
    justify-content: center;
  }
  .about {
    flex-direction: column;
  }
}

/* For Mobile Phones */
@media (max-width: 768px) {
  #menu-icon {
    display: block;
  }
  .navbar {
    position: absolute;
    top: 100%;
    left: -100%; /* Start hidden */
    width: 100%;
    padding: 1rem 3%;
    background: var(--bg-color);
    border-top: 0.1rem solid rgba(0, 0, 0, 0.2);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.2);
    transition: 0.25s ease;
  }
  .navbar.active {
    left: 0; /* Slide in */
  }
  .navbar a {
    display: block;
    font-size: 2rem;
    margin: 3rem 0;
  }
  .home {
    padding-top: 5rem;
  }
  .home-content h1 {
    font-size: 4.5rem;
  }
  .about-img {
    width: 25rem;
    height: 25rem;
  }
  .heading {
    font-size: 4rem;
  }
}

@media (max-width: 450px) {
  html {
    font-size: 50%;
  }
  .home-content h1 {
    font-size: 4rem;
  }
  .footer {
    flex-direction: column-reverse;
  }
  .footer p {
    text-align: center;
    margin-top: 2rem;
  }
}
