/* =========================================================
   晚风个人主页 - 全局样式
   移动端优先 · 蓝色渐变主题 · 毛玻璃 · 微交互动效
   ========================================================= */

:root {
    --primary: #1E5EFF;
    --primary-2: #4A8BFF;
    --primary-3: #0F3DB0;
    --gradient: linear-gradient(135deg, #4A8BFF 0%, #1E5EFF 55%, #0F3DB0 100%);
    --gradient-soft: linear-gradient(135deg, #EAF1FF 0%, #F5F8FF 100%);
    --bg: #F0F4FF;
    --bg-2: #E8EEFF;
    --card: #FFFFFF;
    --text: #1A2233;
    --text-sub: #5A6478;
    --text-weak: #8A94A8;
    --success: #22C55E;
    --danger: #EF4444;
    --warn: #F59E0B;
    --radius: 18px;
    --radius-sm: 12px;
    --shadow-sm: 0 2px 10px rgba(30, 94, 255, 0.06);
    --shadow: 0 8px 28px rgba(30, 94, 255, 0.12);
    --shadow-lg: 0 14px 40px rgba(15, 61, 176, 0.18);
    --ring: 0 0 0 3px rgba(74, 139, 255, 0.22);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

/* 蓝色文字选中色 */
::selection { background: rgba(74, 139, 255, 0.28); color: var(--primary-3); }
::-moz-selection { background: rgba(74, 139, 255, 0.28); color: var(--primary-3); }

/* 自定义滚动条（桌面端） */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(74, 139, 255, 0.25); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(74, 139, 255, 0.45); }

body {
    font-family: "PingFang SC", "Helvetica Neue", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
    color: var(--text);
    font-size: 16px;
    line-height: 1.6;
    background: linear-gradient(160deg, var(--bg) 0%, var(--bg-2) 100%);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
}

/* ---------- 背景装饰光斑 ---------- */
.bg-decor { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.45; }
.blob-1 { width: 320px; height: 320px; background: radial-gradient(circle, #7FB0FF, transparent 70%); top: -80px; right: -100px; }
.blob-2 { width: 260px; height: 260px; background: radial-gradient(circle, #4A8BFF, transparent 70%); bottom: 10%; left: -90px; opacity: 0.32; }
.blob-3 { width: 200px; height: 200px; background: radial-gradient(circle, #C9DCFF, transparent 70%); top: 42%; right: -60px; opacity: 0.5; }

/* ---------- 页面骨架 ---------- */
.page-shell {
    position: relative;
    z-index: 1;
    max-width: 480px;
    margin: 0 auto;
    padding: 28px 20px 40px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    min-height: calc(100vh - 80px);
}

/* ---------- 页脚 ---------- */
.site-footer {
    position: relative;
    z-index: 1;
    max-width: 480px;
    margin: 0 auto;
    padding: 4px 20px 26px;
    text-align: center;
    color: var(--text-weak);
    font-size: 13px;
}
.site-footer .footer-sub { margin-top: 2px; font-size: 12px; opacity: 0.7; }
.site-footer .footer-records {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px 8px;
}
.site-footer .record-sep { opacity: 0.5; }
.site-footer .icp-link,
.site-footer .gongan-link {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid currentColor;
    border-bottom-color: rgba(255, 255, 255, 0.35);
    transition: color 0.2s ease;
}
.site-footer .icp-link:hover,
.site-footer .gongan-link:hover { color: var(--accent, #1E5EFF); border-bottom-color: currentColor; }
.site-footer .gongan-link {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}
.site-footer .gongan-icon { flex: none; }

/* ---------- 首页：Hero ---------- */
.hero { text-align: center; padding: 18px 0 6px; animation: rise 0.6s ease both; }

.avatar {
    width: 88px; height: 88px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: var(--gradient);
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,0.35);
    position: relative;
}
.avatar::after {
    content: ""; position: absolute; inset: -6px; border-radius: 50%;
    border: 2px dashed rgba(74, 139, 255, 0.35); animation: spin 18s linear infinite;
}
.avatar-inner { color: #fff; font-size: 36px; font-weight: 700; letter-spacing: 2px; }
.avatar-lg { width: 76px; height: 76px; flex-shrink: 0; margin: 0; }
.avatar-lg::after { inset: -5px; }
.avatar-lg .avatar-inner { font-size: 30px; }

.hero-title {
    font-size: 28px; font-weight: 600;
    background: var(--gradient);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
    letter-spacing: 1px;
}
.hero-slogan { margin-top: 8px; color: var(--text-sub); font-size: 15px; }

/* 桌面端专属简介，移动端隐藏 */
.hero-bio-desktop { display: none; }

/* 桌面端横向导航：移动端默认隐藏 */
.site-nav { display: none; }

/* ---------- 首页：功能按钮 ---------- */
.menu-grid { display: flex; flex-direction: column; gap: 16px; animation: rise 0.6s 0.12s ease both; }

.action-card {
    display: flex; align-items: center; gap: 16px;
    background: var(--card);
    border: 1px solid rgba(30, 94, 255, 0.08);
    border-radius: var(--radius);
    padding: 18px 20px;
    text-decoration: none; color: inherit;
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.action-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: rgba(30, 94, 255, 0.28); }
.action-card:active { transform: scale(0.975); }

.action-icon {
    width: 52px; height: 52px; flex-shrink: 0;
    border-radius: 15px;
    background: var(--gradient);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 16px rgba(30, 94, 255, 0.32);
    transition: transform 0.25s ease;
}
.action-icon svg { width: 26px; height: 26px; }
.action-card:hover .action-icon { transform: scale(1.06) rotate(-4deg); }

.action-text { flex: 1; display: flex; flex-direction: column; }
.action-text strong { font-size: 17px; font-weight: 600; }
.action-text small { color: var(--text-sub); font-size: 13px; margin-top: 2px; }

.action-arrow { color: var(--primary); font-size: 20px; font-weight: 600; transition: transform 0.25s ease; }
.action-card:hover .action-arrow { transform: translateX(4px); }

/* ---------- 页面公共头部 ---------- */
.page-topbar { text-align: center; animation: rise 0.5s ease both; }
.back-link {
    display: inline-block;
    color: var(--primary); text-decoration: none;
    font-size: 14px; margin-bottom: 14px;
    padding: 6px 14px; border-radius: 999px;
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, background 0.2s ease;
}
.back-link:hover { transform: translateX(-2px); background: #fff; }
.page-title { font-size: 26px; font-weight: 600; letter-spacing: 1px; }
.page-sub { color: var(--text-sub); font-size: 14px; margin-top: 6px; }

/* ---------- 通用卡片 ---------- */
.card-block {
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(30, 94, 255, 0.08);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow-sm);
    animation: rise 0.5s ease both;
}
.block-title {
    font-size: 16px; font-weight: 600; color: var(--primary-3);
    margin-bottom: 14px; display: flex; align-items: center; gap: 8px;
}
.block-title::before {
    content: ""; width: 4px; height: 16px; border-radius: 2px; background: var(--gradient);
}

/* ---------- 标签 ---------- */
.tag-list { display: flex; flex-wrap: wrap; gap: 10px; }
.tag {
    padding: 6px 14px; border-radius: 999px;
    background: var(--gradient-soft);
    color: var(--primary-3);
    font-size: 13px; font-weight: 500;
    border: 1px solid rgba(30, 94, 255, 0.14);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.tag:hover { transform: translateY(-2px); box-shadow: var(--ring); }

.text-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.text-list li {
    position: relative; padding-left: 20px; color: var(--text);
    font-size: 15px;
}
.text-list li::before {
    content: ""; position: absolute; left: 2px; top: 8px;
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--gradient);
}

/* ---------- 关于我 ---------- */
.profile-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 26px 22px;
    box-shadow: var(--shadow);
    animation: rise 0.5s 0.05s ease both;
}
.profile-head { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.profile-name { font-size: 22px; font-weight: 600; }
.profile-role { color: var(--primary); font-size: 14px; margin-top: 2px; }
.profile-bio { color: var(--text-sub); font-size: 15px; text-align: justify; }

/* ---------- 联系方式 ---------- */
.contact-list { display: flex; flex-direction: column; gap: 14px; animation: rise 0.5s ease both; }
.contact-item {
    display: flex; align-items: center; gap: 16px;
    background: var(--card);
    border: 1px solid rgba(30, 94, 255, 0.08);
    border-radius: var(--radius);
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
    text-decoration: none; color: inherit;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    animation: rise 0.5s ease both;
}
.contact-item:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
button.contact-item {
    width: 100%;
    font-family: inherit; font-size: inherit; line-height: inherit;
    text-align: left; cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
button.contact-item:active { transform: scale(0.985); }
button.contact-item:focus-visible { outline: none; box-shadow: var(--ring); }
.contact-icon {
    width: 46px; height: 46px; flex-shrink: 0;
    border-radius: 13px; background: var(--gradient-soft);
    color: var(--primary); display: flex; align-items: center; justify-content: center;
}
.contact-icon svg { width: 22px; height: 22px; }
.contact-info { flex: 1; display: flex; flex-direction: column; }
.contact-info strong { font-size: 16px; font-weight: 600; }
.contact-info small { color: var(--text-sub); font-size: 13px; margin-top: 2px; }
.contact-arrow { color: var(--primary); font-size: 18px; }
.contact-tag {
    font-size: 12px; padding: 3px 10px; border-radius: 999px;
    background: rgba(34, 197, 94, 0.12); color: #15803D; font-weight: 500;
}
.contact-copy {
    flex-shrink: 0;
    font-size: 12px; padding: 4px 12px; border-radius: 999px;
    background: rgba(30, 94, 255, 0.1); color: var(--primary);
    font-weight: 500;
    transition: background 0.25s ease, color 0.25s ease;
}
.contact-copy.copied {
    background: rgba(34, 197, 94, 0.15); color: #15803D;
}

/* 复制成功提示浮层 */
.copy-toast {
    position: fixed; left: 50%; bottom: 40px; z-index: 9999;
    transform: translate(-50%, 20px);
    background: rgba(26, 34, 51, 0.92); color: #fff;
    padding: 10px 22px; border-radius: 999px;
    font-size: 14px; box-shadow: var(--shadow-lg);
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.copy-toast.show { opacity: 1; transform: translate(-50%, 0); }

.reply-note { animation-delay: 0.1s; }
.reply-note p { color: var(--text-sub); font-size: 14px; }

/* ---------- 项目列表 ---------- */
.project-list { display: flex; flex-direction: column; gap: 18px; animation: rise 0.5s ease both; }
.project-card {
    background: var(--card);
    border: 1px solid rgba(30, 94, 255, 0.08);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none; color: inherit;
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    animation: rise 0.5s ease both;
}
.project-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.project-cover {
    position: relative; height: 150px;
    background: var(--gradient-soft);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.project-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-fallback {
    font-size: 52px; font-weight: 700; color: rgba(30, 94, 255, 0.35);
    letter-spacing: 2px;
}
.project-cover.no-cover .cover-fallback { display: flex; }
.project-cover .cover-fallback { display: flex; }
.project-cover img + .cover-fallback { display: none; }
.project-body { padding: 16px 20px 18px; }
.project-title { font-size: 18px; font-weight: 600; }
.project-desc {
    color: var(--text-sub); font-size: 14px; margin-top: 4px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.project-link {
    display: inline-flex; align-items: center; gap: 6px;
    margin-top: 12px; color: var(--primary); font-size: 14px; font-weight: 500;
}
.project-card:hover .project-link .action-arrow { transform: translateX(4px); }
.project-link .action-arrow { font-size: 16px; }

/* ---------- 空状态 ---------- */
.empty-state {
    text-align: center;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border: 1px dashed rgba(30, 94, 255, 0.25);
    border-radius: var(--radius);
    padding: 44px 24px;
    box-shadow: var(--shadow-sm);
    animation: rise 0.5s ease both;
}
.empty-illustration { color: var(--primary-2); opacity: 0.7; margin-bottom: 14px; }
.empty-illustration svg { width: 120px; height: 100px; }
.empty-title { font-size: 20px; font-weight: 600; margin-bottom: 8px; }
.empty-desc { color: var(--text-sub); font-size: 14px; margin-bottom: 8px; }
.empty-desc code {
    background: var(--gradient-soft); color: var(--primary-3);
    padding: 2px 7px; border-radius: 6px; font-size: 13px;
}
.empty-hint { color: var(--text-weak); font-size: 13px; }

/* ---------- 按钮 ---------- */
.btn-primary {
    display: inline-block; margin-top: 18px;
    padding: 11px 30px; border-radius: 999px;
    background: var(--gradient); color: #fff;
    text-decoration: none; font-size: 15px; font-weight: 500;
    box-shadow: 0 8px 20px rgba(30, 94, 255, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(30, 94, 255, 0.42); }
.btn-primary:active { transform: scale(0.97); }

/* ---------- 动画 ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 响应式 ---------- */
@media (min-width: 520px) {
    .page-shell { padding: 40px 24px 48px; }
    .hero-title { font-size: 30px; }
}
@media (max-width: 380px) {
    .hero-title { font-size: 24px; }
    .action-card { padding: 15px 16px; }
}

/* ---------- 减少动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- 键盘焦点可见（a11y） ---------- */
a:focus-visible, button:focus-visible {
    outline: none;
    box-shadow: var(--ring);
    border-radius: 8px;
}

/* ---------- 链接全局过渡 ---------- */
a { transition: color 0.2s ease, opacity 0.2s ease; }

/* =========================================================
   电脑端差异化布局（≥900px）
   与移动端功能完全一致，仅展示形态不同：
   · 横向吸顶导航条
   · 宽幅多栏容器（max-width 1080px）
   · 首页左右分栏 / 项目栅格 / 关于分栏 / 联系两列
   ========================================================= */
@media (min-width: 900px) {

    /* 背景光斑放大、更克制，营造桌面氛围 */
    .blob-1 { width: 520px; height: 520px; top: -140px; right: -120px; opacity: 0.5; }
    .blob-2 { width: 440px; height: 440px; bottom: -80px; left: -140px; opacity: 0.35; }
    .blob-3 { width: 360px; height: 360px; top: 36%; right: -160px; opacity: 0.55; }

    /* ---------- 横向吸顶导航 ---------- */
    .site-nav {
        display: block;
        position: sticky; top: 0; z-index: 100;
        background: rgba(240, 244, 255, 0.78);
        backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
        border-bottom: 1px solid rgba(30, 94, 255, 0.1);
    }
    .nav-inner {
        max-width: 1080px; margin: 0 auto;
        padding: 0 28px; height: 64px;
        display: flex; align-items: center; justify-content: space-between;
    }
    .nav-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
    .nav-logo {
        width: 34px; height: 34px; border-radius: 10px;
        background: var(--gradient); color: #fff;
        display: flex; align-items: center; justify-content: center;
        font-size: 16px; font-weight: 700; letter-spacing: 1px;
        box-shadow: 0 4px 12px rgba(30, 94, 255, 0.35);
    }
    .nav-name { font-size: 15px; font-weight: 600; color: var(--text); }
    .nav-links { display: flex; gap: 6px; }
    .nav-link {
        padding: 8px 16px; border-radius: 999px;
        color: var(--text-sub); text-decoration: none;
        font-size: 14px; font-weight: 500;
        transition: color 0.2s ease, background 0.2s ease;
    }
    .nav-link:hover { color: var(--primary); background: rgba(255, 255, 255, 0.85); }
    .nav-link.active {
        color: #fff; font-weight: 600;
        background: var(--gradient);
        box-shadow: 0 4px 14px rgba(30, 94, 255, 0.35);
    }

    /* ---------- 页面容器加宽 ---------- */
    .page-shell { max-width: 1080px; padding: 48px 28px 56px; gap: 30px; }
    .site-footer { max-width: 1080px; padding-bottom: 34px; }

    /* ---------- 首页：左右分栏 ---------- */
    .home-grid {
        display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 40px; align-items: center;
    }
    .hero { text-align: left; padding: 12px 0; }
    .hero .avatar { margin: 0 0 26px; width: 108px; height: 108px; }
    .hero .avatar .avatar-inner { font-size: 44px; }
    .hero-title { font-size: 40px; line-height: 1.3; }
    .hero-slogan { font-size: 17px; margin-top: 12px; }
    .hero-bio-desktop { color: var(--text-sub); font-size: 15px; margin-top: 20px; line-height: 1.9; }
    .menu-grid { gap: 18px; }
    .action-card { padding: 20px 24px; }

    /* ---------- 项目列表：栅格化 ---------- */
    .page-topbar { text-align: left; }
    .project-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
    .project-cover { height: 180px; }
    .project-title { font-size: 19px; }
    .project-desc { font-size: 14px; }
    .project-card:hover .project-cover img { transform: scale(1.04); }
    .project-cover img { transition: transform 0.4s ease; }

    /* ---------- 关于我：分栏 ---------- */
    .about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
    .about-grid .profile-card { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; }
    .about-grid .profile-head { margin-bottom: 0; }
    .about-grid .profile-bio { align-self: center; }
    .about-grid .card-block { margin: 0; }

    /* ---------- 联系方式：两列 ---------- */
    .contact-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
    .contact-item { padding: 22px 24px; }
    .contact-icon { width: 52px; height: 52px; }
    .reply-note { grid-column: 1 / -1; }

    /* ---------- 空状态：桌面尺寸调整 ---------- */
    .empty-state { padding: 64px 32px; }
}
