.projects-overview {
  width: 100%;
  padding: clamp(24px, 4vw, 48px) 0;
}

.projects-overview__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 20px;
}

.project-card {
  display: block;
  text-decoration: none;
  color: inherit;
}

.project-card:focus-visible {
  outline: 3px solid #cdff4e;
  outline-offset: 4px;
}

.project-card__inner {
  position: relative;
  overflow: hidden;
  min-height: clamp(260px, 28vw, 380px);

  background: #f8fafc;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.project-card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  transition: transform 0.5s ease;
}

.project-card__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
      360deg,
    rgba(15, 23, 42, 0.15) 0%,
    rgba(15, 23, 42, 0.50) 50%,
    rgba(15, 23, 42, 0.90) 100%
  );
  transition: background 0.4s ease;
}

.project-card__content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
}

.project-card__title {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 2.2vw, 2.2rem);
  line-height: 1;
  letter-spacing: -0.05em;
  color: white;
  text-shadow: 0 2px 12px rgba(0,0,0,0.35);
}

.project-card__subtitle {
  margin: 0;
  max-width: 32ch;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.45;
  color: white;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.project-card:hover .project-card__inner {
  transform: translateY(-4px);
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.12);
  color: #3366FF;
}


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

.project-card:hover .project-card__overlay { 
  background: linear-gradient(
    180deg,
    rgba(205, 255, 78, 0.99) 0%,
    rgba(205, 255, 78, 0.85) 40%,
    rgba(255, 255, 255, 0.5) 100%
  );
}

.project-card:hover .project-card__title,
.project-card:hover .project-card__subtitle {
  color: #3366FF;
}

@media (min-width: 1025px) {
  .project-card__subtitle {
    max-width: 44ch;
    line-height: 1.55;
  }
}

@media (max-width: 767px) {
  .projects-overview__grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .project-card__inner {
    min-height: 240px;
  }

  .project-card__content {
    padding: 18px;
  }

  .project-card__title {
    font-size: clamp(1.35rem, 7vw, 2rem);
  }

  .project-card__subtitle {
    font-size: 0.95rem;
    max-width: 28ch;
  }
}

@media (hover: none) {
  .project-card:hover .project-card__inner,
  .project-card:hover .project-card__img {
    transform: none;
  }
}
