/* Blog-specific styles — rendered markdown in terminal theme */

/* Constrain blog grid items to viewport */
#blog-list,
#blog-reader {
    max-width: 800px;
    box-sizing: border-box;
}

#blog-reader .md {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

/* Article list — description text under each link */
.blog-desc {
    font-size: 0.8em;
    color: rgba(51, 255, 0, 0.5);
    margin-top: 4px;
    padding-left: 3ch; /* align under title text past "#> " */
}

.blog-meta {
    font-size: 0.85em;
    color: rgba(51, 255, 0, 0.45);
}

/* Back link */
.blog-back a {
    color: #33ff00;
    text-decoration: none;
    font-size: 0.95em;
}

.blog-back a:hover {
    text-shadow: 0 0 10px rgba(51, 255, 0, 0.5);
}

/* Rendered markdown container */
.blog-content {
    text-align: left;
    line-height: 1.6;
    padding: 15px 20px;
    overflow-x: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.blog-article-header {
    margin-bottom: 1.75em;
    padding-bottom: 1em;
    border-bottom: 1px solid rgba(51, 255, 0, 0.25);
}

.blog-article-kicker {
    margin: 0;
    color: rgba(51, 255, 0, 0.55);
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

.blog-article-header h1 {
    margin-top: 0.35em;
    margin-bottom: 0.35em;
}

.blog-article-summary {
    margin: 0;
    color: rgba(51, 255, 0, 0.75);
    font-size: 0.98em;
    max-width: 68ch;
}

.blog-content h1,
.blog-content h2,
.blog-content h3,
.blog-content h4 {
    color: #66ff33;
    border-bottom: 1px solid rgba(51, 255, 0, 0.2);
    padding-bottom: 6px;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

.blog-content h1 { font-size: 1.4em; }
.blog-content h2 { font-size: 1.2em; }
.blog-content h3 { font-size: 1.05em; }

.blog-article-header h1,
.blog-article-header h2,
.blog-article-header h3,
.blog-article-header h4 {
    border-bottom: none;
    padding-bottom: 0;
}

.blog-content p {
    color: rgba(51, 255, 0, 0.85);
    margin: 0.8em 0;
}

.blog-content a {
    color: #00fffc;
    text-decoration: none;
}

.blog-content a:hover {
    text-shadow: 0 0 8px rgba(0, 255, 252, 0.5);
    text-decoration: underline;
}

.blog-content strong {
    color: #33ff00;
}

.blog-content em {
    color: rgba(51, 255, 0, 0.7);
    font-style: italic;
}

/* Code blocks — darker inset terminal */
.blog-content pre {
    background-color: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(51, 255, 0, 0.25);
    padding: 12px 16px;
    overflow-x: auto;
    max-width: 100%;
    margin: 1em 0;
    font-size: 0.9em;
    line-height: 1.4;
    color: #33ff00;
    white-space: pre-wrap;
    word-break: break-word;
}

.blog-content code {
    font-family: 'Courier New', Courier, monospace;
    color: #fffc00;
    font-size: 0.95em;
}

.blog-content pre code {
    color: #33ff00;
    font-size: 1em;
}

/* Inline code */
.blog-content p code,
.blog-content li code,
.blog-content td code {
    background-color: rgba(0, 0, 0, 0.4);
    padding: 1px 5px;
    border: 1px solid rgba(51, 255, 0, 0.15);
}

/* Lists */
.blog-content ul,
.blog-content ol {
    color: rgba(51, 255, 0, 0.85);
    padding-left: 2em;
    margin: 0.5em 0;
}

.blog-content li {
    margin: 0.3em 0;
}

/* Blockquotes — highlighted advisory */
.blog-content blockquote {
    border-left: 3px solid #fffc00;
    padding: 8px 16px;
    margin: 1em 0;
    background-color: rgba(255, 252, 0, 0.05);
    color: rgba(255, 252, 0, 0.8);
}

.blog-content blockquote p {
    color: rgba(255, 252, 0, 0.8);
}

/* Tables */
.blog-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 1em 0;
    font-size: 0.9em;
}

.blog-content th,
.blog-content td {
    border: 1px solid rgba(51, 255, 0, 0.3);
    padding: 6px 12px;
    text-align: left;
    color: rgba(51, 255, 0, 0.85);
}

.blog-content th {
    background-color: rgba(51, 255, 0, 0.1);
    color: #66ff33;
    font-weight: bold;
}

/* Horizontal rule */
.blog-content hr {
    border: none;
    border-top: 1px solid rgba(51, 255, 0, 0.3);
    margin: 1.5em 0;
}

/* Error state */
.blog-error {
    color: #ff3333;
    text-shadow: 0 0 5px rgba(255, 51, 51, 0.3);
}

/* Empty state */
.blog-empty {
    opacity: 1 !important;
}
.blog-empty pre {
    color: rgba(51, 255, 0, 0.5);
}

/* Images in blog content */
.blog-content img {
    max-width: 100%;
    border: 1px solid rgba(51, 255, 0, 0.3);
    margin: 1em 0;
    filter: saturate(0.5) brightness(0.9);
}
