/* ==========================================================
   Projects page — terminal-themed card grid for lebon.info
   ========================================================== */

/* Ensure language selector is visible and centered at the top */
.terminal-window .language-selector {
    position: static; /* Override absolute positioning */
    transform: none; /* Reset transform */
    padding: 16px 0 8px 0; /* Add some spacing */
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    width: 100%;
}

/* Wider window to fit the project grid */
.terminal-window {
    max-width: 920px;
}

/* Section label with status badge */
.section-label {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.status-badge {
    font-size: 0.72rem;
    font-family: monospace;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 2px 10px;
    border-radius: 999px;
    border: 1px solid currentColor;
    line-height: 1.4;
}

.badge-planned {
    color: var(--terminal-amber);
}

.badge-wip {
    color: var(--terminal-green);
    animation: badge-pulse 2s ease-in-out infinite;
}

.badge-testing {
    color: #6fd3ff;
}

.badge-done {
    color: var(--terminal-bg);
    background: var(--terminal-green);
    border-color: var(--terminal-green);
}

@keyframes badge-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 255, 144, 0.4); }
    50% { box-shadow: 0 0 8px 2px rgba(0, 255, 144, 0.25); }
}

/* Project card grid */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
    margin: 10px 14px 4px 0;
}

.project-card {
    background: var(--terminal-bg);
    border: 1px solid rgba(0, 255, 144, 0.35);
    border-radius: 6px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    animation: card-in 0.45s ease both;
}

.project-card:hover {
    transform: translateY(-3px);
    border-color: var(--terminal-green);
    box-shadow: 0 6px 18px rgba(0, 255, 144, 0.15), 0 0 10px rgba(0, 255, 144, 0.2);
}

.project-card .terminal-link {
    align-self: flex-start;
}

/* Staggered entrance animation */
.project-card:nth-child(1)  { animation-delay: 0.03s; }
.project-card:nth-child(2)  { animation-delay: 0.06s; }
.project-card:nth-child(3)  { animation-delay: 0.09s; }
.project-card:nth-child(4)  { animation-delay: 0.12s; }
.project-card:nth-child(5)  { animation-delay: 0.15s; }
.project-card:nth-child(6)  { animation-delay: 0.18s; }
.project-card:nth-child(7)  { animation-delay: 0.21s; }
.project-card:nth-child(8)  { animation-delay: 0.24s; }
.project-card:nth-child(9)  { animation-delay: 0.27s; }
.project-card:nth-child(10) { animation-delay: 0.30s; }
.project-card:nth-child(11) { animation-delay: 0.33s; }
.project-card:nth-child(12) { animation-delay: 0.36s; }

@keyframes card-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.project-desc {
    color: var(--terminal-white);
    opacity: 0.85;
    font-size: 0.92rem;
    font-family: monospace;
    line-height: 1.45;
    margin: 0;
}

/* Accessibility: respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .project-card,
    .badge-wip {
        animation: none;
    }
    .project-card {
        transition: none;
    }
    .project-card:hover {
        transform: none;
    }
}

@media (max-width: 600px) {
    .project-grid {
        grid-template-columns: 1fr;
        margin-right: 8px;
    }
}
