/* ============================================================
   Site Docs — ASCII Block Shading Greyscale Theme
   ============================================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --color-bg: #f0f0f0;
    --color-bg-alt: #eaeaea;
    --color-bg-sidebar: #e8e8e8;
    --color-text: #111111;
    --color-text-secondary: #333333;
    --color-text-muted: #666666;
    --color-border: #999999;
    --color-border-light: #bbbbbb;
    --color-primary: #333333;
    --color-primary-light: #e0e0e0;
    --color-primary-dark: #111111;
    --color-accent: #222222;
    --color-accent-light: #dddddd;
    --color-code-bg: #1a1a1a;
    --color-code-text: #cccccc;
    --color-inline-code-bg: #dcdcdc;
    --color-inline-code-text: #111111;
    --color-header-bg: #111111;
    --color-header-text: #e0e0e0;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', 'Courier New', monospace;
    --header-height: 56px;
    --sidebar-width: 280px;
    --content-max-width: 1100px;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
    font-family: var(--font-mono);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.8;
}

/* --- Header --- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--color-header-bg);
    color: var(--color-header-text);
    z-index: 100;
    border-bottom: 3px solid #444;
}

.header-inner {
    display: flex;
    align-items: center;
    height: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 48px;
    gap: 32px;
}

.page-post .header-inner {
    max-width: calc(var(--sidebar-width) + var(--content-max-width));
    padding-left: calc(var(--sidebar-width) + 48px);
}

.site-logo {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    font-weight: 700;
    font-size: 1.1rem;
    font-family: var(--font-mono);
}

.logo-icon {
    font-size: 1.4rem;
}

.header-nav {
    display: flex;
    gap: 8px;
    flex: 1;
}

.nav-link {
    color: #999;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 6px 14px;
    border: 1px solid transparent;
    font-family: var(--font-mono);
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
    border-color: #555;
    background: #222;
}

.header-actions {
    display: flex;
    gap: 8px;
}

.btn {
    border: 2px solid #555;
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 5px 16px;
}

.btn-signin {
    background: transparent;
    color: #999;
}

.btn-signin:hover {
    color: #fff;
    background: #333;
}

.btn-signup {
    background: #444;
    color: #e0e0e0;
    text-decoration: none;
}

.btn-signup:hover {
    background: #555;
    color: #fff;
}

/* --- Page Layout --- */
.page-layout {
    display: flex;
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
}

/* --- Sidebar --- */
.sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--header-height));
    overflow-y: auto;
    background: var(--color-bg-sidebar);
    border-right: 3px solid var(--color-border);
    z-index: 50;
}

.sidebar-inner {
    padding: 24px 16px;
}

.toc-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--color-border);
}

.toc-title::before {
    content: "▓ ";
}

.toc {
    display: flex;
    flex-direction: column;
}

.toc-link {
    display: block;
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 0.82rem;
    line-height: 1.5;
    padding: 4px 10px;
    border-left: 3px solid transparent;
    font-family: var(--font-mono);
}

.toc-link:hover {
    color: var(--color-text);
    background: var(--color-bg-alt);
    border-left-color: #888;
}

.toc-link.active {
    color: #000;
    border-left-color: #333;
    background: #ddd;
    font-weight: 700;
}

.toc-level-1 { padding-left: 10px; font-weight: 700; }
.toc-level-2 { padding-left: 10px; }
.toc-level-3 { padding-left: 24px; font-size: 0.8rem; }
.toc-level-4 { padding-left: 38px; font-size: 0.78rem; }

.sidebar-section {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 2px solid var(--color-border);
}

.sidebar-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sidebar-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.sidebar-tag {
    display: inline-block;
    font-size: 0.75rem;
    padding: 2px 8px;
    background: var(--color-bg);
    color: var(--color-text-secondary);
    border: 2px solid var(--color-border);
    font-family: var(--font-mono);
}

.category-tag {
    display: inline-block;
    font-size: 0.78rem;
    padding: 2px 8px;
    background: #ddd;
    color: #222;
    border: 2px solid #888;
    font-weight: 700;
    font-family: var(--font-mono);
}

/* --- Main Content --- */
.content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-width: 0;
}

.content-inner {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 40px 48px 80px;
}

/* --- Page Meta --- */
.page-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
    padding: 12px 16px;
    border: 2px solid var(--color-border);
    background: var(--color-bg-alt);
}

.meta-categories {
    display: flex;
    align-items: center;
    gap: 6px;
}

.meta-icon {
    font-size: 1rem;
}

.meta-category {
    font-size: 0.82rem;
    font-weight: 700;
    color: #222;
    background: #ccc;
    padding: 2px 10px;
    border: 2px solid #888;
    font-family: var(--font-mono);
}

.meta-dates {
    display: flex;
    gap: 16px;
}

.meta-date {
    font-size: 0.78rem;
    color: var(--color-text-muted);
}

.meta-date.updated {
    color: var(--color-text-secondary);
    font-weight: 700;
}

/* --- Article Content Typography --- */
.article {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--color-text);
}

.article h1 {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 24px;
    color: #000;
    padding: 16px 20px;
    background: #ddd;
    border: 3px solid #555;
    position: relative;
}

.article h2 {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 48px 0 20px;
    padding: 12px 16px;
    border: 2px solid #777;
    background: #e4e4e4;
    color: #111;
}

.article h3 {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 36px 0 16px;
    padding: 8px 14px;
    border: 2px solid #999;
    border-left: 6px solid #666;
    background: #ececec;
    color: #222;
}

.article h4 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 28px 0 12px;
    padding: 6px 12px;
    border-left: 6px solid #999;
    background: #f0f0f0;
    color: #333;
}

.article p {
    margin: 0 0 24px;
    padding: 14px 18px;
    border: 2px solid #bbb;
    background: #fafafa;
    font-size: 1rem;
    line-height: 1.9;
}

.article a {
    color: #222;
    text-decoration: underline;
    text-decoration-color: #888;
    text-underline-offset: 3px;
    font-weight: 700;
}

.article a:hover {
    color: #000;
    text-decoration-color: #333;
    background: #ddd;
}

.article strong {
    font-weight: 700;
    color: #000;
}

.article ul, .article ol {
    margin: 0 0 24px;
    padding: 14px 18px 14px 42px;
    border: 2px solid #bbb;
    background: #fafafa;
}

.article li {
    margin-bottom: 8px;
    line-height: 1.7;
}

.article li::marker {
    color: #555;
    font-weight: 700;
}

.article img {
    max-width: 100%;
    height: auto;
    border: 3px solid #888;
    margin: 24px 0;
    filter: grayscale(100%);
}

.article hr {
    border: none;
    height: auto;
    margin: 40px 0;
    font-size: 0.85rem;
    color: #888;
    text-align: center;
    letter-spacing: 0.1em;
    overflow: hidden;
}

.article hr::after {
    content: "░▒▓████████████████████████████████████████▓▒░";
    display: block;
}

/* --- Inline Code --- */
.article code {
    font-family: var(--font-mono);
    font-size: 0.88em;
    background: #ddd;
    color: #111;
    padding: 2px 7px;
    border: 1px solid #999;
    font-weight: 700;
}

/* --- Code Blocks --- */
.article pre {
    margin: 20px 0 24px;
    overflow: hidden;
    border: 3px solid #666;
    position: relative;
}

.article pre code {
    display: block;
    background: var(--color-code-bg);
    color: var(--color-code-text);
    padding: 18px 22px;
    font-size: 0.85rem;
    line-height: 1.7;
    overflow-x: auto;
    border: none;
    font-weight: 400;
}

/* Chroma syntax highlighting overrides */
.article pre .chroma {
    background: var(--color-code-bg);
    color: var(--color-code-text);
    padding: 18px 22px;
    overflow-x: auto;
    font-size: 0.85rem;
    line-height: 1.7;
    margin: 0;
}

/* --- Tables --- */
.article table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0 24px;
    font-size: 0.9rem;
    border: 3px solid #888;
}

.article thead {
    background: #d0d0d0;
}

.article th {
    font-weight: 700;
    text-align: left;
    padding: 10px 14px;
    border-bottom: 3px solid #888;
    color: #111;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.article td {
    padding: 8px 14px;
    border-bottom: 1px solid #bbb;
    color: var(--color-text-secondary);
}

.article tbody tr:hover {
    background: #e8e8e8;
}

.article tbody tr:last-child td {
    border-bottom: none;
}

/* --- Blockquotes --- */
.article blockquote {
    margin: 20px 0 24px;
    padding: 16px 20px;
    border: 2px solid #999;
    border-left: 8px solid #555;
    background: #eee;
    color: var(--color-text-secondary);
    font-style: italic;
}

.article blockquote::before {
    content: "░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░";
    display: block;
    color: #bbb;
    font-size: 0.65rem;
    margin-bottom: 8px;
    letter-spacing: 0.05em;
    font-style: normal;
    overflow: hidden;
    white-space: nowrap;
}

.article blockquote p:last-child {
    margin-bottom: 0;
    border: none;
    padding: 0;
    background: transparent;
}

.article blockquote p {
    border: none;
    padding: 0;
    background: transparent;
}

/* --- Callout Boxes --- */
.callout {
    margin: 24px 0;
    padding: 16px 20px;
    border: 2px solid #888;
    border-left: 8px solid #555;
    background: #efefef;
    position: relative;
}


.callout-title {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #222;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.callout-icon {
    font-size: 1.1rem;
}

.callout-content p {
    margin: 0;
    font-size: 0.95rem;
    border: none;
    padding: 0;
    background: transparent;
}

.callout-note { background: #efefef; border-color: #888; border-left-color: #555; }
.callout-note .callout-title { color: #222; }
.callout-tip { background: #f2f2f2; border-color: #999; border-left-color: #666; }
.callout-tip .callout-title { color: #333; }
.callout-warning { background: #e8e8e8; border-color: #777; border-left-color: #444; }
.callout-warning .callout-title { color: #111; }
.callout-important { background: #e0e0e0; border-color: #666; border-left-color: #333; }
.callout-important .callout-title { color: #000; }
.callout-caution { background: #eaeaea; border-color: #888; border-left-color: #555; }
.callout-caution .callout-title { color: #222; }
.callout-info { background: #f0f0f0; border-color: #999; border-left-color: #666; }
.callout-info .callout-title { color: #333; }

/* --- Article Tags --- */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 48px;
    padding-top: 20px;
    position: relative;
}

.article-tag {
    display: inline-flex;
    align-items: center;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 4px 12px;
    background: #e0e0e0;
    color: #333;
    border: 2px solid #999;
    text-decoration: none;
    font-family: var(--font-mono);
}

.article-tag:hover {
    background: #ccc;
    color: #000;
    border-color: #555;
}

/* --- Index Page --- */
.index-layout {
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
}

.index-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 60px 48px 80px;
}

.index-hero {
    text-align: center;
    margin-bottom: 48px;
    padding: 32px 24px;
    border: 3px solid #888;
    background: #e8e8e8;
    position: relative;
}

.index-hero::before {
    content: none;
}

.index-hero::after {
    content: none;
}

.index-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #111;
    letter-spacing: 0.02em;
    margin-bottom: 12px;
}

.hero-logo {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 16px;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: #555;
}

.page-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.page-card {
    display: flex;
    flex-direction: column;
    padding: 24px;
    background: #f0f0f0;
    border: 3px solid #999;
    text-decoration: none;
    color: inherit;
    position: relative;
}

.page-card::before {
    content: "░▒▓█";
    position: absolute;
    top: 8px;
    right: 10px;
    color: #bbb;
    font-size: 0.7rem;
}

.page-card:hover {
    border-color: #555;
    background: #e8e8e8;
}

.card-meta {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
}

.card-category {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #222;
    background: #ddd;
    padding: 2px 8px;
    border: 2px solid #999;
    font-family: var(--font-mono);
}

.card-title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 8px;
    color: #111;
}

.card-description {
    font-size: 0.88rem;
    color: #444;
    line-height: 1.7;
    flex: 1;
    margin-bottom: 16px;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 2px solid #bbb;
}

.card-date {
    font-size: 0.78rem;
    color: var(--color-text-muted);
}

.card-tags {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.card-tag {
    font-size: 0.72rem;
    padding: 1px 6px;
    background: #e0e0e0;
    color: #555;
    border: 1px solid #aaa;
    font-family: var(--font-mono);
}

/* --- Scrollbar Styling --- */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: #ddd;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #999;
}

/* --- Code Block Copy Button --- */
.code-block-wrapper {
    position: relative;
}

.copy-button {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #444;
    color: #ccc;
    border: 2px solid #777;
    padding: 3px 10px;
    font-size: 0.75rem;
    cursor: pointer;
    font-family: var(--font-mono);
}

.copy-button:hover {
    background: #666;
    color: #fff;
}

/* --- Hamburger Menu (hidden on desktop) --- */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 110;
}

.hamburger-line {
    display: block;
    width: 22px;
    height: 2px;
    background: #ccc;
    transition: transform 0.3s, opacity 0.3s;
}

.hamburger.active .hamburger-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.hamburger.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger.active .hamburger-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* --- Responsive --- */
/* Hide logo text when full logo (~130px) would overlap the nav content area */
@media (min-width: 769px) and (max-width: 1279px) {
    .logo-text {
        display: none;
    }
}

@media (max-width: 1024px) {
    .sidebar {
        display: none;
    }
    .content {
        margin-left: 0;
    }
    .page-post .header-inner {
        max-width: var(--content-max-width);
        padding-left: 48px;
    }
}

@media (max-width: 768px) {
    .header-inner {
        padding: 0 16px;
    }
    .page-post .header-inner {
        padding: 0 16px;
    }
    .site-logo {
        position: static;
        transform: none;
    }
    .hamburger {
        display: flex;
        margin-left: auto;
        flex-shrink: 0;
    }
    .header-nav {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--color-header-bg);
        flex-direction: column;
        padding: 8px 0;
        border-bottom: 3px solid #444;
    }
    .header-nav.open {
        display: flex;
    }
    .header-nav .nav-link {
        padding: 10px 24px;
        font-size: 1rem;
        border: none;
    }
    .header-nav .nav-link:hover,
    .header-nav .nav-link.active {
        background: #222;
        border: none;
    }
    .content-inner {
        padding: 24px 16px 60px;
    }
    .index-content {
        padding: 32px 16px 60px;
    }
    .index-hero h1 {
        font-size: 1.8rem;
    }
    .article h1 {
        font-size: 1.5rem;
    }
    .article h2 {
        font-size: 1.2rem;
    }
    .article p {
        padding: 12px 14px;
    }
    .header-actions {
        display: none;
    }
    .page-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .page-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --- Selection Color --- */
::selection {
    background: #999;
    color: #fff;
}

/* --- Tab component for content switching --- */
.tab-container {
    margin: 20px 0 24px;
    border: 3px solid #888;
    overflow: hidden;
}

.tab-header {
    display: flex;
    background: #ddd;
    border-bottom: 2px solid #888;
}

.tab-button {
    padding: 10px 24px;
    background: none;
    border: none;
    border-right: 2px solid #bbb;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 500;
    color: #555;
    cursor: pointer;
}

.tab-button:hover {
    color: #111;
    background: #e0e0e0;
}

.tab-button.active {
    color: #000;
    background: #f5f5f5;
    font-weight: 700;
    border-bottom: 3px solid #333;
}

.tab-content {
    padding: 20px;
}

/* --- Terminal-style inline references --- */
.terminal-ref {
    display: inline-flex;
    align-items: center;
    padding: 1px 8px;
    background: #ddd;
    border: 2px solid #999;
    font-size: 0.85em;
    font-weight: 700;
    color: #222;
}

/* --- Kbd (keyboard key) styling --- */
.article kbd {
    display: inline-block;
    padding: 2px 8px;
    font-family: var(--font-mono);
    font-size: 0.82em;
    background: #ddd;
    border: 2px solid #999;
    border-bottom-width: 3px;
    color: #222;
}

/* --- Site Footer --- */
.site-footer {
    text-align: center;
    padding: 24px;
    margin-top: 48px;
    border-top: 2px solid #ccc;
    color: #666;
    font-size: 0.9rem;
}

.site-footer p {
    margin: 0;
}

/* --- Theme Toggle Button --- */
.theme-toggle {
    background: transparent;
    color: #999;
    border: 2px solid #555;
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 1rem;
    padding: 4px 10px;
    line-height: 1;
    display: flex;
    align-items: center;
}

.theme-toggle:hover {
    color: #fff;
    background: #333;
}

/* Show moon by default (light mode), sun when dark */
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: inline; }

[data-theme="dark"] .theme-toggle .icon-sun { display: inline; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* --- Dark Mode --- */
[data-theme="dark"] {
    --color-bg: #1a1a1a;
    --color-bg-alt: #222222;
    --color-bg-sidebar: #1e1e1e;
    --color-text: #d4d4d4;
    --color-text-secondary: #bbbbbb;
    --color-text-muted: #888888;
    --color-border: #444444;
    --color-border-light: #333333;
    --color-primary: #cccccc;
    --color-primary-light: #2a2a2a;
    --color-primary-dark: #e0e0e0;
    --color-accent: #dddddd;
    --color-accent-light: #2a2a2a;
    --color-code-bg: #0d0d0d;
    --color-code-text: #cccccc;
    --color-inline-code-bg: #2a2a2a;
    --color-inline-code-text: #d4d4d4;
    --color-header-bg: #0d0d0d;
    --color-header-text: #d4d4d4;
}

/* Dark mode - Header */
[data-theme="dark"] .site-header {
    border-bottom-color: #333;
}

[data-theme="dark"] .hamburger-line {
    background: #999;
}

[data-theme="dark"] .header-nav {
    border-bottom-color: #333;
}

[data-theme="dark"] .nav-link {
    color: #777;
}

[data-theme="dark"] .nav-link:hover,
[data-theme="dark"] .nav-link.active {
    color: #e0e0e0;
    border-color: #555;
    background: #2a2a2a;
}

[data-theme="dark"] .btn {
    border-color: #555;
}

[data-theme="dark"] .btn-signup {
    background: #333;
    color: #ccc;
}

[data-theme="dark"] .btn-signup:hover {
    background: #444;
    color: #fff;
}

/* Dark mode - Sidebar */
[data-theme="dark"] .toc-link.active {
    color: #fff;
    border-left-color: #aaa;
    background: #2a2a2a;
}

[data-theme="dark"] .toc-link:hover {
    border-left-color: #666;
}

[data-theme="dark"] .category-tag {
    background: #2a2a2a;
    color: #ccc;
    border-color: #555;
}

/* Dark mode - Article headings */
[data-theme="dark"] .article h1 {
    color: #e0e0e0;
    background: #252525;
    border-color: #555;
}

[data-theme="dark"] .article h2 {
    background: #222;
    border-color: #555;
    color: #d4d4d4;
}

[data-theme="dark"] .article h3 {
    background: #222;
    border-color: #555;
    border-left-color: #666;
    color: #ccc;
}

[data-theme="dark"] .article h4 {
    background: #1e1e1e;
    border-left-color: #555;
    color: #bbb;
}

/* Dark mode - Article content */
[data-theme="dark"] .article p {
    border-color: #333;
    background: #1e1e1e;
}

[data-theme="dark"] .article a {
    color: #ccc;
    text-decoration-color: #666;
}

[data-theme="dark"] .article a:hover {
    color: #fff;
    text-decoration-color: #999;
    background: #2a2a2a;
}

[data-theme="dark"] .article strong {
    color: #e0e0e0;
}

[data-theme="dark"] .article ul,
[data-theme="dark"] .article ol {
    border-color: #333;
    background: #1e1e1e;
}

[data-theme="dark"] .article li::marker {
    color: #888;
}

[data-theme="dark"] .article img {
    border-color: #555;
}

[data-theme="dark"] .article hr::after {
    color: #555;
}

/* Dark mode - Inline code */
[data-theme="dark"] .article code {
    background: var(--color-inline-code-bg);
    color: var(--color-inline-code-text);
    border-color: #555;
}

/* Dark mode - Code blocks */
[data-theme="dark"] .article pre {
    border-color: #444;
}

/* Dark mode - Tables */
[data-theme="dark"] .article table {
    border-color: #444;
}

[data-theme="dark"] .article thead {
    background: #2a2a2a;
}

[data-theme="dark"] .article th {
    border-bottom-color: #444;
    color: #d4d4d4;
}

[data-theme="dark"] .article td {
    border-bottom-color: #333;
}

[data-theme="dark"] .article tbody tr:hover {
    background: #252525;
}

/* Dark mode - Blockquotes */
[data-theme="dark"] .article blockquote {
    border-color: #444;
    border-left-color: #666;
    background: #222;
}

[data-theme="dark"] .article blockquote::before {
    color: #444;
}

/* Dark mode - Callouts */
[data-theme="dark"] .callout {
    background: #222;
    border-color: #555;
    border-left-color: #666;
}

[data-theme="dark"] .callout-title {
    color: #ccc;
}

[data-theme="dark"] .callout-note { background: #222; border-color: #555; border-left-color: #666; }
[data-theme="dark"] .callout-tip { background: #1e2a1e; border-color: #555; border-left-color: #4a7; }
[data-theme="dark"] .callout-warning { background: #2a2a1e; border-color: #555; border-left-color: #a84; }
[data-theme="dark"] .callout-important { background: #2a1e1e; border-color: #555; border-left-color: #a44; }
[data-theme="dark"] .callout-caution { background: #2a221e; border-color: #555; border-left-color: #a64; }
[data-theme="dark"] .callout-info { background: #1e222a; border-color: #555; border-left-color: #48a; }

/* Dark mode - Article tags */
[data-theme="dark"] .article-tag {
    background: #2a2a2a;
    color: #bbb;
    border-color: #555;
}

[data-theme="dark"] .article-tag:hover {
    background: #333;
    color: #fff;
    border-color: #777;
}

/* Dark mode - Page meta */
[data-theme="dark"] .meta-category {
    color: #ccc;
    background: #2a2a2a;
    border-color: #555;
}

/* Dark mode - Index page */
[data-theme="dark"] .index-hero {
    border-color: #444;
    background: #222;
}

[data-theme="dark"] .index-hero h1 {
    color: #e0e0e0;
}

[data-theme="dark"] .hero-subtitle {
    color: #888;
}

[data-theme="dark"] .page-card {
    background: #222;
    border-color: #444;
}

[data-theme="dark"] .page-card::before {
    color: #444;
}

[data-theme="dark"] .page-card:hover {
    border-color: #666;
    background: #2a2a2a;
}

[data-theme="dark"] .card-category {
    color: #ccc;
    background: #2a2a2a;
    border-color: #555;
}

[data-theme="dark"] .card-title {
    color: #d4d4d4;
}

[data-theme="dark"] .card-description {
    color: #999;
}

[data-theme="dark"] .card-footer {
    border-top-color: #444;
}

[data-theme="dark"] .card-tag {
    background: #2a2a2a;
    color: #888;
    border-color: #444;
}

/* Dark mode - Tab component */
[data-theme="dark"] .tab-container {
    border-color: #444;
}

[data-theme="dark"] .tab-header {
    background: #222;
    border-bottom-color: #444;
}

[data-theme="dark"] .tab-button {
    color: #888;
    border-right-color: #333;
}

[data-theme="dark"] .tab-button:hover {
    color: #d4d4d4;
    background: #2a2a2a;
}

[data-theme="dark"] .tab-button.active {
    color: #e0e0e0;
    background: #1a1a1a;
    border-bottom-color: #ccc;
}

/* Dark mode - Other elements */
[data-theme="dark"] .terminal-ref {
    background: #2a2a2a;
    border-color: #555;
    color: #ccc;
}

[data-theme="dark"] .article kbd {
    background: #2a2a2a;
    border-color: #555;
    color: #ccc;
}

[data-theme="dark"] .site-footer {
    border-top-color: #333;
    color: #666;
}

/* Dark mode - Scrollbar */
[data-theme="dark"] .sidebar::-webkit-scrollbar-track {
    background: #222;
}

[data-theme="dark"] .sidebar::-webkit-scrollbar-thumb {
    background: #555;
}

/* Dark mode - Copy button */
[data-theme="dark"] .copy-button {
    background: #333;
    color: #aaa;
    border-color: #555;
}

[data-theme="dark"] .copy-button:hover {
    background: #444;
    color: #fff;
}

/* Dark mode - Selection */
[data-theme="dark"] ::selection {
    background: #555;
    color: #fff;
}

/* Dark mode - Theme toggle */
[data-theme="dark"] .theme-toggle {
    color: #888;
    border-color: #555;
}

[data-theme="dark"] .theme-toggle:hover {
    color: #fff;
    background: #333;
}
