/* ============================================================
   Base reset & box model
   ============================================================ */

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

/* ============================================================
   Color system (Light by default)
   ============================================================ */

:root {
    --bg: #ffffff;
    --fg: #111111;
    --muted: #555555;
    --border: #dddddd;
    --link: #111111;
    --link-hover: #000000;
}

/* ============================================================
   Dark mode (system preference)
   ============================================================ */

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0e0e0e;
        --fg: #e6e6e6;
        --muted: #aaaaaa;
        --border: #333333;
        --link: #e6e6e6;
        --link-hover: #ffffff;
    }
}

/* ============================================================
   Root typography & page
   ============================================================ */

html {
    font-size: 18px;
    background-color: var(--bg);
    color: var(--fg);
}

ody {
    font-family: system-ui, -apple-system, BlinkMacSystemFont,
                 "Segoe UI", Helvetica, Arial, sans-serif;
    line-height: 1.75;
    font-weight: 400;
    min-height: 100vh;

    /* Better text rendering */
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}


/* ============================================================
   Header (navigation only, no hero)
   ============================================================ */

.header {
    margin: 0;
    padding: 0;
}

/* ============================================================
   Navigation
   ============================================================ */

.nav {
    max-width: 720px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
}

.nav-home {
    font-weight: 600;
    font-size: 1.05rem;
    border-bottom: none;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 1.2rem;
}

.nav-links a {
    font-size: 0.95rem;
    color: var(--muted);
    border-bottom: 1px solid transparent;
}

.nav-links a:hover {
    color: var(--fg);
    border-bottom-color: currentColor;
}

.nav-links a,
.post-meta,
.footer {
    font-weight: 500;
}

/* ============================================================
   Main content container
   ============================================================ */

.container {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
    padding: 1.5rem 1.5rem 2rem;
}

/* ============================================================
   Sections
   ============================================================ */

section {
    margin-top: 2rem;
}

section:first-of-type {
    margin-top: 1.5rem;
}

section h2 {
    font-size: 1.6rem;
    font-weight: 600;
    border-bottom: 2px solid var(--border);
    padding-bottom: 0.3rem;
    margin-bottom: 1rem;
}

/* ============================================================
   Text elements
   ============================================================ */

p {
    margin-bottom: 1rem;
}

a {
    color: var(--link);
    text-decoration: none;
    border-bottom: 1px dashed currentColor;
    padding-bottom: 2px;
}

a:hover {
    color: var(--link-hover);
    border-bottom-style: solid;
}

/* ============================================================
   Articles list
   ============================================================ */

.articles-list {
    list-style: none;
    margin-top: 0.5rem;
}

.articles-list li {
    margin-bottom: 0.7rem;
}

/* ============================================================
   Footer
   ============================================================ */

.footer {
    max-width: 720px;
    margin: 3rem auto 1.5rem;
    padding: 0 1.5rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--muted);
}

/* ============================================================
   Mobile adjustments
   ============================================================ */

@media (max-width: 600px) {
    html {
        font-size: 17px;
    }

    .nav {
        flex-direction: column;
        gap: 0.6rem;
    }

    .nav-links {
        gap: 0.9rem;
    }
}

/* ============================================================
   Dark-mode typography tuning
   ============================================================ */

@media (prefers-color-scheme: dark) {
    html {
        line-height: 1.7;
    }
}

/* ============================================================
   Article page
   ============================================================ */

.post {
    margin-top: 1.5rem;
}

/* Header */

.post-header {
    margin-bottom: 2rem;
}

.post-title {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

.post-meta {
    font-size: 0.95rem;
    color: var(--muted);
}

/* Content */

.post-content {
    font-size: 1.05rem;
    line-height: 1.8;
}

.post-content p {
    margin-bottom: 1.2rem;
}

.post-title {
    font-weight: 700;
	letter-spacing: -0.01em;
}

section h2,
.post-content h2 {
    font-weight: 600;
}

/* Headings */

.post-content h2 {
    font-size: 1.6rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.post-content h3 {
    font-size: 1.3rem;
    margin-top: 2rem;
    margin-bottom: 0.8rem;
}


/* Blockquotes */

.post-content blockquote {
    border-left: 3px solid var(--border);
    padding-left: 1rem;
    margin: 1.5rem 0;
    color: var(--muted);
}

/* Lists */

.post-content ul,
.post-content ol {
    margin: 1rem 0 1.5rem 1.5rem;
}

.post-content li {
    margin-bottom: 0.4rem;
}

/* Links inside articles */

.post-content a {
    border-bottom-style: solid;
}

pre.chroma {
    max-width: 100%;
    overflow-x: auto !important;
}

/* Code blocks */
pre.chroma {
    tab-size: 4;
    -moz-tab-size: 4;
	font-size: 0.82rem;
    line-height: 1.45;
}

pre.chroma > code {
    display: block;
}

.chroma .line {
    padding-left: 0;
}

.chroma .cl {
    padding-left: 0;
}
