@font-face {
    font-family: "Terminal Grotesque";
    font-display: swap;
    src: url("terminal-grotesque.ttf") format("truetype");
}

:root {
    --primary-color: #9141ac;
    --base-font-size: 1.4em;
}

pre {
    background-color: #030303;
}

body {
    font-family: "Terminal Grotesque", sans-serif;
    background-color: #020202;
    color: #c0c0c0;
    margin: 0 auto;
    max-width: 36em;
    padding-left: 50px;
    padding-right: 50px;
    padding-top: 50px;
    padding-bottom: 50px;
    hyphens: auto;
    overflow-wrap: break-word;
    text-rendering: optimizeLegibility;
    font-kerning: normal;
    text-align: justify;
    font-size: var(--base-font-size);
    line-height: calc(var(--base-font-size) + 0.4);
}

.quote-box {
    background: black;
    text-align: center;
    padding: 2rem;
    padding-top: 0;
    border-bottom: 2px solid purple;
    margin: 2rem 0;
}

@media (max-width: 600px) {
    body {
        font-size: 0.9em;
        padding: 12px;
    }

    h1 {
        font-size: calc(var(--base-font-size) * 1.8);
    }
}

@media print {
    html {
        background-color: white;
    }

    body {
        background-color: transparent;
        color: black;
        font-size: 12pt;
    }

    p,
    h2,
    h3 {
        orphans: 3;
        widows: 3;
    }

    h2,
    h3,
    h4 {
        page-break-after: avoid;
    }
}

p {
    margin: 1em 0;
}

img {
    max-width: 100%;
}

svg {
    height: auto;
    max-width: 100%;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 1.4em;
    text-shadow: 0px 0px 10px white;
    color: white;
}

h1 {
    text-transform: uppercase;
    letter-spacing: 0.3em;
}

h5,
h6 {
    font-size: var(--base-font-size);
    font-style: italic;
}

h6 {
    font-weight: normal;
}

ol,
ul {
    padding-left: 1.7em;
    margin-top: 1em;
}

li>ol,
li>ul {
    margin-top: 0;
}

blockquote {
    margin: 1em 0 1em 1.7em;
    padding-left: 1em;
    border-left: 2px solid #e6e6e6;
    color: #606060;
}

code {
    font-family: Menlo, Monaco, Consolas, "Lucida Console", monospace;
    font-size: calc(var(--base-font-size) * 0.85);
    margin: 0;
    hyphens: manual;
}

pre {
    margin: 1em 0;
    overflow: auto;
}

pre code {
    padding: 0;
    overflow: visible;
    overflow-wrap: normal;
}

hr {
    background-color: #1a1a1a;
    border: none;
    height: 1px;
    margin: 1em 0;
}

table {
    margin: 1em 0;
    border-collapse: collapse;
    width: 100%;
    overflow-x: auto;
    display: block;
    font-variant-numeric: lining-nums tabular-nums;
}

table caption {
    margin-bottom: 0.75em;
}

tbody {
    margin-top: 0.5em;
    border-top: 1px solid #1a1a1a;
    border-bottom: 1px solid #1a1a1a;
}

th {
    border-top: 1px solid #1a1a1a;
    padding: 0.25em 0.5em 0.25em 0.5em;
}

td {
    padding: 0.125em 0.5em 0.25em 0.5em;
}

header {
    margin-bottom: 4em;
    text-align: center;
}

code {
    white-space: pre-wrap;
}

span.smallcaps {
    font-variant: small-caps;
}

div.columns {
    display: flex;
    gap: min(4vw, 1.5em);
}

div.column {
    flex: auto;
    overflow-x: auto;
}

div.hanging-indent {
    margin-left: 1.5em;
    text-indent: -1.5em;
}

/* The extra [class] is a hack that increases specificity enough to
override a similar rule in reveal.js */
ul.task-list[class] {
    list-style: none;
}

ul.task-list li input[type="checkbox"] {
    font-size: inherit;
    width: 0.8em;
    margin: 0 0.8em 0.2em -1.6em;
    vertical-align: middle;
}

.display.math {
    display: block;
    text-align: center;
    margin: 0.5rem auto;
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

a:hover {
    text-decoration: underline;
}

#preamble a {
    color: #e1bee7;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.85em;
    text-shadow: 0 0 5px rgba(225, 190, 231, 0.3);
    padding-left: 10px;
    margin-left: 5px;
}

#preamble a:hover {
    color: #ffffff;
    text-shadow: 0 0 8px rgba(225, 190, 231, 0.6);
    border-left: 1px solid #9c27b0;
    padding-left: 15px;
    text-decoration: none;
}

iframe {
    padding: 1em;
}

li {
    padding-top: 10px;
}

.sidebar li,
#table-of-contents li {
    padding: 8px 0 8px 20px;
    position: relative;
    list-style: none;
}

.sidebar li::before,
#table-of-contents li::before {
    content: "▸";
    color: #9c27b0;
    margin-right: 8px;
    text-shadow: 0 0 5px rgba(156, 39, 176, 0.5);
    position: absolute;
    left: 0;
}

.sidebar ul,
#table-of-contents ul {
    list-style: none;
    padding-left: 0;
}

.sidebar a,
#table-of-contents a {
    text-decoration: none;
}

.sidebar,
#table-of-contents {
    scrollbar-width: none;
    /* Firefox */
}

.sidebar::-webkit-scrollbar,
#table-of-contents::-webkit-scrollbar {
    display: none;
}

.sidebar,
#table-of-contents {
    font-size: calc(var(--base-font-size) * 0.8);
    line-height: 1.1em;
    text-align: left;
    overflow-y: auto;
    background: linear-gradient(90deg,
            #0a0a0a 0%,
            #0a0a0a 20%,
            #1a0033 50%,
            #0a0a0a 80%,
            #0a0a0a 100%);
    border: 1px solid #4a148c;
    border-radius: 8px;
    padding: 1.5rem;
    color: #b39ddb;
}

@media screen and (min-width: 1400px) {

    .sidebar,
    #table-of-contents {
        position: fixed;
        left: 50px;
        top: 50px;
        padding-right: 20px;
        max-width: 400px;
        height: 95vh;
        border-right: 1px solid #4a148c;
        border-left: 1px solid #9c27b0;
        background: linear-gradient(90deg,
                #0a0a0a 0%,
                #0a0a0a 20%,
                #1a0033 50%,
                #0a0a0a 80%,
                #0a0a0a 100%);
    }
}

.tinylytics_kudos {
    display: inline-block;
    padding: 5px 10px;
    background-color: black;
    color: #e0e0e0;
    border: 1px solid #444444;
    border-radius: 3px;
    font-family: sans-serif;
    font-size: calc(var(--base-font-size) * 0.5);
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.tinylytics_kudos::after {
    content: "REIFY GLORY";
}

.tinylytics_kudos:hover {
    background-color: black;
    /* Slightly lighter dark background on hover */
    color: #9900ff;
    /* Vibrant neon purple text, inspired by the links */
    border-color: #9900ff;
    /* Matching neon border */
    box-shadow: 0 0 12px rgba(153, 0, 255, 0.7);
    /* Soft purple glow */
    text-shadow: 0 0 6px rgba(153, 0, 255, 0.5);
    /* Subtle text glow */
}

.did_select {
    background-color: #000000;
    /* Darkest background on click */
    color: #cc33ff;
    /* Even brighter neon purple/magenta on click */
    border-color: #cc33ff;
    box-shadow: 0 0 15px rgba(204, 51, 255, 0.9);
    /* Intensified glow */
    text-shadow: 0 0 8px rgba(204, 51, 255, 0.7);
}

a:hover {
    color: #9900ff;
    /* Vibrant neon purple text, inspired by the links */
    text-shadow: 0 0 6px rgba(153, 0, 255, 0.5);
    /* Subtle text glow */
    text-decoration: none;
}

/* Cyberpunk-Lovecraftian Navigation Bar */
body>nav {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(90deg,
            #0a0a0a 0%,
            #0a0a0a 20%,
            #1a0033 50%,
            #0a0a0a 80%,
            #0a0a0a 100%);
    border-bottom: 1px solid #4a148c;
    box-shadow: 0 2px 10px rgba(138, 43, 226, 0.2);
    z-index: 1000;
    padding: 0;
    margin: 0;
}

body>nav ul {
    list-style: none;
    margin: 0;
    padding: 0 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60px;
    flex-wrap: nowrap;
    gap: 1rem;
    position: relative;
}

body>nav li {
    margin: 0;
    padding: 0;
    white-space: nowrap;
    position: relative;
    height: 60px;
    display: flex;
    align-items: center;
    overflow: visible;
}

body>nav strong {
    color: #e1bee7;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.85em;
    text-shadow: 0 0 8px rgba(225, 190, 231, 0.4);
}

body>nav a {
    color: #b39ddb;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.75em;
    padding: 0.4rem 0.8rem;
    border: 1px solid rgba(156, 39, 176, 0.3);
    border-radius: 3px;
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.3);
    display: inline-block;
    position: relative;
    z-index: 3;
}

body>nav li::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    transform: scaleX(0);
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent 0%,
            #4a148c 30%,
            #9c27b0 50%,
            #4a148c 70%,
            transparent 100%);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1;
    pointer-events: none;
    transform-origin: center;
    margin: 0 -1px;
    width: calc(100% + 2px);
}

body>nav li:hover::after {
    opacity: 1;
    transform: scaleX(1);
}

body>nav li:first-child::after {
    display: none;
}

body>nav a:hover {
    color: #ffffff;
    text-shadow: 0 0 8px rgba(225, 190, 231, 0.6);
    border-color: #9c27b0;
    background: rgba(156, 39, 176, 0.15);
    box-shadow: 0 0 8px rgba(138, 43, 226, 0.3);
}

body>nav a:hover {
    color: #ffffff;
    text-shadow: 0 0 8px rgba(225, 190, 231, 0.6);
    border-color: #9c27b0;
    background: rgba(156, 39, 176, 0.15);
    box-shadow: 0 0 8px rgba(138, 43, 226, 0.3);
    transform: translateY(-1px);
}

/* Responsive adjustments */
/* Show toggle button only on mobile */
@media (min-width: 769px) {
    body>nav .nav-toggle {
        display: none;
    }
}

/* Add body padding to account for fixed nav */
body {
    padding-top: 80px;
    background-image: url("https://neonvagabond.xyz/xenolandscapes5.png");
    /* image URL here */
    background-size: auto, 10%;
    /* scale image inside the box */
    background-repeat: no-repeat;
    background-position: top;
}

article {
    background: black;
    text-align: left;
    padding: 2rem;
    padding-top: 0;
    border: 2px solid purple;
    margin: 2rem 0;
}

header {
    backdrop-filter: brightness(30%) blur(1px);
    padding: 50px;
}

header h1 {
    margin-top: 30px;
}

/* Article metadata styling */
header time {
    display: block;
    font-size: calc(var(--base-font-size) * 0.7);
    color: #9e9e9e;
    text-align: center;
    margin-top: -1rem;
    margin-bottom: 1.5rem;
    font-style: italic;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

header aside {
    display: block;
    text-align: center;
    margin-top: -0.5rem;
    margin-bottom: 2rem;
}

header aside strong {
    color: #b39ddb;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75em;
    text-shadow: 0 0 5px rgba(179, 157, 219, 0.3);
    margin-right: 0.5rem;
}

header .tag {
    display: inline-block;
    background: rgba(156, 39, 176, 0.2);
    border: 1px solid #4a148c;
    padding: 0.2rem 0.6rem;
    margin: 0.2rem;
    border-radius: 3px;
    font-size: 0.7em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #e1bee7;
    text-shadow: 0 0 3px rgba(225, 190, 231, 0.3);
    transition: all 0.3s ease;
}

header .tag:hover {
    background: rgba(156, 39, 176, 0.4);
    border-color: #9c27b0;
    box-shadow: 0 0 8px rgba(138, 43, 226, 0.4);
    color: #ffffff;
    text-shadow: 0 0 5px rgba(225, 190, 231, 0.5);
}
