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

:root {
    --accent-yellow: #E5E7A2;
    --text-primary: #e5e5e5;
    --text-secondary: #9ca3af;
    --bg-primary: #0B0B0F;
    --bg-secondary: #1a1a1f;
    --bg-card: #1f1f23;
    --border-color: rgba(55, 65, 81, 0.6);
    --border-subtle: rgba(55, 65, 81, 0.3);
    --code-bg: #2a2a2f;
    --shadow-subtle: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.6);
    --text-on-card: #f3f4f6;
    --text-secondary-on-card: #d1d5db;
    /* Content width for comfortable reading */
    --content-width: 680px;
}

body {
    font-family: 'Rethink Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    font-size: 16px;
    font-weight: 400;
    letter-spacing: -0.01em;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
header {
    padding: 60px 0 40px;
    border-bottom: 1px solid var(--border-color);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Fira Code', monospace;
    font-size: 24px;
    font-weight: 400;
    color: var(--text-primary);
    text-decoration: none;
}

.logo-icon {
    width: 28px;
    height: 28px;
    color: var(--accent-yellow);
}

.nav {
    display: flex;
    gap: 32px;
}

.nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

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

.header-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.social-icons {
    display: flex;
    gap: 16px;
}

.social-icons a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.social-icons a:hover {
    color: var(--text-primary);
}

.social-icons svg {
    display: block;
}

.hero {
    text-align: center;
}

.hero h1 {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.hero p {
    font-size: 20px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    font-weight: 400;
    letter-spacing: -0.01em;
}

/* Main Content */
main {
    padding: 80px 0;
}

/* Page Header */
.page-header {
    text-align: center;
    margin-bottom: 60px;
    padding: 40px 0;
    border-bottom: 1px solid var(--border-color);
}

.page-header h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.page-header p {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 0;
    font-weight: 400;
    letter-spacing: -0.005em;
}

article {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 48px;
    margin-bottom: 48px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-subtle);
    transition: box-shadow 0.3s ease;
}

article:hover {
    box-shadow: var(--shadow-medium);
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary-on-card);
}

.article-tag {
    background: var(--accent-yellow);
    color: #0B0B0F;
    padding: 4px 12px;
    border-radius: 16px;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

h1 {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
    color: var(--text-on-card);
    letter-spacing: -0.02em;
}

h2 {
    font-family: 'Sora', sans-serif;
    font-size: 32px;
    font-weight: 600;
    line-height: 1.25;
    margin-bottom: 16px;
    color: var(--text-on-card);
    letter-spacing: -0.02em;
}

/* Spacing before h2 in article content */
.article-content h2 {
    margin-top: 64px;
}

h3 {
    font-size: 24px;
    font-weight: 600;
    margin: 32px 0 16px;
    color: var(--text-on-card);
    letter-spacing: -0.01em;
}

h4 {
    font-size: 20px;
    font-weight: 600;
    margin: 24px 0 12px;
    color: var(--text-on-card);
    letter-spacing: -0.005em;
}

p {
    margin-bottom: 24px;
    color: var(--text-on-card);
    font-weight: 400;
    letter-spacing: -0.005em;
}

.article-description {
    font-size: 18px;
    color: var(--text-secondary-on-card);
    font-style: italic;
}

.article-content {
    margin-top: 32px;
}

/* Article images */
.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-subtle);
}

.article-content p > img {
    display: block;
    margin: 24px 0;
}

/* Figure with caption */
.article-content figure {
    margin: 32px 0;
}

.article-content figure img {
    margin: 0;
    border: 1px solid rgba(229, 231, 162, 0.2);
}

.article-content figcaption {
    font-size: 13px;
    color: var(--text-secondary-on-card);
    margin-top: 12px;
    text-align: center;
    font-style: italic;
}

/* Decorative dividers - small elegant bars */
.divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 48px 0;
}

.divider::before,
.divider::after {
    content: '';
    height: 2px;
    width: 28px;
    border-radius: 2px;
    background: var(--accent-yellow);
}

.divider-small {
    margin: 32px 0;
}

.divider-small::before,
.divider-small::after {
    width: 20px;
}

/* Code Blocks */
.code-block {
    background: rgba(229, 231, 162, 0.08);
    border: none;
    border-left: 2px solid rgba(229, 231, 162, 0.3);
    border-radius: 6px;
    padding: 20px;
    margin: 32px 0;
    overflow-x: auto;
    position: relative;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(229, 231, 162, 0.2);
}

.code-lang {
    font-size: 12px;
    color: var(--text-secondary-on-card);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.copy-btn {
    background: var(--accent-yellow);
    color: #0B0B0F;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.copy-btn:hover {
    opacity: 0.8;
}

pre {
    font-family: 'IBM Plex Mono', 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-on-card);
    overflow-x: auto;
    font-weight: 400;
}

code {
    font-family: 'IBM Plex Mono', 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 14px;
    font-weight: 500;
}

/* Inline code */
p code, li code, h1 code, h2 code, h3 code, h4 code {
    background: rgba(229, 231, 162, 0.08);
    color: var(--text-on-card);
    padding: 3px 8px;
    margin: 0 2px;
    border-radius: 6px;
    font-size: 0.875em;
    font-weight: 500;
    letter-spacing: 0.01em;
    border-left: 3px solid rgba(229, 231, 162, 0.3);
    white-space: nowrap;
    word-break: keep-all;
    overflow-wrap: normal;
    display: inline;
    vertical-align: baseline;
    line-height: 1.4;
}

/* Terminal-style code block */
.terminal {
    background: rgba(229, 231, 162, 0.08);
    color: var(--text-on-card);
    border: 1.5px solid rgba(229, 231, 162, 0.3);
    border-radius: 6px;
    padding: 20px;
    margin: 32px 0;
    position: relative;
}

.terminal::before {
    content: '';
    position: absolute;
    top: 12px;
    left: 16px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 20px 0 0 #f59e0b, 40px 0 0 #10b981;
}

.terminal pre {
    color: var(--text-on-card);
    margin-top: 20px;
}

.terminal .prompt {
    color: var(--accent-yellow);
}

/* Syntax highlighting */
.keyword { color: #a78bfa; font-weight: 600; }
.string { color: #6ee7b7; }
.comment { color: var(--text-secondary-on-card); font-style: italic; }
.function { color: #93c5fd; }
.number { color: #fbbf24; }

/* Lists */
ul, ol {
    margin: 24px 0;
    padding-left: 32px;
}

li {
    margin-bottom: 8px;
    color: var(--text-on-card);
}

/* Blockquotes */
blockquote {
    border-left: 4px solid var(--accent-yellow);
    padding-left: 24px;
    margin: 32px 0;
    color: var(--text-secondary-on-card);
    font-style: italic;
}

/* Links */
a {
    color: var(--text-on-card);
    text-decoration: underline;
    text-decoration-color: var(--accent-yellow);
    text-underline-offset: 4px;
    text-decoration-thickness: 2px;
    transition: all 0.2s ease;
}

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

.read-more {
    display: inline-block;
    margin-top: 16px;
    font-weight: 600;
    color: var(--accent-yellow);
    text-decoration: none;
}

.read-more:hover {
    color: var(--text-on-card);
}

/* Tags */
.article-tags {
    margin-top: 48px;
    padding-top: 0;
}

.article-tags h4 {
    margin-bottom: 16px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-secondary-on-card);
}

.tag-link {
    display: inline-block;
    background: var(--bg-secondary);
    color: var(--text-secondary-on-card);
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    text-decoration: none;
    margin-right: 8px;
    margin-bottom: 8px;
    transition: background 0.2s ease;
}

.tag-link:hover {
    background: var(--accent-yellow);
    color: #0B0B0F;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 60px 0;
    padding: 24px;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.pagination-prev,
.pagination-next {
    font-weight: 600;
    text-decoration: none;
    color: var(--accent-yellow);
}

.pagination-info {
    color: var(--text-secondary-on-card);
    font-size: 14px;
}

/* Post Navigation */
.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin: 60px 0;
}

.nav-prev,
.nav-next {
    display: block;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    text-decoration: none;
    transition: box-shadow 0.3s ease;
}

.nav-prev:hover,
.nav-next:hover {
    box-shadow: var(--shadow-medium);
}

.nav-next {
    text-align: right;
}

.nav-label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    color: var(--text-secondary-on-card);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 8px;
}

.nav-title {
    display: block;
    font-weight: 600;
    color: var(--text-on-card);
}

/* CTA Section */
.cta {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(229, 231, 162, 0.1) 100%);
    padding: 60px 48px;
    border-radius: 12px;
    text-align: center;
    margin: 60px 0;
    border: 1px solid var(--border-color);
}

.cta h3 {
    margin-bottom: 16px;
    color: var(--text-on-card);
}

.cta p {
    margin-bottom: 32px;
    color: var(--text-secondary-on-card);
}

.btn {
    display: inline-block;
    background: var(--accent-yellow);
    color: #0B0B0F;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    color: #0B0B0F;
    text-decoration: none;
}

/* Footer */
footer {
    border-top: 1px solid var(--border-color);
    padding: 60px 0;
    text-align: center;
    color: var(--text-secondary);
}

.social-links {
    margin-top: 20px;
}

.social-links a {
    margin: 0 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
}

.social-links a:hover {
    color: var(--accent-yellow);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    header {
        padding: 32px 0 24px;
    }

    .header-content {
        flex-direction: column;
        gap: 16px;
        margin-bottom: 24px;
    }

    .header-right {
        gap: 16px;
    }

    .social-icons {
        gap: 12px;
    }

    .hero h1 {
        font-size: 32px;
    }

    .hero p {
        font-size: 16px;
    }

    main {
        padding: 40px 0;
    }

    article {
        padding: 24px 16px;
        margin-bottom: 32px;
    }

    .article-meta {
        flex-wrap: wrap;
        gap: 8px;
        font-size: 10px;
    }

    .article-tag {
        font-size: 10px;
        padding: 3px 8px;
    }

    article h1 {
        font-size: 24px;
        word-break: break-word;
        hyphens: auto;
    }

    h1 {
        font-size: 24px;
    }

    h2 {
        font-size: 20px;
    }

    h3 {
        font-size: 18px;
    }

    .article-description {
        font-size: 16px;
    }

    /* Code blocks */
    pre, code {
        font-size: 12px;
    }

    .highlight, .terminal, .code-block {
        padding: 16px;
        margin: 24px 0;
    }

    /* Inline code - allow wrapping on mobile */
    p code, li code {
        white-space: normal;
        word-break: break-word;
    }

    /* Lists */
    ul, ol {
        padding-left: 24px;
    }

    blockquote {
        padding-left: 16px;
        margin: 24px 0;
    }

    .cta {
        padding: 32px 16px;
    }

    .post-navigation {
        grid-template-columns: 1fr;
    }

    .nav-next {
        text-align: left;
    }

    footer {
        padding: 40px 0;
    }
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

article {
    animation: fadeInUp 0.6s ease-out;
}

/* Hugo syntax highlighting overrides */
.highlight {
    background: rgba(229, 231, 162, 0.08);
    border: none;
    border-left: 2px solid rgba(229, 231, 162, 0.3);
    border-radius: 6px;
    padding: 20px;
    margin: 32px 0;
    overflow-x: auto;
    position: relative;
}

.highlight pre {
    background: transparent;
    margin: 0;
    padding: 0;
    font-family: 'IBM Plex Mono', 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-on-card);
    font-weight: 400;
}

.highlight code {
    background: transparent;
    font-family: 'IBM Plex Mono', 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 14px;
    color: var(--text-on-card);
    font-weight: 500;
}

/* Hugo syntax highlighting colors for dark theme */
.highlight .c { color: #6b7280; font-style: italic; } /* Comment */
.highlight .err { color: #ef4444; } /* Error */
.highlight .k { color: #a78bfa; font-weight: 600; } /* Keyword */
.highlight .l { color: #fbbf24; } /* Literal */
.highlight .n { color: var(--text-on-card); } /* Name */
.highlight .o { color: #f472b6; } /* Operator */
.highlight .p { color: var(--text-on-card); } /* Punctuation */
.highlight .cm { color: #6b7280; font-style: italic; } /* Comment.Multiline */
.highlight .cp { color: #a78bfa; font-weight: 600; } /* Comment.Preproc */
.highlight .c1 { color: #6b7280; font-style: italic; } /* Comment.Single */
.highlight .cs { color: #6b7280; font-style: italic; } /* Comment.Special */
.highlight .gd { color: #ef4444; } /* Generic.Deleted */
.highlight .ge { font-style: italic; } /* Generic.Emph */
.highlight .gi { color: #10b981; } /* Generic.Inserted */
.highlight .gs { font-weight: 600; } /* Generic.Strong */
.highlight .gu { color: #a78bfa; } /* Generic.Subheading */
.highlight .kc { color: #a78bfa; font-weight: 600; } /* Keyword.Constant */
.highlight .kd { color: #a78bfa; font-weight: 600; } /* Keyword.Declaration */
.highlight .kn { color: #a78bfa; font-weight: 600; } /* Keyword.Namespace */
.highlight .kp { color: #a78bfa; font-weight: 600; } /* Keyword.Pseudo */
.highlight .kr { color: #a78bfa; font-weight: 600; } /* Keyword.Reserved */
.highlight .kt { color: #3b82f6; font-weight: 600; } /* Keyword.Type */
.highlight .ld { color: #6ee7b7; } /* Literal.Date */
.highlight .m { color: #fbbf24; } /* Literal.Number */
.highlight .s { color: #6ee7b7; } /* Literal.String */
.highlight .na { color: #3b82f6; } /* Name.Attribute */
.highlight .nb { color: #93c5fd; } /* Name.Builtin */
.highlight .nc { color: #3b82f6; font-weight: 600; } /* Name.Class */
.highlight .no { color: #ef4444; } /* Name.Constant */
.highlight .nd { color: #f472b6; } /* Name.Decorator */
.highlight .ni { color: #f472b6; } /* Name.Entity */
.highlight .ne { color: #ef4444; font-weight: 600; } /* Name.Exception */
.highlight .nf { color: #93c5fd; font-weight: 600; } /* Name.Function */
.highlight .nl { color: #f472b6; } /* Name.Label */
.highlight .nn { color: #3b82f6; } /* Name.Namespace */
.highlight .nx { color: var(--text-on-card); } /* Name.Other */
.highlight .py { color: var(--text-on-card); } /* Name.Property */
.highlight .nt { color: #f472b6; font-weight: 600; } /* Name.Tag */
.highlight .nv { color: #ef4444; } /* Name.Variable */
.highlight .ow { color: #a78bfa; font-weight: 600; } /* Operator.Word */
.highlight .w { color: var(--text-on-card); } /* Text.Whitespace */
.highlight .mb { color: #fbbf24; } /* Literal.Number.Bin */
.highlight .mf { color: #fbbf24; } /* Literal.Number.Float */
.highlight .mh { color: #fbbf24; } /* Literal.Number.Hex */
.highlight .mi { color: #fbbf24; } /* Literal.Number.Integer */
.highlight .mo { color: #fbbf24; } /* Literal.Number.Oct */
.highlight .sa { color: #6ee7b7; } /* Literal.String.Affix */
.highlight .sb { color: #6ee7b7; } /* Literal.String.Backtick */
.highlight .sc { color: #6ee7b7; } /* Literal.String.Char */
.highlight .dl { color: #6ee7b7; } /* Literal.String.Delimiter */
.highlight .sd { color: #6b7280; font-style: italic; } /* Literal.String.Doc */
.highlight .s2 { color: #6ee7b7; } /* Literal.String.Double */
.highlight .se { color: #fbbf24; } /* Literal.String.Escape */
.highlight .sh { color: #6ee7b7; } /* Literal.String.Heredoc */
.highlight .si { color: #fbbf24; } /* Literal.String.Interpol */
.highlight .sx { color: #6ee7b7; } /* Literal.String.Other */
.highlight .sr { color: #10b981; } /* Literal.String.Regex */
.highlight .s1 { color: #6ee7b7; } /* Literal.String.Single */
.highlight .ss { color: #10b981; } /* Literal.String.Symbol */
.highlight .bp { color: #93c5fd; } /* Name.Builtin.Pseudo */
.highlight .fm { color: #93c5fd; font-weight: 600; } /* Name.Function.Magic */
.highlight .vc { color: #ef4444; } /* Name.Variable.Class */
.highlight .vg { color: #ef4444; } /* Name.Variable.Global */
.highlight .vi { color: #ef4444; } /* Name.Variable.Instance */
.highlight .vm { color: #ef4444; } /* Name.Variable.Magic */
