
/* Base Styles */
.projects-section {
  background: #0a0e1a;
  position: relative;
  min-height: 100vh;
}

/* Animated Mesh Background */
.projects-mesh-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 20% 30%, rgba(99, 102, 241, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(168, 85, 247, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.05) 0%, transparent 50%);
  pointer-events: none;
  opacity: 0.7;
}

.projects-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* Letter Spacing */
.ls-wide {
  letter-spacing: 0.12em;
}

/* Glass Badge */
.glass-badge {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  animation: float-badge 3s ease-in-out infinite;
}


@keyframes float-badge {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-5px);
  }
}

.status-dot {
  width: 8px;
  height: 8px;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  border-radius: 50%;
  animation: pulse-glow 2s ease-in-out infinite;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.6);
}

@keyframes pulse-glow {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.6);
  }

  50% {
    opacity: 0.7;
    transform: scale(1.3);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.9);
  }
}

/* Heading */
.projects-heading {
  color: #ffffff;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.text-gradient {
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #3b82f6 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 5s ease infinite;
}

@keyframes gradient-shift {

  0%,
  100% {
    background-position: 0% center;
  }

  50% {
    background-position: 100% center;
  }
}

/* Filter Tabs */
.projects-filter {
  display: flex;
  justify-content: center;
}

.filter-wrapper {
  display: inline-flex;
  gap: 0.75rem;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  backdrop-filter: blur(10px);
}

.filter-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: transparent;
  border: none;
  border-radius: 100px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.filter-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(168, 85, 247, 0.2));
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.filter-btn:hover {
  color: rgba(255, 255, 255, 0.9);
  transform: translateY(-2px);
}

.filter-btn:hover::before {
  opacity: 1;
}

.filter-btn.active {
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
}

.filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 0.5rem;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
}

.filter-btn.active .filter-count {
  background: rgba(255, 255, 255, 0.25);
}

/* Masonry Grid */
.projects-masonry {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 1.75rem;
  max-width: 1400px;
  margin: 0 auto;
}

.project-item {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.project-item.hidden {
  display: none;
}

.project-item.project-featured {
  grid-column: span 2;
}

.project-item.project-wide {
  grid-column: span 2;
}

/* Project Card */
.project-card {
  position: relative;
  height: 100%;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(168, 85, 247, 0.1));
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 1;
  pointer-events: none;
}

.project-card:hover {
  transform: translateY(-8px);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 24px 60px rgba(99, 102, 241, 0.2);
}

.project-card:hover::before {
  opacity: 1;
}

/* Image Wrapper */
.project-image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 25 / 13;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.3);
}

.project-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.project-hover-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom,
      transparent 0%,
      rgba(10, 14, 26, 0.5) 100%);
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 1;
}

.project-card:hover .project-hover-layer {
  opacity: 1;
}

/* Featured Badge */
.featured-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  border-radius: 50px;
  color: #0a0e1a;
  font-size: 0.8rem;
  font-weight: 700;
  z-index: 2;
  animation: featured-pulse 2s ease-in-out infinite;
}

@keyframes featured-pulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.7);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(251, 191, 36, 0);
  }
}

/* Project Info */
.project-info {
  padding: 1.75rem;
}

.project-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.project-category {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 50px;
  color: #a5b4fc;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.project-year {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.85rem;
  font-weight: 500;
}

.project-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.75rem;
  line-height: 1.3;
  transition: color 0.3s ease;
}

.project-card:hover .project-name {
  color: #a5b4fc;
}

.project-excerpt {
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 1.5rem;
}

/* Project Footer */
.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.stack-item {
  padding: 0.35rem 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.75rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.project-card:hover .stack-item {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.3);
  color: #a5b4fc;
}

.project-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: #ffffff;
  font-size: 1.25rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover .project-arrow {
  background: linear-gradient(135deg, #6366f1, #a855f7);
  border-color: transparent;
  transform: rotate(-45deg) scale(1.1);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

/* CTA Button */
.cta-btn-modern {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 2.5rem;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  border: none;
  border-radius: 50px;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 12px 40px rgba(99, 102, 241, 0.3);
}

.cta-btn-modern::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #a855f7, #6366f1);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.cta-btn-modern:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(99, 102, 241, 0.5);
  color: #ffffff;
}

.cta-btn-modern:hover::before {
  opacity: 1;
}

.cta-text,
.cta-icon {
  position: relative;
  z-index: 1;
}

.cta-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.4s ease;
}

.cta-btn-modern:hover .cta-icon {
  transform: translateX(4px);
}

.cta-shimmer {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.2),
      transparent);
  transition: left 0.6s ease;
}

.cta-btn-modern:hover .cta-shimmer {
  left: 100%;
}

/* Scroll Reveal Animation */
[data-scroll-reveal] {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-scroll-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 1200px) {
  .projects-masonry {
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  }

  .project-item.project-featured,
  .project-item.project-wide {
    grid-column: span 1;
  }
}

@media (max-width: 768px) {
  .projects-section {
    padding: 3rem 0;
  }

  .projects-masonry {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .filter-wrapper {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .filter-btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
  }

  .project-name {
    font-size: 1.25rem;
  }

  .project-info {
    padding: 1.25rem;
  }

  .project-stack {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .project-stack::-webkit-scrollbar {
    display: none;
  }

  .cta-btn-modern {
    padding: 1rem 2rem;
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .projects-heading {
    font-size: 2rem;
  }

  .project-image-wrapper {
    aspect-ratio: 4 / 3;
  }

  .filter-wrapper {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .filter-wrapper::-webkit-scrollbar {
    display: none;
  }
}