[data-theme="midnight"] {
    --bg: #0a0e18;
    --bg-secondary: #12182a;
    --bg-tertiary: #1a2540;
    --text: #d0d9e8;
    --text-secondary: #8899b0;
    --text-muted: #445570;
    --border: #283850;
    --border-light: #1c2840;
    --accent: #4499ff;
    --accent-hover: #66b0ff;
    --accent-light: #0a2555;

    --font-sans: "Source Sans 3", system-ui, -apple-system, sans-serif;
    --font-serif: "Source Serif 4", Charter, Georgia, "Times New Roman", serif;
    --font-mono: "JetBrains Mono", "SF Mono", "Fira Code", "Fira Mono", "Cascadia Code", monospace;
    --font-heading: "Source Serif 4", Charter, Georgia, "Times New Roman", serif;
    --font-body: var(--font-serif);

    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.15), 0 2px 4px rgba(0,0,0,0.12);
}

[data-theme="midnight"] .article-content,
[data-theme="midnight"] .editor-preview {
    font-family: var(--font-body);
    line-height: 1.82;
    font-size: 1.08rem;
    letter-spacing: 0.008em;
    color: #c9d1d9;
}

[data-theme="midnight"] .article-content h1,
[data-theme="midnight"] .article-content h2,
[data-theme="midnight"] .article-content h3,
[data-theme="midnight"] .article-header h1,
[data-theme="midnight"] .editor-preview h1,
[data-theme="midnight"] .editor-preview h2,
[data-theme="midnight"] .editor-preview h3,
[data-theme="midnight"] .list-page h1,
[data-theme="midnight"] .feed-top-bar h2,
[data-theme="midnight"] .article-slice-title {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.005em;
    color: #e6edf3;
}

[data-theme="midnight"] .article-content h1 {
    font-size: 2.6rem;
}

[data-theme="midnight"] .article-content h2 {
    font-size: 1.8rem;
}

[data-theme="midnight"] .article-content h3 {
    font-size: 1.35rem;
}

[data-theme="midnight"] .article-content p {
    margin-bottom: 1.25em;
}

[data-theme="midnight"] a {
    color: var(--accent);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.14em;
}

[data-theme="midnight"] a:hover {
    color: var(--accent-hover);
}

[data-theme="midnight"] .article-content ul {
    list-style: none;
    padding-left: 1.4rem;
}

[data-theme="midnight"] .article-content ul li {
    position: relative;
    margin-bottom: 0.4rem;
}

[data-theme="midnight"] .article-content ul li::before {
    content: "✦";
    position: absolute;
    left: -1.2rem;
    top: 0.02rem;
    color: var(--accent);
    font-size: 0.7rem;
}

[data-theme="midnight"] .article-content ol li::marker {
    color: var(--accent);
    font-weight: 700;
}

[data-theme="midnight"] blockquote {
    margin: 1.6rem 0;
    padding: 0.6rem 1.3rem;
    border-left: 3px ridge var(--accent);
    color: var(--text-secondary);
    font-style: italic;
    background: #161b22;
}

[data-theme="midnight"] code,
[data-theme="midnight"] pre {
    font-family: var(--font-mono);
    background: #161b22;
    border: 1px ridge var(--border);
    border-radius: 4px;
}

[data-theme="midnight"] code {
    padding: 0.1rem 0.3rem;
    color: #ffa198;
    font-size: 0.88em;
}

[data-theme="midnight"] pre {
    padding: 1rem;
    overflow-x: auto;
}

[data-theme="midnight"] table {
    width: 100%;
    border-collapse: collapse;
    background: #161b22;
}

[data-theme="midnight"] th {
    font-family: var(--font-sans);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.76rem;
    background: var(--bg-tertiary);
}

[data-theme="midnight"] th,
[data-theme="midnight"] td {
    border: 1px ridge var(--border);
    padding: 0.7rem 0.9rem;
}

[data-theme="midnight"] hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 2rem 0;
}

[data-theme="midnight"] .article-content > p:first-of-type::first-letter {
    float: left;
    font-family: var(--font-heading);
    font-size: 4.4rem;
    line-height: 0.85;
    margin-right: 0.1em;
    margin-top: 0.06em;
    color: var(--accent);
    font-weight: 700;
}

[data-theme="midnight"] ::selection {
    background: #1f3a5f;
    color: #e6edf3;
}
