body {
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: #111827;
    color: #e5e7eb;
}
section {
    padding: 5rem 0;
}
.hero-background {
    background-image: linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.8),
            rgba(0, 0, 0, 0.95)
        ),
        url('https://images.unsplash.com/photo-1557804506-66bb17f8b2d1?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzNjU2OHwxfDB8YWxsfHx8fHx8fHwxNjYxNTg1MzY5&ixlib=rb-1.2.1&q=80&w=1080');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* ===================== */
/* Smooth Mobile Menu CSS */
/* ===================== */
.nav-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.77, 0.2, 0.05, 1);
    background: rgba(17, 24, 39, 0.98);
    position: absolute;
    width: 100%;
    left: 0;
    top: 100%;
    z-index: 1000;
}

.nav-menu.active {
    max-height: 100vh;
    transition-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.nav-menu li {
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    padding: 1rem 2rem;
}

.nav-menu.active li {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animation for menu items */
.nav-menu.active li:nth-child(1) { transition-delay: 0.1s; }
.nav-menu.active li:nth-child(2) { transition-delay: 0.2s; }
.nav-menu.active li:nth-child(3) { transition-delay: 0.3s; }
.nav-menu.active li:nth-child(4) { transition-delay: 0.4s; }

/* Hamburger menu icon */
.menu-toggle {
    display: none; /* Hidden by default, shown in mobile via media query */
    background: none;
    border: none;
    cursor: pointer;
    padding: 1rem;
    z-index: 1001;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: #e5e7eb;
    position: relative;
    transition: all 0.3s ease;
}

.hamburger:before,
.hamburger:after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: #e5e7eb;
    transition: all 0.3s ease;
}

.hamburger:before {
    top: -8px;
}

.hamburger:after {
    top: 8px;
}

.menu-toggle.active .hamburger {
    background: transparent;
}

.menu-toggle.active .hamburger:before {
    transform: rotate(45deg);
    top: 0;
}

.menu-toggle.active .hamburger:after {
    transform: rotate(-45deg);
    top: 0;
}

/* Mobile styles */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    /* Ensure nav links stack vertically in mobile */
    .nav-menu {
        display: flex;
        flex-direction: column;
    }
}

/* Continue with your existing styles... */
.nav-link {
    transition: all 0.3s ease-in-out;
    position: relative;
    padding-bottom: 0.25rem;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background-color: #3b82f6;
    transition: width 0.3s ease-in-out;
}
.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}
.nav-link.active {
    color: #3b82f6;
    font-weight: 600;
}
.header-bg-scrolled {
    background-color: rgba(34, 34, 34, 0.95);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}
.project-card img {
    transition: transform 0.3s ease-in-out;
}
.project-card:hover img {
    transform: scale(1.05);
}
.leadership-card {
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}
.leadership-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}
#about p {
    text-align: justify;
}

/* Floating nav styles */
#floating-nav {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
#floating-nav .nav-link {
    color: #d1d5db;
    font-weight: 500;
}
#floating-nav .nav-link:hover,
#floating-nav .nav-link.active {
    color: #3b82f6;
}
#floating-nav .nav-link::after {
    background-color: #3b82f6;
}

/* Back to top button */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #3b82f6;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 99;
}
#back-to-top:hover {
    background-color: #2563eb;
    transform: translateY(-3px);
}
#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

/* Form loading spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Dark/Light mode toggle */
.theme-toggle {
    position: fixed;
    bottom: 0px;
    left: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-top: 22px;
    background-color: #3b82f6;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 99;
}
.theme-toggle:hover {
    background-color: #2563eb;
    transform: translateY(-3px);
}

/* Light mode styles */
body.light-mode {
    background-color: #f3f4f6;
    color: #111827;
}
.light-mode .bg-gray-800 {
    background-color: #e5e7eb;
}
.light-mode .bg-gray-700 {
    background-color: #d1d5db;
}
.light-mode .bg-gray-900 {
    background-color: #f9fafb;
}
.light-mode .text-gray-200,
.light-mode .text-gray-300 {
    color: #4b5563;
}
.light-mode .bg-gray-950 {
    background-color: #e5e7eb;
}

/* Testimonials carousel */
.testimonial-carousel {
    max-width: 800px;
    margin: 0 auto;
}
.testimonial {
    background-color: rgba(31, 41, 55, 0.8);
    padding: 2rem;
    border-radius: 0.5rem;
    text-align: center;
    display: none;
}
.testimonial.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}
.testimonial img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1rem;
}
.testimonial-controls {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
    gap: 0.5rem;
}
.testimonial-control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #4b5563;
    cursor: pointer;
    transition: all 0.3s ease;
}
.testimonial-control.active {
    background-color: #3b82f6;
    transform: scale(1.2);
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Lazy loading for images */
img.lazy {
    opacity: 0;
    transition: opacity 0.3s ease;
}
img.lazy.loaded {
    opacity: 1;
}

/* Toggle */
:root {
  --bg-color: #121212;
  --text-color: #f5f5f5;
  --accent-color: #646cff;
  --card-bg: #1e1e1e;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] {
  --bg-color: #f5f5f5;
  --text-color: #213547;
  --accent-color: #747bff;
  --card-bg: #ffffff;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100;
}

.theme-toggle button {
  background: var(--accent-color);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-color);
}

.light-icon {
  display: none;
}

[data-theme="light"] .dark-icon {
  display: none;
}

[data-theme="light"] .light-icon {
  display: block;
}

/* Skills */
.skills-section {
  padding: 2rem;
  text-align: center;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-top: 1.5rem;
}

.tech-item {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card-bg);
  border-radius: 12px;
  padding: 10px;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.tech-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tech-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.tech-item::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-color);
  color: white;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.8rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  white-space: nowrap;
}

.tech-item:hover::after {
  opacity: 1;
}

/* Enhanced Hover effect */
/* Button hover effects */
.button {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Card hover effects */
.card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: perspective(1000px) rotateX(5deg) translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

/* Leadership card specific effects */
.leadership-card:hover {
  transform: perspective(1000px) rotateX(10deg) translateY(-15px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  z-index: 10;
}