/* ============================================
   GitHub Trends Daily - 简洁大气设计
   ============================================ */

/* --- Reset & Base --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg: #fafafa;
    --bg-card: #ffffff;
    --text: #1a1a2e;
    --text-muted: #6b7280;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --border: #e5e7eb;
    --radius: 12px;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.08);
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Microsoft YaHei", sans-serif;
    --font-mono: "SF Mono", "Fira Code", "Cascadia Code", Consolas, monospace;
    --max-width: 800px;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* --- Header --- */
.site-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0.75rem 0;
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

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

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

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

.site-header nav a:hover {
    color: var(--accent);
}

/* --- Hero --- */
.hero {
    text-align: center;
    padding: 4rem 0 2rem;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 500px;
    margin: 0 auto;
}

.hero-sub {
    font-size: 0.9rem !important;
    margin-top: 0.5rem !important;
    opacity: 0.7;
}

/* --- Post Cards --- */
.post-list {
    padding: 1rem 0 3rem;
}

.post-list h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text);
}

.post-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
    transition: transform 0.15s, box-shadow 0.15s;
}

.post-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.post-card time {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.post-card h2 {
    margin: 0.5rem 0;
    font-size: 1.15rem;
}

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

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

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

/* --- Article Content (single post page) --- */
article h1,
main > h1:first-child {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 2rem 0 1rem;
    line-height: 1.3;
}

article h2,
main h2 {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 2rem 0 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}

article h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 1.5rem 0 0.5rem;
}

article p {
    margin: 0.75rem 0;
    font-size: 1.05rem;
}

article blockquote {
    border-left: 3px solid var(--accent);
    padding: 0.75rem 1.25rem;
    margin: 1.5rem 0;
    background: #f0f4ff;
    border-radius: 0 var(--radius) var(--radius) 0;
    color: #374151;
}

article blockquote p {
    margin: 0;
}

article code {
    font-family: var(--font-mono);
    background: #f1f5f9;
    padding: 0.15em 0.4em;
    border-radius: 4px;
    font-size: 0.9em;
    color: #e11d48;
}

article li {
    margin: 0.4rem 0;
    padding-left: 0.5rem;
}

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

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

article hr.divider {
    border: none;
    border-top: 1px dashed var(--border);
    margin: 2rem 0;
}

.content-img {
    max-width: 100%;
    border-radius: var(--radius);
    margin: 1rem 0;
    box-shadow: var(--shadow);
}

/* --- Archive --- */
.archive-list {
    list-style: none;
    padding: 0;
}

.archive-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: baseline;
    gap: 1rem;
    flex-wrap: wrap;
}

.archive-list time {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
    min-width: 6rem;
}

.archive-list a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    flex: 1;
}

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

.archive-stats {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* --- About --- */
.about-content {
    max-width: 650px;
}

.about-content h2 {
    margin-top: 2rem;
}

.about-content ul {
    padding-left: 1.5rem;
    margin: 1rem 0;
}

.about-content li {
    margin: 0.5rem 0;
}

/* --- CTA --- */
.cta {
    text-align: center;
    padding: 3rem 0;
    color: var(--text-muted);
}

.cta a {
    color: var(--accent);
    font-weight: 600;
}

/* --- Footer --- */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.site-footer p {
    margin: 0.25rem 0;
}

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

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

/* --- Responsive --- */
@media (max-width: 640px) {
    .hero h1 {
        font-size: 1.75rem;
    }
    .hero p {
        font-size: 1rem;
    }
    .site-header .container {
        flex-direction: column;
        align-items: flex-start;
    }
    article h1,
    main > h1:first-child {
        font-size: 1.5rem;
    }
    .post-card {
        padding: 1rem;
    }
    .archive-list li {
        flex-direction: column;
        gap: 0.25rem;
    }
}
