.latest-work {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 116px;
  width: 100%;
  padding: 145px 56px;
  overflow: hidden;
  background: #000;
  color: #e4e6f3;
  font-family: "Satoshi", sans-serif;
}

.latest-work__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  width: 100%;
  padding-bottom: 20px;
  border-bottom: 1px solid #d3d8ed;
}

.latest-work__heading,
.latest-work__period {
  margin: 0;
  font-size: var(--font-size-large);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0;
  opacity: 0.9;
}

.latest-work__heading {
  color: #d3d8ed;
}

.latest-work__period {
  color: #e4e6f3;
}

.latest-work__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(50px, 1fr));
  grid-template-rows: repeat(2, min-content);
  gap: 256px 56px;
  width: 100%;
}

.project-card {
  min-width: 0;
  width: 100%;
}

.project-card__link {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 32px;
  width: 100%;
  color: inherit;
  text-decoration: none;
}

.project-card__media {
  width: 100%;
  height: 790px;
  margin: 0;
  overflow: hidden;
  border-radius: 4px;
  background: #000;
}

.project-card__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  clip-path: inset(0 100% 0 0);
  will-change: clip-path, transform;
  transform: translateZ(0);
}

.project-card__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.project-card__title,
.project-card__type {
  margin: 0;
  font-weight: 500;
  letter-spacing: 0;
}

.project-card__title {
  color: #e4e6f3;
  font-size: 2rem;
  line-height: 1.3;
}

.project-card__type {
  color: #9da2b4;
  font-size: var(--font-size-small);
  font-weight: 400;
  line-height: 1.4;
}

.project-card--small {
  height: 898px;
}

.project-card--small .project-card__link {
  justify-content: flex-end;
  height: 100%;
}

.project-card--small .project-card__media {
  height: 60%;
}

@media (hover: hover) and (pointer: fine) {
  .latest-work.has-project-cursor,
  .latest-work.has-project-cursor .project-card__link {
    cursor: none;
  }

  .project-cursor {
    position: fixed;
    z-index: 2000;
    top: 0;
    left: 0;
    display: grid;
    place-items: center;
    width: 1.5625rem;
    height: 1.5625rem;
    border: 0.024375rem solid transparent;
    border-radius: 50%;
    pointer-events: none;
    background: #26589e;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
    transition:
      width 0.55s cubic-bezier(0.22, 1, 0.36, 1),
      height 0.55s cubic-bezier(0.22, 1, 0.36, 1),
      border-color 0.4s ease,
      background 0.4s ease,
      box-shadow 0.4s ease,
      opacity 0.25s ease,
      transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: left, top, width, height, opacity, transform;
  }

  .project-cursor.is-visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }

  .project-cursor.is-expanded {
    width: 10.75rem;
    height: 10.75rem;
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(103, 162, 245, 0.3);
    box-shadow: 0 0.75rem 3rem rgba(0, 0, 0, 0.16);
    backdrop-filter: blur(4.375rem);
    -webkit-backdrop-filter: blur(4.375rem);
  }

  .project-cursor__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    color: #ddebfd;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.45;
    white-space: nowrap;
    opacity: 0;
    transform: scale(0.7);
    transition:
      opacity 0.2s ease,
      transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .project-cursor.is-expanded .project-cursor__content {
    opacity: 1;
    transform: scale(1);
    transition-delay: 0.12s;
  }

  .project-cursor__top {
    display: flex;
    align-items: center;
    gap: 0.5625rem;
  }

  .project-cursor__icon {
    width: 0.875rem;
    height: auto;
  }
}

@media (min-width: 1440px) {
  .project-card--small .project-card__link {
    justify-content: flex-start;
  }
}

@media (max-width: 1439px) {
  .latest-work {
    gap: 56px;
    padding: 56px 40px;
  }

  .latest-work__heading,
  .latest-work__period {
    font-size: var(--font-size-medium);
  }

  .latest-work__grid {
    gap: 120px 56px;
  }

  .project-card__link {
    gap: 24px;
    height: 300px;
  }

  .project-card--small {
    height: 399px;
  }

  .project-card--small .project-card__link {
    height: 399px;
  }

  .project-card__media,
  .project-card--small .project-card__media {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
  }

  .project-card__title {
    font-size: var(--font-size-large);
    line-height: 1.4;
  }

  .project-card__type {
    font-size: var(--font-size-small);
  }
}

@media (max-width: 809px) {
  .latest-work {
    padding: 56px 20px;
  }

  .latest-work__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .latest-work__heading {
    font-size: var(--font-size-ui);
  }

  .latest-work__period {
    display: none;
  }

  .latest-work__grid {
    display: flex;
    flex-direction: column;
    gap: 56px;
  }

  .project-card,
  .project-card--small {
    height: auto;
  }

  .project-card__link,
  .project-card--small .project-card__link {
    height: 300px;
  }

  .project-card__title {
    font-size: var(--font-size-ui);
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-card__image {
    clip-path: none;
    will-change: auto;
  }

  .project-cursor {
    display: none;
  }
}
