/* ==========================================================================
   Blog & project listing — post cards, topic filter
   ========================================================================== */

.post-list {
    padding: 0;
    margin: 0 0 var(--space-xl) 0;
}

.post-list h2 {
    color: var(--color-muted);
}

.post-item {
    position: relative;
    margin-bottom: 0;
    padding: var(--space-l) 0;
    border-bottom: 1px solid var(--color-subtle);
}

.post-item.hidden {
    display: none;
}

.post-list.hidden {
    display: none;
}

.post-item:not(.hidden):not(:has(~ .post-item:not(.hidden))) {
    border-bottom: none;
}

.post-link,
.post-link:visited {
    color: var(--color-heading);
    transition: color 0.2s ease;
}

.post-link::after {
    content: "";
    position: absolute;
    inset: 0;
}

.post-item:hover .post-link {
    color: var(--color-accent);
}

.post-title {
    font-family: var(--font-mono);
    font-size: var(--text-size-lead);
    font-weight: 400;
    line-height: 1.4;
    color: var(--color-heading);
    margin: 0;
    text-wrap: balance;
}

.post-summary {
    font-size: var(--text-size-code);
    line-height: 1.6;
    margin: var(--space-xs) 0 0 0;
}

/* Topic tags (shared with blog posts) */

.topic-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-top: var(--space-s);
}

.topic-tag {
    background: transparent;
    font-family: var(--font-mono);
    font-size: var(--text-size-ui);
    line-height: 1.2;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border: none;
    color: var(--color-muted);
    padding: 0;
    transition: color 0.2s ease;
}

.topic-tag::before {
    content: "#";
    transition: color 0.2s ease;
}

.topic-tag:hover {
    color: var(--color-accent);
}

/* Topic filter bar */

.topic-filter {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-bottom: var(--space-xl);
}

.topic-filter .topic-tag {
    cursor: pointer;
}

.topic-filter .topic-tag[aria-pressed="true"] {
    color: var(--color-accent);
}

.topic-filter.has-active .topic-tag[aria-pressed="false"] {
    text-decoration: line-through;
}

/* Animations */

.js-animated .topic-filter {
    opacity: 0;
    animation: fadeIn 0.6s ease-out 0.38s forwards;
}

.js-animated .post-item {
    opacity: 0;
    animation: fadeIn 0.6s ease-out 0.5s forwards;
}
