/* ---------- Frost palette ---------- */
:root {
    color-scheme: dark;

    --crust:    #060a14;
    --mantle:   #09101e;
    --base:     #0d1628;
    --surface0: #14203a;
    --surface1: #1d2f52;
    --surface2: #2b426e;

    --text:     #e8f6ff;
    --subtext:  #a8c8e2;
    --overlay:  #6f8fb0;

    --ice:      #c4ecff;
    --cyan:     #46cbf7;
    --blue:     #2b94e8;
    --teal:     #5eead4;
    --orange:   #ff9a3c;
    --red:      #ff6b81;

    --line:     rgba(70, 203, 247, 0.28);
}

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

body {
    font-family: Georgia, serif;
    line-height: 1.7;
    color: var(--text);
    background: var(--crust);
    margin: 0;
}

::selection {
    background: var(--cyan);
    color: var(--crust);
}

a:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ---------- Header ---------- */
.header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 30px 20px;
    background: linear-gradient(to bottom, var(--crust), var(--surface0));
    border-bottom: 1px solid var(--line);
}

.scp-logo {
    width: 140px;
}

.title-text a {
    margin: 0;
    color: var(--ice);
    text-shadow: 0 0 14px rgba(70, 203, 247, 0.55), 2px 2px 4px #000;
    font-family: monospace;
    font-size: 3rem;
    font-weight: bold;
    text-decoration: none;
}

.title-sub-text {
    margin: 0;
    font-size: 1.2rem;
    color: var(--subtext);
}

/* ---------- Nav ---------- */
.nav {
    display: flex;
    justify-content: flex-end;
    gap: 30px;
    padding: 8px 150px;
    background: linear-gradient(to bottom, var(--surface0), var(--base));
    border-bottom: 1px solid var(--line);
}

.nav a {
    color: var(--ice);
    text-decoration: none;
    font-family: sans-serif;
    font-weight: bold;
    padding: 2px 10px;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.nav a:hover {
    background-color: var(--cyan);
    color: var(--crust);
    border-radius: 10px;
}

/* ---------- Sidebar ---------- */
.sidebar {
    position: fixed;
    top: 0;
    left: 0%;
    width: 15.25rem;
    height: 100%;
    overflow-y: auto;
    z-index: 10;
    padding: 1em 1em 0 1em;
    scrollbar-width: thin;
    scrollbar-color: var(--surface2) transparent;
}

.box {
    background: rgba(13, 22, 40, 0.88);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 15px;
}

.green {
    background: rgba(94, 234, 212, 0.07);
    border-color: rgba(94, 234, 212, 0.35);
}

.box h4 {
    margin: 0 0 8px 0;
    padding-left: 15px;
    font-size: 0.75rem;
    color: var(--cyan);
    border-bottom: 1px solid var(--line);
}

.box a {
    display: block;
    margin-bottom: 6px;
    color: var(--ice);
    font-weight: bold;
    text-decoration: none;
    transition: color 0.2s ease;
}

.box a:hover {
    color: var(--cyan);
}

.menu-btn,
.close-btn {
    display: none;
}

/* ---------- Mobile ---------- */
@media (max-width: 800px) {

    .menu-btn {
        display: block;
        position: fixed;
        top: 10px;
        left: 10px;
        z-index: 5;
        padding: 4px 12px;
        font-size: 1.8rem;
        color: var(--ice);
        background: rgba(13, 22, 40, 0.85);
        border: 1px solid var(--line);
        text-decoration: none;
        border-radius: 8px;
    }

    .sidebar {
        left: -18rem;
        background-color: var(--base);
        border-right: 1px solid var(--line);
        transition: left 0.4s ease-in-out;
    }

    .sidebar.open {
        left: 0;
    }

    .close-btn {
        display: block;
        margin-bottom: 10px;
        color: var(--cyan);
        text-decoration: none;
        font-size: 1.2rem;
    }

    .header {
        gap: 5px;
        padding: 10px 5px;
    }

    .nav {
        display: flex;
        justify-content: center;
        gap: 10px;
        padding: 4px 15px;
        background: linear-gradient(to bottom, var(--surface0), var(--base));
    }

    .title-text a {
        margin: 0;
        color: var(--ice);
        text-shadow: 0 0 14px rgba(70, 203, 247, 0.55), 2px 2px 4px #000;
        font-family: monospace;
        font-size: 2rem;
        font-weight: bold;
        text-decoration: none;
    }

    .nav a {
        color: var(--ice);
        text-decoration: none;
        font-family: sans-serif;
        font-size: 0.7rem;
        font-weight: bold;
        padding: 5px;
    }
}

/* ---------- CONTENT ---------- */
.content {
    max-width: 900px;
    margin: 40px auto;
    padding: 30px;
    background: var(--base);
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 12px;
}

/* Elements inside content: the old light-theme defaults would be unreadable on navy */
.content h1,
.content h2,
.content h3,
.content h4 {
    color: var(--ice);
    line-height: 1.3;
    margin: 1.2em 0 0.5em;
}

.content h1 { border-bottom: 1px solid var(--line); padding-bottom: 0.2em; }

.content a {
    color: var(--cyan);
    text-decoration: underline;
    text-decoration-color: rgba(70, 203, 247, 0.4);
    text-underline-offset: 3px;
}

.content a:hover {
    color: var(--orange);
    text-decoration-color: var(--orange);
}

.content p,
.content ul,
.content ol {
    margin-bottom: 1em;
}

.content ul,
.content ol {
    padding-left: 1.5em;
}

.content blockquote {
    border-left: 3px solid var(--orange);
    background: var(--mantle);
    color: var(--subtext);
    padding: 8px 16px;
    margin: 1em 0;
    border-radius: 0 8px 8px 0;
}

.content code,
.content pre {
    font-family: monospace;
    background: var(--crust);
    color: var(--teal);
    border-radius: 6px;
}

.content code { padding: 1px 6px; }
.content pre  { padding: 12px 16px; overflow-x: auto; border: 1px solid var(--line); }
.content pre code { padding: 0; background: none; }

.content hr {
    border: none;
    border-top: 1px solid var(--line);
    margin: 1.5em 0;
}

.content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.content table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 1em;
}

.content th,
.content td {
    border: 1px solid var(--line);
    padding: 6px 10px;
    text-align: left;
}

.content th {
    background: var(--surface0);
    color: var(--ice);
}
