/* 
   Technical Article Polish - 2026 Edition 
   Usage: Add <link rel="stylesheet" href="/css/tech-style.css"> to your post
*/


/* 1. Global Container & Typography */
#article-container {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-size: 18px;
    line-height: 1.75;
    color: #2c3e50;
    letter-spacing: -0.011em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 2. Headings */
#article-container h1,
#article-container h2,
#article-container h3,
#article-container h4 {
    font-family: 'Inter', sans-serif;
    color: #1a202c;
    font-weight: 700;
    line-height: 1.3;
    margin-top: 2em;
    margin-bottom: 0.8em;
    letter-spacing: -0.035em;
    scroll-margin-top: 80px;
}

#article-container h1 {
    font-size: 2.25em;
    border-bottom: none;
}

#article-container h2 {
    font-size: 1.75em;
    padding-bottom: 0.3em;
    border-bottom: 1px solid #eaecef;
}

#article-container h3 {
    font-size: 1.4em;
}

/* 3. Paragraphs & Lists */
#article-container p {
    margin-bottom: 1.8em;
}

#article-container ul,
#article-container ol {
    margin-bottom: 1.8em;
    padding-left: 1.8em;
}

#article-container li {
    margin-bottom: 0.5em;
}

/* 4. Code Blocks */
#article-container .highlight {
    background-color: #0d1117 !important;
    /* GitHub Dark */
    color: #c9d1d9 !important;
    /* GitHub Light Text */
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin: 2em 0;
    border: 1px solid #30363d;
}

/* Force transparency on inner elements so container background shows */
#article-container .highlight table,
#article-container .highlight tr,
#article-container .highlight td,
#article-container .highlight pre {
    background: transparent !important;
    border: none !important;
}

#article-container .highlight .gutter {
    background-color: #0d1117 !important;
    border-right: 1px solid #30363d !important;
    color: #484f58 !important;
}

#article-container .highlight .code pre {
    padding-left: 10px;
    width: 100%;
}

#article-container pre,
#article-container code {
    font-family: 'JetBrains Mono', 'Fira Code', monospace !important;
    font-size: 14.5px;
    font-variant-ligatures: common-ligatures;
    line-height: 1.6;
    color: #c9d1d9 !important;
    /* Ensure text is light */
}

/* Inline code (not inside pre) */
#article-container :not(pre)>code {
    background-color: rgba(175, 184, 193, 0.2);
    color: #24292f;
    padding: 0.2em 0.4em;
    border-radius: 6px;
    font-size: 0.85em;
    font-weight: 500;
}

/* Inline code adjustments for dark mode */
[data-theme="dark"] #article-container :not(pre)>code {
    background-color: rgba(110, 118, 129, 0.4);
    color: #e6edf3;
}

/* Scrollbars */
#article-container .highlight table {
    display: block;
    overflow-x: auto;
}

#article-container .highlight::-webkit-scrollbar {
    height: 8px;
    background-color: #0d1117;
}

#article-container .highlight::-webkit-scrollbar-thumb {
    background-color: #30363d;
    border-radius: 4px;
}

/* 5. Blockquotes */
#article-container blockquote {
    border-left: 4px solid #4285f4;
    background: #f8f9fa;
    color: #5f6368;
    margin: 2em 0;
    padding: 1em 1.5em;
    border-radius: 0 8px 8px 0;
    font-style: normal;
}

/* 6. Links */
#article-container a {
    color: #0969da;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
    font-weight: 500;
}

#article-container a:hover {
    color: #0a58ca;
    border-bottom-color: #0a58ca;
}

/* 7. Images */
#article-container img {
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    display: block;
    margin: 2.5em auto;
    max-width: 100%;
}

/* 8. Math Formulas */
.mjx-chtml {
    font-size: 115% !important;
    padding: 1em 0;
}

/* 9. Selection */
::selection {
    background: rgba(66, 133, 244, 0.25);
    color: inherit;
}

/* Dark Mode */
[data-theme="dark"] #article-container {
    color: #e6edf3;
}

[data-theme="dark"] #article-container h1,
[data-theme="dark"] #article-container h2,
[data-theme="dark"] #article-container h3 {
    color: #ffffff;
    border-bottom-color: #30363d;
}

[data-theme="dark"] #article-container :not(pre)>code {
    background-color: rgba(110, 118, 129, 0.4);
    color: #e6edf3;
}