/* ============================================================
   华丽风格 · 全局变量
   ============================================================ */
:root {
    --bg-deep: #0a0a14;
    --bg-card: rgba(24, 24, 42, 0.55);
    --ink-1: #f0ecff;
    --ink-2: #a8a4c0;
    --ink-3: #6b6785;
    --purple: #8b7cf6;
    --cyan: #22d3ee;
    --rose: #f472b6;
    --amber: #fbbf24;
    --grad-main: linear-gradient(135deg, #8b7cf6, #22d3ee);
    --grad-warm: linear-gradient(135deg, #f472b6, #fbbf24);
    --grad-cool: linear-gradient(135deg, #22d3ee, #8b7cf6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --shadow-card: 0 18px 50px rgba(0, 0, 0, 0.45);
    --shadow-glow: 0 0 40px rgba(139, 124, 246, 0.18);
    --font-serif: 'Georgia', 'Songti SC', 'Noto Serif SC', serif;
    /* 字体统一改为微软雅黑 Light，并附带系统回退 */
    --font-sans: "Microsoft YaHei Light", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

/* ============================================================
   背景艺术层：深色底 + 三色光晕 + 噪点
   ============================================================ */
body {
    font-family: var(--font-sans);
    font-weight: 300; /* 配合微软雅黑 Light 细体效果 */
    color: var(--ink-1);
    background: var(--bg-deep);
    margin: 0;
    padding: 20px;
    line-height: 1.7;
    overflow-x: hidden;
    min-height: 100vh;
    animation: pageFade 0.8s ease-out;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background:
        radial-gradient(ellipse 60% 50% at 12% 8%, rgba(139, 124, 246, 0.28), transparent 62%),
        radial-gradient(ellipse 55% 50% at 88% 18%, rgba(34, 211, 238, 0.18), transparent 60%),
        radial-gradient(ellipse 65% 55% at 50% 95%, rgba(244, 114, 182, 0.16), transparent 62%);
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@keyframes pageFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes floatGlow {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-12px) scale(1.03); }
}
@keyframes shimmer {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

/* ============================================================
   全局头部：头像 + 网站标题 + 华丽导航栏
   ============================================================ */
.site-header {
    text-align: center;
    padding: 30px 0 20px;
    animation: fadeUp 0.9s cubic-bezier(.16, 1, .3, 1) both;
}

/* 需求1：头像动效出现在每个页面最上方 */
.avatar-container {
    width: 110px;
    height: 110px;
    margin: 0 auto;
    border-radius: 35px;
    padding: 3px;
    background: linear-gradient(135deg, #8b7cf6, #22d3ee, #f472b6);
    box-shadow: 0 0 50px rgba(139, 124, 246, 0.35);
    animation: floatGlow 6s ease-in-out infinite;
}

.avatar-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 32px;
    border: 2px solid var(--bg-deep);
}

.site-title {
    font-family: var(--font-serif);
    font-size: 28px;
    font-weight: 400;
    letter-spacing: 0.02em;
    margin: 20px 0 24px;
    background: linear-gradient(120deg, #f0ecff, #c4b5fd, #67e8f9, #f0ecff);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 8s linear infinite;
}

/* 需求2：导航栏在文字下方，无整页横线，以华丽按钮形式体现 */
.main-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    max-width: 640px;
    margin: 0 auto;
}

.main-nav a {
    text-decoration: none;
    color: var(--ink-2);
    font-size: 14px;
    font-weight: 300;
    padding: 10px 24px;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.4s cubic-bezier(.16, 1, .3, 1);
}

.main-nav a:hover {
    color: var(--ink-1);
    transform: translateY(-3px);
    background: rgba(139, 124, 246, 0.12);
    border-color: rgba(139, 124, 246, 0.3);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3), 0 0 20px rgba(139, 124, 246, 0.2);
}

.main-nav a.active {
    color: #ffffff;
    background: var(--grad-main);
    border-color: transparent;
    box-shadow: 0 0 25px rgba(139, 124, 246, 0.5);
}

/* ============================================================
   首页个人简介（仅首页使用）
   ============================================================ */
.profile-bio {
    font-size: 14px;
    color: var(--ink-2);
    margin: 16px auto 0;
    padding: 0 20px;
    text-align: center;
    letter-spacing: 0.04em;
}

/* ============================================================
   内容网格 & 卡片
   ============================================================ */
.content-grid {
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-width: 640px;
    margin: 40px auto 0;
    padding-bottom: 60px;
}

.content-grid > * {
    animation: fadeUp 0.8s cubic-bezier(.16, 1, .3, 1) both;
}
.content-grid > *:nth-child(1) { animation-delay: 0.05s; }
.content-grid > *:nth-child(2) { animation-delay: 0.15s; }
.content-grid > *:nth-child(3) { animation-delay: 0.25s; }
.content-grid > *:nth-child(4) { animation-delay: 0.35s; }
.content-grid > *:nth-child(5) { animation-delay: 0.45s; }

.card {
    position: relative;
    display: block;
    background: var(--bg-card);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 26px 26px 24px 30px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.4s cubic-bezier(.16, 1, .3, 1),
                border-color 0.4s ease,
                box-shadow 0.4s ease;
}

.card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16), transparent);
    pointer-events: none;
}

.card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    border-radius: 0 4px 4px 0;
    transition: width 0.3s ease;
}

.card.system-blue::before { background: var(--grad-main); box-shadow: 0 0 22px rgba(139, 124, 246, 0.6); }
.card.system-green::before { background: var(--grad-cool); box-shadow: 0 0 22px rgba(34, 211, 238, 0.6); }
.card.system-red::before { background: var(--grad-warm); box-shadow: 0 0 22px rgba(244, 114, 182, 0.6); }
.card.system-gray::before { background: linear-gradient(135deg, #6b6785, #a8a4c0); box-shadow: 0 0 22px rgba(168, 164, 192, 0.4); }

.card:hover {
    transform: translateY(-5px);
    border-color: rgba(139, 124, 246, 0.35);
    box-shadow: var(--shadow-card), var(--shadow-glow);
}
.card:hover::before { width: 5px; }
.card:active { transform: translateY(-2px) scale(0.99); }

.card-header {
    font-size: 18px;
    font-weight: 400; /* Light 字体下的标题不要过重 */
    letter-spacing: 0.01em;
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ink-1);
}

.card-body {
    font-size: 14px;
    color: var(--ink-2);
    margin: 0 0 16px;
    line-height: 1.8;
}

/* 标签系统 */
.tag-group { display: flex; flex-wrap: wrap; gap: 8px; }

.tag {
    font-size: 12px;
    font-weight: 300;
    padding: 5px 13px;
    border-radius: 100px;
    background: rgba(139, 124, 246, 0.1);
    border: 1px solid rgba(139, 124, 246, 0.22);
    color: #c4b5fd;
    transition: all 0.3s ease;
}
.system-green .tag { background: rgba(34, 211, 238, 0.1); border-color: rgba(34, 211, 238, 0.22); color: #67e8f9; }
.system-red .tag { background: rgba(244, 114, 182, 0.1); border-color: rgba(244, 114, 182, 0.22); color: #f9a8d4; }
.system-gray .tag { background: rgba(168, 164, 192, 0.1); border-color: rgba(168, 164, 192, 0.22); color: #cfcbe0; }

/* 页面标题 */
.page-title {
    font-family: var(--font-serif);
    font-size: 26px;
    font-weight: 400;
    letter-spacing: 0.02em;
    text-align: center;
    margin: 10px 0 30px;
    color: var(--ink-1);
    position: relative;
    padding-bottom: 16px;
}
.page-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 50px;
    height: 2px;
    border-radius: 2px;
    background: var(--grad-main);
    box-shadow: 0 0 18px rgba(139, 124, 246, 0.7);
}

/* 响应式 */
@media (max-width: 640px) {
    body { padding: 16px; }
    .main-nav { gap: 8px; }
    .main-nav a { padding: 8px 16px; font-size: 13px; }
    .site-title { font-size: 24px; }
    .avatar-container { width: 96px; height: 96px; border-radius: 30px; }
    .avatar-container img { border-radius: 27px; }
    .card { padding: 22px 20px 20px 24px; }
    .page-title { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition-duration: 0.01ms !important; }
}
