:root {
    --max-width: 1100px;
    --gap: 2.5rem;
    --border: #e5e5e5;
    --text: #1a1a1a;
    --muted: #6b6b6b;
    --accent: #1a73e8;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text);
    line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Top bar: logo left, nav right */
.site-head {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
}
.site-logo { font-weight: 700; font-size: 1.25rem; }
.site-logo img { max-height: 48px; display: block; }
.site-nav { display: flex; align-items: center; }
.site-nav .nav {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}
.site-nav .nav li {
    margin: 0;
    padding: 0 0.9rem;
    line-height: 1;
    border-right: 1px solid var(--border);
}
.site-nav a { color: var(--muted); }
/* Search is a sibling <a> after the list; the last li's border is the pipe before it */
.site-nav > a { padding-left: 0.9rem; }

/* Main column wrapper */
.site-main { max-width: var(--max-width); margin: 0 auto; padding: 0 1rem; }

/* Full-width header image, post-width */
.header-image {
    width: 100%;
    height: auto;
    display: block;
    margin: 2rem 0;
    border-radius: 4px;
}

/* Two columns: left wider than right */
.home-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--gap);
    align-items: start;
}

/* Latest post (left) */
.latest-post-image { width: 100%; height: auto; border-radius: 4px; margin-bottom: 1rem; }
.latest-post-date { color: var(--muted); font-size: 0.85rem; margin: 0 0 0.25rem; }
.latest-post-title { margin: 0 0 0.75rem; font-size: 2rem; line-height: 1.15; }
.latest-post-excerpt { font-size: 1.05rem; }

/* Sidebar (right) */
.home-side { display: flex; flex-direction: column; gap: 2rem; }
.widget { border: 1px solid var(--border); border-radius: 6px; padding: 1.25rem; }
.subscribe-button {
    display: block;
    text-align: center;
    background: var(--accent);
    color: #fff;
    padding: 0.6rem 1rem;
    border-radius: 4px;
    font-weight: 600;
}
.subscribe-button:hover { text-decoration: none; opacity: 0.9; }

/* Archive list */
.archive-list { list-style: none; margin: 0; padding: 0; }
.archive-month {
    font-weight: 700;
    margin: 1rem 0 0.4rem;
    padding-bottom: 0.2rem;
    border-bottom: 1px solid var(--border);
    font-size: 1.05rem;
}
.archive-month:first-child { margin-top: 0; }
.archive-item { margin: 0.3rem 0; font-size: 0.9rem; }
.archive-item a { display: flex; gap: 0.5rem; }
.archive-date { color: var(--muted); white-space: nowrap; }

/* Footer */
.site-foot {
    max-width: var(--max-width);
    margin: 3rem auto 0;
    padding: 2rem 1rem;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.85rem;
}

/* Post page */
.post { max-width: 720px; margin: 2rem auto; }
.post-image { width: 100%; height: auto; border-radius: 4px; margin-bottom: 1rem; }
.post-title { font-size: 2.25rem; margin: 0 0 0.25rem; }
.post-date { color: var(--muted); margin: 0 0 2rem; }
.post-content { font-size: 1.1rem; }

/* Collapse to one column on small screens */
@media (max-width: 800px) {
    .home-grid { grid-template-columns: 1fr; }
}
