@import url('https://fonts.googleapis.com/css2?family=Cascadia+Code&display=swap');

/* =====================
   BASE
   ===================== */

body {
    background: radial-gradient(circle at center, #0f1f0f 0%, #020402 100%);
    color: hsl(154 84% 70%);
    font-family: 'Cascadia Code', monospace;
    text-align: left;
    margin: 0 auto;
    padding: 32px;
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: auto;
    min-height: 100vh;
    max-width: 900px;
    line-height: 1.6;
    text-shadow: 0 0 2px currentColor;
    animation: screenFlicker 0.2s infinite alternate;
}

section {
    display: contents;
}

h1, h2, h3, p, li {
    overflow: hidden;
    max-height: 0;
    margin: 0;
    padding: 0;
}

h1, h2, p {
    text-shadow: 0 0 2px currentColor, 0 0 4px currentColor;
}

h2 {
    font-size: 24px;
    margin-bottom: 10px;
}

/* =====================
   CRT EFFECTS
   ===================== */

#crt-screen {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 60%;
    z-index: -2;
    background: radial-gradient(ellipse at center, hsl(154 50% 10%) 0%, hsl(154 50% 5%) 100%);
    border-radius: 10px;
    filter: blur(3px);
    opacity: 0.8;
    overflow: hidden;
}

.scanlines {
    pointer-events: none;
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(to bottom, rgba(255,255,255,0.03), rgba(255,255,255,0.03) 1px, transparent 1px, transparent 3px);
    mix-blend-mode: soft-light;
    z-index: 9999;
}

#interlaced {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(transparent 0px 2px, rgba(0, 0, 0, 0.7) 2px 4px);
    z-index: -1;
    pointer-events: none;
    animation: scanlines 0.1s linear infinite;
    border-radius: 10px;
}

@keyframes scanlines {
    0% {
        background-position: 0px 0px;
    }

    100% {
        background-position: 0px 10px;
    }
}

@keyframes screenFlicker {
    0% {
        opacity: 1;
    }

    15% {
        opacity: 0.95;
    }

    30% {
        opacity: 1;
    }

    45% {
        opacity: 0.9;
    }

    60% {
        opacity: 1;
    }

    75% {
        opacity: 0.95;
    }

    100% {
        opacity: 1;
    }
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* =====================
   PAGE COLORS
   ===================== */

body.index-page {
    color: #ffcc00;
}

body.blog-page {
    color: #66cc33;
}

body.music-page {
    color: #ff66cc;
}

body.sotos-page {
    color: #ff3333;
}

body.whatever-page {
    color: #3399ff;
}

body.about-page {
    color: #cc66ff;
}

body.contact-page {
    color: #cfcfcf;
}

body.index-page h1, body.index-page h2, body.index-page p {
    text-shadow: 0 0 2px #ffcc00, 0 0 4px #ffcc00;
}

body.blog-page h1, body.blog-page h2, body.blog-page p {
    text-shadow: 0 0 2px #66cc33, 0 0 4px #66cc33;
}

body.music-page h1, body.music-page h2, body.music-page p {
    text-shadow: 0 0 2px #ff66cc, 0 0 4px #ff66cc;
}

body.sotos-page h1, body.sotos-page h2, body.sotos-page p {
    text-shadow: 0 0 2px #ff3333, 0 0 4px #ff3333;
}

body.whatever-page h1, body.whatever-page h2, body.whatever-page p {
    text-shadow: 0 0 2px #3399ff, 0 0 4px #3399ff;
}

body.about-page h1, body.about-page h2, body.about-page p {
    text-shadow: 0 0 2px #cc66ff, 0 0 4px #cc66ff;
}

body.contact-page h1, body.contact-page h2, body.contact-page p {
    text-shadow: 0 0 2px #9c9c9c, 0 0 4px #9c9c9c;
}

.index-page h1, .index-page h2 {
    color: #ffcc00;
}

.blog-page h1, .blog-page h2 {
    color: #66cc33;
}

.music-page h1, .music-page h2 {
    color: #ff66cc;
}

.sotos-page h1, .sotos-page h2 {
    color: #ff3333;
}

/* =====================
   LAYOUT
   ===================== */

header {
    margin-bottom: 24px;
}

nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
    padding-bottom: 4px;
}

main {
    border: 2px solid currentColor;
    padding: 24px;
    background: rgba(0, 20, 0, 0.2);
    box-shadow: 0 0 4px currentColor, inset 0 0 12px rgba(0,255,0,0.15);
}

    main.revealed {
        max-height: 10000px;
        padding: 24px;
    }

#intro {
    margin-top: 20px;
    word-wrap: break-word;
}

#content-preview, #latest-updates, #contact-info {
    margin-top: 30px;
}

/* =====================
   BUTTONS
   ===================== */

button {
    background: transparent;
    border: 1px solid;
    padding: 4px 8px;
    font-size: 16px;
    cursor: pointer;
    font-family: 'Cascadia Code', monospace;
    margin: 5px;
    text-transform: lowercase;
    min-width: 100px;
    text-shadow: 0 0 1px, 0 0 2px;
    transition: background 0.2s, color 0.2s, border-color 0.2s, text-shadow 0.2s;
    white-space: nowrap;
}

    button::before {
        content: "[";
    }

    button::after {
        content: "]";
    }

    button:active {
        transform: scale(0.98);
        background-color: #444;
    }

    button:focus {
        outline: none;
    }

.index-page button {
    color: #ffcc00;
    border-color: #ffcc00;
    background: rgba(255, 204, 0, 0.2);
}

.blog-page button {
    color: #66cc33;
    border-color: #66cc33;
    background: rgba(102, 204, 51, 0.2);
}

.music-page button {
    color: #ff66cc;
    border-color: #ff66cc;
    background: rgba(255, 102, 204, 0.2);
}

.sotos-page button {
    color: #ff3333;
    border-color: #ff3333;
    background: rgba(255, 51, 51, 0.2);
}

.whatever-page button {
    color: #3399ff;
    border-color: #3399ff;
    background: rgba(51, 153, 255, 0.2);
}

.about-page button {
    color: #cc66ff;
    border-color: #cc66ff;
    background: rgba(204, 102, 255, 0.2);
}

.contact-page button {
    color: #cfcfcf;
    border-color: #cfcfcf;
    background: rgba(207, 207, 207, 0.2);
}

button.index-page-button:hover {
    color: #ffcc00;
    background: rgba(255, 204, 0, 0.5);
    border-color: #ffcc00;
    text-shadow: 0 0 3px #ffcc00, 0 0 6px #ffcc00;
}

button.blog-page-button:hover {
    color: #66cc33;
    background: rgba(102, 204, 51, 0.5);
    border-color: #66cc33;
    text-shadow: 0 0 3px #66cc33, 0 0 6px #66cc33;
}

button.music-page-button:hover {
    color: #ff66cc;
    background: rgba(255, 102, 204, 0.5);
    border-color: #ff66cc;
    text-shadow: 0 0 3px #ff66cc, 0 0 6px #ff66cc;
}

button.sotos-page-button:hover {
    color: #ff3333;
    background: rgba(255, 51, 51, 0.5);
    border-color: #ff3333;
    text-shadow: 0 0 3px #ff3333, 0 0 6px #ff3333;
}

button.whatever-page-button:hover {
    color: #3399ff;
    background: rgba(51, 153, 255, 0.5);
    border-color: #3399ff;
    text-shadow: 0 0 3px #3399ff, 0 0 6px #3399ff;
}

button.about-page-button:hover {
    color: #cc66ff;
    background: rgba(204, 102, 255, 0.5);
    border-color: #cc66ff;
    text-shadow: 0 0 3px #cc66ff, 0 0 6px #cc66ff;
}

button.contact-page-button:hover {
    color: #cfcfcf;
    background: rgba(207, 207, 207, 0.5);
    border-color: #cfcfcf;
    text-shadow: 0 0 3px #cfcfcf, 0 0 6px #cfcfcf;
}

/* =====================
   SOTOS NOVEL
   ===================== */

.terminal-reader {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

#novel-page {
    white-space: pre-wrap;
    border: 1px solid currentColor;
    padding: 24px;
    background: rgba(0,0,0,0.4);
    font-size: 18px;
    color: white;
    text-shadow: none;
    line-height: 1.8;
    font-family: Helvetica, sans-serif;
    /* no min-height — starts empty and grows as text is typed */
}

.reader-controls {
    display: flex;
    gap: 12px;
}

/* =====================
   CURSOR
   ===================== */

.cursor {
    display: inline-block;
    animation: blink 0.7s steps(1) infinite;
}
