.repo-grid {
    display: grid;
    /* Auto-fit: Creates as many columns as fit (min 300px wide) */
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.repo-card {
    background: white;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Pushes footer to bottom */
    transition: transform 0.2s, box-shadow 0.2s;
}

.repo-card:hover {
    transform: translateY(-3px); /* Lift effect */
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
    border-color: #c00000;
}

/* Header: Name & Visibility Badge */
.repo-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.repo-name {
    font-weight: 600;
    color: #0969da;
    text-decoration: none;
    font-size: 1rem;
    word-break: break-all; /* Prevents long names breaking layout */
}

.repo-name:hover {
    text-decoration: underline;
}

.repo-visibility {
    font-size: 0.75rem;
    border: 1px solid #d0d7de;
    border-radius: 2em;
    padding: 2px 8px;
    color: #586069;
    font-weight: 500;
}

/* Description */
.repo-desc {
    font-size: 0.85rem;
    color: #586069;
    margin-bottom: 16px;
    line-height: 1.5;
    flex-grow: 1; /* Fills space so footer stays at bottom */
}

/* Footer: Language & Stats */
.repo-footer {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.75rem;
    color: #586069;
    margin-top: auto;
}

.repo-lang {
    display: flex;
    align-items: center;
    gap: 5px;
}

.lang-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.repo-stats {
    display: flex;
    gap: 10px;
}