/* --- 1. Particles JS Background Fix --- */
#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: transparent;
}
#particles-js canvas {
    display: block;
}

h1, .h1 {
    margin-bottom: 2em;
    font-size: calc(34px + 5 * ((100vw - 300px) / (1600 - 300)));
    text-align: center;
}

/* --- 2. Global Resets --- */
body {
    background-color: #ffffff;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    transition: background-color 0.3s ease;
    z-index: 2;
}

/* --- 3. Article Content & Typography --- */
.article-content {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #333;
}

.article-content p {
    font-size: calc(16px + 5 * ((100vw - 300px) / 1300));
    line-height: 1.6;
    margin-bottom: 1.25em;
    text-indent: 2em;
}

.article-content h1 {
    font-size: calc(34px + 4 * ((100vw - 300px) / 1300));
    line-height: 1.2;
    margin-bottom: 1.5em;
    text-align: center;
    color: #1a4fa3;
}

/* Reset indentation for specific elements that should stay flush-left */
.article-content h2 + p, 
.article-content h3 + p,
.article-content img + p,
.internal-link-block p,
.cta-box p {
    /*text-indent: 0;*/
}

/* Headings */
.article-content h2 {
    color: #1a4fa3;
    margin: 45px 0 25px 0;
}

/* List Formatting */
.article-content ul {
    list-style-type: disc;
    margin-bottom: 30px;
    padding-left: 40px;
}

.article-content li {
    font-size: calc(16px + 5 * ((100vw - 300px) / 1300));
    margin-bottom: 12px;
}

h1:not(:last-child), .h1:not(:last-child) {
    margin-bottom: 2em;
    font-size: calc(34px + 5 * ((100vw - 300px) / (1600 - 300))); 
    text-align: center;
}


/* --- 4. Injected Components --- */
.internal-link-block {
    background: #f8f9fa;
    border-left: 4px solid #1a4fa3;
    padding: 25px;
    margin: 40px 0;
    font-style: italic;
    border-radius: 0 4px 4px 0;
}

.internal-link-block a {
    color: #1a4fa3;
    font-weight: bold;
    text-decoration: underline;
}

.cta-box {
    text-align: center;
    background: #f0f7ff;
    border: 2px dashed #007bff;
    padding: 30px;
    margin: 50px 0;
    border-radius: 8px;
}

/* Images */
.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 20px 0;
    display: block;
}

/* --- 5. Dark Mode --- */
@media (prefers-color-scheme: dark) {
    body { background-color: #0b0f19 !important; }
    .article-content { color: #d0d0d0 !important; }
    .article-content h1, .article-content h2, .article-content h3 { color: #4A90E2 !important; }
    .internal-link-block { background: #161b28 !important; border-left-color: #4A90E2 !important; }
    .internal-link-block a { color: #4A90E2 !important; }
    .cta-box { background: #0d1622 !important; border-color: #4A90E2 !important; }
}

/* --- 6. Responsive Adjustments --- */
@media (max-width: 768px) {
    .article-content h1 { font-size: 2rem; }
}
