/* Bird Blog - Clean Minimal Light Theme */

:root {
    --bg-color: #fafafa;
    --text-color: #1a1a1a;
    --text-muted: #666;
    --accent-color: #2563eb;
    --accent-hover: #1d4ed8;
    --border-color: #e5e5e5;
    --code-bg: #f3f4f6;
    --quote-border: #d1d5db;
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.7;
}

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

/* Header */
header {
    margin-bottom: 3rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

header h1 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

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

header h1 a:hover {
    color: var(--accent-color);
}

header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

header nav {
    margin-top: 1rem;
}

header nav a {
    color: var(--accent-color);
    text-decoration: none;
    margin-right: 1rem;
    font-size: 0.9rem;
}

header nav a:hover {
    text-decoration: underline;
}

/* Main content */
main {
    min-height: 60vh;
}

/* Post list (index page) */
.post-list {
    list-style: none;
}

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

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

.post-list h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.post-list h2 a {
    color: var(--text-color);
    text-decoration: none;
}

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

.post-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.post-summary {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Individual post page */
article h1 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

article .post-meta {
    margin-bottom: 2rem;
}

article .content {
    margin-bottom: 3rem;
}

article .content h2 {
    font-size: 1.35rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

article .content h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

article .content p {
    margin-bottom: 1rem;
}

article .content ul,
article .content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

article .content li {
    margin-bottom: 0.5rem;
}

article .content blockquote {
    border-left: 3px solid var(--quote-border);
    padding-left: 1rem;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-style: italic;
}

article .content code {
    background: var(--code-bg);
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    font-family: "SF Mono", Monaco, "Cascadia Code", monospace;
    font-size: 0.9em;
}

article .content pre {
    background: var(--code-bg);
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
    margin-bottom: 1rem;
}

article .content pre code {
    background: none;
    padding: 0;
}

article .content a {
    color: var(--accent-color);
    text-decoration: none;
}

article .content a:hover {
    text-decoration: underline;
}

article .content strong {
    font-weight: 600;
}

/* Back link */
.back-link {
    margin-bottom: 2rem;
}

.back-link a {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 0.9rem;
}

.back-link a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.85rem;
}

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

footer a:hover {
    text-decoration: underline;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.empty-state h2 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

/* Source Posts Section */
.source-posts {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.source-posts h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.posts-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.source-post-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.source-post-card .post-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1rem 0;
}

.source-post-card .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--code-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.source-post-card .author-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.5rem;
}

.source-post-card .display-name {
    font-weight: 600;
    color: var(--text-color);
}

.source-post-card .username {
    color: var(--text-muted);
    font-size: 0.875rem;
    text-decoration: none;
}

.source-post-card .username:hover {
    color: var(--accent-color);
}

.source-post-card .date-sep {
    color: var(--text-muted);
}

.source-post-card .post-date {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.source-post-card .post-content {
    padding: 0.75rem 1rem;
    color: var(--text-color);
    white-space: pre-wrap;
    word-wrap: break-word;
    line-height: 1.5;
}

.source-post-card .post-link {
    color: var(--accent-color);
    text-decoration: none;
}

.source-post-card .post-link:hover {
    text-decoration: underline;
}

/* Quoted Tweet */
.source-post-card .quoted-tweet {
    margin: 0 1rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.75rem;
}

.source-post-card .quoted-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.source-post-card .quoted-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--code-bg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
    font-weight: 600;
    color: var(--text-muted);
}

.source-post-card .quoted-name {
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text-color);
}

.source-post-card .quoted-username {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.source-post-card .quoted-content {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Article Card */
.source-post-card .article-card {
    margin: 0 1rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.75rem;
    display: flex;
    gap: 0.5rem;
}

.source-post-card .link-icon {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    flex-shrink: 0;
    margin-top: 2px;
}

.source-post-card .article-info {
    flex: 1;
    min-width: 0;
}

.source-post-card .article-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.source-post-card .article-excerpt {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Post Footer */
.source-post-card .post-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
}

.source-post-card .view-on-x {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    text-decoration: none;
}

.source-post-card .view-on-x:hover {
    color: var(--accent-color);
}

.source-post-card .x-icon {
    width: 16px;
    height: 16px;
}

/* Responsive */
@media (max-width: 640px) {
    .container {
        padding: 1.5rem 1rem;
    }

    header h1 {
        font-size: 1.5rem;
    }

    article h1 {
        font-size: 1.5rem;
    }

    article .content h2 {
        font-size: 1.2rem;
    }

    .source-post-card .post-header {
        padding: 0.75rem 0.75rem 0;
    }

    .source-post-card .post-content {
        padding: 0.5rem 0.75rem;
    }

    .source-post-card .quoted-tweet,
    .source-post-card .article-card {
        margin: 0 0.75rem 0.5rem;
    }

    .source-post-card .post-footer {
        padding: 0.5rem 0.75rem;
    }
}
