.post-grid,
.post-grid .post-card {
  box-sizing: border-box;
}

.post-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  gap: 1.5rem;
  max-width: 100%;
  margin: 2rem auto;
}

.post-grid .post-card {
  min-width: 0;
  padding: 1.5rem;
  border-radius: 12px;
}

.post-grid .post-card h2 {
  margin: 0 0 .5rem;
}

.post-grid .post-card a {
  color: inherit;
  text-decoration: none;
}

.post-overlay {
  background-color: #FFF;
}

@media (max-width: 650px) {
  .post-grid {
    grid-template-columns: 1fr;
  }
}

/* Like, comment and view totals on each card (added by /comments/post-counts.js) */
.pc-votes {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-top: .25rem;
  padding: 0 10px;
  color: #666;
  font-size: .85rem;
  line-height: 1.2;
  white-space: nowrap;
}

.pc-votes .pc-likes,
.pc-votes .pc-comments,
.pc-votes .pc-views {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  color: inherit;
  text-decoration: none;
}

.pc-votes .pc-icon {
  display: block;
  width: 1.05em;
  height: 1.05em;
  flex-shrink: 0;
}

.pc-votes .pc-icon-emoji {
  font-size: 1em;
  line-height: 1;
}

/* Card text: the post's first paragraph or its Summary (added by the post editor) */
.post-grid .post-card .excerpt {
  margin: 0;
  padding: 10px 10px 0;
  line-height: 1.45;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
}

/* Card picture for a post that only has a video: its first frame, silent, no controls */
.post-grid .post-card .card-video {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  padding: 10px;
  pointer-events: none;
}

/* Long unbroken text wraps inside the card */
.post-grid .post-card, .post-grid .post-card .excerpt { overflow-wrap: anywhere; word-break: break-word; }

/* Hashtag bar above the cards (built by posts/tags.js from each card's data-tags) */
.tag-bar[hidden] { display: none; }
.tag-bar {
  box-sizing: border-box;
  max-width: 100%;
  margin: 0 auto 25px;
  padding: 15px;
  border: 1px solid #FFF;
  border-radius: 8px;
  background: #FFF;
}
.tag-bar h2 { margin: 0 0 .25rem; }
.tag-bar .tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-top: 10px;
}
.tag-bar .tag-btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  max-width: 100%;
  padding: 4px 12px;
  border: 1px solid #cfdcec;
  border-radius: 999px;
  background: #eef3f9;
  color: #1E90FF;
  font: bold .85rem/1.5 'Manrope', sans-serif;
  overflow-wrap: anywhere;
  cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.tag-bar .tag-btn:hover { border-color: #1E90FF; }
.tag-bar .tag-btn:focus-visible { outline: 2px solid #1E90FF; outline-offset: 2px; }
.tag-bar .tag-btn.is-active {
  border-color: #1E90FF;
  background: #1E90FF;
  color: #FFF;
}
.tag-bar .tag-count {
  min-width: 1.2rem;
  padding: 0 6px;
  border-radius: 999px;
  background: #FFF;
  color: #6c757d;
  font-size: .72rem;
  text-align: center;
}
.tag-bar .tag-btn.is-active .tag-count { color: #1E90FF; }
.tag-bar .tag-status {
  margin: 10px 0 0;
  color: #6c757d;
  font-size: .85rem;
}
.tag-bar .tag-status:empty { display: none; }
.tag-bar .tag-clear {
  margin-left: .4rem;
  padding: 0;
  border: 0;
  background: none;
  color: #1E90FF;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}
.post-grid .post-card[hidden] { display: none; }

/* Pinned projects & shares: inline, no bullets, extra space between links */
.project-list {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 1.75rem;
  row-gap: .5rem;
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
}

.project-list li {
  margin: 0;
  padding: 0;
}

@media (max-width: 649.98px) {
  .project-list {
    column-gap: .65rem;
    row-gap: .4rem;
  }
}
