body, html {
    height: 100%;
    margin: 0;
    font-family: 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    color: #e0e0e0;
    overflow: hidden; /* 防止body出现滚动条 */
    background-image: url('Images/BG.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.container {
    display: flex;
    height: 100%;
    background: linear-gradient(to bottom, rgba(18, 18, 18, 0.7) 0%, rgba(18, 18, 18, 1) 100%);
}

.left-half, .right-half {
    flex: 1;
    padding: 40px;
    box-sizing: border-box; /* 确保padding不会增加元素的总宽度 */
}

.left-half {
    position: fixed;
    width: 50%;
    height: 100%;
    display: flex;
    justify-content: center;
    padding: 40px;
    box-sizing: border-box;
}

.right-half {
    margin-left: 50%;
    height: 100%;
    overflow-y: scroll; /* 改为 scroll，确保内容可滚动 */
    display: flex;
    flex-direction: column;
}

.left-content, .right-content {
    max-width: 100%;
}

.left-content, .right-content {
    padding-top: 40px; /* 添加顶部内边距，使内容与左侧对齐 */
}

h1, h2, .name, p {
    font-family: 'Montserrat', 'Arial Black', sans-serif;
}

h1 {
    font-size: 2.5em;
    font-weight: 3;
    color: #ffffff;
    margin-bottom: 0;
}

.name {
    font-size: 6em;
    font-weight: bold;
    color: #ffffff;
    margin: 20px 0;
}

.subtitle {
    font-size: 1.2em;
    margin-bottom: 20px;
    font-weight: 100; /* 保持整体副标题非常细 */
}

.view-resume {
    display: inline-block;
    color: #c2c2c2;
    text-decoration: none;
    font-weight: bold;
    margin-top: 30px;
    transition: color 0.3s ease; 
}

.view-resume:hover {
    color: #FFA500;
}

.social-icons {
    margin-top: auto;
    padding-top: 400px;
    transition: color 0.3s ease; 
}

.social-icons a {
    color: #ffffff;
    font-size: 24px;
    margin-right: 20px;
    text-decoration: none;
    transition: color 0.3s ease; 
}

.social-icons a:hover {
    color: #FFA500;
}

.social-icons:hover {
    color: #FFA500;
}

.section {
    margin-bottom: 40px;
    line-height: 1.6;  /* 增加行高以提高可读性 */
}

h2 {
    color: #ffffff;
    font-size: 2.8em;
    margin-bottom: 20px;
}

p {
    color: #c2c2c2;
    font-size: 1.3em;
    margin-bottom: 20px;
}

.project {
    display: flex;
    margin-bottom: 20px;
    padding: 20px;
    border-radius: 10px;
    transition: background-color 0.3s ease;
}

.project:hover {
    background-color: rgba(169, 169, 169, 0.1);
}

.project-info h3 {
    margin: 0 0 20px 0;
    color: #ffffff;
    transition: color 0.3s ease;
    font-size: 1.4em;
}

.project:hover .project-info h3 {
    color: #FFA500;
}

.project-info p {
    margin: 20px 0 0;
    font-size: 1em;
    line-height: 1.4;  /* 增加行高以提高可读性 */
}

.project img {
    width: 200px;
    height: 100px;
    object-fit: cover;
    margin-right: 20px;
    border-radius: 10px;  /* 添加圆角 */
    border: 1px solid #303030;
    box-shadow: 0 0 10px rgba(119, 119, 119, 0.3);
}

.subtitle .highlight {
    color: #ffffff;
    font-weight: 600;
    text-shadow: 0 0 5px rgba(161, 161, 161, 0.5);
}

/* 将所有粗体文本设置为白色 */
strong.highlight {
    color: #ffffff;
    font-weight: 700; /* 粗体效果 */
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

.section h2 {
    margin-bottom: 20px;
    font-size: 24px;
}

.section:nth-child(2) {
    margin-top: 200px;
}

.project-info .tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.project-info .tech-tag {
    background-color: #303030;
    color: #FFA500;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
}

/* 隐藏所有浏览器的滚动条 */
body, .right-half {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* Internet Explorer 10+ */
}

/* WebKit 和基于 Chrome 的浏览器 */
body::-webkit-scrollbar, .right-half::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

#greeting, #name, #subtitle {
    overflow: hidden;
    white-space: nowrap;
    margin: 0;
    letter-spacing: normal;
}

#greeting {
    animation: typing 2s steps(20, end) forwards;
    width: 0;
    margin-top: 20px;
    margin-bottom: 20px;
}

#name {
    animation: typing 1.5s steps(6, end) 2s forwards;
    width: 0;
    margin-bottom: 20px;
}

#subtitle {
    animation: typing 4s steps(70, end) 3.5s forwards;
    width: 0;
    margin-bottom: 30px;
}

/* 打字动画 */
@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}