/* CSS Variables */
:root {
    --color-primary: #3b82f6;
    --color-secondary: #f9fafb;
    --color-accent: #8b5cf6;
    --color-accent-dark: #7c3aed;
    --color-text: #1f2937;
    --color-text-light: #6b7280;
    --color-white: #ffffff;
    --color-border: #e5e7eb;
    --color-blue: #3b82f6;
    --color-purple: #8b5cf6;
    --color-cyan: #06b6d4;
    --shadow-card: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-card-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-card: 0.75rem;
    --radius-button: 0.5rem;
    --transition-default: 0.2s ease;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--color-secondary);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
}

/* ============================================
   背景样式 - 参考 moziqi77-project.pages.dev
   ============================================ */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        /* 细微网格图案 */
        linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(139, 92, 246, 0.03) 1px, transparent 1px),
        /* 柔和渐变背景 */
        linear-gradient(180deg, #f9fafb 0%, #f3f4f6 50%, #f9fafb 100%);
    background-size:
        64px 64px,
        64px 64px,
        100% 100%;
    z-index: -2;
}

/* 装饰性背景元素 */
.bg-decoration {
    position: fixed;
    pointer-events: none;
    z-index: -1;
}

.bg-circle-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
    top: -200px;
    right: -100px;
}

.bg-circle-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.06) 0%, transparent 70%);
    bottom: -150px;
    left: -50px;
}

.bg-circle-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.05) 0%, transparent 70%);
    top: 50%;
    left: 30%;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 0%, 0% 0%, 0% 0%; }
    25% { background-position: 0% 0%, 0% 0%, 50% 50%; }
    50% { background-position: 0% 0%, 0% 0%, 100% 50%; }
    75% { background-position: 0% 0%, 0% 0%, 50% 100%; }
}

@keyframes floatBlob1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(80px, 50px) scale(1.1); }
    66% { transform: translate(40px, 100px) scale(0.95); }
}

@keyframes floatBlob2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-60px, -80px) scale(1.05); }
    66% { transform: translate(-100px, 30px) scale(0.9); }
}

@keyframes floatBlob3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-80px, 60px) scale(1.15); }
    66% { transform: translate(50px, -40px) scale(0.9); }
}

@keyframes shimmer {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

/* 标题渐变文字效果 */
.gradient-text {
    background: linear-gradient(135deg,
        #2d3748 0%,    /* 深灰 */
        #1a365d 35%,   /* 深蓝 */
        #4299e1 65%,   /* 蓝色 */
        #9f7aea 100%); /* 紫色 */
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    display: inline-block;
}

/* Typography */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700&display=swap');

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--transition-default);
}

a:hover {
    color: var(--color-accent-dark);
}

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

/* Header */
.header {
    background: linear-gradient(135deg, #1a365d 0%, #3f51a4 50%, #6b46c1 100%);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(66, 153, 225, 0.15);
}

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

.logo {
    color: var(--color-white);
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff 0%, #e6e0ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

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

.nav-links a {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    transition: color var(--transition-default);
}

.nav-links a:hover {
    color: var(--color-white);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #1a365d 0%, #3f51a4 50%, #6b46c1 100%);
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(66, 153, 225, 0.35) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(159, 122, 234, 0.35) 0%, transparent 50%),
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.8;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4299e1 0%, #9f7aea 100%);
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    border: 4px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 32px rgba(66, 153, 225, 0.4);
    animation: fadeInDown 0.8s ease;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #ffffff 0%, #e6e0ff 50%, #b3d4ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeInDown 0.8s ease 0.1s both;
    line-height: 1.2;
}

.hero-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin-bottom: 8px;
    animation: fadeInDown 0.8s ease 0.2s both;
}

.hero-school {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.95rem;
    animation: fadeInDown 0.8s ease 0.3s both;
}

/* Profile Section */
.profile-section {
    padding: 0 0 50px;
}

.profile-card {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 8px 32px rgba(66, 153, 225, 0.12);
    border: 1px solid rgba(159, 122, 234, 0.15);
    max-width: 960px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 32px;
    align-items: start;
    position: relative;
    overflow: hidden;
}

.profile-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #4299e1 0%, #9f7aea 50%, #38b2ac 100%);
}

.profile-left {
    text-align: center;
}

.profile-avatar {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4299e1 0%, #9f7aea 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 56px;
    margin: 0 auto 16px;
    border: 4px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 6px 24px rgba(66, 153, 225, 0.3);
}

.profile-name {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 4px;
    background: linear-gradient(135deg, #1a365d 0%, #4299e1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.profile-major {
    font-size: 0.9rem;
    color: #5a4aa3;
    margin-bottom: 8px;
    font-weight: 500;
}

.profile-badge {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, rgba(66, 153, 225, 0.1) 0%, rgba(159, 122, 234, 0.1) 100%);
    color: #5a4aa3;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(159, 122, 234, 0.2);
}

.profile-right h3 {
    background: linear-gradient(135deg, #1a365d 0%, #4299e1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    font-size: 1.1rem;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(159, 122, 234, 0.15);
}

.profile-intro {
    color: #4a5568;
    font-size: 0.95rem;
    line-height: 1.85;
    margin-bottom: 16px;
}

.profile-intro:last-child {
    margin-bottom: 0;
}

.profile-skills {
    margin-top: 16px;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.skill-tag {
    padding: 6px 14px;
    background: linear-gradient(135deg, rgba(66, 153, 225, 0.1) 0%, rgba(159, 122, 234, 0.1) 100%);
    color: #5a4aa3;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(159, 122, 234, 0.2);
    transition: all 0.25s ease;
}

.skill-tag:hover {
    background: linear-gradient(135deg, #4299e1 0%, #9f7aea 100%);
    color: #ffffff;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.25);
}

/* Courses Section */
.courses-section {
    padding: 0 0 80px;
}

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

.section-title h2 {
    font-size: 2.25rem;
    margin-bottom: 12px;
    background: linear-gradient(135deg,
        #2d3748 0%,
        #1a365d 35%,
        #4299e1 70%,
        #9f7aea 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.section-title p {
    color: var(--color-text-light);
    font-size: 1rem;
}

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

.course-card {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius-card);
    padding: 28px;
    box-shadow: 0 4px 20px rgba(66, 153, 225, 0.08);
    transition: transform var(--transition-default), box-shadow var(--transition-default), border-color var(--transition-default);
    cursor: pointer;
    border: 1px solid rgba(159, 122, 234, 0.15);
    animation: fadeInUp 0.6s ease both;
    position: relative;
    overflow: hidden;
}

.course-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #4299e1 0%, #9f7aea 50%, #38b2ac 100%);
    opacity: 0;
    transition: opacity var(--transition-default);
}

.course-card:nth-child(1) { animation-delay: 0.1s; }
.course-card:nth-child(2) { animation-delay: 0.2s; }
.course-card:nth-child(3) { animation-delay: 0.3s; }
.course-card:nth-child(4) { animation-delay: 0.4s; }
.course-card:nth-child(5) { animation-delay: 0.5s; }

.course-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-card-hover);
    border-color: rgba(159, 122, 234, 0.35);
}

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

.course-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 16px;
    transition: transform var(--transition-default);
}

.course-card:hover .course-icon {
    transform: scale(1.1) rotate(-5deg);
}

.course-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #1a365d 0%, #4299e1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.course-card p {
    color: var(--color-text-light);
    font-size: 0.95rem;
    line-height: 1.7;
}

.course-tag {
    display: inline-block;
    padding: 6px 14px;
    background: linear-gradient(135deg, rgba(66, 153, 225, 0.1) 0%, rgba(159, 122, 234, 0.1) 100%);
    color: #5a4aa3;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-top: 14px;
    font-weight: 500;
    border: 1px solid rgba(159, 122, 234, 0.2);
}

/* Course Detail Page */
.course-header {
    background: linear-gradient(135deg, #1a365d 0%, #3f51a4 50%, #6b46c1 100%);
    padding: 60px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.course-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(66, 153, 225, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(159, 122, 234, 0.3) 0%, transparent 50%);
}

.course-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(66, 153, 225, 0.25) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(159, 122, 234, 0.25) 0%, transparent 50%),
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 1;
}

.back-link {
    position: absolute;
    top: 24px;
    left: 24px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color var(--transition-default);
    z-index: 2;
}

.back-link:hover {
    color: var(--color-white);
}

.course-header-content {
    position: relative;
    z-index: 1;
}

.course-header-icon {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin: 0 auto 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.course-header h1 {
    font-size: 2.25rem;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #ffffff 0%, #e6e0ff 50%, #b3d4ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.course-header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.course-content {
    padding: 60px 0;
}

.chapter-list {
    max-width: 800px;
    margin: 0 auto;
}

.chapter-item {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius-card);
    margin-bottom: 12px;
    box-shadow: 0 4px 20px rgba(66, 153, 225, 0.08);
    overflow: hidden;
    border: 1px solid rgba(159, 122, 234, 0.12);
    transition: box-shadow var(--transition-default), border-color var(--transition-default);
}

.chapter-item:hover {
    box-shadow: 0 6px 28px rgba(159, 122, 234, 0.15);
    border-color: rgba(159, 122, 234, 0.25);
}

.chapter-header {
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background var(--transition-default);
}

.chapter-header:hover {
    background: linear-gradient(135deg, rgba(66, 153, 225, 0.04) 0%, rgba(159, 122, 234, 0.04) 100%);
}

.chapter-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chapter-number {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #4299e1 0%, #9f7aea 100%);
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.25);
}

.chapter-name {
    font-size: 1.05rem;
    background: linear-gradient(135deg, #1a365d 0%, #4299e1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    font-weight: 600;
}

.chapter-toggle {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-light);
    transition: transform var(--transition-default);
}

.chapter-item.active .chapter-toggle {
    transform: rotate(180deg);
}

.chapter-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.chapter-item.active .chapter-body {
    max-height: 500px;
}

.chapter-body-inner {
    padding: 0 24px 20px;
    border-top: 1px solid var(--color-border);
    padding-top: 16px;
}

.chapter-body-inner p {
    color: var(--color-text-light);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #1a365d 0%, #2d4a7c 50%, #6b46c1 100%);
    padding: 32px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 10% 20%, rgba(66, 153, 225, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(159, 122, 234, 0.15) 0%, transparent 40%);
}

.footer p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Responsive */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 12px;
    }

    .hero {
        padding: 60px 0;
    }

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

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

    .back-link {
        position: static;
        justify-content: center;
        margin-bottom: 20px;
    }

    .course-header {
        padding: 40px 0;
    }
}

/* Course Card Colors */
.course-icon-python { background: #fef3c7; }
.course-icon-analysis { background: #dbeafe; }
.course-icon-collection { background: #d1fae5; }
.course-icon-supply { background: #ede9fe; }
.course-icon-database { background: #fee2e2; }
