/* ============================================================
   老K 个人主页 - 样式表
   风格：创意鲜明 · 渐变霓虹 · 滚动动效
   ============================================================ */

/* ---------- 设计变量 ---------- */
:root {
  --bg: #08080d;
  --bg-alt: #0d0d16;
  --surface: #12121e;
  --surface-2: #181828;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f2f2f7;
  --text-muted: #a0a0b5;
  --text-dim: #6f6f85;

  --primary: #7c5cff;
  --primary-light: #a08cff;
  --secondary: #ff5c8a;
  --accent: #00e5ff;
  --gradient: linear-gradient(135deg, #7c5cff 0%, #ff5c8a 50%, #ffb457 100%);
  --gradient-cool: linear-gradient(135deg, #7c5cff, #00e5ff);

  --shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 20px 60px rgba(124, 92, 255, 0.25);
  --radius: 20px;
  --radius-sm: 12px;
  --container: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- 基础重置 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.nav-open { overflow: hidden; }
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
::selection { background: var(--primary); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.container { width: min(100% - 48px, var(--container)); margin-inline: auto; }

.skip-link {
  position: fixed; top: -100px; left: 16px; z-index: 9999;
  background: var(--primary); color: #fff; padding: 10px 18px; border-radius: 8px;
  transition: top 0.2s;
}
.skip-link:focus { top: 16px; }

/* ---------- 背景装饰 ---------- */
.bg-decor { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 75%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 75%);
}
.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.28; animation: float-orb 18s ease-in-out infinite alternate; }
.orb-1 { width: 460px; height: 460px; background: #7c5cff; top: -120px; left: -100px; }
.orb-2 { width: 380px; height: 380px; background: #ff5c8a; top: 30%; right: -120px; animation-delay: -6s; }
.orb-3 { width: 420px; height: 420px; background: #00e5ff; bottom: -100px; left: 30%; animation-delay: -12s; opacity: 0.16; }
@keyframes float-orb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, -30px) scale(1.1); }
  100% { transform: translate(-30px, 40px) scale(0.95); }
}

/* ---------- 顶部导航 ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(8, 8, 13, 0.72);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s;
}
.site-header.scrolled { background: rgba(8, 8, 13, 0.92); border-bottom-color: var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.15rem; }
.logo-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--gradient); color: #fff;
  font-family: 'JetBrains Mono', monospace; font-size: 0.85rem;
  box-shadow: 0 6px 20px rgba(124, 92, 255, 0.35);
}
.logo-text .dot { color: var(--secondary); }
.nav { display: flex; align-items: center; gap: 34px; }
.nav a {
  position: relative; font-size: 0.92rem; font-weight: 500; color: var(--text-muted);
  transition: color 0.25s;
}
.nav a::after {
  content: ''; position: absolute; bottom: -6px; left: 0; right: 100%; height: 2px;
  background: var(--gradient); border-radius: 2px; transition: right 0.3s var(--ease);
}
.nav a:hover, .nav a.active { color: var(--text); }
.nav a:hover::after, .nav a.active::after { right: 0; }

.nav-toggle {
  display: none; width: 42px; height: 42px; border: 1px solid var(--border);
  background: var(--surface); border-radius: 10px; padding: 10px;
  flex-direction: column; justify-content: space-around;
}
.nav-toggle span { display: block; height: 2px; background: var(--text); border-radius: 2px; transition: 0.3s; }
.nav-toggle.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

.scroll-progress {
  position: absolute; bottom: 0; left: 0; height: 2px; width: 0;
  background: var(--gradient); border-radius: 2px;
}

/* ---------- 通用组件 ---------- */
.gradient-text {
  background: var(--gradient); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 26px; border-radius: 12px; font-weight: 600; font-size: 0.95rem;
  border: 1px solid transparent; transition: transform 0.25s var(--ease), box-shadow 0.25s, background 0.25s;
}
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.25s; }
.btn:hover svg { transform: translateX(4px); }
.btn:hover { transform: translateY(-3px); }
.btn-primary {
  background: var(--gradient); color: #fff;
  box-shadow: 0 10px 30px rgba(124, 92, 255, 0.3);
}
.btn-primary:hover { box-shadow: 0 16px 40px rgba(124, 92, 255, 0.5); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--primary); }
.btn-full { width: 100%; }

.section { padding: 110px 0; position: relative; }
.section-alt { background: linear-gradient(180deg, transparent, rgba(255,255,255,0.018), transparent); }
.section-heading { margin-bottom: 28px; }
.section-label {
  display: inline-block; font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem; letter-spacing: 0.15em; color: var(--primary-light);
  margin-bottom: 10px;
}
.section-heading h2 {
  font-size: clamp(2rem, 4vw, 2.9rem); line-height: 1.2; margin: 0 0 18px;
  font-weight: 800; letter-spacing: -0.02em;
}
.heading-line {
  width: 64px; height: 4px; border-radius: 4px; background: var(--gradient);
}
.section-intro { color: var(--text-muted); max-width: 680px; margin: 0 0 48px; font-size: 1.02rem; }
.section-intro em { color: var(--text-dim); font-style: normal; font-size: 0.9rem; }

/* 滚动渐入动画 */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---------- Hero 首屏 ---------- */
.hero { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 130px 0 90px; position: relative; }
.hero-inner { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 60px; align-items: center; }
.badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 16px; border-radius: 100px; font-size: 0.85rem;
  background: rgba(124, 92, 255, 0.1); border: 1px solid rgba(124, 92, 255, 0.3);
  color: var(--primary-light); margin-bottom: 26px;
}
.badge-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #4ade80;
  box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.15);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.hero-title {
  font-size: clamp(2.6rem, 5.5vw, 4.4rem); line-height: 1.15; font-weight: 800;
  letter-spacing: -0.035em; margin: 0 0 24px;
}
.hero-subtitle { font-size: 1.12rem; color: var(--text-muted); line-height: 1.85; margin: 0 0 22px; }
.hero-subtitle strong { color: var(--text); font-weight: 600; }
.typing-line {
  display: flex; align-items: center; gap: 10px;
  font-family: 'JetBrains Mono', monospace; font-size: 0.95rem;
  color: var(--accent); margin-bottom: 34px; min-height: 28px;
}
.typing-line .prompt { color: var(--secondary); font-weight: 600; }
.cursor { display: inline-block; width: 2px; height: 1.1em; background: var(--accent); animation: blink 1s step-end infinite; margin-left: 2px; }
@keyframes blink { 50% { opacity: 0; } }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 50px; }
.hero-stats { display: flex; gap: 44px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; }
.stat-num {
  font-size: 2.2rem; font-weight: 800; line-height: 1.1;
  background: var(--gradient-cool); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.stat-label { font-size: 0.85rem; color: var(--text-muted); margin-top: 4px; }

/* 代码窗口 */
.hero-visual { position: relative; padding: 20px 0; }
.code-window {
  background: linear-gradient(145deg, rgba(24,24,40,0.95), rgba(12,12,22,0.95));
  border: 1px solid var(--border-strong); border-radius: 16px;
  box-shadow: var(--shadow-glow), 0 30px 80px rgba(0,0,0,0.5);
  overflow: hidden; transform: perspective(1000px) rotateY(-6deg) rotateX(3deg);
  animation: window-float 7s ease-in-out infinite alternate;
}
@keyframes window-float {
  0% { transform: perspective(1000px) rotateY(-6deg) rotateX(3deg) translateY(0); }
  100% { transform: perspective(1000px) rotateY(-3deg) rotateX(1deg) translateY(-14px); }
}
.window-bar {
  display: flex; align-items: center; gap: 7px; padding: 14px 18px;
  background: rgba(255,255,255,0.03); border-bottom: 1px solid var(--border);
}
.window-bar .dot { width: 11px; height: 11px; border-radius: 50%; }
.dot.red { background: #ff5f57; } .dot.yellow { background: #febc2e; } .dot.green { background: #28c840; }
.window-title { margin-left: 12px; font-family: 'JetBrains Mono', monospace; font-size: 0.78rem; color: var(--text-dim); }
.code-body {
  margin: 0; padding: 24px 22px; overflow-x: auto;
  font-family: 'JetBrains Mono', monospace; font-size: 0.82rem; line-height: 1.9;
  color: #d6d6e8;
}
.c-key { color: #c792ea; } .c-var { color: #82aaff; } .c-prop { color: #f78c6c; }
.c-str { color: #c3e88d; } .c-fn { color: #82aaff; } .c-comment { color: #5f6b85; font-style: italic; }
.floating-tag {
  position: absolute; padding: 8px 14px; border-radius: 10px;
  background: rgba(18,18,30,0.9); border: 1px solid var(--border-strong);
  font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; font-weight: 600;
  box-shadow: var(--shadow); backdrop-filter: blur(10px);
  animation: tag-float 5s ease-in-out infinite alternate;
}
.tag-1 { top: 4%; right: -10px; color: #82aaff; animation-delay: 0s; }
.tag-2 { top: 38%; left: -30px; color: #61dafb; animation-delay: -1.5s; }
.tag-3 { bottom: 18%; right: -20px; color: #c3e88d; animation-delay: -3s; }
.tag-4 { bottom: -2%; left: 12%; color: #f78c6c; animation-delay: -4s; }
@keyframes tag-float { from { transform: translateY(0); } to { transform: translateY(-12px); } }

.scroll-hint {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-size: 0.75rem; color: var(--text-dim); letter-spacing: 0.1em;
}
.mouse { width: 22px; height: 34px; border: 2px solid var(--text-dim); border-radius: 12px; display: flex; justify-content: center; padding-top: 6px; }
.wheel { width: 3px; height: 7px; border-radius: 2px; background: var(--primary-light); animation: wheel-scroll 1.8s ease-in-out infinite; }
@keyframes wheel-scroll { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(12px); opacity: 0; } }

/* ---------- 关于我 ---------- */
.about-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 60px; align-items: start; }
.about-text h3 { font-size: 1.5rem; font-weight: 700; line-height: 1.45; margin: 0 0 22px; }
.about-text p { color: var(--text-muted); margin: 0 0 18px; }
.about-text strong { color: var(--primary-light); font-weight: 600; }
.about-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.about-tags span {
  padding: 7px 14px; border-radius: 8px; font-size: 0.82rem;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-muted);
}
.info-card {
  display: flex; gap: 18px; padding: 22px; margin-bottom: 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); transition: transform 0.3s var(--ease), border-color 0.3s, background 0.3s;
}
.info-card:hover { transform: translateX(6px); border-color: rgba(124,92,255,0.4); background: var(--surface-2); }
.info-icon {
  flex-shrink: 0; width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 12px; background: rgba(124,92,255,0.12); font-size: 1.2rem;
}
.info-card h4 { margin: 0 0 6px; font-size: 1rem; font-weight: 600; }
.info-card p { margin: 0; font-size: 0.88rem; color: var(--text-muted); line-height: 1.6; }

/* ---------- 技术栈 ---------- */
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 44px; }
.skill-category {
  padding: 28px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); transition: transform 0.3s var(--ease), border-color 0.3s;
}
.skill-category:hover { transform: translateY(-6px); border-color: rgba(124,92,255,0.35); }
.category-head { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.category-icon { font-size: 1.5rem; }
.category-head h3 { margin: 0; font-size: 1.2rem; font-weight: 700; }
.skill-bar-wrap { margin-bottom: 20px; }
.skill-bar-wrap:last-child { margin-bottom: 0; }
.skill-bar-label { display: flex; justify-content: space-between; font-size: 0.85rem; margin-bottom: 8px; color: var(--text-muted); }
.skill-bar-label span:last-child { font-family: 'JetBrains Mono', monospace; color: var(--primary-light); font-size: 0.78rem; }
.skill-bar { height: 6px; border-radius: 6px; background: rgba(255,255,255,0.06); overflow: hidden; }
.skill-bar span {
  display: block; height: 100%; width: 0; border-radius: 6px; background: var(--gradient);
  transition: width 1.2s var(--ease);
}
.skill-category.visible .skill-bar span { width: var(--level); }
.tech-cloud { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.tech-cloud span {
  padding: 9px 18px; border-radius: 100px; font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem; color: var(--text-muted);
  background: rgba(255,255,255,0.03); border: 1px solid var(--border);
  transition: 0.25s; cursor: default;
}
.tech-cloud span:hover { color: var(--text); border-color: var(--primary); background: rgba(124,92,255,0.1); transform: translateY(-2px); }

/* ---------- 项目作品 ---------- */
.projects-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
.project-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.3s, box-shadow 0.4s;
  transform-style: preserve-3d;
}
.project-card:hover {
  transform: translateY(-8px); border-color: rgba(124,92,255,0.4);
  box-shadow: 0 24px 60px rgba(0,0,0,0.4), 0 0 40px rgba(124,92,255,0.08);
}
.project-cover {
  height: 190px; display: grid; place-items: center; position: relative;
  font-size: 4rem; overflow: hidden;
}
.project-cover::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 50%, transparent 30%, rgba(8,8,13,0.5) 100%);
}
.cover-1 { background: linear-gradient(135deg, #3b2d7a, #7c5cff); }
.cover-2 { background: linear-gradient(135deg, #7a2d4e, #ff5c8a); }
.cover-3 { background: linear-gradient(135deg, #1f5a6b, #00e5ff); }
.cover-4 { background: linear-gradient(135deg, #6b4a1f, #ffb457); }
.project-icon { filter: drop-shadow(0 8px 16px rgba(0,0,0,0.3)); position: relative; z-index: 1; transition: transform 0.4s var(--ease); }
.project-card:hover .project-icon { transform: scale(1.15) rotate(-6deg); }
.project-badge {
  position: absolute; top: 16px; right: 16px; z-index: 2;
  padding: 5px 12px; border-radius: 100px; font-size: 0.72rem; font-weight: 600;
  background: rgba(8,8,13,0.65); color: #fff; backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.18);
}
.project-body { padding: 28px; }
.project-body h3 { margin: 0 0 12px; font-size: 1.28rem; font-weight: 700; }
.project-body p { margin: 0 0 18px; color: var(--text-muted); font-size: 0.92rem; line-height: 1.75; }
.project-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.project-tags span {
  padding: 4px 10px; border-radius: 6px; font-size: 0.74rem;
  font-family: 'JetBrains Mono', monospace; color: var(--primary-light);
  background: rgba(124,92,255,0.1); border: 1px solid rgba(124,92,255,0.2);
}
.project-links { display: flex; gap: 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.project-links a { font-size: 0.86rem; font-weight: 600; color: var(--text-muted); transition: 0.2s; }
.project-links a:hover { color: var(--accent); }

/* ---------- 博客列表 ---------- */
.blog-list { display: flex; flex-direction: column; gap: 16px; }
.blog-card {
  display: flex; gap: 28px; align-items: flex-start; padding: 28px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  transition: transform 0.3s var(--ease), border-color 0.3s, background 0.3s;
}
.blog-card:hover { transform: translateX(8px); border-color: rgba(124,92,255,0.4); background: var(--surface-2); }
.blog-date {
  flex-shrink: 0; width: 62px; text-align: center; padding: 10px 0;
  background: rgba(124,92,255,0.1); border: 1px solid rgba(124,92,255,0.22);
  border-radius: 12px; font-family: 'JetBrains Mono', monospace;
}
.blog-date .day { display: block; font-size: 1.5rem; font-weight: 700; color: var(--primary-light); line-height: 1.2; }
.blog-date .month { display: block; font-size: 0.7rem; letter-spacing: 0.1em; color: var(--text-dim); }
.blog-content { flex: 1; min-width: 0; }
.blog-category { font-size: 0.75rem; color: var(--secondary); font-weight: 600; letter-spacing: 0.05em; }
.blog-content h3 { margin: 6px 0 10px; font-size: 1.22rem; font-weight: 700; line-height: 1.45; transition: color 0.2s; }
.blog-card:hover .blog-content h3 { color: var(--primary-light); }
.blog-content p { margin: 0 0 14px; color: var(--text-muted); font-size: 0.92rem; line-height: 1.7; }
.blog-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 0.8rem; color: var(--text-dim); }
.read-more { margin-left: auto; color: var(--accent); font-weight: 600; }

/* ---------- 联系 ---------- */
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 60px; align-items: start; }
.contact-info h3 { font-size: 1.65rem; line-height: 1.45; margin: 0 0 16px; }
.contact-info > p { color: var(--text-muted); margin: 0 0 32px; }
.contact-items { display: flex; flex-direction: column; gap: 14px; }
.contact-item {
  display: flex; align-items: center; gap: 16px; padding: 16px 18px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  transition: transform 0.25s, border-color 0.25s;
}
a.contact-item:hover { transform: translateX(5px); border-color: var(--primary); }
.contact-icon {
  flex-shrink: 0; width: 42px; height: 42px; display: grid; place-items: center;
  border-radius: 10px; background: rgba(124,92,255,0.1); font-size: 1.1rem;
}
.contact-item small { display: block; font-size: 0.75rem; color: var(--text-dim); }
.contact-item strong { display: block; font-size: 0.92rem; font-weight: 600; }
.contact-form {
  padding: 34px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 8px; color: var(--text-muted); }
.form-group input, .form-group textarea {
  width: 100%; padding: 13px 16px; border-radius: 10px;
  background: var(--bg); border: 1px solid var(--border-strong);
  color: var(--text); font-size: 0.92rem; resize: vertical;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--text-dim); }
.form-group input:focus, .form-group textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124,92,255,0.15);
}
.honeypot { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }
.form-note { margin: 14px 0 0; font-size: 0.78rem; color: var(--text-dim); text-align: center; }

/* ---------- 页脚 ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 50px 0 36px; background: var(--bg-alt); }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-start; gap: 30px; flex-wrap: wrap; }
.footer-tagline { color: var(--text-dim); font-size: 0.88rem; margin: 14px 0 0; }
.footer-links { display: flex; gap: 26px; flex-wrap: wrap; padding-top: 10px; }
.footer-links a { color: var(--text-muted); font-size: 0.88rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--accent); }
.copyright { color: var(--text-dim); font-size: 0.8rem; line-height: 1.8; margin: 0; }

/* ---------- 回到顶部 ---------- */
.back-to-top {
  position: fixed; bottom: 28px; right: 28px; z-index: 90;
  width: 46px; height: 46px; display: grid; place-items: center;
  border-radius: 12px; background: var(--gradient); color: #fff;
  border: none; box-shadow: 0 10px 30px rgba(124,92,255,0.35);
  opacity: 0; visibility: hidden; transform: translateY(14px);
  transition: 0.35s var(--ease);
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { transform: translateY(-4px); }
.back-to-top svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ============================================================
   博客文章页样式
   ============================================================ */
.article-header { padding: 160px 0 60px; text-align: center; }
.article-header .section-label { margin-bottom: 16px; }
.article-header h1 {
  font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.3; font-weight: 800;
  letter-spacing: -0.03em; max-width: 900px; margin: 0 auto 24px;
}
.article-meta { display: flex; justify-content: center; flex-wrap: wrap; gap: 16px; color: var(--text-dim); font-size: 0.85rem; }
.article-meta span::before { content: '•'; margin-right: 16px; color: var(--primary); }
.article-meta span:first-child::before { content: none; margin: 0; }
.article-body { max-width: 800px; margin: 0 auto; padding: 0 0 100px; }
.article-body h2 {
  font-size: 1.75rem; font-weight: 700; margin: 56px 0 20px; line-height: 1.4;
  padding-left: 18px; border-left: 4px solid var(--primary);
}
.article-body h3 { font-size: 1.3rem; font-weight: 700; margin: 36px 0 14px; }
.article-body p { color: var(--text-muted); margin: 0 0 20px; line-height: 1.9; }
.article-body strong { color: var(--text); font-weight: 600; }
.article-body ul, .article-body ol { color: var(--text-muted); padding-left: 24px; margin: 0 0 22px; }
.article-body li { margin-bottom: 10px; line-height: 1.8; }
.article-body li::marker { color: var(--primary); }
.article-body blockquote {
  margin: 30px 0; padding: 20px 24px; border-left: 3px solid var(--secondary);
  background: rgba(255,92,138,0.06); border-radius: 0 12px 12px 0;
  color: var(--text); font-style: italic;
}
.article-body pre {
  background: #0b0b14; border: 1px solid var(--border); border-radius: 14px;
  padding: 22px; overflow-x: auto; margin: 26px 0; font-size: 0.86rem; line-height: 1.8;
}
.article-body code { font-family: 'JetBrains Mono', monospace; }
.article-body p code, .article-body li code {
  background: rgba(124,92,255,0.12); color: var(--primary-light);
  padding: 2px 7px; border-radius: 5px; font-size: 0.88em;
}
.article-body img { border-radius: 14px; margin: 30px auto; box-shadow: var(--shadow); }
.article-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 50px; padding-top: 30px; border-top: 1px solid var(--border); }
.article-tags span {
  padding: 6px 14px; border-radius: 100px; font-size: 0.8rem;
  background: rgba(124,92,255,0.1); color: var(--primary-light); border: 1px solid rgba(124,92,255,0.2);
}
.article-nav {
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  max-width: 800px; margin: 0 auto 100px; padding-top: 30px; border-top: 1px solid var(--border);
}
.article-nav a {
  display: flex; flex-direction: column; gap: 6px; padding: 18px 22px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  max-width: 320px; transition: 0.25s;
}
.article-nav a:hover { border-color: var(--primary); transform: translateY(-3px); }
.article-nav small { color: var(--text-dim); font-size: 0.78rem; }
.article-nav strong { font-size: 0.95rem; font-weight: 600; }
.article-nav .next { text-align: right; margin-left: auto; }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; gap: 50px; }
  .hero-visual { max-width: 620px; }
  .code-window { transform: none; animation: none; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .skills-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .container { width: min(100% - 36px, var(--container)); }
  .section { padding: 80px 0; }
  .nav {
    position: fixed; inset: 72px 0 auto 0; flex-direction: column; gap: 0;
    background: rgba(8,8,13,0.98); backdrop-filter: blur(20px);
    padding: 20px 24px 30px; border-bottom: 1px solid var(--border);
    transform: translateY(-140%); transition: transform 0.35s var(--ease);
  }
  .nav.open { transform: translateY(0); }
  .nav a { width: 100%; padding: 14px 0; border-bottom: 1px solid var(--border); font-size: 1rem; }
  .nav-toggle { display: flex; }
  .hero { min-height: auto; padding: 130px 0 90px; }
  .hero-title { font-size: clamp(2.2rem, 9vw, 3rem); }
  .hero-stats { gap: 28px; }
  .stat-num { font-size: 1.8rem; }
  .projects-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .blog-card { flex-direction: column; gap: 16px; padding: 22px; }
  .blog-date { width: auto; display: flex; align-items: baseline; gap: 8px; padding: 6px 12px; }
  .read-more { margin-left: 0; }
  .footer-inner { flex-direction: column; }
  .floating-tag { display: none; }
  .contact-form { padding: 24px; }
  .article-header { padding: 130px 0 40px; }
  .article-body h2 { font-size: 1.45rem; }
  .article-nav { flex-direction: column; }
  .article-nav .next { text-align: left; margin-left: 0; }
}
@media (max-width: 480px) {
  .hero-actions .btn { width: 100%; }
  .hero-stats { gap: 20px; }
  .project-body { padding: 22px; }
  .scroll-hint { display: none; }
}

/* ---------- 减少动画偏好（无障碍） ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important; scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .skill-bar span { width: var(--level); }
}
