:root {
    --primary-bg: #F8F9FC;
    --card-bg: #FFFFFF;
    --text-primary: #111827;
    --text-secondary: #6B7280;
    --text-tertiary: #9CA3AF;

    --wordpress-color: #70B7D4;
    --twitter-color: #6BBBF5;
    --bilibili-color: #FFA7C1;
    --tiktok-color: #4A4A4A;
    --youtube-color: #FF6B6B;
    --wechat-color: #6BD39B;

    --accent-gradient: linear-gradient(135deg, #6BD39B 0%, #6BBBF5 50%, #FF6B6B 100%);

    --border-radius-sm: 0.75rem;
    --border-radius-md: 1.125rem;
    --border-radius-lg: 1.75rem;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.07), 0 2px 6px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.10), 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-xl: 0 20px 48px rgba(0, 0, 0, 0.13), 0 8px 20px rgba(0, 0, 0, 0.07);

    --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

body {
    background: linear-gradient(150deg, #F0F4FF 0%, #F8F9FC 40%, #F0FDF7 100%);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    min-height: 100vh;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(ellipse at 15% 40%, rgba(107, 211, 155, 0.08) 0%, transparent 45%),
        radial-gradient(ellipse at 85% 20%, rgba(107, 187, 245, 0.08) 0%, transparent 45%),
        radial-gradient(ellipse at 60% 90%, rgba(255, 107, 107, 0.05) 0%, transparent 40%);
    z-index: -1;
    animation: backgroundMove 25s ease-in-out infinite;
}

@keyframes backgroundMove {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-3%, -4%) scale(1.02); }
    66% { transform: translate(3%, 2%) scale(0.98); }
}

.container {
    max-width: 820px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
}

/* ── Profile Card ────────────────────────────────────── */

.profile {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--border-radius-lg);
    padding: 2.25rem 2.25rem 1.75rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out;
}

.profile::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
}

.profile::after {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(107, 187, 245, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.profile-header {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2rem;
    margin-bottom: 1.5rem;
    text-align: left;
    align-items: start;
}

/* ── Avatar ──────────────────────────────────────────── */

.avatar {
    width: 140px;
    height: 140px;
    position: relative;
    flex-shrink: 0;
}

.avatar::before {
    content: '';
    position: absolute;
    inset: -3px;
    background: var(--accent-gradient);
    border-radius: 1.3rem;
    z-index: -1;
    animation: rotate 10s linear infinite;
}

.avatar::after {
    content: '';
    position: absolute;
    inset: -6px;
    background: var(--accent-gradient);
    border-radius: 1.5rem;
    z-index: -2;
    opacity: 0.25;
    animation: rotate 10s linear infinite reverse;
    filter: blur(6px);
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.avatar img {
    width: 100%;
    height: 100%;
    border-radius: 1.1rem;
    object-fit: cover;
    border: 4px solid var(--card-bg);
    display: block;
}

/* ── Profile Info ─────────────────────────────────────── */

.profile-info h1 {
    font-size: 2.3rem;
    margin-bottom: 0.6rem;
    font-weight: 800;
    background: linear-gradient(135deg, #111827 0%, #374151 60%, #6B7280 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.profile-details {
    color: var(--text-secondary);
    font-size: 0.975rem;
    line-height: 1.85;
}

.profile-details .title {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.05rem;
    margin-bottom: 0.4rem;
    background: linear-gradient(135deg, #111827 0%, #374151 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.profile-details a {
    color: #4BA8E8;
    text-decoration: none;
    border-bottom: 1px dashed rgba(75, 168, 232, 0.5);
    transition: var(--transition-base);
}

.profile-details a:hover {
    color: #2563EB;
    border-bottom-color: #2563EB;
}

/* ── Coffee Badge ─────────────────────────────────────── */

.coffee-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    color: #92400E !important;
    border: 1px solid rgba(245, 158, 11, 0.35) !important;
    border-bottom: 1px solid rgba(245, 158, 11, 0.35) !important;
    padding: 0.2rem 0.75rem 0.2rem 0.6rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: var(--transition-bounce) !important;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.18);
    text-decoration: none;
    vertical-align: middle;
}

.coffee-badge:hover {
    background: linear-gradient(135deg, #FDE68A 0%, #FCD34D 100%) !important;
    border-color: rgba(245, 158, 11, 0.6) !important;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.32) !important;
    transform: translateY(-1px) scale(1.03);
    color: #78350F !important;
}

/* ── Bio ─────────────────────────────────────────────── */

.bio {
    font-style: italic;
    color: var(--text-secondary);
    margin: 1rem 0;
    font-size: 1.05rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(243, 244, 246, 0.9);
    text-align: center;
    position: relative;
    background: linear-gradient(135deg, rgba(248, 249, 252, 0.5) 0%, rgba(240, 244, 255, 0.3) 100%);
    border-radius: var(--border-radius-sm);
    letter-spacing: 0.02em;
}

.bio::before,
.bio::after {
    content: '"';
    font-size: 2.2rem;
    color: var(--text-tertiary);
    opacity: 0.25;
    font-family: Georgia, serif;
    line-height: 1;
}

/* ── BTC Address ─────────────────────────────────────── */

.btc-address {
    position: relative;
    background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 50%, #FDE68A 100%);
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    text-align: center;
    transition: var(--transition-base);
    border: 1.5px solid rgba(245, 158, 11, 0.2);
    overflow: hidden;
}

.btc-address::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0) 100%);
    border-radius: inherit;
    pointer-events: none;
}

.btc-address:hover {
    border-color: rgba(245, 158, 11, 0.5);
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.2);
    transform: translateY(-1px);
}

.btc-address p {
    color: #92400E;
    font-family: 'Courier New', monospace;
    font-size: 0.92rem;
    margin: 0;
    font-weight: 500;
    position: relative;
}

.btc-value {
    border-bottom: 1px dashed rgba(146, 64, 14, 0.4);
    transition: var(--transition-base);
    cursor: pointer;
}

.btc-value:hover {
    border-bottom-style: solid;
    border-bottom-color: #92400E;
}

/* ── QR / Tooltip ────────────────────────────────────── */

.qrcode-popup {
    position: fixed;
    background: white;
    padding: 12px;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(0, 0, 0, 0.06);
    display: none;
    z-index: 999;
    animation: popIn 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.qrcode-popup::before {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: 8px solid transparent;
}

.qrcode-popup.right-arrow::before {
    left: -16px;
    border-right-color: white;
}

.qrcode-popup.left-arrow::before {
    right: -16px;
    border-left-color: white;
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.85);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.qrcode-popup img {
    display: block;
    width: 120px;
    height: 120px;
}

.tooltip {
    position: fixed;
    background: rgba(17, 24, 39, 0.88);
    color: white;
    padding: 5px 11px;
    border-radius: 8px;
    font-size: 12.5px;
    display: none;
    pointer-events: none;
    z-index: 1000;
    backdrop-filter: blur(12px);
    letter-spacing: 0.01em;
}

.copy-success {
    position: fixed;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 50px;
    display: none;
    z-index: 1001;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.35);
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.02em;
    pointer-events: none;
    animation: popSuccess 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    white-space: nowrap;
}

@keyframes popSuccess {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ── Links Grid ──────────────────────────────────────── */

.links-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.7rem;
    margin-bottom: 1.25rem;
    animation: fadeInUp 0.6s ease-out 0.15s both;
}

@media (min-width: 640px) {
    .links-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.link-card {
    display: flex;
    align-items: center;
    padding: 1.05rem 1.1rem;
    border-radius: var(--border-radius-md);
    text-decoration: none;
    color: white;
    gap: 0.9rem;
    transition: var(--transition-bounce);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.link-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.5s ease;
    pointer-events: none;
}

.link-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: var(--shadow-lg);
}

.link-card:hover::before {
    left: 140%;
}

.icon {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    transition: var(--transition-bounce);
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.12));
}

.link-card:hover .icon {
    transform: scale(1.15) rotate(6deg);
}

.icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.text h2 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
    letter-spacing: -0.01em;
}

.text p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.4;
}

.wordpress { background: linear-gradient(135deg, #70B7D4 0%, #4D9FBF 100%); }
.twitter   { background: linear-gradient(135deg, #6BBBF5 0%, #4AA6EC 100%); }
.bilibili  { background: linear-gradient(135deg, #FFA7C1 0%, #F87BA4 100%); }
.tiktok    { background: linear-gradient(135deg, #4A4A4A 0%, #2D2D2D 100%); }
.youtube   { background: linear-gradient(135deg, #FF6B6B 0%, #E84040 100%); }
.wechat    { background: linear-gradient(135deg, #6BD39B 0%, #46BF80 100%); }
.bitcoin   { background: linear-gradient(135deg, #F7931A 0%, #E07B0A 100%); }

/* ── Projects Section ────────────────────────────────── */

.projects-section {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--border-radius-lg);
    padding: 2.25rem 2.25rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255, 255, 255, 0.8);
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

.projects-section h2 {
    font-size: 1.6rem;
    color: var(--text-primary);
    margin-bottom: 1.75rem;
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.projects-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 3px;
    background: var(--accent-gradient);
    border-radius: 2px;
}

.projects-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, 1fr);
}

.project-card {
    border: 1px solid rgba(229, 231, 235, 0.8);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    transition: var(--transition-bounce);
    background: var(--card-bg);
    text-decoration: none;
    display: block;
    position: relative;
    background-size: cover;
    background-position: center;
    min-height: 200px;
}

.project-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        160deg,
        rgba(255, 255, 255, 0.96) 0%,
        rgba(255, 255, 255, 0.90) 100%
    );
    transition: var(--transition-base);
    z-index: 1;
}

.project-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 3;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(209, 213, 219, 0.9);
}

.project-card:hover::before {
    background: linear-gradient(
        160deg,
        rgba(255, 255, 255, 0.88) 0%,
        rgba(240, 247, 255, 0.82) 100%
    );
}

.project-card:hover::after {
    transform: scaleX(1);
}

.project-content {
    padding: 1.5rem;
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.project-content h3 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 0.45rem;
    font-weight: 700;
    transition: var(--transition-base);
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.project-card:hover .project-content h3 {
    color: #3B82F6;
}

.project-content p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.85rem;
    line-height: 1.55;
    flex: 1;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tag {
    background: rgba(243, 244, 246, 0.9);
    color: var(--text-secondary);
    padding: 0.28rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: var(--transition-base);
    border: 1px solid rgba(229, 231, 235, 0.8);
    letter-spacing: 0.01em;
}

.project-card:hover .tag {
    background: linear-gradient(135deg, #6BD39B 0%, #6BBBF5 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 2px 6px rgba(107, 187, 245, 0.25);
}

/* ── Footer ──────────────────────────────────────────── */

.footer {
    text-align: center;
    padding: 1.5rem 1rem 2rem;
    color: var(--text-tertiary);
    font-size: 0.875rem;
    line-height: 2;
    animation: fadeInUp 0.6s ease-out 0.45s both;
}

.footer a {
    color: var(--text-secondary);
    text-decoration: none;
    border-bottom: 1px dashed rgba(156, 163, 175, 0.6);
    transition: var(--transition-base);
}

.footer a:hover {
    color: var(--text-primary);
    border-bottom-color: var(--text-primary);
}

/* ── Responsive ──────────────────────────────────────── */

@media (max-width: 768px) {
    .container {
        padding: 1.5rem 1rem;
    }

    .profile {
        padding: 1.75rem 1.5rem 1.5rem;
    }

    .profile-header {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        text-align: center;
    }

    .avatar {
        width: 120px;
        height: 120px;
        margin: 0 auto;
    }

    .profile-info h1 {
        font-size: 1.85rem;
    }

    .profile-details {
        font-size: 0.95rem;
    }

    .bio {
        font-size: 1rem;
        padding: 0.85rem 1rem;
        margin: 0.85rem 0;
    }

    .btc-address {
        padding: 0.85rem 1rem;
    }

    .btc-address p {
        font-size: 0.85rem;
        word-break: break-all;
    }

    .projects-section {
        padding: 1.75rem 1.5rem;
    }

    .projects-section h2 {
        font-size: 1.4rem;
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 640px) {
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }

    .profile-info h1 {
        font-size: 1.65rem;
    }

    .project-card {
        min-height: 175px;
    }

    .project-content {
        padding: 1.25rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1.25rem 0.85rem;
    }

    .profile {
        padding: 1.5rem 1.1rem 1.25rem;
    }

    .profile-info h1 {
        font-size: 1.5rem;
    }

    .bio {
        font-size: 0.95rem;
        padding: 0.75rem 0.85rem;
    }

    .links-grid {
        gap: 0.6rem;
    }

    .link-card {
        padding: 0.9rem 1rem;
    }

    .icon {
        width: 38px;
        height: 38px;
    }

    .text h2 {
        font-size: 1rem;
    }

    .text p {
        font-size: 0.845rem;
    }

    .projects-section {
        padding: 1.35rem 1.1rem;
    }

    .project-content {
        padding: 1rem;
    }

    .footer {
        padding: 1.25rem 1rem 1.5rem;
    }
}
