/* ==================== 全局样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #000000;
    --bg-card: #161618;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent-blue: #00d4ff;
    --accent-purple: #b537ff;
    --border-color: #333333;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* ==================== 粒子背景画布 ==================== */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ==================== 鼠标粒子拖尾画布 ==================== */
#cursor-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9998;
    pointer-events: none;
}

/* ==================== Hero Section ==================== */
.hero {
    text-align: center;
    padding: 3rem 1.5rem 2rem;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.avatar-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
}

.avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    position: relative;
    z-index: 2;
    border: 3px solid var(--accent-blue);
}

.avatar-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-blue) 0%, transparent 70%);
    opacity: 0.4;
    animation: pulse 3s ease-in-out infinite;
    z-index: 1;
}

@keyframes pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.4;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.6;
    }
}

.hero h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    letter-spacing: -0.5px;
}

.hero .subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    line-height: 1.6;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.tag {
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--accent-blue);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--accent-blue);
    transition: all 0.3s ease;
}

.tag:hover {
    background: var(--accent-blue);
    color: var(--bg-primary);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
    transform: translateY(-2px);
}

/* ==================== 主内容区域 - 卡片流 ==================== */
.main-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem 3rem;
    position: relative;
    z-index: 1;
}

.card {
    background: rgba(22, 22, 24, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==================== About Section ==================== */
.about-text {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    text-align: center;
}

.stat-item {
    padding: 1.25rem;
    background: rgba(0, 212, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(0, 212, 255, 0.2);
    transition: all 0.3s ease;
}

.stat-item:hover {
    border-color: var(--accent-blue);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
    transform: translateY(-3px);
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ==================== Services Section ==================== */
.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.service-card {
    background: rgba(0, 212, 255, 0.03);
    padding: 1.25rem;
    border-radius: 12px;
    border: 1px solid rgba(0, 212, 255, 0.15);
    transition: all 0.3s ease;
}

.service-card:hover {
    background: rgba(0, 212, 255, 0.08);
    border-color: var(--accent-blue);
    box-shadow: 0 5px 20px rgba(0, 212, 255, 0.2);
    transform: translateY(-3px);
}

.service-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--accent-blue);
}

.service-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* ==================== Portfolio Section ==================== */
.portfolio-hint {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    text-align: center;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.portfolio-card {
    background: rgba(181, 55, 255, 0.03);
    padding: 1.25rem;
    border-radius: 12px;
    border: 1px solid rgba(181, 55, 255, 0.15);
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
    color: inherit;
}

.portfolio-card:hover {
    background: rgba(181, 55, 255, 0.08);
    border-color: var(--accent-purple);
    box-shadow: 0 5px 20px rgba(181, 55, 255, 0.2);
    transform: translateY(-3px);
}

.portfolio-card h3 {
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    line-height: 1.4;
}

.portfolio-meta {
    color: var(--accent-purple);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.portfolio-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.9rem;
}

/* ==================== Highlights Section ==================== */
.highlights-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.highlight-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    aspect-ratio: 1 / 1;
    background: #000000;
    cursor: zoom-in;
}

.highlight-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
    transition: all 0.4s ease;
}

.highlight-item:hover img {
    transform: scale(1.05);
    filter: brightness(1.15);
}

/* ==================== Contact Section ==================== */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.qr-card {
    text-align: center;
    padding: 1.5rem;
    background: rgba(0, 212, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(0, 212, 255, 0.15);
    transition: all 0.3s ease;
}

.qr-card:hover {
    border-color: var(--accent-blue);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
    transform: scale(1.03);
}

.qr-wrapper {
    position: relative;
    width: 220px;
    height: 220px;
    margin: 0 auto 1rem;
    cursor: pointer;
}

.qr-image {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.qr-wrapper:hover .qr-image {
    transform: scale(1.05);
}

.qr-enlarged {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 400px;
    height: 400px;
    background: var(--bg-card);
    border: 2px solid var(--accent-blue);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 1000;
}

.qr-wrapper:hover .qr-enlarged {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.qr-enlarged img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.qr-placeholder {
    width: 220px;
    height: 220px;
    background: rgba(0, 212, 255, 0.1);
    border: 2px dashed var(--accent-blue);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-blue);
    font-size: 0.9rem;
}

.qr-card h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--accent-blue);
}

.qr-card p {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.qr-hint {
    font-size: 0.75rem;
    color: var(--accent-blue);
    margin-top: 0.5rem;
    opacity: 0.7;
}

/* ==================== Lightbox Modal ==================== */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    cursor: zoom-out;
    animation: fadeIn 0.3s ease;
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 50px rgba(0, 212, 255, 0.3);
    animation: zoomIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* ==================== Footer ==================== */
footer {
    text-align: center;
    padding: 2rem 1.5rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 768px) {
    .hero {
        padding: 2rem 1rem 1.5rem;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .hero .subtitle {
        font-size: 0.9rem;
    }

    .avatar-wrapper {
        width: 100px;
        height: 100px;
    }

    .avatar-glow {
        width: 120px;
        height: 120px;
    }

    .main-content {
        padding: 0 1rem 2rem;
    }

    .card {
        padding: 1.5rem;
        margin-bottom: 1.25rem;
    }

    .card h2 {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }

    .stats {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }

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

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .qr-wrapper {
        width: 200px;
        height: 200px;
    }

    .qr-placeholder {
        width: 200px;
        height: 200px;
    }

    .qr-enlarged {
        width: 320px;
        height: 320px;
        padding: 15px;
    }
}

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

    .hero h1 {
        font-size: 1.3rem;
    }

    .card {
        padding: 1.25rem;
    }

    .service-card,
    .portfolio-card {
        padding: 1rem;
    }
}
