/* Import Merriweather font */
@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@300;400;700&display=swap');

/* Global font - more specific selectors */
body,
.project-card,
.card-content,
.portfolio-title,
.portfolio-subtitle,
.filter-btn,
h1, h2, h3, h4, h5, h6 {
  font-family: 'Merriweather', serif !important;
}

h1 {
  text-align: center;
  font-size: 3.5rem;   /* adjust size as you like */
  margin-top: 2rem;
  margin-bottom: 2rem;
  font-family: 'Merriweather', serif !important;
}


/* Portfolio Header */
#portfolio-header {
  text-align: center;
  margin: 3rem 0 2rem 0;
}

#portfolio-header h1,
h1.title,
.portfolio-title {
  font-family: 'Merriweather', serif !important;
}


.portfolio-title {
  font-size: 3rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
  color: #2c3e50;
  font-family: 'Merriweather', serif !important;
}

.portfolio-subtitle {
  font-size: 1.2rem;
  color: #7f8c8d;
  font-style: italic;
}

/* Filter Buttons */
#filter-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin: 2rem 0 3rem 0;
}

.filter-btn {
  padding: 0.6rem 1.5rem;
  border: 2px solid #95a5a6;
  border-radius: 25px;
  background: white;
  color: #7f8c8d;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.95rem;
  font-weight: 500;
}

.filter-btn:hover {
  border-color: #5dade2;
  color: #5dade2;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(147, 25, 159, 0.15) !important;
}

.filter-btn.active {
  background: #5dade2;
  border-color: #5dade2;
  color: white;
}

/* Projects Grid */
#projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 0 auto;
  max-width: 1400px;
  padding: 0 1rem;
}

/* Project Cards */
.project-card {
  position: relative;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(147, 25, 159, 0.3) !important;
  cursor: pointer;
  transition: all 0.3s ease;
  animation: fadeIn 0.5s ease-in;
  aspect-ratio: 1 / 1; /* Makes it square */
  width: 100%;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(95, 25, 101, 0.45) !important;
}

.card-image {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.project-card:hover .card-image img {
  transform: scale(1.05);
}

/* Card Content - Overlay */
.card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.7) 70%, transparent 100%);
  transition: all 0.3s ease;
  z-index: 2;
}

.card-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  color: white;
  line-height: 1.3;
}

.card-content strong {
  display: block;
  color: #5dade2;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.card-content p {
  font-size: 0.85rem;
  line-height: 1.5;
  color: white;
  margin: 0;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
}

/* Hover Effect - Show Full Description */
.card-content {
  background: linear-gradient(
    to top,
    rgba(95, 25, 101, 0.45) 0%,
    rgba(95, 25, 101, 0.25)70%,
    transparent 100%
  );
}


.project-card:hover .card-content p {
  opacity: 1;
  max-height: 200px;
  margin-top: 0.75rem;
}

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

.fade-in {
  animation: fadeIn 0.5s ease-in;
}

/* Responsive Design */
@media (max-width: 768px) {
  .portfolio-title {
    font-size: 2rem;
  }
  
  .portfolio-subtitle {
    font-size: 1rem;
  }
  
  #projects-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  #filter-buttons {
    gap: 0.5rem;
  }
  
  .filter-btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }
  
  /* Show description on mobile without hover */
  .card-content p {
    opacity: 1;
    max-height: 200px;
    margin-top: 0.75rem;
  }
  
.card-content {
  background: linear-gradient(
    to top,
    rgba(147, 25, 159, 0.9) 0%,
    rgba(147, 25, 159, 0.7) 70%,
    transparent 100%
  );
}
}

@media (min-width: 769px) and (max-width: 1024px) {
  #projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1025px) {
  #projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}


/* Optional: completely remove any inherited black shadows */
/* .project-card,
.project-card:hover {
  filter: none !important;
}

.project-card {
  box-shadow: 0 6px 15px rgba(147, 25, 159, 0.6), 
              0 0 25px rgba(147, 25, 159, 0.3) !important;
}

.project-card:hover {
  box-shadow: 0 10px 25px rgba(147, 25, 159, 0.7), 
              0 0 40px rgba(147, 25, 159, 0.4) !important;
}
 */
