  :root {
      --primary-color: #3498db;
      --secondary-color: #2c3e50;
      --accent-color: #e74c3c;
      --text-color: #333;
      --bg-color: #f5f5f5;
      --card-bg: #fff;
      --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
      --transition: all 0.3s ease;
    }

    .dark-mode {
      --primary-color: #4da6ff;
      --secondary-color: #1a2530;
      --accent-color: #ff6b6b;
      --text-color: #e0e0e0;
      --bg-color: #121212;
      --card-bg: #1e1e1e;
      --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    }

    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    body {
      font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
      line-height: 1.6;
      color: var(--text-color);
      background-color: var(--bg-color);
      transition: var(--transition);
    }

  /* Style for the form */
  .form-group {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
  }

  .form-group label {
    flex-basis: 20%;
    text-align: left;
  }

  .form-group input,
  .form-group textarea {
    flex-grow: 1;
    padding: 8px;
    margin-left: 10px;
    width: 100%;
  }

  /* Optional: Button style */
  button {
    margin-top: 15px;
    padding: 10px 20px;
    background-color: #007BFF;
    color: white;
    border: none;
    cursor: pointer;
  }

  button:hover {
    background-color: #0056b3;
  }

    a {
      color: var(--primary-color);
      text-decoration: none;
      transition: var(--transition);
    }

    a:hover {
      color: var(--accent-color);
    }

    /* Header and Navigation */
    header {
      background-color: var(--secondary-color);
      position: sticky;
      top: 0;
      z-index: 1000;
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }

    .navbar {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 1rem 5%;
      max-width: 1400px;
      margin: 0 auto;
    }

    .nav-left, .nav-right {
      display: flex;
      align-items: center;
      gap: 1.5rem;
    }

    .nav-left a, .social-icons a {
      color: #fff;
      font-weight: 500;
      padding: 0.5rem 0;
      position: relative;
    }

    .nav-left a::after {
      content: '';
      position: absolute;
      width: 0;
      height: 2px;
      bottom: 0;
      left: 0;
      background-color: var(--accent-color);
      transition: var(--transition);
    }

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

    .logo {
    width: 200px;
    height: 90px;
    object-fit: cover; /* Crops image to fill height */
    margin-left: -40px;
  }

    .social-icons {
      display: flex;
      gap: 1rem;
    }

    .social-icons a:hover {
      transform: translateY(-3px);
    }

    .nav-item {
      position: relative;
    }

    .dropdown-menu {
      position: absolute;
      top: 100%;
      left: 0;
      background-color: var(--secondary-color);
      min-width: 160px;
      box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
      z-index: 1;
      display: none;
      border-radius: 4px;
      overflow: hidden;
    }

    .nav-item:hover .dropdown-menu {
      display: block;
    }

    .dropdown-menu a {
      padding: 12px 16px;
      display: block;
      width: 100%;
    }

    .dropdown-menu a:hover {
      background-color: rgba(255, 255, 255, 0.1);
    }

    /* Mobile menu button */
    .mobile-menu-btn {
      display: none;
      background: none;
      border: none;
      color: white;
      font-size: 1.5rem;
      cursor: pointer;
    }

    /* Main Content */
    .hero {
      background: black;
      color: white;
      padding: 5rem 5%;
      text-align: center;
    }

    .hero h1 {
      font-size: 2.5rem;
      margin-bottom: 1rem;
    }

    .hero p {
      font-size: 1.2rem;
      max-width: 500px;
      margin: 0 auto 2rem;
    }

    .content {
      max-width: 1200px;
      margin: 0 auto;
      padding: 3rem 5%;
    }

    section {
      margin-bottom: 4rem;
    }

    h2 {
      font-size: 2rem;
      margin-bottom: 1.5rem;
      color: var(--primary-color);
      position: relative;
      padding-bottom: 0.5rem;
    }

    h2::after {
      content: '';
      position: absolute;
      left: 0;
      bottom: 0;
      height: 3px;
      width: 60px;
      background-color: var(--accent-color);
    }

    h3 {
      font-size: 1.5rem;
      margin-bottom: 1rem;
      color: var(--secondary-color);
    }

    p {
      margin-bottom: 1.5rem;
    }

    /* About Section Enhancements */
    .about-content {
      max-width: 1000px;
      margin: 0 auto;
    }
    
    .expertise-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
      gap: 2rem;
      margin: 2.5rem 0;
    }
    
    .expertise-item {
      background: var(--card-bg);
      padding: 2rem;
      border-radius: 12px;
      box-shadow: var(--card-shadow);
      transition: var(--transition);
      border-left: 4px solid var(--primary-color);
    }
    
    .expertise-item:hover {
      transform: translateY(-3px);
      box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    }
    
    .expertise-item h3 {
      color: var(--primary-color);
      margin-bottom: 1rem;
      display: flex;
      align-items: center;
      gap: 0.8rem;
      font-size: 1.3rem;
    }
    
    .expertise-item h3 i {
      font-size: 1.5rem;
      color: var(--accent-color);
    }
    
    .expertise-item p {
      margin-bottom: 0;
      line-height: 1.6;
    }
    
    /* Lab Features Styling */
    .lab-features {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
      gap: 1.5rem;
      margin: 2rem 0;
    }
    
    .lab-feature {
      background: var(--card-bg);
      padding: 1.5rem;
      border-radius: 8px;
      box-shadow: var(--card-shadow);
      transition: var(--transition);
      border-top: 3px solid var(--primary-color);
    }
    
    .lab-feature:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 15px rgba(0, 0, 0, 0.12);
    }
    
    .lab-feature h3 {
      color: var(--primary-color);
      margin-bottom: 1rem;
      display: flex;
      align-items: center;
      gap: 0.6rem;
      font-size: 1.2rem;
    }
    
    .lab-feature h3 i {
      color: var(--accent-color);
      font-size: 1.3rem;
    }

    /* Cards for Projects, Blogs */
    .cards-container {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
      gap: 2rem;
      margin-top: 2rem;
    }

    .card {
      background-color: var(--card-bg);
      border-radius: 8px;
      overflow: hidden;
      box-shadow: var(--card-shadow);
      transition: var(--transition);
    }

    .card:hover {
      transform: translateY(-5px);
      box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    }

    .card-img {
      width: 100%;
      height: 180px;
      object-fit: cover;
    }

    .pub-card-img {
      width: 100%;
      height: auto;
      max-height: 300px;
      object-fit: cover;
    }

    .card-content {
      padding: 1.5rem;
    }

    .card-title {
      font-size: 1.25rem;
      margin-bottom: 0.75rem;
      color: var(--primary-color);
    }

    .card-text {
      margin-bottom: 1rem;
      color: var(--text-color);
    }

    .card-link {
      display: inline-block;
      padding: 0.5rem 1rem;
      background-color: var(--primary-color);
      color: white;
      border-radius: 4px;
      font-weight: 500;
      transition: var(--transition);
    }

    .card-link:hover {
      background-color: var(--accent-color);
      color: white;
    }

    /* Publications */
    .publication {
      background-color: var(--card-bg);
      padding: 1.5rem;
      margin-bottom: 1.5rem;
      border-radius: 8px;
      box-shadow: var(--card-shadow);
    }

    .publication h3 {
      margin-bottom: 0.5rem;
    }

    .publication-meta {
      font-style: italic;
      color: #666;
      margin-bottom: 1rem;
    }

    /* Contact Form */
    .contact-info {
      display: flex;
      flex-wrap: wrap;
      gap: 2rem;
      margin-top: 2rem;
    }

    .contact-method {
      flex: 1;
      min-width: 250px;
      background-color: var(--card-bg);
      padding: 1.5rem;
      border-radius: 8px;
      box-shadow: var(--card-shadow);
      transition: var(--transition);
    }

    .contact-method:hover {
      transform: translateY(-5px);
    }

    .contact-method i {
      font-size: 2rem;
      color: var(--primary-color);
      margin-bottom: 1rem;
    }

    /* Footer */
    footer {
      background-color: var(--secondary-color);
      color: white;
      padding: 2rem 5%;
      text-align: center;
    }

    .footer-content {
      max-width: 1200px;
      margin: 0 auto;
      display: flex;
      flex-direction: column;
      align-items: center;
    }

    .footer-logo {
      height: 180px;
      width: 450px;
      object-fit: cover;
    }

    .footer-links {
      display: flex;
      justify-content: center;
      flex-wrap: wrap;
      gap: 1.5rem;
      margin-bottom: 1.5rem;
    }

    .footer-links a {
      color: white;
    }

    .footer-social {
      display: flex;
      gap: 1rem;
      margin-bottom: 1.5rem;
    }

    .footer-social a {
      color: white;
      background-color: rgba(255, 255, 255, 0.1);
      width: 40px;
      height: 40px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: var(--transition);
    }

    .footer-social a:hover {
      background-color: var(--primary-color);
      transform: translateY(-3px);
    }

    .copyright {
      opacity: 0.7;
    }

    /* Dark Mode Toggle */
    .dark-mode-toggle {
      position: fixed;
      bottom: 2rem;
      right: 2rem;
      background-color: var(--secondary-color);
      color: white;
      border: none;
      width: 50px;
      height: 50px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
      z-index: 999;
      transition: var(--transition);
    }

    .dark-mode-toggle:hover {
      transform: rotate(30deg);
    }

    /* Content Display Section */
    .content-display {
      display: none;
      background-color: var(--card-bg);
      padding: 2rem;
      margin: 2rem 0;
      border-radius: 8px;
      box-shadow: var(--card-shadow);
      transition: var(--transition);
      font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    }

    .content-display.active {
      display: block;
    }

    .content-display h3 {
      color: var(--primary-color);
      margin-bottom: 1rem;
    }

    .content-close {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 1rem;
    }

    .close-btn {
      background: none;
      border: none;
      color: var(--accent-color);
      font-size: 1.2rem;
      cursor: pointer;
      transition: var(--transition);
    }

    .close-btn:hover {
      transform: scale(1.1);
    }

    .loading {
      text-align: center;
      padding: 2rem;
      font-style: italic;
      color: var(--text-color);
    }

    /* Back to top button */
    .back-to-top {
      position: fixed;
      bottom: 6rem;
      right: 2rem;
      background-color: var(--primary-color);
      color: white;
      border: none;
      width: 50px;
      height: 50px;
      border-radius: 50%;
      display: none;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
      z-index: 999;
      transition: var(--transition);
    }



    .back-to-top:hover {
      background-color: var(--accent-color);
    }

    /* Mobile Responsive Design */
    @media (max-width: 992px) {
      .cards-container {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
      }
      
      .footer-logo {
        width: 80%;
        height: auto;
      }
    }

    @media (max-width: 768px) {
      /* Navigation adjustments */
      .nav-left {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--secondary-color);
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem;
        display: none;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
      }

      .nav-left.active {
        display: flex;
      }

      .nav-left a {
        width: 100%;
        padding: 0.75rem 0;
      }

      .dropdown-menu {
        position: static;
        width: 100%;
        box-shadow: none;
        padding-left: 1rem;
        margin-top: 0.5rem;
        margin-bottom: 0.5rem;
      }

      .nav-item:hover .dropdown-menu {
        display: none;
      }

      .nav-item.active .dropdown-menu {
        display: block;
      }

      .mobile-menu-btn {
        display: block;
      }

      .logo {
        width: 150px;
        margin-left: 0;
      }

      /* Hero section */
      .hero {
        padding: 3rem 5%;
      }

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

      /* Content adjustments */
      .content {
        padding: 2rem 5%;
      }

      h2 {
        font-size: 1.75rem;
      }

      .cards-container {
        grid-template-columns: 1fr;
      }

      .contact-info {
        flex-direction: column;
      }

      .contact-method {
        width: 100%;
      }

      /* Footer adjustments */
      .footer-logo {
        width: 90%;
        height: auto;
      }

      .footer-links {
        flex-direction: column;
        gap: 1rem;
      }
    }

    @media (max-width: 480px) {
      .hero h1 {
        font-size: 1.75rem;
      }

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

      .social-icons {
        gap: 0.5rem;
      }

      .content-display {
        padding: 1.5rem;
      }

      pre {
        overflow-x: auto;
        white-space: pre-wrap;
        word-wrap: break-word;
      }
    }
#home {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  text-align: center;
  margin: 0 auto;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.hero-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  text-align: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
              radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%);
  z-index: 1;
}

.hero-title {
  font-size: 4rem;
  font-weight: 900;
  letter-spacing: 3px;
  margin-bottom: 1rem;
  text-transform: uppercase;
  z-index: 2;
  position: relative;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  animation: fadeInUp 1s ease-out;
}

.hero-description {
  font-size: 1.4rem;
  font-weight: 300;
  max-width: 800px;
  line-height: 1.7;
  z-index: 2;
  position: relative;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  animation: fadeInUp 1s ease-out 0.3s both;
}

.highlight-robotics {
  color: #ffd700;
  font-weight: 600;
}

.highlight-ai {
  color: #00ffff;
  font-weight: 600;
}

.highlight-cv {
  color: #00ff88;
  font-weight: 600;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#home p {
  font-size: 1.5rem;         /* increased font size */
  font-weight: 400;
  /* color: #555; */
  max-width: 700px;
  line-height: 1.6;
}


/* styles.css for home sentense*/
 /* Search Container Styles */
  /* Search Container Styles */
.search-container {
  position: relative;
  display: flex;
  margin-right: 20px;
  align-items: center;
}

/* Search Input Styles */
#siteSearchForm {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
  transition: all 0.3s ease;
}

.dark-mode #siteSearchForm {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

#siteSearchInput {
  background: transparent;
  border: none;
  padding: 8px 12px;
  width: 180px;
  color: var(--text-color);
  font-size: 14px;
}

#siteSearchForm button {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px 12px;
  color: var(--text-color);
  opacity: 0.7;
  transition: opacity 0.2s;
}

#siteSearchForm button:hover {
  opacity: 1;
}

#siteSearchInput:focus {
  outline: none;
}

#siteSearchForm:focus-within {
  box-shadow: 0 0 0 2px var(--accent-color);
}

/* Search Results Container */
/* Search Container Styles */
.search-container {
  position: relative;
  display: flex;
  margin-right: 20px;
  align-items: center;
}

/* Search Input Styles */
#siteSearchForm {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
  transition: all 0.3s ease;
}

.dark-mode #siteSearchForm {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

#siteSearchInput {
  background: transparent;
  border: none;
  padding: 8px 12px;
  width: 180px;
  color: var(--text-color);
  font-size: 14px;
}

#siteSearchForm button {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px 12px;
  color: var(--text-color);
  opacity: 0.7;
  transition: opacity 0.2s;
}

#siteSearchForm button:hover {
  opacity: 1;
}

#siteSearchInput:focus {
  outline: none;
}

#siteSearchForm:focus-within {
  box-shadow: 0 0 0 2px var(--accent-color);
}

/* Search Results Container */
.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-color);
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  max-height: 300px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
  margin-top: 8px;
}

.search-result-item {
  padding: 10px 15px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: background-color 0.2s;
}

.search-result-item:hover {
  background-color: var(--hover-color);
}

.search-result-item h4 {
  margin: 0 0 5px 0;
  font-size: 16px;
  color: var(--accent-color);
}

.search-result-item p {
  margin: 0;
  font-size: 14px;
  opacity: 0.8;
}

.search-result-context {
  font-size: 13px;
  opacity: 0.7;
}

.highlight {
  background-color: rgba(255, 230, 0, 0.4);
  padding: 2px 0;
  border-radius: 2px;
  font-weight: bold;
}

/* For mobile */
@media (max-width: 768px) {
  .search-container {
    width: 100%;
    margin: 10px 0;
    order: 1;
  }
  
  #siteSearchForm {
    width: 100%;
  }
  
  #siteSearchInput {
    width: 100%;
  }
  
  /* Hero section mobile responsiveness */
  .hero-title {
    font-size: 2.5rem;
    letter-spacing: 2px;
  }
  
  .hero-description {
    font-size: 1.1rem;
    padding: 0 1rem;
  }
  
  .hero-section {
    padding: 1.5rem;
    min-height: 70vh;
  }
  
  /* About section mobile */
  .expertise-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .lab-features {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
    letter-spacing: 1px;
  }
  
  .hero-description {
    font-size: 1rem;
  }
  
  .expertise-item {
    padding: 1.5rem;
  }
  
  .lab-feature {
    padding: 1.2rem;
  }
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.3s ease-out;
}

.modal-content {
  background-color: var(--card-bg);
  margin: 2% auto;
  padding: 0;
  border-radius: 12px;
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  animation: slideIn 0.3s ease-out;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.modal-header {
  display: flex;
  justify-content: flex-end;
  padding: 1rem 1.5rem 0.5rem;
  border-bottom: 1px solid var(--bg-color);
}

.close-modal {
  color: var(--text-color);
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
  transition: var(--transition);
}

.close-modal:hover,
.close-modal:focus {
  color: var(--accent-color);
  transform: scale(1.1);
}

.modal-body {
  padding: 1.5rem 2rem 2rem;
  color: var(--text-color);
  line-height: 1.6;
}

.modal-body h2 {
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  font-size: 1.8rem;
  border-bottom: 2px solid var(--accent-color);
  padding-bottom: 0.5rem;
}

.modal-body h3 {
  color: var(--secondary-color);
  margin: 1.5rem 0 1rem;
  font-size: 1.4rem;
}

.modal-body h4 {
  color: var(--secondary-color);
  margin: 1.2rem 0 0.8rem;
  font-size: 1.2rem;
}

.modal-body p {
  margin-bottom: 1rem;
  text-align: justify;
}

.modal-body ul, .modal-body ol {
  margin: 1rem 0 1rem 2rem;
}

.modal-body li {
  margin-bottom: 0.5rem;
}

.modal-body a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.modal-body a:hover {
  color: var(--accent-color);
  text-decoration: underline;
}

.modal-body code {
  background-color: var(--bg-color);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.9em;
}

.modal-body strong {
  color: var(--secondary-color);
  font-weight: 600;
}

.loading {
  text-align: center;
  padding: 3rem;
  font-size: 1.2rem;
  color: var(--text-color);
}

.error-message {
  text-align: center;
  padding: 2rem;
  color: var(--accent-color);
}

.error-message p {
  margin-bottom: 1rem;
}

/* Modal Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Modal Responsive Design */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    margin: 5% auto;
    max-height: 85vh;
  }
  
  .modal-body {
    padding: 1rem 1.5rem;
  }
  
  .modal-body h2 {
    font-size: 1.5rem;
  }
}

/* Add these improved formula styles to your existing CSS */

/* Enhanced Formula Container Styles */
.formula-container {
    text-align: center;
    margin: 20px 0;
    padding: 20px;
    background: var(--card-bg);
    border-left: 4px solid var(--primary-color);
    border-radius: 0 12px 12px 0;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    position: relative;
    overflow-x: auto;
}

.formula-container:hover {
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.formula-container .MathJax {
    font-size: 1.2em !important;
    color: var(--text-color) !important;
}

.formula-description {
    font-style: italic;
    color: var(--text-color);
    opacity: 0.8;
    margin: 15px 0 10px 0;
    text-align: left;
    font-size: 0.95rem;
    line-height: 1.5;
    border-top: 1px solid rgba(0,0,0,0.1);
    padding-top: 10px;
}

/* Dark mode formula support */
.dark-mode .formula-container {
    background: var(--card-bg);
    border-left-color: var(--primary-color);
}

.dark-mode .formula-description {
    color: var(--text-color);
    border-top-color: rgba(255,255,255,0.1);
}

.dark-mode .formula-container .MathJax {
    color: var(--text-color) !important;
}

/* MathJax specific styling */
.MathJax_Display {
    margin: 1em 0 !important;
}

.MathJax {
    font-family: 'Times New Roman', Times, serif !important;
}

/* Responsive formula styling */
@media (max-width: 768px) {
    .formula-container {
        margin: 15px 0;
        padding: 15px;
        border-radius: 0 8px 8px 0;
    }
    
    .formula-container .MathJax {
        font-size: 1em !important;
    }
    
    .formula-description {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .formula-container {
        padding: 12px;
        margin: 12px 0;
    }
    
    .formula-container .MathJax {
        font-size: 0.9em !important;
    }
    
    .formula-description {
        font-size: 0.85rem;
    }
}

/* Formula section styling for blog content */
.formula-section {
    background: var(--card-bg);
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    box-shadow: var(--card-shadow);
}

.dark-mode .formula-section {
    border-color: rgba(255,255,255,0.1);
}

/* Math expression highlighting */
.math-highlight {
    background: linear-gradient(120deg, rgba(52, 152, 219, 0.1) 0%, rgba(52, 152, 219, 0.2) 100%);
    padding: 2px 4px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-weight: 500;
}

/* Variable definitions list styling */
.variable-list {
    background: var(--bg-color);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    border-left: 3px solid var(--accent-color);
}

.variable-list ul {
    margin: 0;
    padding-left: 1.5rem;
}

.variable-list li {
    margin-bottom: 0.5rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.variable-list strong {
    font-family: 'Courier New', monospace;
    color: var(--primary-color);
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.back-to-top:hover {
  background-color: var(--accent-color);
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

/* Smooth Scroll */
html {
  scroll-behavior: smooth;
}

/* Enhanced Card Hover Effects */
.card {
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.publication {
  transition: all 0.3s ease;
}

.publication:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

/* Loading Animation for Images */
img.pub-card-img {
  transition: opacity 0.3s ease;
}

img[loading="lazy"] {
  opacity: 0;
}

img[loading="lazy"].loaded {
  opacity: 1;
}

/* Improved Hero Section Animation */
.hero-section {
  animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Expertise Grid Fade In */
.expertise-item {
  animation: fadeIn 0.8s ease-out backwards;
}

.expertise-item:nth-child(1) {
  animation-delay: 0.1s;
}

.expertise-item:nth-child(2) {
  animation-delay: 0.2s;
}

.expertise-item:nth-child(3) {
  animation-delay: 0.3s;
}

.expertise-item:nth-child(4) {
  animation-delay: 0.4s;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive adjustments for back-to-top button */
@media (max-width: 768px) {
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    font-size: 1rem;
  }
}

/* Skills Section */
.skills-section {
  margin-top: 3rem;
  padding: 2rem;
  background-color: var(--card-bg);
  border-radius: 10px;
  box-shadow: var(--card-shadow);
}

.skills-section h3 {
  text-align: center;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
  font-size: 1.5rem;
}

.skills-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
}

.skill-tag {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: default;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.skill-tag:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Dark mode adjustments for skills */
.dark-mode .skill-tag {
  background: linear-gradient(135deg, #4da6ff, #ff6b6b);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.dark-mode .skill-tag:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Research Statistics Section */
.research-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
  padding: 2rem 0;
}

.stat-card {
  background-color: var(--card-bg);
  border-radius: 15px;
  padding: 2rem;
  text-align: center;
  box-shadow: var(--card-shadow);
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.stat-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
  border-color: var(--primary-color);
}

.stat-icon {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.stat-card:hover .stat-icon {
  transform: scale(1.1) rotate(5deg);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--primary-color);
  margin: 0.5rem 0;
  line-height: 1;
}

.stat-label {
  font-size: 1rem;
  color: var(--text-color);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Animate stats on scroll */
.stat-card {
  animation: fadeInUp 0.6s ease-out backwards;
}

.stat-card:nth-child(1) {
  animation-delay: 0.1s;
}

.stat-card:nth-child(2) {
  animation-delay: 0.2s;
}

.stat-card:nth-child(3) {
  animation-delay: 0.3s;
}

.stat-card:nth-child(4) {
  animation-delay: 0.4s;
}

/* Responsive adjustments for stats */
@media (max-width: 768px) {
  .research-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  
  .stat-card {
    padding: 1.5rem;
  }
  
  .stat-icon {
    font-size: 2.5rem;
  }
  
  .stat-number {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .research-stats {
    grid-template-columns: 1fr;
  }
}

/* Social Share Buttons */
.social-share {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.5rem 0;
  padding: 1rem 0;
  flex-wrap: wrap;
}

.share-label {
  font-weight: 600;
  color: var(--text-color);
  font-size: 0.9rem;
  margin-right: 0.5rem;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: white;
  transition: all 0.3s ease;
  text-decoration: none;
  font-size: 1.1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.share-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.share-btn.twitter {
  background-color: #1DA1F2;
}

.share-btn.twitter:hover {
  background-color: #0d8bd9;
}

.share-btn.linkedin {
  background-color: #0077B5;
}

.share-btn.linkedin:hover {
  background-color: #005885;
}

.share-btn.facebook {
  background-color: #1877F2;
}

.share-btn.facebook:hover {
  background-color: #0d5dbf;
}

/* Dark mode adjustments for share buttons */
.dark-mode .share-btn {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.dark-mode .share-btn:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}
