/* ============================================
   PROJECTS PAGE STYLES
   ============================================ */

/* ---- Filter Bar ---- */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}
.filter-btn {
  padding: 0.45rem 1.1rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}
.filter-btn:hover {
  border-color: var(--accent-purple);
  color: var(--text-primary);
}
.filter-btn.active {
  background: var(--accent-gradient);
  border-color: transparent;
  color: white;
}

/* ---- Projects Grid ---- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.proj-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.proj-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-accent);
  box-shadow: var(--shadow-accent);
}

.proj-thumb {
  height: 190px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.proj-thumb img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s ease;
  z-index: 1;
}
/* Gradient overlay: keeps placeholder number/text readable over real images */
.proj-thumb::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.08) 55%, transparent 100%);
  z-index: 2;
  pointer-events: none;
}
.proj-card:hover .proj-thumb img { transform: scale(1.05); }

.proj-thumb-placeholder {
  position: absolute; inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  font-weight: 800;
  color: rgba(255,255,255,0.18);
  z-index: 0; /* sits behind real image */
}

.proj-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.proj-body h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  line-height: 1.3;
}
.proj-body p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.65;
  flex: 1;
  margin-bottom: 1rem;
}
.proj-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1.25rem;
}
.proj-links {
  display: flex;
  gap: 0.65rem;
  margin-top: auto;
}
.proj-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all var(--transition);
  flex: 1;
  justify-content: center;
}
.proj-link.code {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}
.proj-link.code:hover {
  background: rgba(255,255,255,0.1);
  color: var(--text-primary);
}
.proj-link.demo {
  background: var(--accent-gradient);
  color: white;
}
.proj-link.demo:hover { opacity: 0.85; }

/* ---- Open Source ---- */
.oss-section {
  margin-top: 5rem;
  padding-top: 4rem;
  border-top: 1px solid var(--border);
}
.oss-section h2 { margin-bottom: 0.75rem; }
.oss-section > p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
}
.oss-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}
.oss-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: all var(--transition);
}
.oss-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-3px);
}
.oss-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--accent-gradient-subtle);
  border: 1px solid var(--border-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}
.oss-icon i {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.oss-card h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.5rem; }
.oss-card p { color: var(--text-secondary); font-size: 0.88rem; line-height: 1.65; }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .projects-grid { grid-template-columns: 1fr; }
}
