/* ===================================
   Stack Man Personal Website - Main Stylesheet
   Version: v2.0
   =================================== */

/* 确保文字和字体正常显示 */
html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* CSS Variables - Theme Colors */
:root {
    /* Primary - Blue Purple Gradient */
    --primary-50: #eef2ff;
    --primary-100: #e0e7ff;
    --primary-200: #c7d2fe;
    --primary-300: #a5b4fc;
    --primary-400: #818cf8;
    --primary-500: #6366f1;
    --primary-600: #4f46e5;
    --primary-700: #4338ca;
    --primary-800: #3730a3;
    --primary-900: #312e81;
    
    /* Accent - Lobster Red/Orange */
    --accent-500: #f97316;
    --accent-600: #ea580c;
    
    /* Functional Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;
    
    /* Light Theme */
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-tertiary: #94a3b8;
    --border-primary: #e2e8f0;
    --border-secondary: #cbd5e1;
    --shadow-color: rgba(0, 0, 0, 0.1);
    
    /* Gradients */
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --primary-gradient-hover: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px var(--shadow-color);
    --shadow-md: 0 4px 6px var(--shadow-color);
    --shadow-lg: 0 10px 15px var(--shadow-color);
    --shadow-xl: 0 20px 25px var(--shadow-color);
    --shadow-2xl: 0 25px 50px rgba(0, 0, 0, 0.25);
    
    /* Glow Shadows */
    --shadow-glow-sm: 0 0 10px rgba(99, 102, 241, 0.3);
    --shadow-glow-md: 0 0 20px rgba(99, 102, 241, 0.4);
    --shadow-glow-lg: 0 0 30px rgba(99, 102, 241, 0.5);
}

/* Dark Theme */
[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-tertiary: #64748b;
    --border-primary: #334155;
    --border-secondary: #475569;
    --shadow-color: rgba(0, 0, 0, 0.3);
}

/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Noto Sans SC', 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', 'Heiti SC', 'WenQuanYi Micro Hei', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--transition-normal), color var(--transition-normal);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Theme Transition - Smooth theme switching */
body.theme-transitioning,
body.theme-transitioning * {
    transition: background-color 0.4s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease !important;
}

/* Container */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Links */
a {
    color: var(--primary-500);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-600);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
    color: white;
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-primary);
}

.btn-secondary:hover {
    border-color: var(--primary-500);
    color: var(--primary-500);
    transform: translateY(-2px);
}

.btn-full {
    width: 100%;
}

/* ===================================
   Particles Background
   =================================== */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

#particles-js {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* ===================================
   Navbar
   =================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    z-index: 1000;
    transition: all var(--transition-normal);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* 深色模式下的导航样式 */
[data-theme="light"] .navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 浅色模式下的导航样式，确保文字可见 */
[data-theme="light"] .navbar {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 浅色模式下的导航链接，保证颜色对比度 */
[data-theme="light"] .nav-link {
    color: #1f2937 !important;
    font-weight: 600;
}

[data-theme="light"] .nav-link:hover {
    color: var(--primary-600) !important;
}

[data-theme="light"] .nav-link.active {
    color: var(--primary-600) !important;
}

/* 浅色模式下的 Logo 颜色 */
[data-theme="light"] .logo {
    color: #1f2937 !important;
}

[data-theme="light"] .logo:hover {
    color: var(--primary-600) !important;
}

[data-theme="light"] .logo-stickman {
    color: var(--primary-600) !important;
}

/* 浅色模式下的汉堡菜单 */
[data-theme="light"] .hamburger {
    background: #1f2937 !important;
}

[data-theme="light"] .hamburger::before,
[data-theme="light"] .hamburger::after {
    background: #1f2937 !important;
}

/* 浅色模式下的下拉菜单 */
[data-theme="light"] .dropdown-menu {
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .dropdown-item {
    color: #1f2937;
}

[data-theme="light"] .dropdown-item:hover {
    background: #f1f5f9;
    color: var(--primary-600);
}

/* 浅色模式下的主题切换按钮 */
[data-theme="light"] .theme-toggle {
    border-color: #e2e8f0;
    color: #1f2937;
}

[data-theme="light"] .theme-toggle:hover {
    border-color: var(--primary-500);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 700;
    font-family: 'Noto Sans SC', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    transition: color var(--transition-fast);
}

.logo-text {
    font-family: 'Noto Sans SC', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

.logo:hover {
    color: var(--primary-500);
}

.logo-stickman,
.footer-stickman {
    width: 32px;
    height: 32px;
    color: var(--primary-500);
    transition: color var(--transition-fast);
}

.logo:hover .logo-stickman {
    color: var(--primary-600);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: color var(--transition-fast);
    padding: 8px 0;
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-500);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-500);
    border-radius: 2px;
}

/* Dropdown Menu */
.nav-dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
}

.dropdown-toggle i {
    font-size: 10px;
    transition: transform var(--transition-fast);
}

.nav-dropdown:hover .dropdown-toggle i {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-fast);
    z-index: 1001;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 12px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
    font-size: 14px;
}

.dropdown-item:hover {
    background: var(--bg-tertiary);
    color: var(--primary-500);
}

/* Theme Toggle Button */
.theme-toggle {
    background: transparent;
    border: 2px solid var(--border-primary);
    border-radius: var(--radius-full);
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all var(--transition-normal);
    color: var(--text-primary);
}

.theme-toggle:hover {
    border-color: var(--primary-500);
    transform: rotate(15deg);
}

.theme-toggle .fa-sun {
    display: none;
}

.theme-toggle .fa-moon {
    display: block;
}

[data-theme="dark"] .theme-toggle .fa-sun {
    display: block;
}

[data-theme="dark"] .theme-toggle .fa-moon {
    display: none;
}

/* Hamburger Menu Button */
.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    position: relative;
    transition: background var(--transition-fast);
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: transform var(--transition-normal);
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    top: 8px;
}

.nav-toggle.active .hamburger {
    background: transparent;
}

.nav-toggle.active .hamburger::before {
    transform: rotate(45deg) translate(5px, 6px);
}

.nav-toggle.active .hamburger::after {
    transform: rotate(-45deg) translate(5px, -6px);
}

/* ===================================
   Hero Section
   =================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: 70px;
}

/* 深色背景 */
.hero-bg-dark {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    opacity: 1;
    transition: opacity 0.3s ease;
    z-index: 0;
}

/* 浅色背景 */
.hero-bg-light {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e0e7ff 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

/* 浅色模式背景切换 */
[data-theme="light"] .hero-bg-dark {
    opacity: 0;
}

[data-theme="light"] .hero-bg-light {
    opacity: 1;
}

/* 确保内容位于背景之上 */
.hero-content,
.scroll-indicator {
    position: relative;
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 24px;
}

.hero-avatar {
    margin-bottom: 32px;
}

.avatar-wrapper {
    width: 200px;
    height: 200px;
    margin: 0 auto;
    border-radius: 50%;
    background: var(--primary-gradient);
    padding: 4px;
    box-shadow: var(--shadow-glow-lg);
    animation: avatar-float 3s ease-in-out infinite;
}

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

.stickman-avatar {
    width: 100%;
    height: 100%;
    background: var(--bg-secondary);
    border-radius: 50%;
    padding: 30px;
    color: var(--primary-500);
}

.stickman-head,
.stickman-body,
.stickman-arm,
.stickman-leg {
    animation: drawLine 1.5s ease forwards;
}

.stickman-eye {
    opacity: 0;
    animation: fadeIn 0.3s ease 1s forwards;
}

.stickman-smile {
    opacity: 0;
    animation: fadeIn 0.3s ease 1.2s forwards;
}

@keyframes drawLine {
    from {
        stroke-dasharray: 200;
        stroke-dashoffset: 200;
    }
    to {
        stroke-dasharray: 200;
        stroke-dashoffset: 0;
    }
}

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

.hero-title {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 16px;
    animation: fade-in-up 0.6s ease forwards;
}

.hero-title .chinese-name {
    color: var(--text-secondary);
    font-weight: 500;
}

.hero-slogan {
    font-size: clamp(16px, 2.5vw, 20px);
    color: var(--accent-500);
    margin-bottom: 40px;
    animation: fade-in-up 0.6s ease forwards 0.2s;
    opacity: 0;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 60px;
    animation: fade-in-up 0.6s ease forwards 0.4s;
    opacity: 0;
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    animation: bounce 2s infinite;
    z-index: 2;
}

.scroll-indicator i {
    font-size: 20px;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* ===================================
   Stats Section
   =================================== */
.stats-section {
    padding: 80px 0;
    background: var(--bg-secondary);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.stat-card {
    text-align: center;
    padding: 32px 24px;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.stat-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.stat-number {
    font-size: 48px;
    font-weight: 800;
    color: var(--primary-500);
    margin-bottom: 8px;
}

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

/* ===================================
   Services Section
   =================================== */
.services-section {
    padding: 80px 0;
    background: var(--bg-primary);
}

.section-title {
    font-size: clamp(28px, 4vw, 36px);
    font-weight: 700;
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 18px;
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 60px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.service-card {
    display: block;
    padding: 40px 32px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    text-decoration: none;
    transition: all var(--transition-normal);
    border: 1px solid var(--border-primary);
    color: inherit;
}

.service-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl), var(--shadow-glow-md);
    border-color: var(--primary-500);
}

.service-icon {
    font-size: 56px;
    margin-bottom: 24px;
}

.service-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.service-desc {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.service-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-500);
    font-weight: 500;
    font-size: 15px;
}

.service-link i {
    transition: transform var(--transition-fast);
}

.service-card:hover .service-link i {
    transform: translateX(5px);
}

/* ===================================
   Achievements Section
   =================================== */
.achievements-section {
    padding: 80px 0;
    background: var(--bg-secondary);
}

.achievements-carousel {
    position: relative;
    overflow: hidden;
    padding: 20px 0;
}

.carousel-track {
    display: flex;
    gap: 24px;
    transition: transform 0.5s ease;
}

.achievement-card {
    flex: 0 0 280px;
    padding: 32px;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    text-align: center;
}

.achievement-year {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.achievement-award {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-500);
    margin-bottom: 12px;
}

.achievement-student {
    font-size: 15px;
    color: var(--text-secondary);
}

.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-500);
    color: white;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    z-index: 10;
}

.carousel-prev:hover,
.carousel-next:hover {
    background: var(--primary-600);
    transform: translateY(-50%) scale(1.1);
}

.carousel-prev { left: 0; }
.carousel-next { right: 0; }

/* ===================================
   Contact Section
   =================================== */
.contact-section {
    padding: 80px 0;
    background: var(--bg-primary);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-top: 60px;
}

.contact-form {
    background: var(--bg-secondary);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 15px;
    transition: all var(--transition-fast);
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.contact-info h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 32px;
}

.contact-item {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    padding: 20px;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.contact-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
}

.contact-icon {
    font-size: 28px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-icon svg {
    width: 100%;
    height: 100%;
}

/* 飞书图标 - 应用图标样式 */
.contact-icon-feishu svg rect[x="3"] {
    filter: drop-shadow(0 2px 4px rgba(102, 126, 234, 0.3));
}

/* GitHub 图标样式 */
.contact-icon-github svg ellipse {
    filter: drop-shadow(0 2px 4px rgba(255, 154, 158, 0.3));
}

/* 邮箱图标样式 */
.contact-icon-email svg rect[x="2"] {
    filter: drop-shadow(0 2px 4px rgba(102, 126, 234, 0.2));
}

.contact-detail {
    flex: 1;
}

.contact-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.contact-value {
    font-size: 16px;
    color: var(--text-primary);
    font-weight: 500;
    word-break: break-all;
}

/* ===================================
   Footer
   =================================== */
.footer {
    background: var(--bg-secondary);
    padding: 60px 0 30px;
    border-top: 1px solid var(--border-primary);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 3fr 1fr;
    gap: 60px;
    margin-bottom: 40px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.footer-logo .logo-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.footer-slogan {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6;
}

.footer-column h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column li {
    margin-bottom: 12px;
}

.footer-column a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-column a:hover {
    color: var(--primary-500);
}

.footer-social {
    display: flex;
    gap: 12px;
}

.social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    border-radius: 50%;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.social-link:hover {
    background: var(--primary-500);
    color: white;
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--border-primary);
    color: var(--text-tertiary);
    font-size: 14px;
}

.footer-bottom i {
    color: var(--error);
}

/* ===================================
   Responsive Design
   =================================== */

/* Tablet */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
    
    .footer-social {
        grid-column: 1 / -1;
        justify-content: center;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 32px;
        transform: translateX(100%);
        transition: transform var(--transition-normal);
        z-index: 1000;
        overflow-y: auto;
    }
    
    .nav-menu.active {
        transform: translateX(0);
    }
    
    .nav-dropdown {
        width: 100%;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding-left: 20px;
        display: none;
        background: var(--bg-tertiary);
    }
    
    .nav-dropdown.active .dropdown-menu {
        display: block;
    }
    
    .hero {
        padding-top: 80px;
    }
    
    .hero-avatar {
        width: 150px;
        height: 150px;
    }
    
    .avatar-wrapper {
        width: 150px;
        height: 150px;
    }
    
    .hero-title {
        font-size: 28px;
    }
    
    .hero-slogan {
        font-size: 16px;
    }
    
    .hero-cta {
        flex-direction: column;
        gap: 12px;
    }
    
    .btn {
        width: 100%;
    }
    
    .services-grid,
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .achievement-card {
        flex: 0 0 260px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .hero-title {
        font-size: 24px;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .stats-section,
    .services-section,
    .achievements-section,
    .contact-section {
        padding: 60px 0;
    }
}

/* ===================================
   Animation Classes
   =================================== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===================================
   Page Header
   =================================== */
.page-header {
    padding: 120px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* 深色背景 */
.page-header-bg-dark {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    opacity: 1;
    transition: opacity 0.3s ease;
    z-index: 0;
}

/* 浅色背景 */
.page-header-bg-light {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e0e7ff 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

/* 浅色模式背景切换 */
[data-theme="light"] .page-header-bg-dark {
    opacity: 0;
}

[data-theme="light"] .page-header-bg-light {
    opacity: 1;
}

/* 确保内容位于背景之上 */
.page-header .container,
.page-header .section-title,
.page-header .page-title,
.page-header .page-subtitle {
    position: relative;
    z-index: 1;
}

.page-title {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 16px;
    animation: fade-in-up 0.6s ease forwards;
}

/* 浅色模式页面标题颜色 */
[data-theme="light"] .page-title {
    color: #1e293b;
}

.page-subtitle {
    font-size: clamp(16px, 2.5vw, 20px);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    animation: fade-in-up 0.6s ease forwards 0.2s;
    opacity: 0;
}

/* 浅色模式页面副标题颜色 */
[data-theme="light"] .page-subtitle {
    color: #475569;
}

/* About Page */
.about-section {
    padding: 80px 0;
    background: var(--bg-primary);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    align-items: center;
}

.about-image {
    display: flex;
    justify-content: center;
}

.avatar-large {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: var(--primary-gradient);
    padding: 6px;
    box-shadow: var(--shadow-glow-lg);
}

.avatar-large .stickman-avatar {
    width: 100%;
    height: 100%;
    background: var(--bg-secondary);
    border-radius: 50%;
    padding: 40px;
    color: var(--primary-500);
}

.section-title-left {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
}

.about-intro {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-weight: 500;
}

.about-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 24px;
}

.about-list li {
    padding: 8px 0 8px 24px;
    position: relative;
    color: var(--text-secondary);
    line-height: 1.6;
}

.about-list li::before {
    content: '';
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: 600;
}

.about-highlight {
    font-size: 20px;
    font-weight: 600;
    color: var(--accent-500);
    margin: 24px 0;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--accent-500);
}

.about-goal {
    font-weight: 500;
    color: var(--primary-500);
    margin: 20px 0;
}

.about-fun {
    color: var(--text-secondary);
    font-style: italic;
    margin-top: 24px;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

/* Experience Timeline */
.experience-section {
    padding: 80px 0;
    background: var(--bg-secondary);
}

.section-title-center {
    font-size: clamp(28px, 4vw, 36px);
    font-weight: 700;
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 60px;
}

.timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary-500);
}

.timeline-item {
    display: flex;
    gap: 24px;
    margin-bottom: 40px;
    position: relative;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-marker {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-500);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    box-shadow: var(--shadow-glow-md);
    z-index: 1;
}

.timeline-content {
    flex: 1;
    background: var(--bg-primary);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.timeline-content h3 {
    font-size: 16px;
    color: var(--primary-500);
    font-weight: 600;
    margin-bottom: 8px;
}

.timeline-content h4 {
    font-size: 18px;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 12px;
}

.timeline-content p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Philosophy Section */
.philosophy-section {
    padding: 80px 0;
    background: var(--bg-primary);
}

.philosophy-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.philosophy-card {
    text-align: center;
    padding: 32px 24px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
}

.philosophy-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.philosophy-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.philosophy-card h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.philosophy-card p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* CTA Section */
.cta-section {
    padding: 100px 0;
    background: var(--primary-gradient);
    text-align: center;
}

.cta-section h2 {
    font-size: clamp(28px, 4vw, 36px);
    font-weight: 700;
    color: white;
    margin-bottom: 16px;
}

.cta-section p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
}

.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-section .btn-primary {
    background: white;
    color: var(--primary-600);
}

.cta-section .btn-primary:hover {
    background: var(--bg-light);
    transform: scale(1.05);
    color: var(--primary-600);
}

.cta-section .btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.cta-section .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Service Detail Page */
.service-detail-section {
    padding: 80px 0;
    background: var(--bg-primary);
}

.service-detail-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.service-detail-card {
    background: var(--bg-secondary);
    padding: 40px 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
}

.service-detail-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.service-detail-card h2 {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.service-detail-card h2 i {
    color: var(--primary-500);
    font-size: 28px;
}

.service-detail-card p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.service-detail-card ul {
    list-style: none;
    padding-left: 0;
}

.service-detail-card ul li {
    padding: 8px 0 8px 24px;
    position: relative;
    color: var(--text-secondary);
    font-size: 14px;
}

.service-detail-card ul li::before {
    content: '';
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: 600;
}

/* Course Roadmap and FAQ */
.roadmap-section {
    padding: 0 0 80px;
    background: var(--bg-primary);
}

.roadmap-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.roadmap-card {
    padding: 28px 24px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.roadmap-stage {
    display: inline-block;
    margin-bottom: 14px;
    color: var(--primary-500);
    font-size: 13px;
    font-weight: 700;
}

.roadmap-card h3 {
    margin-bottom: 10px;
    color: var(--text-primary);
    font-size: 20px;
}

.roadmap-card p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.7;
}

.faq-section {
    padding: 80px 0;
    background: var(--bg-secondary);
}

.faq-list {
    max-width: 860px;
    margin: 0 auto;
}

.faq-item {
    padding: 22px 24px;
    margin-bottom: 14px;
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
}

.faq-item summary {
    color: var(--text-primary);
    cursor: pointer;
    font-size: 17px;
    font-weight: 600;
}

.faq-item p {
    margin: 16px 0 0;
    color: var(--text-secondary);
    line-height: 1.8;
}

.article-section {
    padding: 80px 0;
    background: var(--bg-primary);
}

.article-shell {
    max-width: 860px;
    margin: 0 auto;
    padding: 48px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.article-shell h2 {
    margin: 36px 0 14px;
    color: var(--text-primary);
    font-size: 26px;
}

.article-shell h2:first-child {
    margin-top: 0;
}

.article-shell p,
.article-shell li {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.9;
}

.article-shell ul {
    padding-left: 24px;
}

.roadmap-table {
    width: 100%;
    margin: 24px 0;
    border-collapse: collapse;
}

.roadmap-table th,
.roadmap-table td {
    padding: 14px 16px;
    border: 1px solid var(--border-primary);
    color: var(--text-secondary);
    text-align: left;
    vertical-align: top;
}

.roadmap-table th {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

@media (max-width: 768px) {
    .article-shell {
        padding: 28px 20px;
    }

    .roadmap-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* Contact Page */
.contact-page-section {
    padding: 80px 0;
    background: var(--bg-primary);
}

/* v2.3 Consultation Flow */
.consultation-context {
    padding: 14px 16px;
    margin-bottom: 24px;
    color: var(--text-secondary);
    background: rgba(99, 102, 241, 0.08);
    border-left: 3px solid var(--primary-500);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 14px;
    line-height: 1.7;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-row .form-group {
    min-width: 0;
}

.form-note,
.form-privacy,
.form-status {
    margin: 14px 0 0;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.7;
}

.form-privacy a {
    color: var(--primary-500);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.form-status.success {
    color: var(--success-color, #22c55e);
}

.contact-value-action {
    display: flex;
    align-items: center;
    gap: 12px;
}

.copy-button {
    padding: 5px 10px;
    color: var(--primary-500);
    background: transparent;
    border: 1px solid var(--primary-500);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    transition: all var(--transition-fast);
}

.copy-button:hover,
.copy-button.copied {
    color: #fff;
    background: var(--primary-500);
}

.consultation-steps {
    margin-top: 36px;
    padding: 24px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
}

.consultation-steps h3 {
    margin-bottom: 20px;
    font-size: 20px;
}

.consultation-steps ol {
    display: grid;
    gap: 18px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.consultation-steps li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.consultation-steps li > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    color: #fff;
    background: var(--primary-500);
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
}

.consultation-steps strong,
.consultation-steps small {
    display: block;
}

.consultation-steps strong {
    margin-bottom: 3px;
    color: var(--text-primary);
    font-size: 15px;
}

.consultation-steps small {
    color: var(--text-secondary);
    font-size: 13px;
}

.mobile-consultation-cta {
    position: fixed;
    z-index: 20;
    right: 24px;
    bottom: 24px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 18px;
    color: #fff;
    background: var(--primary-500);
    border-radius: 999px;
    box-shadow: 0 10px 28px rgba(99, 102, 241, 0.35);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.mobile-consultation-cta:hover {
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 14px 32px rgba(99, 102, 241, 0.45);
}

/* v2.4 Trust and content sections */
.about-facts-section,
.school-overview-section,
.school-process-section {
    padding: 72px 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-primary);
    border-bottom: 1px solid var(--border-primary);
}

.about-facts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.about-fact {
    padding: 24px;
    text-align: center;
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
}

.about-fact strong,
.about-fact span {
    display: block;
}

.about-fact strong {
    margin-bottom: 8px;
    color: var(--primary-500);
    font-size: 28px;
}

.about-fact span,
.about-facts-note,
.about-credentials {
    color: var(--text-secondary);
}

.about-facts-note,
.about-credentials {
    margin: 20px 0 0;
    font-size: 13px;
    text-align: center;
}

.about-credentials i {
    color: var(--primary-500);
    margin-right: 6px;
}

.school-overview-section {
    background: var(--bg-primary);
}

.school-overview-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 64px;
    align-items: center;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 14px;
    color: var(--primary-500);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.school-overview-grid h2 {
    max-width: 620px;
    margin-bottom: 18px;
    color: var(--text-primary);
    font-size: clamp(26px, 3vw, 40px);
    line-height: 1.25;
}

.school-overview-grid p {
    max-width: 620px;
    color: var(--text-secondary);
    line-height: 1.9;
}

.school-overview-facts {
    display: grid;
    gap: 14px;
}

.school-overview-facts > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 22px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
}

.school-overview-facts strong {
    color: var(--primary-500);
    font-size: 22px;
}

.school-overview-facts span {
    color: var(--text-secondary);
    font-size: 14px;
}

.school-process-section {
    background: var(--bg-primary);
}

.school-process-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 42px;
}

.school-process-step {
    padding: 24px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
}

.school-process-step > span {
    display: inline-block;
    margin-bottom: 22px;
    color: var(--primary-500);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.school-process-step h3 {
    margin-bottom: 10px;
    color: var(--text-primary);
    font-size: 20px;
}

.school-process-step p,
.school-disclosure {
    color: var(--text-secondary);
    line-height: 1.8;
}

.school-disclosure {
    margin: 26px 0 0;
    font-size: 13px;
    text-align: center;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .contact-form {
        padding: 24px 20px;
    }

    .mobile-consultation-cta {
        right: 16px;
        bottom: 16px;
        padding: 12px 16px;
    }

    .about-facts-grid,
    .school-process-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .school-overview-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

/* Document Center */
.docs-section {
    padding: 80px 0;
    background: var(--bg-primary);
}

.docs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.doc-category {
    background: var(--bg-secondary);
    padding: 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
}

.doc-category:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.doc-category-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.doc-category h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.doc-category > p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.doc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.doc-list li {
    margin-bottom: 12px;
}

.doc-list a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 8px;
}

.doc-list a::before {
    content: '';
    font-size: 12px;
}

.doc-list a:hover {
    color: var(--primary-500);
}

/* Blog Page */
.blog-section {
    padding: 80px 0;
    background: var(--bg-primary);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.blog-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.blog-card-image {
    height: 180px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-placeholder {
    font-size: 0;
    opacity: 0.8;
    color: var(--primary-400);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* Blog card icons using CSS background images (SVG) */
.blog-card:nth-child(1) .blog-placeholder::before {
    content: '';
    display: block;
    width: 64px;
    height: 64px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Crect x='8' y='16' width='48' height='32' rx='4' fill='%23818cf8'/%3E%3Crect x='12' y='20' width='40' height='24' fill='%230f172a'/%3E%3Crect x='20' y='48' width='24' height='4' fill='%23818cf8'/%3E%3C/svg%3E");
}

.blog-card:nth-child(2) .blog-placeholder::before {
    content: '';
    display: block;
    width: 64px;
    height: 64px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M32 4 L38 20 L56 20 L42 32 L48 52 L32 40 L16 52 L22 32 L8 20 L26 20 Z' fill='%23f97316'/%3E%3C/svg%3E");
}

.blog-card:nth-child(3) .blog-placeholder::before {
    content: '';
    display: block;
    width: 64px;
    height: 64px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M32 8 L56 24 L56 56 L8 56 L8 24 Z' fill='none' stroke='%23818cf8' stroke-width='3'/%3E%3Cpath d='M32 8 L32 32 M20 40 L44 40 M32 32 L32 56' stroke='%23818cf8' stroke-width='3'/%3E%3C/svg%3E");
}

.blog-card:nth-child(4) .blog-placeholder::before {
    content: '';
    display: block;
    width: 64px;
    height: 64px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Crect x='16' y='12' width='32' height='40' rx='2' fill='%23818cf8'/%3E%3Crect x='20' y='16' width='24' height='32' fill='%230f172a'/%3E%3Cline x1='24' y1='24' x2='40' y2='24' stroke='%23818cf8' stroke-width='2'/%3E%3Cline x1='24' y1='32' x2='40' y2='32' stroke='%23818cf8' stroke-width='2'/%3E%3Cline x1='24' y1='40' x2='36' y2='40' stroke='%23818cf8' stroke-width='2'/%3E%3C/svg%3E");
}

.blog-card:nth-child(5) .blog-placeholder::before {
    content: '';
    display: block;
    width: 64px;
    height: 64px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Ccircle cx='32' cy='20' r='12' fill='%23818cf8'/%3E%3Crect x='24' y='32' width='16' height='24' fill='%23818cf8'/%3E%3C/svg%3E");
}

.blog-card:nth-child(6) .blog-placeholder::before {
    content: '';
    display: block;
    width: 64px;
    height: 64px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M32 8 C32 8 48 24 48 36 C48 48 40 56 32 56 C24 56 16 48 16 36 C16 24 32 8 32 8 Z' fill='%23f97316'/%3E%3Cpath d='M32 56 L28 60 M32 56 L36 60 M28 48 L24 52 M36 48 L40 52' stroke='%23f97316' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E");
}

.blog-card-content {
    padding: 24px;
}

.blog-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.blog-category {
    background: var(--primary-100);
    color: var(--primary-600);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 500;
}

[data-theme="dark"] .blog-category {
    background: var(--primary-900);
    color: var(--primary-300);
}

.blog-date {
    font-size: 13px;
    color: var(--text-tertiary);
}

.blog-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.4;
}

.blog-excerpt {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--border-primary);
}

.read-more {
    color: var(--primary-500);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: gap var(--transition-fast);
}

.read-more:hover {
    gap: 10px;
}

.blog-tags {
    display: flex;
    gap: 8px;
}

.tag {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 48px;
}

.page-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
    font-size: 14px;
}

.page-link:hover,
.page-link.active {
    background: var(--primary-500);
    color: white;
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .docs-grid,
    .blog-grid,
    .roadmap-grid,
    .service-detail-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .docs-grid,
    .blog-grid,
    .roadmap-grid,
    .service-detail-content {
        grid-template-columns: 1fr;
    }
}

/* ===================================
   Print Styles
   =================================== */
@media print {
    .navbar,
    .particles,
    #particles-js,
    .scroll-indicator,
    .theme-toggle,
    .nav-toggle {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .hero {
        min-height: auto;
        padding: 2rem 0;
    }
    
    section {
        page-break-inside: avoid;
    }
}

/* ===================================
   Student Submission and Review
   =================================== */
.submission-section,
.review-section {
    padding: 64px 0 96px;
}

.submission-intro {
    max-width: 760px;
    margin-bottom: 36px;
}

.submission-intro h2 {
    margin: 10px 0 12px;
}

.eyebrow {
    color: var(--primary-400);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.submission-form {
    padding: 32px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.submission-fields,
.submission-editor-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 24px;
}

.submission-wide {
    grid-column: 1 / -1;
}

.submission-editor-grid {
    margin-top: 8px;
}

.submission-editor-grid textarea {
    min-height: 390px;
    resize: vertical;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    line-height: 1.7;
}

.markdown-preview {
    min-height: 390px;
    overflow: auto;
    padding: 16px 18px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    line-height: 1.75;
}

.markdown-preview h1,
.markdown-preview h2,
.markdown-preview h3 {
    margin: 0 0 12px;
}

.markdown-preview p,
.markdown-preview ul,
.markdown-preview pre {
    margin: 0 0 14px;
}

.markdown-preview code,
.review-content {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.markdown-preview code {
    padding: 2px 5px;
    color: var(--primary-300);
    background: rgba(99, 102, 241, .12);
    border-radius: 4px;
}

.markdown-preview pre,
.review-content {
    padding: 14px;
    overflow: auto;
    background: rgba(0, 0, 0, .18);
    border-radius: var(--radius-md);
}

.preview-empty {
    color: var(--text-muted);
}

.submission-actions,
.review-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.submission-status {
    min-height: 24px;
    margin: 18px 0 0;
}

.submission-status[data-state="success"] { color: #6ee7b7; }
.submission-status[data-state="error"] { color: #fca5a5; }
.submission-note { color: var(--text-muted); font-size: 13px; }

.review-warning {
    margin-bottom: 24px;
    padding: 16px 18px;
    color: #fcd34d;
    background: rgba(245, 158, 11, .1);
    border: 1px solid rgba(245, 158, 11, .35);
    border-radius: var(--radius-md);
}

.review-connection {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 0 18px;
    align-items: end;
    margin-bottom: 28px;
    padding: 24px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}
.review-connection .form-group { margin-bottom: 0; }
.review-connection .submission-status { grid-column: 1 / -1; margin-bottom: 0; }

.review-list { display: grid; gap: 20px; }

.review-card {
    padding: 24px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.review-card-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.review-card h2 { margin: 12px 0 8px; }
.review-card p { color: var(--text-muted); }
.review-status { color: var(--primary-300); white-space: nowrap; }
.review-card details { margin: 20px 0; }
.review-card summary { cursor: pointer; color: var(--primary-300); }
.review-content { white-space: pre-wrap; max-height: 360px; }
.empty-state { text-align: center; padding: 64px 24px; background: var(--bg-secondary); border-radius: var(--radius-lg); }

.markdown-guide-section { padding: 0 0 96px; }
.markdown-guide-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 28px 32px;
    background: linear-gradient(135deg, rgba(99, 102, 241, .14), rgba(139, 92, 246, .08));
    border: 1px solid rgba(129, 140, 248, .35);
    border-radius: var(--radius-lg);
}
.markdown-guide-card h2 { margin: 8px 0; }
.markdown-guide-card p { margin: 0; color: var(--text-secondary); }
.article-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.article-shell blockquote { margin: 24px 0; padding: 16px 20px; color: var(--text-secondary); border-left: 3px solid var(--primary-500); background: rgba(99, 102, 241, .08); }
.article-shell pre { overflow: auto; padding: 16px; background: rgba(0, 0, 0, .2); border-radius: var(--radius-md); }
.article-shell pre code { color: var(--text-secondary); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; line-height: 1.7; }

@media (max-width: 768px) {
    .markdown-guide-card { display: block; padding: 24px; }
    .markdown-guide-card .btn { display: inline-flex; margin-top: 20px; }
}

@media (max-width: 768px) {
    .submission-form { padding: 20px; }
    .submission-fields,
    .submission-editor-grid { grid-template-columns: 1fr; }
    .submission-wide { grid-column: auto; }
    .review-card-header { display: block; }
    .review-status { display: inline-block; margin-top: 12px; }
    .review-connection { grid-template-columns: 1fr; gap: 0; }
    .review-connection .form-group { margin-bottom: 18px; }
    .review-connection .submission-status { grid-column: auto; }
}

/* Student-published articles */
.student-work-header,
.curated-blog-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.student-work-header h2,
.curated-blog-header h2 { margin: 8px 0; }
.student-work-header p,
.curated-blog-header p { color: var(--text-secondary); }
.curated-blog-header { margin-top: 72px; }
.student-articles-status { margin-bottom: 24px; color: var(--text-secondary); }
.student-articles-status:empty { display: none; }
.student-articles-status[data-state="error"] { color: #ef4444; }

.student-card-accent {
    min-height: 92px;
    display: flex;
    align-items: flex-end;
    padding: 20px 24px;
    color: var(--primary-300);
    background: linear-gradient(135deg, rgba(99, 102, 241, .22), rgba(249, 115, 22, .08));
    border-bottom: 1px solid var(--border-primary);
}

.student-card-accent span {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
}

.student-author {
    margin-bottom: 16px;
    color: var(--text-tertiary);
    font-size: 13px;
}

.student-article-page {
    min-height: 100vh;
    padding: 132px 0 80px;
    background: var(--bg-primary);
}

.student-article-container { max-width: 900px; }
.article-back-link { display: inline-block; margin-bottom: 24px; color: var(--primary-400); text-decoration: none; }

.published-article {
    padding: clamp(24px, 5vw, 56px);
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.published-article-header {
    padding-bottom: 28px;
    margin-bottom: 32px;
    border-bottom: 1px solid var(--border-primary);
}

.published-article-header h1 {
    margin: 18px 0 12px;
    font-size: clamp(32px, 5vw, 52px);
    line-height: 1.2;
}

.published-article-header p { color: var(--text-secondary); }
.article-problem-link { display: inline-block; margin-top: 16px; color: var(--primary-400); font-weight: 600; text-decoration: none; }

.published-article-content.markdown-preview {
    min-height: auto;
    padding: 0;
    overflow: visible;
    background: transparent;
    border: 0;
}

.published-article-content h1 { margin-top: 36px; font-size: 30px; }
.published-article-content h2 { margin-top: 32px; font-size: 24px; }
.published-article-content h3 { margin-top: 28px; font-size: 20px; }
.published-article-content p,
.published-article-content li { font-size: 17px; line-height: 1.9; }
.published-article-content ul { padding-left: 24px; }
.article-loading,
.article-error { padding: 64px 16px; color: var(--text-secondary); text-align: center; }
.article-error h1 { margin-bottom: 12px; color: var(--text-primary); }
.article-error .btn { margin-top: 20px; }

@media (max-width: 768px) {
    .student-work-header,
    .curated-blog-header { display: block; }
    .student-work-header .btn { margin-top: 18px; }
    .student-article-page { padding-top: 104px; }
}
