.portfolio-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.portfolio-filter {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.65rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: inherit;
  text-decoration: none;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.portfolio-filter:hover,
.portfolio-filter:focus-visible,
.portfolio-filter.active {
  border-color: currentColor;
  background: rgba(255, 255, 255, 0.1);
}

.portfolio-cover {
  position: relative;
  display: block;
  min-height: clamp(18rem, 34vw, 31rem);
  overflow: hidden;
}

.portfolio-cover img,
.project-detail-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portfolio-cover::after,
.project-detail-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 17, 28, 0.05), rgba(7, 17, 28, 0.72));
}

.portfolio-cover > span,
.project-detail-cover > span {
  position: relative;
  z-index: 1;
}

.case-title-link {
  color: inherit;
  text-decoration: none;
}

.case-title-link:hover,
.case-title-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.case-action {
  display: inline-flex;
  margin-top: 1.5rem;
}

.portfolio-empty {
  padding: 3rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 1rem;
  text-align: center;
}

.project-detail-card {
  align-items: stretch;
}

.project-detail-cover {
  position: relative;
  min-height: clamp(22rem, 42vw, 38rem);
  overflow: hidden;
}

.project-rich-text {
  font-size: 1.05rem;
  line-height: 1.8;
  white-space: normal;
}

.project-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.project-gallery figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0.9rem;
}

.project-gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.project-gallery figcaption {
  padding: 0.8rem 1rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

.app-release-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.4rem;
  margin-top: 1.25rem;
  font-size: 0.95rem;
}

.app-release-strip span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.app-release-strip span::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.55;
}

.app-media {
  background: #08111f;
  overflow: hidden;
  position: relative;
}

.app-media-screen {
  min-height: 520px;
}

.app-media-screen img {
  height: 100%;
  inset: 0;
  object-fit: cover;
  object-position: top center;
  position: absolute;
  width: 100%;
}

.app-media-logo {
  align-items: center;
  background: radial-gradient(circle at center, #123052 0, #08111f 68%);
  display: flex;
  justify-content: center;
  padding: 48px;
}

.app-media-logo img {
  height: auto;
  width: min(88%, 370px);
}

.integrity-code {
  display: block;
  margin-top: 0.75rem;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-size: 0.82rem;
  line-height: 1.6;
}

@media (max-width: 720px) {
  .portfolio-filters {
    margin-bottom: 1.5rem;
  }

  .portfolio-filter {
    min-height: 2.5rem;
    padding: 0.55rem 0.85rem;
  }

  .project-gallery {
    grid-template-columns: 1fr;
  }

  .portfolio-empty {
    padding: 2rem 1.25rem;
  }
}
