/*
Theme Name: Aurora Pulse
Theme URI: https://github.com/workbuddy/aurora-pulse
Author: WorkBuddy
Author URI: https://workbuddy.ai
Description: 一款炫酷的暗色霓虹风格 WordPress 主题，包含流动极光背景、玻璃拟态卡片、霓虹辉光标题、滚动揭示动画与丰富的悬停特效。
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: aurora-pulse
Tags: dark, neon, grid-layout, custom-logo, featured-images, threaded-comments, translation-ready, accessibility-ready
*/

/* ============================================================
   Aurora Pulse — 设计变量
   ============================================================ */
:root {
  --bg-0: #05060f;
  --bg-1: #0a0c1c;
  --bg-2: #11142b;
  --surface: rgba(255, 255, 255, 0.05);
  --surface-strong: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.12);
  --border-glow: rgba(0, 234, 255, 0.5);
  --text: #eaf2ff;
  --text-dim: #9aa6c7;
  --neon-cyan: #00eaff;
  --neon-magenta: #ff2bd6;
  --neon-purple: #9b5cff;
  --neon-lime: #b6ff3c;
  --grad-primary: linear-gradient(120deg, #00eaff, #9b5cff 45%, #ff2bd6);
  --grad-soft: linear-gradient(135deg, rgba(0, 234, 255, 0.18), rgba(255, 43, 214, 0.18));
  --shadow-neon: 0 0 24px rgba(0, 234, 255, 0.35), 0 0 48px rgba(155, 92, 255, 0.25);
  --radius: 18px;
  --radius-sm: 12px;
  --maxw: 1180px;
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}

/* ============================================================
   重置
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg-0);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--neon-cyan); text-decoration: none; transition: color .25s ease; }
a:hover { color: var(--neon-magenta); }
h1, h2, h3, h4 { line-height: 1.2; font-weight: 800; letter-spacing: -0.01em; }
ul { list-style: none; padding: 0; margin: 0; }

/* ============================================================
   流动极光背景
   ============================================================ */
.aurora-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(40% 50% at 15% 20%, rgba(0, 234, 255, 0.18), transparent 60%),
    radial-gradient(45% 55% at 85% 15%, rgba(255, 43, 214, 0.16), transparent 60%),
    radial-gradient(50% 60% at 50% 95%, rgba(155, 92, 255, 0.18), transparent 60%),
    var(--bg-0);
  filter: blur(2px);
}
.aurora-bg::before,
.aurora-bg::after {
  content: "";
  position: absolute;
  width: 60vmax;
  height: 60vmax;
  border-radius: 50%;
  mix-blend-mode: screen;
  opacity: 0.55;
  will-change: transform;
}
.aurora-bg::before {
  background: radial-gradient(circle, rgba(0, 234, 255, 0.55), transparent 65%);
  top: -15vmax; left: -10vmax;
  animation: drift1 18s ease-in-out infinite alternate;
}
.aurora-bg::after {
  background: radial-gradient(circle, rgba(255, 43, 214, 0.5), transparent 65%);
  bottom: -20vmax; right: -12vmax;
  animation: drift2 22s ease-in-out infinite alternate;
}
@keyframes drift1 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(20vmax, 12vmax) scale(1.25); }
}
@keyframes drift2 {
  0%   { transform: translate(0, 0) scale(1.1); }
  100% { transform: translate(-18vmax, -10vmax) scale(0.9); }
}
.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 75%);
}

/* ============================================================
   布局容器
   ============================================================ */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ============================================================
   顶栏 / 导航（玻璃拟态）
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: linear-gradient(180deg, rgba(10, 12, 28, 0.85), rgba(10, 12, 28, 0.45));
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand {
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: 0.02em;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 18px rgba(0, 234, 255, 0.25);
}
.main-menu { display: flex; gap: 8px; }
.main-menu a {
  color: var(--text-dim);
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 600;
  position: relative;
}
.main-menu a:hover {
  color: var(--text);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--border);
}
.nav-toggle {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  width: 44px; height: 44px;
  border-radius: 12px;
  font-size: 1.2rem;
  cursor: pointer;
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  padding: 120px 0 90px;
  text-align: center;
  position: relative;
}
.hero .eyebrow {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--neon-cyan);
  background: var(--surface);
  border: 1px solid var(--border-glow);
  box-shadow: var(--shadow-neon);
  margin-bottom: 28px;
}
.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  margin: 0 0 20px;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 26px rgba(155, 92, 255, 0.45));
}
.hero .typed {
  border-right: 2px solid var(--neon-cyan);
  animation: blink 0.9s step-end infinite;
}
@keyframes blink { 50% { border-color: transparent; } }
.hero p {
  max-width: 640px;
  margin: 0 auto 36px;
  color: var(--text-dim);
  font-size: 1.15rem;
}
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ============================================================
   霓虹按钮
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}
.btn-primary {
  color: #05060f;
  background: var(--grad-primary);
  background-size: 200% 200%;
  box-shadow: var(--shadow-neon);
  animation: hue 6s linear infinite;
}
.btn-primary:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 0 34px rgba(255, 43, 214, 0.55); }
.btn-ghost {
  color: var(--text);
  background: var(--surface);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--neon-cyan); box-shadow: 0 0 22px rgba(0, 234, 255, 0.3); transform: translateY(-3px); }
@keyframes hue { 0% { background-position: 0% 50%; } 100% { background-position: 200% 50%; } }

/* ============================================================
   内容区 / 文章网格
   ============================================================ */
.section { padding: 80px 0; }
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  text-align: center;
  margin: 0 0 12px;
}
.section-sub { text-align: center; color: var(--text-dim); margin: 0 auto 48px; max-width: 560px; }

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 26px;
}
.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
  position: relative;
}
.post-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: var(--grad-primary);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity .35s ease;
}
.post-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-neon);
  border-color: transparent;
}
.post-card:hover::before { opacity: 1; }
.post-thumb { aspect-ratio: 16/9; background: var(--grad-soft); position: relative; overflow: hidden; }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-body { padding: 22px 22px 26px; }
.post-meta { font-size: 0.78rem; color: var(--text-dim); letter-spacing: 0.06em; text-transform: uppercase; }
.post-card h3 { margin: 10px 0 12px; font-size: 1.25rem; }
.post-card h3 a { color: var(--text); }
.post-card h3 a:hover { color: var(--neon-cyan); }
.post-card p { color: var(--text-dim); margin: 0; font-size: 0.95rem; }
.read-more {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 16px;
  font-weight: 700; font-size: 0.9rem; color: var(--neon-cyan);
}
.read-more::after { content: "→"; transition: transform .25s ease; }
.post-card:hover .read-more::after { transform: translateX(5px); }

/* ============================================================
   单页 / 文章主体
   ============================================================ */
.entry {
  max-width: 760px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  backdrop-filter: blur(10px);
}
.entry h1 { font-size: clamp(2rem, 5vw, 3rem); margin-top: 0; }
.entry .post-meta { margin-bottom: 24px; }
.entry img { border-radius: var(--radius-sm); margin: 24px 0; }
.entry blockquote {
  border-left: 3px solid var(--neon-cyan);
  margin: 24px 0;
  padding: 12px 20px;
  background: var(--surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-dim);
}

/* ============================================================
   侧边栏
   ============================================================ */
.layout-main { display: grid; grid-template-columns: 1fr 300px; gap: 40px; align-items: start; }
.widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 22px;
  margin-bottom: 22px;
  backdrop-filter: blur(10px);
}
.widget h2 { font-size: 1.1rem; margin: 0 0 14px; color: var(--neon-cyan); }
.widget a { color: var(--text-dim); }
.widget a:hover { color: var(--neon-cyan); }
.widget ul li { padding: 6px 0; border-bottom: 1px dashed var(--border); }

/* ============================================================
   页脚
   ============================================================ */
.site-footer {
  margin-top: 80px;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(10, 12, 28, 0.2), rgba(5, 6, 15, 0.9));
  padding: 56px 0 32px;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer-grid h4 { color: var(--neon-cyan); margin: 0 0 16px; }
.footer-grid a { color: var(--text-dim); display: block; padding: 4px 0; }
.footer-bottom {
  margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border);
  text-align: center; color: var(--text-dim); font-size: 0.88rem;
}

/* ============================================================
   滚动揭示动画
   ============================================================ */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity .8s ease, transform .8s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .1s; }
.reveal.d2 { transition-delay: .2s; }
.reveal.d3 { transition-delay: .3s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .aurora-bg::before, .aurora-bg::after, .btn-primary { animation: none; }
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 900px) {
  .layout-main { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .main-menu {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: rgba(10, 12, 28, 0.98);
    border-bottom: 1px solid var(--border);
    padding: 12px 24px;
    display: none;
  }
  .main-menu.open { display: flex; }
  .main-menu a { padding: 12px 8px; border-radius: 8px; }
  .hero { padding: 90px 0 60px; }
}
