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

:root {
  --bg: #fafafa;
  --card-bg: #ffffff;
  --text: #3c4858;
  --text-light: #718096;
  --heading: #2d3748;
  --accent: #1a73e8;
  --accent-light: #e8f0fe;
  --border: #e8ecf1;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-hover: 0 4px 12px rgba(0,0,0,0.08);
  --radius: 8px;
  --max-w: 1100px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  --font-mono: "SF Mono", "Fira Code", "Consolas", monospace;
}

html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: #1557b0; }
img { max-width: 100%; height: auto; }

/* ===== Layout ===== */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.site-title {
  font-size: 1.2rem; font-weight: 700; color: var(--heading);
  letter-spacing: -0.3px;
}
.site-nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-nav a {
  font-size: 0.9rem; color: var(--text-light); font-weight: 500;
  transition: color .2s;
}
.site-nav a:hover, .site-nav a.active { color: var(--accent); }

/* ===== Hero ===== */
.hero {
  text-align: center; padding: 80px 24px 60px;
  background: linear-gradient(180deg, #f0f7ff 0%, var(--bg) 100%);
}
.hero h1 {
  font-size: 2.4rem; font-weight: 800; color: var(--heading);
  margin-bottom: 16px; letter-spacing: -0.5px;
}
.hero .subtitle {
  font-size: 1.15rem; color: var(--text-light);
  max-width: 600px; margin: 0 auto 32px;
}
.hero-links { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }
.hero-links a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 20px; border-radius: 24px;
  font-size: 0.9rem; font-weight: 500;
  transition: all .2s;
}
.btn-primary {
  background: var(--accent); color: #fff;
}
.btn-primary:hover { background: #1557b0; color: #fff; transform: translateY(-1px); }
.btn-outline {
  border: 1.5px solid var(--border); color: var(--text);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

/* ===== Section ===== */
.section { padding: 60px 0; }
.section-title {
  font-size: 1.5rem; font-weight: 700; color: var(--heading);
  margin-bottom: 8px; text-align: center;
}
.section-desc {
  font-size: 0.95rem; color: var(--text-light);
  text-align: center; margin-bottom: 36px;
}

/* ===== Cards Grid ===== */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  transition: box-shadow .25s, transform .25s;
}
.card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.card-tag {
  display: inline-block; font-size: 0.72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.5px;
  padding: 3px 10px; border-radius: 12px;
  margin-bottom: 12px;
}
.tag-project { background: #e8f5e9; color: #2e7d32; }
.tag-blog { background: #fff3e0; color: #e65100; }
.tag-resource { background: #e3f2fd; color: #1565c0; }
.tag-skill { background: #f3e5f5; color: #7b1fa2; }
.card h3 { font-size: 1.05rem; color: var(--heading); margin-bottom: 8px; }
.card p { font-size: 0.88rem; color: var(--text-light); line-height: 1.6; }
.card-meta {
  margin-top: 14px; font-size: 0.78rem; color: #a0aec0;
  display: flex; gap: 16px;
}

/* ===== Resource List ===== */
.resource-list { max-width: 800px; margin: 0 auto; }
.resource-item {
  display: flex; gap: 16px; padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.resource-item:last-child { border-bottom: none; }
.resource-icon {
  flex-shrink: 0; width: 48px; height: 48px;
  background: var(--accent-light); border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
}
.resource-info h4 { font-size: 0.95rem; color: var(--heading); margin-bottom: 4px; }
.resource-info p { font-size: 0.85rem; color: var(--text-light); }
.resource-stars {
  font-size: 0.75rem; color: #d97706; font-weight: 600;
  background: #fef3c7; padding: 2px 8px; border-radius: 8px;
  display: inline-block; margin-top: 6px;
}

/* ===== Blog List ===== */
.post-list { max-width: 800px; margin: 0 auto; }
.post-item {
  padding: 24px 0; border-bottom: 1px solid var(--border);
}
.post-item:last-child { border-bottom: none; }
.post-item h3 { font-size: 1.1rem; color: var(--heading); margin-bottom: 6px; }
.post-item h3 a { color: var(--heading); }
.post-item h3 a:hover { color: var(--accent); }
.post-date { font-size: 0.82rem; color: #a0aec0; margin-bottom: 8px; }
.post-excerpt { font-size: 0.9rem; color: var(--text-light); }
.post-tags { display: flex; gap: 8px; margin-top: 10px; }
.post-tags span {
  font-size: 0.72rem; padding: 2px 10px;
  border-radius: 10px; background: #f1f5f9; color: var(--text-light);
}

/* ===== About ===== */
.about-content {
  max-width: 700px; margin: 0 auto;
  font-size: 0.95rem; line-height: 1.9;
}
.about-content h2 {
  font-size: 1.3rem; color: var(--heading);
  margin: 32px 0 12px; padding-bottom: 8px;
  border-bottom: 2px solid var(--accent-light);
}
.about-content p { margin-bottom: 16px; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.skill-tags span {
  font-size: 0.8rem; padding: 5px 14px;
  border-radius: 16px; background: var(--accent-light); color: var(--accent);
  font-weight: 500;
}

/* ===== Footer ===== */
.site-footer {
  text-align: center; padding: 40px 24px;
  border-top: 1px solid var(--border);
  font-size: 0.82rem; color: #a0aec0;
}
.site-footer a { color: var(--text-light); }
.site-footer a:hover { color: var(--accent); }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .hero h1 { font-size: 1.8rem; }
  .cards { grid-template-columns: 1fr; }
  .header-inner { height: 52px; }
  .site-nav { gap: 16px; }
  .site-nav a { font-size: 0.82rem; }
  .hero { padding: 50px 16px 40px; }
  .section { padding: 40px 0; }
}
