:root {
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --secondary: #ec4899;
    --secondary-light: #f472b6;
    --accent: #06b6d4;
    --dark: #0f172a;
    --dark-light: #1e293b;
    --light: #f8fafc;
    --lighter: #ffffff;
    --gray: #64748b;
    --gray-light: #94a3b8;
    --card-bg: rgba(255, 255, 255, 0.1);
    --text-color: #0f172a;
    --text-light: #475569;
    --shadow-color: rgba(99, 102, 241, 0.2);
    --shadow-dark: rgba(0, 0, 0, 0.15);
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --border-radius: 24px;
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.25);
    --blur-amount: 20px;
}

.dark-mode {
    --primary: #818cf8;
    --primary-light: #a5b4fc;
    --primary-dark: #6366f1;
    --secondary: #f472b6;
    --secondary-light: #f9a8d4;
    --accent: #22d3ee;
    --dark: #f8fafc;
    --dark-light: #e2e8f0;
    --light: #0f172a;
    --lighter: #1e293b;
    --gray: #94a3b8;
    --gray-light: #cbd5e1;
    --card-bg: rgba(30, 41, 59, 0.4);
    --text-color: #f8fafc;
    --text-light: #cbd5e1;
    --shadow-color: rgba(0, 0, 0, 0.4);
    --shadow-dark: rgba(0, 0, 0, 0.5);
    --glass-bg: rgba(0, 0, 0, 0.25);
    --glass-border: rgba(255, 255, 255, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #e0e7ff 0%, #f0f9ff 100%);
    min-height: 100vh;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    transition: var(--transition);
    position: relative;
    overflow-x: hidden;
}

.dark-mode body {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
}

/* 液态玻璃背景效果 */
.liquid-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
}

.liquid-shape {
    position: absolute;
    filter: blur(60px);
    opacity: 0.6;
    border-radius: 50%;
    animation: liquidMove 20s infinite alternate ease-in-out;
}

.liquid-shape:nth-child(1) {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    width: 500px;
    height: 500px;
    top: -250px;
    left: -100px;
    animation-delay: 0s;
}

.liquid-shape:nth-child(2) {
    background: linear-gradient(135deg, var(--secondary-light) 0%, var(--secondary) 100%);
    width: 600px;
    height: 600px;
    bottom: -300px;
    right: -150px;
    animation-delay: -5s;
}

.liquid-shape:nth-child(3) {
    background: linear-gradient(135deg, var(--accent) 0%, #3b82f6 100%);
    width: 400px;
    height: 400px;
    top: 50%;
    left: 30%;
    animation-delay: -10s;
}

.liquid-shape:nth-child(4) {
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
    width: 450px;
    height: 450px;
    top: 20%;
    right: 10%;
    animation-delay: -15s;
}

@keyframes liquidMove {
    0% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }

    50% {
        transform: translate(40px, 50px) rotate(180deg) scale(1.1);
    }

    100% {
        transform: translate(-30px, 20px) rotate(360deg) scale(0.9);
    }
}

/* 粒子效果 */
.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    animation: float 20s infinite linear;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

.dark-mode .particle {
    background: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 10px rgba(129, 140, 248, 0.5);
}

@keyframes float {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(-100vh) translateX(100px);
        opacity: 0;
    }
}

.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--glass-bg);
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 32px var(--shadow-dark);
    z-index: 100;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 10px 25px var(--shadow-color);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 20px auto;
    animation: fadeIn 1s ease-out;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.header {
    text-align: center;
    margin-bottom: 50px;
    width: 100%;
    position: relative;
}

.avatar-container {
    position: relative;
    width: 130px;
    height: 130px;
    margin: 0 auto 25px;
}

.avatar-glow {
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 50%;
    filter: blur(15px);
    opacity: 0.7;
    animation: glowPulse 4s ease-in-out infinite;
    z-index: 0;
}

.avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: white;
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 15px 35px var(--shadow-color);
    animation: avatarPulse 4s ease-in-out infinite;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

@keyframes avatarPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes glowPulse {

    0%,
    100% {
        opacity: 0.7;
        transform: scale(1);
    }

    50% {
        opacity: 0.9;
        transform: scale(1.05);
    }
}

.title {
    font-size: 3.2rem;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 1.3rem;
    color: var(--text-light);
    margin-bottom: 25px;
    font-weight: 400;
}

.tech-badge {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.badge-item {
    background: var(--glass-bg);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-color);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    font-weight: 500;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--text-color);
    width: 100%;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 2px;
}

/* 跳转链接卡片样式 */
.link-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

.link-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: 0 15px 35px var(--shadow-color);
    padding: 30px;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(var(--blur-amount));
    -webkit-backdrop-filter: blur(var(--blur-amount));
    border: 1px solid var(--glass-border);
    animation: cardFloat 8s ease-in-out infinite;
    animation-delay: calc(var(--delay) * 0.2s);
    text-decoration: none;
    color: inherit;
    min-height: 220px;
    justify-content: space-between;
}

.card-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    opacity: 0;
    transition: var(--transition);
    z-index: -1;
    border-radius: var(--border-radius);
}

.link-card:hover .card-glow {
    opacity: 0.1;
}

.link-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.2) 0%,
            rgba(255, 255, 255, 0.05) 50%,
            rgba(255, 255, 255, 0.2) 100%);
    z-index: -1;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.dark-mode .link-card::before {
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.1) 0%,
            rgba(255, 255, 255, 0.02) 50%,
            rgba(255, 255, 255, 0.1) 100%);
}

@keyframes cardFloat {

    0%,
    100% {
        transform: translateY(0) rotate(0.5deg);
    }

    50% {
        transform: translateY(-10px) rotate(-0.5deg);
    }
}

.link-card:hover {
    transform: translateY(-15px) scale(1.03);
    box-shadow: 0 25px 50px var(--shadow-color);
}

.card-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.card-icon {
    font-size: 2.5rem;
    width: 70px;
    height: 70px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    transition: var(--transition);
    position: relative;
    z-index: 1;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.link-card:hover .card-icon {
    transform: scale(1.1) rotate(5deg);
}

/* 卡片图标颜色 */
.link-card.portfolio .card-icon {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

.link-card.contact .card-icon {
    background: linear-gradient(135deg, #ffe66d, #ffd93d);
    color: #23263a;
}

.dark-mode .link-card.contact .card-icon {
    color: #23263a;
}

.link-card.testimonials .card-icon {
    background: linear-gradient(135deg, #e17055, #d63031);
    color: white;
}

.card-content {
    flex: 1;
}

.card-title {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-color);
}

.card-description {
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 20px;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.card-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.card-tag {
    background: var(--glass-bg);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--text-light);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    font-weight: 500;
}

.card-arrow {
    font-size: 1.2rem;
    color: var(--primary);
    transition: var(--transition);
}

.link-card:hover .card-arrow {
    transform: translateX(5px);
    color: var(--secondary);
}

/* 页脚样式 */
footer {
    text-align: center;
    margin-top: 60px;
    font-size: 14px;
    color: var(--text-light);
    padding: 20px;
    border-radius: 18px;
    background: var(--card-bg);
    box-shadow: 0 8px 20px var(--shadow-color);
    width: 100%;
    max-width: 500px;
    transition: var(--transition);
    backdrop-filter: blur(var(--blur-amount));
    -webkit-backdrop-filter: blur(var(--blur-amount));
    border: 1px solid var(--glass-border);
    display: flex;
    justify-content: center;
    align-items: center;
}

footer b {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 600;
}

/* 动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 卡片动画延迟 */
.link-card:nth-child(1) {
    --delay: 1;
}

.link-card:nth-child(2) {
    --delay: 2;
}

.link-card:nth-child(3) {
    --delay: 3;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .link-cards {
        grid-template-columns: 1fr;
        gap: 20px;
        max-width: 500px;
    }

    .link-card {
        padding: 25px;
    }

    .section-title {
        font-size: 2rem;
    }

    .title {
        font-size: 2.5rem;
    }

    .card-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }

    .tech-badge {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 1.8rem;
    }

    .title {
        font-size: 2rem;
    }

    .card-header {
        flex-direction: column;
        text-align: center;
    }

    .card-icon {
        margin-right: 0;
        margin-bottom: 15px;
    }

    .avatar-container {
        width: 110px;
        height: 110px;
    }

    .avatar {
        width: 100px;
        height: 100px;
    }

    .subtitle {
        font-size: 1.1rem;
    }
}