/* Related Projects */
.related-projects {
  padding: var(--spacing-5xl) 0;
  background-color: var(--color-background-alt);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: var(--spacing-2xl);
  margin-top: var(--spacing-2xl);
}

.project-card {
  background-color: var(--color-white);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
  transition: all var(--transition-fast);
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.project-card .project-image {
  position: relative;
  overflow: hidden;
}

.project-card .project-image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

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

.project-info {
  padding: var(--spacing-xs);
}

.project-name {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  margin-bottom: var(--spacing-sm);
}

.project-summary {
  color: var(--color-text-light);
  margin-bottom: var(--spacing-lg);
  line-height: var(--line-height-relaxed);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-xs);
}

.tag {
  padding: var(--spacing-xs) var(--spacing-sm);
  background-color: var(--color-background-alt);
  color: var(--color-text-light);
  border-radius: var(--radius-md);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
}


/* Related Projects */
.related-projects-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(450px, 1fr)); gap: var(--spacing-lg); }

/* Image-only card variant */
.project-card { border:1px solid var(--color-border); border-radius: var(--radius-xl); overflow:hidden; background: var(--color-white); }
.project-card--image-only { border: 0 !important; background: transparent !important; box-shadow: none !important; border-radius: var(--radius-xl); }

.project-card--image-only .project-image { position: relative !important; display:block; padding: 0 !important; margin: 0 !important; border-radius: var(--radius-xl); overflow: hidden; background: transparent !important; }
.project-card--image-only .project-image::before,
.project-card--image-only .project-image::after { content: none !important; }
.project-card--image-only .project-image img { display:block; width:100%; height: auto !important; object-fit: contain !important; background: transparent !important; transform: none !important; }

/* Cancel theme hover zoom for image-only variant */
.project-card--image-only:hover,
.project-card--image-only:focus-within { background: transparent !important; box-shadow: none !important; transform: none !important; }
.project-card--image-only:hover .project-image img,
.project-card--image-only:focus-within .project-image img { transform: none !important; }

/* Title chip overlay */
.project-card--image-only .project-chip {
  position: absolute;
  bottom: 50%;
  right: auto;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-text);
  color: var(--color-white);
  border: 2px solid var(--color-white);
  border-radius: var(--radius-full);
  padding: var(--spacing-sm) var(--spacing-md);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-semibold);
  box-shadow: var(--shadow-sm);
  max-width: calc(100% - 2 * var(--spacing-md));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  z-index: 2;
}


/* Very narrow phones: single column */
@media (max-width: 480px) {
  .related-projects-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--spacing-lg); }
}


