.projects__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 4rem;
  perspective: none;
}

.project-card {
  background: transparent;
  border-radius: 0;
  overflow: visible;
  border: none;
  transition: all 0.3s ease;
  position: relative;
  backdrop-filter: none;
  transform-style: flat;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: none;
  border-color: transparent;
}

.project-card::after {
  display: none;
}

.project-card__image {
  position: relative;
  aspect-ratio: 4/3; /* More editorial ratio */
  overflow: hidden;
  border-bottom: none;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
  background: var(--surface-hover);
}

.project-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
  filter: grayscale(100%); /* B&W by default */
}

.project-card:hover .project-card__image img {
  transform: scale(1.05);
  filter: grayscale(0%); /* Color on hover */
}

.project-card__overlay {
  display: none; /* Remove overlay for cleaner look */
}

.project-card__content {
  padding: 0;
  position: relative;
  z-index: 1;
}

.project-card__title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  background: none;
  -webkit-text-fill-color: initial;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.project-card__desc {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.6;
  max-width: 90%;
}

.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.project-card__tags span {
  font-size: 0.75rem;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.project-card__tags span::after {
  content: '/';
  margin-left: 0.5rem;
  color: var(--surface-hover);
}

.project-card__tags span:last-child::after {
  display: none;
}

/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.modal.active {
  display: flex;
}

.modal__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
}

.modal__content {
  position: relative;
  background: var(--surface-color);
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  z-index: 1001;
  animation: modalSlideUp 0.4s ease;
}

@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(50px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 2rem;
  color: var(--text-primary);
  z-index: 10;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.5);
  border-radius: 50%;
  transition: all 0.3s ease;
}

.modal__close:hover {
  background: var(--accent-primary);
  transform: rotate(90deg);
}

.modal__header {
  position: relative;
}

.modal__image {
  width: 100%;
  height: 300px;
  object-fit: cover;
}

.modal__header-info {
  padding: 2rem 2rem 0;
}

.modal__category {
  color: var(--accent-primary);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.modal__title {
  font-family: var(--font-display);
  font-size: 2rem;
  margin-top: 0.5rem;
}

.modal__body {
  padding: 2rem;
}

.modal__description,
.modal__details {
  margin-bottom: 2rem;
}

.modal__body h3 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.modal__body p {
  color: var(--text-secondary);
}

.modal__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.modal__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.modal__button--primary {
  background: var(--accent-primary);
  color: white;
}

.modal__button--primary:hover {
  background: var(--accent-secondary);
  transform: translateY(-2px);
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  .projects__grid {
    grid-template-columns: 1fr; /* Stack cards vertically */
    gap: 3rem;
  }

  .project-card {
    max-width: 100%;
  }

  .project-card__image {
    aspect-ratio: 16/9; /* Slightly wider on mobile for better view */
  }

  .project-card__title {
    font-size: 1.5rem;
  }

  .project-card__desc {
    font-size: 0.95rem;
    max-width: 100%;
  }
}
