/* * Theme: Precision Flow (Electronic Industry Edition)
 * Version: 4.0
 * Style: Industrial / Precision / Modern
 */

:root {
    /* --- 核心色彩体系 (电子工业风) --- */
    --brand-primary: #1e40af;       /* 核心蓝：稳重、企业级 */
    --brand-vivid: #3b82f6;         /* 亮蓝：交互、激活状态 */
    --brand-accent: #06b6d4;        /* 电光青：数据、强调点 */
    
    --surface-dark: #0f172a;        /* 深色界面 (页脚/Hero) */
    --surface-light: #ffffff;       /* 纯白卡片 */
    --surface-ground: #f1f5f9;      /* 整体背景 (冷灰) */
    
    /* --- 文字颜色 --- */
    --text-heading: #1e293b;        /* 标题黑灰 */
    --text-body: #475569;           /* 正文灰 */
    --text-muted: #94a3b8;          /* 辅助文字 */
    --text-on-dark: #f8fafc;        /* 深色背景上的文字 */

    /* --- 尺寸与精密感 --- */
    --max-width: 1240px;            /* 稍微收窄，更聚拢 */
    --header-height: 70px;
    --radius-xs: 2px;               /* 极小圆角 (芯片感) */
    --radius-sm: 4px;
    --radius-md: 6px;               /* 适度圆角，不臃肿 */
    
    /* --- 特效 --- */
    --border-line: 1px solid #e2e8f0;
    --border-active: 1px solid #3b82f6;
    --shadow-flat: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-float: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
    --glow-blue: 0 0 15px rgba(59, 130, 246, 0.3); /* 蓝色辉光 */
}

/* === 全局重置 === */
* { box-sizing: border-box; margin: 0; padding: 0; outline: none; }

body {
    background-color: var(--surface-ground);
    color: var(--text-body);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; transition: all 0.2s ease-in-out; }
ul, li { list-style: none; }
img { display: block; max-width: 100%; height: auto; }

/* === 容器 === */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* === 头部导航 (极简工业风) === */
.site-header {
    background: rgba(255, 255, 255, 0.98);
    height: var(--header-height);
    border-bottom: 1px solid #cbd5e1; /* 更明显的分割线 */
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo 区域 */
.logo a {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--brand-primary);
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    text-transform: uppercase; /* 公司名大写更具气势 */
}

/* !!! 移除Logo前的方块 !!! */
.logo a::before {
    display: none !important;
    content: none !important;
}

/* 桌面导航 */
.desktop-nav { display: flex; align-items: center; gap: 32px; }
.desktop-nav a {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-heading);
    position: relative;
    padding: 24px 0; /* 增加点击区域高度 */
    border-top: 3px solid transparent; /* 顶部指示条 */
    border-bottom: 3px solid transparent;
}

.desktop-nav a:hover, .desktop-nav a.active {
    color: var(--brand-vivid);
    border-top-color: var(--brand-vivid); /* 顶部亮条指示，类似仪器面板 */
}

/* 移动端菜单 */
.mobile-menu-trigger { display: none; font-size: 1.4rem; cursor: pointer; color: var(--text-heading); }
.mobile-menu-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: #fff; z-index: 9999; flex-direction: column; padding: 20px;
}
.mobile-menu-header { display: flex; justify-content: space-between; margin-bottom: 30px; border-bottom: 1px solid #eee; padding-bottom: 15px; }
.mobile-nav-links { display: flex; flex-direction: column; gap: 0; }
.mobile-nav-links a {
    padding: 15px 0;
    border-bottom: 1px solid #f1f5f9;
    font-weight: 600;
    color: var(--text-heading);
}

/* === Hero Section (精密电子蓝) === */
.hero-section {
    position: relative;
    background-color: var(--surface-dark);
    /* 抽象电路背景 */
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(6, 182, 212, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(59, 130, 246, 0.15) 0%, transparent 20%),
        linear-gradient(rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.98));
    color: var(--text-on-dark);
    padding: 100px 0 140px; /* 底部留出空间给 Info Cards 插入 */
    text-align: center;
    overflow: hidden;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* 细微的网格装饰 */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: linear-gradient(#334155 1px, transparent 1px), linear-gradient(90deg, #334155 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.1;
    z-index: 0;
}

.hero-content { position: relative; z-index: 2; max-width: 800px; margin: 0 auto; }

.hero-content h1 { 
    font-size: 3rem; 
    margin-bottom: 20px; 
    font-weight: 700; 
    letter-spacing: -1px; 
    color: #fff;
    text-shadow: 0 0 20px rgba(59, 130, 246, 0.4); /* 文字发光 */
}

.hero-subtitle { 
    font-size: 1.15rem; 
    color: #cbd5e1; 
    margin-bottom: 40px; 
    font-weight: 300;
    line-height: 1.8;
}

.hero-buttons { display: flex; justify-content: center; gap: 16px; }

/* 按钮样式：更硬朗、更扁平 */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 12px 32px; font-size: 0.95rem; border-radius: var(--radius-sm);
    font-weight: 500; cursor: pointer; transition: all 0.2s;
    text-transform: uppercase; letter-spacing: 0.5px;
}

.primary-btn { 
    background: var(--brand-vivid); color: #fff; 
    border: 1px solid var(--brand-vivid);
}
.primary-btn:hover { 
    background: var(--brand-primary); 
    border-color: var(--brand-primary);
    box-shadow: var(--glow-blue); 
}

.secondary-btn { 
    background: transparent; color: #fff; 
    border: 1px solid rgba(255,255,255,0.3); 
}
.secondary-btn:hover { 
    background: rgba(255,255,255,0.1); 
    border-color: #fff; 
}

/* === Info Section (悬浮卡片) === */
.info-section { margin-top: -60px; position: relative; z-index: 10; margin-bottom: 80px; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }

.info-card {
    background: var(--surface-light); 
    padding: 32px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-float);
    border: 1px solid #f1f5f9;
    border-bottom: 3px solid transparent; /* 底部预留边框 */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.info-card:hover { 
    transform: translateY(-4px); 
    border-bottom-color: var(--brand-accent); /* Hover时底部亮条 */
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.info-card .icon { 
    font-size: 2.5rem; margin-bottom: 20px; display: block; 
    /* 替换 emoji 颜色滤镜效果如果可能，这里保持原样但增加背景 */
    width: 60px; height: 60px; display: flex; align-items: center; justify-content: center;
    background: #f0f9ff; border-radius: var(--radius-md);
}

.info-card h3 { font-size: 1.25rem; color: var(--text-heading); margin-bottom: 12px; font-weight: 700; }
.info-card p { color: var(--text-body); margin-bottom: 24px; font-size: 0.95rem; line-height: 1.7; }
.read-more { 
    color: var(--brand-primary); font-weight: 600; font-size: 0.9rem;
    display: inline-flex; align-items: center; 
}
.read-more:hover { color: var(--brand-vivid); text-decoration: underline; }

/* === Main Content Area === */
.main-content-area { 
    min-height: 600px; 
    margin-bottom: 100px; 
    margin-top: 60px; 
}

/* 栏目标题样式 */
.section-header { 
    margin-bottom: 40px; 
    border-left: 4px solid var(--brand-primary); 
    padding-left: 20px;
}
.section-header h2 { 
    font-size: 1.8rem; 
    color: var(--text-heading); 
    font-weight: 800; 
    line-height: 1.2;
}
.cat-desc { margin-top: 8px; color: var(--text-muted); font-size: 1rem; }

/* === Post Grid (紧凑型技术网格) === */
.post-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); 
    gap: 24px; 
}

.grid-card {
    background: var(--surface-light); 
    border-radius: var(--radius-sm); 
    overflow: hidden;
    border: 1px solid #e2e8f0;
    transition: all 0.3s;
    display: flex; flex-direction: column;
}

.grid-card:hover { 
    border-color: var(--brand-vivid); /* Hover 边框变蓝 */
    box-shadow: var(--shadow-float);
}

.card-cover-wrapper {
    display: block; width: 100%; height: 200px; background: #f8fafc;
    overflow: hidden; position: relative;
    border-bottom: 1px solid #f1f5f9;
}
.card-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.grid-card:hover .card-img { transform: scale(1.05); }

/* 无图占位：技术蓝图风格 */
.card-img-placeholder {
    width: 100%; height: 100%;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background-color: #1e293b;
    background-image: radial-gradient(#334155 1px, transparent 1px);
    background-size: 20px 20px;
    color: #fff;
}
.placeholder-icon { font-size: 2rem; margin-bottom: 8px; opacity: 0.8; color: var(--brand-accent); }
.placeholder-text { 
    font-weight: 600; font-size: 0.8rem; letter-spacing: 2px; 
    color: rgba(255,255,255,0.5); text-transform: uppercase;
}

.card-body { padding: 24px; display: flex; flex-direction: column; flex: 1; }

.card-meta { 
    display: flex; align-items: center; gap: 10px;
    font-size: 0.8rem; color: var(--text-muted); margin-bottom: 12px; 
}
.cat-tag { 
    color: var(--brand-primary); 
    font-weight: 600; text-transform: uppercase; font-size: 0.75rem; 
    letter-spacing: 0.5px;
}

.grid-card h3 { 
    font-size: 1.15rem; margin-bottom: 10px; line-height: 1.4; 
    color: var(--text-heading); font-weight: 700; 
}
.grid-card h3 a:hover { color: var(--brand-vivid); }

.excerpt { 
    font-size: 0.9rem; color: var(--text-body); flex-grow: 1; 
    margin-bottom: 20px; line-height: 1.6; 
}

.card-tags { border-top: 1px dashed #e2e8f0; padding-top: 15px; margin-top: auto; }
.tag-badge { 
    color: var(--text-muted); font-size: 0.75rem; margin-right: 8px; 
    background: #f8fafc; padding: 2px 6px; border-radius: 3px;
}

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 60px; }
.page-btn {
    width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
    border: 1px solid #cbd5e1; border-radius: var(--radius-sm); color: var(--text-heading); background: #fff;
    transition: all 0.2s;
}
.page-btn:hover { border-color: var(--brand-primary); color: var(--brand-primary); background: #f0f9ff; }
.page-current { 
    display: flex; align-items: center; padding: 0 15px; 
    font-weight: 700; color: var(--brand-primary); font-family: monospace; 
}

/* === 文章详情页 (文档模式) === */
.single-post { 
    background: #fff; 
    padding: 60px; 
    border-radius: var(--radius-sm); 
    box-shadow: var(--shadow-flat); 
    border: 1px solid #e2e8f0;
}
.single-header { margin-bottom: 40px; border-bottom: 2px solid #f1f5f9; padding-bottom: 30px; }

.breadcrumb { margin-bottom: 20px; font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.breadcrumb a:hover { color: var(--brand-primary); }

.single-header h1 { font-size: 2.5rem; color: var(--text-heading); margin-bottom: 20px; line-height: 1.2; font-weight: 800; }
.meta-line { color: var(--text-muted); font-size: 0.9rem; display: flex; gap: 24px; font-family: monospace; }
.meta-line a { color: var(--brand-primary); border-bottom: 1px dotted var(--brand-primary); }

/* === Markdown 内容样式 === */
.markdown-body { color: var(--text-heading); font-size: 1.05rem; line-height: 1.8; }

.markdown-body h2 { 
    font-size: 1.6rem; margin-top: 2.5em; margin-bottom: 1em; 
    color: var(--text-heading); font-weight: 700; 
    padding-left: 15px; border-left: 4px solid var(--brand-accent); /* 左侧亮条 */
    border-bottom: none;
}
.markdown-body h3 { font-size: 1.3rem; margin-top: 2em; margin-bottom: 0.8em; font-weight: 700; }

.markdown-body p { margin-bottom: 1.6em; color: var(--text-body); }
.markdown-body strong { color: #000; font-weight: 700; }

.markdown-body hr {
    border: 0; border-top: 1px solid #e2e8f0;
    margin: 40px 0;
}

.markdown-body img { 
    border-radius: var(--radius-sm); 
    border: 1px solid #eee;
    margin: 20px 0;
}

.markdown-body blockquote {
    border-left: 3px solid var(--brand-primary); 
    background: #f8fafc;
    padding: 24px; 
    font-style: italic; 
    color: var(--text-body); 
    margin: 30px 0;
}

/* 标签云 */
.post-tags-container { margin-top: 60px; padding-top: 30px; border-top: 1px solid #f1f5f9; }
.tag-pill {
    display: inline-block; background: #fff; padding: 6px 14px;
    font-size: 0.85rem; color: var(--text-body); border-radius: var(--radius-sm);
    margin-right: 10px; border: 1px solid #e2e8f0; transition: all 0.2s;
}
.tag-pill:hover { border-color: var(--brand-primary); color: var(--brand-primary); }

/* CTA: 亮色背景，拒绝深色 */
.post-cta {
    margin-top: 60px;
    background: #f8fafc; /* 极浅的灰蓝 */
    border: 1px solid #e2e8f0;
    border-left: 5px solid var(--brand-vivid); /* 左侧醒目色条 */
    padding: 40px; 
    text-align: center; 
    border-radius: var(--radius-sm);
    color: var(--text-heading); /* 确保文字是深色 */
}
.post-cta p { font-size: 1.1rem; font-weight: 600; margin-bottom: 20px; color: var(--text-heading); }
/* 覆盖CTA内的按钮样式确保对比度 */
.post-cta .btn.primary-btn { 
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.2); 
}

/* 翻页导航 */
.post-navigation { display: flex; justify-content: space-between; margin-top: 60px; padding-top: 30px; border-top: 1px solid #f1f5f9; }
.nav-prev, .nav-next { max-width: 45%; display: flex; flex-direction: column; }
.nav-prev small, .nav-next small { 
    color: var(--text-muted); font-size: 0.75rem; margin-bottom: 8px; 
    text-transform: uppercase; letter-spacing: 1px; font-weight: 700;
}
.nav-prev span, .nav-next span { font-weight: 600; color: var(--text-heading); font-size: 1rem; line-height: 1.4; }
.nav-prev:hover span, .nav-next:hover span { color: var(--brand-primary); }

/* === FAQ & Footer (工业黑) === */
.faq-section { background: #fff; padding: 80px 0; border-top: 1px solid #e2e8f0; }
.faq-list { max-width: 900px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid #f1f5f9; }
.faq-question { 
    padding: 25px 20px; cursor: pointer; display: flex; justify-content: space-between; 
    font-weight: 600; font-size: 1.1rem; color: var(--text-heading);
    transition: background 0.2s;
}
.faq-question:hover { background: #f8fafc; }
.faq-question.active { color: var(--brand-primary); }
.faq-answer p { padding: 0 20px 25px; color: var(--text-body); line-height: 1.7; }

/* 页脚 */
.site-footer { 
    background: var(--surface-dark); 
    color: #94a3b8; 
    padding: 80px 0 30px; 
    font-size: 0.9rem; 
    border-top: 4px solid var(--brand-primary); 
}

.footer-col h4 { 
    color: #fff; margin-bottom: 25px; font-size: 1.1rem; 
    font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; 
}
.footer-col p { margin-bottom: 12px; }
.footer-col a { color: #cbd5e1; margin-bottom: 10px; display: inline-block; transition: transform 0.2s; }
.footer-col a:hover { color: var(--brand-accent); transform: translateX(5px); }

.footer-bottom { 
    border-top: 1px solid rgba(255,255,255,0.05); margin-top: 60px; padding-top: 30px; 
    text-align: center; color: #64748b; font-size: 0.8rem; 
}
.footer-bottom a { color: #94a3b8; }
.footer-bottom a:hover { color: #fff; }

/* === 404 页面 === */
.error-404 h1 { color: var(--text-heading) !important; font-weight: 800; }
.error-404 p { color: var(--text-muted); font-size: 1.2rem; }

/* === 响应式调整 === */
@media (max-width: 768px) {
    .site-header { padding: 0; }
    .hero-content h1 { font-size: 2rem; }
    .hero-subtitle { font-size: 1rem; }
    .desktop-nav { display: none; }
    .mobile-menu-trigger { display: block; }
    .single-post { padding: 30px 20px; }
    .info-section { margin-top: 0; padding-top: 40px; }
    .hero-buttons { flex-direction: column; padding: 0 40px; }
    .btn { width: 100%; }
    .post-grid { grid-template-columns: 1fr; }
    
    /* 移动端详情页修正 */
    .meta-line { flex-direction: column; gap: 5px; }
    .post-navigation { flex-direction: column; gap: 20px; }
    .nav-prev, .nav-next { max-width: 100%; text-align: left !important; }
}