/* ============================================================
   明威个人主页 · 主样式
   设计语言：深空底色 + 极光渐变 + 玻璃拟态 + 细腻动效
   ============================================================ */

:root {
    --accent: #6c5ce7;
    --accent-2: #00d2ff;
    --accent-3: #ff6b9d;
    --bg: #07080f;
    --bg-soft: #0c0e18;
    --surface: rgba(255, 255, 255, 0.045);
    --surface-2: rgba(255, 255, 255, 0.08);
    --border: rgba(255, 255, 255, 0.09);
    --border-strong: rgba(255, 255, 255, 0.16);
    --text: #f2f3f7;
    --text-soft: #a9aec2;
    --text-dim: #6f7488;
    --radius: 22px;
    --radius-sm: 14px;
    --shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.75);
    --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.75;
    font-size: 16px;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(1000px 600px at 12% -5%, rgba(108, 92, 231, 0.28), transparent 62%),
        radial-gradient(900px 620px at 88% 8%, rgba(0, 210, 255, 0.16), transparent 60%),
        radial-gradient(800px 700px at 55% 108%, rgba(255, 107, 157, 0.13), transparent 62%);
    pointer-events: none;
}

/* 网格纹理 */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse 78% 62% at 50% 32%, #000 30%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 78% 62% at 50% 32%, #000 30%, transparent 100%);
    pointer-events: none;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }

::selection { background: rgba(108, 92, 231, 0.45); color: #fff; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0a0b14; }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #4b4470, #2a2c44);
    border-radius: 10px;
    border: 2px solid #0a0b14;
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #6c5ce7, #3a3a60); }

/* ---------------- 布局 ---------------- */

.wrap { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }
.wrap-narrow { width: min(820px, calc(100% - 48px)); margin-inline: auto; }

.section { padding: 110px 0; position: relative; }

/* ---------------- 顶部导航 ---------------- */

.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 18px 0;
    transition: all 0.45s var(--ease);
}

.nav.scrolled {
    padding: 10px 0;
    background: rgba(7, 8, 15, 0.72);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 17px;
    letter-spacing: 0.02em;
}

.brand-mark {
    width: 38px; height: 38px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 16px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 8px 24px -8px rgba(108, 92, 231, 0.9);
    position: relative;
    overflow: hidden;
}

.brand-mark::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 40%, rgba(255, 255, 255, 0.45) 50%, transparent 60%);
    transform: translateX(-100%);
    animation: shine 4.5s ease-in-out infinite;
}

@keyframes shine {
    0%, 60%, 100% { transform: translateX(-100%); }
    30% { transform: translateX(100%); }
}

.nav-links { display: flex; align-items: center; gap: 6px; }

.nav-links a {
    position: relative;
    padding: 8px 15px;
    font-size: 14.5px;
    color: var(--text-soft);
    border-radius: 10px;
    transition: color 0.28s var(--ease), background 0.28s var(--ease);
}

.nav-links a:hover { color: var(--text); background: var(--surface); }

.nav-links a.active { color: var(--text); }

.nav-links a.active::after {
    content: "";
    position: absolute;
    left: 50%; bottom: 2px;
    transform: translateX(-50%);
    width: 16px; height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.nav-cta {
    padding: 9px 20px !important;
    border-radius: 11px !important;
    color: #fff !important;
    background: linear-gradient(135deg, var(--accent), #8b7cf6) !important;
    box-shadow: 0 10px 26px -12px rgba(108, 92, 231, 1);
    font-weight: 600;
}

.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 14px 30px -12px rgba(108, 92, 231, 1); }

.nav-toggle {
    display: none;
    width: 42px; height: 42px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    cursor: pointer;
    place-items: center;
}

.nav-toggle span {
    display: block;
    width: 18px; height: 1.6px;
    background: var(--text);
    border-radius: 2px;
    transition: 0.3s var(--ease);
}

.nav-toggle span + span { margin-top: 5px; }

/* ---------------- 首屏 ---------------- */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: 130px 0 90px;
    overflow: hidden;
}

.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.5;
    pointer-events: none;
    animation: float 16s ease-in-out infinite;
}

.hero-orb.a { width: 460px; height: 460px; background: #5b46d6; top: -110px; right: -80px; }
.hero-orb.b { width: 340px; height: 340px; background: #0a7fa8; bottom: -110px; left: -70px; animation-delay: -6s; }

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(28px, -34px) scale(1.08); }
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 70px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 7px 16px 7px 11px;
    border-radius: 100px;
    border: 1px solid var(--border-strong);
    background: var(--surface);
    backdrop-filter: blur(12px);
    font-size: 12.5px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-soft);
    margin-bottom: 28px;
}

.eyebrow .dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #38e07b;
    box-shadow: 0 0 0 4px rgba(56, 224, 123, 0.16);
    animation: pulse 2.2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(56, 224, 123, 0.16); }
    50% { box-shadow: 0 0 0 8px rgba(56, 224, 123, 0.03); }
}

.hero h1 {
    font-size: clamp(2.6rem, 5.6vw, 4.5rem);
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 22px;
}

.gradient-text {
    background: linear-gradient(115deg, #fff 10%, #b9aeff 42%, #67e8ff 72%, #fff 96%);
    background-size: 220% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientMove 9s ease-in-out infinite;
}

@keyframes gradientMove {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-sub {
    font-size: clamp(1.02rem, 1.6vw, 1.2rem);
    color: var(--text-soft);
    max-width: 560px;
    margin-bottom: 34px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 46px; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 13px 26px;
    border-radius: 13px;
    font-weight: 600;
    font-size: 15px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.32s var(--ease);
    white-space: nowrap;
}

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--accent), #8f7ef8 55%, #4aa8ff);
    background-size: 180% 100%;
    box-shadow: 0 16px 38px -16px rgba(108, 92, 231, 1);
}

.btn-primary:hover {
    transform: translateY(-2px);
    background-position: 100% 50%;
    box-shadow: 0 22px 44px -16px rgba(108, 92, 231, 1);
}

.btn-ghost {
    color: var(--text);
    background: var(--surface);
    border-color: var(--border-strong);
    backdrop-filter: blur(12px);
}

.btn-ghost:hover { transform: translateY(-2px); background: var(--surface-2); border-color: rgba(255,255,255,0.3); }

.btn svg { width: 17px; height: 17px; }

.hero-stats {
    display: flex;
    gap: 44px;
    flex-wrap: wrap;
    padding-top: 30px;
    border-top: 1px solid var(--border);
}

.stat-num {
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
    background: linear-gradient(135deg, #fff, #9d94ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label { font-size: 13px; color: var(--text-dim); letter-spacing: 0.04em; }

/* 头像视觉 */
.hero-visual { position: relative; display: grid; place-items: center; }

.avatar-ring {
    width: min(360px, 74vw);
    aspect-ratio: 1;
    border-radius: 50%;
    position: relative;
    display: grid;
    place-items: center;
    background: conic-gradient(from 0deg, var(--accent), var(--accent-2), var(--accent-3), var(--accent));
    padding: 3px;
    animation: spin 14s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.avatar-inner {
    width: 100%; height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle at 32% 28%, #1d1f34, #08090f 72%);
    display: grid;
    place-items: center;
    overflow: hidden;
    animation: spin 14s linear infinite reverse;
    position: relative;
}

.avatar-inner img { width: 100%; height: 100%; object-fit: cover; }

.avatar-initials {
    font-size: clamp(4rem, 12vw, 6.5rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    background: linear-gradient(135deg, #fff, #8b7cf6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.avatar-badge {
    position: absolute;
    padding: 10px 16px;
    border-radius: 14px;
    background: rgba(16, 18, 30, 0.86);
    border: 1px solid var(--border-strong);
    backdrop-filter: blur(16px);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow);
    animation: bob 6s ease-in-out infinite;
    white-space: nowrap;
}

.avatar-badge.tl { top: 6%; left: -8%; }
.avatar-badge.br { bottom: 10%; right: -6%; animation-delay: -3s; }
.avatar-badge .ico { font-size: 15px; }

@keyframes bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

/* ---------------- 区块标题 ---------------- */

.section-head { margin-bottom: 58px; max-width: 680px; }

.section-kicker {
    display: inline-block;
    font-size: 12.5px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--accent-2);
    margin-bottom: 14px;
    font-weight: 600;
}

.section-title {
    font-size: clamp(1.85rem, 3.6vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.18;
    margin-bottom: 16px;
}

.section-desc { color: var(--text-soft); font-size: 1.02rem; }

/* ---------------- 卡片 ---------------- */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transition: all 0.42s var(--ease);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255,255,255,0.24), transparent 42%, transparent 62%, rgba(108,92,231,0.35));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.42s var(--ease);
    pointer-events: none;
}

.card:hover { transform: translateY(-6px); background: var(--surface-2); border-color: var(--border-strong); }
.card:hover::before { opacity: 1; }

/* 作品网格 */
.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 26px;
}

.work-card { display: flex; flex-direction: column; overflow: hidden; }

.work-cover {
    aspect-ratio: 16 / 10;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1c2e, #0e0f1a);
    display: grid;
    place-items: center;
}

.work-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease); }
.work-card:hover .work-cover img { transform: scale(1.07); }

.work-cover-ph {
    width: 100%; height: 100%;
    display: grid;
    place-items: center;
    font-size: 2.6rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: rgba(255, 255, 255, 0.9);
    position: relative;
    transition: transform 0.7s var(--ease);
}

.work-card:hover .work-cover-ph { transform: scale(1.05); }

.work-cover-ph.c0 { background: linear-gradient(135deg, #5b4bd6, #2a2a63); }
.work-cover-ph.c1 { background: linear-gradient(135deg, #0f7a9e, #123a5e); }
.work-cover-ph.c2 { background: linear-gradient(135deg, #b2407a, #4a1f4f); }
.work-cover-ph.c3 { background: linear-gradient(135deg, #2f8f5b, #143d34); }
.work-cover-ph.c4 { background: linear-gradient(135deg, #a5713a, #4a2f1a); }
.work-cover-ph.c5 { background: linear-gradient(135deg, #4a4a8f, #1b1b33); }

.work-body { padding: 24px 24px 26px; display: flex; flex-direction: column; flex: 1; }

.work-cat {
    font-size: 11.5px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent-2);
    font-weight: 600;
    margin-bottom: 11px;
}

.work-title {
    font-size: 1.18rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 10px;
    transition: color 0.3s var(--ease);
}

.work-card:hover .work-title { color: #b8adff; }

.work-summary {
    color: var(--text-soft);
    font-size: 14.5px;
    line-height: 1.7;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.work-foot {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-dim);
}

.arrow-link { display: inline-flex; align-items: center; gap: 6px; color: var(--text-soft); transition: gap 0.3s var(--ease), color 0.3s var(--ease); }
.work-card:hover .arrow-link { gap: 11px; color: #b8adff; }

/* 标签 */
.tags { display: flex; flex-wrap: wrap; gap: 8px; }

.tag {
    padding: 4px 11px;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    font-size: 12px;
    color: var(--text-soft);
    transition: all 0.3s var(--ease);
}

.tag:hover { background: rgba(108, 92, 231, 0.2); border-color: rgba(108, 92, 231, 0.5); color: #c9c2ff; }

/* ---------------- 技能 ---------------- */

.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 26px; }

.skill-item { margin-bottom: 22px; }
.skill-item:last-child { margin-bottom: 0; }

.skill-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 9px;
    font-size: 14.5px;
}

.skill-name { font-weight: 600; }
.skill-pct { color: var(--text-dim); font-size: 13px; font-variant-numeric: tabular-nums; }

.skill-track {
    height: 7px;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.07);
    overflow: hidden;
    position: relative;
}

.skill-fill {
    height: 100%;
    width: 0;
    border-radius: 100px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    box-shadow: 0 0 18px rgba(108, 92, 231, 0.7);
    transition: width 1.5s var(--ease);
    position: relative;
}

.skill-fill::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
    animation: shimmer 2.6s linear infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ---------------- 时间线 ---------------- */

.timeline { position: relative; padding-left: 34px; }

.timeline::before {
    content: "";
    position: absolute;
    left: 7px; top: 8px; bottom: 8px;
    width: 2px;
    background: linear-gradient(180deg, var(--accent), var(--accent-2) 45%, transparent);
    border-radius: 2px;
}

.tl-item { position: relative; padding-bottom: 38px; }
.tl-item:last-child { padding-bottom: 0; }

.tl-item::before {
    content: "";
    position: absolute;
    left: -34px; top: 8px;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: var(--bg-soft);
    border: 2px solid var(--accent);
    box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.14);
    transition: all 0.35s var(--ease);
}

.tl-item:hover::before { background: var(--accent); box-shadow: 0 0 0 7px rgba(108, 92, 231, 0.16); }

.tl-year {
    font-size: 12.5px;
    letter-spacing: 0.16em;
    color: var(--accent-2);
    font-weight: 700;
    margin-bottom: 7px;
}

.tl-title { font-size: 1.06rem; font-weight: 700; margin-bottom: 8px; }
.tl-desc { color: var(--text-soft); font-size: 14.5px; }

/* ---------------- 文章列表 ---------------- */

.post-list { display: grid; gap: 18px; }

.post-item {
    display: flex;
    align-items: center;
    gap: 26px;
    padding: 26px 30px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    transition: all 0.38s var(--ease);
}

.post-item:hover {
    transform: translateX(6px);
    border-color: rgba(108, 92, 231, 0.45);
    background: rgba(108, 92, 231, 0.07);
}

.post-date {
    font-size: 12.5px;
    color: var(--text-dim);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    letter-spacing: 0.04em;
}

.post-body { flex: 1; min-width: 0; }
.post-title { font-size: 1.06rem; font-weight: 700; margin-bottom: 6px; }
.post-summary { font-size: 14px; color: var(--text-soft); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.post-views { font-size: 12.5px; color: var(--text-dim); white-space: nowrap; }

/* ---------------- 联系 ---------------- */

.contact-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 40px; align-items: start; }

.contact-list { display: grid; gap: 14px; margin-top: 30px; }

.contact-row {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    transition: all 0.32s var(--ease);
}

.contact-row:hover { background: var(--surface-2); transform: translateX(4px); border-color: var(--border-strong); }

.contact-ico {
    width: 40px; height: 40px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(108,92,231,0.28), rgba(0,210,255,0.16));
    border: 1px solid var(--border);
    font-size: 17px;
    flex-shrink: 0;
}

.contact-k { font-size: 12px; color: var(--text-dim); letter-spacing: 0.06em; }
.contact-v { font-size: 14.5px; font-weight: 600; word-break: break-all; }

.form-card { padding: 36px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13px; color: var(--text-soft); margin-bottom: 8px; font-weight: 500; }

.field input,
.field textarea,
.field select {
    width: 100%;
    padding: 13px 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font-size: 14.5px;
    transition: all 0.28s var(--ease);
    outline: none;
    resize: vertical;
}

.field input::placeholder, .field textarea::placeholder { color: var(--text-dim); }

.field input:focus,
.field textarea:focus,
.field select:focus {
    border-color: rgba(108, 92, 231, 0.7);
    background: rgba(108, 92, 231, 0.06);
    box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.12);
}

.hp-field { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }

/* 提示条 */
.flash {
    padding: 14px 20px;
    border-radius: 12px;
    margin-bottom: 22px;
    font-size: 14.5px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid;
    animation: slideDown 0.45s var(--ease);
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.flash-success { background: rgba(56, 224, 123, 0.1); border-color: rgba(56, 224, 123, 0.34); color: #86efac; }
.flash-error { background: rgba(255, 92, 122, 0.1); border-color: rgba(255, 92, 122, 0.34); color: #fda4af; }

/* ---------------- 文章正文 / Markdown ---------------- */

.prose { color: #d6d9e6; font-size: 16px; line-height: 1.92; }
.prose > * + * { margin-top: 1.15em; }
.prose h2 { font-size: 1.45rem; font-weight: 700; color: var(--text); margin-top: 2em; letter-spacing: -0.01em; }
.prose h3 { font-size: 1.16rem; font-weight: 700; color: var(--text); margin-top: 1.7em; }
.prose p { color: #b9bed1; }
.prose strong { color: #fff; font-weight: 700; }
.prose em { color: #c9c2ff; }
.prose a { color: #9d94ff; border-bottom: 1px solid rgba(157, 148, 255, 0.4); }
.prose a:hover { color: #c4bcff; }
.prose ul, .prose ol { padding-left: 1.4em; color: #b9bed1; }
.prose li { margin: 0.45em 0; }
.prose li::marker { color: var(--accent-2); }
.prose blockquote {
    border-left: 3px solid var(--accent);
    padding: 4px 0 4px 22px;
    color: #a9aec2;
    font-style: italic;
    background: linear-gradient(90deg, rgba(108,92,231,0.09), transparent);
    border-radius: 0 10px 10px 0;
}
.prose code {
    padding: 2px 7px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.09);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.9em;
    color: #f0abfc;
}
.prose pre {
    padding: 20px 22px;
    border-radius: 14px;
    background: #0b0d16;
    border: 1px solid var(--border);
    overflow-x: auto;
    font-size: 13.5px;
    line-height: 1.7;
}
.prose pre code { background: none; padding: 0; color: #cbd5e1; }
.prose hr { border: none; height: 1px; background: var(--border); margin: 2.4em 0; }
.prose img { border-radius: 14px; }

/* 文章头 */
.article-head { padding: 150px 0 50px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; color: var(--text-dim); font-size: 13.5px; margin-bottom: 18px; }
.article-title { font-size: clamp(1.9rem, 4.4vw, 3rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.2; margin-bottom: 20px; }

/* ---------------- 页脚 ---------------- */

.footer {
    border-top: 1px solid var(--border);
    padding: 60px 0 40px;
    margin-top: 60px;
    position: relative;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--border);
}

.footer-brand { font-size: 1.25rem; font-weight: 800; margin-bottom: 12px; letter-spacing: -0.02em; }
.footer-slogan { color: var(--text-soft); font-size: 14px; max-width: 320px; }
.footer-h { font-size: 12.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 16px; font-weight: 600; }
.footer-links { display: grid; gap: 10px; }
.footer-links a { color: var(--text-soft); font-size: 14px; transition: color 0.28s var(--ease); }
.footer-links a:hover { color: #b8adff; }

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    padding-top: 26px;
    color: var(--text-dim);
    font-size: 13px;
}

.social { display: flex; gap: 10px; }

.social a {
    width: 38px; height: 38px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-soft);
    transition: all 0.3s var(--ease);
}

.social a:hover { color: #fff; border-color: rgba(108,92,231,0.6); background: rgba(108,92,231,0.18); transform: translateY(-3px); }
.social svg { width: 17px; height: 17px; }

/* ---------------- 滚动动画 ---------------- */

[data-reveal] {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.85s var(--ease), transform 0.85s var(--ease);
    will-change: opacity, transform;
}

[data-reveal].revealed { opacity: 1; transform: none; }

/* ---------------- 分页/筛选 ---------------- */

.filter-bar { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 40px; }

.filter-btn {
    padding: 8px 18px;
    border-radius: 100px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-soft);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s var(--ease);
}

.filter-btn:hover { border-color: var(--border-strong); color: var(--text); }
.filter-btn.active {
    color: #fff;
    background: linear-gradient(135deg, var(--accent), #8b7cf6);
    border-color: transparent;
    box-shadow: 0 10px 24px -12px rgba(108,92,231,1);
}

/* ---------------- 页面头部（内页） ---------------- */

.page-head { padding: 152px 0 60px; position: relative; }
.page-head h1 { font-size: clamp(2.1rem, 4.8vw, 3.3rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; margin-bottom: 16px; }
.page-head p { color: var(--text-soft); font-size: 1.05rem; max-width: 640px; }

/* ---------------- 响应式 ---------------- */

@media (max-width: 980px) {
    .hero-grid { grid-template-columns: 1fr; gap: 56px; }
    .hero-visual { order: -1; }
    .avatar-ring { width: min(260px, 62vw); }
    .contact-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .hero { padding-top: 118px; }
}

@media (max-width: 720px) {
    .wrap, .wrap-narrow { width: calc(100% - 36px); }
    .section { padding: 74px 0; }
    .nav-links {
        position: fixed;
        top: 70px; left: 18px; right: 18px;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 14px;
        border-radius: 18px;
        background: rgba(10, 11, 20, 0.97);
        border: 1px solid var(--border-strong);
        backdrop-filter: blur(22px);
        box-shadow: var(--shadow);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-12px);
        transition: all 0.32s var(--ease);
    }
    .nav-links.open { opacity: 1; visibility: visible; transform: none; }
    .nav-links a { padding: 12px 16px; }
    .nav-links a.active::after { display: none; }
    .nav-links a.active { background: rgba(108,92,231,0.16); color: #c4bcff; }
    .nav-toggle { display: grid; }
    .hero { min-height: auto; padding: 108px 0 64px; }
    .hero-stats { gap: 28px; }
    .stat-num { font-size: 1.5rem; }
    .works-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .form-card { padding: 26px 22px; }
    .post-item { flex-direction: column; align-items: flex-start; gap: 10px; padding: 22px; }
    .post-item:hover { transform: none; }
    .footer-grid { grid-template-columns: 1fr; gap: 30px; }
    .page-head { padding: 116px 0 40px; }
    .article-head { padding: 116px 0 36px; }
    .avatar-badge.tl { left: -2%; }
    .avatar-badge.br { right: -2%; }
    .timeline { padding-left: 28px; }
    .tl-item::before { left: -28px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
    [data-reveal] { opacity: 1; transform: none; }
}
