.projects img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
}

.projects h1 {
  text-transform: uppercase;
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 0.9;
  font-family: 'HelveticaNeueRoman';
}

.projects p {
  text-transform: uppercase;
  font-size: 1.5rem;
  font-weight: 700;
}

.projects section {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.intro,
.outro {
  display: flex;
  justify-content: center;
  align-items: center;
}

.projects {
  background: #121212;
  min-height: 80vh;
  height: max-content;
}

.projects p {
  color: #ffffff;
  padding: 5px 20px;
  font-family: 'HelveticaNeueRoman';
  font-size: 3rem;
  text-transform: uppercase;
  font-weight: 100;
}

.projects-list {
  border-top: 1px solid #ffffff;
}

.project {
  height: 80px;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
}

.project-wrapper {
  position: relative;
  height: 240px;
  will-change: transform;
  transform: translateY(-160px);
}

.project-name,
.project-project {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
  padding: 5px 15px;
  cursor: pointer;
  border-bottom: 1px solid #000;
}

.project-name {
  background-color: #121212;
  color: #ffffff;
}

.project-project {
  background-color: #ffffff;
  color: #000000;
}

.project-preview {
  position: fixed;
  bottom: 15px;
  right: 15px;
  width: 30%;
  height: 30%;
  z-index: 2;
}

/* === Responsive additions (no base changes) === */

/* <= 1200px */
@media (max-width: 1200px) {
  .projects h1 {
    font-size: 2.5rem;
  }

  .projects p {
    font-size: 2rem;
  }

  .project {
    height: 72px;
  }

  .project-name,
  .project-project {
    height: 72px;
  }

  .project-wrapper {
    height: 216px;
    transform: translateY(-144px);
    /* keeps ratio with .project height */
  }

  .project-preview {
    width: 28%;
    height: 28%;
  }
}

/* <= 992px (tablets) */
@media (max-width: 992px) {
  .projects h1 {
    font-size: 2rem;
  }

  .projects p {
    font-size: 1.5rem;
  }

  .project {
    height: 64px;
  }

  .project-name,
  .project-project {
    height: 64px;
  }

  .project-wrapper {
    height: 192px;
    transform: translateY(-128px);
  }

  .project-preview {
    width: 40%;
    height: 30%;
  }
}

/* <= 768px (large phones / small tablets) */
@media (max-width: 768px) {
  .projects h1 {
    font-size: 1.75rem;
  }

  .projects p {
    font-size: 1.2rem;
  }

  /* Allow sections to flow vertically on small screens */
  .projects section {
    height: auto;
  }

  .project {
    height: 60px;
  }

  .project-name,
  .project-project {
    height: 60px;
  }

  .project-wrapper {
    height: 180px;
    transform: translateY(-120px);
  }

  /* Keep preview visible but not intrusive */
  .project-preview {
    width: 70vw;
    height: 35vh;
    bottom: 10px;
    right: auto;
    left: 50%;
    transform: translateX(-50%);
  }
}

/* <= 480px (phones) */
@media (max-width: 480px) {
  .projects h1 {
    font-size: 1.5rem;
  }

  .projects p {
    font-size: 1rem;
  }

  .project {
    height: 56px;
  }

  .project-name,
  .project-project {
    height: 56px;
  }

  .project-wrapper {
    height: 168px;
    transform: translateY(-112px);
  }

  .project-preview {
    width: 92vw;
    height: 36vh;
    bottom: 8px;
  }
}