:root {
    /* Colors */
    --text-primary: #000;
    --text-muted: #999;
    --text-secondary: #333;
    --link-blue: #0066cc;
    --bg-primary: #fff;
    --bg-code: #f5f5f5;
    --border-light: #eee;
    --border-primary: #ddd;

    /* Spacing Scale - Based on 4px (0.25rem) increments */
    --space-xs: 0.25rem;    /* 4px */
    --space-sm: 0.5rem;     /* 8px */
    --space-md: 0.75rem;    /* 12px */
    --space-lg: 1rem;       /* 16px */
    --space-xl: 1.5rem;     /* 24px */
    --space-2xl: 2rem;      /* 32px */
    --space-3xl: 3rem;      /* 48px */
    --space-4xl: 4rem;      /* 64px */
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    max-width: 700px;
    margin: 0 auto;
    padding: var(--space-3xl) var(--space-2xl);
}

header {
/*    border-bottom: 1px solid var(--text-primary);*/
    padding-bottom: var(--space-xl);
}

h1 {
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin: var(--space-lg) 0 var(--space-md) 0;
}

h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin: var(--space-4xl) 0 var(--space-xl) 0;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: var(--space-3xl) 0 var(--space-lg) 0;
    line-height: 1.3;
}

h4 {
    font-size: 1.3rem;
    font-weight: 600;
    margin: var(--space-2xl) 0 var(--space-md) 0;
    line-height: 1.4;
}

h5 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: var(--space-lg) 0 0.125rem 0;
    line-height: 1.4;
}

h6 {
    font-size: 1rem;
    font-weight: 600;
    margin: var(--space-lg) 0 var(--space-sm) 0;
    line-height: 1.5;
}

p {
    margin-bottom: var(--space-2xl);
    font-weight: normal;
}

a {
    color: var(--link-blue);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.125rem;
}

.article-item {
    margin-bottom: var(--space-xs);
}

.article-link {
    display: inline-flex;
    align-items: baseline;
    gap: var(--space-lg);
    text-decoration: none;
    color: var(--text-primary);
    padding: var(--space-xs) 0;
    position: relative;
}


.article-link:hover .article-title {
    text-decoration: underline;
}



.article-date {
    font-size: 0.875rem;
    color: var(--text-muted);
    min-width: 140px;
    flex-shrink: 0;
}

.article-title {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-primary);
}

.article-meta {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
}

.article-content {
    max-width: 100%;
}

.article-content img {
    max-width: 100%;
    height: auto;
    margin: var(--space-lg) 0;
    cursor: pointer;
    transition: opacity 0.2s;
}

.article-content img:hover {
    opacity: 0.9;
}

.image-fullscreen-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(8px);
    z-index: 9999;
    cursor: zoom-out;
    align-items: center;
    justify-content: center;
}

.image-fullscreen-overlay.active {
    display: flex;
}

.image-fullscreen-overlay img {
    max-width: 95vw;
    max-height: 95vh;
    width: auto;
    height: auto;
    object-fit: contain;
    cursor: zoom-out;
    margin: 0;
}

.article-content pre {
    background-color: var(--bg-code);
    padding: var(--space-xl);
    overflow-x: auto;
    border: 1px solid var(--border-primary);
    margin: var(--space-2xl) 0;
    line-height: 1.5;
}

.article-content code {
    background-color: #e8e8e8;
    color: #333;
    padding: 0.125rem 0.5rem;
    border-radius: 0.5rem;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.875rem;
}

.article-content pre code {
    background-color: transparent;
    padding: 0;
}

.article-content blockquote {
    border-left: 0.1875rem solid var(--text-primary);
    padding-left: var(--space-xl);
    margin: var(--space-2xl) 0;
    font-style: italic;
}

.article-content ul,
.article-content ol {
    margin: var(--space-xl) 0;
    padding-left: var(--space-xl);
    list-style-position: outside;
}

.article-content li {
    margin-bottom: var(--space-sm);
    font-weight: normal;
}

.back-link {
    margin-bottom: var(--space-3xl);
    display: inline-block;
    text-decoration: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    padding: 0;
}

.back-link:hover {
    text-decoration: underline;
}

.header-links {
    display: flex;
    gap: var(--space-lg);
    margin-top: 0rem;
}

.header-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.header-links a:hover {
    text-decoration: underline;
    color: var(--text-primary);
}

@media (max-width: 600px) {
    body {
        padding: var(--space-2xl) var(--space-lg);
    }

    h1 {
        font-size: 1.75rem;
    }

    .article-link {
        flex-direction: column;
        gap: 0.1rem;
    }

    .article-date {
        min-width: auto;
        font-size: 0.8rem;
    }

    .article-title {
        font-size: 0.95rem;
    }

    .article-content pre {
        padding: var(--space-lg);
        margin: var(--space-xl) 0;
    }
}