/* henryobegi.com — Personal site stylesheet */

:root {
    --brand: #1E40AF;
    --ink: #0F172A;
    --muted: #64748B;
    --bg: #FFFFFF;
    --surface: #F8FAFC;
    --line: #E2E8F0;
}

/* ── Reset & Base ─────────────────────────────────────────── */

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--brand);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

/* ── Layout ───────────────────────────────────────────────── */

.site-wrapper {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Navigation ───────────────────────────────────────────── */

.site-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 0;
    border-bottom: 1px solid var(--line);
    margin-bottom: 48px;
}

.site-nav .nav-brand {
    font-size: 18px;
    font-weight: 700;
    color: var(--ink);
    text-decoration: none;
}

.site-nav .nav-brand:hover {
    text-decoration: none;
    color: var(--brand);
}

.site-nav .nav-links {
    display: flex;
    gap: 28px;
    list-style: none;
}

.site-nav .nav-links a {
    font-size: 14px;
    color: var(--muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s;
}

.site-nav .nav-links a:hover,
.site-nav .nav-links a.active {
    color: var(--ink);
}

/* ── Homepage ─────────────────────────────────────────────── */

.page-header {
    margin-bottom: 48px;
}

.page-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 8px;
    line-height: 1.3;
}

.page-header .tagline {
    font-size: 16px;
    color: var(--muted);
    font-weight: 400;
}

/* ── Article List (Homepage) ──────────────────────────────── */

.article-list {
    list-style: none;
}

.article-list li {
    padding: 32px 0;
    border-bottom: 1px solid var(--line);
}

.article-list li:first-child {
    padding-top: 0;
}

.article-list li:last-child {
    border-bottom: none;
}

.article-list .article-date {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 6px;
}

.article-list .article-title {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 8px;
}

.article-list .article-title a {
    color: var(--ink);
    text-decoration: none;
}

.article-list .article-title a:hover {
    color: var(--brand);
}

.article-list .article-excerpt {
    font-size: 15px;
    color: var(--muted);
    line-height: 1.6;
}

/* ── Article Page ─────────────────────────────────────────── */

.article-header {
    margin-bottom: 40px;
}

.article-header h1 {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--ink);
    margin-bottom: 12px;
}

.article-header .article-meta {
    font-size: 14px;
    color: var(--muted);
}

.article-body {
    font-size: 18px;
    line-height: 1.7;
    color: var(--ink);
    overflow-wrap: break-word;
}

.article-body h2 {
    font-size: 24px;
    font-weight: 700;
    margin-top: 48px;
    margin-bottom: 16px;
    color: var(--ink);
    line-height: 1.3;
}

.article-body h3 {
    font-size: 20px;
    font-weight: 600;
    margin-top: 36px;
    margin-bottom: 12px;
    color: var(--ink);
    line-height: 1.35;
}

.article-body h4 {
    font-size: 18px;
    font-weight: 600;
    margin-top: 28px;
    margin-bottom: 8px;
    color: var(--ink);
}

.article-body p {
    margin-bottom: 20px;
}

.article-body ul,
.article-body ol {
    margin-bottom: 20px;
    padding-left: 24px;
}

.article-body li {
    margin-bottom: 8px;
}

.article-body blockquote {
    border-left: 3px solid var(--brand);
    padding: 12px 20px;
    margin: 24px 0;
    background: var(--surface);
    color: var(--muted);
    font-style: italic;
}

.article-body blockquote p {
    margin-bottom: 0;
}

.article-body code {
    font-family: "SF Mono", "Fira Code", Menlo, Consolas, "DejaVu Sans Mono", monospace;
    font-size: 0.88em;
    background: var(--surface);
    padding: 2px 6px;
    border-radius: 3px;
}

.article-body pre {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 16px 20px;
    overflow-x: auto;
    margin: 24px 0;
    line-height: 1.5;
}

.article-body pre code {
    background: none;
    padding: 0;
    font-size: 14px;
}

.article-body img {
    border-radius: 4px;
    display: block;
}

.article-body figure {
    margin: 28px 0;
}

.article-body figure img {
    width: 100%;
}

.article-body figcaption {
    font-size: 13px;
    color: var(--muted);
    text-align: center;
    margin-top: 8px;
    line-height: 1.4;
}

.article-body hr {
    border: none;
    border-top: 1px solid var(--line);
    margin: 40px 0;
}

.article-body a {
    color: var(--brand);
    text-decoration: underline;
    text-decoration-color: rgba(30, 64, 175, 0.3);
    text-underline-offset: 2px;
}

.article-body a:hover {
    text-decoration-color: var(--brand);
}

/* ── About / Ventures Pages ───────────────────────────────── */

.page-content {
    font-size: 17px;
    line-height: 1.7;
    color: var(--ink);
    overflow-wrap: break-word;
}

.page-content h2 {
    font-size: 22px;
    font-weight: 700;
    margin-top: 40px;
    margin-bottom: 14px;
    color: var(--ink);
}

.page-content h3 {
    font-size: 18px;
    font-weight: 600;
    margin-top: 32px;
    margin-bottom: 10px;
    color: var(--ink);
}

.page-content p {
    margin-bottom: 18px;
}

.page-content ul,
.page-content ol {
    margin-bottom: 18px;
    padding-left: 24px;
}

.page-content li {
    margin-bottom: 6px;
}

.page-content a {
    color: var(--brand);
}

/* ── Chart containers (Plotly) ────────────────────────────── */

.chart-container {
    margin: 28px 0;
}

.chart-container .js-plotly-plot {
    border-radius: 4px;
}

/* ── Footer ───────────────────────────────────────────────── */

.site-footer {
    margin-top: 64px;
    padding: 24px 0;
    border-top: 1px solid var(--line);
    text-align: center;
    font-size: 13px;
    color: var(--muted);
}

/* ── Responsive ───────────────────────────────────────────── */

@media (max-width: 768px) {
    .site-wrapper {
        padding: 0 16px;
    }

    .site-nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 20px 0;
        margin-bottom: 32px;
    }

    .site-nav .nav-links {
        gap: 20px;
    }

    .site-nav .nav-links a {
        padding: 12px 4px;
        display: inline-block;
    }

    .page-header h1 {
        font-size: 24px;
    }

    .article-header h1 {
        font-size: 26px;
    }

    .article-body {
        font-size: 17px;
    }

    .article-list .article-title {
        font-size: 18px;
    }

    .article-list li {
        padding: 24px 0;
    }

    .page-header {
        margin-bottom: 32px;
    }
}

@media (max-width: 480px) {
    .site-nav .nav-links {
        gap: 16px;
        flex-wrap: wrap;
    }

    .page-header h1 {
        font-size: 22px;
    }

    .article-header h1 {
        font-size: 22px;
    }

    .article-body {
        font-size: 16px;
    }

    .article-body h2 {
        font-size: 20px;
    }

    .article-body h3 {
        font-size: 18px;
    }

}
