:root {
  --gallery-primary: #0b41cd;
  --gallery-primary-dark: #07359f;
  --gallery-border: #dfe3e8;
  --gallery-text: #25313c;
  --gallery-muted: #5f6b76;
}

.quarto-title-block .title {
  color: var(--gallery-text);
}

.gallery-category {
  margin: 1.75rem 0 1rem;
  color: var(--gallery-text);
  font-size: 1.35rem;
}

.cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 1.25rem;
  width: 100%;
}

.card {
  overflow: hidden;
  border: 1px solid var(--gallery-border);
  border-radius: 0.75rem;
  background: #fff;
  box-shadow: 0 0.15rem 0.4rem rgb(16 24 40 / 6%);
  transition: box-shadow 150ms ease, transform 150ms ease;
}

.card:hover,
.card:focus-within {
  box-shadow: 0 0.6rem 1.4rem rgb(16 24 40 / 14%);
  transform: translateY(-2px);
}

.app-details {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 4.25rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--gallery-border);
}

.listing-title {
  flex: 1;
  color: var(--gallery-primary);
  font-size: 1.05rem;
  font-weight: 650;
  line-height: 1.25;
  text-decoration: none;
}

.listing-title:hover {
  color: var(--gallery-primary-dark);
  text-decoration: underline;
}

.source-code,
.readme-file {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.35rem;
  color: var(--gallery-muted);
}

.source-code:hover,
.readme-file:hover {
  background: #eef3ff;
  color: var(--gallery-primary);
}

.app-preview {
  position: relative;
  display: block;
  overflow: hidden;
  background: #eef3f7;
}

.app-preview img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 180ms ease;
}

.app-preview:hover img,
.app-preview:focus-visible img {
  transform: scale(1.02);
}

.launch-label {
  position: absolute;
  right: 0.8rem;
  bottom: 0.8rem;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  background: rgb(11 65 205 / 92%);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
}

a:focus-visible {
  outline: 3px solid #ffbf47;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .card,
  .app-preview img {
    transition: none;
  }
}
