:root {
  --tile-gap: 6px;
}

.avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.avatar-lg {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.avatar-placeholder {
  background: #e9ecef;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #adb5bd;
  font-size: 1.2rem;
}
.avatar-lg.avatar-placeholder { font-size: 2.5rem; }

.profile-card {
  transition: transform .12s ease, box-shadow .12s ease;
}
.profile-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 .5rem 1rem rgba(0,0,0,.1) !important;
}

.grid-posts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--tile-gap);
}
@media (min-width: 768px) {
  .grid-posts { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1200px) {
  .grid-posts { grid-template-columns: repeat(5, 1fr); }
}

.post-tile {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 8px;
  background: #000;
}
.post-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .2s ease, opacity .2s ease;
}
.post-tile:hover img { transform: scale(1.04); opacity: .85; }

.post-tile-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #adb5bd;
  background: #f1f3f5;
}

.post-tile-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  opacity: 0;
  background: rgba(0,0,0,.35);
  transition: opacity .15s ease;
}
.post-tile:hover .post-tile-overlay { opacity: 1; }

.post-tile-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  color: #fff;
  font-size: .8rem;
  text-shadow: 0 1px 2px rgba(0,0,0,.6);
}

.post-caption {
  white-space: pre-wrap;
  word-wrap: break-word;
}

.raw-json {
  max-height: 500px;
  overflow: auto;
  font-size: .78rem;
  background: #0d1117;
  color: #c9d1d9;
  padding: 1rem;
  margin: 0;
}
.raw-json code { color: inherit; background: transparent; padding: 0; }
