:root {
    --bg-color: #050505;
    --text-color: #e0e0e0;
    --accent-color: #a0a0a0; 
    --highlight: #ffffff;    
    --link-color: #ffffff;
    --border-char: #444444;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: ui-monospace, 'Cascadia Mono', 'Cascadia Code', Consolas, 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.4;
    margin: 0;
    padding: 20px;
    overflow-x: hidden;
    overflow-y: scroll;
}

.terminal {
    max-width: 1000px;
    margin: 0 auto;
    padding-bottom: 100px;
}

.capsule {
    --capsule-font-size: 12px;
    --capsule-line-height: 14px;
    --capsule-side-width: 18px;
    --capsule-pad-x: 18px;
    --capsule-pad-y: 14px;

    position: relative;
}

.capsule-grid {
    display: grid;
    grid-template-columns: var(--capsule-side-width) 1fr var(--capsule-side-width);
    grid-template-rows: var(--capsule-line-height) auto var(--capsule-line-height);
}

.capsule-cell {
    font-size: var(--capsule-font-size);
    line-height: var(--capsule-line-height);
    color: var(--border-char);
    white-space: pre;
    user-select: none;
    pointer-events: none;
    overflow: hidden;
    min-width: 0;
    min-height: 0;
}

.capsule-side {
    contain: size layout paint;
}

.capsule-corner {
    text-align: left;
}

.capsule-cell[data-capsule-corner="tr"],
.capsule-cell[data-capsule-corner="br"] {
    text-align: right;
}

.capsule-side[data-capsule-side="right"],
.capsule-cell[data-capsule-side="right"] {
    text-align: right;
}

.capsule-inner {
    padding: var(--capsule-pad-y) var(--capsule-pad-x);
    min-width: 0;
}

/* ASCII Art & Headers */
.ascii-art {
    font-size: 10px;
    line-height: 10px;
    white-space: pre;
    color: var(--accent-color);
    margin-bottom: 20px;
    font-weight: bold;
    overflow-x: hidden;
    cursor: pointer;
    transition: color 0.2s;
}

.brand-link {
    text-decoration: none;
    border: none;
    display: block;
    overflow: hidden;
}

.brand-link:hover {
    background: none;
    color: inherit;
}

.greeting {
    margin: 20px 0;
}

.section-title {
    margin-top: 10px;
    margin-bottom: 10px;
}

.subtle-line {
    margin-bottom: 5px;
    color: #444;
    font-size: 12px;
}

h1 {
    font-size: 16.5px;
    color: var(--highlight);
    text-transform: uppercase;
    margin-top: 30px;
    margin-bottom: 10px;
    display: inline-block;
    border-bottom: 1px solid var(--accent-color);
}

#post-content > h1 {
    font-size: 19px;
    margin-top: 0;
}

a {
    color: var(--link-color);
    text-decoration: none;
    border-bottom: 1px dashed var(--accent-color);
    transition: background 0.2s;
}

a:hover {
    background-color: var(--highlight);
    color: var(--bg-color);
    border-bottom: none;
}

.post-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}
.post-item .dots {
    flex-grow: 1;
    border-bottom: 1px dotted #333;
    margin: 0 10px;
    position: relative;
    top: -5px;
}


#post-content {
    margin-top: 20px;
    white-space: pre-wrap; 
    overflow-x: auto;
    min-width: 0;
}

.md {
    white-space: normal;
}

.md p {
    margin: 0 0 12px;
}

.md ul,
.md ol {
    margin: 0 0 12px 0;
    padding: 0 0 0 20px;
    list-style-position: inside;
}

.md li {
    margin: 4px 0;
}

.md pre {
    white-space: pre;
    overflow-x: auto;
    border: 1px dashed var(--accent-color);
    padding: 12px;
    margin: 12px 0;
    max-width: 100%;
}

.md code {
    color: var(--highlight);
}

.md :not(pre) > code {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.md pre code {
    white-space: pre;
}

.md img {
    max-width: 100%;
    height: auto;
}

.md blockquote {
    margin: 12px 0;
    padding-left: 12px;
    border-left: 2px solid var(--accent-color);
    color: var(--accent-color);
}

.md hr {
    border: none;
    border-top: 1px dashed var(--accent-color);
    margin: 18px 0;
}

.md h2 {
    font-size: 16.5px;
    color: var(--highlight);
    text-transform: uppercase;
    margin-top: 24px;
    margin-bottom: 10px;
    display: inline-block;
    border-bottom: 1px solid var(--accent-color);
}

.md h3,
.md h4,
.md h5,
.md h6 {
    font-size: 14px;
    color: var(--accent-color);
    text-transform: uppercase;
    margin-top: 18px;
    margin-bottom: 8px;
    display: inline-block;
    border-bottom: none;
}

.post-meta {
    margin-bottom: 30px;
    color: #888;
}
.back-btn {
    display: inline-block;
    margin-bottom: 20px;
    cursor: pointer;
}

.hidden { display: none; }
.cursor::after { content: "█"; animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

.section-spacer {
    height: 20px;
}

.header-line {
    color: var(--border-char);
    font-size: 12px;
    display: block;
    white-space: pre;
    overflow: hidden;
    overflow-x: hidden;
    margin-left: calc(-1 * var(--capsule-pad-x));
    margin-right: calc(-1 * var(--capsule-pad-x));
    width: calc(100% + var(--capsule-pad-x) + var(--capsule-pad-x));
}

.header-line--subtle {
    opacity: 0.25;
    font-size: 11px;
}

.footer {
    margin-top: 50px;
    border-top: 1px dashed #222;
    padding-top: 20px;
}

.footer-dot {
    color: #777;
}

.footer-credit {
    font-size: 13px;
    color: #777;
    margin-bottom: 8px;
}

.footer-links {
    font-size: 13px;
    color: #888;
    margin-bottom: 8px;
}

.footer-status {
    font-size: 11px;
    color: #666;
    font-family: monospace;
    margin-bottom: 5px;
}

.footer-eof {
    font-size: 11px;
    color: #666;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    body {
        font-size: 12px;
        padding: 10px;
    }
    
    .terminal {
        padding-bottom: 50px;
    }
    
    .ascii-art {
        font-size: 6px;
        line-height: 6px;
        margin-bottom: 15px;
    }
    
    .section-spacer {
        height: 20px;
    }
    
    h1 {
        font-size: 14px;
    }

    #post-content > h1 {
        font-size: 16px;
    }

    /* Markdown heading sizing on mobile */
    .md h2 {
        font-size: 14px;
    }

    .md h3,
    .md h4,
    .md h5,
    .md h6 {
        font-size: 12px;
    }
    
    .post-item {
        font-size: 11px;
    }
    
    .post-item .dots {
        margin: 0 5px;
    }

    .capsule {
        --capsule-font-size: 11px;
        --capsule-line-height: 13px;
        --capsule-side-width: 14px;
        --capsule-pad-x: 12px;
        --capsule-pad-y: 10px;
    }

    .footer-credit {
        font-size: 11px;
    }

    .footer-links {
        font-size: 11px;
        color: #777;
        margin-bottom: 8px;
    }

    .footer-status {
        font-size: 10px;
        color: #444;
        font-family: monospace;
        margin-bottom: 5px;
    }

    .footer-eof {
        font-size: 10px;
        color: #555;
    }

}

@media (max-width: 480px) {
    .ascii-art {
        font-size: 4.5px;
        line-height: 5px;
    }
    
    body {
        font-size: 11px;
    }

    h1 {
        font-size: 13px;
    }

    #post-content > h1 {
        font-size: 15px;
    }

    /* Markdown heading sizing on smaller mobile */
    .md h2 {
        font-size: 12px;
    }

    .md h3,
    .md h4,
    .md h5,
    .md h6 {
        font-size: 11px;
    }

    .capsule {
        --capsule-font-size: 10px;
        --capsule-line-height: 12px;
        --capsule-side-width: 12px;
        --capsule-pad-x: 10px;
        --capsule-pad-y: 8px;
    }
}