/* --- Root Variables & Reset --- */
:root {
    --bg: #ffffff;
    --text-main: #1a1a1a;
    --text-muted: #6b7280;
    --border: #ececec;
    --accent: #2563eb;
    --max-width: 740px; /* Optimal reading line length */
}

* {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.75;
    color: var(--text-main);
    background-color: var(--bg);
}

/* --- Header & Navigation --- */
.site-header {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2.5rem 1.5rem 1rem;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border);
}

.logo-text {
    font-weight: 700;
    text-decoration: none;
    color: var(--text-main);
    font-size: 1rem;
    letter-spacing: -0.02em;
}

.main-nav {
    display: flex;
    gap: 1.5rem;
}

.nav-item {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-item:hover {
    color: var(--text-main);
}

.divider {
    border: 0;
    border-top: 1px solid var(--border);
}

/* --- Article Typography & Spacing --- */
.article-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 4.5rem 1.5rem;
}

.meta {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}
/* Targets all images inside the markdown container */
#markdown-target img {
    max-width: 100%;    /* Prevents image from being wider than the text */
    height: auto;       /* Maintains aspect ratio */
    display: block;     /* Prevents text from wrapping awkwardly on the same line */
    margin: 1.5rem 0;   /* Adds consistent vertical spacing */
    border-radius: 4px; /* Optional: adds soft corners to match your profile theme */
}

h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.05em;
    margin-bottom: 3rem;
}

h2 {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-top: 4.5rem;
    margin-bottom: 1.25rem;
    color: var(--text-main);
}

h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-top: 2.5rem;
    margin-bottom: 0.85rem;
}

p {
    margin-bottom: 1.75rem;
    font-size: 1.1rem;
}

/* --- Notion-style Callouts & Lists --- */
.callout {
    background: #f9f9f8;
    border-left: 3px solid var(--text-main);
    padding: 1.5rem 1.75rem;
    margin: 3rem 0;
    border-radius: 0 8px 8px 0;
}

.callout p {
    margin-bottom: 0;
    font-weight: 500;
    color: #374151;
}

ul {
    padding-left: 1.35rem;
    margin-bottom: 2rem;
}

li {
    margin-bottom: 0.75rem;
    padding-left: 0.5rem;
}

strong {
    font-weight: 600;
}

/* --- Footer --- */
.article-footer {
    margin-top: 5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.back-link {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--text-main);
}

.site-footer {
    background: #fafafa;
    border-top: 1px solid var(--border);
    padding: 4rem 1.5rem;
    margin-top: 5rem;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 1.5rem;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 640px) {
    h1 { font-size: 2.25rem; }
    h2 { font-size: 1.5rem; }
    .header-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.25rem;
    }
}