body {
  margin: 0;
  font-family: "Poppins", sans-serif;
  background-color: #232d7b;
  color: #fff;
  scroll-behavior: smooth;
}

/* ==============================
   Navbar (Compact & Aligned)
   ============================== */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #2e338e;
  padding: 10px 40px;
  /* reduced from 15px 60px */
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  height: 55px;
  /* compact height */
}

.logo {
  font-weight: 700;
  font-size: 20px;
  background: linear-gradient(90deg, #b8a6ff, #79bfff, #fff1a6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 0.5px;
}

/* Menu links */
.nav-links {
  list-style: none;
  display: flex;
  gap: 25px;
  /* slightly tighter spacing */
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  color: white;
  font-weight: 500;
  font-size: 0.95rem;
  /* slightly smaller font */
  position: relative;
  transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
  color: #fff1a6;
}

/* Hover underline */
.nav-links a.active::after,
.nav-links a:hover::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 100%;
  height: 2px;
  background: #fff1a6;
}

/* Theme icon */
.theme-toggle {
  font-size: 18px;
  cursor: pointer;
  color: #fff1a6;
  border: 1.2px solid #fff1a6;
  border-radius: 50%;
  padding: 4px 6px;
  transition: 0.3s;
}

.theme-toggle:hover {
  background: #fff1a6;
  color: #2e338e;
}

/* Adjust for mobile */
@media (max-width: 900px) {
  .navbar {
    padding: 10px 20px;
  }

  .nav-links {
    gap: 18px;
  }

  .nav-links a {
    font-size: 1rem;
  }
}

/* Fix overlap between navbar and hero section */
#home {
  padding-top: 100px;
  /* Adjust spacing under navbar */
  margin-top: 60px;
  /* Adds breathing space */
}

@media (max-width: 768px) {
  #home {
    padding-top: 80px;
    margin-top: 40px;
  }
}

/* ==============================
   Hero Section (Balanced Spacing)
   ============================== */
.hero {
  background: linear-gradient(135deg, #454b9e, #6366c7);
  text-align: center;
  padding: 110px 20px 75px;
  /* increased top padding slightly */
  color: #fff;
  margin-top: 55px;
  /* adds small gap between navbar and hero box */
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.2);
}

.hero-container {
  max-width: 680px;
  /* slightly narrower for a tighter layout */
  margin: 0 auto;
}

.profile-pic {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.9);
  margin-bottom: 25px;
  /* adds a touch more space before the text */
  object-fit: cover;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.25);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.profile-pic:hover {
  transform: scale(1.05);
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.4);
}

.hero h1 {
  font-size: 2rem;
  font-weight: 700;
  margin: 12px 0 6px;
  color: #eaf4ff;
}

.hero h1 span {
  background: linear-gradient(90deg, #b8e0ff, #fff1a6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero h3 {
  font-weight: 600;
  font-size: 1.1rem;
  color: #f0f2ff;
  margin-bottom: 14px;
}

.hero-desc {
  color: #e3e6ff;
  font-size: 0.95rem;
  max-width: 550px;
  margin: 15px auto 28px;
  /* increased spacing around text */
  line-height: 1.6;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.btn,
.btn-outline {
  padding: 8px 22px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn {
  background: #fff1a6;
  color: #2e338e;
}

.btn:hover {
  background: #b8e0ff;
  color: #2e338e;
}

.btn-outline {
  border: 2px solid #fff1a6;
  color: #fff1a6;
}

.btn-outline:hover {
  background: #fff1a6;
  color: #2e338e;
}
a {
  color: #ffe873;
  text-decoration: none;
  font-weight: 600;
}

a:hover {
  text-decoration: underline;
  color: #fff599;
  transition: color 0.3s ease;
}


/* ==============================
   About Section (Centered Layout)
   ============================== */
/* ===== About Section ===== */
.about {
  background-color: #1b1f6b;
  padding-top: 50px;
  /* reduced top padding (was likely 100px or more) */
  padding-bottom: 40px;
  /* reduced bottom padding to make section tighter */
  text-align: center;
  color: #f9f9f9;
  border-radius: 10px;
  width: 90%;
  margin: 60px auto;
  /* centered box with balanced spacing */
  box-shadow: 0 0 30px rgba(255, 255, 160, 0.15);
}

/* Heading “About Me” */
.about h2 {
  color: #ffe873;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 25px;
  /* slightly less space below heading */
  margin-top: 0;
  /* ensures heading sticks closer to top */
  position: relative;
}

.about h2::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background-color: #ffe873;
  margin: 10px auto 0;
  border-radius: 2px;
}

/* Paragraph styling */
.about p {
  font-size: 1rem;
  line-height: 1.8;
  color: #e6e8ff;
  max-width: 750px;
  margin: 10px auto;
}

/* Highlight bold terms */
.about b,
.about strong {
  color: #fff3a1;
}

/* Responsive fix */
@media (max-width: 768px) {
  .about {
    padding: 80px 20px 60px;
  }

  .about h2 {
    font-size: 1.7rem;
  }

  .about-text {
    font-size: 0.95rem;
  }
}

/* Section Base Style */
section {
  padding: 80px 20px;
  max-width: 900px;
  margin: auto;
  text-align: center;
}

section h2 {
  font-size: 1.8rem;
  color: #fff1a6;
  margin-bottom: 20px;
}

section p {
  line-height: 1.6;
  color: #f0f0f0;
}

/* Footer */
footer {
  text-align: center;
  padding: 20px;
  background: #2e338e;
  color: white;
  font-size: 0.9rem;
  margin-top: 40px;
}

/* Hamburger Menu */
.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
}

.bar {
  height: 3px;
  width: 25px;
  background: #fff1a6;
  border-radius: 5px;
  transition: all 0.3s ease;
}

/* Responsive Navbar */
@media (max-width: 900px) {
  .menu-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    right: -100%;
    top: 70px;
    flex-direction: column;
    background: #2e338e;
    width: 70%;
    height: 100vh;
    justify-content: flex-start;
    align-items: center;
    gap: 30px;
    padding-top: 60px;
    transition: 0.4s ease;
  }

  .nav-links.active {
    right: 0;
  }

  .theme-toggle {
    display: none;
  }

  .nav-links a {
    font-size: 1.2rem;
  }

  .menu-toggle.open .bar:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle.open .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .menu-toggle.open .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
}

/* Responsive Hero */
@media (max-width: 768px) {
  .hero {
    padding: 120px 20px 80px;
  }

  .profile-pic {
    width: 140px;
    height: 140px;
    margin-bottom: 15px;
  }

  .hero h1 {
    font-size: 1.9rem;
  }

  .hero h3 {
    font-size: 1rem;
  }

  .hero-desc {
    font-size: 0.9rem;
    padding: 0 10px;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .btn,
  .btn-outline {
    width: 75%;
    text-align: center;
    padding: 10px 0;
  }
}

/* ===== Education Section ===== */
.education {
  background-color: #1b1f6b;
  padding: 40px 0; /* Reduced from 70px for tighter spacing */
  border-radius: 10px;
  width: 90%;
  margin: 40px auto; /* Reduced from 70px to remove large outer gaps */
  text-align: center;
  color: #ffffff;
  box-shadow: 0 0 30px rgba(255, 255, 160, 0.15);
}

/* Section Title */
.education h2 {
  color: #ffe873;
  font-size: 2rem;
  font-weight: 700;
  margin-top: 0; /* Align closer to box top */
  margin-bottom: 25px; /* Slightly tighter spacing below heading */
  position: relative;
}

.education h2::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background-color: #7c6d1e;
  margin: 10px auto 0;
  border-radius: 2px;
}

/* Degree Titles */
.education h3 {
  color: #fafaf8;
  font-weight: 700;
  margin-bottom: 5px;
}

/* University Name */
.education p {
  color: #e7e8ff;
  font-size: 0.95rem;
  margin: 4px 0;
}

/* Dates (year ranges) */
.education .date {
  color: #ffe873; /* Gold color for dates */
  font-weight: 500;
  font-size: 0.95rem;
}

/* Inner spacing between degree blocks */
.education div {
  margin-bottom: 25px; /* Reduced spacing between entries */
}

/* Responsive */
@media (max-width: 600px) {
  .edu-box {
    width: 90%;
    padding: 20px;
  }

  .education h2 {
    font-size: 1.6rem;
  }

  .edu-box h3 {
    font-size: 1rem;
  }
}

/* ===== Universal Section Spacing Fix ===== */
section {
  scroll-margin-top: 100px;
  /* Fix anchor scroll overlap */
}

/* Add consistent space between sections */
.about,
.education,
.projects,
.skills,
.certificates,
.publications {
  padding-top: 100px;
  padding-bottom: 100px;
}

/* Optional: Add soft transition between sections */
.about,
.education,
.projects {
  margin-top: 60px;
  margin-bottom: 60px;
}

/* ===== Research Projects Section (List Layout) ===== */
.projects {
  background-color: #1b1f6b;
  padding: 70px 0;
  border-radius: 10px;
  width: 90%;
  margin: 70px auto;
  color: #ffffff;
  box-shadow: 0 0 30px rgba(255, 255, 160, 0.15);
}

.projects h2 {
  color: #ffe873;
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
  position: relative;
}

.projects h2::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background-color: #ffe873;
  margin: 10px auto 0;
  border-radius: 2px;
}

/* List layout */
.project-list {
  list-style: none;
  padding: 0 10%;
  margin: 0;
  text-align: left;
}

.project-list li {
  margin-bottom: 40px;
  border-left: 3px solid #ffe873;
  padding-left: 15px;
}

.project-list h3 {
  color: #ffe873;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 5px;
}

.project-list p {
  color: #e7e8ff;
  font-size: 0.95rem;
  margin: 4px 0;
}

.project-list .year {
  color: #ffe873;
  font-weight: 500;
  font-size: 0.95rem;
}

.project-list .status {
  color: #ffe873;
  font-weight: 600;
}

.project-list em {
  color: #c9cbff;
  font-style: italic;
  display: block;
  margin-top: 5px;
}
a {
  color: #ffe873;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  color: #fff599;
}

/* Responsive */
@media (max-width: 768px) {
  .projects .timeline {
    border-left: 2px solid #fff1a6;
    padding-left: 15px;
  }

  .projects .timeline-item {
    padding-left: 35px;
    margin-bottom: 45px;
  }

  .projects .timeline-content h3 {
    font-size: 1rem;
  }

  .projects .timeline-content p {
    font-size: 0.85rem;
  }
}

.projects {
  background-color: #1f256b;
  padding: 100px 20px;
  text-align: center;
  color: #fff;
  margin-bottom: 80px;
  /* ✅ added spacing after projects */
}
/* ===== Technical Skills Section (Two-Column Layout) ===== */
.skills {
  background-color: #101430;
  padding: 70px 0;
  border-radius: 10px;
  width: 90%;
  margin: 70px auto;
  color: #ffffff;
  box-shadow: 0 0 30px rgba(255, 255, 160, 0.15);
}

.skills h2 {
  color: #ffe873;
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
  position: relative;
}

.skills h2::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background-color: #ffe873;
  margin: 10px auto 0;
  border-radius: 2px;
}

/* Grid Layout */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  padding: 0 10%;
}

.skills-column {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

/* Skill items */
.skills-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.skills-list li {
  border-left: 3px solid #ffe873;
  padding-left: 15px;
}

.skills-list h3 {
  color: #ffe873;
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 5px;
}

.skills-list p {
  color: #e7e8ff;
  font-size: 0.95rem;
  margin: 0;
}

/* Responsive for tablets and mobile */
@media (max-width: 768px) {
  .skills-grid {
    grid-template-columns: 1fr;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .skills {
    padding: 80px 20px;
  }

  .skill-box {
    padding: 25px 20px;
  }

  .skill-box h3 {
    font-size: 1rem;
  }

  .skill-box p {
    font-size: 0.9rem;
  }
}

.skills {
  background-color: #0f142c;
  padding: 100px 30px;
  text-align: center;
  color: #fff;
  margin-bottom: 100px;
  /* ✅ Added spacing below the skills section */
}
/* ===== Certificates & Training (Two-Column Layout) ===== */
.certificates {
  background-color: #1b1f6b;
  padding: 70px 0;
  border-radius: 10px;
  width: 90%;
  margin: 70px auto;
  color: #ffffff;
  box-shadow: 0 0 30px rgba(255, 255, 160, 0.15);
}

.certificates h2 {
  color: #ffe873;
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
  position: relative;
}

.certificates h2::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background-color: #ffe873;
  margin: 10px auto 0;
  border-radius: 2px;
}

/* Grid layout for 2 columns */
.certificates-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px 60px;
  padding: 0 10%;
}

/* Individual certificate cards */
.cert-item {
  border-left: 3px solid #ffe873;
  padding-left: 15px;
  margin-bottom: 25px;
}

.cert-item h3 {
  color: #ffe873;
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 5px;
}

.cert-item p {
  color: #e7e8ff;
  font-size: 0.95rem;
  margin: 0;
}

/* Responsive for smaller screens */
@media (max-width: 768px) {
  .certificates-grid {
    grid-template-columns: 1fr;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .timeline {
    padding-left: 25px;
  }

  .timeline-item .icon {
    left: -25px;
    width: 24px;
    height: 24px;
    font-size: 1rem;
  }

  .timeline-item h3 {
    font-size: 1rem;
  }

  .timeline-item p {
    font-size: 0.85rem;
  }
}

/* Responsive spacing between Skills and Certificates */
.skills {
  background-color: #0f142c;
  padding: 100px 30px;
  text-align: center;
  color: #fff;
  margin-bottom: 100px;
  /* desktop spacing */
}

/* Certificates section stays the same */
.certificates {
  background-color: #1f256b;
  padding: 100px 30px;
  text-align: center;
  color: #fff;
  margin-top: 80px;
  /* top spacing to ensure clear gap */
}

/* 📱 Tablet view (medium devices) */
@media (max-width: 992px) {
  .skills {
    margin-bottom: 80px;
  }

  .certificates {
    margin-top: 60px;
  }
}

/* 📱 Mobile view (small devices) */
@media (max-width: 600px) {
  .skills {
    margin-bottom: 60px;
  }

  .certificates {
    margin-top: 50px;
    padding: 80px 20px;
    /* reduce padding for small screens */
  }
}

/* ==============================
   Publications Section
   ============================== */
.publications {
  background-color: #1b223f;
  color: #e6ebff;
  text-align: center;
  padding: 60px 40px; /* Reduced from 100px for balanced spacing */
  margin: 40px auto;  /* Matches spacing with other sections */
  border-radius: 10px;
  border-top: 2px solid rgba(255, 255, 255, 0.05);
  border-bottom: 2px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 30px rgba(255, 255, 160, 0.15);
}

/* Section Title */
.publications h2 {
  font-size: 2rem;
  color: #ffe873; /* Updated to match other section headings */
  margin-top: 0;
  margin-bottom: 25px;
  position: relative;
  font-weight: 700;
}

.publications h2::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 70px;
  height: 3px;
  background: #7c6d1e; /* Consistent underline color */
  border-radius: 3px;
}

/* Text Paragraphs */
.publications p {
  font-size: 1rem;
  line-height: 1.7;
  max-width: 950px;
  margin: 15px auto;
  color: #e7e8ff;
}

/* Note (italic line at bottom) */
.publications .note {
  font-style: italic;
  color: #ffe873; /* Also yellow to match theme */
  font-size: 0.95rem;
  margin-top: 25px;
}


/* ✨ Responsive Spacing Adjustments */
@media (max-width: 992px) {
  .publications {
    margin-top: 80px;
    padding: 80px 30px;
  }
}

@media (max-width: 600px) {
  .publications {
    margin-top: 60px;
    padding: 60px 20px;
  }

  .publications h2 {
    font-size: 1.5rem;
  }

  .publications p {
    font-size: 0.9rem;
  }
}

/* ==============================
   Get in Touch Section
   ============================== */
.contact {
  background-color: #1b223f;
  text-align: center;
  color: #e7e8ff;
  padding: 60px 40px;
  margin: 40px auto;
  border-radius: 10px;
  width: 90%;
  box-shadow: 0 0 30px rgba(255, 255, 160, 0.15);
}

/* Section Heading */
.contact h2 {
  color: #ffe873; /* Changed to match theme yellow */
  font-size: 2rem;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 25px;
  position: relative;
}

.contact h2::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background-color: #7c6d1e; /* Same underline color */
  border-radius: 3px;
}

/* Contact Paragraphs */
.contact p {
  font-size: 1rem;
  line-height: 1.6;
  max-width: 800px;
  margin: 10px auto;
}

/* Highlight bold text */
.contact strong {
  color: #ffe873; /* Highlight key terms like AI, healthcare, deep learning */
}

/* Contact Buttons */
.contact-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 25px;
}

.contact-buttons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 2px solid #ffe873;
  color: #ffe873;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 25px;
  transition: all 0.3s ease;
}

.contact-buttons a:hover {
  background-color: #ffe873;
  color: #1b223f;
  transform: translateY(-3px);
}


/* ✨ Responsive Adjustments */
@media (max-width: 992px) {
  .contact {
    padding: 80px 30px;
    margin-top: 80px;
  }
}

@media (max-width: 600px) {
  .contact {
    padding: 60px 20px;
    margin-top: 60px;
  }

  .contact h2 {
    font-size: 1.5rem;
  }

  .contact p {
    font-size: 0.9rem;
  }

  .contact-btn {
    font-size: 0.9rem;
    padding: 8px 18px;
  }
}

/* ==============================
   Footer Section
   ============================== */
footer {
  background-color: #1b223f;
  text-align: center;
  padding: 20px 0;
  color: #e7e8ff;
  font-size: 0.95rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Highlighted Name */
footer strong,
footer span {
  color: #ffe873; /* Yellow highlight for your name */
  font-weight: 600;
}

/* Heart icon */
footer .heart {
  color: #ff4d6d; /* Soft red for the heart */
  margin: 0 4px;
}

/* Subtle hover glow for your name */
footer a,
footer strong:hover {
  text-decoration: none;
  color: #fff1a6;
  transition: 0.3s ease;
}

/* Responsive alignment */
@media (max-width: 600px) {
  footer {
    font-size: 0.85rem;
    padding: 15px;
  }
}

/* ❤️ Heart pulse animation */
@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.9;
  }

  50% {
    transform: scale(1.2);
    opacity: 1;
  }

  100% {
    transform: scale(1);
    opacity: 0.9;
  }
}

/* Responsive Footer */
@media (max-width: 600px) {
  .footer {
    font-size: 0.85rem;
    padding: 20px 10px;
  }
}

/* ==============================
   Back to Top Button
   ============================== */
#backToTop {
  position: fixed;
  bottom: 35px;
  right: 35px;
  z-index: 1000;
  background: linear-gradient(135deg, #5c6bc0, #a6c8ff);
  color: #0f142c;
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(166, 200, 255, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

#backToTop:hover {
  background: linear-gradient(135deg, #fff1a6, #ffd700);
  box-shadow: 0 0 16px rgba(255, 241, 166, 0.6);
  transform: translateY(-4px);
}

#backToTop.show {
  opacity: 1;
  visibility: visible;
}

/* Responsive adjustment */
@media (max-width: 600px) {
  #backToTop {
    bottom: 25px;
    right: 25px;
    width: 42px;
    height: 42px;
    font-size: 1rem;
  }
}