:root {
    color-scheme: dark;
    --bg: #0e1013;
    --panel: #171a1f;
    --panel-hover: #1c2026;
    --border: #272b33;
    --text: #e6e3dc;
    --muted: #9a9890;
    --accent: #f2b84b;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent);
}

/* Header */

.topbar {
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 20px 16px;
}

.wordmark {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--text);
    text-decoration: none;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.wordmark img {
    /* the "!" is narrow; pull the text in toward it */
    margin: 0 -4px 0 -6px;
}

.wordmark .core {
    color: var(--accent);
}

/* Page */

.page {
    flex: 1;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 0 16px 64px;
}

.intro {
    padding: 56px 0 48px;
    max-width: 640px;
}

.intro h1 {
    margin: 0 0 16px;
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

.intro p {
    margin: 0;
    color: var(--muted);
    font-size: 1.1rem;
}

.section-label {
    margin: 0 0 16px;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Tiles */

.tiles {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.tile {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    color: var(--text);
    text-decoration: none;
    transition: border-color 150ms ease, background-color 150ms ease, transform 150ms ease;
}

.tile:hover {
    background: var(--panel-hover);
    border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
    transform: translateY(-2px);
}

.tile:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.tile-art {
    aspect-ratio: 16 / 7;
    display: grid;
    place-items: center;
    background-size: cover;
    background-position: center;
    box-shadow: inset 0 -1px 0 var(--border);
}

.tile-art img {
    max-width: 60%;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.8));
}

.tile-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 18px 20px 20px;
}

.tile-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--muted);
    font-size: 0.85rem;
}

.tag {
    padding: 2px 8px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 14%, transparent);
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 600;
}

.tile h3 {
    margin: 8px 0 6px;
    font-size: 1.25rem;
}

.tile p {
    margin: 0 0 16px;
    color: var(--muted);
    font-size: 0.95rem;
}

.tile-link {
    margin-top: auto;
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 600;
}

/* Footer */

.footer {
    border-top: 1px solid var(--border);
    padding: 24px 16px;
    text-align: center;
    color: var(--muted);
    font-size: 0.8rem;
}

.footer p {
    max-width: 640px;
    margin: 0 auto;
}

@media (prefers-reduced-motion: reduce) {
    .tile {
        transition: none;
    }
    .tile:hover {
        transform: none;
    }
}
