/* Shared presentation for portfolio media. Kept off navigation marks and UI icons. */
:root {
  --image-shadow: 0 4px 16px rgba(40, 35, 33, 0.12);
  --on-dark: #f3fdff;
  --on-dark-muted: #d9eef0;
}

/* Semantic dark surfaces always receive the same accessible foreground treatment. */
.surface--dark {
  color: var(--on-dark);
}

.surface--dark :is(h1, h2, h3, h4, strong) {
  color: inherit;
}

.surface--dark :is(.copy, p, li, figcaption) {
  color: var(--on-dark-muted);
}

.surface--dark a:not(.text-link) {
  color: var(--on-dark);
}

.project-media > img,
.hello-bank-screens img,
.case-study .visual img,
.about-portrait > img,
.visual-category-card,
.identity-card,
.card,
.asset {
  border: 0;
  border-radius: 10px;
  box-shadow: var(--image-shadow);
}

/* This wins over legacy page-level card declarations and keeps portfolio media consistent. */
body .card {
  box-shadow: var(--image-shadow);
}

/* Gallery cards are image-led; their descriptions are retained in image alt text. */
.card-body,
.asset figcaption {
  display: none;
}

/* Every artwork image retains its own proportional, uncropped height. */
.visual-category-card img,
.card img,
.asset > img,
.socials img,
.formats img {
  height: auto !important;
  aspect-ratio: auto;
  object-fit: contain !important;
  object-position: center;
}

/* Keep the established shadow; only lift selected project visuals on capable pointers. */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  a.visual-category-card {
    transition: transform var(--motion-fast, 180ms) cubic-bezier(.22, .61, .36, 1);
  }

  a.visual-category-card:hover {
    transform: translateY(-3px);
  }
}

/* A consistent gutter for groups of portfolio cards and media. */
.visual-category-grid,
.grid,
.asset-stack,
.socials,
.formats {
  gap: 24px;
}
