/* ==========================================================================
   PROJECTS PAGE STYLING
   ========================================================================== */
.projects-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px 20px;
  color: #ffffff;
  font-family: 'Space Grotesk', sans-serif;
}

.gradient-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
}

.projects-subtitle {
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  margin-top: -30px;
  margin-bottom: 40px;
  font-size: 1rem;
  font-family: 'Space Grotesk', sans-serif;
}

/* Category Filters */
.project-filters {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: 'Space Grotesk', sans-serif;
  cursor: pointer;
  transition: all 0.25s ease;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--accent-color, #4fffd2);
  color: #0d0d0d;
  border-color: var(--accent-color, #4fffd2);
  box-shadow: 0 0 15px rgba(79, 255, 210, 0.3);
}

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
}

/* Card Container */
.project-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  overflow: hidden;
  backdrop-filter: blur(10px);
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(79, 255, 210, 0.4);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(79, 255, 210, 0.15);
}

/* Thumbnail & Hover Overlay */
.project-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.project-card:hover .project-thumb img {
  transform: scale(1.08);
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.overlay-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}

.overlay-btn:hover {
  background: var(--accent-color, #4fffd2);
  color: #0d0d0d;
  transform: scale(1.1);
}

.overlay-btn--muted {
  position: relative;
  color: rgba(255, 255, 255, 0.35);
  cursor: help;
}

.overlay-btn--muted:hover,
.overlay-btn--muted:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.35);
  transform: none;
}

.overlay-btn--muted::after {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  width: max-content;
  max-width: 240px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  background: #171717;
  color: #ffffff;
  content: attr(data-tooltip);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  line-height: 1.3;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.overlay-btn--muted:hover::after,
.overlay-btn--muted:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Card Details */
.project-details {
  padding: 20px;
}

.project-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--accent-color, #4fffd2);
  background: rgba(79, 255, 210, 0.08);
  border: 1px solid rgba(79, 255, 210, 0.2);
  padding: 2px 8px;
  border-radius: 6px;
}

/* Project Type Metadata */
.project-type {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 6px;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

.project-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: #ffffff;
}

.project-desc {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.75);
  margin: 0;
}

/* Empty State Styling */
.no-projects {
  text-align: center;
  padding: 60px 20px;
  grid-column: 1 / -1;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  margin-top: 20px;
}

.no-projects i {
  font-size: 2.5rem;
  color: var(--accent-color, #4fffd2);
  margin-bottom: 16px;
  opacity: 0.8;
}

.no-projects h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 8px 0;
}

.no-projects p {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
}

/* Card Animation State */
.project-card {
  /* Ensure smooth transition for base properties */
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease, opacity 0.3s ease;
}

/* Hidden class for JS filtering */
.project-card.is-hidden {
  display: none !important;
}

/* Fade-in Animation Class */
.project-card.animate-fade {
  animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ==========================================================================
   PROJECT CARD FILTER ANIMATION
   ========================================================================== */

/* Base style setup */
.project-card {
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease, opacity 0.3s ease;
  will-change: transform, opacity;
}

/* Hidden class applied by JS when filtered out */
.project-card.is-hidden {
  display: none !important;
}

/* Animation trigger class applied when filtered in */
.project-card.animate-fade {
  animation: filterFadeIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Empty state message animation */
.no-projects.animate-fade {
  animation: filterFadeIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Keyframe definition for smooth scale + slide upward reveal */
@keyframes filterFadeIn {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Initial hidden state before page load animation starts */
.project-card {
  opacity: 0;
  will-change: transform, opacity;
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

/* Page Reload Entrance Animation */
.project-card.animate-onload {
  animation: pageLoadFadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Filter Switching Animation */
.project-card.animate-fade,
.no-projects.animate-fade {
  animation: filterFadeIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.project-card.is-hidden {
  display: none !important;
}

/* Keyframes */
@keyframes pageLoadFadeIn {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes filterFadeIn {
  0% {
    opacity: 0;
    transform: translateY(15px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}