/* =====================
   ABrevik.net theme
   Matches ludo.abrevik.net (Ludography) exactly.
   Same variables, same top bar, same restraint.
   All colors go through the variables — no hard-coded hex in rules.
===================== */

:root {
    --bg: #fff;
    --text: #333;
    --muted: #777;
    --border: #ddd;
    --chip-bg: #fff;
    --chip-border: #ccd;
    --accent: #0066cc;
    --tag-bg: #e4e9f0;
    --tag-text: #445;
}

html.theme-dark {
    --bg: #1c1c1c;
    --text: #d6d6d6;
    --muted: #9a9a9a;
    --border: #444;
    --chip-bg: #2a2a2a;
    --chip-border: #555;
    --accent: #6aa9ff;
    --tag-bg: #333;
    --tag-text: #bbb;
}

body {
    font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    margin: 0 auto;
    padding: 20px;
    max-width: 800px;
    color: var(--text);
    background-color: var(--bg);
}

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

/* =====================
   TOP BAR
===================== */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9em;
}

.back-link {
    color: var(--muted);
    text-decoration: none;
}

.back-link:hover {
    text-decoration: underline;
}

.theme-toggle {
    margin-left: auto;
    border: 1px solid var(--chip-border);
    border-radius: 4px;
    background-color: var(--chip-bg);
    color: var(--text);
    cursor: pointer;
    font-size: 1em;
    padding: 2px 8px;
}

/* =====================
   HEADER
===================== */
header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    font-size: 2em;
    margin-bottom: 30px;
}

h2 {
    color: var(--text);
    margin-bottom: 10px;
}

.description {
    margin: 0 0 20px;
}

/* =====================
   LISTS
===================== */
.link-list {
    list-style: disc;
    padding-left: 25px;
    margin: 0 0 20px;
}

.link-list li {
    margin: 4px 0;
}

/* =====================
   SOCIAL MENU (home)
   Menu row above the header. Entries come from about.json
   "social" — currently Confoxing, Bluesky, Itch.io, Steam,
   LinkedIn, Blog, Ludography. Chip style as on Ludography:
   1px --chip-border border, 4px radius, muted text.
===================== */
.social-menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
}

.social-menu a {
    display: inline-block;
    padding: 1px 8px;
    border: 1px solid var(--chip-border);
    border-radius: 4px;
    background-color: var(--chip-bg);
    color: var(--muted);
    font-size: 0.9em;
    text-decoration: none;
}

.social-menu a:hover {
    color: var(--text);
    border-color: var(--muted);
}

/* =====================
   PROJECT CARDS
   1px border, 4px radius, no shadow, image fills the card top,
   hover state is only the border changing to the accent color.
===================== */
.card-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 0 0 20px;
}

.card {
    display: block;
    border: 1px solid var(--border);
    border-radius: 4px;
    text-decoration: none;
    color: var(--text);
}

.card:hover,
.card:focus-visible {
    border-color: var(--accent);
}

.card img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 3px 3px 0 0;
}

.card-body {
    padding: 12px;
}

.card-body h2 {
    margin: 0 0 6px;
}

.card-body p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9em;
}

.card.featured {
    margin: 0 0 20px;
}

@media (max-width: 600px) {
    .card-list {
        grid-template-columns: 1fr;
    }
}

/* =====================
   PROJECT PAGE
===================== */
.meta-list {
    margin: 0 0 20px;
}

.meta-list p {
    color: var(--muted);
    font-size: 0.9em;
    margin: 0;
}

.content {
    margin: 0 0 20px;
}

.content img {
    max-width: 100%;
}

/* =====================
   SCREENSHOTS (as on the Ludography site)
===================== */
.screenshots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}

.screenshots a {
    display: block;
}

.screenshots img {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 4px;
}

.screenshots a:hover img {
    border-color: var(--accent);
}