/* Post article container. */
.post-article {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0 auto;
    padding: 0 28px 100px;
}

/* Post header. */
.post-header {
    padding: 48px 0 40px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 48px;
    animation: fade-up 0.4s ease both;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 32px;
    transition: color 0.15s;
}

.back-link:hover {
    color: var(--post-color, var(--accent));
}

.post-tags {
    margin-bottom: 16px;
}

.post-tag {
    border-color: var(--post-color, var(--accent));
    color: var(--post-color, var(--accent));
    background: transparent;
}

.post-heading {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.025em;
    color: var(--white);
    margin-bottom: 14px;
}

.post-date {
    font-family: var(--mono);
    font-size: 13px;
    letter-spacing: 0.02em;
    color: var(--text-muted);
}

/* Post body. */
.post-content {
    font-size: 15px;
    line-height: 1.85;
    color: var(--text);
    animation: fade-up 0.5s ease 0.1s both;
}

.post-content h2 {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--white);
    margin: 48px 0 16px;
}

.post-content h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--white);
    margin: 36px 0 12px;
}

.post-content p {
    margin-bottom: 20px;
}

.post-content a {
    color: var(--post-color, var(--accent));
    text-decoration: underline;
    text-underline-offset: 2px;
}

.post-content a:hover {
    color: var(--white);
}

.post-content strong {
    color: var(--white);
    font-weight: 600;
}

.post-content em {
    color: var(--text-muted);
}

/* Inline code. */
.post-content code {
    font-family: var(--mono);
    font-size: 13px;
}

.post-content :not(pre) > code {
    background: rgba(97, 175, 239, 0.08);
    border: 1px solid rgba(97, 175, 239, 0.2);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.87em;
    color: #61afef;
}

/* Code blocks. */
.post-content pre {
    margin: 24px 0;
    padding: 20px 24px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: auto;
    max-height: 480px;
    line-height: 1.65;
    scrollbar-width: thin;
    scrollbar-color: var(--border-hover) transparent;
}

/* Scrollbar styling. */
.post-content pre::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.post-content pre::-webkit-scrollbar-track {
    background: transparent;
}

.post-content pre::-webkit-scrollbar-thumb {
    background: var(--border-hover);
    border-radius: 3px;
}

.post-content pre::-webkit-scrollbar-thumb:hover {
    background: var(--text-subtle);
}

.post-content pre::-webkit-scrollbar-corner {
    background: transparent;
}

/* Rouge syntax highlighting — One Dark theme. */
.highlight .c,
.highlight .cm,
.highlight .c1,
.highlight .cs {
    color: #5c6370;
    font-style: italic;
} /* Comments. */
.highlight .k,
.highlight .kc,
.highlight .kd,
.highlight .kn,
.highlight .kp,
.highlight .kr {
    color: #c678dd;
} /* Keywords. */
.highlight .kt {
    color: #e5c07b;
} /* Keyword type. */
.highlight .s,
.highlight .sb,
.highlight .sc,
.highlight .sd,
.highlight .s2,
.highlight .sh,
.highlight .s1 {
    color: #98c379;
} /* Strings. */
.highlight .si {
    color: #98c379;
} /* String interpolation. */
.highlight .se {
    color: #d19a66;
} /* String escape. */
.highlight .sr {
    color: #98c379;
} /* Regex. */
.highlight .sx {
    color: #98c379;
} /* String other. */
.highlight .ss {
    color: #98c379;
} /* Symbol. */
.highlight .na {
    color: #e5c07b;
} /* Name attribute. */
.highlight .nb {
    color: #e5c07b;
} /* Name builtin. */
.highlight .nc {
    color: #e5c07b;
} /* Name class. */
.highlight .nd {
    color: #61afef;
} /* Name decorator. */
.highlight .nf,
.highlight .fm {
    color: #61afef;
} /* Name function. */
.highlight .ni {
    color: #d19a66;
} /* Name entity. */
.highlight .nn {
    color: #e5c07b;
} /* Name namespace. */
.highlight .no {
    color: #d19a66;
} /* Name constant. */
.highlight .n {
    color: #abb2bf;
} /* Name. */
.highlight .ne {
    color: #e06c75;
} /* Name exception. */
.highlight .nl {
    color: #e06c75;
} /* Name label. */
.highlight .nt {
    color: #e06c75;
} /* Name tag. */
.highlight .nv,
.highlight .vi,
.highlight .vg,
.highlight .vc {
    color: #e06c75;
} /* Variables. */
.highlight .o,
.highlight .ow {
    color: #56b6c2;
} /* Operators. */
.highlight .p {
    color: #abb2bf;
} /* Punctuation. */
.highlight .mi,
.highlight .mf,
.highlight .mh,
.highlight .mo,
.highlight .mb,
.highlight .mx,
.highlight .il {
    color: #d19a66;
} /* Numbers. */
.highlight .cp,
.highlight .cpf {
    color: #5c6370;
} /* Preprocessor. */
.highlight .gh {
    color: #e06c75;
    font-weight: 600;
} /* Generic heading. */
.highlight .gd {
    color: #e06c75;
} /* Generic deleted. */
.highlight .gi {
    color: #98c379;
} /* Generic inserted. */
.highlight .ge {
    font-style: italic;
} /* Generic emphasis. */
.highlight .gs {
    font-weight: 600;
} /* Generic strong. */
.highlight .err {
    color: #e06c75;
} /* Error. */
.highlight .w {
    color: #abb2bf;
} /* Whitespace. */

/* Blockquotes. */
.post-content blockquote {
    border-left: 3px solid var(--post-color, var(--accent));
    padding: 12px 20px;
    margin: 24px 0;
    color: var(--text-muted);
    background: var(--post-color-dim, rgba(123, 97, 255, 0.03));
    border-radius: 0 6px 6px 0;
}

.post-content blockquote p:last-child {
    margin-bottom: 0;
}

/* Lists. */
.post-content ul,
.post-content ol {
    margin: 16px 0 20px;
    padding-left: 24px;
}

.post-content li {
    margin-bottom: 8px;
}

/* Tables. */
.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 14px;
}

.post-content th,
.post-content td {
    padding: 10px 14px;
    border: 1px solid var(--border);
    text-align: left;
}

.post-content th {
    background: rgba(255, 255, 255, 0.03);
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--white);
}

/* Horizontal rule. */
.post-content hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 40px 0;
}

/* Images. */
.post-content img {
    max-width: 100%;
    border-radius: 8px;
    border: 1px solid var(--border);
    margin: 24px 0;
}

/* Coming soon state. */
.coming-soon {
    text-align: center;
    padding: 80px 20px;
    font-family: var(--mono);
    font-size: 13px;
    color: var(--text-subtle);
}

/* Mobile. */
@media (max-width: 580px) {
    .post-article {
        padding: 0 16px 80px;
    }

    .post-heading {
        font-size: 24px;
    }

    .post-header {
        padding: 32px 0 28px;
        margin-bottom: 32px;
    }

    .post-content pre {
        padding: 14px 16px;
        margin-left: -16px;
        margin-right: -16px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
}
