/* 基础重置 */
:root {
    /* 亮色系主题配色 */
    --bg-color: #f8f9fa;
    --text-main: #2d3748;
    --text-secondary: #718096;
    --accent-primary: #667eea; /* 柔和的靛蓝 */
    --accent-secondary: #764ba2; /* 柔和的紫 */
    --accent-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --card-bg: rgba(255, 255, 255, 0.7);
    --card-border: rgba(255, 255, 255, 0.8);
    --shadow-soft: 0 10px 30px -10px rgba(0, 0, 0, 0.08);
    --highlight: #3182ce;
    --code-bg: #1a202c; /* 终端保持深色以保证对比度 */
    --code-text: #e2e8f0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(102, 126, 234, 0.08), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(118, 75, 162, 0.08), transparent 25%);
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.6;
}

/* 动态背景网格 */
.grid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(100, 100, 100, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(100, 100, 100, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -1;
    pointer-events: none;
}

/* Canvas 粒子容器 */
#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* 通用布局 */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

/* 首页特定样式 */
.hero-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 4rem 0;
}

.logo {
    font-size: 4.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -2px;
    position: relative;
}

/* 故障效果 (Glitch) 动画 */
@keyframes glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

.logo:hover {
    animation: glitch 0.3s cubic-bezier(.25, .46, .45, .94) both infinite;
}

.tagline {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 500;
}

/* 拟态终端 */
.terminal {
    background: var(--code-bg);
    color: var(--code-text);
    padding: 1.5rem;
    border-radius: 12px;
    font-family: 'Fira Code', 'Consolas', monospace;
    text-align: left;
    width: 100%;
    max-width: 550px;
    margin-bottom: 3rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    transition: transform 0.1s ease-out; /* 平滑跟随鼠标 */
}

.terminal-header {
    display: flex;
    gap: 8px;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.dot.red { background: #ff5f57; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #28ca41; }

.terminal-line {
    margin-bottom: 0.5rem;
    min-height: 1.5rem;
    display: flex;
    align-items: flex-start;
}

.prompt { color: #48bb78; margin-right: 10px; font-weight: bold; }
.cmd { color: #63b3ed; }
.output { color: #a0aec0; margin-left: 20px; }

/* 迷你板块 */
.section-mini {
    margin-bottom: 2rem;
    width: 100%;
    max-width: 600px;
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.skill-tag {
    background: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
    transition: all 0.2s;
}

.skill-tag:hover {
    background: var(--accent-primary);
    color: white;
    transform: translateY(-2px);
}

.hobbies-grid-mini {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.hobby-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.6);
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 0.9rem;
    color: var(--text-main);
    cursor: default;
    transition: all 0.2s;
}

.hobby-item:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.contact-area {
    margin-top: 1rem;
}

.btn {
    text-decoration: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(5px);
}

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

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

/* 页脚 */
footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
    opacity: 0.7;
    position: absolute;
    bottom: 0;
    width: 100%;
}

footer a { color: inherit; text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* 响应式适配 */
@media (max-width: 768px) {
    .logo { font-size: 3.5rem; }
    .container { padding: 1.5rem; }
    .terminal { margin: 0 1rem 2rem; }
}
