/* --- 变量定义 (浅色系) --- */
:root {
    --bg-main: #ffffff;       /* 纯白主背景 */
    --bg-secondary: #f8fafc;  /* 浅灰辅助背景 (用于Hero和Footer) */
    --bg-card: #ffffff;       /* 白卡片背景 */
    
    --accent: #0284c7;        /* 专业海洋蓝 */
    --accent-hover: #0369a1;  /* 深蓝色悬停 */
    
    --text-main: #1e293b;     /* 深石板灰主文本 (替代纯黑，更柔和) */
    --text-muted: #64748b;    /* 中灰次级文本 */
    
    --border: #e2e8f0;        /* 极浅灰色边框 */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-hover: 0 20px 40px rgba(0,0,0,0.08); /* 柔和的悬停阴影 */
    
    --font-heading: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

/* --- 全局样式 --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-heading);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

/* --- 导航栏 --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    /* 浅色透明背景 */
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-main);
}

.logo-icon {
    color: var(--accent);
}

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

.nav-links a {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 500;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--accent);
}

.btn-contact {
    border: 1px solid var(--accent);
    padding: 8px 20px;
    border-radius: 4px;
    color: var(--accent) !important;
    font-weight: 600;
}

.btn-contact:hover {
    background: var(--accent);
    color: white !important;
}

.hamburger {
    display: none;
    cursor: pointer;
}

/* --- Hero 区域 --- */
.hero {
    height: 95vh; /* 稍微减小高度 */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    text-align: center;
    padding: 0 20px;
    /* 使用浅灰背景区分 */
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
}

#particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.6; /* 降低粒子透明度 */
}

.hero-content {
    max-width: 800px;
    z-index: 1;
    animation: fadeInUp 1s ease-out;
}

.badge-new {
    background: #e0f2fe; /* 极浅蓝背景 */
    color: var(--accent);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-family: var(--font-mono);
    border: 1px solid #bae6fd;
    margin-bottom: 20px;
    display: inline-block;
    font-weight: 600;
}

.hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 20px;
    font-weight: 800;
    color: var(--text-main);
}

.gradient-text {
    /* 调整为更深邃的蓝紫色渐变，在浅色上更突出 */
    background: linear-gradient(135deg, #0284c7 0%, #4f46e5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-btns {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.btn-primary {
    background: var(--accent);
    color: white;
    padding: 12px 30px;
    border-radius: 6px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
}

.btn-secondary {
    background: white;
    color: var(--text-main);
    padding: 12px 30px;
    border-radius: 6px;
    font-weight: 600;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

/* --- 主要内容区 --- */
.section-container {
    max-width: 1200px;
    margin: 80px auto;
    padding: 0 20px;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--text-main);
    margin-bottom: 10px;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* --- 筛选器 --- */
.filter-bar {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 60px;
    flex-wrap: wrap;
}

.filter-btn {
    background: white;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 10px 24px;
    border-radius: 50px;
    cursor: pointer;
    font-family: var(--font-heading);
    transition: 0.3s;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.filter-btn:hover, .filter-btn.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.2);
}

/* --- 文章网格 & 卡片 (重点修改) --- */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 40px;
}

.post-card {
    background: var(--bg-card);
    border-radius: 16px; /* 更圆润的边角 */
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.4s ease;
    opacity: 0;
    transform: translateY(20px);
    box-shadow: var(--shadow-sm); /* 默认轻微阴影 */
}

.post-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.post-card:hover {
    transform: translateY(-8px);
    /* 浅色系下，悬停依赖柔和的大阴影 */
    box-shadow: var(--shadow-hover);
    border-color: transparent; /* 悬停时隐藏边框，强调阴影 */
}

.card-image {
    height: 220px; /* 稍微加高图片 */
    background-size: cover;
    background-position: center;
    position: relative;
}

.card-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    /* 调整遮罩，使图片在浅色背景下不那么沉重，但仍能看清白色文字 */
    background: linear-gradient(to bottom, transparent 20%, rgba(30,41,59,0.7) 100%);
}

.card-tag {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--accent);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    text-transform: uppercase;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}

.card-content {
    padding: 25px;
}

.card-meta {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.card-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.card-meta svg {
    width: 14px;
    height: 14px;
    stroke-width: 2.5; /* 加粗小图标 */
}

.card-content h3 {
    font-size: 1.4rem;
    margin-bottom: 12px;
    line-height: 1.4;
    color: var(--text-main);
    font-weight: 700;
}

.card-content h3 a:hover {
    color: var(--accent);
}

.card-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.7;
}

.card-footer {
    border-top: 1px solid var(--border);
    padding-top: 20px;
}

.read-more {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 5px;
}

.read-more:hover {
    gap: 10px;
    color: var(--accent-hover);
}

/* --- Footer --- */
footer {
    background: var(--bg-secondary); /* 浅灰背景 */
    padding: 80px 20px;
    text-align: center;
    margin-top: 100px;
    border-top: 1px solid var(--border);
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 15px;
    letter-spacing: 2px;
    color: var(--text-main);
}

.footer-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.socials {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.socials a {
    color: var(--text-muted);
    background: white;
    padding: 10px;
    border-radius: 50%;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.socials a:hover {
    color: var(--accent);
    border-color: var(--accent);
    box-shadow: var(--shadow-sm);
}

/* --- 响应式 --- */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .hamburger { display: block; }
    .hero h1 { font-size: 2.5rem; }
    .posts-grid { grid-template-columns: 1fr; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}