/* .work-section {
  padding: 150px 40px;
  position: relative;
} */
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 100px;
}
.work-card {
  height: 500px;
  width: 100%;
  transition: transform 0.5s ease;
  cursor: pointer;
}
.work-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.project-label {
  font-size: 14px;
  font-weight: 600;
  color: white;
  padding: 8px 0;
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.work-section.blur .work-card:not(.hovered) {
  filter: blur(8px);
  transform: scale(0.97);
  opacity: 0.4;
}
.work-card.hovered {
  z-index: 3;
}
/* .project-title-fixed {
  position: fixed;
  top: 40px;
  left: 40px;
  font-size: 28px;
  font-weight: 600;
  opacity: 0;
  transform: scale(1);
  transform-origin: top left;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 1;
  pointer-events: none;
  color: white;
}
.project-title-fixed.show {
  opacity: 1;
  transform: scale(2.5);
} */


.project-title-fixed {
  position: fixed;
  top: 40px;
  left: 40px;
  font-size: 4.5rem;
  font-weight: 600;
  opacity: 0;
  transform: scale(1);
  transform-origin: left; /* Scale from the center to avoid layout shifts */
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 1;
  pointer-events: none;
  color: white;
  will-change: transform, opacity; /* Hint to browser for optimization */
}

.project-title-fixed.show {
  opacity: 1;
}

/* Adjusting layout for the section */
.work-section {
  padding: 150px 40px;
  position: relative;
  overflow: hidden; /* Prevents any layout overflow */
}

@media (max-width: 1200px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .grid {
    grid-template-columns: 1fr;
  }
  .project-title-fixed {
    top: 45px;
    left: 45px;
    font-size: 20px;
  }
}
