/* ============================================
   WZY 个人名片 - iOS 26 液态玻璃风格
   ============================================ */

/* ---------- CSS 变量 ---------- */
:root {
    --primary: #5B8DEF;
    --primary-dark: #4A7DD9;
    --primary-light: #7BA4F5;
    --bg: #F2F4F8;
    --text: #1D1D1F;
    --text-secondary: #6E6E73;
    --text-tertiary: #AEAEB2;
    --white: #FFFFFF;
    --glass-bg: rgba(255, 255, 255, 0.55);
    --glass-border: rgba(255, 255, 255, 0.75);
    --glass-shadow: 0 8px 32px rgba(31, 38, 135, 0.08);
    --glass-shadow-hover: 0 12px 40px rgba(91, 141, 239, 0.18);
    --radius-sm: 14px;
    --radius-md: 20px;
    --radius-lg: 28px;
    --radius-full: 9999px;
    --nav-height: 64px;
    --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC",
        "Helvetica Neue", "Microsoft YaHei", sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- 背景光斑 ---------- */
.bg-blobs {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.45;
    animation: float 20s ease-in-out infinite;
}

.blob-1 {
    width: 480px;
    height: 480px;
    background: linear-gradient(135deg, #5B8DEF, #A8C5FF);
    top: -120px;
    left: -100px;
}

.blob-2 {
    width: 420px;
    height: 420px;
    background: linear-gradient(135deg, #C7D9FF, #E8F0FF);
    bottom: 10%;
    right: -120px;
    animation-delay: -7s;
}

.blob-3 {
    width: 360px;
    height: 360px;
    background: linear-gradient(135deg, #B8D4FF, #D6E4FF);
    top: 45%;
    left: 40%;
    animation-delay: -14s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -40px) scale(1.05); }
    66% { transform: translate(-20px, 30px) scale(0.95); }
}

/* ---------- 液态玻璃通用类 ---------- */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow),
                inset 0 1px 1px rgba(255, 255, 255, 0.9);
    border-radius: var(--radius-md);
    transition: transform var(--transition), box-shadow var(--transition);
}

/* ---------- 导航栏 ---------- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: 100;
    background: rgba(242, 244, 248, 0.6);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    transition: background var(--transition), box-shadow var(--transition);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

.nav-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.5px;
}

.nav-menu {
    display: flex;
    gap: 8px;
}

.nav-link {
    display: inline-block;
    padding: 8px 18px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-full);
    transition: all var(--transition);
}

.nav-link:hover {
    color: var(--primary);
    background: rgba(91, 141, 239, 0.1);
}

.nav-link.active {
    color: var(--white);
    background: var(--primary);
    box-shadow: 0 4px 14px rgba(91, 141, 239, 0.35);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

.nav-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Hero 区域 ---------- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(var(--nav-height) + 40px) 24px 60px;
}

.hero-content {
    text-align: center;
    padding: 48px 40px;
    max-width: 520px;
    width: 100%;
    border-radius: var(--radius-lg);
}

.avatar-wrap {
    position: relative;
    width: 130px;
    height: 130px;
    margin: 0 auto 24px;
}

.avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.6rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 1px;
    box-shadow: 0 12px 36px rgba(91, 141, 239, 0.4),
                inset 0 2px 4px rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 1;
}

.avatar-ring {
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, var(--primary), var(--primary-light), #A8C5FF, var(--primary));
    animation: spin 6s linear infinite;
    z-index: 0;
    opacity: 0.7;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.hero-name {
    font-size: 2.8rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--text) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-tagline {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.hero-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ---------- 按钮 ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 32px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    transition: all var(--transition);
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    box-shadow: 0 6px 20px rgba(91, 141, 239, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(91, 141, 239, 0.45);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.6);
    color: var(--primary);
    border: 1px solid rgba(91, 141, 239, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.btn-ghost:hover {
    background: rgba(91, 141, 239, 0.1);
    border-color: var(--primary);
    transform: translateY(-2px);
}

/* ---------- 通用 Section ---------- */
.section {
    padding: 80px 0;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
    color: var(--text);
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 48px;
}

/* ---------- 关于我 ---------- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: stretch;
}

.about-text {
    padding: 32px;
}

.about-text p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 14px;
}

.about-text p:last-child {
    margin-bottom: 0;
}

.about-text strong {
    color: var(--primary);
    font-weight: 600;
}

.site-tile {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 28px 32px;
    cursor: pointer;
    text-decoration: none;
    color: var(--text);
}

.site-tile:hover {
    transform: translateY(-4px);
    box-shadow: var(--glass-shadow-hover);
}

.tile-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    flex-shrink: 0;
    box-shadow: 0 6px 16px rgba(91, 141, 239, 0.3);
}

.tile-icon svg {
    width: 26px;
    height: 26px;
}

.tile-info {
    flex: 1;
    min-width: 0;
}

.tile-info h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tile-info p {
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.tile-arrow {
    color: var(--text-tertiary);
    transition: transform var(--transition), color var(--transition);
    flex-shrink: 0;
}

.tile-arrow svg {
    width: 22px;
    height: 22px;
}

.site-tile:hover .tile-arrow {
    color: var(--primary);
    transform: translate(3px, -3px);
}

/* ---------- 社交按钮 ---------- */
.social-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}

.social-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 22px;
    text-align: left;
    cursor: pointer;
    width: 100%;
    color: var(--text);
}

.social-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--glass-shadow-hover);
}

.social-btn:active {
    transform: translateY(-1px) scale(0.99);
}

.social-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--brand) 12%, white);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand);
    flex-shrink: 0;
    transition: transform var(--transition);
}

.social-btn:hover .social-icon {
    transform: scale(1.08);
}

.social-icon svg {
    width: 26px;
    height: 26px;
}

.social-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.social-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

.social-account {
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.social-copy {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary);
    background: rgba(91, 141, 239, 0.1);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    flex-shrink: 0;
    transition: all var(--transition);
}

.social-btn:hover .social-copy {
    background: var(--primary);
    color: var(--white);
}

/* ---------- 页脚 ---------- */
.footer {
    text-align: center;
    padding: 40px 24px;
    color: var(--text-tertiary);
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.5);
    margin-top: 40px;
}

.footer-sub {
    font-size: 0.8rem;
    margin-top: 4px;
    opacity: 0.7;
}

/* ---------- Toast ---------- */
.toast {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(29, 29, 31, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    color: var(--white);
    padding: 14px 28px;
    border-radius: var(--radius-full);
    font-size: 0.92rem;
    font-weight: 500;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    pointer-events: none;
    white-space: nowrap;
    max-width: 90vw;
    overflow: hidden;
    text-overflow: ellipsis;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ---------- 动画 ---------- */
.fade-in {
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: var(--nav-height);
        left: 16px;
        right: 16px;
        flex-direction: column;
        gap: 4px;
        padding: 12px;
        background: rgba(255, 255, 255, 0.8);
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        border: 1px solid var(--glass-border);
        border-radius: var(--radius-md);
        box-shadow: var(--glass-shadow);
        transform: translateY(-20px) scale(0.95);
        opacity: 0;
        pointer-events: none;
        transition: all var(--transition);
    }

    .nav-menu.open {
        transform: translateY(0) scale(1);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-link {
        display: block;
        padding: 12px 18px;
        text-align: center;
    }

    .hero-content {
        padding: 36px 24px;
    }

    .hero-name {
        font-size: 2.2rem;
    }

    .hero-tagline {
        font-size: 1rem;
    }

    .avatar-wrap {
        width: 110px;
        height: 110px;
    }

    .avatar {
        font-size: 2.2rem;
    }

    .section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .social-grid {
        grid-template-columns: 1fr;
    }

    .blob {
        opacity: 0.3;
    }
}

@media (max-width: 420px) {
    .hero-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .social-btn {
        padding: 16px 18px;
    }
}
