/* style.css */

/* 字体声明 */
@font-face {
    font-family: 'Lexend';
    src: url('fonts/Lexend-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Lexend';
    src: url('fonts/Lexend-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Lexend';
    src: url('fonts/Lexend-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Lexend';
    src: url('fonts/Lexend-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Lexend';
    src: url('fonts/Lexend-Thin.ttf') format('truetype');
    font-weight: 100;
    /* Thin */
    font-style: normal;
    font-display: swap;
}

/* 添加 Lexend-ExtraLight 字体声明 */
@font-face {
    font-family: 'Lexend';
    src: url('fonts/Lexend-ExtraLight.ttf') format('truetype');
    font-weight: 200;
    /* Extra Light */
    font-style: normal;
    font-display: swap;
}



:root {
    /* 浅色模式变量 */
    --background-light: #ffffff;
    --background-dark: #f5f5f7;
    --text-color: #1d1d1f;
    --secondary-text-color: #86868b;
    --accent-color: #0066cc;
    --border-color: #d2d2d7;
    --card-background: #ffffff;
    --card-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --hover-color: #f5f5f7;
    --font-family: 'Lexend', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;

    /* 亮色模式变量 */
    --primary-color: #007AFF;
    /* Apple 蓝色 */
    --link-hover-color: #0066CC;
    /* 链接悬停色 */
    --shadow-color-light: rgba(0, 0, 0, 0.05);
    /* 亮模式阴影 */
    --shadow-color-dark: rgba(0, 0, 0, 0.2);
    /* 亮模式卡片悬停阴影 - 增加透明度 */
    --button-back-color: #FFFFFF;
    /* 回到顶部按钮背景色 */
    --button-icon-color: var(--secondary-text-color);
    /* 回到顶部按钮图标色 */

    /* 字体变量 - 优先使用 Lexend */
    --font-main: 'Lexend', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Lexend', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-code: 'Fira Code', 'Consolas', 'Monaco', monospace;
    --font-quote: 'Noto Serif SC', serif;

    --spacing-unit: 6px;
    /* 定义基础间距单位，减小以增加紧凑感 */
    --background-dark-rgb: 245, 245, 247;
    /* RGB for #f5f5f7 */
}

/* 深色模式变量 */
[data-theme="dark"] {
    --background-light: #1a1a1a;
    --background-dark: #121212;
    --text-color: #f5f5f7;
    --secondary-text-color: #a1a1a6;
    --border-color: #38383c;
    --card-background: #252525;
    --card-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    --hover-color: #2c2c2e;
    --button-back-color: #333333;
    --button-icon-color: #f5f5f7;
    --background-dark-rgb: 18, 18, 18;
}

/* Dark mode portfolio card adjustments */
[data-theme="dark"] .portfolio-item {
    background-color: #1e1e1e;
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .portfolio-item:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .portfolio-item::after {
    background: radial-gradient(circle at var(--mouse-x) var(--mouse-y),
            rgba(255, 255, 255, 0.03) 0%,
            rgba(255, 255, 255, 0.01) 40%,
            transparent 70%);
}

/* 深浅模式切换按钮 */
.theme-toggle {
    position: absolute;
    top: 20px;
    right: 275px;
    z-index: 1000;
    width: 40px;
    height: 40px;
    background-color: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

/* 移除旋转动画 */

.theme-toggle:hover {
    transform: scale(1.1);
}

.theme-toggle img {
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
}

.theme-toggle .light-icon {
    display: block;
    /* 修改为block，在浅色模式下显示太阳图标 */
}

.theme-toggle .dark-icon {
    display: none;
    /* 修改为none，在浅色模式下隐藏月亮图标 */
}

[data-theme="dark"] .theme-toggle .light-icon {
    display: none;
    /* 修改为none，在深色模式下隐藏太阳图标 */
}

[data-theme="dark"] .theme-toggle .dark-icon {
    display: block;
    /* 修改为block，在深色模式下显示月亮图标 */
}

body {
    font-family: var(--font-main);
    line-height: 1.6;
    color: var(--text-color);
    /* 使用变量 */
    margin: 0;
    padding: 0;
    background-color: var(--background-light);
    /* 使用变量 */
    -webkit-font-smoothing: antialiased;
    /* 抗锯齿 */
    scroll-behavior: smooth;
    /* 平滑滚动 */
    transition: background-color 0.3s ease, color 0.3s ease;
    /* 添加过渡效果 */

    /* 页面过渡动画相关样式 */
    opacity: 1;
    /* 初始状态完全不透明 */
    transition: opacity 0.5s ease-in-out;
    /* 定义透明度变化的过渡效果 */
}

/* 页面过渡动画类 */
body.fade-out {
    opacity: 0;
    /* 淡出效果：变为完全透明 */
    transition: opacity 0.5s;
}

body.fade-in {
    opacity: 0;
    /* 页面加载时初始状态为透明，然后淡入 */
    transition: opacity 1s;
}

body.fade-in.active {
    opacity: 1;
    /* 激活淡入效果 */
}

body.body-no-scroll {
    overflow: hidden;
}

.container {
    max-width: 1000px;
    /* 控制内容宽度 */
    margin: 0 auto;
    padding: 0 calc(var(--spacing-unit) * 4);
    /* 左右内边距 */
    padding-top: calc(var(--spacing-unit) * 4);
    /* 增加顶部内边距 */
    padding-bottom: calc(var(--spacing-unit) * 4);
}

a {
    color: var(--primary-color);
    /* 使用变量 */
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--link-hover-color);
    /* 使用变量 */
    opacity: 0.8;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--text-color);
    margin-bottom: calc(var(--spacing-unit) * 3);
    font-weight: 600;
    /* Apple 风格偏爱中等粗细 */
}

h1 {
    font-size: 3.5em;
    line-height: 1.1;
}

h2 {
    font-size: 2.5em;
}

h3 {
    font-size: 1.8em;
}

p {
    margin-bottom: calc(var(--spacing-unit) * 2);
    margin-left: 0;
    /* 明确移除默认左边距 */
    padding-left: 0;
    /* 明确移除默认左内边距 */
}

/* 导航栏 */
.navbar {
    position: absolute;
    top: 20px;
    /* 恢复距离顶部 */
    left: 50%;
    /* 水平居中 */
    transform: translateX(-50%);
    /* 精确居中 */
    z-index: 1000;
    height: auto;
    /* 高度自适应内容 */
    width: auto;
    /* 宽度自适应内容 */
}

.navbar .container {
    display: flex;
    justify-content: center;
    /* 导航链接居中 */
    align-items: center;
    height: 100%;
    padding: calc(var(--spacing-unit) * 1.5) calc(var(--spacing-unit) * 3);
    background-color: rgba(var(--background-dark-rgb), 0.5);
    /* Semi-transparent background, slightly less transparent */
    backdrop-filter: blur(20px);
    /* Frosted glass effect */
    -webkit-backdrop-filter: blur(20px);
    /* For Safari */
    border-radius: 30px;
    border: 1px solid rgba(var(--background-dark-rgb), 0.7);
    /* More visible border */
    box-shadow: 0px 4px 12px var(--shadow-color-light);
}

.navbar .logo {
    display: none;
    /* 隐藏logo */
}

.navbar .logo img {
    height: 100%;
    width: auto;
    border-radius: 50%;
    /* 如果 LOGO 是圆形，可以添加此样式 */
}

.navbar .nav-links-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-grow: 0;
    /* 不允许grow */
}

.navbar ul {
    display: flex;
    align-items: center;
    gap: calc(var(--spacing-unit) * 4);
    margin: 0;
    padding: 0;
    list-style: none;
}

.navbar li {
    margin: 0;
}

.navbar a {
    color: var(--secondary-text-color);
    font-weight: 500;
    padding: 0;
    text-decoration: none;
    transition: all 0.3s ease;
    text-align: center;
    line-height: 1.2;
    opacity: 0.5;
    font-family: var(--font-main);
}

.navbar a:hover {
    color: var(--text-color);
    opacity: 0.8;
}

/* 删除激活状态样式 */
.navbar a.active {
    color: var(--primary-color);
    /* 激活状态使用主题蓝色 */
    opacity: 1;
    /* 激活状态完全不透明 */
}

/* 按钮样式 */
.button {
    display: inline-block;
    padding: calc(var(--spacing-unit) * 2) calc(var(--spacing-unit) * 4);
    border-radius: 999px;
    /* 圆角按钮 */
    font-weight: 600;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
    text-align: center;
    border: none;
    cursor: pointer;
    font-family: var(--font-main);
}

.button.primary {
    background-color: var(--primary-color);
    /* 使用变量 */
    color: #FFFFFF;
}

.button.primary:hover {
    background-color: var(--link-hover-color);
    /* 使用变量 */
    transform: translateY(-2px);
}

.button.secondary {
    background-color: transparent;
    color: var(--primary-color);
    /* 使用变量 */
    border: 1px solid var(--primary-color);
    /* 使用变量 */
}

.button.secondary:hover {
    background-color: var(--primary-color);
    /* 使用变量 */
    color: #FFFFFF;
    transform: translateY(-2px);
}

/* 通用 section 样式 */
.section {
    padding: calc(var(--spacing-unit) * 8) 0;
    /* 调整section上下内边距 */
    text-align: left;
    /* 左对齐文本 */
    transition: background-color 0.3s ease, color 0.3s ease;
    /* 添加过渡效果 */
}

.section:nth-of-type(even) {
    background-color: var(--background-light);
    /* 使用变量替代硬编码的白色 */
}

/* Hero Section */
.hero-section {
    background-color: var(--background-light);
    /* 使用变量替代硬编码的白色 */
    padding: calc(var(--spacing-unit) * 8) 0;
    text-align: left;
    position: relative;
    overflow: hidden;
    transition: background-color 0.3s ease;
    margin-top: 100px;
}

.hero-section .container {
    display: flex;
    align-items: center;
    /* 垂直居中 */
    gap: calc(var(--spacing-unit) * 6);
    /* 添加头像和文本之间的间距 */
}

.hero-section .hero-content {
    flex-grow: 1;
    /* 允许内容区域占据剩余空间 */
}

.hero-section .profile-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin-bottom: calc(var(--spacing-unit) * 2);
    /* Adjust margin below photo */
    transition: all 0.3s ease;
    object-fit: cover;
    transform-origin: center top;
}

.hero-section .profile-photo.scrolled {
    width: 100px;
    height: 100px;
    transform: translateY(20px) scale(0.9);
}

.hero-section h1 {
    font-family: 'Lexend';
    /* 设置为 Lexend 字体 */
    font-weight: 625;
    /* Bold */
    font-size: 3 em;
    line-height: 1.1;
    margin-bottom: calc(var(--spacing-unit) * 1);
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    color: var(--text-color);
    /* 使用CSS变量替代硬编码的黑色 */
}

.hero-section h2 {
    font-family: 'Lexend';
    /* 设置为 Lexend 字体 */
    font-weight: 395;
    /* 加粗字体 */
    font-size: 2 em;
    /* Adjust size as needed */
    color: #71717A;
    /* 设置文字颜色为 #71717A */
    margin-top: calc(var(--spacing-unit) * 1);
    margin-bottom: calc(var(--spacing-unit) * 3);
}

.hero-section p {
    font-size: 1.1em;
    color: var(--secondary-text-color);
    margin-bottom: calc(var(--spacing-unit) * 2);
    max-width: none;
    margin-left: 0;
    margin-right: 0;
}

.hero-section .social-links {
    margin-top: calc(var(--spacing-unit) * 8);
    margin-bottom: calc(var(--spacing-unit) * 4);
    display: flex;
    justify-content: flex-start;
    gap: calc(var(--spacing-unit) * 3.5);
    /* 增加间距 */
}

.hero-section .social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: var(--background-dark);
    transition: box-shadow 0.5s ease;
    box-shadow: 0 2px 8px var(--shadow-color-light);
    text-decoration: none;
}

.hero-section .social-links a:hover {
    box-shadow: inset 0 2px 8px var(--shadow-color-dark);
    /* 修改为内凹阴影 */
    /* 确保 border-radius 保持 50% */
}

/* 所有图标通用样式 */
.hero-section .social-links .twitter-icon,
.hero-section .social-links .github-icon,
.hero-section .social-links .bilibili-icon,
.hero-section .social-links .youtube-icon {
    width: 24px;
    height: 24px;
    stroke-width: 2;
    color: var(--secondary-text-color);
    transition: none;
}

/* 移除悬停时的颜色变化 */
.hero-section .social-links a:hover .twitter-icon,
.hero-section .social-links a:hover .github-icon,
.hero-section .social-links a:hover .bilibili-icon,
.hero-section .social-links a:hover .youtube-icon {
    color: var(--secondary-text-color);
}

/* 移除原有的 icon-grid 样式 */
.hero-section .icon-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: calc(var(--spacing-unit) * 4);
    margin-top: calc(var(--spacing-unit) * 4);
}

.hero-section .icon-item {
    text-align: center;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
    cursor: pointer;
}

.hero-section .icon-item:hover {
    transform: translateY(-5px);
}

.hero-section .icon-item i {
    width: 48px;
    height: 48px;
    margin-bottom: calc(var(--spacing-unit) * 2);
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.hero-section .icon-item span {
    display: block;
    font-size: 1.1em;
    font-weight: 500;
    transition: all 0.3s ease;
}

.hero-section .icon-item:hover span {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    color: var(--primary-color);
}

.hero-section .icon-item:hover i {
    transform: scale(1.1);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* 移除原有的卡片样式 */
.hero-section .icon-item .icon-card {
    display: none;
}

/* 作品集 */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(200px, 1fr));
    gap: calc(var(--spacing-unit) * 4);
    margin-top: calc(var(--spacing-unit) * 6);
    max-width: 100%;
    margin-left: 0;
    margin-right: auto;
}

@media (max-width: 768px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
        /* 小屏幕上改为单列 */
    }
}

.portfolio-item {
    background-color: var(--card-background);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    text-align: left;
    display: flex;
    flex-direction: column;
    padding: calc(var(--spacing-unit) * 4);
    text-decoration: none;
    color: inherit;
    position: relative;
    width: 400px;
    height: 150px;
    cursor: pointer;
    transform: translateY(0);
}

.portfolio-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    border-color: rgba(0, 0, 0, 0.1);
}

.portfolio-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.05) 0%, rgba(0, 122, 255, 0.02) 100%);
    border-radius: 16px;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.portfolio-item:hover::before {
    opacity: 1;
}

.portfolio-icon {
    margin-bottom: calc(var(--spacing-unit) * 2);
    width: 48px;
    height: 48px;
    background-color: var(--background-dark);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 2;
    position: relative;
}

.portfolio-item:hover .portfolio-icon {
    transform: translateY(-4px) scale(1.1);
}

.portfolio-icon i {
    width: 24px;
    height: 24px;
    stroke-width: 2;
    color: var(--secondary-text-color);
    transition: all 0.3s ease;
}

.portfolio-item:hover .portfolio-icon i {
    transform: scale(1.1);
}

.portfolio-content {
    z-index: 2;
    flex-grow: 1;
    padding: 0;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
}

.portfolio-item:hover .portfolio-content {
    transform: translateY(-6px);
}

.portfolio-item h3 {
    margin-bottom: 8px;
    font-size: 1.4em;
    color: var(--text-color);
    font-weight: 600;
    transition: all 0.3s ease;
    line-height: 1.3;
}

.portfolio-item:hover h3 {
    transform: translateX(4px);
}

.portfolio-item p {
    padding: 0;
    margin-top: 4px;
    margin-bottom: calc(var(--spacing-unit) * 2);
    font-size: 1em;
    color: var(--secondary-text-color);
    line-height: 1.5;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.portfolio-item:hover p {
    opacity: 1;
    transform: translateX(4px);
}

/* 移除原有的 ::after visit 文字样式，因为现在使用 HTML 元素 */

/* 添加箭头 */
.portfolio-item .arrow {
    position: absolute;
    bottom: 20px;
    right: 24px;
    width: 24px;
    height: 24px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 0;
    transform: translateX(10px);
    z-index: 3;
}

.portfolio-item:hover .arrow {
    opacity: 1;
    transform: translateX(0);
}

.portfolio-item .arrow::before {
    content: '→';
    font-size: 1.2em;
    color: var(--secondary-text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* 移除不再需要的图片样式 */
.portfolio-item img {
    display: none;
}

/* 移除不再需要的按钮样式 */
.portfolio-item .button {
    display: none;
}

/* 添加鼠标跟随光效 */
.portfolio-item {
    --mouse-x: 50%;
    --mouse-y: 50%;
}

.portfolio-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at var(--mouse-x) var(--mouse-y),
            rgba(128, 128, 128, 0.03) 0%,
            rgba(128, 128, 128, 0.01) 40%,
            transparent 70%);
    border-radius: 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.portfolio-item:hover::after {
    opacity: 1;
}

/* Visit 文字样式 */
.portfolio-item .visit-text {
    position: absolute;
    bottom: 20px;
    left: 24px;
    font-size: 0.9em;
    font-weight: 500;
    color: var(--secondary-text-color);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 4;
}

.portfolio-item:hover .visit-text {
    opacity: 1;
    transform: translateY(0);
}

/* 博文列表栏目样式 */
.blog-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    /* Responsive grid */
    gap: calc(var(--spacing-unit) * 4);
    margin-top: calc(var(--spacing-unit) * 6);
}

.blog-post-item {
    background-color: var(--background-dark);
    /* Use variable */
    border-radius: 20px;
    /* Increase rounded corners */
    overflow: hidden;
    box-shadow: 0 5px 20px var(--shadow-color-light);
    /* Use variable */
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    /* Add transition effect */
    text-align: left;
    display: flex;
    /* Use Flexbox to ensure vertical content arrangement */
    flex-direction: column;
    position: relative;
    /* For positioning publish date */
    cursor: pointer;
    /* Add pointer cursor */
    text-decoration: none;
    /* Remove link underline */
    color: inherit;
    /* Inherit parent color */
}

.blog-post-item:hover {
    transform: translateY(-5px);
    /* Reduce lift effect */
}

.blog-post-item:hover h3 {
    color: var(--primary-color);
    /* Title turns blue on hover */
    transition: color 0.3s ease;
}

.blog-post-item:active {
    transform: translateY(-2px);
    /* Effect on click */
    box-shadow: 0 8px 20px var(--shadow-color-dark);
}

.blog-post-item img {
    width: 100%;
    height: 200px;
    /* Adjust image height */
    object-fit: cover;
    display: block;
}

.blog-post-item .post-date {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
}

.blog-post-item h3 {
    margin: calc(var(--spacing-unit) * 3) calc(var(--spacing-unit) * 3) calc(var(--spacing-unit) * 1);
    font-size: 1.5em;
    min-height: 3em;
    /* Ensure title has minimum height to prevent content shifting */
    transition: color 0.3s ease;
}

.blog-post-item p {
    padding: 0 calc(var(--spacing-unit) * 3) 8px;
    color: var(--secondary-text-color);
    /* Use variable */
    flex-grow: 1;
    /* Let paragraph fill remaining space */
}

.post-tags {
    display: flex;
    gap: 10px;
    padding: 0 15px 15px;
}

.tag {
    background-color: #eee;
    color: #333;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8em;
}

.details-button {
    background-color: #eee;
    color: #333;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8em;
    text-decoration: none;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.details-button:hover {
    background-color: #e0e0e0;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    color: #333;
}

/* 移除按钮样式 */
.blog-post-item .button {
    display: none;
}

/* 博客文章页面样式 */
.blog-full-post {
    max-width: 1200px;
    margin: 0 auto;
    padding: calc(var(--spacing-unit) * 4);
    position: relative;
}

.blog-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: calc(var(--spacing-unit) * 4);
}

.blog-main-content {
    padding-right: calc(var(--spacing-unit) * 4);
}

.blog-main-content h2 {
    font-size: 2.2em;
    margin-top: calc(var(--spacing-unit) * 2);
    margin-bottom: calc(var(--spacing-unit) * 2);
    color: var(--text-color);
}

.blog-main-content .post-meta {
    font-size: 0.9em;
    color: var(--secondary-text-color);
    margin-bottom: calc(var(--spacing-unit) * 4);
}

.blog-main-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: calc(var(--spacing-unit) * 4) 0;
}

.blog-toc {
    position: sticky;
    top: calc(var(--spacing-unit) * 2);
    max-height: calc(100vh - var(--spacing-unit) * 4);
    overflow-y: auto;
    padding: calc(var(--spacing-unit) * 2);
    background: var(--background-dark);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.blog-toc h3 {
    margin-bottom: calc(var(--spacing-unit) * 2);
    color: var(--text-color);
}

.blog-toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.blog-toc li {
    margin: calc(var(--spacing-unit) * 1.5) 0;
    padding-left: calc(var(--spacing-unit) * 2);
}

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

.blog-toc a:hover {
    color: var(--primary-color);
}

/* Markdown 样式 */
.markdown-content {
    line-height: 1.8;
    color: var(--text-color);
    font-size: 1.1em;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
    margin: calc(var(--spacing-unit) * 3) 0 calc(var(--spacing-unit) * 2);
    color: var(--text-color);
    line-height: 1.4;
}

.markdown-content p {
    margin-bottom: calc(var(--spacing-unit) * 2);
    line-height: 1.8;
}

.markdown-content ul,
.markdown-content ol {
    margin-bottom: calc(var(--spacing-unit) * 2);
    padding-left: calc(var(--spacing-unit) * 4);
}

.markdown-content li {
    margin-bottom: calc(var(--spacing-unit));
    line-height: 1.8;
}

.markdown-content code {
    background: var(--background-light);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: var(--font-code);
    font-size: 0.9em;
}

.markdown-content pre {
    background: var(--background-light);
    padding: calc(var(--spacing-unit) * 2);
    border-radius: 8px;
    overflow-x: auto;
    margin: calc(var(--spacing-unit) * 2) 0;
    font-size: 0.9em;
}

.markdown-content blockquote {
    border-left: 4px solid var(--primary-color);
    margin: calc(var(--spacing-unit) * 2) 0;
    padding: calc(var(--spacing-unit)) 0 calc(var(--spacing-unit)) calc(var(--spacing-unit) * 2);
    color: var(--secondary-text-color);
    font-style: italic;
    font-family: var(--font-quote);
}

.markdown-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: calc(var(--spacing-unit) * 2) 0;
}

.markdown-content table {
    width: 100%;
    border-collapse: collapse;
    margin: calc(var(--spacing-unit) * 2) 0;
}

.markdown-content th,
.markdown-content td {
    padding: calc(var(--spacing-unit) * 1.5);
    border: 1px solid var(--border-color);
}

.markdown-content th {
    background: var(--background-light);
}

/* 移除底部卡片 */
.blog-post-item {
    display: block !important;
}

/* 确保文章内容显示 */
.blog-full-post .blog-content {
    display: block;
}

.blog-full-post .blog-main-content {
    width: 100%;
    padding-right: 0;
}

.blog-full-post .markdown-content {
    line-height: 1.8;
    color: var(--text-color);
    font-size: 1.1em;
}

.blog-full-post .markdown-content h1,
.blog-full-post .markdown-content h2,
.blog-full-post .markdown-content h3,
.blog-full-post .markdown-content h4,
.blog-full-post .markdown-content h5,
.blog-full-post .markdown-content h6 {
    margin: calc(var(--spacing-unit) * 3) 0 calc(var(--spacing-unit) * 2);
    color: var(--text-color);
    line-height: 1.4;
}

.blog-full-post .markdown-content p {
    margin-bottom: calc(var(--spacing-unit) * 2);
    line-height: 1.8;
}

.blog-full-post .markdown-content ul,
.blog-full-post .markdown-content ol {
    margin-bottom: calc(var(--spacing-unit) * 2);
    padding-left: calc(var(--spacing-unit) * 4);
}

.blog-full-post .markdown-content li {
    margin-bottom: calc(var(--spacing-unit));
    line-height: 1.8;
}

.blog-full-post .markdown-content code {
    background: var(--background-light);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: var(--font-code);
    font-size: 0.9em;
}

.blog-full-post .markdown-content pre {
    background: var(--background-light);
    padding: calc(var(--spacing-unit) * 2);
    border-radius: 8px;
    overflow-x: auto;
    margin: calc(var(--spacing-unit) * 2) 0;
    font-size: 0.9em;
}

.blog-full-post .markdown-content blockquote {
    border-left: 4px solid var(--primary-color);
    margin: calc(var(--spacing-unit) * 2) 0;
    padding: calc(var(--spacing-unit)) 0 calc(var(--spacing-unit)) calc(var(--spacing-unit) * 2);
    color: var(--secondary-text-color);
    font-style: italic;
    font-family: var(--font-quote);
}

.blog-full-post .markdown-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: calc(var(--spacing-unit) * 2) 0;
}

.blog-full-post .markdown-content table {
    width: 100%;
    border-collapse: collapse;
    margin: calc(var(--spacing-unit) * 2) 0;
}

.blog-full-post .markdown-content th,
.blog-full-post .markdown-content td {
    padding: calc(var(--spacing-unit) * 1.5);
    border: 1px solid var(--border-color);
}

.blog-full-post .markdown-content th {
    background: var(--background-light);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .blog-content {
        grid-template-columns: 1fr;
    }

    .blog-main-content {
        padding-right: 0;
    }

    .blog-toc {
        position: static;
        margin-top: calc(var(--spacing-unit) * 4);
    }
}

/* 返回博文列表按钮 */
.back-to-blog-list {
    display: inline-flex;
    /* Let icon and text be on the same line */
    align-items: center;
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: calc(var(--spacing-unit) * 4);
    /* Adjust spacing */
    transition: color 0.3s ease;
}

.back-to-blog-list:hover {
    color: var(--link-hover-color);
}

.back-to-blog-list i {
    width: 20px;
    height: 20px;
    margin-right: calc(var(--spacing-unit) * 1);
    stroke-width: 2;
}

/* 联系表单 */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: calc(var(--spacing-unit) * 2);
    max-width: 500px;
    margin: 0 auto calc(var(--spacing-unit) * 4);
    /* Increase bottom spacing */
    text-align: left;
}

.contact-form input,
.contact-form textarea {
    padding: calc(var(--spacing-unit) * 2);
    border: 1px solid var(--border-color);
    /* Use variable */
    border-radius: 8px;
    font-size: 1em;
    color: var(--text-color);
    /* Use variable */
    background-color: var(--background-light);
    /* Use variable */
    transition: border-color 0.3s ease, background-color 0.3s ease, color 0.3s ease;
    /* Add transition effect */
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    /* Use variable */
}

.contact-form textarea {
    min-height: 120px;
    resize: vertical;
}

.contact-form button {
    width: auto;
    /* Button width adapts */
    align-self: flex-start;
    /* Left align */
}

/* 新增的联系信息样式 */
.contact-info {
    margin-top: calc(var(--spacing-unit) * 4);
    font-size: 1.1em;
    color: var(--secondary-text-color);
    text-align: center;
    /* Center display */
}

.contact-info p {
    display: flex;
    /* Let icon and text be on one line */
    align-items: center;
    /* Vertically center align */
    justify-content: center;
    /* Center display */
    margin-bottom: calc(var(--spacing-unit) * 1.5);
}

.contact-info i {
    width: 20px;
    height: 20px;
    stroke-width: 2;
    margin-right: calc(var(--spacing-unit) * 1);
    color: var(--primary-color);
    /* Icon color */
}

.contact-info a {
    color: var(--secondary-text-color);
    /* Link default color */
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-info a:hover {
    color: var(--primary-color);
    /* Link hover color */
}

.social-links {
    margin-top: calc(var(--spacing-unit) * 3);
    display: flex;
    justify-content: center;
    gap: calc(var(--spacing-unit) * 1.5);
    /* Adjust spacing here */
}

.social-links a {
    color: var(--secondary-text-color);
    transition: color 0.5s ease, box-shadow 0.5s ease;
    /* 将过渡时间从 0.3s 增加到 0.5s */
}

.social-links a:hover {
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.2);
    /* 修改为内凹阴影 */
    border-radius: 50%;
    /* 修改为圆形 */
}

.social-links i {
    width: 30px;
    height: 30px;
    stroke-width: 2;
    color: var(--secondary-text-color);
    transition: color 0.3s ease;
}

/* 页脚 */
footer {
    background-color: var(--background-light);
    padding: calc(var(--spacing-unit) * 4) 0;
    text-align: center;
    color: var(--secondary-text-color);
    font-size: 0.9em;
    border-top: 1px solid var(--border-color);
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

footer .container {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 24px;
    text-align: center;
}



.daily-quote p {
    font-size: 0.9em;
    margin-bottom: calc(var(--spacing-unit) * 1);
}

.daily-quote .quote-from {
    font-size: 0.8em;
    margin-top: calc(var(--spacing-unit) * 0.5);
}

/* 时间轴介绍文字样式 */
.timeline-intro-text {
    color: var(--secondary-text-color);
}

/* 回到顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: calc(var(--spacing-unit) * 4);
    /* Distance from bottom */
    right: calc(var(--spacing-unit) * 4);
    /* Distance from right */
    background-color: var(--button-back-color);
    /* Use variable */
    color: var(--button-icon-color);
    /* Use variable */
    border: 1px solid var(--border-color);
    /* Use variable */
    border-radius: 50%;
    /* Circular */
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 5px 15px var(--shadow-color-light);
    /* Use variable */
    opacity: 0;
    /* Hidden by default */
    visibility: hidden;
    /* Hidden by default */
    transition: opacity 0.3s ease, visibility 0.3s ease, background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    z-index: 999;
    /* Ensure it's above other elements */
}

.back-to-top.show {
    opacity: 1;
    /* Show */
    visibility: visible;
    /* Show */
}

.back-to-top:hover {
    background-color: var(--primary-color);
    /* Hover background color */
    color: #FFFFFF;
    /* Hover icon color */
    border-color: var(--primary-color);
    /* Hover border color */
    box-shadow: 0 8px 20px var(--shadow-color-dark);
    /* Hover shadow */
    transform: translateY(-2px);
    /* Slightly float up */
}

.back-to-top i {
    width: 24px;
    height: 24px;
    stroke-width: 2;
}

/* 响应式设计 */
@media (max-width: 768px) {
    h1 {
        font-size: 2.8em;
    }

    h2 {
        font-size: 2em;
    }

    .navbar .container {
        flex-direction: column;
    }

    .navbar ul {
        margin-top: calc(var(--spacing-unit) * 2);
        flex-wrap: wrap;
        justify-content: center;
    }

    .navbar li {
        margin: 0 calc(var(--spacing-unit) * 2) calc(var(--spacing-unit) * 2);
    }

    .hero-section {
        padding-top: calc(var(--spacing-unit) * 8);
    }

    .profile-photo {
        width: 150px;
        height: 150px;
    }

    .hero-section .icon-grid {
        /* Adjust responsive layout */
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        /* Two columns or adaptive on tablets */
        gap: calc(var(--spacing-unit) * 4);
        /* Adjust spacing */
    }

    .hero-section .icon-item {
        /* Adjust padding to fit larger icons */
        padding: calc(var(--spacing-unit) * 2.5);
    }

    .hero-section .icon-item i {
        width: 45px;
        /* Icon size on tablets */
        height: 45px;
    }

    .hero-section .icon-item span {
        font-size: 1em;
        /* Text size on tablets */
    }

    .portfolio-grid,
    .blog-posts-grid {
        /* Portfolio and blog posts both display in single column */
        grid-template-columns: 1fr;
    }

    .portfolio-item,
    .blog-post-item {
        margin-bottom: calc(var(--spacing-unit) * 4);
    }

    .blog-full-post {
        padding: calc(var(--spacing-unit) * 4);
    }

    /* Mobile adjustment for back-to-top button position */
    .back-to-top {
        bottom: calc(var(--spacing-unit) * 2);
        right: calc(var(--spacing-unit) * 2);
        width: 45px;
        height: 45px;
    }

    .contact-info p {
        flex-direction: column;
        /* Vertical arrangement of icon and text on small screens */
        align-items: center;
        /* Vertically center */
        margin-bottom: calc(var(--spacing-unit) * 2);
    }

    .contact-info i {
        margin-right: 0;
        margin-bottom: calc(var(--spacing-unit) * 0.5);
        /* A little space below the icon */
    }

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

    .blog-main-content {
        padding-right: 0;
    }

    .blog-toc {
        position: static;
        margin-top: calc(var(--spacing-unit) * 4);
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2em;
    }

    .hero-section p {
        font-size: 1.2em;
    }

    .container {
        padding: 0 calc(var(--spacing-unit) * 2);
    }

    .hero-section .icon-grid {
        grid-template-columns: 1fr;
        /* Single column on smaller screens */
        gap: calc(var(--spacing-unit) * 3);
    }

    .hero-section .icon-item {
        width: auto;
        /* Auto width */
        margin-bottom: calc(var(--spacing-unit) * 2);
        /* Slightly reduce bottom margin */
    }

    .hero-section .icon-item:last-child {
        margin-bottom: 0;
    }

    .hero-section .icon-item i {
        width: 40px;
        /* Icon size on mobile */
        height: 40px;
    }

    .hero-section .icon-item span {
        font-size: 0.9em;
        /* Text size on mobile */
    }
}

/* 图片全屏查看器 */
.image-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.image-viewer.show {
    opacity: 1;
    visibility: visible;
}

.image-viewer img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.image-viewer .close-btn,
.image-viewer .prev-btn,
.image-viewer .next-btn {
    position: absolute;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease;
    z-index: 2001;
}

.image-viewer .close-btn:hover,
.image-viewer .prev-btn:hover,
.image-viewer .next-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.image-viewer .close-btn {
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    font-size: 24px;
}

.image-viewer .prev-btn,
.image-viewer .next-btn {
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    font-size: 30px;
}

.image-viewer .prev-btn {
    left: 20px;
}

.image-viewer .next-btn {
    right: 20px;
}

/* 图片滚动条样式 */
.image-scroll-container {
    width: 100%;
    overflow: hidden;
    margin: calc(var(--spacing-unit) * 4) 0;
    position: relative;
}

.image-scroll-wrapper {
    display: grid;
    grid-template-rows: repeat(2, 1fr);
    grid-auto-flow: column;
    column-gap: 16px;
    row-gap: 4px;
    justify-content: center;
    animation: scroll 10s linear infinite;
    min-width: 200%;
}

.image-scroll-wrapper:hover {
    animation-play-state: paused;
}

.scroll-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 4px 8px var(--shadow-color-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: 8px;
    background-color: var(--background-dark);
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-image img {
    width: 80%;
    height: 80%;
    object-fit: contain;
    border-radius: 50%;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.scroll-image:hover img {
    transform: scale(1.08);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .scroll-image {
        width: 120px;
        height: 120px;
    }

    .image-scroll-wrapper {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .scroll-image {
        width: 100px;
        height: 100px;
    }

    .image-scroll-wrapper {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 时间轴部分样式 */
.timeline-section {
    margin-top: 100px;
    transition: margin-top 0.3s ease;
    background-color: var(--background-light);
}

.timeline-section h1 {
    margin-bottom: calc(var(--spacing-unit) * 4);
    color: var(--text-color);
}

.timeline-intro-text {
    color: var(--secondary-text-color);
}

.timeline {
    position: relative;
    padding-left: 60px;
    gap: 0;
    margin-top: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    border-left: 2px dotted var(--primary-color);
    z-index: 0;
}

.timeline-item {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 15px 0;
    margin-left: 0;
    border-bottom: 1px solid var(--border-color);
    gap: 20px;
    background: transparent !important;
    box-shadow: none !important;
    transition: none !important;
}

.timeline-item:hover {
    transform: none !important;
    box-shadow: none !important;
}

.timeline-item:last-child {
    border-bottom: none;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -40px;
    top: 20px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: var(--primary-color);
    border: 2px solid var(--background-light);
    box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.1);
    z-index: 1;
}



.timeline-main-content {
    flex-grow: 1;
    min-width: 0;
}

.timeline-main-content h3 {
    margin: 0 0 5px 0;
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text-color);
}

.timeline-main-content>p {
    font-size: 0.9em;
    color: var(--secondary-text-color);
    margin: 0 0 10px 0;
    line-height: 1.5;
}

.timeline-date,
.timeline-date-right {
    min-width: 120px;
    text-align: right;
    color: var(--secondary-text-color);
    font-size: 0.85em;
    padding-top: 2px;
    font-weight: normal;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .timeline-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .timeline-date-right {
        text-align: left;
        padding-top: 0;
        margin-top: 5px;
    }
}

/* Career Items */
.career-items {
    display: grid;
    grid-template-columns: 1fr;
    gap: calc(var(--spacing-unit) * 4);
    margin-top: calc(var(--spacing-unit) * 4);
}

.career-item-card {
    padding: calc(var(--spacing-unit) * 3);
    text-decoration: none;
    color: inherit;
    display: block;
    border: 3px solid rgba(0, 0, 0, 0.1);
    /* 默认边框颜色加深，更易察觉 */
    border-radius: 16px;
    position: relative;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    /* 默认深色阴影 */
    transition: border-color 0.3s ease;
}

.career-item-card:hover {
    border-color: rgba(0, 0, 0, 0.2);
    /* 悬停时边框颜色更深 */
}

/* 深色模式下的career卡片边框 */
[data-theme="dark"] .career-item-card {
    border-color: rgba(255, 255, 255, 0.15);
    /* 深色模式下默认白色边框 */
}

[data-theme="dark"] .career-item-card:hover {
    border-color: rgba(255, 255, 255, 0.3);
    /* 深色模式下悬停时更亮的白色边框 */
}

.career-item-card>* {
    pointer-events: none;
}

.career-meta-container {
    display: flex;
    justify-content: space-between;
    font-size: 0.9em;
    color: var(--secondary-text-color);
    margin-bottom: calc(var(--spacing-unit) * 2);
    padding-bottom: calc(var(--spacing-unit) * 1);
    border-bottom: 1px solid var(--border-color);
}

.career-item-card h3 {
    margin: 0 0 calc(var(--spacing-unit) * 1) 0;
    font-size: 1.2em;
    font-weight: 600;
}

.career-item-card p {
    margin: 0;
    font-size: 0.95em;
    color: var(--secondary-text-color);
    line-height: 1.6;
}

/* 修改 Projects 和 Career 标题样式 */
#projects h2,
#career h2 {
    font-size: 3em;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: calc(var(--spacing-unit) * 1);
}

#projects p,
#career p {
    font-size: 1.1em;
    color: var(--secondary-text-color);
    margin-bottom: calc(var(--spacing-unit) * 2);
}

.nav-links-container nav ul li a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    opacity: 0.5;
}

.nav-links-container nav ul li a:hover {
    color: var(--text-color);
    opacity: 0.8;
}

.nav-links-container nav ul li a.active {
    color: var(--text-color);
    opacity: 1;
    font-weight: 500;
}

/* 标题字体 */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--text-color);
    margin-bottom: calc(var(--spacing-unit) * 3);
    font-weight: 600;
}

/* 正文字体 */
body {
    font-family: var(--font-main);
    line-height: 1.6;
    color: var(--text-color);
    margin: 0;
    padding: 0;
    background-color: var(--background-light);
    -webkit-font-smoothing: antialiased;
    scroll-behavior: smooth;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* 代码字体 */
code,
pre {
    font-family: var(--font-code);
}

/* 引用文字字体 */
blockquote {
    font-family: var(--font-quote);
}

/* 导航栏字体 */
.navbar a {
    font-family: var(--font-main);
    font-weight: 500;
}

/* 按钮字体 */
.button {
    font-family: var(--font-main);
    font-weight: 600;
}

/* 博文介绍文字样式 */
.blog-intro-text {
    color: #6E6E73;
    /* 设置文字颜色 */
}

.timeline-image-row img,
.timeline-photos img {
    object-fit: contain;
}

/* 底部导航栏样式 */
.bottom-nav {
    background-color: var(--bg-color);
    border-top: 1px solid var(--border-color);
    /* 重新添加顶部边框 */
    border-bottom: 1px solid var(--border-color);
    /* 添加底部边框 */
    padding: 0.25rem 0;
    /* 垂直内边距 */
    position: relative;
    margin-top: 0.5rem;
    opacity: 0.8;
    max-width: 1100px;
    /* 增加整体宽度 */
    margin: 0 auto;
    /* 居中 */
}

.bottom-nav .container {
    display: flex;
    justify-content: flex-start;
    /* 导航链接左对齐 */
    max-width: 1000px;
    /* 控制内部内容宽度与主内容区一致 */
    margin: 0 auto;
    /* 使其在 bottom-nav 内部居中 */
    padding: 0 calc(var(--spacing-unit) * 4);
    /* 调整内边距以与主内容区容器文本对齐 */
}

.bottom-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    /* 移除 ul 上的所有 padding */
    gap: 1.5rem;
}

.bottom-nav a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.2rem;
    /* 字体变大 */
    transition: color 0.3s ease;
    opacity: 0.8;
}

.bottom-nav a:hover {
    color: var(--accent-color);
    opacity: 1;
}

/* 确保底部导航栏在移动设备上也能正常显示 */
@media (max-width: 768px) {
    .bottom-nav ul {
        gap: 1rem;
    }

    .bottom-nav a {
        font-size: 1.1rem;
        /* 调整移动端字体大小 */
    }
}

/* Tech Stack Table Styles */
.tech-stack-table {
    background-color: var(--card-background);
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: calc(var(--spacing-unit) * 4);
    margin-top: calc(var(--spacing-unit) * 4);
    position: relative;
    border: 3px solid rgba(0, 0, 0, 0.1);
    /* 默认边框颜色加深，更易察觉 */
    transition: border-color 0.3s ease;
}

.tech-stack-table:hover {
    border-color: rgba(0, 0, 0, 0.2);
    /* 悬停时边框颜色更深 */
}

/* 深色模式下的tech-stack-table边框 */
[data-theme="dark"] .tech-stack-table {
    border-color: rgba(255, 255, 255, 0.15);
    /* 深色模式下默认白色边框 */
}

[data-theme="dark"] .tech-stack-table:hover {
    border-color: rgba(255, 255, 255, 0.3);
    /* 深色模式下悬停时更亮的白色边框 */
}

.tech-stack-table table {
    width: 100%;
    border-collapse: collapse;
    pointer-events: none;
    /* 将 pointer-events: none; 应用到表格上 */
}

.tech-stack-table td {
    padding: calc(var(--spacing-unit) * 2) 0;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}

.tech-stack-table tr:last-child td {
    border-bottom: none;
}

.tech-stack-table td:first-child {
    color: var(--secondary-text-color);
    width: 30%;
    /* Adjust as needed */
}

.tech-stack-table td:last-child {
    font-weight: 500;
    color: var(--text-color);
}

/* Footer Links Styles (for stack.html) */
.footer-links {
    margin: 0;
    padding: 0;
    /* 移除所有内边距 */
    margin-bottom: calc(var(--spacing-unit) * 3);
    /* Add some space below the links */
}

.footer-links a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9em;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    margin-right: calc(var(--spacing-unit) * 2);
    /* 添加右外边距控制间距 */
}

.footer-links a:last-child {
    margin-right: 0;
    /* 最后一个链接不需要右外边距 */
}

.footer-links a:hover {
    opacity: 1;
}

/* Career Card Styles */
.career-card {
    background-color: var(--card-background);
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    /* 恢复默认阴影 */
    padding: calc(var(--spacing-unit) * 4);
    margin-top: calc(var(--spacing-unit) * 4);
    transition: box-shadow 0.3s ease;
    /* 确保过渡效果存在 */
    position: relative;
    /* 为伪元素定位 */
}

.career-card::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    z-index: -1;
    background-color: transparent;
    border-radius: 16px;
    box-shadow: none;
    /* 默认无阴影 */
    transition: box-shadow 0.3s ease;
    /* 为伪元素的阴影添加过渡效果 */
}

.career-card:hover::before {
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
    /* 悬停时伪元素显示阴影 */
}

.career-card:hover {
    background-color: var(--card-background);
    /* 确保背景颜色不变 */
}

/* 音乐馆样式 */
.music-search-container {
    margin: 2rem 0;
    text-align: center;
}

.search-box {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    background: var(--card-background);
}

.search-input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    outline: none;
    font-size: 16px;
    background: transparent;
    color: var(--text-color);
}

.search-button {
    padding: 12px 20px;
    border: none;
    background: var(--accent-color);
    color: white;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-button:hover {
    background: var(--link-hover-color);
}

.music-section {
    margin: 3rem 0;
}

.music-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.music-track {
    background: var(--card-background);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.music-track:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.track-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.track-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.music-track:hover .track-image img {
    transform: scale(1.05);
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.music-track:hover .play-overlay {
    opacity: 1;
}

.track-info {
    padding: 1.5rem;
}

.track-info h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    color: var(--text-color);
}

.track-info p {
    margin: 0.25rem 0;
    color: var(--secondary-text-color);
    font-size: 0.9rem;
}

.track-duration {
    font-size: 0.8rem !important;
    opacity: 0.7;
}

.music-player-container {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--card-background);
    border-top: 1px solid var(--border-color);
    padding: 1rem;
    z-index: 998;
}



.music-player {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.player-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.player-album-art {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
}

.player-details h3 {
    margin: 0;
    font-size: 1rem;
}

.player-details p {
    margin: 0;
    color: var(--secondary-text-color);
    font-size: 0.9rem;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.control-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.control-btn:hover {
    background: var(--link-hover-color);
}

.progress-container {
    flex: 1;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: var(--accent-color);
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s ease;
}

.time-display {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--secondary-text-color);
    margin-top: 0.5rem;
}

.no-results {
    text-align: center;
    color: var(--secondary-text-color);
    font-style: italic;
    grid-column: 1 / -1;
}

@media (max-width: 768px) {
    .music-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }

    .music-player {
        flex-direction: column;
        gap: 0.5rem;
    }

    .player-controls {
        width: 100%;
    }

    .search-box {
        margin: 0 1rem;
    }
}