/**
 * post-card.css
 * Shared "post card" component — used on the homepage grid (index.html)
 * and the related-posts grid (templates/post.template.html).
 * Dark Polaroid look: square photo inside a themed frame, caption below,
 * no tilt/rotation, gradient title on tap.
 *
 * Requires the theme variables to already be defined on :root
 * (--tg-secondary-bg, --tg-text, --tg-link, --tg-accent-2), which both
 * pages already declare before this stylesheet is loaded.
 */

.post-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.post-card {
  display: block;
  min-width: 0;
  text-decoration: none;
  color: inherit;
  background: var(--tg-secondary-bg);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 3px;
  padding: 7px 7px 4px;
  overflow: visible;
  box-shadow: 0 3px 10px -4px rgba(0, 0, 0, 0.55);
}

.post-card-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  background-color: var(--tg-secondary-bg);
  object-fit: cover;
  border-radius: 1px;
  margin: 0;
}

.post-card-title {
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.35;
  margin: 0;
  padding: 9px 2px 10px;
  text-align: center;
  color: var(--tg-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.15s ease;
}

.post-card:active .post-card-title {
  background: linear-gradient(135deg, var(--tg-link), var(--tg-accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
