:root {
    --text: #111827;
    --muted: #6b7280;
    --bg: #ffffff;
    --border: #e5e7eb;
    --accent: #ef4444;
}

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

body {
    font-family:
        Inter,
        system-ui,
        -apple-system,
        sans-serif;
    color: var(--text);
    background: var(--bg);
}

/* Header */

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 72ch;
    margin: 0 auto;
    padding: 1.5rem 1.25rem;
}

header .logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    font-size: 0.95rem;
}

header .logo:hover {
    color: var(--accent);
}

header .logo img {
    flex-shrink: 0;
}

header nav a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.875rem;
}

header nav a:hover {
    color: var(--text);
}

/* Article */

article {
    max-width: 72ch;
    margin: 0 auto;
    padding: 1rem 1.25rem 4rem;
    line-height: 1.7;
}

article h1 {
    font-size: 2.25rem;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

article h2 {
    font-size: 1.5rem;
    margin-top: 3rem;
    margin-bottom: 0.75rem;
}

article p {
    color: var(--muted);
    margin-bottom: 1.25rem;
}

article img {
    display: block;
    max-width: 100%;
    max-height: 480px;
    height: auto;
    margin: 2rem auto;
    border-radius: 10px;
    border: 1px solid var(--border);
}

article a {
    color: var(--accent);
    text-decoration: none;
}

article a:hover {
    text-decoration: underline;
}

/* Post list (index page) */

.post-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.post-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.post-item:last-child {
    border-bottom: none;
}

.post-link {
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
}

.post-link:hover {
    color: var(--accent);
}

.post-item time {
    font-size: 0.85rem;
    color: var(--muted);
}

/* Table */

article table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9rem;
}

article th,
article td {
    text-align: left;
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--border);
}

article th {
    font-weight: 600;
    color: var(--text);
}

article td {
    color: var(--muted);
}

/* Code */

article code {
    background: #f3f4f6;
    padding: 0.15rem 0.35rem;
    border-radius: 4px;
    font-size: 0.875em;
}

article pre {
    background: #f3f4f6;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

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

/* Lists inside articles */

article ul,
article ol {
    color: var(--muted);
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
}

article li {
    margin-bottom: 0.35rem;
}
