/* Bird Blog - Dark Theme */

:root {
    --bg-color: #1a1a1a;
    --surface-color: #222;
    --text-color: #e8e8e8;
    --text-muted: #aaa;
    --text-faint: #555;
    --accent-color: #7eb3f5;
    --border-color: #2a2a2a;
    --border-hover: #444;
    --code-bg: #1e1e1e;
    --quote-border: #444;
}

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

body {
    margin: 0;
    font-family: ui-serif, 'Georgia', 'Times New Roman', serif;
    font-size: 18px;
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

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

/* Header */
header {
    background: var(--surface-color);
    border-bottom: 1px solid #333;
    padding: 1rem 2rem;
}

header .inner {
    max-width: 860px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

header h1 {
    margin: 0;
    font-size: 1.4rem;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #fff;
}

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

header nav a {
    color: var(--text-muted);
    font-family: sans-serif;
    font-size: 0.85rem;
    margin-left: 1.5rem;
}

/* Main */
main {
    max-width: 860px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* Footer */
footer {
    border-top: 1px solid #333;
    margin-top: 4rem;
    padding: 2rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-faint);
    font-family: sans-serif;
}

footer a { color: #666; }

/* Typography */
h1, h2, h3 {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.25;
}

h2 {
    margin-top: 1.75rem;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
    color: #fff;
    border-left: 3px solid var(--accent-color);
    padding-left: 0.75rem;
}

h3 { color: #ddd; font-size: 1.1rem; margin-top: 1rem; }
p { margin: 0.75rem 0; }
ul, ol { padding-left: 1.5rem; }
li { margin: 0.4rem 0; }
strong { color: #fff; }

code {
    background: var(--code-bg);
    padding: 0.1em 0.3em;
    border-radius: 3px;
    font-size: 0.9em;
}

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

/* Post list (index) */
.post-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.post-list li { margin: 0; padding: 0; border: none; }

.post-card {
    display: block;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    text-decoration: none;
    transition: border-color 0.15s;
}

.post-card:hover { border-color: var(--border-hover); text-decoration: none; }

.post-card-inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.post-card-body { flex: 1; min-width: 0; }

.post-date-label {
    font-family: sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.4rem;
}

.post-card h2 {
    margin: 0 0 0.5rem;
    border: none;
    padding: 0;
    font-size: 1.1rem;
    color: #fff;
}

.post-summary {
    font-size: 0.9rem;
    color: #999;
    line-height: 1.5;
    margin: 0 0 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-meta {
    font-family: sans-serif;
    font-size: 0.8rem;
    color: var(--text-faint);
}

.post-read-arrow {
    font-family: sans-serif;
    font-size: 0.85rem;
    color: var(--text-faint);
    flex-shrink: 0;
}

/* Individual post */
article h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    color: #fff;
}

article .post-meta {
    font-family: sans-serif;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

article .content { margin-bottom: 3rem; }
article .content a { color: var(--accent-color); }
article .content a:hover { text-decoration: underline; }

/* Back link */
.back-link { margin-bottom: 2rem; }
.back-link a { font-family: sans-serif; font-size: 0.9rem; }

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

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

.source-posts > h2 {
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
    border-left-color: #555;
}

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

.source-post-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    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: 36px;
    height: 36px;
    border-radius: 50%;
    background: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-muted);
    flex-shrink: 0;
    font-family: sans-serif;
}

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

.source-post-card .display-name { font-weight: 600; color: var(--text-color); font-size: 0.9rem; }
.source-post-card .username { color: var(--text-muted); font-size: 0.8rem; text-decoration: none; }
.source-post-card .username:hover { color: var(--accent-color); }
.source-post-card .date-sep { color: var(--text-faint); }
.source-post-card .post-date { color: var(--text-muted); font-size: 0.8rem; }

.source-post-card .post-content {
    padding: 0.75rem 1rem;
    color: #ccc;
    font-size: 0.95rem;
    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; }

.source-post-card .quoted-tweet {
    margin: 0 1rem 0.75rem;
    border: 1px solid #333;
    border-radius: 10px;
    padding: 0.75rem;
}

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

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

.source-post-card .quoted-name { font-weight: 500; font-size: 0.85rem; 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; }

.source-post-card .article-card {
    margin: 0 1rem 0.75rem;
    border: 1px solid #333;
    border-radius: 10px;
    padding: 0.75rem;
    display: flex;
    gap: 0.5rem;
}

.source-post-card .link-icon { width: 15px; height: 15px; color: var(--text-faint); 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; font-family: sans-serif; }
.source-post-card .article-excerpt { font-size: 0.75rem; color: var(--text-muted); line-height: 1.4; font-family: sans-serif; }

.source-post-card .post-footer {
    padding: 0.6rem 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-faint);
    font-size: 0.8rem;
    font-family: sans-serif;
    text-decoration: none;
}

.source-post-card .view-on-x:hover { color: var(--accent-color); text-decoration: none; }
.source-post-card .x-icon { width: 14px; height: 14px; }

/* Responsive */
@media (max-width: 640px) {
    header { padding: 1rem; }
    main { padding: 0 1rem; margin: 1.5rem auto; }
    article h1 { font-size: 1.4rem; }
    .post-card { padding: 1rem; }
    .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; }
}
