/* Base Styles */
body {
  font-family: 'Inter', sans-serif;
  margin: 0;
  overflow-x: hidden; /* Prevent horizontal scrollbar */
  box-sizing: border-boxs;
  transition: background-color 0.3s ease, color 0.3s ease;
}

html{
  scroll-behavior: smooth;
}

/* Light Mode Styles */
body.light-mode {
  background-color: #ffffff;
  color: #1a1a1a;
}

body.light-mode .navbar {
  background-color: rgba(243, 244, 246, 0.9);
}

body.light-mode .glass-card {
  background-color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(209, 213, 219, 0.3);
}

/* Light mode paragraph text color */
body.light-mode .glass-card p {
  color: #4b5563; /* A darker gray for better readability in light mode */
}

/*=============== GLOWING CIRCLE ===============*/
#glowing-circle-container {
  position: fixed; /* Fix the background */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none; /* Allows clicks to go through */
  z-index: -1;
}

#glowing-circle-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

#background-video {
  position: fixed;
  top: 0;
  left: 0;
  min-width: 100vw;
  min-height: 100vh;
  object-fit: cover;
  z-index: -1;
  pointer-events: none;
}
#video-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4); /* Adjust opacity as needed */
  z-index: -1;
  pointer-events: none;
}

/*=============== HEADER & NAV===============*/
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0.1); /* Light background with transparency */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); /* Subtle shadow */
  transition: background-color 0.3s ease, border-color 0.3s ease;
  z-index: 1000;
}

.nav-link {
  position: relative;
  padding: 0.5rem 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #3b82f6;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* ======= Mobile Menu Styles ======= */
#mobile-menu {
  transition: all 0.3s ease;
  transform: translateX(100%);
}

#mobile-menu:not(.hidden) {
  transform: translateX(0);
  background: rgba(30, 41, 59, 0.9);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.nav-link-mobile {
  color: rgba(255, 255, 255, 0.8);
  padding: 0.5rem 1rem;
  transition: all 0.3s ease;
  position: relative;
}

.nav-link-mobile:hover {
  color: white;
  transform: translateX(-5px);
}

.nav-link-mobile::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background-color: #3b82f6;
  transition: width 0.3s ease;
}

.nav-mob {
    background: rgba(30, 41, 59, 0.9);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

/* ===== Typewriter Animation for Hero Section ===== */
.cd-words-wrapper {
  display: inline-block;
  position: relative;
  width: auto;
  height: 100%;
  vertical-align: top;
}

.cd-words-wrapper b {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  white-space: nowrap;
  transition: opacity;
  animation: slide-out 0.000000000000001s;
}

.cd-words-wrapper b.is-visible {
  opacity: 1;
  position: relative;
  animation: slide-in 0.000000000000001s;
}


/* ======= Social Icons ======= */
.social-icon {
  color: rgba(255, 255, 255, 0.7);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.social-icon:hover {
  color: #3b82f6;
  transform: translateY(-3px);
}

/* Desktop vertical icons */
.md\:flex .social-icon {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
  border-radius: 50%;
  margin: 0.5rem 0;
}

/* Mobile horizontal icons */
.md\:hidden .social-icon {
  margin: 0 0.5rem;
}

/* CV Button styles */
.cv-button {
  position: relative;
  overflow: hidden;
}

.cv-button::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%);
  transform-origin: 50% 50%;
}

.cv-button:focus:not(:active)::after {
  animation: ripple 1s ease-out;
}

@keyframes ripple {
  0% {
    transform: scale(0, 0);
    opacity: 0.5;
  }
  100% {
    transform: scale(20, 20);
    opacity: 0;
  }
}

/* Glassmorphism Cards - Works in both dark/light modes */
.glass-card {
  backdrop-filter: blur(10px) saturate(180%);
  -webkit-backdrop-filter: blur(10px) saturate(180%);
  background-color: rgba(255, 255, 255, 0.12); /* Base transparency */
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
  transition: all 0.3s ease;
}

/* Dark mode specific adjustments */
body:not(.light-mode) .glass-card {
  background-color: rgba(17, 24, 39, 0.5);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
}

/* Light mode specific adjustments */
body.light-mode .glass-card {
  backdrop-filter: blur(8px) saturate(180%);
  background-color: rgba(255, 255, 255, 0.5);
  border-color: rgba(209, 213, 219, 0.2);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

/* Text contrast in light mode */
body.light-mode .glass-card {
  color: #374151;
}

body.light-mode .glass-card p {
  color: #4b5563;
}

/* Premium Light Mode Navbar */
body.light-mode .navbar {
  background-color: rgba(239, 246, 255, 0.9) !important; /* Very light blue tint */
  border-bottom: 1px solid rgba(219, 228, 255, 0.5);
}

body.light-mode .nav-link {
  color: #374151 !important;
  font-weight: 500;
}

body.light-mode .nav-link:hover {
  color: #2563eb !important;
}

body.light-mode .nav-link::after {
  background-color: #2563eb !important;
  height: 3px;
}

body.light-mode .navbar .text-white {
  color: #1e40af !important;
  font-weight: 600;
}

/* Optional: Add a soft blue tint to active nav item */
body.light-mode .nav-link.active {
  color: #2563eb !important;
}

/* Light mode adjustments */
body.light-mode .social-icon {
  color: #4b5563;
}

body.light-mode .social-icon:hover {
  color: #2563eb;
}

body.light-mode .md\:flex .social-icon {
  background: rgba(0, 0, 0, 0.05);
}

body.light-mode #experience h2::after {
  background: #2563eb;
}

body.light-mode .education-item::before {
  background: linear-gradient(to bottom, #2563eb, transparent);
}

body.light-mode .research-item::before {
  background: white;
}

body.light-mode .skill-item i.fab.fa-github { color: #181717; }
body.light-mode .skill-item i.fas.fa-brain { color: #5E35B1; }

body.light-mode .award-item {
  border-bottom-color: rgba(0,0,0,0.05);
}

body.light-mode .project-tag {
  background: rgba(0,0,0,0.03);
}

body.light-mode .modal-content {
  background: linear-gradient(135deg, rgba(249,250,251,0.98) 0%, rgba(241,245,249,0.98) 100%);
}

body.light-mode .journey-item {
  border-bottom-color: rgba(0,0,0,0.1);
}

body.light-mode form input, 
body.light-mode form textarea {
  background: rgba(0,0,0,0.05);
  border-color: #e5e7eb;
}

body.light-mode .footer-link {
  color: #2563eb;
}

body.light-mode .footer-link:hover {
  color: #1e40af;
}

body.light-mode .footer-link::after {
  background-color: #2563eb !important;
  height: 3px;
}

body.light-mode .footer {
  background-color: rgba(239, 246, 255, 0.9) !important; /* Very light blue tint */
  border-top: 1px solid rgba(219, 228, 255, 0.5);
}

body.light-mode .footer-text {
  color: #374151 !important;
  font-weight: 500;
}

body.light-mode .footer-link.active {
  color: #2563eb !important;
}

/* Hover effects */
.glass-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.25);
}

/* Section Styles */
section {
  min-height: calc(100vh - 4rem);
  padding-top: 4rem;
}

/* Experience Section */
#experience h2 {
  position: relative;
}

#experience h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: #3b82f6;
  border-radius: 3px;
}

/* Education Card */
.education-item {
  position: relative;
  padding-left: 1.5rem;
}

.education-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 2px;
  background: linear-gradient(to bottom, #3b82f6, transparent);
}

/* Research Timeline */
.research-item {
  position: relative;
  padding-left: 1.5rem;
}

.research-item::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 10px;
  width: 12px;
  height: 12px;
  border: 2px solid #3b82f6;
  border-radius: 50%;
  background: #1e293b;
  z-index: 1;
}

.research-item:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 11px;
  top: 22px;
  width: 2px;
  height: calc(100% - 20px);
  background: #3b82f6;
}

/* Skill Icons - Color Adjustments */
.skill-item i.fab.fa-python { color: #3776AB; }
.skill-item i.fas.fa-database { color: #00758F; }
.skill-item i.fab.fa-matlab { color: #FF6C00; }
.skill-item i.fas.fa-brain { color: #7E4DD2; }
.skill-item i.fas.fa-robot { color: #3D85C6; }
.skill-item i.fas.fa-fire { color: #EE4B2B; }
.skill-item i.fas.fa-project-diagram { color: #FF6F00; }

/* Hover effects */
.skill-item:hover i {
  transform: scale(1.2);
  transition: transform 0.3s ease;
}

/* Achievements Section */
#achievements h2 span {
  transition: all 0.3s ease;
}

#achievements h2:hover span {
  transform: translateY(-2px);
}

#achievements h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: #3b82f6;
  border-radius: 3px;
}

/* Award Items */
.award-item {
  transition: all 0.3s ease;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.award-item:last-child {
  border-bottom: none;
}

.award-item:hover {
  transform: translateY(-3px);
}

::-webkit-scrollbar {
  width: 0.6rem;
  border-radius: 0.5rem;
  background-color: rgba(255, 255, 255, 0.18);
}

::-webkit-scrollbar-thumb {
    background-color: #3b82f6;
    border-radius: 0.5rem;
}

/* Connections Section */
#connections h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: #3b82f6;
  border-radius: 3px;
}

.journey-item {
  position: relative;
  padding-bottom: 2rem;
  border-bottom: 1px dashed rgba(255,255,255,0.1);
  transition: all 0.3s ease;
}

.journey-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.journey-item:hover {
  transform: translateY(-3px);
}

/* Contact Form */
form input, form textarea {
  transition: all 0.3s ease;
}

form input:focus, form textarea:focus {
  background: rgba(255,255,255,0.05);
}

/* Social Icons */
.social-icon {
  position: relative;
  overflow: hidden;
}

.social-icon::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(255,255,255,0.2) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.social-icon:hover::after {
  opacity: 1;
}

/* Footer */
footer {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0.1); /* Light background with transparency */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); /* Subtle shadow */
  transition: background-color 0.3s ease, border-color 0.3s ease;
  z-index: 1000;
}

.footer-link {
  color: #93c5fd;
  transition: all 0.3s ease;
  position: relative;
  padding-bottom: 2px;
}

.footer-link:hover {
  color: #3b82f6;
  width: 100%;
}

.footer-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background-color: #3b82f6;
  transition: width 0.3s ease;
}

.footer-hidden {
  display: none;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.footer-hidden.visible {
  display: inline;
  opacity: 1;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    /* Navigation */
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: rgba(0, 0, 0, 0.95);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-list {
        flex-direction: column;
        gap: 1.5rem;
    }

    /* Hero Section */
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

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

@media screen and (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

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

    .hero-description {
        font-size: 0.9rem;
    }

    .about-section h2 {
        font-size: 2rem;
    }
}