/* General Resets */
body {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

html {
  scroll-behavior: smooth;
}

/* Navbar Styling */
nav {
  transition: background 0.3s ease-in-out;
}

/* Navigation Links */
.nav-link {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.1rem;
  font-weight: 500;
  transition: 0.4s ease-in-out;
  position: relative;
}

/* Gradient Hover Effect */
.nav-link:hover {
  background: linear-gradient(to right, #342f7c, #834eff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* Mobile Menu */
#mobile-menu {
  position: absolute;
  top: 100%; /* Ensures dropdown appears right below navbar */
  left: 0;
  width: 100%;
  text-align: center;
  padding: 1rem 0;
  background: rgba(12, 10, 10, 0.1); /* Soft transparent look */
  backdrop-filter: blur(10px); /* Smooth glass effect */
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

#mobile-menu.show-menu {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* Show Menu Effect */
.show-menu {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* Fullscreen Background Video */
.background-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  z-index: -1;
}

/* Hero Section */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  color: white;
}

/* Text Styling */
.hero-section h1 span {
  background: linear-gradient(to right, #342f7c, #834eff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-section p {
  max-width: 600px;
  margin: 0 auto;
}

/* Buttons Styling */
.hero-section a {
  border-radius: 8px; /* Squared look */
}

/* AVATAR (Default - PC) */
.hero-avatar {
  width: 400px;
  height: 400px;
  background: rgba(52, 47, 124, 0.1); /* Transparency Fix */
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

/* Inner Transparent Circle */
.hero-avatar-inner {
  width: 260px;
  height: 260px;
  background: rgba(131, 78, 255, 0.07);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

/* Avatar Image */
.hero-avatar img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
}

/* 💻 **PC SIZE SETTINGS (Keep as it is)** */
@media (min-width: 768px) {
  .hero-avatar {
    width: 400px;
    height: 400px;
  }

  .hero-avatar-inner {
    width: 260px;
    height: 260px;
  }

  .hero-avatar img {
    width: 200px;
    height: 200px;
  }
}

/* 📱 **MOBILE SIZE (Reduce by 10%)** */
@media (max-width: 768px) {
  .hero-avatar {
    width: 360px; /* 10% smaller */
    height: 360px;
  }

  .hero-avatar-inner {
    width: 234px; /* 10% smaller */
    height: 234px;
  }

  .hero-avatar img {
    width: 180px; /* 10% smaller */
    height: 180px;
  }
}

/* **Fix Layout: PC - Text First, Mobile - Avatar First** */
.hero-content {
  display: flex;
  flex-direction: column-reverse; /* Text first by default (PC) */
  align-items: center;
  text-align: center;
}

/* Mobile: Avatar First */
@media (max-width: 768px) {
  .hero-content {
    flex-direction: column; /* Avatar appears first */
  }

  .hero-avatar {
    margin-bottom: 50px; /* Space between avatar and text */
  }

  .hero-section h1 {
    font-size: 3rem; /* Smaller font */
    line-height: 1.2; /* Better spacing */
    white-space: nowrap; /* Forces text to stay in one row */
  }

  .hero-section p {
    font-size: 1rem; /* Smaller paragraph text */
  }
}

/* Floating Animation */
@keyframes floatAnimation {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-15px);
  }
  100% {
    transform: translateY(0);
  }
}

.floating-avatar {
  animation: floatAnimation 3.5s ease-in-out infinite;
}

/* Main Cursor (Purple Ball) */
/* .cursor {
    width: 15px;
    height: 15px;
    background-color: rgba(131, 78, 255, 0.9);
    border-radius: 50%;
    position: absolute;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    pointer-events: none;
    transition: transform 0.05s linear;
    z-index: 9999;
    box-shadow: 0 0 10px rgba(131, 78, 255, 0.7);
  } */

/* Cursor Trail Effect (Small Transparent Purple Particles) */
/* .trail {
    width: 8px;
    height: 8px;
    background-color: rgba(131, 78, 255, 0.6);
    border-radius: 50%;
    position: absolute;
    pointer-events: none;
    z-index: 9998;
    opacity: 1;
    animation: fadeOut 0.6s ease-out forwards;
  } */

/* Trail Fade Effect */
/* @keyframes fadeOut {
    0% {
      opacity: 1;
      transform: scale(1);
    }
    100% {
      opacity: 0;
      transform: scale(0);
    }
  } */

/* About Section */
.about-section {
  padding: 80px 0;
}

/* Smartphone Mockup - Adjust size for mobile */
.about-mockup img {
  width: 80vw; /* Makes it responsive based on screen width */
  max-width: 380px; /* Prevents it from being too big on large phones */
  height: auto;
  transition: transform 0.3s ease-in-out;
}

/* Adjust size for larger screens */
@media (min-width: 768px) {
  .about-mockup img {
    width: 460px; /* Keep as before */
  }
}

/* Floating Animation */
.about-mockup img {
  animation: floatAnimation 3s ease-in-out infinite;
}

@keyframes floatAnimation {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0);
  }
}

/* Improve text readability on smaller screens */
@media (max-width: 768px) {
  .about-section p {
    text-align: justify; /* Natural left alignment */
    max-width: 95%;
    line-height: 1.6; /* Improves readability */
    word-spacing: normal; /* Prevents odd spaces */
    margin: 0 auto;
  }

  .about-section h2 {
    text-align: center; /* Keeps the heading centered */
    margin-bottom: 20px;
  }
}

/* Gradient Text Effect */
.gradient-text {
  background: linear-gradient(to right, #631686, #bb86fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: bold;
}

/* Skills Section */
.skills-section {
  padding: 80px 0;
}

/* Skill Item */
.skill-item {
  margin-bottom: 20px;
}

/* Skill Header */
.skill-header {
  display: flex;
  justify-content: space-between;
  font-size: 1.2rem;
  font-weight: 600;
  color: white;
  margin-bottom: 8px;
}

/* Skill Bar */
.skill-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  position: relative;
  overflow: hidden;
}

/* Skill Progress */
.skill-progress {
  height: 100%;
  background: linear-gradient(to right, #342f7c, #834eff);
  border-radius: 10px;
  width: 0; /* Initially Empty */
  transition: width 1.5s ease-in-out;
}

/* Scroll Animation */
.opacity-0 {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 1s ease-out, transform 1s ease-out;
}

.opacity-100 {
  opacity: 1;
  transform: translateY(0);
}

/* Projects Section */
.projects-section {
  padding: 80px 0;
}

/* Project Card */
.project-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(15px);
  border-radius: 12px;
  padding: 20px;
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
  cursor: pointer;
  text-decoration: none;
  display: block;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0px 8px 20px rgba(131, 78, 255, 0.3);
}

/* Project Image */
.project-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
}

/* Tech Stack */
.tech-stack {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tech-badge {
  background: linear-gradient(135deg, #342f7c, #834eff);
  color: white;
  font-size: 0.875rem;
  padding: 6px 10px;
  border-radius: 6px;
  font-weight: 600;
}

.text-top {
  margin-top: 5px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .project-image {
    height: 150px;
  }

  .project-card {
    padding: 16px;
  }
}

/* Certifications & Achievements Section */
.certifications-section {
  padding: 80px 0;
}

/* Individual Item */
.achievement-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(52, 47, 124, 0.15);
  padding: 16px;
  border-radius: 8px;
  transition: transform 0.3s ease-in-out;
}

/* Hover Effect */
.achievement-item:hover {
  transform: translateY(-5px);
  background: rgba(131, 78, 255, 0.2);
}

/* Text Content */
.achievement-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Title */
.achievement-content h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: white;
}

/* Date */
.achievement-date {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
}

/* Icon */
.achievement-icon {
  width: 40px;
  height: 40px;
  opacity: 0.8;
  transition: opacity 0.3s ease-in-out;
}

/* Icon Hover */
.achievement-item:hover .achievement-icon {
  opacity: 1;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .achievement-item {
    flex-direction: row;
    padding: 12px;
  }

  .achievement-content h3 {
    font-size: 1.1rem;
  }

  .achievement-date {
    font-size: 0.85rem;
  }

  .achievement-icon {
    width: 35px;
    height: 35px;
  }
}

/* Contact Section */
.contact-section {
  padding: 80px 0;
}

/* Contact Form */
.contact-form {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

/* Contact Input Fields */
.contact-input {
  width: 100%;
  padding: 12px;
  font-size: 1rem;
  border: none;
  outline: none;
  background: rgba(255, 255, 255, 0.1); /* Glass effect */
  backdrop-filter: blur(10px);
  color: white;
  border-radius: 8px;
  transition: 0.3s ease-in-out;
}

/* Input Focus Effect */
.contact-input:focus {
  background: rgba(255, 255, 255, 0.2);
  border-left: 4px solid var(--primary);
}

/* Contact Button */
.contact-button {
  margin-top: 20px;
  padding: 14px 20px;
  font-size: 1.2rem;
  font-weight: 600;
  color: white;
  background: linear-gradient(to right, #342f7c, #834eff);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.3s ease-in-out;
}

/* Button Hover */
.contact-button:hover {
  background: linear-gradient(to right, #5a46a3, #9c66ff);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .contact-input {
    font-size: 0.95rem;
  }
}

/* Footer Section */
.footer-section {
  background: rgba(12, 10, 10, 0.1); /* Transparent glass effect */
  backdrop-filter: blur(10px);
  padding: 20px 0;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1); /* Soft top border */
}

/* Social Media Icons */
.footer-icon {
  width: 28px;
  height: 28px;
  transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

/* Hover Effect */
.footer-link:hover .footer-icon {
  transform: scale(1.1);
  opacity: 0.8;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .footer-section {
    text-align: center;
  }
  .social-icons {
    justify-content: center;
  }
}

/* CSS for Styling the Popup */

.popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}

.popup.hidden {
  display: none;
}

.popup-content {
  background: #5d3fd3; /* Adjust to match your website color */
  color: white;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  max-width: 400px;
  width: 80%;
}

.popup-content h2 {
  margin: 0;
  font-size: 24px;
}

.popup-content p {
  margin: 10px 0;
  font-size: 16px;
}

.popup-content button {
  background: white;
  color: #5d3fd3;
  border: none;
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
  border-radius: 5px;
  transition: 0.3s;
}

.popup-content button:hover {
  background: #ddd;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #1c1c28; /* Dark background track */
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(
    to bottom,
    #5d3fd3,
    #8d6bee
  ); /* Gradient scrollbar */
  border-radius: 10px;
  transition: background 0.3s ease-in-out;
}

/* Change color on hover */
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, #422aab, #8567fb);
}
