@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap'); /* 像素风格 */
@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');         /* 复古终端风格 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC&display=swap');

/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 日间模式变量 */
    --left-bg: #ADD8E6;  /* 浅蓝色背景 */
    --right-bg: #ffffff; /* 白色背景 */
    --text-primary: #333333;
    --text-secondary: #666666;
    --accent-color: #FF7F50; /* 强调色 */
    --shadow-color: rgba(0, 0, 0, 0.1);
    --pixel-font: 'Press Start 2P', 'Noto Sans SC', sans-serif;    /* 像素风格 */
    --terminal-font: 'VT323', 'Noto Sans SC', monospace;        /* 终端风格 */
}

/* 暗黑模式 */
[data-theme="dark"] {
    --left-bg: #1a1a4a;     /* 深蓝色背景 */
    --right-bg: #2d2d2d;    /* 深灰色背景 */
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --shadow-color: rgba(0, 0, 0, 0.2);
}

body {
    margin: 0;
    font-family: var(--terminal-font);  /* 使用终端风格作为基础字体 */
    overflow-x: hidden;
}

/* 主容器 */
.container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: linear-gradient(
        to bottom,
        var(--right-bg) 0%,
        var(--right-bg) 45%,
        var(--left-bg) 55%,
        var(--left-bg) 100%
    );
}

/* 上部区域 - 白色背景 */
.top-section {
    width: 100%;
    height: 50vh;  /* 占据视口高度的一半 */
    position: relative;
    background: transparent; /* 移除原来的背景色 */
    transition: background-color 0.3s ease;
}

/* 下部内容区域 */
.bottom-section {
    width: 100%;
    padding: 2rem;
    margin-top: 2rem;  /* 与个人信息卡片保持距离 */
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.8);  /* 日间模式背景色 */
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;  /* 添加过渡效果 */
}

/* 暗色模式下的导航栏样式 */
[data-theme="dark"] .navbar {
    background: rgba(26, 26, 74, 0.8);  /* 深蓝色背景，保持半透明 */
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .top-section,
    .bottom-section {
        height: 50vh;
    }
    
    .profile-container {
        width: 90%;
        max-width: 320px;
        padding: 2rem;
    }
} 

/* 个人信息卡片容器 */
.profile-container {
    position: relative;
    width: 320px;
    margin: 120px auto 0;  /* 调整顶部间距，避免被导航栏遮挡 */
    padding: 2.5rem;
    text-align: center;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.2),
        rgba(173, 216, 230, 0.2)
    );
    backdrop-filter: blur(15px);
    border-radius: 20px;
    box-shadow: 
        0 -8px 16px rgba(255, 255, 255, 0.2),
        0 8px 16px rgba(173, 216, 230, 0.2);
}

.avatar {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    margin: 0 auto 1.8rem;
    border: 4px solid rgba(255, 255, 255, 0.8);
    box-shadow: 
        0 0 20px var(--shadow-color),
        inset 0 0 20px rgba(255, 255, 255, 0.5);
    background-image: url('../images/5379a3792aa029f302db7ac9a33daf8.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(0.8);
    animation: popIn 0.6s ease 0.3s forwards;
}

.name {
    font-family: var(--pixel-font);
    font-size: 1.5rem;        /* 调小一点避免中文换行 */
    line-height: 1.5;         /* 增加行高改善中文显示 */
    letter-spacing: 0;        /* 移除字间距 */
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: typeWriter 1s steps(20) 0.8s forwards;
}

.email, .location {
    font-family: var(--terminal-font);
    font-size: 1.2rem;
    line-height: 1.4;
    color: var(--text-secondary);
    margin: 0.5rem 0;
    opacity: 0;
    animation: fadeIn 0.5s ease 1.5s forwards;
}

/* 导航栏美化 */
.nav-links a {
    font-family: var(--terminal-font);
    font-size: 1.1rem;
    color: var(--text-primary);
    text-decoration: none;
    margin: 0 1rem;
    padding: 0.5rem;
    position: relative;
    transition: color 0.3s ease;
}

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

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

/* 主题切换按钮 */
.nav-controls button {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    margin: 0 0.5rem;
    transition: transform 0.3s ease;
}

.nav-controls button:hover {
    transform: scale(1.1);
}

/* 动画关键帧 */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes popIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes typeWriter {
    from {
        width: 0;
        opacity: 1;
    }
    to {
        width: 100%;
        opacity: 1;
    }
}

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

/* 移动端优化 */
@media (max-width: 768px) {
    .navbar {
        padding: 0.8rem;
    }
    
    .nav-links {
        display: none;
    }
    
    .nav-links.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--right-bg);
        padding: 1rem;
    }
    
    .hamburger {
        display: block;
    }
    
    .profile-container {
        width: 90%;
        max-width: 320px;
        padding: 2rem;
    }
    
    .avatar {
        width: 110px;
        height: 110px;
    }
} 

/* 添加玻璃拟态效果 */
.profile-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.1) 0%,
        rgba(255, 255, 255, 0.05) 50%,
        rgba(255, 255, 255, 0.1) 100%
    );
    z-index: -1;
}

/* 调整暗色模式下的样式 */
[data-theme="dark"] .profile-container {
    background: linear-gradient(
        to bottom,
        rgba(45, 45, 45, 0.2),
        rgba(26, 26, 74, 0.2)
    );
    box-shadow: 
        0 -8px 16px rgba(45, 45, 45, 0.2),
        0 8px 16px rgba(26, 26, 74, 0.2);
}

[data-theme="dark"] .profile-container::before {
    border-color: rgba(255, 255, 255, 0.05);
    background: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.05),
        rgba(255, 255, 255, 0.02)
    );
}

/* 页脚样式 - 添加到文件末尾 */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    font-size: 0.9rem;
    z-index: 100;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-left {
    color: var(--text-secondary);
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-right a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-right a:hover {
    color: var(--accent-color);
}

.footer-separator {
    color: var(--text-secondary);
    opacity: 0.5;
}

/* 暗色模式适配 */
[data-theme="dark"] .footer {
    background: rgba(45, 45, 45, 0.8);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
        padding: 0.5rem 1rem;
    }
    
    .footer {
        padding: 0.5rem 0;
    }
} 

/* 调整暗色模式 */
[data-theme="dark"] .container {
    background: linear-gradient(
        to bottom,
        var(--right-bg) 0%,
        var(--right-bg) 45%,
        var(--left-bg) 55%,
        var(--left-bg) 100%
    );
}

/* 移动端适配 */
@media (max-width: 768px) {
    .container {
        background: linear-gradient(
            to bottom,
            var(--right-bg) 0%,
            var(--right-bg) 45%,
            var(--left-bg) 55%,
            var(--left-bg) 100%
        );
    }
} 

/* 移动端菜单样式也需要调整 */
@media (max-width: 768px) {
    .nav-links.active {
        background: var(--right-bg);  /* 使用变量确保与主题一致 */
    }
    
    [data-theme="dark"] .nav-links.active {
        background: rgba(26, 26, 74, 0.95);  /* 深蓝色背景，更不透明 */
    }
} 

/* About Me 容器样式 */
.about-container {
    background: linear-gradient(
        to bottom,
        rgba(173, 216, 230, 0.2),
        rgba(255, 255, 255, 0.2)
    );
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 2rem;
    height: auto;
    min-height: 300px;  /* 确保最小高度一致 */
}

.about-title {
    font-family: var(--pixel-font);
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    text-align: center;
}

.about-content {
    max-height: 250px;  /* 限制内容区域高度 */
    overflow-y: auto;
    padding-right: 1rem;
    color: var(--text-primary);  /* 使用主文本颜色变量 */
}

/* 暗色模式适配 */
[data-theme="dark"] .about-container {
    background: linear-gradient(
        to bottom,
        rgba(26, 26, 74, 0.2),
        rgba(45, 45, 45, 0.2)
    );
}

/* 移动端适配 */
@media (max-width: 768px) {
    .profile-container {
        width: 90%;
        max-width: 320px;
        margin-top: 100px;
        padding: 1.5rem;
    }

    .content-grid {
        grid-template-columns: 1fr;
        padding: 0 1rem;
        gap: 1.5rem;
    }

    .bottom-section {
        padding: 1rem;
    }

    .about-container,
    .timeline-container {
        padding: 1.5rem;
        min-height: 250px;
    }
} 

/* 动态日志容器样式 */
.timeline-container {
    background: linear-gradient(
        to bottom,
        rgba(173, 216, 230, 0.2),
        rgba(255, 255, 255, 0.2)
    );
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 2rem;
    height: auto;
    min-height: 300px;  /* 确保最小高度一致 */
}

.timeline-title {
    font-family: var(--pixel-font);
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    text-align: center;
}

.timeline-content {
    max-height: 250px;  /* 限制内容区域高度 */
    overflow-y: auto;
    padding-right: 1rem;
}

.timeline-item {
    display: flex;
    gap: 1rem;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin-bottom: 0.8rem;
}

.timeline-date {
    font-size: 0.9rem;
    color: var(--text-secondary);
    min-width: 100px;
}

.timeline-text {
    flex: 1;
    color: var(--text-primary);
}

/* 暗色模式适配 */
[data-theme="dark"] .timeline-container {
    background: linear-gradient(
        to bottom,
        rgba(26, 26, 74, 0.2),
        rgba(45, 45, 45, 0.2)
    );
}

[data-theme="dark"] .timeline-item {
    background: rgba(26, 26, 74, 0.3);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .timeline-container {
        padding: 1.5rem;
    }

    .timeline-title {
        font-size: 1.5rem;
    }

    .timeline-item {
        flex-direction: column;
        gap: 0.5rem;
    }

    .timeline-date {
        min-width: auto;
    }
} 

/* 内容网格布局 */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;  /* 左右等宽布局 */
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* 滚动条美化 */
.about-content::-webkit-scrollbar,
.timeline-content::-webkit-scrollbar {
    width: 4px;
}

.about-content::-webkit-scrollbar-thumb,
.timeline-content::-webkit-scrollbar-thumb {
    background-color: var(--accent-color);
    border-radius: 2px;
}

.about-content::-webkit-scrollbar-track,
.timeline-content::-webkit-scrollbar-track {
    background: transparent;
} 