/* ========== 全局重置 & 基础 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

:root {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.10);
    --radius: 16px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --accent: #6C63FF;
    --accent-light: #8B83FF;
    --accent-dark: #4F46E5;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background var(--transition), color var(--transition);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

/* ========== 暗色主题 ========== */
[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.6);
}

/* ========== 通用组件 ========== */
.section-header {
    text-align: center;
    margin-bottom: 56px;
}

.section-tag {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--accent);
    background: rgba(108, 99, 255, 0.10);
    padding: 4px 16px;
    border-radius: 20px;
    margin-bottom: 12px;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.section-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all var(--transition);
    cursor: pointer;
    border: none;
    background: transparent;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 12px rgba(108, 99, 255, 0.3);
}
.btn-primary:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(108, 99, 255, 0.4);
}

.btn-outline {
    border: 2px solid var(--border-color);
    color: var(--text-primary);
}
.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(108, 99, 255, 0.05);
}

.btn-sm {
    padding: 6px 18px;
    font-size: 0.8rem;
    background: rgba(255,255,255,0.9);
    color: #0f172a;
    backdrop-filter: blur(4px);
}
.btn-sm:hover {
    background: #fff;
    transform: scale(1.04);
}

/* ========== 导航 ========== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    transition: background var(--transition), border-color var(--transition);
}
[data-theme="dark"] .navbar {
    background: rgba(15, 23, 42, 0.8);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.nav-logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: -0.5px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color var(--transition);
    position: relative;
}
.nav-link:hover,
.nav-link.active {
    color: var(--accent);
}
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.theme-toggle,
.menu-toggle {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background var(--transition);
}
.theme-toggle:hover,
.menu-toggle:hover {
    background: var(--border-color);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 6px;
}
.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition);
}

/* ========== Hero ========== */
.hero {
    padding: 140px 0 80px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent);
    background: rgba(108, 99, 255, 0.08);
    padding: 4px 18px 4px 12px;
    border-radius: 40px;
    margin-bottom: 20px;
}
.badge-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    display: inline-block;
    animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
    0%,100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

.hero-title {
    font-size: 3.2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 16px;
}
.highlight {
    background: linear-gradient(135deg, var(--accent), #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.hero-desc {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 480px;
    margin-bottom: 32px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 40px;
}

.hero-social {
    display: flex;
    gap: 18px;
}
.hero-social a {
    font-size: 1.3rem;
    color: var(--text-muted);
    transition: all var(--transition);
}
.hero-social a:hover {
    color: var(--accent);
    transform: translateY(-2px);
}

/* Hero 右侧视觉 */
.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.avatar-wrapper {
    position: relative;
    width: 200px;
    height: 200px;
}
.avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--bg-secondary);
    box-shadow: var(--shadow-hover);
    position: relative;
    z-index: 2;
}
.ring-glow {
    position: absolute;
    inset: -12px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, var(--accent), #a78bfa, var(--accent));
    opacity: 0.4;
    animation: spin-ring 8s linear infinite;
    z-index: 1;
}
@keyframes spin-ring {
    to { transform: rotate(360deg); }
}

.floating-card {
    position: absolute;
    background: var(--bg-card);
    box-shadow: var(--shadow);
    border-radius: 12px;
    padding: 10px 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(4px);
    animation: float 3s ease-in-out infinite;
}
.card-1 { top: 10%; right: -10%; animation-delay: 0s; }
.card-2 { bottom: 15%; left: -10%; animation-delay: 1.5s; }

@keyframes float {
    0%,100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Hero 背景形状 */
.hero-bg-shapes {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}
.shape {
    position: absolute;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.06;
}
.shape-1 { width: 400px; height: 400px; top: -120px; right: -100px; }
.shape-2 { width: 250px; height: 250px; bottom: -60px; left: -80px; }
.shape-3 { width: 180px; height: 180px; top: 40%; right: 20%; }

/* ========== About ========== */
.about {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.8;
}

.about-stats {
    display: flex;
    gap: 40px;
    margin-top: 32px;
}
.stat-item {
    text-align: center;
}
.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
}
.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.about-image {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-hover);
}
.about-image img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}
.img-badge {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(8px);
    padding: 8px 18px;
    border-radius: 30px;
    font-weight: 500;
    font-size: 0.9rem;
    color: #0f172a;
    box-shadow: var(--shadow);
}

/* ========== Skills ========== */
.skills {
    padding: 100px 0;
    background: var(--bg-primary);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.skill-card {
    background: var(--bg-card);
    padding: 28px 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: all var(--transition);
    text-align: center;
}
.skill-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent);
}

.skill-icon {
    font-size: 2.4rem;
    color: var(--accent);
    margin-bottom: 12px;
}
.skill-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
}
.skill-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}
.skill-bar {
    width: 100%;
    height: 6px;
    background: var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}
.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #a78bfa);
    border-radius: 8px;
}

/* ========== Projects ========== */
.projects {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

.project-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: all var(--transition);
}
.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent);
}

.project-img {
    position: relative;
    overflow: hidden;
    height: 200px;
}
.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}
.project-card:hover .project-img img {
    transform: scale(1.04);
}
.project-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition);
}
.project-card:hover .project-overlay {
    opacity: 1;
}

.project-info {
    padding: 20px 24px 24px;
}
.project-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.project-tags span {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 2px 12px;
    background: var(--border-color);
    color: var(--text-muted);
    border-radius: 20px;
}
.project-info h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 6px;
}
.project-info p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.projects-more {
    text-align: center;
    margin-top: 48px;
}

/* ========== Contact ========== */
.contact {
    padding: 100px 0;
    background: var(--bg-primary);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 32px;
}
.contact-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}
.contact-icon {
    width: 48px;
    height: 48px;
    background: rgba(108, 99, 255, 0.08);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 1.2rem;
    flex-shrink: 0;
}
.contact-item h4 {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 2px;
}
.contact-item a,
.contact-item span {
    color: var(--text-secondary);
    transition: color var(--transition);
}
.contact-item a:hover {
    color: var(--accent);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: var(--bg-card);
    padding: 32px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.form-group label {
    font-weight: 500;
    font-size: 0.9rem;
}
.form-group input,
.form-group textarea {
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
    transition: border var(--transition);
    font-family: inherit;
}
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.15);
}
.form-status {
    margin-top: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
    text-align: center;
}

/* ========== Footer ========== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 40px 0 24px;
}
.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
}
.footer-logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent);
}
.footer-brand p {
    color: var(--text-muted);
    font-size: 0.95rem;
}
.footer-social {
    display: flex;
    gap: 20px;
}
.footer-social a {
    font-size: 1.2rem;
    color: var(--text-muted);
    transition: color var(--transition);
}
.footer-social a:hover {
    color: var(--accent);
}
.footer-bottom {
    width: 100%;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ========== 响应式 ========== */
@media (max-width: 1024px) {
    .hero-container { grid-template-columns: 1fr; text-align: center; }
    .hero-desc { margin-left: auto; margin-right: auto; }
    .hero-actions { justify-content: center; }
    .hero-social { justify-content: center; }
    .hero-visual { margin-top: 40px; }
    .floating-card { display: none; }
    .about-grid { grid-template-columns: 1fr; }
    .contact-wrapper { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 72px;
        left: 0;
        width: 100%;
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 24px;
        gap: 16px;
        border-bottom: 1px solid var(--border-color);
        transform: translateY(-120%);
        transition: transform var(--transition);
        box-shadow: var(--shadow);
    }
    .nav-menu.active {
        transform: translateY(0);
    }
    .menu-toggle {
        display: flex;
    }
    .hero-title { font-size: 2.5rem; }
    .section-title { font-size: 1.8rem; }
    .about-stats { flex-wrap: wrap; justify-content: center; }
}

@media (max-width: 480px) {
    .hero { padding: 120px 0 60px; }
    .hero-title { font-size: 2rem; }
    .btn { padding: 10px 20px; font-size: 0.9rem; }
    .contact-form { padding: 20px; }
}
/*body {
    background: url('../images/bg1.webp') fixed center/cover no-repeat;
}*/