@font-face {
    font-family: 'Web437_IBM_VGA_9x16';
    src: url('../fonts/Web437_IBM_VGA_9x16.woff') format('woff');
}

:root {
    --dos-black: #000000;
    --dos-blue: #0000AA;
    --dos-green: #00AA00;
    --dos-cyan: #00AAAA;
    --dos-red: #AA0000;
    --dos-magenta: #AA00AA;
    --dos-brown: #AA5500;
    --dos-white: #AAAAAA;
    --dos-gray: #555555;
    --dos-lblue: #5555FF;
    --dos-lgreen: #55FF55;
    --dos-lcyan: #55FFFF;
    --dos-lred: #FF5555;
    --dos-lmagenta: #FF55FF;
    --dos-yellow: #FFFF55;
    --dos-bwhite: #FFFFFF;
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--dos-black);
    color: var(--dos-white);
    font-family: 'Web437_IBM_VGA_9x16', monospace;
    font-size: 18px;
    line-height: 1;
    margin: 0;
    padding: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    image-rendering: pixelated;
}

a {
    color: inherit;
    text-decoration: none;
}

u {
    text-decoration: underline;
}

/* Menu Bar */
.menu-bar {
    background-color: var(--dos-white);
    color: var(--dos-black);
    height: 1em;
    padding: 0 1ch;
    flex-shrink: 0;
    z-index: 10;
}

.menu-bar ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.menu-bar li {
    padding: 0 1ch;
}

.menu-bar li.active {
    background-color: var(--dos-black);
    color: var(--dos-white);
}

/* Desktop & Window Layout */
.desktop {
    flex-grow: 1;
    background-color: var(--dos-black); /* Desktop is black */
    position: relative;
    padding: 1em 2ch;
    display: flex;
    justify-content: center;
    align-items: stretch;
    min-height: 0;
}

.window {
    background-color: var(--dos-blue);
    color: var(--dos-white);
    display: flex;
    flex-direction: column;
    position: relative;
    width: 100%;
    z-index: 2;
}

.window-shadow {
    position: absolute;
    top: 2em;
    left: 3ch;
    right: 1ch;
    bottom: 0.5em;
    background-color: var(--dos-gray); /* Darker gray for shadow */
    z-index: 1;
}

/* Window Borders */
.window-border-t, .window-border-b {
    height: 1em;
    display: flex;
    flex-shrink: 0;
    overflow: hidden;
}

.window-body {
    display: flex;
    flex-grow: 1;
    min-height: 0;
}

.window-border-l, .window-border-r {
    width: 1ch;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}

.window-border-l::before {
    content: "║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A";
    white-space: pre;
}

.window-border-r::before {
    content: "║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A║\A";
    white-space: pre;
}

.window-line {
    flex-grow: 1;
    overflow: hidden;
    white-space: nowrap;
}

.window-border-t .window-line::before, .window-border-b .window-line::before {
    content: "════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════";
}

.window-title {
    padding: 0 1ch;
    flex-shrink: 0;
    font-weight: normal;
}

.window-control {
    padding: 0 1ch;
    cursor: pointer;
}


/* Window Content */
.window-content {
    flex-grow: 1;
    overflow-y: auto;
    scrollbar-color: var(--dos-white) var(--dos-blue);
    -ms-overflow-style: none;
    background-color: var(--dos-blue);
}

.content-inner {
    padding: 1ch 2ch;
}

/* Status Bar */
.status-bar {
    background-color: var(--dos-white);
    color: var(--dos-black);
    height: 1em;
    padding: 0 1ch;
    flex-shrink: 0;
}

.status-items {
    display: flex;
}

.status-item {
    margin-right: 2ch;
}

.status-item .key {
    color: var(--dos-blue); /* Usually blue on white bar in Borland */
}

/* Typography */
h1, h2, h3, h4 {
    font-size: 1.0em;
    font-weight: normal;
    color: var(--dos-bwhite);
    background-color: var(--dos-gray);
    margin-top: 1ch;
    margin-bottom: 1ch;
    margin-left: 0;
    margin-right: 0;
    text-transform: uppercase;
    padding-left: 1ch;
    padding-right: 1ch;
}

h3 {
    color: var(--dos-bwhite);
    background-color: var(--dos-lblue);
    text-transform: none;
}

h4 {
    color: var(--dos-bwhite);
    background-color: var(--dos-blue);
    text-transform: none;
}

h1 a, h2 a, h3 a, h4 a, .content-inner li a {
    color: var(--dos-yellow);
}

h1 a:after, h2 a:after, h3 a:after, h4 a:after, .content-inner li a:after {
    content: "→";
}

p {
    margin-bottom: 1em;
}

.content-inner p {
    padding-left: 1ch;
}

abbr[title] {
    text-decoration: none;
}

address {
    font-style: normal;
}

.entry-title a:after, p a:after {
    content: "─→";
}

p a {
    color: var(--dos-yellow);
}

p a:after {
    content: "→";
}

@media (max-width: 600px) {
    .desktop {
        padding: 0;
    }

    .window-shadow {
        display: none;
    }

    .window-border-l, .window-border-r {
        display: none;
    }

    .window-border-t .window-corner, 
    .window-border-b .window-corner {
        display: none;
    }

    .content-inner {
        padding: 1ch 1ch;
    }

    .menu-bar, .status-bar {
        height: auto;
    }

    body {
        overflow-y: auto;
        height: auto;
    }

    .desktop {
        height: auto;
        flex-grow: 1;
        display: block;
    }

    .window {
        height: auto;
    }

    .window-content {
        overflow-y: visible;
    }

    .menu-bar ul {
        flex-wrap: wrap;
    }

    .status-items {
        flex-wrap: wrap;
    }

    .status-items {
        display: none;
    }
}

.readmore {
    color: var(--dos-lcyan);
    display: block;
    margin-top: 0.5em;
    padding-left: 1ch;
    text-transform: uppercase;
}

.readmore::after {
    content: "─→";
}

.badge {
    color: var(--dos-lred);
}

footer p, .article-info {
    color: var(--dos-green);
    margin-bottom: 1em;
    padding-left: 1ch;
    text-transform: uppercase;
}

pre {
    background-color: var(--dos-black);
    color: var(--dos-lcyan);
    padding: 1ch;
    margin: 1em 0;
    border: 1px solid var(--dos-gray);
    white-space: pre-wrap;
    word-break: break-all;
    font-family: 'Web437_IBM_VGA_9x16', monospace;
}

code {
    background-color: var(--dos-black);
    color: var(--dos-lcyan);
    font-family: 'Web437_IBM_VGA_9x16', monospace;
}
