/* Reset theme's default <ul> list styling on posts list */
.posts-list ul {
  list-style: none;
  padding: 0;
}

/* Controls bar */
.posts-controls {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1.5rem 0 2rem;
}

.posts-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.posts-search {
  width: 100%;
}

.posts-search input {
  width: 100%;
  padding: 0.4em 0.9em;
  font-size: 0.9em;
  font-family: inherit;
  color: inherit;
  background: transparent;
  border: 1px solid currentColor;
  border-radius: 999px;
  opacity: 0.7;
  transition: opacity 0.15s ease;
}

.posts-search input:focus {
  opacity: 1;
  outline: none;
}

.posts-search input::placeholder {
  opacity: 0.55;
}

.posts-empty {
  margin: 1rem 0;
  text-align: left;
  opacity: 0.6;
  font-style: italic;
}

.posts-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.35em 0.9em;
  font-size: 0.9em;
  font-family: inherit;
  color: var(--fg-color, inherit);
  background: transparent;
  border: 1px solid currentColor;
  border-radius: 999px;
  cursor: pointer;
  opacity: 0.65;
  transition: opacity 0.15s ease, background-color 0.15s ease;
}

.posts-filter-btn:hover {
  opacity: 1;
}

.posts-filter-btn.is-active {
  opacity: 1;
  background-color: rgba(127, 127, 127, 0.15);
}

.posts-filter-btn .count {
  font-size: 0.78em;
  opacity: 0.6;
  font-variant-numeric: tabular-nums;
}

/* Year groups */
.posts-year-group {
  margin-bottom: 2rem;
}

.posts-year {
  font-family: monospace;
  font-size: 1.1em;
  opacity: 0.55;
  margin: 1.2rem 0 0.7rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px dashed currentColor;
}

.posts-year-group.is-empty {
  display: none;
}

/* Card grid */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.post-card {
  border: 1px solid rgba(127, 127, 127, 0.25);
  border-radius: 10px;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  background: transparent;
}

.post-card:hover {
  border-color: rgba(127, 127, 127, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.post-card.is-hidden {
  display: none;
}

.post-card-link {
  display: block;
  padding: 1rem 1.1rem;
  color: inherit;
  text-decoration: none;
}

.post-card-link:hover {
  text-decoration: none;
}

.post-card-title {
  margin: 0 0 0.4rem;
  font-size: 1.05em;
  line-height: 1.35;
}

.content article p.post-card-desc {
  margin: 0 0 0.7rem;
  font-size: 0.88em;
  line-height: 1.45;
  opacity: 0.75;
  text-align: left;
  hyphens: none;
}

.post-card-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.78em;
}

.post-card-date {
  font-family: monospace;
  opacity: 0.6;
}

.post-card-tags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.post-card-tag {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 4px;
  background: rgba(127, 127, 127, 0.18);
  opacity: 0.85;
  font-size: 0.95em;
}
