body {
  background-color: var(--cream);
}

.sidebar {
  padding-top: clamp(8rem, 158px, 158px);
  margin-bottom: 1rem;
}

.sidebar .heading-3 {
  margin-top: 0;
}

main.category-page {
  padding-top: clamp(8rem, 158px, 158px);
  padding-bottom: 4rem;
  margin-bottom: 1rem;
  align-content: start;
}

main.category-page h1 {
  color: var(--green);
  margin-bottom: 0;
}

main.category-page p {
  font-family: Rubrik, sans-serif;
}

.project-subtopics {
  list-style-type: none;
  padding: 0;
}

.project-subtopics li:focus-within {
  color: var(--green);
}

.project-subtopics li:hover > .project-subheader {
  color: var(--green);
}

.splide {
  grid-column-start: 2;
  grid-column-end: -1;
}

.splide__list {
  counter-reset: project-count;
}

.project-card {
  position: relative;
  display: grid;
  grid-template-rows: max-content 1fr;
  grid-row-gap: 2rem;
  min-height: 475px;
  text-decoration: none;
}

.project-card:hover img {
  filter: brightness(0.8);
}

.project-card::before {
  counter-increment: project-count;
  content: counter(project-count);
  color: var(--cream);
  font-size: 6rem;
  font-weight: 600;
  position: relative;
  /*top: 4rem;*/
  grid-row: 1 / 2;
  grid-column: 1 / -1;
  z-index: 2;
  margin-left: calc(100% / 36);
  margin-top: clamp(4rem, 68px, 68px);
}
.project-card:nth-child(-n+9)::before {
  content: '0'counter(project-count);
}

.project-card .img-wrapper {
  grid-row: 1 / 3;
  grid-column: 1 / -1;
  z-index: 1;
}

.project-card .img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-card .tag-list {
  grid-row: 2 / 3;
  grid-column: 1 / -1;
  z-index: 2;
  align-items: flex-start;
  align-content: flex-start;
  margin-left: calc(100% / 36);
}

.project-card .project-tag {
  margin-top: 8px;
}
.project-card .project-tag:not(:first-child) {
  margin-left: 1rem;
}

.splide__arrow {
  font-size: 4rem;
  top: unset;
  bottom: 0;
  border: 0;
  background: none;
  transform: unset;
  opacity: 1;
  color: white;
  height: unset;
  bottom: calc(100% / 36);
}

.splide__arrow--prev {
  left: calc(100% / 36);
  justify-content: flex-start;
}

.splide__arrow--next {
  right: calc(100% / 36);
  justify-content: flex-end;
}

.splide__arrow[disabled] {
  color: var(--light-gray);
}

.return-link {
  display: none;
}

@media(max-width: 768px) {
  aside {
    min-height: 100vh;
  }
  aside h1 {
    margin-bottom: 4rem;
  }
  main.category-page {
    background-color: var(--cream);
    transform: translateX(-100%);
    transition: transform 0.4s ease-in;
    position: absolute;
    top: 0;
  }
  main.category-page:target {
    display: grid;
    position: absolute;
    top: 0;
    background-color: var(--cream);
    height: 100vh;
    overflow: hidden;
    transform: translateX(0);
    transition: transform 0.4s ease-out;
  }
  main.category-page:target h1,
  main.category-page:target p {
    grid-column-start: 2 !important;
    grid-column-end: -2 !important;
  }
  main.category-page:target + footer {
    display: none;
  }
  main.category-page:target .return-link {
    display: block;
    grid-column: 2 / -2 !important;
    text-decoration: none;
    color: var(--black);
    font-weight: 600;
    font-size: 0.8125em;
  }
}
