/* ── Reset ── */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    /* Disable sub-pixel smoothing for a crisp monospace look */
    -webkit-font-smoothing: none;
    -moz-osx-font-smoothing: unset;
}

/* ──────────────────────────────────────────────────────────────
   BODY — near-black background; the Matrix canvas renders on top.
   Flex centering positions the Borland window in the middle.
   ────────────────────────────────────────────────────────────── */
body {
    background: #0a0a0a;
    font-family: 'Courier New', Courier, monospace;
    font-size: 15px;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Matrix rain canvas — appended by main.js, sits behind the window */
#c {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 0;
    pointer-events: none;
}

/* ──────────────────────────────────────────────────────────────
   BORLAND WINDOW — the floating dialog centered on the desktop.
   Double border and drop shadow match the terminal's window style.
   ────────────────────────────────────────────────────────────── */
.bwin {
    position: relative;
    z-index: 10;          /* float above the Matrix canvas */
    display: flex;
    flex-direction: column;
    min-width: 30ch;
    max-width: 42ch;
    width: 90%;
    /* Double-line border — classic Borland window frame */
    border: 4px double #CCCCCC;
    /* Drop shadow shifts right-down, same convention as the terminal window */
    box-shadow: 8px 8px 0 #000033;
}

/* Window title bar: cyan background, same as the terminal's win-titlebar */
.bwin-title {
    background: #00AAAA;
    color: #000000;
    text-align: center;
    font-weight: bold;
    padding: 0.2em 1ch;
    letter-spacing: 0.08em;
    user-select: none;
}

/* Window body: Borland desktop blue, content centred vertically */
.bwin-body {
    background: #0000AA;
    padding: 2em 2ch 1.8em;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.7em;
}

/* ──────────────────────────────────────────────────────────────
   HEADING — gradient green→cyan, the site's signature visual.
   Renders clearly on the dark blue window background.
   ────────────────────────────────────────────────────────────── */
h1 {
    font-size: 1.8em;
    text-align: center;
    letter-spacing: 0.05em;
    background: linear-gradient(45deg, #00ff88, #00ccff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: glow 2s ease-in-out infinite alternate;
}

/* Subtext: green terminal colour, ties the page to the terminal aesthetic */
p {
    font-size: 0.9em;
    color: #AAFFAA;
    letter-spacing: 0.05em;
    text-align: center;
    margin-bottom: 0.6em;
}

/* ──────────────────────────────────────────────────────────────
   BUTTON ROW — flex row of the three navigation buttons
   ────────────────────────────────────────────────────────────── */
.bwin-btns {
    display: flex;
    gap: 1.5ch;
    flex-wrap: wrap;
    justify-content: center;
}

/* Strip default anchor decoration so buttons look standalone */
.bwin-btns a {
    text-decoration: none;
}

/* Borland raised button: gray body, white border, dark drop shadow */
.bwin-btn {
    background: #AAAAAA;
    color: #000000;
    border: 2px solid #FFFFFF;
    box-shadow: 3px 3px 0 #000033;
    padding: 0.3em 1.5ch;
    min-width: 10ch;
    font-family: inherit;
    font-size: 0.95em;
    font-weight: bold;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    user-select: none;
    transition: background 0.1s, color 0.1s;
}

.bwin-btn:hover,
.bwin-btn:focus {
    /* Invert on hover: white background, Borland blue text */
    background: #FFFFFF;
    color: #0000AA;
    outline: none;
}

.bwin-btn:active {
    /* Simulate key press: collapse shadow and nudge 1 px */
    box-shadow: 1px 1px 0 #000033;
    transform: translate(1px, 1px);
}

/* Responsive: stack buttons vertically on very small screens */
@media (max-width: 380px) {
    .bwin-btns {
        flex-direction: column;
        align-items: stretch;
    }

    .bwin-btns a {
        display: block;
    }

    .bwin-btn {
        width: 100%;
    }
}

/* ── Glow animation used by the h1 gradient text ── */
@keyframes glow {
    from { filter: brightness(1);   }
    to   { filter: brightness(1.3); }
}
