:root {
  --primary-color: #2c3e50;
  --secondary-color: #34495e;
  --accent-color: #e67e22;
  --text-color: #ecf0f1;
  --hover-color: #3d566e;
  --card-bg: #fff;
  --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --modal-bg: rgba(0, 0, 0, 0.7);
  --warm-white: #fffcf5;
  /* Warm white background */
  --section-bg: #ffffff;
  /* Pure white for content sections */
  --border-color: #f0f0f0;
  /* Light gray border */
  --heading-color: #d35400;
  --scrollbar-bg: #f1f1f1;
  --scrollbar-thumb: #888;
  --scrollbar-thumb-hover: #555;
  --close-btn-bg: rgba(0, 0, 0, 0.1);
  --close-btn-hover-bg: rgba(0, 0, 0, 0.2);
}

body {
  display: flex;
  min-height: 100vh;
  background-color: #f8f9fa;
}

/* Main Content Styles */
.main-content {
  flex: 1;
  padding: 30px;
  margin-left: 280px;
  overflow-y: auto;
  transition: margin-left 0.3s ease;
}

header {
  text-align: center;
  margin-bottom: 35px;
  padding: 14px 16px;
  background-color: #2d3748;
  border-radius: 12px;
  color: white;
  box-shadow: var(--card-shadow);
  position: relative;
  overflow: hidden;
}

header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 300px;
  height: 300px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

header::after {
  content: '';
  position: absolute;
  bottom: -50%;
  left: -10%;
  width: 250px;
  height: 250px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

header h1 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.5rem;
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}

/* Publication Categories */
.publication-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
  justify-content: center;
}

.category-btn {
  height: 40px;
  border-radius: 20px;
  background-color: var(--secondary-color);
  color: white;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0 1.2rem;
  min-width: 80px;
}

.category-btn:hover {
  background-color: var(--accent-color);
  transform: translateY(-2px);
}

.category-btn.active {
  background-color: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(230, 126, 34, 0.3);
}

/* Publication Cards */
.publications-grid {
  display: grid;
  /* grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem; */
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 2rem;
}

.publication-card {
  background-color: var(--card-bg);
  border-radius: 8px;
  box-shadow: var(--card-shadow);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.publication-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.card-header {
  padding: 1rem;
  background-color: #2d3748;
  color: white;
}

.card-header h3 {
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
}

.card-header .category {
  font-size: 0.8rem;
  color: #bdc3c7;
}

.card-body {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.card-body p {
  margin-bottom: 1rem;
  color: #4a5568;
  text-align: center;
}

.card-footer {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.card-authors {
  font-size: 0.85rem;
  color: #666;
  text-align: center;
  margin-bottom: 0.5rem;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  width: 100%;
}

.tag {
  padding: 0.25rem 0.5rem;
  background-color: #fdebd0;
  border-radius: 4px;
  font-size: 0.75rem;
  color: #7e5109;
}

.view-btn {
  background-color: var(--accent-color);
  color: white;
  border: none;
  border-radius: 25px;
  padding: 0.6rem 1.5rem;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.2s, transform 0.2s;
  display: flex;
  align-items: center;
}

.view-btn:hover {
  background-color: #2d3748;
  transform: translateY(-2px);
}

.view-btn i {
  margin-left: 0.5rem;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--modal-bg);
  z-index: 2000;
  overflow-y: auto;
}

.modal-content {
  background-color: var(--section-bg);
  margin: 0% auto;
  padding: 2rem;
  border-radius: 12px;
  width: 90%;
  max-width: 945px;
  position: relative;
  overflow: hidden;
  animation: modalFadeIn 0.3s;
  border: 1px solid var(--border-color);
  max-height: 99vh;
  overflow-y: auto;
}

/* Custom scrollbar for modal */
.modal-content::-webkit-scrollbar {
  width: 10px;
}

.modal-content::-webkit-scrollbar-track {
  background: var(--scrollbar-bg);
  border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 10px;
  border: 2px solid var(--scrollbar-bg);
}

.modal-content::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.close-modal {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  background-color: var(--close-btn-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
  border: none;
  outline: none;
}

.close-modal:hover {
  background-color: var(--close-btn-hover-bg);
  transform: rotate(90deg);
}

.close-modal i {
  color: #555;
  font-size: 18px;
  transition: color 0.3s ease;
}

.close-modal:hover i {
  color: var(--heading-color);
}

.modal-header {
  border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
  font-size: 1.3rem;
  color: var(--heading-color);
  margin-bottom: 0.5rem;
}

.modal-authors {
  font-size: 1rem;
  color: #555;
  margin-bottom: 1rem;
  font-weight: bold;
}

.modal-body {
  line-height: 1.6;
  color: #333;
  margin-bottom: 1.5rem;
  text-align: justify;
}

.modal-body h3 {
  font-size: 1.3rem;
  color: var(--heading-color);
  margin: 1.5rem 0 0.75rem;
}

.modal-body p {
  margin-bottom: 1rem;
}

.modal-body ul,
ol {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.modal-body li {
  margin-bottom: 0.5rem;
}

.modal-footer {
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: center;
}

.back-btn {
  background-color: var(--secondary-color);
  color: white;
  border: none;
  border-radius: 25px;
  padding: 0.6rem 1.5rem;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.2s, transform 0.2s;
  display: flex;
  align-items: center;
}

.back-btn:hover {
  background-color: var(--hover-color);
  transform: translateY(-2px);
}

.back-btn i {
  margin-right: 0.5rem;
}

/* @media(min-width:913px) {
  .main-content {
    margin-left: 280px;
  }

} */


/* open source project section  */

/* Projects Section */
.projects-container {
  /* max-width: 1200px; */
  margin: 0 auto;
}

.page-header {
  text-align: center;
  margin-bottom: 3rem;
}

.page-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
}

.page-subtitle {
  color: var(--text-light);
  font-size: 1.1rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

/* Project Card */
.project-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--card-hover-shadow);
}

.project-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-card:hover .project-image {
  transform: scale(1.05);
}

.project-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.project-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 0.75rem;
}

.project-description {
  color: var(--text-light);
  margin-bottom: 1.5rem;
  line-height: 1.6;
  flex-grow: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.project-tag {
  background: rgba(15, 52, 96, 0.1);
  color: var(--accent-blue);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

.project-footer {
  display: flex;
  justify-content: center;
}

/* Button Styles */
.github-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  background: linear-gradient(135deg, #0f3460 0%, #0a2848 100%);
  color: white;
  border: none;
  border-radius: 50px;
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s ease;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(15, 52, 96, 0.3);
  z-index: 1;
}

.github-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
  z-index: -1;
}

.github-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(15, 52, 96, 0.4);
  color: white;
}

.github-btn:hover::before {
  transform: translateX(0);
}

.github-btn:active {
  transform: translateY(-1px);
}

.github-btn i {
  margin-left: 0.75rem;
  transition: transform 0.3s ease;
}

.github-btn:hover i {
  transform: translateX(3px);
}


/* Responsive */
@media (max-width: 955px) {

  .main-content {
    margin-left: 0;
    padding: 4rem 1rem 1rem;
  }

  .publications-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }

  .projects-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }

  .category-btn {
    height: 36px;
    border-radius: 18px;
    font-size: 0.85rem;
    padding: 0 1rem;
    min-width: 70px;
  }

  .modal-content {
    margin: 5% auto;
    width: 95%;
    padding: 1.5rem;
    max-height: 99vh;
    max-width: 95%;
  }

  .close-modal {
    width: 32px;
    height: 32px;
  }

  .close-modal i {
    font-size: 16px;
  }
}

@media (max-width: 900px) {

  .main-content {
    margin-left: 0;
    padding: 4rem 1rem 1rem;
  }

  .publications-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }

  .projects-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }


  .category-btn {
    height: 36px;
    border-radius: 18px;
    font-size: 0.85rem;
    padding: 0 1rem;
    min-width: 70px;
  }

  .modal-content {
    margin: 5% auto;
    width: 95%;
    padding: 1.5rem;
    max-height: 99vh;
    max-width: 95%;
  }

  .close-modal {
    width: 32px;
    height: 32px;
  }

  .close-modal i {
    font-size: 16px;
  }
}

@media (max-width: 600px) {

  .main-content {
    margin-left: 0;
    padding: 4rem 1rem 1rem;
  }

  .publications-grid {
    grid-template-columns: 2fr;
  }

  .projects-grid {
    grid-template-columns: 2fr;
  }

  .category-btn {
    height: 36px;
    border-radius: 18px;
    font-size: 0.85rem;
    padding: 0 1rem;
    min-width: 70px;
  }

  .modal-content {
    margin: 5% auto;
    width: 95%;
    padding: 1.5rem;
    max-height: 99vh;
    max-width: 95%;
  }

  .close-modal {
    width: 32px;
    height: 32px;
  }

  .close-modal i {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .section-title {
    font-size: 24px;
  }
}