:root {
    --bg: #07080F;
    --ink: #F3F4FA;
    --muted: #9AA0BC;
    --line: rgba(255, 255, 255, 0.09);
    --card: rgba(18, 20, 36, 0.72);
    --display: 'Outfit', system-ui, sans-serif;
    --font: 'Inter', system-ui, sans-serif;
    color-scheme: dark;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100dvh;
    font-family: var(--font);
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

[hidden] {
    display: none !important;
}

button {
    font: inherit;
    color: inherit;
    border: none;
    background: none;
    cursor: pointer;
}

:focus-visible {
    outline: 2px solid #F4C95D;
    outline-offset: 3px;
}

/* Slow drifting colour clouds behind everything */
.aurora {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    filter: blur(90px);
    opacity: 0.55;
}

.aurora span {
    position: absolute;
    width: 46vmax;
    height: 46vmax;
    border-radius: 50%;
    animation: drift 26s ease-in-out infinite alternate;
}

.aurora span:nth-child(1) { background: #FF7A2F; top: -18vmax; left: -10vmax; }
.aurora span:nth-child(2) { background: #3A5BFF; top: -10vmax; right: -14vmax; animation-delay: -9s; }
.aurora span:nth-child(3) { background: #9B3AFF; bottom: -24vmax; left: 30vw; animation-delay: -17s; opacity: 0.7; }

@keyframes drift {
    to { transform: translate(8vmax, 6vmax) scale(1.15); }
}

/* Hero */
.hero {
    position: relative;
    max-width: 1180px;
    margin: 0 auto;
    padding: calc(56px + env(safe-area-inset-top, 0px)) 24px 28px;
}

.lang-switch {
    position: absolute;
    top: calc(20px + env(safe-area-inset-top, 0px));
    right: 24px;
    display: flex;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(8px);
}

.lang-switch button {
    min-width: 40px;
    height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
}

.lang-switch button[aria-pressed="true"] {
    background: var(--ink);
    color: var(--bg);
}

/* Who made these: links to the personal site */
.author {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 22px;
    padding: 5px 14px 5px 5px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(8px);
    color: var(--ink);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s;
}

.author:hover {
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.08);
}

.author-mark {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF7A2F, #B388FF);
    font-family: var(--display);
    font-size: 12px;
    font-weight: 800;
    color: #0B0C16;
}

.author-site {
    color: var(--muted);
    font-weight: 500;
}

.eyebrow {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
}

.title {
    margin-top: 10px;
    font-family: var(--display);
    font-size: clamp(56px, 11vw, 124px);
    font-weight: 800;
    line-height: 0.92;
    letter-spacing: -0.03em;
}

.title-accent {
    background: linear-gradient(100deg, #FF7A2F, #F4C95D 30%, #2EC4B6 60%, #B388FF);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: shimmer 8s ease-in-out infinite alternate;
}

@keyframes shimmer {
    to { background-position: 100% 0; }
}

.lead {
    max-width: 560px;
    margin-top: 18px;
    font-size: 18px;
    line-height: 1.55;
    color: var(--muted);
}

.stats {
    margin-top: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 36px;
}

.stats div {
    display: flex;
    flex-direction: column-reverse;
}

.stats dd {
    font-family: var(--display);
    font-size: 44px;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.stats dt {
    margin-top: 4px;
    font-size: 14px;
    color: var(--muted);
}

/* Gallery */
.gallery {
    max-width: 1180px;
    margin: 0 auto;
    padding: 12px 24px 40px;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
}

.filters button {
    height: 38px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    font-size: 14px;
    font-weight: 600;
    color: var(--muted);
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.filters button:hover {
    color: var(--ink);
}

.filters button[aria-selected="true"] {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--bg);
}

.cards {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.card {
    animation: rise 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both;
    animation-delay: calc(var(--i) * 0.06s);
}

@keyframes rise {
    from { opacity: 0; transform: translateY(18px); }
}

.card-link {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: 22px;
    overflow: hidden;
    background: var(--card);
    backdrop-filter: blur(14px);
    color: inherit;
    text-decoration: none;
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.3s, box-shadow 0.3s;
}

.card-link:hover,
.card-link:focus-visible {
    transform: translateY(-6px);
    border-color: color-mix(in srgb, var(--accent) 60%, transparent);
    box-shadow: 0 22px 60px -20px color-mix(in srgb, var(--accent) 55%, transparent), 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent);
    outline: none;
}

.thumb {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #111322;
}

.thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(18, 20, 36, 0.95));
}

.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.card-link:hover .thumb img {
    transform: scale(1.06);
}

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 4px 20px 20px;
    margin-top: -26px;
    position: relative;
}

.badges {
    display: flex;
    gap: 6px;
}

.badge {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(6px);
}

.badge-players {
    background: color-mix(in srgb, var(--accent) 22%, transparent);
    color: color-mix(in srgb, var(--accent) 70%, white);
}

.card h2 {
    font-family: var(--display);
    font-size: 24px;
    font-weight: 700;
    line-height: 1.15;
}

.card-text {
    font-size: 15px;
    line-height: 1.55;
    color: var(--muted);
}

.tags {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
    padding-top: 4px;
}

.tags li {
    padding: 3px 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 12px;
    color: var(--muted);
}

.open {
    align-self: flex-start;
    margin-top: 6px;
    font-weight: 600;
    color: var(--accent);
}

.open span {
    display: inline-block;
    transition: transform 0.3s;
}

.card-link:hover .open span {
    transform: translateX(4px);
}

.footer {
    padding: 10px 24px calc(34px + env(safe-area-inset-bottom, 0px));
    text-align: center;
    font-size: 13px;
    color: var(--muted);
}

.footer a {
    color: var(--ink);
    text-decoration: none;
    border-bottom: 1px solid var(--line);
}

.footer a:hover {
    border-color: var(--ink);
}

@media (max-width: 560px) {
    .hero {
        padding-top: calc(70px + env(safe-area-inset-top, 0px));
    }

    .lead {
        font-size: 16px;
    }

    .cards {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}
