.home-articles { padding: 2.75rem 0 3.5rem; }

.home-articles .insight-grid,
.home-projects-section .insight-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
    align-items: stretch;
}

@media (min-width: 901px) {
    .home-articles .insight-grid > .insight-card:nth-child(3n + 1):last-child,
    .home-projects-section .insight-grid > .insight-card:nth-child(3n + 1):last-child {
        grid-column: 2;
    }

    .home-articles .insight-grid > .insight-card:nth-child(3n + 2):last-child,
    .home-projects-section .insight-grid > .insight-card:nth-child(3n + 2):last-child {
        grid-column: 3;
    }

    .home-articles .insight-grid:has(> .insight-card:last-child:nth-child(2)),
    .home-projects-section .insight-grid:has(> .insight-card:last-child:nth-child(2)) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-width: calc((2 * (100% - 2.5rem) / 3) + 1.25rem);
        margin-inline: auto;
    }

    .home-articles .insight-grid:has(> .insight-card:last-child:nth-child(2)) > .insight-card:last-child,
    .home-projects-section .insight-grid:has(> .insight-card:last-child:nth-child(2)) > .insight-card:last-child {
        grid-column: auto;
    }
}

.insight-card { overflow: hidden; min-width: 0; }

.insight-cover { position: relative; }

.insight-card.is-coming-soon {
    cursor: default;
}

.insight-card.is-coming-soon:hover {
    transform: none;
}

.cs-card-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.75rem;
    background: rgba(15, 23, 42, 0.62);
    text-align: center;
}

.cs-card-badge {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fff;
}

.cs-card-hint {
    font-size: 12px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.88);
    max-width: 90%;
}

.home-articles .insight-card,
.home-projects-section .insight-card {
    display: flex;
    flex-direction: column;
}

.home-articles .insight-content,
.home-projects-section .insight-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.home-articles .insight-card-action,
.home-projects-section .insight-card-action {
    margin-top: auto;
    padding-top: 0.75rem;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.insight-image {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
    background: var(--page);
}

.insight-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blue);
}

.insight-content { padding: 1.1rem 1.2rem 1.3rem; }
.insight-meta { font-size: var(--fs-meta); color: var(--muted); margin-bottom: 0.4rem; }
.home-articles .insight-meta,
.home-projects-section .insight-meta {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.home-articles .category-tag,
.home-projects-section .category-tag {
    font-size: inherit;
    color: inherit;
    background: none;
    border: none;
    padding: 0;
    font-weight: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
}
.insight-title { font-size: var(--fs-card); font-weight: 700; line-height: 1.4; margin: 0 0 0.5rem; }
.home-articles .insight-title,
.home-projects-section .insight-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: calc(1.4em * 2);
}
.insight-title a { color: var(--navy-text); }
.insight-content p { font-size: var(--fs-body); line-height: var(--lh-body); color: var(--muted); margin: 0 0 0.75rem; }
.home-articles .insight-summary,
.home-projects-section .insight-summary {
    overflow: hidden;
    text-align: justify;
    text-justify: inter-word;
    text-align-last: start;
    hyphens: none;
    overflow-wrap: break-word;
    min-width: 0;
    min-height: calc(var(--lh-body) * 3em);
    max-height: calc(var(--lh-body) * 3em);
}
.home-articles .card-author,
.home-projects-section .card-author {
    font-size: 13px;
    line-height: 1.4;
    color: #94a3b8;
    margin: 0 0 0.75rem;
    text-align: right;
    height: calc(1.4em * 1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.home-articles .card-author strong,
.home-projects-section .card-author strong {
    color: #374151;
    font-weight: 600;
}
[data-theme="dark"] .home-articles .card-author strong,
[data-theme="dark"] .home-projects-section .card-author strong {
    color: #e2e8f0;
}

@media (max-width: 900px) {
    .home-articles .insight-grid,
    .home-projects-section .insight-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-articles .insight-grid > .insight-card:nth-child(3n + 1):last-child,
    .home-articles .insight-grid > .insight-card:nth-child(3n + 2):last-child,
    .home-projects-section .insight-grid > .insight-card:nth-child(3n + 1):last-child,
    .home-projects-section .insight-grid > .insight-card:nth-child(3n + 2):last-child {
        grid-column: auto;
    }

    .home-articles .insight-grid > .insight-card:nth-child(odd):last-child,
    .home-projects-section .insight-grid > .insight-card:nth-child(odd):last-child {
        grid-column: 1 / -1;
        justify-self: center;
        width: calc((100% - 1.25rem) / 2);
    }
}

@media (max-width: 640px) {
    .home-articles .insight-grid,
    .home-projects-section .insight-grid {
        grid-template-columns: 1fr;
    }

    .home-articles .insight-grid > .insight-card:nth-child(odd):last-child,
    .home-projects-section .insight-grid > .insight-card:nth-child(odd):last-child {
        grid-column: auto;
        justify-self: stretch;
        width: auto;
    }

    .home-articles .insight-grid:has(> .insight-card:last-child:nth-child(2)),
    .home-projects-section .insight-grid:has(> .insight-card:last-child:nth-child(2)) {
        max-width: none;
    }
}
