@media (min-width: 0rem) {
  #projects-404 {
    padding: clamp(3rem, 7vw, 6rem) 1.25rem;
    background-color: #F6F4EF;
  }

  body.dark-mode #projects-404 {
    background: #141414;
  }

  #projects-404 .cs-container {
    width: 100%;
    max-width: 80rem;
    margin: auto;
    display: flex;
    flex-direction: column;
    gap: clamp(2rem, 5vw, 3rem);
  }

  #projects-404 .cs-content {
    text-align: center;
  }

  #projects-404 .cs-title {
    font-family: "DM Serif Text", Georgia, serif;
    font-weight: 400;
    color: #2b3947;
  }

  body.dark-mode #projects-404 .cs-title {
    color: #fff;
  }

  .proj-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(2rem, 5vw, 3rem);
  }

  @media (min-width: 56rem) {
    .proj-grid {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }
  }

  .proj-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.25rem;
    /* border-radius: 0.75rem; */
    background: transparent;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
  }

  .proj-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  }

  .proj-media {
    aspect-ratio: 4 / 3;
    border-radius: 0.5rem;
    overflow: hidden;
  }

  .proj-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1);
    transition: transform 0.5s ease;
  }

  .proj-card:hover .proj-media img {
    transform: scale(1.05);
  }

  .proj-h3 {
    font-family: "DM Serif Text", Georgia, serif;
    font-weight: 400;
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    color: #2b3947;
    margin-top: 0.25rem;
  }

  .proj-text {
    color: #4a525a;
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1rem;
  }

  .proj-cta {
    background: none;
    border: none;
    color: #1f2d3a;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
  }

  .proj-cta::after {
    content: "→";
    font-size: 1rem;
    transition: transform 0.25s ease;
  }

  .proj-cta:hover {
    color: #8b5e34;
  }

  .proj-cta:hover::after {
    transform: translateX(4px);
  }
}

/* Modal Styling */
.proj-modal {
  border: none;
  padding: 0;
  width: min(62rem, 92vw);
  max-height: 90dvh;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.proj-modal::backdrop {
  background: rgba(0, 0, 0, 0.45);
}

.proj-modal-inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 0;
}

@media (max-width: 900px) {
  .proj-modal-inner {
    grid-template-columns: 1fr;
  }
}

.proj-modal-media {
  position: relative;
  background: #000;
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
}

.proj-modal-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.proj-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.25rem;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.proj-nav.prev {
  left: 0.75rem;
}

.proj-nav.next {
  right: 0.75rem;
}

.proj-modal-body {
  padding: 1.25rem 1.25rem 1.5rem;
  background: #fff;
}

.proj-modal-title {
  font-family: "DM Serif Text", Georgia, serif;
  font-weight: 400;
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  margin: 0 0 0.5rem;
}

.proj-modal-text {
  margin: 0;
  line-height: 1.7;
}

.proj-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 5;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: #fff;
  color: #111;
  font-size: 1.25rem;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}
