.post-feed {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-flow: row dense;
    gap: 32px;
    margin-bottom: 40px;
}

@media (max-width: 1000px) {
    .post-feed {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px;
    }
}

@media (max-width: 650px) {
    .post-feed {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }
}

.post-feed.is-loading {
    opacity: 0.5;
    pointer-events: none;
}

.post-feed-empty {
    grid-column: 1 / -1;
    padding: 48px 16px;
    color: var(--an-text-muted);
    text-align: center;
}

.post-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--an-surface);
    border: 1px solid var(--an-border);
    border-radius: var(--an-radius);
    transition: border-color 0.4s ease;
}

.post-card:hover {
    border-color: var(--an-accent);
}

.post-card .featured {
    position: absolute;
    top: 10px;
    left: 0;
    border-radius: 0 var(--an-radius-sm) var(--an-radius-sm) 0;
    z-index: 3;
    padding: 4px 10px 3px;
    color: var(--an-accent-ink);
    background: var(--an-accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    pointer-events: none;
}

.post-card-image-link {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: var(--an-radius) var(--an-radius) 0 0;
}

.post-card-image {
    display: block;
    width: 100%;
    height: 220px;
    background: var(--an-surface-2);
    object-fit: cover;
}

.post-card-image-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--an-surface-2);
}

.post-card-image-empty img {
    width: 96px;
    height: 96px;
    object-fit: contain;
    opacity: 0.35;
    filter: var(--an-logo-filter);
}

.post-card-content {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    justify-content: space-between;
}

.post-card-content-link {
    display: block;
    flex-grow: 1;
    padding: 18px 24px 0;
}

.post-card-content-link::after {
    position: absolute;
    inset: 0;
    z-index: 1;
    content: "";
}

.post-card-tags {
    display: block;
    margin-bottom: 4px;
    color: var(--an-text-muted);
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.post-card-title {
    margin-bottom: 10px;
    padding-bottom: 8px;
    color: var(--an-accent);
    border-bottom: 1px solid var(--an-border);
    font-family: var(--an-font-display);
    font-size: 1.2rem;
    font-weight: 500;
    line-height: 1.3;
}

.post-card-excerpt {
    color: var(--an-text-body);
    font-size: 15px;
    line-height: 1.45;
}

.post-card-meta {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 12px 24px 20px;
}

.post-card-meta .author-list {
    position: relative;
    z-index: 2;
}

.post-card-date {
    color: var(--an-text-muted);
    font-size: 13px;
    line-height: 34px;
}

.site-index .post-feed > .post-card:first-child:not(.post-card-large) {
    grid-column: 1 / -1;
    border-color: var(--an-accent-line);
}

.site-index .post-feed > .post-card:first-child:not(.post-card-large) .post-card-image {
    height: 260px;
}

.post-card-large {
    grid-column: 1 / -1;
}

@media (min-width: 800px) {
    .post-card-large {
        flex-direction: row;
        min-height: 360px;
    }

    .post-card-large .post-card-image-link {
        flex: 1 1 auto;
        border-radius: var(--an-radius) 0 0 var(--an-radius);
    }

    .post-card-large .post-card-image {
        position: absolute;
        inset: 0;
        height: 100%;
    }

    .post-card-large .post-card-content {
        flex: 0 0 380px;
    }

    .post-card-large .post-card-content-link {
        padding: 28px 40px 0;
    }

    .post-card-large .post-card-title {
        font-size: 2.2rem;
        border-bottom: 0;
    }

    .post-card-large .post-card-meta {
        padding: 12px 40px 24px;
    }
}

.author-list {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
}

.author-list-item {
    position: relative;
    flex-shrink: 0;
}

.author-list-item + .author-list-item {
    margin-left: -10px;
}

.author-list-item:nth-child(1) { z-index: 5; }
.author-list-item:nth-child(2) { z-index: 4; }
.author-list-item:nth-child(3) { z-index: 3; }
.author-list-item:nth-child(4) { z-index: 2; }
.author-list-item:nth-child(5) { z-index: 1; }

.author-profile-image {
    display: block;
    width: 36px;
    height: 36px;
    overflow: hidden;
    background: var(--an-surface-3);
    border: 2px solid var(--an-surface);
    border-radius: 50%;
    object-fit: cover;
}

.author-profile-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--an-accent-ink);
    background: var(--an-accent);
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
}

.post-full-footer .author-profile-placeholder {
    font-size: 24px;
}

.author-name-tooltip {
    position: absolute;
    bottom: 110%;
    left: 50%;
    z-index: 10;
    padding: 3px 8px;
    color: var(--an-accent-ink);
    background: var(--an-accent);
    font-size: 12px;
    font-weight: 400;
    white-space: nowrap;
    opacity: 0;
    transform: translate(-50%, 6px);
    transition: opacity var(--an-transition), transform var(--an-transition);
    pointer-events: none;
}

@media (hover: hover) {
    .author-list-item:hover .author-name-tooltip {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.read-next {
    margin-top: 16px;
}

.read-next .post-feed {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

@media (max-width: 650px) {
    .read-next .post-feed {
        grid-template-columns: minmax(0, 1fr);
    }
}

.feed-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.feed-toolbar-sort {
    margin-left: auto;
}

.author-profile {
    margin-bottom: 44px;
    overflow: hidden;
    background: var(--an-surface);
    border: 1px solid var(--an-border);
    border-radius: var(--an-radius);
}

.author-profile-cover {
    height: 120px;
    background-color: var(--an-surface-2);
    background-position: center;
    background-size: cover;
}

.author-profile.has-cover .author-profile-cover {
    height: 200px;
}

.author-profile-body {
    display: flex;
    gap: 28px;
    align-items: flex-end;
    padding: 0 36px 30px;
}

.author-profile-avatar {
    flex-shrink: 0;
    width: 128px;
    height: 128px;
    margin-top: -64px;
    overflow: hidden;
    background: var(--an-surface-3);
    border: 4px solid var(--an-surface);
    border-radius: 50%;
}

.author-profile-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-profile-avatar .author-profile-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--an-accent-ink);
    background: var(--an-accent);
    font-family: var(--an-font-display);
    font-size: 52px;
    font-weight: 500;
    text-transform: uppercase;
}

.author-profile-info {
    min-width: 0;
    padding-top: 18px;
}

.author-profile:not(.has-cover) .author-profile-cover {
    display: none;
}

.author-profile:not(.has-cover) .author-profile-body {
    align-items: center;
    padding-top: 30px;
}

.author-profile:not(.has-cover) .author-profile-avatar {
    margin-top: 0;
    border-color: var(--an-surface-2);
}

.author-profile:not(.has-cover) .author-profile-info {
    padding-top: 0;
}

@media (max-width: 650px) {
    .author-profile:not(.has-cover) .author-profile-avatar {
        margin-top: 0;
    }
}

.author-profile-kicker {
    color: var(--an-accent);
    font-size: 12px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.author-profile-name {
    margin-top: 2px;
    color: var(--an-text);
    font-family: var(--an-font-display);
    font-size: clamp(1.9rem, 4vw, 2.6rem);
    font-weight: 500;
    line-height: 1.1;
}

.author-profile-bio {
    max-width: 640px;
    margin-top: 10px;
    color: var(--an-text-body);
    line-height: 1.5;
}

.author-profile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 0;
    margin: 14px 0 0;
    padding: 0;
    color: var(--an-text-muted);
    font-size: 14px;
    list-style: none;
}

.author-profile-meta li + li::before {
    content: "·";
    margin: 0 10px;
    color: var(--an-text-faint);
}

@media (max-width: 650px) {
    .author-profile-body {
        flex-direction: column;
        gap: 4px;
        align-items: center;
        padding: 0 18px 24px;
        text-align: center;
    }

    .author-profile-avatar {
        width: 104px;
        height: 104px;
        margin-top: -52px;
    }

    .author-profile-meta {
        justify-content: center;
    }
}

.author-feed-header {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.author-feed-title {
    color: var(--an-text);
    font-family: var(--an-font-display);
    font-size: 1.6rem;
    font-weight: 500;
}

.author-feed-header .feed-toolbar {
    margin-bottom: 0;
}

@media (max-width: 650px) {
    .feed-toolbar-sort {
        width: 100%;
        margin-left: 0;
    }

    .feed-toolbar-sort .an-select,
    .feed-toolbar-sort .an-select-button {
        flex: 1;
        width: 100%;
    }
}

.feed-toolbar-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.feed-toolbar-label {
    margin-right: 4px;
    color: var(--an-text-muted);
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
