.project-card {
  isolation: isolate;
  background: #0d0d0d;
}

.project-card-link {
  position: absolute;
  inset: 0;
  display: block;
  color: inherit;
  text-decoration: none;
}

.project-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #0d0d0d;
}

.project-media.light {
  background: #fff;
}

.project-media.dark {
  background: #0c0d0f;
}

.project-media.blue {
  background: linear-gradient(135deg, #1436a7, #42a5ff);
}

.project-image {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  box-shadow: none;
  object-fit: cover;
}

.project-media.is-video {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 34%, rgba(255,255,255,.96), rgba(242,237,246,.88) 54%, #e7dfea 100%);
}

.project-video,
.project-video-fallback {
  position: relative;
  z-index: 0;
  display: block;
  width: min(76%, 84rem);
  overflow: hidden;
  border: 1px solid rgba(31,13,49,.12);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 2.2rem 5.5rem rgba(31,13,49,.18);
  transform: translateY(-7%);
}

.project-video {
  height: auto;
  max-height: 78%;
  object-fit: contain;
}

.project-video-fallback {
  display: none;
}

.project-video-fallback img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.project-media.is-video + .card-shade {
  height: 58%;
  background: linear-gradient(0deg, rgba(19,9,29,.9) 0%, rgba(19,9,29,.64) 40%, rgba(19,9,29,.18) 74%, transparent 100%);
  -webkit-backdrop-filter: blur(18px) saturate(.9);
  backdrop-filter: blur(18px) saturate(.9);
  -webkit-mask-image: linear-gradient(0deg, #000 0%, #000 56%, transparent 100%);
  mask-image: linear-gradient(0deg, #000 0%, #000 56%, transparent 100%);
}

.project-card .project-media,
.project-card .project-caption,
.project-card .card-shade {
  transition: opacity 520ms var(--motion-ease), filter 560ms var(--spring), transform 560ms var(--spring);
}

body.is-opening-case .project-card.is-active .project-media {
  opacity: .52;
  filter: blur(10px) saturate(.72);
  transform: scale(.985);
}

body.is-opening-case .project-card.is-active .card-shade {
  opacity: .72;
  -webkit-backdrop-filter: blur(28px);
  backdrop-filter: blur(28px);
}

body.is-opening-case .project-card.is-active .project-caption {
  opacity: 0;
  transform: translateY(-.7rem);
}

.project-card.is-video-fallback .project-video {
  display: none;
}

.project-card.is-video-fallback .project-video-fallback {
  display: block;
}

.project-video-toggle {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 4;
  display: grid;
  width: 2.4rem;
  height: 2.4rem;
  place-items: center;
  border: 1px solid rgba(255,255,255,.56);
  border-radius: 999px;
  background: rgba(19,9,29,.52);
  color: #fff;
  cursor: pointer;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.project-video-toggle:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.project-card.is-video-fallback .project-video-toggle {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .project-video {
    display: none;
  }

  .project-video-fallback {
    display: block;
  }

  .project-video-toggle {
    display: none;
  }
}

.mock-window {
  align-self: center;
  justify-self: center;
  width: min(76%, 680px);
  min-height: 58%;
  padding: 1rem;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 18px;
  background: rgba(255,255,255,.82);
  box-shadow: 0 22px 60px rgba(0,0,0,.12);
  backdrop-filter: blur(16px);
}

.mock-window.dark {
  border-color: rgba(255,255,255,.18);
  background: rgba(11,14,18,.72);
  box-shadow: 0 22px 60px rgba(0,0,0,.34);
}

.mock-top {
  display: flex;
  gap: .4rem;
  margin-bottom: 1rem;
}

.mock-dot {
  width: .55rem;
  height: .55rem;
  border-radius: 999px;
  background: rgba(0,0,0,.18);
}

.mock-window.dark .mock-dot {
  background: rgba(255,255,255,.28);
}

.mock-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: .8rem;
}

.mock-panel,
.mock-row {
  border-radius: 12px;
  background: rgba(17,17,17,.08);
}

.mock-window.dark .mock-panel,
.mock-window.dark .mock-row {
  background: rgba(255,255,255,.12);
}

.mock-panel {
  min-height: 9rem;
}

.mock-rows {
  display: grid;
  gap: .65rem;
}

.mock-row {
  height: 2.25rem;
}

.terminal {
  display: grid;
  gap: .55rem;
  align-self: center;
  justify-self: center;
  width: min(72%, 620px);
  padding: 1.25rem;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 18px;
  background: rgba(0,0,0,.55);
  color: rgba(255,255,255,.88);
  font-family: var(--mono);
  box-shadow: 0 24px 80px rgba(0,0,0,.38);
}

.terminal span {
  color: rgba(255,255,255,.5);
}

.card-shade {
  position: absolute;
  inset: auto 0 0;
  z-index: 1;
  height: 54%;
  pointer-events: none;
  background: linear-gradient(0deg, rgba(0,0,0,.82), rgba(0,0,0,.46) 46%, transparent);
  -webkit-mask-image: linear-gradient(0deg, #000 0%, #000 54%, transparent 100%);
  mask-image: linear-gradient(0deg, #000 0%, #000 54%, transparent 100%);
}

.project-caption {
  position: absolute;
  left: clamp(1.5rem, 5%, 3rem);
  right: clamp(1.5rem, 5%, 3rem);
  bottom: clamp(1.5rem, 5%, 3rem);
  z-index: 2;
  display: grid;
  min-width: 0;
  max-width: 30rem;
  gap: .8rem;
  color: white;
}

.project-caption > * {
  min-width: 0;
}

.project-caption.light-text {
  color: #111;
}

.project-title {
  display: flex;
  align-items: center;
  gap: .85rem;
}

.project-title h2 {
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
  font-size: clamp(1.35rem, 1.75vw, 1.65rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: 0;
  overflow-wrap: break-word;
}

.project-caption p {
  margin: 0;
  color: currentColor;
  opacity: .72;
  font-size: clamp(1rem, 1.25vw, 1.15rem);
  line-height: 1.45;
}

.project-icon {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 8px;
  background: rgba(255,255,255,.12);
  font-family: var(--mono);
  font-size: .7rem;
  font-weight: 700;
}

.project-caption.light-text .project-icon {
  border-color: rgba(0,0,0,.18);
  background: rgba(0,0,0,.04);
}

.project-logo {
  display: block;
  width: clamp(8.5rem, 13vw, 12rem);
  max-height: 2.4rem;
  flex: 0 0 auto;
  object-fit: contain;
  object-position: left center;
}

.sticker-card {
  display: grid;
  place-items: center;
  padding: clamp(1.25rem, 5vw, 3rem);
  background: var(--blue);
  color: white;
}

.sticker-card-content {
  display: grid;
  width: min(520px, 88%);
  gap: clamp(1.5rem, 4vw, 3rem);
  text-align: center;
}

.sticker-card h1 {
  margin: 0;
  font-size: 4rem;
  font-weight: 500;
  line-height: 1;
}

.sticker-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(.9rem, 2vw, 1.5rem);
}

.sticker-slot {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: 14px;
  background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.86);
  font-family: var(--mono);
  font-size: .85rem;
  cursor: default;
  user-select: none;
}

.sticker-slot::before {
  content: "";
  position: absolute;
  width: .55rem;
  height: .55rem;
  border-radius: 50%;
  background: rgba(255,255,255,.35);
}

.sticker-slot.is-collected {
  background: white;
  color: var(--blue);
}

.sticker-slot.is-collected::before {
  display: none;
}
