/* IBM VGA 8x16 - authentic DOS font for desktop */
@font-face {
    font-family: 'IBM VGA';
    src: url('https://int10h.org/oldschool-pc-fonts/fontlist/fonts/WebPlus_IBM_VGA_8x16.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* VT323 - readable retro terminal font for mobile */
@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');

/* Screen reader only - visually hidden but accessible to search engines */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

:root {
    --bg: #0a0a0a;
    --fg: #c8c8c8;
    --fg-dim: #707070;
    --accent: #e0e0e0;
    --link: #a0a0a0;
    --link-hover: #ffffff;
    --highlight: #ffff54;
}

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

html {
    font-size: 16px;
}

body {
    background: var(--bg);
    color: var(--fg);
    font-family: 'IBM VGA', 'Consolas', 'Courier New', monospace;
    min-height: 100vh;
    line-height: 1.2;
    display: flex;
    flex-direction: column;
}

/* CRT scanlines overlay */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0px,
        transparent 1px,
        rgba(0, 0, 0, 0.15) 1px,
        rgba(0, 0, 0, 0.15) 2px
    );
}

/* DOS-style title bar */
.dos-titlebar {
    background: var(--fg);
    color: var(--bg);
    padding: 0 1ch;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    line-height: 1.5;
    white-space: pre;
}

.dos-titlebar .title {
    font-weight: normal;
}

.dos-titlebar .controls {
    display: flex;
    gap: 1ch;
}

main {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex: 1;
    padding: 1rem 1rem 0 1rem;
}

a {
    color: var(--link);
    text-decoration: none;
    border-bottom: 1px solid var(--fg-dim);
}

a:hover {
    color: var(--link-hover);
    border-color: var(--link-hover);
}

/* Desktop ASCII art */
.ascii-content {
    font-size: 16px;
    line-height: 1.2;
    white-space: pre;
    overflow-x: auto;
    max-width: 100%;
}

.ascii-content a {
    border-bottom: none;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Mobile version - hidden by default */
.mobile-content {
    display: none;
    width: 100%;
    max-width: 400px;
}

.mobile-content h1 {
    font-size: 1.25rem;
    font-weight: normal;
    letter-spacing: 0.1em;
    margin-bottom: 2rem;
    color: var(--fg);
    border-bottom: 1px solid var(--fg-dim);
    padding-bottom: 0.5rem;
}

.timeline {
    margin-bottom: 2rem;
}

.entry {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 0.5rem;
}

/* Proportional time gaps - 0.7rem per year (matching desktop ASCII blank lines) */
.entry.gap-1  { margin-bottom: 0.7rem; }
.entry.gap-2  { margin-bottom: 1.4rem; }
.entry.gap-3  { margin-bottom: 2.1rem; }
.entry.gap-4  { margin-bottom: 2.8rem; }
.entry.gap-5  { margin-bottom: 3.5rem; }
.entry.gap-6  { margin-bottom: 4.2rem; }
.entry.gap-11 { margin-bottom: 7.7rem; }

.year {
    flex-shrink: 0;
    width: 3rem;
    color: var(--fg-dim);
    font-size: 0.875rem;
}

.desc {
    color: var(--fg);
    font-size: 0.875rem;
}

.links {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    font-size: 0.875rem;
}

.brand {
    color: var(--fg-dim);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
}

.counter {
    color: var(--highlight);
    font-size: 0.875rem;
    margin-top: 1rem;
    font-family: 'IBM VGA', 'Consolas', 'Courier New', monospace;
}

#counter {
    color: var(--highlight);
}

/* Blinking DOS cursor */
@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.cursor {
    animation: blink 1s step-end infinite;
}

/* Responsive breakpoints */
@media (max-width: 700px) {
    .ascii-content {
        display: none;
    }

    .mobile-content {
        display: block;
    }
}

/* Slightly smaller ASCII for medium screens */
@media (min-width: 701px) and (max-width: 900px) {
    .ascii-content {
        font-size: 14px;
    }
}

/* Large screens */
@media (min-width: 1200px) {
    .ascii-content {
        font-size: 16px;
    }
}

/* Mobile adjustments */
@media (max-width: 700px) {
    body {
        font-family: 'VT323', 'Courier New', monospace;
        font-size: 18px;
    }

    .dos-titlebar {
        font-size: 16px;
    }

    .mobile-content h1 {
        font-size: 1.5rem;
    }

    .year {
        font-size: 1rem;
    }

    .desc {
        font-size: 1rem;
    }

    /* Much lighter scanlines on mobile for readability */
    .scanlines {
        background: repeating-linear-gradient(
            to bottom,
            transparent 0px,
            transparent 2px,
            rgba(0, 0, 0, 0.03) 2px,
            rgba(0, 0, 0, 0.03) 4px
        );
    }
}

/* Print styles */
@media print {
    body {
        background: white;
        color: black;
    }

    .dos-titlebar,
    .cursor,
    .scanlines {
        display: none;
    }

    a {
        color: black;
    }

    .ascii-content {
        display: none;
    }

    .mobile-content {
        display: block;
        color: black;
    }

    .year, .brand {
        color: #666;
    }
}

/* Accessibility - respect user preferences */
@media (prefers-reduced-motion: reduce) {
    .cursor {
        animation: none;
        opacity: 1;
    }
}

/* High contrast mode */
@media (prefers-contrast: more) {
    :root {
        --fg: #ffffff;
        --fg-dim: #a0a0a0;
        --accent: #ffffff;
        --link: #ffffff;
    }
}
