/* projects-hub.css — multi-project launcher */

:root {
    --bg-deep: #0b1220;
    --bg-card: rgba(15, 23, 42, 0.72);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --brand: #f59e0b;
    --brand-2: #2563eb;
    --danger: #f87171;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    min-height: 100%;
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
    color: var(--text);
    background:
        radial-gradient(1200px 600px at 10% -10%, rgba(37, 99, 235, 0.22), transparent 60%),
        radial-gradient(900px 500px at 90% 0%, rgba(245, 158, 11, 0.16), transparent 55%),
        linear-gradient(160deg, #020617 0%, #0f172a 45%, #111827 100%);
}

body {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.hub-shell {
    width: min(1280px, 100%);
    margin: 0 auto;
    padding: 28px 20px 48px;
}

.hub-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
}

.hub-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.hub-brand img {
    height: 52px;
    width: auto;
}

.hub-brand h1 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.hub-brand p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.hub-user {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.hub-user .who {
    text-align: right;
    font-size: 0.85rem;
    color: var(--muted);
}

.hub-user .who strong {
    display: block;
    color: var(--text);
    font-size: 0.95rem;
}

.hub-btn {
    border: none;
    border-radius: 10px;
    padding: 10px 16px;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.hub-btn:active { transform: scale(0.98); }

.hub-btn-primary {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #111827;
}

.hub-btn-ghost {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    border: 1px solid var(--line);
}

.hub-login-panel {
    width: min(420px, 100%);
    margin: 8vh auto 0;
    padding: 32px 28px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.hub-login-panel h2 {
    margin: 18px 0 8px;
    text-align: center;
    font-size: 1.4rem;
}

.hub-login-panel .sub {
    margin: 0 0 22px;
    text-align: center;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.45;
}

.hub-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.hub-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.82rem;
    color: var(--muted);
}

.hub-form input {
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(2, 6, 23, 0.55);
    color: var(--text);
    font-size: 1rem;
}

.hub-form input:focus {
    outline: none;
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.hub-error {
    min-height: 1.2em;
    color: var(--danger);
    font-size: 0.85rem;
    text-align: center;
}

.hub-intro {
    margin: 0 0 22px;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 22px;
}

.project-card {
    position: relative;
    display: block;
    min-height: 220px;
    border-radius: 18px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
    transform: translateY(0);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.45);
    border-color: rgba(245, 158, 11, 0.45);
}

.project-card__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.02);
    transition: transform 0.35s ease;
}

.project-card:hover .project-card__bg {
    transform: scale(1.08);
}

.project-card__shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(2, 6, 23, 0.15) 0%, rgba(2, 6, 23, 0.55) 45%, rgba(2, 6, 23, 0.92) 100%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.2), rgba(15, 23, 42, 0.55));
}

.project-card__body {
    position: relative;
    z-index: 1;
    height: 100%;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px 18px 18px;
}

.project-card__badge {
    align-self: flex-start;
    margin-bottom: auto;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: rgba(245, 158, 11, 0.92);
    color: #111827;
}

.project-card__title {
    margin: 0 0 6px;
    font-size: 1.15rem;
    line-height: 1.25;
    font-weight: 700;
}

.project-card__host {
    margin: 0 0 12px;
    color: #cbd5e1;
    font-size: 0.82rem;
    word-break: break-all;
}

.project-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.86rem;
    font-weight: 700;
    color: #fde68a;
}

.project-card__cta::after {
    content: "→";
    transition: transform 0.2s ease;
}

.project-card:hover .project-card__cta::after {
    transform: translateX(4px);
}

.hub-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--muted);
    border: 1px dashed var(--line);
    border-radius: 14px;
}

.hidden { display: none !important; }

@media (max-width: 720px) {
    .hub-topbar {
        flex-direction: column;
        align-items: flex-start;
    }
    .hub-user {
        width: 100%;
        justify-content: space-between;
    }
}
