* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif; background: #f5f5f5; color: #333; line-height: 1.6; }

/* Nav */
header { background: linear-gradient(270deg, #667eea, #764ba2, #f093fb, #667eea); background-size: 400% 400%; animation: gradientFlow 8s ease infinite; color: #fff; padding: 0; position: sticky; top: 0; z-index: 100; box-shadow: 0 4px 20px rgba(0,0,0,0.15); }
header nav { display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: 0 auto; padding: 15px 20px; }
header nav .logo { font-size: 1.5rem; font-weight: bold; }
header nav .nav-links { list-style: none; display: flex; gap: 25px; }
header nav .nav-links a { color: #fff; text-decoration: none; font-size: 1rem; padding: 5px 0; border-bottom: 2px solid transparent; transition: border-color 0.3s; }
header nav .nav-links a:hover, header nav .nav-links a.active { border-bottom-color: rgba(255,255,255,0.8); }

/* Hero */
.hero h2 { font-size: 2.8rem; margin-bottom: 15px; }
.hero p { font-size: 1.2rem; opacity: 0.9; margin-bottom: 25px; }

/* Page header */
.page-header { background: linear-gradient(270deg, #667eea, #764ba2, #f093fb, #667eea); background-size: 400% 400%; animation: gradientFlow 8s ease infinite; color: #fff; padding: 60px 20px; text-align: center; }
.page-header h2 { font-size: 2.2rem; margin-bottom: 10px; }
.page-header p { font-size: 1.1rem; opacity: 0.85; }

/* Posts */
.recent-posts { max-width: 1200px; margin: 40px auto; padding: 0 20px; }
.recent-posts h2 { font-size: 1.8rem; margin-bottom: 25px; color: #333; }
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: 25px; }
.post-card { background: #fff; border-radius: 10px; padding: 25px; box-shadow: 0 2px 15px rgba(0,0,0,0.08); transition: transform 0.3s, box-shadow 0.3s; }
.post-card:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0,0,0,0.15); }
.post-card h3 { font-size: 1.3rem; margin-bottom: 10px; color: #333; }
.post-card .date { font-size: 0.85rem; color: #999; margin-bottom: 10px; }
.post-card .excerpt { font-size: 0.95rem; color: #666; margin-bottom: 15px; }
.post-card .read-more { color: #667eea; text-decoration: none; font-weight: bold; font-size: 0.9rem; }
.post-card .read-more:hover { text-decoration: underline; }

/* Blog list */
.blog-list { max-width: 800px; margin: 40px auto; padding: 0 20px; }
.blog-list .post-item { background: #fff; border-radius: 10px; padding: 25px; margin-bottom: 20px; box-shadow: 0 2px 15px rgba(0,0,0,0.08); }
.blog-list .post-item h3 { font-size: 1.3rem; margin-bottom: 8px; }
.blog-list .post-item .date { font-size: 0.85rem; color: #999; margin-bottom: 8px; }
.blog-list .post-item .excerpt { color: #666; }

/* Article */
.article { max-width: 800px; margin: 40px auto; padding: 0 20px; background: #fff; border-radius: 10px; box-shadow: 0 2px 15px rgba(0,0,0,0.08); }
.article .article-content { padding: 30px; }
.article h2 { font-size: 2rem; margin-bottom: 10px; color: #333; }
.article .date { color: #999; margin-bottom: 25px; }
.article .article-body h3 { font-size: 1.4rem; margin: 25px 0 10px; color: #444; }
.article .article-body p { margin-bottom: 15px; color: #555; }
.article .article-body pre { background: #f4f4f4; padding: 15px; border-radius: 8px; overflow-x: auto; margin-bottom: 15px; font-size: 0.9rem; }
.article .article-body code { background: #f0f0f0; padding: 2px 6px; border-radius: 4px; font-size: 0.9em; }
.article .back-link { display: inline-block; margin-top: 20px; color: #667eea; text-decoration: none; }
.article .back-link:hover { text-decoration: underline; }

/* Footer */
footer { background: #333; color: #ccc; text-align: center; padding: 25px; font-size: 0.9rem; }
footer a { color: #667eea; text-decoration: none; }

@keyframes gradientFlow { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
