<div class="grid">
  <div class="grid__item">
    <h3 class="title">Lighting</h3>
  </div>
  <div class="grid__item">
    <h3 class="title">Art & Decor</h3>
  </div>
  <div class="grid__item">
    <h3 class="title">Storage</h3>
  </div>
  <div class="grid__item">
    <h3 class="title">Flooring</h3>
  </div>
  <div class="grid__item">
    <h3 class="title">CSS Grid Tricks</h3>
  </div>
  <div class="grid__item">
    <h3 class="title">Furniture</h3>
  </div>
  <div class="grid__item">
    <h3 class="title">Entertainment</h3>
  </div>
  <div class="grid__item">
    <h3 class="title">Accessories</h3>
  </div>
  <div class="grid__item">
    <h3 class="title">Tables</h3>
  </div>
  <div class="grid__item">
    <h3 class="title">Rugs</h3>
  </div>
</div>
@import url("https://fonts.googleapis.com/css2?family=Exo:wght@600&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  width: 100vw;
  min-height: 100vh;
  font-family: "Exo", Arial, sans-serif;
  background-color: #557;
  color: #fff;
}

.grid {
  --gap: 10px;
  --bg-color: teal;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap);
  padding: var(--gap);
  min-height: 100vh;
  position: relative;
  background: #080b11;
}

.grid__item {
  background-color: var(--bg-color);
  background-image: url("https://picsum.photos/2016/1642?image=10");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  min-height: 160px;

  display: flex;
  align-items: flex-end;
  padding: calc(var(--gap) * 1.5);
  position: relative;
  cursor: pointer;
  overflow: hidden;
  font-size: 1.1rem;
  font-weight: 600;
  text-shadow: 1px 1px 1px rgb(0 0 0 / 0.5);
  transition: filter 0.3s ease-out;
  z-index: 1;
}

.grid__item::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  background: linear-gradient(180deg, rgb(0 0 0 / 0) 5%, rgba(0 0 0 / 0.8));
  backdrop-filter: blur(6px);
  transition: all 0.4s ease-out;
  z-index: -1;
  backdrop-filter: blur(6px);
  transform-origin: center;
}

.grid__item:hover {
  filter: brightness(1.2);
}

.grid__item:hover::after {
  opacity: 1;
  transform: scale(1.1);
}

.grid__item:nth-of-type(1) {
  grid-column: 1/3;
}

.grid__item:nth-of-type(2) {
  grid-column: 3/5;
  grid-row: 1/3;
}

.grid__item:nth-of-type(4) {
  grid-column: 2/3;
  grid-row: 2/5;
}

@media screen and (max-width: 840px) {
  .grid {
    height: auto;
    grid-template-columns: repeat(2, 1fr);
  }
  .grid__item {
    min-height: auto;
    aspect-ratio: 1 / 1;
    width: 100%;
  }

  .grid__item:nth-of-type(1) {
    grid-column: auto;
  }

  .grid__item:nth-of-type(2) {
    grid-column: auto;
    grid-row: auto;
  }

  .grid__item:nth-of-type(4) {
    grid-column: auto;
    grid-row: auto;
  }
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.