/* Terminal theme - black background, white text, monospace everything */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #000000;
    color: #c0c0c0;
    font-family: monospace;
    font-size: 1.1em;
    line-height: 1.4;
    padding: 1.4em; /* 1 line worth */
    max-width: 800px;
    margin: 0 auto;
}

/* Navigation */
nav {
    margin-bottom: 2.8em; /* 2 lines worth */
    padding-bottom: 0.7em; /* 0.5 lines worth */
    border-bottom: 1px solid #c0c0c0;
}

nav a {
    color: #5555ff; /* ANSI bright blue - same as other links */
    text-decoration: none;
    vertical-align: baseline; /* Prevent vertical shifting */
    font-weight: normal; /* Prevent weight changes */
}

nav a:hover {
    color: #5555ff; /* Keep same color */
    text-decoration: underline;
    vertical-align: baseline; /* Prevent vertical shifting */
    font-weight: normal; /* Prevent weight changes */
}

/* Headings - same size as body for perfect grid alignment */
h1, h2, h3, h4, h5, h6 {
    color: #c0c0c0;
    font-size: inherit; /* Same size as body text */
    font-weight: normal;
    margin: 0; /* No margin - spacing handled by content */
}

h1 {
    margin: 0 0 1.4em 0; /* No gap above (close to metadata), single gap below */
}

/* H1s that aren't the first child need spacing above */
h1:not(:first-child) {
    margin: 2.8em 0 1.4em 0; /* Double gap above for section breaks */
}

/* H1s immediately after post-meta should stay close */
.post-meta + h1 {
    margin: 0 0 1.4em 0; /* Override - stay close to metadata */
}

h1::before {
    content: "# ";
}

h2::before {
    content: "## ";
}

/* Post metadata (date and tags together) */
.post-meta {
    color: #c06000; /* Darker orange to match ANSI palette */
    font-size: inherit; /* Same size as body text for grid alignment */
    margin: 1.4em 0 0 0; /* Single gap above, no gap below */
}

/* Links */
a {
    color: #5555ff; /* ANSI bright blue */
    text-decoration: none;
    vertical-align: baseline; /* Prevent vertical shifting */
    font-weight: normal; /* Prevent weight changes */
}

a:hover {
    color: #5555ff; /* Keep same color */
    text-decoration: underline;
    vertical-align: baseline; /* Prevent vertical shifting */
    font-weight: normal; /* Prevent weight changes */
}

/* Code blocks */
code {
    color: #c0c000; /* ANSI yellow for code */
    padding: 0; /* Remove padding for grid alignment */
}

/* Multi-line code blocks (inside paragraphs) */
p code {
    display: block;
    padding: 0; /* Remove padding for perfect alignment */
    margin: 0; /* Remove margin for perfect alignment */
    white-space: pre;
    color: #c0c000; /* ANSI yellow for code */
    overflow-x: auto; /* Allow horizontal scrolling */
    max-width: 100%; /* Don't exceed container width */
}

/* Code blocks inside <pre> tags (pandoc output) */
pre[class] code {
    display: block;
    overflow-x: auto; /* Horizontal scrolling for mobile */
    white-space: pre;
    color: #c0c000;
    padding: 0.7em calc(1ch - 1px); /* Reduce horizontal padding to compensate for thicker border */
    margin: 1.4em 0; /* Line spacing above and below */
    border: 2px solid #c0c0c0; /* Thicker white border */
    background-color: #000000; /* Same black as body background */
    border-radius: 6px; /* Rounded corners like prompt box */
    position: relative; /* For positioning the language label */
}

/* Language labels for specific languages (pandoc format) */
pre.sh code::before { content: "sh"; color: #c0c0c0; display: block; margin-bottom: 0.7em; font-size: inherit; }
pre.c code::before { content: "c"; color: #c0c0c0; display: block; margin-bottom: 0.7em; font-size: inherit; }
pre.html code::before { content: "html"; color: #c0c0c0; display: block; margin-bottom: 0.7em; font-size: inherit; }
pre.css code::before { content: "css"; color: #c0c0c0; display: block; margin-bottom: 0.7em; font-size: inherit; }
pre.markdown code::before { content: "markdown"; color: #c0c0c0; display: block; margin-bottom: 0.7em; font-size: inherit; }
pre.go code::before { content: "go"; color: #c0c0c0; display: block; margin-bottom: 0.7em; font-size: inherit; }
pre.lua code::before { content: "lua"; color: #c0c0c0; display: block; margin-bottom: 0.7em; font-size: inherit; }
pre.ksh code::before { content: "ksh"; color: #c0c0c0; display: block; margin-bottom: 0.7em; font-size: inherit; }

/* Emphasis */
em {
    color: inherit; /* No color change */
    font-style: italic;
}

strong {
    color: inherit; /* No color change */
    font-weight: bold;
}

/* Paragraphs */
p {
    margin: 0 0 1.4em 0;
}


/* Lists */
ul, ol {
    margin: 1.4em 0; /* Standard line spacing above and below */
    padding-left: 0; /* No indent - flush with text */
    list-style: none; /* Remove default bullets */
}

li {
    margin: 0; /* No extra spacing between list items */
}

li::before {
    content: "* ";
    display: inline-block;
    width: 2ch; /* Fixed width for alignment */
    margin-right: 0;
}

/* Footer */
footer {
    margin-top: 2.8em; /* 2 lines worth of spacing above */
    padding-top: 0.7em; /* 0.5 lines worth */
    border-top: 1px solid #c0c0c0;
    text-align: left; /* Align left like all other text */
}

footer p {
    color: #c0c0c0; /* ANSI white to match body text */
    font-size: inherit;
    margin: 0;
}
