/* ============================
   全局重置与基础
   ============================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #8b5cf6;
    --accent: #06b6d4;
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --text-light: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 10px 30px rgba(0,0,0,0.3);
    --transition: 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================
   导航栏
   ============================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 16px 0;
    transition: background 0.3s ease, box-shadow 0.3s ease;
    background: transparent;
}

.navbar.scrolled {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    padding: 10px 0;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
}

.logo i {
    color: var(--accent);
    font-size: 28px;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-muted);
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-light);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.hamburger span {
    display: block;
    width: 28px;
    height: 3px;
    background: var(--text-light);
    border-radius: 2px;
    transition: 0.3s ease;
}

/* ============================
   Hero 区域
   ============================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 120px 0 80px;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    position: relative;
    z-index: 2;
}

.hero-text {
    flex: 1;
}

.hero-text h1 {
    font-size: 52px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-text p {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 32px;
    max-width: 480px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.6);
}

.btn-secondary {
    background: rgba(255,255,255,0.08);
    color: var(--text-light);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.15);
    transform: translateY(-3px);
}

.btn-card {
    background: var(--primary);
    color: #fff;
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 50px;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
    margin-top: auto;
}

.btn-card:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* Hero 视觉 */
.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.floating-cards {
    position: relative;
    width: 280px;
    height: 280px;
}

.float-card {
    position: absolute;
    padding: 20px 28px;
    border-radius: var(--radius);
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    animation: float 6s ease-in-out infinite;
    color: var(--text-light);
}

.float-card i {
    font-size: 28px;
    color: var(--accent);
}

.card1 { top: 0; left: 20px; animation-delay: 0s; }
.card2 { bottom: 40px; right: 0; animation-delay: 2s; }
.card3 { bottom: 0; left: 40px; animation-delay: 4s; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* Hero 背景形状 */
.hero-bg-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.15;
    filter: blur(80px);
}

.shape1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    right: -100px;
}

.shape2 {
    width: 300px;
    height: 300px;
    background: var(--accent);
    bottom: -50px;
    left: -80px;
}

.shape3 {
    width: 200px;
    height: 200px;
    background: var(--secondary);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* ============================
   作品展示
   ============================ */
.showcase {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-header h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 12px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 16px;
}

.section-header code {
    background: rgba(99, 102, 241, 0.2);
    padding: 2px 8px;
    border-radius: 6px;
    color: var(--accent);
}

.filter-bar {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.search-input {
    padding: 12px 20px;
    border-radius: 50px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-light);
    font-size: 16px;
    width: 320px;
    max-width: 100%;
    outline: none;
    transition: border 0.3s ease;
}

.search-input:focus {
    border-color: var(--primary);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.project-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 28px;
    border: 1px solid var(--border-color);
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0;
    transition: opacity 0.4s ease;
}

.project-card:hover::before {
    opacity: 1;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    border-color: var(--primary);
}

.card-icon {
    font-size: 36px;
    color: var(--primary);
    margin-bottom: 16px;
}

.project-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}

.card-desc {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 16px;
    flex-grow: 1;
}

.card-meta {
    display: flex;
    gap: 12px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.card-meta i {
    margin-right: 4px;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 20px;
    color: var(--border-color);
}

/* ============================
   关于我们
   ============================ */
.about {
    padding: 100px 0;
    background: rgba(30, 41, 59, 0.3);
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.about-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 32px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: 0.3s ease;
}

.about-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.about-card i {
    font-size: 40px;
    color: var(--accent);
    margin-bottom: 16px;
}

.about-card h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.about-card p {
    color: var(--text-muted);
    font-size: 14px;
}

/* ============================
   联系我们
   ============================ */
.contact {
    padding: 100px 0;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    max-width: 900px;
    margin: 0 auto;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 24px;
    justify-content: center;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 16px;
    color: var(--text-muted);
}

.info-item i {
    font-size: 24px;
    color: var(--accent);
    width: 40px;
    text-align: center;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-form input,
.contact-form textarea {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-light);
    font-size: 16px;
    font-family: inherit;
    outline: none;
    transition: border 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--primary);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--text-muted);
}

.contact-form button {
    align-self: flex-start;
}

/* ============================
   页脚
   ============================ */
.footer {
    padding: 32px 0;
    border-top: 1px solid var(--border-color);
    margin-top: 40px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 14px;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--text-light);
}

/* ============================
   响应式
   ============================ */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: rgba(15, 23, 42, 0.95);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 32px;
        transition: right 0.4s ease;
        z-index: 999;
    }

    .nav-links.open {
        right: 0;
    }

    .hamburger {
        display: flex;
        z-index: 1001;
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 36px;
    }

    .hero-text p {
        margin: 0 auto 32px;
    }

    .hero-actions {
        justify-content: center;
    }

    .floating-cards {
        width: 200px;
        height: 200px;
        margin-top: 40px;
    }

    .float-card {
        font-size: 14px;
        padding: 12px 18px;
    }

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

    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 28px;
    }

    .section-header h2 {
        font-size: 28px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .search-input {
        width: 100%;
    }
}