/* ===== 现代个人博客 | style.css ===== */

:root {
  --bg: #070b16;
  --bg-soft: #0d1428;
  --card: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.08);
  --text: #e6ecff;
  --muted: #8b93b5;
  --accent: #6c8bff;
  --accent2: #26f0c8;
  --grad: linear-gradient(90deg, #6c8bff, #26f0c8);
  --mono: "SF Mono", "JetBrains Mono", Consolas, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.7;
}

/* 背景光斑 */
.bg-orbs { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.45; }
.orb-a { width: 420px; height: 420px; background: #5b3df5; top: -100px; left: -80px; animation: drift 18s ease-in-out infinite; }
.orb-b { width: 360px; height: 360px; background: #0ee0c0; bottom: -80px; right: -60px; animation: drift 22s ease-in-out infinite reverse; }
.orb-c { width: 280px; height: 280px; background: #ff6a9d; top: 40%; left: 60%; animation: drift 26s ease-in-out infinite 2s; }

@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, -40px) scale(1.1); }
}

.site { position: relative; z-index: 1; max-width: 920px; margin: 0 auto; padding: 0 24px; display: flex; min-height: 100vh; flex-direction: column; }

/* 导航 */
.site-header { padding: 28px 0 8px; }
.nav { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.logo { font-family: var(--mono); font-weight: 700; color: var(--text); text-decoration: none; font-size: 1.05rem; letter-spacing: 0.5px; }
.logo:hover { color: var(--accent2); }
.nav-links { list-style: none; display: flex; gap: 28px; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 0.95rem; transition: color .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a.active { border-bottom: 2px solid var(--accent2); padding-bottom: 4px; }

/* 主页英雄区 */
.hero { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 60px 0; }
.eyebrow { font-family: var(--mono); color: var(--accent2); font-size: 0.85rem; letter-spacing: 2px; margin-bottom: 18px; }
.hero-title { font-size: clamp(3.5rem, 12vw, 7rem); font-weight: 800; line-height: 1.02; letter-spacing: -2px; }
.hero-title .line { display: block; }
.grad, .grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.hero-sub { max-width: 560px; margin-top: 22px; color: var(--muted); font-size: 1.1rem; }
.hero-sub strong { color: var(--text); }
.hero-actions { margin-top: 34px; display: flex; gap: 16px; flex-wrap: wrap; }

.btn { text-decoration: none; padding: 12px 24px; border-radius: 999px; font-weight: 600; font-size: 0.95rem; transition: all .25s; border: 1px solid transparent; }
.btn-primary { background: var(--grad); color: #070b16; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(38, 240, 200, 0.25); }
.btn-ghost { border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent2); color: var(--accent2); }

.hero-meta { margin-top: 40px; }
.typed { font-family: var(--mono); color: var(--accent2); font-size: 0.95rem; border-right: 2px solid var(--accent2); padding-right: 6px; animation: blink .8s step-end infinite; }
@keyframes blink { 50% { border-color: transparent; } }

/* 子页面 */
.subpage .page { flex: 1; padding: 50px 0; }
.page-title { font-size: clamp(2.2rem, 6vw, 3.6rem); font-weight: 800; letter-spacing: -1px; margin-bottom: 12px; }
.back-link { font-family: var(--mono); color: var(--muted); text-decoration: none; font-size: 0.85rem; }
.back-link:hover { color: var(--accent2); }

/* 文章卡片 */
.post-list { margin-top: 24px; display: grid; gap: 20px; }
.post-card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 26px; backdrop-filter: blur(10px); transition: all .25s; }
.post-card:hover { transform: translateY(-4px); border-color: var(--accent2); background: rgba(255,255,255,0.06); }
.post-date { font-family: var(--mono); color: var(--accent2); font-size: 0.8rem; }
.post-card h2 { margin: 8px 0 10px; font-size: 1.35rem; }
.post-card h2 a { color: var(--text); text-decoration: none; }
.post-card h2 a:hover { color: var(--accent2); }
.post-card p { color: var(--muted); font-size: 0.95rem; }

/* 关于卡片 */
.about-card, .post-content { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 30px; backdrop-filter: blur(10px); margin-top: 20px; }
.about-card p { margin-bottom: 14px; color: var(--muted); }
.about-card p strong, .about-card p em { color: var(--text); }
.about-list { list-style: none; margin-top: 16px; display: grid; gap: 10px; color: var(--text); font-size: 0.98rem; }

/* 文章标题与元信息 */
.post-title { font-size: clamp(1.7rem, 4.5vw, 2.6rem); font-weight: 800; letter-spacing: -1px; line-height: 1.25; margin-bottom: 8px; }
.post-meta { font-family: var(--mono); color: var(--muted); font-size: 0.85rem; display: block; margin-bottom: 20px; }

/* 卡片正文通用排版 */
.about-card h2, .post-content h2 { color: var(--text); margin: 30px 0 10px; font-size: 1.4rem; }
.about-card h3, .post-content h3 { color: var(--text); margin: 24px 0 10px; font-size: 1.15rem; }
.about-card h4, .post-content h4 { color: var(--text); margin: 20px 0 8px; font-size: 1.02rem; }
.about-card p, .post-content p { margin-bottom: 16px; color: var(--muted); }
.about-card strong, .about-card em, .post-content strong, .post-content em { color: var(--text); }
.about-card a, .post-content a { color: #9fb6ff; text-decoration: none; }
.about-card a:hover, .post-content a:hover { color: var(--accent2); }
.about-card ul, .about-card ol, .post-content ul, .post-content ol { margin: 10px 0 16px 22px; color: var(--muted); }
.about-card li, .post-content li { margin-bottom: 8px; }
.about-card pre, .post-content pre { background: rgba(108,139,255,0.08); border: 1px solid var(--border); border-radius: 10px; padding: 16px; overflow-x: auto; font-family: var(--mono); font-size: 0.82rem; line-height: 1.6; margin: 16px 0; }
.about-card pre code, .post-content pre code { background: none; padding: 0; color: #9fb6ff; font-size: inherit; }
.about-card code, .post-content code { background: rgba(108,139,255,0.15); padding: 2px 7px; border-radius: 6px; font-family: var(--mono); font-size: 0.9em; color: #9fb6ff; }
.about-card blockquote, .post-content blockquote { border-left: 3px solid var(--accent2); padding-left: 16px; margin: 16px 0; color: var(--muted); font-style: italic; }
.about-card blockquote p, .post-content blockquote p { margin: 0; }
.about-card table, .post-content table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.about-card th, .about-card td, .post-content th, .post-content td { border: 1px solid var(--border); padding: 10px 12px; text-align: left; }
.about-card th, .post-content th { background: rgba(108,139,255,0.1); color: var(--text); }
.about-card td, .post-content td { color: var(--muted); }

/* 组件：网格卡片 */
.feature-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin: 18px 0; }
.service-grid, .system-color-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin: 18px 0; }
.feature-item, .service-card, .system-color-item, .team-member, .intro-box { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.feature-item h4, .service-card h3, .team-member h3 { color: var(--text); margin: 0 0 8px; }
.feature-item p, .service-card p, .team-member p { color: var(--muted); margin: 0; font-size: 0.92rem; }
.team-member, .intro-box { margin: 16px 0; }
.color-preview { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: middle; border: 1px solid var(--border); }
.highlight { color: var(--accent2); font-family: var(--mono); }

/* 组件：提示框 */
.tip-box, .note, .warning, .tip { border-radius: 0 12px 12px 0; padding: 14px 18px; margin: 18px 0; color: var(--muted); }
.tip-box { background: rgba(38,240,200,0.06); border-left: 3px solid var(--accent2); }
.tip-box h4 { color: var(--accent2); margin: 0 0 6px; }
.tip-box p { margin: 0 0 8px; }
.tip-box p:last-child { margin-bottom: 0; }
.note { background: rgba(108,139,255,0.08); border-left: 3px solid var(--accent); }
.warning { background: rgba(255,106,157,0.08); border-left: 3px solid #ff6a9d; }
.tip { background: rgba(38,240,200,0.06); border-left: 3px solid var(--accent2); }
.tip-box strong, .note strong, .warning strong, .tip strong { color: var(--text); }

/* 页脚 */
.site-footer { padding: 30px 0 36px; text-align: center; color: var(--muted); font-size: 0.85rem; font-family: var(--mono); }
.site-footer p { margin: 4px 0; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--accent2); }

/* 首页扩展 */
.home { flex: 1; display: flex; flex-direction: column; }
.hero-home { flex: none; justify-content: flex-start; padding: 56px 0 8px; }
.post-section { padding: 44px 0 16px; }
.section-title { font-size: clamp(1.9rem, 5vw, 2.6rem); font-weight: 800; letter-spacing: -1px; margin-bottom: 14px; }

/* 相关资源链接 */
.footer-links { max-width: 760px; margin: 0 auto 24px; }
.footer-links-title { display: block; color: var(--text); margin-bottom: 10px; letter-spacing: 1px; font-family: var(--mono); font-weight: 600; }
.footer-links a { display: inline-block; margin: 4px 11px; font-family: var(--mono); font-size: 0.8rem; }

@media (max-width: 520px) {
  .nav { flex-direction: column; align-items: flex-start; }
  .nav-links { gap: 18px; }
}
