.work-section {
  display: grid;
  grid-template-columns: 23% 70%;
  justify-content: space-between;
  align-items: start;
  padding: 75px 25px;
  background: #fdfdfd;
  color: #1a1a1a;
  color-scheme: light;
  font-size: 14px;
  line-height: 1.4;
}

.work-section :focus-visible {
  outline-color: #5556ad;
}

.work-sidebar {
  align-self: stretch;
  min-width: 0;
  scroll-margin-top: 75px;
}

.work-sidebar-content {
  position: sticky;
  top: 75px;
  padding: 0 15px;
}

.work-count {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0 0 15px;
  padding: 7px 10px;
  border-radius: 100px;
  background: #f2f2f2;
  font-size: 13px;
  font-weight: 500;
}

.work-count::before {
  content: "";
  inline-size: 9px;
  block-size: 9px;
  border-radius: 50%;
  background: #68d651;
}

.work-sidebar h1 {
  margin: 0;
  font-size: clamp(24px, 2.5vw, 42px);
  line-height: 1.08;
  letter-spacing: -.045em;
}

.work-intro {
  margin: 10px 0 20px;
  font-family: "Inter Display", sans-serif;
}

.work-index {
  display: grid;
  margin: 0 0 20px;
  padding: 0;
  border-top: 1px solid #eaeaea;
  list-style: none;
}

.work-index a {
  display: block;
  padding: 9px 0;
  border-bottom: 1px solid #eaeaea;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.work-index a:hover, .work-profile-link:hover {
  text-decoration: underline;
}

.work-profile-link {
  display: inline-block;
  font-weight: 600;
}

.work-projects {
  display: grid;
  gap: 50px;
  min-width: 0;
}

.work-project {
  position: relative;
  min-width: 0;
  scroll-margin-top: 75px;
}

.work-project-art {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1440 / 768;
  border-radius: 10px;
  background: #f0f0f0;
  object-fit: cover;
}

.work-project-meta {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  margin-top: 16px;
}

.work-project-text {
  display: grid;
  gap: 8px;
  max-width: 58ch;
}

.work-project-text h2, .work-project-text p {
  margin: 0;
}

.work-project-text h2 {
  font-size: 19px;
  line-height: 1.2;
  font-weight: 650;
  letter-spacing: -.015em;
}

.work-project-credits, .work-project-category {
  width: fit-content;
  margin: 0;
  padding: 5px 10px;
  border-radius: 100px;
  background: #eee;
  font-size: 12px;
  line-height: 16px;
}

.work-project-category {
  flex-shrink: 0;
  background: #191919;
  color: #fff;
}

.work-project-link {
  position: absolute;
  inset: 0 0 auto;
  display: block;
  aspect-ratio: 1440 / 768;
  border-radius: 10px;
}

.work-project-link span {
  display: block;
  width: max-content;
  margin: 10px;
  padding: 7px 10px;
  border-radius: 5px;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 15px;
}

.work-project-link:hover span {
  background: #f0f0f0;
}

.work-project-link:active span {
  background: #191919;
  color: white;
}

.work-project-text h2 a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 809px) {
  .work-section {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
    padding: 75px 20px 45px;
  }

  .work-sidebar-content {
    position: static;
    padding-inline: 5px;
  }

  .work-index {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 14px;
  }

  .work-index a {
    height: 100%;
  }

  .work-project-art, .work-project-link {
    border-radius: 5px;
  }

  .work-project-meta {
    flex-direction: column-reverse;
    gap: 10px;
  }
}

@media (max-height: 660px) {
  .work-sidebar-content {
    position: static;
  }
}
