:root {
    /* Same warm light palette as the notes (public/posts/<slug>/styles.css), so
       the home page and the notes read as one site. Light only, like the notes. */
    --bg: #ffffff;
    --fg: #1A1B1D;
    --muted: #78797E;
    --link: #F26B21;
    --link-hover: #D2530E;
    --border: #EDEBE8;
    --subtle-bg: #F7F6F4;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif;
    line-height: 1.5;
    color: var(--fg);
    background-color: var(--bg);
    padding: 16px;
    margin: 0;
}

a {
    color: var(--link);
}

a:hover {
    color: var(--link-hover);
}

.container {
    /* One measure for every page: nav, rules, post cards and prose all share
       the same edges instead of running to different widths.

       Fluid, not fixed: a fixed width looks right on a laptop but leaves huge
       margins on a wide monitor. 94vw keeps the gutters proportional at any
       width, with a ceiling so it stops growing on very large screens.

       NOTE: public/posts/chrome-built-in-ai/styles.css has its own --measure
       that mirrors this (minus the 32px of padding). Keep the two in sync. */
    max-width: min(2000px, 94vw);
    margin: 0 auto;
    padding: 16px;
}

/* Navigation */

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

.nav-brand {
    font-weight: 600;
    color: var(--fg);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 16px;
}

.nav-link {
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--fg);
}

/* Header */

.header {
    margin-bottom: 32px;
}

.name {
    font-size: 32px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--fg);
    margin-bottom: 4px;
}

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

/* Home */

.intro {
    margin-bottom: 48px;
}

.bio {
    margin-top: 24px;
    font-size: 16px;
    color: var(--fg);
}

.bio p + p {
    margin-top: 12px;
}

.bio p:last-child {
    color: var(--muted);
}

.contact-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    list-style: none;
    margin-top: 24px;
    /* Nudged just outside the text column. Raise to push further left. */
    margin-left: -6px;
}

.contact-link {
    text-decoration: none;
    font-size: 15px;
}

.contact-link:hover {
    text-decoration: underline;
}

.latest-section {
    margin-top: 40px;
}

.section-title {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 8px;
}

/* Post lists */

.post-card {
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.post-card:last-child {
    border-bottom: none;
}

.post-card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.post-card-title a {
    text-decoration: none;
}

.post-card-title a:hover {
    text-decoration: underline;
}

.post-meta {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 8px;
}

.post-summary {
    color: var(--fg);
    margin-bottom: 8px;
}

.more-link {
    margin-top: 16px;
    font-size: 14px;
}

.empty {
    color: var(--muted);
    padding: 16px 0;
}

/* Tags */

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    display: inline-block;
    padding: 1px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--subtle-bg);
    font-size: 12px;
    text-decoration: none;
}

.tag:hover,
.tag.is-active {
    border-color: var(--link);
}

.tag-count {
    color: var(--muted);
}

.tag-filter {
    margin-bottom: 8px;
}

.draft-badge {
    color: #bf8700;
}

/* Search */

.search {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.search-input {
    flex: 1;
    padding: 6px 12px;
    font-size: 14px;
    font-family: inherit;
    color: var(--fg);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
}

.search-input:focus {
    outline: none;
    border-color: var(--link);
}

.search-button {
    padding: 6px 16px;
    font-size: 14px;
    font-family: inherit;
    color: var(--fg);
    background: var(--subtle-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
}

.search-button:hover {
    border-color: var(--link);
}

/* Post body */

.post-body {
    font-size: 16px;
    line-height: 1.7;
}

.post-body > * + * {
    margin-top: 16px;
}

.post-body h2 {
    font-size: 22px;
    margin-top: 32px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
}

.post-body h3 {
    font-size: 18px;
    margin-top: 24px;
}

.post-body ul,
.post-body ol {
    padding-left: 24px;
}

.post-body li + li {
    margin-top: 4px;
}

.post-body img {
    max-width: 100%;
    border-radius: 6px;
}

.post-body blockquote {
    padding-left: 16px;
    border-left: 3px solid var(--border);
    color: var(--muted);
}

.post-body code {
    padding: 2px 6px;
    font-size: 85%;
    background: var(--subtle-bg);
    border-radius: 6px;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.post-body pre {
    padding: 16px;
    overflow-x: auto;
    background: var(--subtle-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
}

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

/* Footer */

.footer {
    display: flex;
    gap: 16px;
    margin-top: 48px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--muted);
}

@media (max-width: 768px) {
    .container {
        padding: 8px;
    }

    .name {
        font-size: 24px;
    }
}
