/* Explain: Base CSS reset and global typography styles for the application. */
* {
    box-sizing: border-box;
}

html {
    background: var(--background-color);
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
    margin: 0;
    background: var(--background-color);
    color: var(--text-color);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 {
    font-family: var(--font-heading);
    color: var(--text-color);
    line-height: 1.14;
    letter-spacing: 0.004em;
    margin: 0;
    font-weight: 600;
}

p { margin: 0; }

a { color: inherit; }

button { font-family: var(--font-body); }

img { max-width: 100%; }

::selection {
    background: var(--primary-soft);
    color: var(--primary-deep);
}

:target {
    scroll-margin-top: 110px;
}

/* Article body typography (rendered rich text) */
.article-body p { margin-bottom: 1.15rem; }
.article-body h2 { font-size: 1.75rem; margin: 2.2rem 0 0.85rem; }
.article-body h3 { font-size: 1.25rem; margin: 1.6rem 0 0.6rem; }
.article-body ul,
.article-body ol { list-style: disc; padding-left: 1.35rem; margin: 0 0 1.15rem; }
.article-body li { margin-bottom: 0.4rem; }
.article-body strong { color: var(--text-color); font-weight: 600; }
.article-body blockquote {
    border-left: 3px solid var(--primary-soft);
    padding-left: 1.1rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--text-muted);
}

/* Subtle scroll-reveal (opt-in: class added by JS so content is never hidden without it) */
.reveal-init {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-init.is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal-init { opacity: 1; transform: none; transition: none; }
}