

:root {
    --bg:       #1a2220;
    --bg-alt:   #1e2824;
    --bg-card:  #222d29;
    --border:   #2b3d34;
    --text:     #92b492;
    --muted:    #5b7868;
    --bright:   #aed1a7;
    --link:     #c07870;
    --hover:    #d88e82;
    --code-bg:  #162020;
    --tag-bg:   #253330;
}

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

html { height: 100%; }

body {
    background-color: var(--bg);
    background-image: repeating-linear-gradient(
        0deg,
        transparent 0px,
        transparent 3px,
        rgba(0, 0, 0, 0.025) 3px,
        rgba(0, 0, 0, 0.025) 4px
    );
    color: var(--text);
    font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
    font-size: 13px;
    line-height: 1.75;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    border-bottom: 1px solid var(--border);
    padding: 11px 48px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    background-color: var(--bg);
    z-index: 10;
}

.site-title {
    color: var(--bright);
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    letter-spacing: 0.8px;
    margin-right: 40px;
    flex-shrink: 0;
}

.site-title:hover {
    color: var(--hover);
    text-decoration: none;
}

nav {
    display: flex;
    gap: 24px;
    align-items: center;
}

nav a {
    color: var(--muted);
    text-decoration: none;
    letter-spacing: 0.2px;
    transition: color 0.1s;
}

nav a:hover,
nav a.active {
    color: var(--link);
    text-decoration: none;
}

.header-end {
    margin-left: auto;
}

main {
    flex: 1;
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    padding: 52px 48px;
}

h1 {
    color: var(--bright);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 28px;
    letter-spacing: 0.4px;
}

h2 {
    color: var(--bright);
    font-size: 13px;
    font-weight: 700;
    margin-top: 40px;
    margin-bottom: 18px;
    letter-spacing: 0.5px;
}

h3 {
    color: var(--bright);
    font-size: 13px;
    font-weight: 700;
    margin-top: 24px;
    margin-bottom: 10px;
}

p {
    margin-bottom: 14px;
    max-width: 68ch;
}

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

a:hover {
    color: var(--hover);
    text-decoration: underline;
}

.section-intro {
    margin-bottom: 8px;
    max-width: 68ch;
}

.section-intro p {
    color: var(--text);
}

.code-block {
    display: inline-block;
    background: var(--code-bg);
    border: 1px solid var(--border);
    padding: 10px 18px;
    margin: 20px 0;
    color: var(--muted);
    font-size: 12px;
}

.tag {
    display: inline-block;
    background: var(--tag-bg);
    color: var(--text);
    font-size: 11px;
    padding: 1px 7px;
}

.post-list {
    list-style: none;
}

.post-item {
    padding-bottom: 24px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

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

a.post-title {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--link);
    margin-bottom: 6px;
}

a.post-title:hover {
    color: var(--hover);
    text-decoration: none;
}

.post-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 11px;
    margin-bottom: 6px;
}

.post-desc {
    font-size: 12px;
    color: var(--muted);
    max-width: 64ch;
    line-height: 1.6;
}

.more-link {
    display: inline-block;
    margin-top: 22px;
    color: var(--muted);
    font-size: 12px;
    text-decoration: none;
}

.more-link:hover {
    color: var(--link);
    text-decoration: none;
}

.post-header {
    margin-bottom: 40px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--border);
}

.post-header h1 {
    margin-bottom: 10px;
}

.post-content p {
    margin-bottom: 16px;
    max-width: 68ch;
}

.post-content h2 {
    margin-top: 36px;
    margin-bottom: 14px;
}

.post-content h3 {
    margin-top: 24px;
    margin-bottom: 10px;
}

.post-content ul,
.post-content ol {
    padding-left: 20px;
    margin-bottom: 16px;
    max-width: 64ch;
}

.post-content li {
    margin-bottom: 5px;
    padding-left: 4px;
}

.post-content code {
    background: var(--code-bg);
    border: 1px solid var(--border);
    padding: 0px 5px;
    font-size: 12px;
    color: var(--text);
}

.post-content pre {
    background: var(--code-bg);
    border: 1px solid var(--border);
    padding: 14px 18px;
    margin: 20px 0;
    overflow-x: auto;
    font-size: 12px;
    line-height: 1.65;
    color: var(--muted);
    max-width: 72ch;
}

.post-content pre code {
    background: none;
    border: none;
    padding: 0;
    font-size: inherit;
}

.post-content blockquote {
    border-left: 3px solid var(--border);
    padding-left: 18px;
    margin: 20px 0;
    color: var(--muted);
    font-style: italic;
}

.post-content hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 32px 0;
}

.back-link {
    display: inline-block;
    margin-top: 40px;
    color: var(--muted);
    font-size: 12px;
    text-decoration: none;
}

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

footer {
    border-top: 1px solid var(--border);
    padding: 14px 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--muted);
    font-size: 11px;
    flex-wrap: wrap;
    gap: 10px;
}

footer a {
    color: var(--muted);
    text-decoration: none;
}

footer a:hover {
    color: var(--link);
}

.footer-left,
.footer-right {
    flex: 1;
}

.footer-right {
    text-align: right;
}

@media (max-width: 640px) {
    header {
        padding: 10px 20px;
        flex-wrap: wrap;
        gap: 8px;
    }

    .site-title {
        margin-right: 0;
        width: 100%;
    }

    main {
        padding: 32px 20px;
    }

    footer {
        padding: 14px 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
}
