.section-projects {
  padding: 4rem 0;
}

.projects-title {
  background: linear-gradient(90deg, #d946ef 0%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  padding: 0 2rem;
}

.project-card {
  position: relative;
  background-color: #1e1e1e;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: background-color 0.3s ease, box-shadow 0.3s ease,
    border-color 0.3s ease;
  border: 2px solid rgba(217, 70, 239, 0.3);
  background-clip: padding-box;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.project-card::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 12px;
  padding: 2px;
  background: linear-gradient(90deg, #d946ef 0%, #a855f7 100%);
  z-index: -1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.project-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: radial-gradient(
    circle at var(--mouse-x, 0%) var(--mouse-y, 0%),
    rgba(217, 70, 239, 0.25) 0%,
    rgba(168, 85, 247, 0.1) 40%,
    transparent 70%
  );
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.project-card:hover {
  background-color: #16161e;
  box-shadow: 0 8px 24px rgba(217, 70, 239, 0.2);
  border-color: rgba(217, 70, 239, 0.8);
}

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

.project-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  position: relative;
  background: linear-gradient(135deg, #0f0f1e 0%, #1a0a2e 50%, #16213e 100%);
  border: none;
}

.project-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
      0deg,
      transparent 24%,
      rgba(100, 150, 255, 0.05) 25%,
      rgba(100, 150, 255, 0.05) 26%,
      transparent 27%,
      transparent 74%,
      rgba(100, 150, 255, 0.05) 75%,
      rgba(100, 150, 255, 0.05) 76%,
      transparent 77%,
      transparent
    ),
    linear-gradient(
      90deg,
      transparent 24%,
      rgba(100, 150, 255, 0.05) 25%,
      rgba(100, 150, 255, 0.05) 26%,
      transparent 27%,
      transparent 74%,
      rgba(100, 150, 255, 0.05) 75%,
      rgba(100, 150, 255, 0.05) 76%,
      transparent 77%,
      transparent
    );
  background-size: 50px 50px;
  pointer-events: none;
  z-index: 1;
}

.project-image::after {
  content: '';
  position: absolute;
  inset: 0;
  animation: gridFloat 6s ease-in-out infinite;
  pointer-events: none;
  z-index: 2;
}

.project-title {
  font-size: 1.5rem;
  margin: 1.5rem 1rem 1rem 1rem;
  color: #ffffff;
  transition: color 0.3s ease;
}

.project-description {
  font-size: 1rem;
  margin: 0 1rem 2rem 1rem;
  color: #c5c6c7;
  line-height: 1.5;
}

.buttons-projects {
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding: 0 1rem 1rem 1rem;
}

.btn-project {
  background-color: #6b21a8;
  color: #ffffff;
  padding: 1rem 1rem;
  border-radius: 12px;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.btn-project:hover {
  background-color: #9d4edd;
}

.project-link {
  background-color: #6b21a8;
  color: #ffffff;
  padding: 1rem 1rem;
  border-radius: 12px;
  text-decoration: none;
  transition: background-color 0.3s ease;
}
.project-link:hover {
  background-color: #9d4edd;
}

.github-link {
  background-color: #333333;
  color: #ffffff;
  padding: 1rem 1rem;
  border-radius: 12px;
  text-decoration: none;
  transition: background-color 0.3s ease;
}
.github-link:hover {
  background-color: #555555;
}

.--disabled {
  pointer-events: none;
  opacity: 0.6;
}

.techstack-project {
  margin-top: auto;
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding: 1rem;
  flex-wrap: wrap;
}

.techstack-item {
  background-color: #111;
  color: #ffffff;
  padding: 0.5rem 1rem;
  border-radius: 12px;
}

.techstack-text {
  font-weight: 600;
  font-size: 0.9rem;
  background: linear-gradient(90deg, #d946ef 0%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
  margin: 0;
}
