/* Hero Section */
.hero-section {
  padding: 8rem 0 4rem;
  background: linear-gradient(135deg, var(--dark-color) 0%, #2d2d5f 100%);
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="%23ffffff" opacity="0.05"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(45deg, white, var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.stats-container {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 3rem;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent-color);
  display: block;
}

.stat-label {
  font-size: 0.9rem;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Filter Section */
.filter-section {
  padding: 2rem 0;
  background-color: white;
  border-bottom: 1px solid #eee;
}

.filter-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.75rem 1.5rem;
  border: 2px solid var(--accent-color);
  background: transparent;
  color: var(--accent-color);
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-speed) ease;
  text-decoration: none;
}

.filter-btn:hover,
.filter-btn.active {
  background-color: var(--accent-color);
  color: white;
  transform: translateY(-2px);
}

/* Projects Section */
.projects-section {
  padding: 4rem 0 6rem;
  background-color: #f9f9f9;
}

.projects-header {
  text-align: center;
  margin-bottom: 3rem;
}

.projects-count {
  color: #666;
  font-size: 1.1rem;
  margin-top: 1rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 3rem;
  position: relative;
  display: inline-block;
  color: var(--dark-color);
}

.section-title:after {
  content: '';
  position: absolute;
  width: 50%;
  height: 4px;
  bottom: -10px;
  left: 0;
  background-color: var(--accent-color);
  border-radius: 2px;
}

.projects-grid {
  display: grid;
  /* Card width increased from minmax(280px, 1fr) to minmax(min(100%, 360px), 1fr) */
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.project-card {
  background-color: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all var(--transition-speed) ease;
  border: 1px solid rgba(255, 127, 17, 0.1);
  opacity: 1;
  transform: scale(1);
  display: flex;
  flex-direction: column;
}

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

.project-card.hidden {
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
  display: none !important; /* Fixed: completely hide filtered-out cards from rendering */
}

.project-status {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 5;
}

.status-completed {
  background-color: #28a745;
  color: white;
}

.status-in-progress {
  background-color: var(--accent-color);
  color: white;
}

.status-concept {
  background-color: #6c757d;
  color: white;
}

.project-image-container {
  position: relative;
  overflow: hidden;
}

.project-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: all var(--transition-speed) ease;
  aspect-ratio: 16/10;
}

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

.project-content {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--dark-color);
}

.project-description {
  color: #666;
  margin-bottom: 1rem;
  line-height: 1.6;
  flex-grow: 1;
}

.project-bullets {
  padding-left: 1.2rem;
  margin-bottom: 1.5rem;
  color: #555;
  font-size: 0.9rem;
}

.project-bullets li {
  margin-bottom: 0.4rem;
  line-height: 1.4;
}

.view-more-container {
  margin-top: 4rem !important;
  padding: 2.5rem;
  background: rgba(26, 26, 46, 0.03);
  border-radius: 20px;
  border: 1px dashed rgba(255, 127, 17, 0.3);
  text-align: center;
}

.view-more-text {
  font-size: 1.1rem;
  color: #555;
  margin-bottom: 1.5rem;
}

.btn-github-custom {
  background-color: var(--dark-color);
  color: white;
  border: none;
  padding: 0.8rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-speed) ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 15px rgba(26, 26, 46, 0.2);
}

.btn-github-custom:hover {
  background-color: var(--accent-color);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(255, 127, 17, 0.3);
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tech-tag {
  background-color: rgba(255, 127, 17, 0.1);
  color: var(--accent-color);
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 500;
}

.project-links {
  display: flex;
  gap: 1rem;
  margin-top: auto;
}

/* Loading Animation */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3rem;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--accent-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Responsive */
@media (max-width: 992px) {
  .stats-container {
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .section-title {
    font-size: 2rem;
  }
  .hero-title {
    font-size: 2.5rem;
  }
  .stats-container {
    flex-direction: column;
    gap: 1.5rem;
  }
  .filter-buttons {
    gap: 0.5rem;
  }
  .filter-btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 576px) {
  .projects-section {
    padding: 3rem 0;
  }
  .hero-section {
    padding: 6rem 0 3rem;
  }
  .project-links {
    flex-direction: column;
  }
}
