/* projects-portfolio.css - Modern Notion-style gallery layout with modal */
/* Modal styles */
:root {
  --modal-bg: rgba(255, 255, 255, 0.98);
  --modal-text: #2d3748;
  --modal-border: #e2e8f0;
  --modal-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  --modal-transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --accent-color: #9f7aea;
  --accent-hover: #8b5cf6;
  --text-muted: #64748b;
}

/* Base Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  background-color: rgba(0, 0, 0, 0.9);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', sans-serif;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 2rem;
  box-sizing: border-box;
  overscroll-behavior: contain;
}

.modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  position: relative;
  width: 90%;
  max-width: 900px;
  margin: 2rem auto;
  background: var(--modal-bg);
  border-radius: 12px;
  box-shadow: var(--modal-shadow);
  transform: translateY(20px);
  transition: transform 0.3s ease;
  overflow: hidden;
}

.modal.active .modal-content {
  transform: translateY(0);
}

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

.close-modal {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 28px;
  font-weight: 300;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  border-radius: 50%;
  padding: 0;
  margin: 0;
  cursor: pointer;
  z-index: 1001;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.close-modal:hover,
.close-modal:focus {
  color: #fff;
  background: rgba(0, 0, 0, 0.8);
  transform: scale(1.1);
  outline: none;
}

/* Modal body scroll lock when modal is open */
body.modal-open {
  overflow: hidden;
  width: 100%;
  height: 100%;
  position: fixed;
}

/* Project Modal Specific Styles */
#projectDetailsModal .modal-content {
  background: #ffffff;
  color: #333;
  padding: 3rem;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Modal Header */
.modal-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #eee;
}

.modal-title {
  margin: 0 0 0.5rem;
  color: #2d3748;
  font-size: 1.75rem;
  line-height: 1.2;
}

/* Modal Body */
.modal-body {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.modal-image-container {
  position: relative;
  width: 100%;
  max-height: 50vh;
  overflow: hidden;
  border-radius: 8px;
  background: #f8f9fa;
}

.modal-project-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  max-height: 50vh;
}

.modal-details {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .modal {
    padding: 1rem;
  }
  
  .modal-content {
    width: 95%;
    margin: 1rem auto;
  }
  
  #projectDetailsModal .modal-content {
    padding: 1.5rem;
  }
  
  .modal-title {
    font-size: 1.5rem;
  }
}

/* Button styles */
.project-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.2rem;
  margin: 0.5rem;
  border: 2px solid var(--accent-color);
  border-radius: 6px;
  background-color: transparent;
  color: var(--accent-color);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.project-link-btn:hover {
  background-color: rgba(159, 122, 234, 0.1);
  transform: translateY(-1px);
}

.project-link-btn.primary {
  background-color: var(--accent-color);
  color: white;
}

.project-link-btn.primary:hover {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
}

.project-link-btn i {
  margin-right: 0.5rem;
}

/* Poster Modal Styles */
#posterModal .modal-content {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: none;
  box-shadow: none;
  max-width: 90%;
  max-height: 90vh;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.poster-image {
  max-width: 100%;
  max-height: 85vh;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

:root {
  --modal-bg: rgba(255, 255, 255, 0.98);
  --modal-text: #2d3748;
  --modal-border: #e2e8f0;
  --modal-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  --modal-transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --accent-color: #9f7aea;
  --accent-hover: #8b5cf6;
  --text-muted: #64748b;
}

/* Dark mode modal styles */
.dark-mode {
  --modal-bg: rgba(26, 26, 46, 0.95);
  --modal-text: #ffffff;
  --modal-border: rgba(255, 255, 255, 0.1);
  --modal-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

/* Project Details Modal */
#projectDetailsModal {
  position: fixed;
  inset: 0; /* shorthand for top:0; right:0; bottom:0; left:0 */
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  z-index: 1000;
  display: inline-flex !important;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  padding: 0px;
  box-sizing: border-box;
  overflow: auto;
  margin: 0;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

#projectDetailsModal .modal-content {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #ffffff;
  border-radius: 16px;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow-y: auto;
  padding: 2rem;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  scrollbar-width: thin;
  scrollbar-color: var(--accent-color) transparent;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

#projectDetailsModal[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
}

#projectDetailsModal[aria-hidden="false"] .modal-content {
  opacity: 1;
  transform: translate(-50%, -50%);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--modal-border);
}

.modal-title {
  font-size: 1.8rem;
  color: var(--modal-text);
  margin: 0 0 0.5rem 0;
  line-height: 1.3;
}

.modal-body {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  margin: 0.5rem 0 1.5rem;
  padding: 0.5rem 0;
  flex: 1;
  min-height: 0;
  align-items: flex-start;
}

.modal-image-container {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 400px;
  position: sticky;
  top: 3rem;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  background: #f8fafc;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.modal-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 6px;
}

.project-details h3 {
  font-size: 1.5rem;
  margin: 0 0 1.25rem 0;
  color: var(--modal-text);
  font-weight: 600;
}

#modalAchievements {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
}

#modalAchievements li {
  margin-bottom: 0.75rem;
  padding-left: 1.5rem;
  position: relative;
  line-height: 1.6;
  color: var(--text-muted);
}

#modalAchievements li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--accent-color);
  font-weight: bold;
  font-size: 1.2em;
  line-height: 1;
}

.skills-section h4 {
  font-size: 1.1rem;
  margin: 0 0 0.75rem 0;
  color: var(--modal-text);
}

#modalSkills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

#modalSkills .tag {
  background: #f1f5f9;
  color: #334155;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 1.5rem;
  border-top: 1px solid var(--modal-border);
}

.btn-close {
  background: var(--accent-color);
  color: white;
  border: none;
  padding: 0.6rem 1.5rem;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--modal-transition);
}

.btn-close:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

/* View More Button */
.view-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--accent-color);
  border: 2px solid var(--accent-color);
  border-radius: 8px;
  padding: 0.5rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', sans-serif;
  cursor: pointer;
  margin: 1rem 0 0.5rem 0;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  letter-spacing: 0.3px;
  text-transform: none;
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.view-more-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: linear-gradient(135deg, var(--accent-color), #8b5cf6);
  transition: width 0.3s ease;
  z-index: -1;
}

.view-more-btn:hover {
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(159, 122, 234, 0.25);
}

.view-more-btn:hover::before {
  width: 100%;
}

.view-more-btn i {
  margin-left: 8px;
  font-size: 0.9em;
  transition: transform 0.3s ease;
}

.view-more-btn:hover i {
  transform: translateX(4px);
}

.view-more-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(159, 122, 234, 0.3);
}

.view-more-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(159, 122, 234, 0.3);
}

/* Show all achievements by default */
.achievements-list li {
  display: list-item;
}

/* Responsive styles */
@media (max-width: 992px) {
  .modal-body {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .modal-image-container {
    height: 300px;
    position: relative;
    top: 0;
  }
  
  .modal-details {
    padding: 0;
    margin: 0;
    max-height: none;
  }
  
  #projectDetailsModal .modal-content {
    padding: 2rem;
    width: 95%;
    margin: 1rem auto;
  }
  
  .modal-title {
    font-size: 1.8rem;
  }
  
  .project-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  
  .project-duration {
    width: 100%;
    justify-content: center;
  }
}

/* Animation for modal */
@keyframes modalFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

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


/* Section title */
.section-title {
  margin-top: 2rem;
  color: #2d3748;
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 2rem;
  font-weight: 700;
}

.projects-portfolio-title {
  margin-top: 2rem;
  color: #9f7aea; /* Magenta color to match the theme */
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 2rem;
}

/* Section subtitles */
.section-subtitle {
  font-size: 2.1rem; /* Increased by 40% from 1.5rem */
  color: #2d3748;
  margin: 4rem 0 1.5rem 0;
  padding-bottom: 0.8rem;
  border-bottom: 2px solid #9f7aea; /* Magenta underline */
  display: inline-block;
  font-weight: 600;
  width: 100%;
}

/* Project meta info (course, duration) */
.project-subtitle {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.5rem 0 1rem 0;
  width: 100%;
}

.project-course {
  font-weight: 600;
  color: #2d3748;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  position: relative;
  padding-bottom: 0.5rem;
  margin: 0.25rem 0 0.75rem 0;
  width: 100%;
  word-wrap: break-word;
  overflow-wrap: break-word;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  hyphens: auto;
  line-height: 1.4;
}

@media (min-width: 768px) {
  .project-course {
    font-size: 1rem;
  }
}

.project-course:after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, #9f7aea, transparent);
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0.5rem 0 1.5rem 0;
  font-size: 0.95rem;
  color: #4a5568;
  align-items: center;
  width: 100%;
  justify-content: flex-start;
  line-height: 1.5;
  font-weight: 400;
}

@media (min-width: 768px) {
  .project-meta {
    font-size: 0.95rem;
    gap: 1rem;
  }
}

.project-duration {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.6rem;
  white-space: nowrap;
  padding: 0.5rem 1rem;
  background: #f8f5ff;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  color: #6b46c1;
  font-weight: 500;
  margin: 0;
  width: auto;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

@media (min-width: 768px) {
  .project-duration {
    font-size: 0.9rem;
    padding: 0.4rem 1rem;
    min-width: 160px;
  }
}

.project-duration:before {
  content: '\f017';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  color: #9f7aea;
  font-size: 0.85em;
  flex-shrink: 0;
}

/* Ensure consistent card content alignment */
.project-content {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}

.project-details {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow: visible;
  min-height: 0;
  margin: 0;
  padding: 0.25rem 0;
  /* Ensure proper content flow */
  flex-shrink: 1;
  min-width: 0;
}

.achievements-list {
  padding-left: 1.2rem;
  margin: 0.25rem 0 0.75rem 0;
  width: 100%;
  overflow: visible;
  list-style-position: outside;
}

.achievements-list li {
  margin-bottom: 0.75rem;
  line-height: 1.6;
  word-wrap: break-word;
  overflow-wrap: break-word;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  hyphens: auto;
  text-align: left;
  width: 100%;
  position: relative;
  padding-right: 0.5rem;
  box-sizing: border-box;
  /* Ensure text doesn't get cut off */
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.skills-section {
  margin-top: auto;
  width: 100%;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
  width: 100%;
}

.tag {
  background: #f0f4f8;
  color: #4a5568;
  padding: 0.3rem 0.8rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  white-space: nowrap;
  display: inline-block;
  margin: 0.1rem;
}

.project-location:before {
  content: '\f3c5';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  margin-right: 6px;
  font-size: 0.9em;
  color: #9f7aea;
}

.project-duration:before {
  content: '\f017';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  margin-right: 6px;
  font-size: 0.9em;
  color: #9f7aea;
}

/* Modal styles */
.modal {
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 90%;
  height: 90%;
  background-color: rgba(0, 0, 0, 0.9);
  overflow-y: auto;
  text-align: center;
  box-shadow: 0 0 10 px rgba(0,0,0,0.30);
}


.modal-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 90%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 2px solid #fff;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.close-modal {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #fff;
  font-size: 35px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
  z-index: 1001;
}

.close-modal:hover,
.close-modal:focus {
  color: #bbb;
  text-decoration: none;
  cursor: pointer;
}

/* Loading animation */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 5px solid #f3f3f3;
  border-top: 5px solid #3498db;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
}
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 3.5rem 2.5rem;
  margin: 3rem auto;
  max-width: 1400px;
  padding: 0 3rem 3rem;
  position: relative;
  z-index: 1;
}

main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
  padding-top: 1rem;
}

/* Portfolio title styling */
.section-title {
  color: #BA68C8; /* Magenta color to match the theme */
  text-align: center;
  margin: 2rem 0;
  font-size: 2.5rem;
  font-weight: 700;
}

.project-card {
  background: white;
  border-radius: 10px;
  overflow: visible;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  position: relative;
  border: 1px solid #e2e8f0;
  word-wrap: break-word;
  overflow-wrap: break-word;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  hyphens: auto;
  z-index: 2;
  margin-bottom: 2rem;
  width: 100%;
  box-sizing: border-box;
  break-inside: avoid;
  page-break-inside: avoid;
  -webkit-column-break-inside: avoid;
  -moz-column-break-inside: avoid;
  align-self: flex-start;
  /* Ensure consistent height behavior */
  height: auto !important;
  max-height: none !important;
}

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

/* Project cover container for side-by-side images */
.project-cover-container {
  display: flex;
  width: 100%;
  height: 180px;
  overflow: hidden;
  border-bottom: 1px solid #f0f0f0;
}

.project-cover-container .project-cover {
  width: 50%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.project-cover-container .project-cover:hover {
  transform: scale(1.02);
  z-index: 1;
}

.project-cover {
  width: 100%;
  height: 200px;
  object-fit: cover;
  object-position: center;
  border-bottom: 1px solid #e2e8f0;
  display: block;
}

.project-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  width: 100%;
  box-sizing: border-box;
  word-wrap: break-word;
  overflow-wrap: break-word;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  hyphens: auto;
  min-height: 0;
  overflow: visible;
  /* Ensure consistent spacing */
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .project-content {
    padding: 1.5rem;
  }
}

.project-title {
  font-size: 1.25rem;
  margin: 0 0 0.75rem 0;
  color: #2d3748;
  font-weight: 700;
  line-height: 1.3;
  word-wrap: break-word;
  overflow-wrap: break-word;
  width: 100%;
  padding: 0;
}

@media (min-width: 768px) {
  .project-title {
    font-size: 1.4rem;
  }
}

.project-subtitle {
  font-size: 0.9rem;
  color: #333; /* Darkened from #666 for better contrast */
  margin: 0 0 1rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.project-description {
  color: #4a5568;
  margin-bottom: 1rem;
  line-height: 1.6;
  font-size: 0.95rem;
  overflow-wrap: break-word;
  word-wrap: break-word;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  hyphens: auto;
}

.project-details {
  margin: 1rem 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #000000; /* Changed from #444 to black for better visibility */
  flex-grow: 1;
}

.achievements-list {
  margin: 0 0 1.5rem 0;
  padding-left: 1.2rem;
}

.achievements-list li {
  margin-bottom: 0.7rem;
  position: relative;
  padding-left: 0.5rem;
  color: #000000; /* Ensures list item text is black */
}

.achievements-list li::before {
  content: '•';
  color: #9c27b0;
  font-weight: bold;
  display: inline-block;
  width: 1em;
  margin-left: -1em;
  position: absolute;
  left: 0;
}

.skills-section {
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid #f0f0f0;
}

.skills-section strong {
  display: block;
  margin-bottom: 0.5rem;
  color: #333;
  font-size: 0.95rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.tag {
  background: #f0e6f6;
  color: #7b1fa2;
  padding: 0.3rem 0.8rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid #e1bee7;
  transition: all 0.2s ease;
}

.tag:hover {
  background: #e1bee7;
  transform: translateY(-1px);
}

.project-links {
  display: flex;
  gap: 0.8rem;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid #f0f0f0;
}

.project-link-btn {
  background: #f5f5f5;
  color: #333;
  border: none;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.project-link-btn:hover {
  background: #e0e0e0;
  color: #000;
}

.project-link-btn.primary {
  background: #ba68c8;
  color: white;
}

.project-link-btn.primary:hover {
  background: #9c27b0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .projects-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    padding: 0 1.5rem;
  }
}

@media (max-width: 480px) {
  .projects-grid {
    grid-template-columns: 1fr;
    padding: 0 1rem;
  }
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  overflow-y: auto;
  padding: 2rem 1rem;
  box-sizing: border-box;
}

.modal-content {
  position: relative;
  background-color: #fff;
  margin: 0 auto;
  max-width: 900px;
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  animation: modalFadeIn 0.3s ease-out;
}

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

.close-modal {
  color: var(--text-muted);
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  z-index: 10;
  background: rgba(0, 0, 0, 0.05);
  border: none;
  border-radius: 50%;
  padding: 0;
  transition: all 0.2s ease;
  opacity: 0.7;
}

.close-modal:hover,
.close-modal:focus {
  color: var(--accent-color);
  background: rgba(0, 0, 0, 0.1);
  transform: rotate(90deg);
  opacity: 1;
  outline: none;
}

.modal-body {
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-image-container {
  position: relative;
  width: 100%;
  height: 400px;
  overflow: hidden;
  background-color: #f8f9fa;
}

.modal-project-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.modal-project-thumbnails {
  display: flex;
  padding: 0.5rem;
  gap: 0.5rem;
  overflow-x: auto;
  background-color: #f5f5f5;
  border-top: 1px solid #eee;
}

.modal-thumbnail {
  width: 60px;
  height: 60px;
  border-radius: 4px;
  object-fit: cover;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
}

.modal-thumbnail:hover,
.modal-thumbnail.active {
  border-color: #4a6cf7;
  transform: translateY(-2px);
}

.modal-details {
  padding: 2rem;
}

.modal h2 {
  margin: 0 0 1rem 0;
  color: #2d3748;
  font-size: 1.8rem;
  line-height: 1.3;
}

.project-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  color: #6b7280;
  font-size: 0.95rem;
}

.project-type {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.project-type i {
  color: #4a6cf7;
}

.project-section {
  margin-bottom: 1.8rem;
}

.project-section h3 {
  color: #374151;
  font-size: 1.2rem;
  margin: 0 0 0.8rem 0;
  position: relative;
  padding-bottom: 0.5rem;
}

.project-section h3::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 50px;
  height: 3px;
  background-color: #4a6cf7;
  border-radius: 3px;
}

.project-section p,
.project-section ul {
  color: #4b5563;
  line-height: 1.7;
  margin: 0 0 0.5rem 0;
}

.project-section ul {
  padding-left: 1.5rem;
  margin: 0;
}

.project-section li {
  margin-bottom: 0.5rem;
  position: relative;
  padding-left: 1.2rem;
}

.project-section li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: #4a6cf7;
  font-weight: bold;
}

.project-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.tag {
  display: inline-block;
  background-color: #eef2ff;
  color: #4a6cf7;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* Responsive adjustments for modal */
@media (min-width: 768px) {
  .modal-body {
    flex-direction: row;
    max-height: 100%;
  }
  
  .modal-image-container {
    width: 45%;
    height: 100%;
    max-height: 100%;
    border-right: 1px solid #eee;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .modal-details {
    width: 100%;
    padding: 0 0 0 1.5rem;
    overflow-y: auto;
    max-height: calc(90vh - 12rem);
    display: flex;
    flex-direction: column;
    gap: 2rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(159, 122, 234, 0.3) transparent;
    padding-right: 0.5rem;
    margin-right: -0.5rem;
    scrollbar-width: 6px;
    padding-bottom: 1rem;
  }
  
  .modal-project-image {
    max-height: 100%;
    width: auto;
    max-width: 100%;
    object-fit: contain;
  }
}

@media (max-width: 767px) {
  .modal-content {
    margin: 1rem auto;
    max-height: 90vh;
  }
  
  .modal-image-container {
    height: 250px;
  }
  
  .modal-details {
    max-height: calc(90vh - 250px);
    overflow-y: auto;
  }
}

/* Animation for modal content */
@keyframes slideIn {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-content {
  animation: slideIn 0.3s ease-out forwards;
}


