/*
 * Signal & Noise — article styling for jameshayek.com/signal-noise/
 *
 * Self-contained on purpose. The CV's styles.css carries page-specific layout
 * (hero, timeline, contact grid) that an article page has no use for, and
 * importing it would mean every future CV layout tweak silently reflows the
 * publication. What is shared instead is the design language: the same colour
 * tokens, the same system font stack. Copy any token change across both files.
 *
 * Generated pages link only this file.
 */

:root {
    --white: #FFFFFF;
    --off-white: #F8F9FA;
    --charcoal: #2C3E50;
    --midnight-blue: #1A365D;
    --midnight-blue-light: #2C5282;
    --accent-blue: #3182CE;
    --text-dark: #1A202C;
    --text-medium: #4A5568;
    --text-light: #718096;
    --border-color: #E2E8F0;
    --transition-fast: all 0.2s ease;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--white);
    color: var(--text-dark);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 1.125rem;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ---------- Masthead ---------- */

.masthead {
    background: var(--midnight-blue);
    color: var(--white);
    padding: 2rem 0;
}

.masthead a {
    color: var(--white);
    text-decoration: none;
}

.masthead-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.masthead-tagline {
    margin: 0.25rem 0 0;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.75);
}

/* ---------- Article ---------- */

.article {
    padding: 3.5rem 0 4rem;
}

.article-title {
    margin: 0 0 1rem;
    font-size: 2.5rem;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--midnight-blue);
}

.article-meta {
    margin: 0 0 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
    color: var(--text-light);
}

.article-body h2 {
    margin: 3rem 0 1rem;
    font-size: 1.75rem;
    line-height: 1.3;
    font-weight: 700;
    color: var(--midnight-blue);
}

.article-body h3 {
    margin: 2.25rem 0 0.75rem;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--charcoal);
}

.article-body p {
    margin: 0 0 1.5rem;
    color: var(--text-medium);
}

.article-body strong {
    color: var(--text-dark);
    font-weight: 600;
}

.article-body ul,
.article-body ol {
    margin: 0 0 1.5rem;
    padding-left: 1.5rem;
    color: var(--text-medium);
}

.article-body li {
    margin-bottom: 0.6rem;
}

.article-body a {
    color: var(--accent-blue);
    text-decoration: none;
    border-bottom: 1px solid rgba(49, 130, 206, 0.35);
    transition: var(--transition-fast);
}

.article-body a:hover {
    border-bottom-color: var(--accent-blue);
}

.article-body blockquote {
    margin: 2rem 0;
    padding: 0.5rem 0 0.5rem 1.5rem;
    border-left: 3px solid var(--accent-blue);
    color: var(--charcoal);
    font-style: italic;
}

.article-body code {
    background: var(--off-white);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.1em 0.35em;
    font-size: 0.9em;
}

/* ---------- Index ---------- */

.index-intro {
    padding: 3.5rem 0 1rem;
}

.index-intro h1 {
    margin: 0 0 1rem;
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--midnight-blue);
}

.index-intro p {
    margin: 0;
    color: var(--text-medium);
}

.article-list {
    list-style: none;
    margin: 0;
    padding: 2rem 0 4rem;
}

.article-list li {
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-color);
}

.article-list li:first-child {
    border-top: 1px solid var(--border-color);
}

.article-list h2 {
    margin: 0 0 0.5rem;
    font-size: 1.4rem;
    font-weight: 600;
    line-height: 1.35;
}

.article-list h2 a {
    color: var(--midnight-blue);
    text-decoration: none;
    transition: var(--transition-fast);
}

.article-list h2 a:hover {
    color: var(--accent-blue);
}

.article-list time {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
}

.article-list p {
    margin: 0;
    font-size: 1rem;
    color: var(--text-medium);
}

.empty-state {
    padding: 2rem 0 4rem;
    color: var(--text-light);
}

/* ---------- Footer ---------- */

.site-footer {
    border-top: 1px solid var(--border-color);
    padding: 2.5rem 0;
    font-size: 0.9rem;
    color: var(--text-light);
}

.site-footer a {
    color: var(--text-medium);
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--accent-blue);
}

/* ---------- Small screens ---------- */

@media (max-width: 640px) {
    body {
        font-size: 1.05rem;
    }

    .article-title {
        font-size: 1.9rem;
    }

    .article-body h2 {
        font-size: 1.4rem;
    }

    .index-intro h1 {
        font-size: 1.8rem;
    }
}
