/* Base */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 140px; /* offset for fixed header when jumping to section anchors */
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: #0a021e;
  color: #e6e1ff;
  margin: 0;
  padding: 0;
  position: relative;
}

/* Prevent background scroll when modal is open */
body.modal-open {
  overflow: hidden;
}

/* Background Particles */
#particles-js {
  position: fixed;
  width: 100%;
  height: 100%;
  z-index: -1;
  top: 0;
  left: 0;
  pointer-events: none;
}

/* Header */
header {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(10, 2, 30, 0.9);
  padding: 1.5rem 0;
  text-align: center;
  z-index: 1000;
}

nav ul { list-style: none; padding: 0; }
nav ul li { display: inline; margin: 0 15px; }
nav ul li a { color: #a855f7; text-decoration: none; font-size: 1.2rem; }

/* Hero */
#hero {
  text-align: center;
  padding: 200px 20px 120px;
  width: 85%;
  margin: 140px auto 40px;

  background: rgba(75, 0, 130, 0.35);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(168, 85, 247, 0.25);
  border-radius: 14px;
  box-shadow: 0 0 24px rgba(168, 85, 247, 0.25);
}

.profile-pic {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  margin-bottom: 20px;
}

.glowing-text {
  font-size: 2.5rem;
  color: #a855f7;
  text-shadow: 0 0 10px #a855f7, 0 0 20px #a855f7;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 24px;
  margin: 15px;
  background: #a855f7;
  color: #0a021e;
  text-decoration: none;
  border-radius: 5px;
  font-size: 1rem;
  transition: all 0.3s ease-in-out;
}
.btn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 10px rgba(168, 85, 247, 0.5);
}

.btn-small {
  padding: 10px 16px;
  margin: 10px 0 0;
  font-size: 0.95rem;
}

/* Sections (purple glow) */
section {
  position: relative;
  width: 85%;
  margin: 40px auto;
  padding: 80px 50px;
  text-align: center;

  background: rgba(75, 0, 130, 0.35);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(168, 85, 247, 0.25);
  border-radius: 14px;
  box-shadow: 0 0 24px rgba(168, 85, 247, 0.25);
}

/* Remove inner card background */
.card {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

/* Education */
.edu-item {
  text-align: left;
  background: rgba(255,255,255,0.06);
  border-left: 5px solid #a855f7;
  border-radius: 10px;
  padding: 16px;
  margin: 18px 0;
}
.edu-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
}
.edu-meta { color: #bda8ff; font-size: .95rem; }
.edu-bullets { margin: 10px 0 0 18px; text-align: left; }
.edu-bullets li { margin: 6px 0; }

/* Skills & Certifications */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px,1fr));
  gap: 20px;
}
.skills-block {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(168,85,247,0.25);
  border-radius: 10px;
  padding: 14px;
  text-align: left;
}
.skills-block h3 { margin-top: 0; }
.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.skills-list li {
  background: rgba(168,85,247,0.2);
  color: #e6e1ff;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: .95rem;
}

.certs { margin-top: 30px; text-align: center; }
.cert-list { justify-content: center; text-align: left; max-width: 980px; margin: 0 auto; }
.cert-list li { background: rgba(168,85,247,0.22); width: 100%; }
.cert-sub { margin-top: 6px; color: #e6e1ff; opacity: 0.9; font-size: 0.95rem; line-height: 1.35; }

/* Experience */
.experience-item {
  text-align: left;
  background: rgba(255,255,255,0.06);
  padding: 15px;
  border-left: 5px solid #a855f7;
  border-radius: 10px;
  margin: 20px 0;
}
.exp-meta { color: #bda8ff; margin-top: -6px; }
.exp-bullets { margin: 10px 0 0 18px; text-align: left; }
.exp-bullets li { margin: 6px 0; }
.exp-links { margin-top: 10px; }

/* Projects */
#projects {
  background: rgba(75, 0, 130, 0.35);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(168, 110, 255, 0.25);
  border-radius: 16px;
  padding: 50px 25px;
}
.projects-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin-top: 30px;
}
.project-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(168,110,255,0.25);
  border-radius: 16px;
  padding: 20px;
  transform-style: preserve-3d;
  transition: transform .2s ease, box-shadow .3s ease;
}
.project-card:hover { box-shadow: 0 10px 25px rgba(168,110,255,.35); }
.project-img {
  width: 100%;
  height: 180px;
  border-radius: 12px;
  object-fit: cover;
  margin-bottom: 15px;
}
.project-content h3 { margin-bottom: 10px; font-size: 1.2rem; }
.project-icon { font-size: 48px; text-align: center; margin-bottom: 10px; }

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.6);
  z-index: 2000;
  padding: 16px;
  overflow: auto;
}
.modal.open { display: flex; }

.modal-content {
  width: min(900px, 92vw);
  max-height: 90vh;
  overflow-y: auto;
  background: rgba(23,5,60,.98);
  border: 1px solid rgba(168,110,255,.3);
  border-radius: 16px;
  padding: 22px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}

.modal-close {
  position: sticky;
  top: 0;
  margin-left: auto;
  background: rgba(0,0,0,.2);
  color: white;
  border: none;
  font-size: 28px;
  line-height: 1;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  display: inline-block;
  z-index: 1;
}

.modal-content img {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 12px;
}

/* Video */
.project-video {
  width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 12px 0 16px;
  display: block;
  aspect-ratio: 16/9;
  max-height: 50vh;
  object-fit: cover;
}

/* Extra image below first image */
.extra-img {
  width: 100%;
  border-radius: 10px;
  margin: 10px 0 16px;
  object-fit: cover;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.3);
}

.modal-list { margin: 0 0 8px 18px; text-align: left; }
.modal-actions { display: flex; justify-content: flex-end; margin-top: 8px; }
.modal-actions .btn { margin: 0; }

/* Contact + Footer */
#contact p { font-size: 1.2rem; color: #a855f7; margin-bottom: 15px; }
#contact a { color: #e6e1ff; font-weight: bold; text-decoration: none; transition: color .3s; }
#contact a:hover { color: #a855f7; text-decoration: underline; }

footer {
  background: #0a021e;
  color: white;
  text-align: center;
  padding: 1rem 0;
  margin-top: 20px;
}

/* Responsive */
@media (max-width:700px) {
  #hero, section { width: 92%; padding: 60px 20px; }
  .skills-grid { grid-template-columns: 1fr; }
}