/* Reset and Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

body {
  background: linear-gradient(135deg, #1e1e2f 0%, #2a2a3d 100%);
  color: #ffffff;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Particle Background */
#particles-js {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1; /* Behind all content */
}

/* Navigation */
.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: rgba(20, 20, 30, 0.9);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transform: perspective(1000px) translateZ(0);
  transition: transform 0.3s ease;
}

.nav-container:hover {
  transform: perspective(1000px) translateZ(10px);
}

.logo {
  font-size: 1.5rem;
  font-weight: 600;
  color: #00d4ff;
  white-space: nowrap; /* Prevent text wrapping */
  animation: slideshow 10s linear infinite; /* Continuous left-to-right slideshow */
  position:relative;
  left: 0; /* Start at the left edge */
}

@keyframes slideshow {
  0% {
    transform: translateX(-100%); /* Start off-screen left */
  }
  50% {
    transform: translateX(calc(20vw - 200px)); /* Hold briefly at end */
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .logo {
    font-size: 1.2rem; /* Smaller font on mobile */
    animation: slideshow 8s linear infinite; /* Faster animation on mobile */
  }
  @keyframes slideshow {
    0% {
      transform: translateX(-100%); /* Start off-screen left */
    }
    80% {
      transform: translateX(calc(100vw - 150px)); /* Adjust stop point for mobile */
    }
    100% {
      transform: translateX(calc(100vw - 150px)); /* Hold briefly at end */
    }
  }
}

.nav-content {
  display: flex;
  align-items: center;
}

.nav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.nav-button {
  display: inline-block;
  padding: 0.5rem 1rem;
  margin: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #ffffff;
  text-decoration: none;
  font-weight: 400;
  transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  transform: perspective(1000px) translateZ(0);
}

.nav-button:hover, .nav-button.active {
  background: #00d4ff;
  color: #1e1e2f;
  transform: perspective(1000px) translateZ(10px);
  box-shadow: 0 5px 15px rgba(0, 212, 255, 0.5);
}

.hamburger {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #00d4ff;
}

.external-links .nav-button {
  margin-left: 1rem;
}

/* Hero Section */
.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  perspective: 1000px;
  padding: 2rem;
}

.hero-profile-pic {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 3px solid #00d4ff;
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
  margin-bottom: 1.5rem;
  transform: translateZ(20px);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-profile-pic:hover {
  transform: translateZ(40px);
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.7);
}

.hero-content h1 {
  font-size: 2.5rem;
  color: #ffffff;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 5px rgba(0, 212, 255, 0.3);
  transform: translateZ(10px);
}

.hero-roles {
  font-size: 1.2rem;
  color: #d0d0d0;
  margin-bottom: 1.5rem;
  font-family: 'Roboto Mono', monospace;
  transform: translateZ(10px);
}

.cta-button {
  display: inline-block;
  padding: 1rem 2rem;
  background: #00d4ff;
  color: #1e1e2f;
  text-decoration: none;
  border-radius: 10px;
  font-weight: 600;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  transform: perspective(1000px) translateZ(0);
}

.cta-button:hover {
  transform: perspective(1000px) translateZ(20px);
  box-shadow: 0 10px 20px rgba(0, 212, 255, 0.5);
}

/* Content Sections */
.content-section {
  padding: 4rem 2rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  position: relative; /* Ensure content stays above particles */
  z-index: 1; /* Above particle background */
}

.content-section.active {
  opacity: 1;
  transform: translateY(0);
}

h2 {
  font-size: 2.5rem;
  color: #00d4ff;
  margin-bottom: 2rem;
  text-shadow: 0 2px 5px rgba(0, 212, 255, 0.3);
}

/* Education Section */
.timeline {
  max-width: 800px;
  width: 100%;
}

.edu-card {
  background: rgba(255, 255, 255, 0.05);
  padding: 2rem;
  border-radius: 15px;
  margin-bottom: 2rem;
  position: relative;
  transform: perspective(1000px) translateZ(0);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.edu-card:hover {
  transform: perspective(1000px) translateZ(20px);
  box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
}

.edu-card h3 {
  color: #00d4ff;
  margin-bottom: 0.5rem;
}

.edu-card h4 {
  color: #d0d0d0;
  font-weight: 400;
  margin-bottom: 0.5rem;
}

/* About Section */
.about-content {
  max-width: 800px;
  width: 70%;
  text-align: center;
  font-size: 1.2rem;
  color: #d0d0d0;
  line-height: 1.8;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  transform: perspective(1000px) translateZ(0);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-content:hover {
  transform: perspective(1000px) translateZ(20px);
  box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
}

.about-content p {
  margin: 0;
}

/* Skills Section */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  width: 100%;
}

.skill-card {
  background: rgba(255, 255, 255, 0.05);
  padding: 2rem;
  border-radius: 15px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  transform: perspective(1000px) translateZ(0);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.skill-card:hover {
  transform: perspective(1000px) translateZ(20px);
  box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
}

.skill-card h3 {
  color: #00d4ff;
  margin-bottom: 0.5rem;
}

/* Projects Section */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  width: 100%;
}

.project-card {
  background: rgba(255, 255, 255, 0.05);
  padding: 1.5rem;
  border-radius: 15px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  transform: perspective(1000px) translateZ(0);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.project-card:hover {
  transform: perspective(1000px) translateZ(20px);
  box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
}

.project-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 1rem;
}

.project-card h4 {
  color: #00d4ff;
  margin-bottom: 0.5rem;
}

/* Experience Section */
.exp-card {
  background: rgba(255, 255, 255, 0.05);
  padding: 2rem;
  border-radius: 15px;
  margin-bottom: 2rem;
  position: relative;
  transform: perspective(1000px) translateZ(0);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.exp-card:hover {
  transform: perspective(1000px) translateZ(20px);
  box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
}

.exp-card h3 {
  color: #00d4ff;
  margin-bottom: 0.5rem;
}

.exp-card h4 {
  color: #d0d0d0;
  font-weight: 400;
  margin-bottom: 0.5rem;
}

/* Contact Section */
#contact {
  padding: 4rem 2rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.contact-container {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  gap: 2rem;
  max-width: 1200px;
  width: 100%;
}

#contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  max-width: 500px;
}

#contact-form input, #contact-form textarea {
  padding: 1rem;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 1rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  transform: perspective(1000px) translateZ(0);
}

#contact-form input:focus, #contact-form textarea:focus {
  outline: none;
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
  transform: perspective(1000px) translateZ(10px);
}

#contact-form button {
  padding: 1rem;
  border: none;
  border-radius: 10px;
  background: #00d4ff;
  color: #1e1e2f;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  transform: perspective(1000px) translateZ(0);
}

#contact-form button:hover {
  transform: perspective(1000px) translateZ(20px);
  box-shadow: 0 10px 20px rgba(0, 212, 255, 0.5);
}

.contact-info {
  width: 100%;
  max-width: 500px;
}

.social-links {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: flex-start;
  margin-top: 1rem;
}

.social-links a {
  display: flex;
  align-items: center;
  color: #00d4ff;
  text-decoration: none;
  font-size: 1rem;
  padding: 0.5rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  transform: perspective(1000px) translateZ(0);
}

.social-links a:hover {
  transform: perspective(1000px) translateZ(10px);
  box-shadow: 0 5px 15px rgba(0, 212, 255, 0.3);
  background: rgba(0, 212, 255, 0.2);
}

.social-links .icon {
  font-size: 1.2rem;
  margin-right: 0.5rem;
  color: #00d4ff;
  transition: transform 0.3s ease;
}

.social-links a:hover .icon {
  transform: scale(1.2);
}

/* Modals */
.modal, .modal-gallery {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  align-items: center;
  justify-content: center;
  z-index: 2000; /* Above particle background */
}

.modal-content, .modal-gallery-content {
  background: #1e1e2f;
  padding: 2rem;
  border-radius: 15px;
  max-width: 90%;
  max-height: 90%;
  overflow: auto;
  transform: perspective(1000px) translateZ(0);
  box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
}

.close-button, .modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.5rem;
  cursor: pointer;
  color: #00d4ff;
}

#certificate-image, #gallery-image {
  max-width: 100%;
  border-radius: 10px;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  font-size: 2rem;
  color: #00d4ff;
  cursor: pointer;
}

.gallery-prev { left: 1rem; }
.gallery-next { right: 1rem; }

/* Responsive Design */
@media (max-width: 768px) {
  .hamburger { display: block; }
  .nav-content {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    background: rgba(20, 20, 30, 0.9);
    padding: 1rem;
  }
  .nav-content.active { display: flex; }
  .nav-links { flex-direction: column; text-align: center; }
  .nav-button { margin: 0.5rem 0; width: 100%; text-align: center; }
  .hero-profile-pic { width: 120px; height: 120px; }
  .hero-content h1 { font-size: 2rem; }
  .hero-roles { font-size: 1rem; }
  .contact-container {
    flex-direction: column;
    align-items: center;
  }
  #contact-form, .contact-info {
    max-width: 100%;
  }
  .social-links {
    justify-content: center;
  }
  .logo {
    animation: slideFromRight 0.5s ease-out forwards; /* Faster animation on mobile */
  }
}