/* ===== Colors and sizes — change these to restyle the whole site ===== */
:root {
    --background: #ffffff;
    --text: #222222;
    --muted: #666666;
    --accent: #2a6fdb;     /* links and highlights */
    --code-bg: #f4f4f4;
    --border: #dddddd;
    --max-width: 720px;    /* how wide the text column is */
}

/* ===== Page ===== */
body {
    margin: 0;
    padding: 0 16px;
    background: var(--background);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 18px;
    line-height: 1.6;
}

/* Keeps content centered and readable */
main {
    max-width: var(--max-width);
    margin: 40px auto;
}

/* ===== Navigation bar ===== */
nav {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

nav a {
    margin-right: 16px;
    text-decoration: none;
    color: inherit;
}

/* ===== Headings ===== */
h1 {
    line-height: 1.3;
    margin-top: 1.5em;
    border-bottom: 1px solid var(--border);
}

h2, h3 {
    line-height: 1.3;
    margin-top: 1.5em;
}

/* ===== Links ===== */
a {
    color: var(--accent);
}

a:hover {
    text-decoration: underline;
}

/* ===== Images ===== */
img {
    max-width: 100%;   /* never wider than the page */
    height: auto;
    border-radius: 6px;
}

/* ===== Code ===== */
code {
    background: var(--code-bg);
    padding: 2px 5px;
    border-radius: 4px;
    font-size: 0.9em;
}

pre {
    background: var(--code-bg);
    padding: 12px;
    border-radius: 6px;
    overflow-x: auto;   /* scroll long lines instead of breaking layout */
}

pre code {
    padding: 0;
    background: none;
}

/* ===== Quotes ===== */
blockquote {
    margin: 0;
    padding-left: 16px;
    border-left: 4px solid var(--border);
    color: var(--muted);
}

/* ===== Footer ===== */
footer {
    max-width: var(--max-width);
    margin: 40px auto;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.9em;
}

.card {
    display: block;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    color: inherit;
    text-decoration: none;
}

.cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.card:hover {
    background: #f5f5f5;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
}

.card-header h2 {
    margin: 0;
}

.card-header time {
    white-space: nowrap;
}