@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
    --bg: #111111;

    --surface: #181818;
    --surface-2: #202020;

    --text: #e7e5e4;
    --muted: #a8a29e;

    --primary: #d7b98e;
    --primary-soft: #ead7bd;

    --accent: #c2a57a;

    --border: #2a2a2a;
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    max-width: 820px;
    margin: 0 auto;

    padding: 4rem 1.5rem;

    background: var(--bg);
    color: var(--text);

    font-family:
        'JetBrains Mono',
        'Fira Code',
        'Cascadia Code',
        monospace;

    font-size: 15px;
    line-height: 1.85;

    text-rendering: optimizeLegibility;
}

/* subtle warm glow */

body::before {
    content: "";

    position: fixed;
    inset: 0;

    background:
        radial-gradient(
            circle at top,
            rgba(215, 185, 142, 0.06),
            transparent 35%
        );

    pointer-events: none;
}

/* typography */

h1 {
    color: var(--primary-soft);

    font-size: 2rem;
    font-weight: 600;

    line-height: 1.2;
    letter-spacing: -1px;

    margin: 0 0 1rem;
}

h2 {
    color: var(--accent);

    font-size: 0.92rem;
    font-weight: 600;

    text-transform: uppercase;
    letter-spacing: 1.4px;

    margin: 3rem 0 1rem;

    opacity: 0.95;
}

h3 {
    color: var(--primary);

    font-size: 1rem;
    font-weight: 600;

    margin: 2rem 0 0.7rem;
}

h4,
h5,
h6 {
    color: var(--text);

    font-weight: 600;

    margin: 1.5rem 0 0.5rem;
}

p {
    margin: 0 0 1.2rem;

    color: var(--text);
}

/* links */

a {
    color: var(--primary);

    text-decoration: none;

    transition:
        color 0.15s ease,
        opacity 0.15s ease;
}

a:hover {
    color: #f2e4cf;
}

/* separator */

hr {
    border: none;
    border-top: 1px solid var(--border);

    margin: 2.5rem 0;
}

/* lists */

ul,
ol {
    padding-left: 0;
    margin: 0 0 1.2rem;

    list-style: none;
}

li {
    margin-bottom: 0.75rem;
}

ul li::before {
    content: "→";

    color: #8a7b65;

    margin-right: 0.7rem;
}

ol {
    counter-reset: item;
}

ol li {
    counter-increment: item;
}

ol li::before {
    content: counter(item) ".";

    color: #8a7b65;

    margin-right: 0.7rem;
}

/* inline code */

code {
    background: rgba(255,255,255,0.04);

    border: 1px solid rgba(255,255,255,0.05);

    color: #f5f5f4;

    padding: 0.18rem 0.45rem;

    border-radius: 6px;

    font-size: 0.9em;
}

/* code blocks */

pre {
    background: var(--surface);

    border: 1px solid rgba(255,255,255,0.06);

    border-radius: 14px;

    padding: 1.3rem;

    overflow-x: auto;

    margin: 1.5rem 0;

    line-height: 1.7;

    box-shadow:
        0 10px 30px rgba(0,0,0,0.22);
}

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

    color: #f5f5f4;
}

/* blockquote */

blockquote {
    margin: 1.5rem 0;

    padding: 0.3rem 0 0.3rem 1rem;

    border-left: 3px solid var(--accent);

    color: var(--muted);
}

blockquote p {
    color: var(--muted);

    margin: 0;
}

/* tables */

table {
    width: 100%;

    border-collapse: collapse;

    margin: 1.5rem 0;
}

th {
    text-align: left;

    color: var(--primary);

    font-weight: 600;

    border-bottom: 1px solid var(--border);

    padding: 0.8rem 0;
}

td {
    padding: 0.8rem 0;

    border-bottom: 1px solid rgba(255,255,255,0.04);

    vertical-align: top;
}

/* emphasis */

strong {
    color: #ffffff;
}

em {
    color: var(--muted);
    font-style: italic;
}

/* media */

img {
    max-width: 100%;
    height: auto;
}

/* optional subtle header */

.header a {
    color: inherit;
    text-decoration: none;
}

/* mobile */

@media (max-width: 600px) {
    body {
        padding: 1.2rem;

        font-size: 18px;
        line-height: 1.9;
    }

    h1 {
        font-size: 2rem;

        margin-bottom: 1rem;
    }

    h2 {
        font-size: 0.95rem;

        margin-top: 2.5rem;
    }

    h3 {
        font-size: 1rem;
    }

    p,
    li {
        font-size: 1rem;
    }

    pre {
        padding: 1rem;

        font-size: 0.95rem;

        border-radius: 12px;
    }

    code {
        font-size: 0.92em;
    }

    table {
        display: block;

        overflow-x: auto;

        white-space: nowrap;
    }
}
