/* ghmd-blog demosten dark theme - Dark mode companion to demosten_light */

:root[data-theme="dark"] {
    /* Colors - Demosten dark theme - Midnight blue background with ivory/gold accents */
    --bg-primary: #0a0e1a;            /* Very dark navy - night mode version of demosten */
    --bg-secondary: #131827;          /* Slightly lighter navy - for sections */
    --bg-code: #1a2234;               /* Dark blue-gray - code blocks */
    --text-primary: #FFFACD;          /* Lemon chiffon - inverted from light theme's bg-secondary */
    --text-secondary: #DEB887;        /* Burlywood - softer secondary text */
    --text-muted: #a1a1aa;            /* Muted gray - for less important text */
    --accent: #6B9FED;                /* Lighter royal blue - readable on dark */
    --accent-hover: #FFD700;          /* Gold - hover state (elevated from light theme) */
    --border: #2a3f5f;                /* Dark blue-gray - borders */
    --shadow: rgba(0, 0, 0, 0.5);     /* Deeper shadows for dark mode */

    /* Syntax highlighting colors - Mix of demosten palette and default_dark */
    --syntax-comment: #a1a1aa;        /* Muted gray (from default_dark) */
    --syntax-keyword: #6B9FED;        /* Lighter royal blue - keywords */
    --syntax-string: #4ade80;         /* Green (from default_dark) */
    --syntax-number: #FFBB66;         /* Light orange - numbers */
    --syntax-function: #6B9FED;       /* Lighter royal blue - functions */
    --syntax-class: #FFD700;          /* Gold - classes */
    --syntax-operator: #f87171;       /* Red (from default_dark) */
    --syntax-builtin: #22d3ee;        /* Cyan (from default_dark) */
    --syntax-variable: #fb923c;       /* Orange (from default_dark) */
    --syntax-escape: #c084fc;         /* Purple (from default_dark) */
    --syntax-attribute: #fbbf24;      /* Yellow (from default_dark) */
    --syntax-tag: #6B9FED;            /* Lighter royal blue - tags */
    --syntax-decorator: #22d3ee;      /* Cyan (from default_dark) */

    /* Typography */
    --font-size-base: 17px;
    --line-height: 1.7;

    /* Spacing */
    --content-width: 720px;
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
}

/* Demosten table styling - Dark mode */
:root[data-theme="dark"] .post-content table {
    margin: 1rem 0;
    border-collapse: separate;
    border-spacing: 3px;  /* Space between cells like demosten.com */
}

:root[data-theme="dark"] .post-content th {
    background-color: #1a3a5f;
    background-image: linear-gradient(180deg, #1a3a5f 0%, #2a4a6f 100%);
    color: #FFFACD;
    font-weight: 600;
    text-align: center;
    padding: 0.5rem 0.75rem;
    border-top: 2px solid #2a3f5f;
    border-bottom: 2px solid #2a3f5f;
    border-left: none;
    border-right: none;
}

:root[data-theme="dark"] .post-content thead th {
    border-top: 2px solid #2a3f5f;
}

:root[data-theme="dark"] .post-content tfoot th {
    border-bottom: 2px solid #2a3f5f;
}

:root[data-theme="dark"] .post-content td {
    color: #FFFACD;
    padding: 0.5rem 0.75rem;
    vertical-align: top;
    border: none;
}

:root[data-theme="dark"] .post-content tbody tr:nth-child(odd) {
    background-color: #131827;  /* Lighter navy - alternating rows */
}

:root[data-theme="dark"] .post-content tbody tr:nth-child(even) {
    background-color: transparent;  /* Shows page background (dark navy) */
}

:root[data-theme="dark"] .post-content caption {
    background-color: #9a7d4d;
    color: #FFFACD;
    font-weight: bold;
    text-align: center;
    padding: 0.5rem;
    caption-side: top;
}
