:root {
    --bg-color: #000000;
    --text-color: #bbbbbb;
    --nav-bg: #000000;
    --border-color: #333;
    --link-color: #00b7ff;
    --code-bg: #1e1e1e;
}

/* Base styles */
html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    background: var(--bg-color);
    color: var(--text-color);
    font-family: "Anonymous Pro", monospace;
    font-size: 20px;
    line-height: 1.3;
}

/* Blog layout specific */
.blog-layout {
    display: flex;
    min-height: 100vh;
    background: var(--bg-color);
    margin: 0;
    padding: 0;
}

/* Navigation sidebar */
.nav-sidebar {
    width: 220px;
    background: var(--nav-bg);
    padding: 20px;
    border-right: 1px solid var(--border-color);
    height: 100vh;
    overflow-y: auto;
    position: fixed;
    top: 0;
    left: 0;
    box-sizing: border-box;
}

/* Content area */
.content-area {
    margin-left: 260px; /* nav width + padding */
    padding: 20px;
    max-width: 800px;
    min-height: 100vh;
    overflow-y: auto;
    box-sizing: border-box;
    flex-grow: 1;
}

/* For non-blog-layout pages */
.post-content {
    margin-left: 260px;
    padding: 20px;
    max-width: 800px;
    box-sizing: border-box;
}

/* Navigation styling */
.nav-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.nav-header h2 {
    margin: 0;
}

.nav-header a {
    text-decoration: none;
    color: var(--text-color);
}

.post-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.post-link a {
    text-decoration: none;
    color: #999;
    display: block;
    padding: 5px 0;
}

.post-link .date {
    display: block;
    color: var(--link-color);
    font-size: 0.9em;
}

.post-link .title {
    display: block;
    padding-left: 1em;
    word-wrap: break-word;
}

/* Links */
a {
    color: var(--link-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Headers */

h1,
h2,
h3 {
    color: #0090cc;
    border-bottom: 1px solid rgba(0, 183, 255, 0.2);
    padding-bottom: 0.3em;
}

h4,
h5,
h6 {
    color: var(--text-color);
}

em {
    color: #888888;
    font-style: italic;
}

/* Make sure images don't overflow */
img {
    max-width: 100%;
    height: auto;
}

/* Base code block styling */
pre {
    background: #1e1e1e;
    padding: 1em;
    margin: 1em 0;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    overflow-x: auto;
}

pre code {
    background: none;
    padding: 0;
    color: #ffffff;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Inline code */
code {
    background: #1e1e1e;
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-size: 0.9em;
}

/* Disable highlight.js for cred blocks */
pre code.language-cred {
    color: #ffffff !important;
}

/* Special styling for Mermaid diagrams */
.mermaid {
    background: transparent;
    margin: 1.5em 0;
}

/* Make MathJax formulas stand out */
.MathJax {
    color: #cccccc !important;
}

/* Custom cred@ highlighting */
pre code.language-cred {
    position: relative;
}

/* Use JavaScript to add this class to the cred@ text */
.cred-highlight {
    color: #00b7ff !important;
}

/* phone layout */
@media screen and (max-width: 768px) {
    html,
    body {
        font-size: 22px;
    }

    /* Fix mobile layout */
    .blog-layout {
        flex-direction: column;
    }

    .nav-sidebar {
        width: 100%;
        height: auto;
        position: static;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .content-area,
    .post-content {
        margin-left: 0;
        width: 100%;
        padding: 15px;
        box-sizing: border-box;
    }

    /* Make code blocks more readable on mobile */
    pre {
        padding: 10px;
        font-size: 0.8em;
    }

    /* Adjust heading sizes for mobile */
    h1 {
        font-size: 1.8em;
    }
    h2 {
        font-size: 1.5em;
    }
    h3 {
        font-size: 1.2em;
    }
}

.graphviz-diagram {
    background: transparent !important;
    display: block !important;
    margin: 2em auto !important;
    max-width: 100% !important;
}

.graphviz-diagram path {
    stroke: #00b7ff !important;
    stroke-width: 1.5 !important;
}

.graphviz-diagram text {
    fill: #bbbbbb !important;
}

.graphviz-diagram polygon {
    fill: transparent !important;
    stroke: #00b7ff !important;
}

.graphviz-diagram ellipse {
    fill: transparent !important;
    stroke: #00b7ff !important;
}

/* Style dotted lines */
.graphviz-diagram path[style*="dotted"] {
    stroke-dasharray: 2, 2 !important;
    stroke-width: 1 !important;
}