.mp-mobile-project-arrow {
  display: none;
}

.mp-mobile-details,
.mp-mobile-details__inner {
  display: contents;
}

@media (max-width: 640px) {
  #my-projects.mp-section,
  #restaurant-project.mp-section {
    padding-top: 42px;
    padding-bottom: 26px;
  }

  #my-projects .mp-heading-row,
  #restaurant-project .mp-heading-row {
    position: relative;
    display: flex;
    min-height: 220px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    overflow: hidden;
    padding: 25px 76px 24px 23px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 27px;
    background:
      radial-gradient(circle at 92% 12%, rgba(79, 224, 228, 0.18), transparent 34%),
      radial-gradient(circle at 8% 108%, rgba(111, 72, 255, 0.13), transparent 38%),
      linear-gradient(145deg, rgba(22, 25, 36, 0.97), rgba(7, 8, 15, 0.98));
    box-shadow:
      0 28px 70px -38px rgba(0, 0, 0, 0.95),
      inset 0 1px 0 rgba(255, 255, 255, 0.045);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition:
      border-color 240ms ease,
      box-shadow 240ms ease,
      transform 180ms ease;
  }

  #my-projects .mp-heading-row::after,
  #restaurant-project .mp-heading-row::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(79, 224, 228, 0.52), transparent);
    pointer-events: none;
  }

  #my-projects .mp-heading-row:active,
  #restaurant-project .mp-heading-row:active {
    transform: scale(0.988);
  }

  #my-projects .mp-heading-row:focus-visible,
  #restaurant-project .mp-heading-row:focus-visible {
    outline: 3px solid rgba(79, 224, 228, 0.48);
    outline-offset: 4px;
  }

  #my-projects .mp-heading-row > div,
  #restaurant-project .mp-heading-row > div {
    width: 100%;
  }

  #my-projects .mp-eyebrow,
  #restaurant-project .mp-eyebrow {
    margin-bottom: 16px;
    font-size: 12px;
    letter-spacing: 0.25em;
  }

  #my-projects .mp-title,
  #restaurant-project .mp-title {
    max-width: 100%;
    font-size: clamp(27px, 8.2vw, 34px);
    line-height: 1.09;
    letter-spacing: -0.025em;
  }

  #my-projects .mp-title span,
  #restaurant-project .mp-title span {
    display: block;
  }

  #my-projects .mp-tag,
  #restaurant-project .mp-tag {
    margin: 0;
    padding: 8px 16px;
    font-size: 12px;
  }

  .mp-mobile-project-arrow {
    position: absolute;
    right: 21px;
    bottom: 21px;
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border: 1px solid rgba(79, 224, 228, 0.3);
    border-radius: 50%;
    background: rgba(79, 224, 228, 0.09);
    color: #4fe0e4;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24);
    transition: transform 300ms cubic-bezier(.2, .75, .2, 1), background 220ms ease;
    pointer-events: none;
  }

  .mp-mobile-project-arrow svg {
    width: 19px;
    height: 19px;
  }

  .mp-mobile-expanded .mp-heading-row {
    border-color: rgba(79, 224, 228, 0.34) !important;
    box-shadow:
      0 30px 76px -38px rgba(0, 0, 0, 0.96),
      0 0 38px rgba(79, 224, 228, 0.055) !important;
  }

  .mp-mobile-expanded .mp-mobile-project-arrow {
    background: rgba(79, 224, 228, 0.16);
    transform: rotate(180deg);
  }

  .mp-mobile-details {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    pointer-events: none;
    transition:
      grid-template-rows 420ms cubic-bezier(.2, .75, .2, 1),
      opacity 220ms ease;
  }

  .mp-mobile-details__inner {
    display: block;
    min-height: 0;
    overflow: hidden;
  }

  .mp-mobile-expanded .mp-mobile-details {
    grid-template-rows: 1fr;
    opacity: 1;
    pointer-events: auto;
  }

  .mp-mobile-expanded .mp-mobile-details__inner {
    overflow: visible;
  }

  .mp-mobile-details .mp-lede {
    margin-top: 24px;
  }
}

@media (max-width: 350px) {
  #my-projects .mp-heading-row,
  #restaurant-project .mp-heading-row {
    min-height: 205px;
    padding: 22px 66px 21px 20px;
    border-radius: 23px;
  }

  .mp-mobile-project-arrow {
    right: 17px;
    bottom: 17px;
    width: 42px;
    height: 42px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #my-projects .mp-heading-row,
  #restaurant-project .mp-heading-row,
  .mp-mobile-project-arrow,
  .mp-mobile-details {
    transition: none;
  }
}
