/*!
    Title: Dev Portfolio Template
    Version: 1.2.2
    Last Change: 03/25/2020
    Author: Ryan Fitzgerald
    Repo: https://github.com/RyanFitzgerald/devportfolio-template
    Issues: https://github.com/RyanFitzgerald/devportfolio-template/issues

    Description: This file contains all the styles associated with the page
    that don't come from third party libraries. This file gets compiled using
    Gulp and send to the /css folder which is then loaded on the page.
*/
body {
    font-family: 'Lato', sans-serif;
    font-size: 16px
}

body.active {
    overflow: hidden;
    z-index: -1
}

.no-js #experience-timeline>div {
    background: #fff;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #dcd9d9
}

.no-js #experience-timeline>div h3 {
    font-size: 1.5em;
    font-weight: 300;
    color: #374054;
    display: inline-block;
    margin: 0
}

.no-js #experience-timeline>div h4 { 
    font-size: 1.2em;
    font-weight: 300;
    color: #3c0411;
    margin: 0 0 15px 0
}

.no-js #experience-timeline>div p {
    color: #74808a;
    font-size: 0.9em;
    margin: 0
}

.no-js #experience-timeline:before,
.no-js #experience-timeline:after {
    content: none
}

@keyframes dropHeader {
    0% {
        transform: translateY(-100%)
    }

    100% {
        transform: translateY(0)
    }
}

header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    text-align: center;
    z-index: 10;
    animation-name: dropHeader;
    animation-iteration-count: 1;
    animation-timing-function: ease;
    animation-duration: 0.75s
}

header ul {
    display: inline-block;
    background: #fff;
    text-align: center;
    padding: 10px;
    margin: 0;
    border-bottom-right-radius: 4px;
    border-bottom-left-radius: 4px
}

header li {
    display: inline-block
}

header a {
    display: block;
    color: #3498db;
    padding: 10px
}

header a:hover {
    color: #217dbb;
    text-decoration: none;
    background: #eee;
    border-radius: 4px
}

header a:focus {
    color: #3498db;
    text-decoration: none
}

header.active {
    display: block
}

header.sticky {
    position: fixed;
    z-index: 999
}

#menu.active {
    display: block
}

#mobile-menu-open {
    display: none;
    cursor: pointer;
    position: fixed;
    right: 15px;
    top: 10px;
    color: #3498db;
    font-size: 1.5em;
    z-index: 20;
    padding: 0 7px;
    border-radius: 4px;
    background: #fff
}

#mobile-menu-close {
    display: none;
    text-align: right;
    width: 100%;
    background: #fff;
    font-size: 1.5em;
    padding-right: 15px;
    padding-top: 10px;
    cursor: pointer;
    color: #3498db
}

#mobile-menu-close span {
    font-size: 0.5em;
    text-transform: uppercase
}

#mobile-menu-close i {
    vertical-align: middle
}

footer {
    padding: 50px 0
}

.copyright {
    padding-top: 20px
}

.copyright p {
    margin: 0;
    color: #74808a
}

.top {
    text-align: center
}

.top span {
    cursor: pointer;
    display: block;
    margin: 15px auto 0 auto;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 3px solid #b9bfc4;
    text-align: center
}

.top i {
    color: #74808a
}

.social {
    text-align: right
}

.social ul {
    margin: 5px 0 0 0;
    padding: 0
}

.social li {
    display: inline-block;
    font-size: 1.25em;
    list-style: none
}

.social a {
    display: block;
    color: #74808a;
    padding: 10px
}

.social a:hover {
    color: #3498db
}

.btn-rounded-white {
    display: inline-block;
    color: #fff;
    padding: 15px 25px;
    border: 3px solid #fff;
    border-radius: 30px;
    transition: .5s ease all
}

.btn-rounded-white:hover {
    color: #3498db;
    background: #fff;
    text-decoration: none
}

.shadow {
    box-shadow: 0 1px 3px rgba(255, 0, 0, 0.12), 0 1px 2px rgba(255, 0, 0, 0.24)
}

.shadow-large {
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.08), 0 3px 6px rgba(0, 0, 0, 0.15)
}

.heading {
    position: relative;
    display: inline-block;
    font-size: 2em;
    font-weight: 300;
    margin: 0 0 30px 0
}

.heading:after {
    position: absolute;
    content: '';
    top: 100%;
    height: 1px;
    width: 80%;        /* 使用100%宽度覆盖父元素 */
    left: 0;
    right: 0;
    margin: 0 auto;
    background: #3498db
}

.background-alt {
    background: #f2f2f5
}

.background-alt-nth:nth-child(odd) {
    background: #f2f2f5
}

.background-alt-nth:nth-child(even) {
    background: #ececec
}

#lead {
    position: relative;
    height: 100%;   /* 使用视口高度确保全屏覆盖 */
    min-height: 500px;     /* 保留最小高度 */
    /* max-height: 1080px; */
    background: url(../assets/lead-bg.jpg) no-repeat center/cover;
    background-repeat: no-repeat; /* 禁止重复 */
    background-size: cover;
    background-position: center;  
    background-attachment: scroll;
    padding: 15px;
    width: 100%;
    object-fit: cover;
    overflow: hidden;
}

#lead::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: linear-gradient(to bottom, rgb(238, 122, 107), rgb(250, 148, 241));
    background-attachment: scroll; /* 新增 */
    background-position: center -100px;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}


#lead {
    transition: all 0.5s ease .1s;
}

#lead:hover::before {
    opacity: 0.09;
}

#lead:hover {
    transform: scale(1.02);
    -webkit-filter: blur(5px);
    /* 添加毛玻璃效果 */
    /* Chrome, Opera */
    -moz-filter: blur(0.2px);
    -ms-filter: blur(0.2px);
    filter: blur(0.2px);
    background-attachment: fixed;
}

#lead-content {
    position: absolute;
    z-index: 10;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center
}

#lead-content h1,
#lead-content h2 {
    margin: 0
}

#lead-content h1 {
    color: #fff;
    font-weight: 900;
    font-size: 5em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 0.9em
}

#lead-content h2 {
    color: #a0cfee;
    font-weight: 500;
    font-size: 2.25em;
    margin-bottom: 15px
}

#lead-overlay {
    position: absolute;
    height: 100%;
    width: 100%;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(236, 155, 141, 0);
    z-index: 1
}

#lead-down {
    position: absolute;
    left: 0;
    right: 0;
    width: 100%;
    text-align: center;
    z-index: 10;
    bottom: 15px;
    color: #fff
}

#lead-down span {
    cursor: pointer;
    display: block;
    margin: 0 auto;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 3px solid #a0cfee;
    text-align: center
}

#lead-down i {
    animation: pulsate 1.5s ease;
    animation-iteration-count: infinite;
    padding-top: 5px
}

.modal-image {
    position: relative;
}

.nav-btn {
    position: absolute;     /* 定位按钮需要更改位置有点偏 */
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    padding: 15px;
    cursor: pointer;
    font-size: 24px;
    border-radius: 50%;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.nav-btn:hover {
    opacity: 1;
}

#btn-prev {
    left: 20px;
}

#btn-next {
    right: 20px;
}

#video-prev{
    left: 20px;
}

#video-next{
    right: 20px;
}

@keyframes pulsate {
    0% {
        transform: scale(1, 1)
    }

    50% {
        transform: scale(1.2, 1.2)
    }

    100% {
        transform: scale(1, 1)
    }
}

#about {
    padding: 75px 15px;
    border-bottom: 1px solid #dcd9d9;
    text-align: center
}

#about .container {
    margin-top: 1rem
}

#about .portrait {
    width: 15rem;
    height: 15rem;
    border-radius: 50%; /*将元素变为圆形​（因为宽度和高度相等）*/
    margin-bottom: 1.5rem;
    object-fit: cover;
    object-position: center - 10px; /* 确保头像在容器中居中显示 */
}

#about h2 {
    color: #374054
}

#about .vertical-center {
    height: 15rem;
    display: flex
}

#about p {
    text-align: left;
    color: #74808a;
    margin: 0;
    align-self: center
}

#experience {
    padding: 50px 15px;
    text-align: center;
    border-bottom: 1px solid #dcd9d9
}

#experience h2 {
    color: #374054
}

#experience-timeline {
    margin: 30px auto 0 auto;
    position: relative;
    max-width: 1000px
}

#experience-timeline:before {   /*贯穿容器顶部到底部的实线*/
    position: absolute;
    content: '';
    top: 0;
    bottom: 0;
    left: 303px;
    right: auto;
    height: 100%;
    width: 3px;
    background: #1985cd;
    z-index: 0
}

#experience-timeline:after {        /*贯穿容器底部的渐变线*/
    position: absolute;
    content: '';
    width: 3px;
    height: 40px;
    background: #3498db;
    background: linear-gradient(to bottom, #3498db, rgba(52, 152, 219, 0));
    top: 100%;
    left: 303px
}

.vtimeline-content {
    margin-left: 350px;
    background: #fff;
    border: 1px solid #e6e6e6;
    padding: 15px;
    border-radius: 3px;
    text-align: left
}

.vtimeline-content h3 {
    font-size: 1.5em;
    font-weight: 300;
    color: #374054;
    display: inline-block;
    margin: 0
}

.vtimeline-content .header-row {
    display: flex;
    justify-content: space-between; /* 左右两端对齐 */
    align-items: center; /* 垂直居中 */
    /* margin-bottom: 15px; 保留底部间距 */
}

.vtimeline-content h4 {
    font-size: 1.2em;
    font-weight: 300;
    color: #7e8890;
    margin: 0 0 15px 0
}

.vtimeline-content h5 {
    font-size: 1.2em;
    font-weight: 300;
    color: #7e8890;
    margin: 0; /* 清除原有下边距 */
    /* float: right; */
    margin: 0 0 15px 0       
    /* 上=0, 右=0, 下=15px, 左=0 */
}

.vtimeline-content p {
    color: #74808a;
    font-size: 0.9em;
    margin: 0
}

.vtimeline-point {
    position: relative;
    display: block;
    vertical-align: top;
    margin-bottom: 30px
}

.vtimeline-icon {
    position: relative;
    color: #fff;
    width: 50px;
    height: 50px;
    background: #3498db;
    border-radius: 50%;
    float: left;
    z-index: 99;
    margin-left: 280px
}

.vtimeline-icon i {
    display: block;
    font-size: 2em;
    margin-top: 10px
}

.vtimeline-date {
    width: 260px;
    text-align: right;
    position: absolute;
    left: 0;
    top: 10px;
    font-weight: 300;
    color: #374054
}

#education {
    padding: 50px 15px 20px 15px;
    border-bottom: 1px solid #dcd9d9;
    text-align: center
}

#education h2 {
    color: #374054;
    margin-bottom: 50px
}

.education-block {
    max-width: 700px;
    margin: 0 auto 30px auto;
    padding: 15px;
    border: 1px solid #dcd9d9;
    text-align: left
}

.education-block h3 {
    font-weight: 500;
    float: left;
    margin: 0;
    color: #374054
}

.education-block span {
    color: #8a7478;
    float: right
}

.education-block h4 {
    color: #74808a;
    clear: both;
    font-weight: 600;
    font-size: 1.0em;
    margin: 0 0 15px 0
}

.education-block p,

.education-block ul {
    margin: 0;
    color: #74808a;
    font-size: 0.9em
}

.education-block ul {
    padding: 0 0 0 15px
}

#projects {         /* ​**#projects 容器** */
    padding: 50px 15px;
    border-bottom: 1px solid #dcd9d9;
    text-align: center
}

#projects h2 {
    color: #374054;
    margin-bottom: 50px
}

#projects .container {      /* 项目容器** */
    display: flex;     /* 启用弹性布局 */
    flex-wrap: wrap;
    justify-content: center;
    align-items: center
}


.project {         /* 项目容器 .project */
    position: relative;
    min-width: 300px;
    height: 300px;
    max-width: 900px;
    margin: 0 15px 30px 15px;
    overflow: hidden;
    background: #fff;
    border-radius: 4px
}

/* 新增CSS */
.project-content {
    display: flex; 
    gap: 20px;
    align-items: flex-start;
}
.project-text { 
    flex: 1; 
    text-align: left; 
}

.project-content { flex-direction: column; height: 100%; width: 100% /* 容器需明确高度 */}    /* 子元素垂直排列 */
.project-image { display: block; width: 100%; height: 90%}     /* 图片宽度占满容器 */
.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 关键属性：裁剪多余部分 */
}
.project-text {
    font-size: 0.9em;
    height: 10%;
    text-align: center; /* 文字居中 */
    margin-top: -45px; /* 与图片间距 */
}    

.project-game {
    position: relative;
    max-width: 900px;
    height: 300px;
    margin: 0 auto 30px auto;
    overflow: hidden;
    background: #fff;
    border-radius: 4px;
    display: flex
}

.project-game .project-image {
    width: 300px;
    height: 300px;
    object-fit: cover;
    overflow: hidden;
    flex-shrink: 0
}

.project-game .project-image img {
    width: 100%
}

.project-info {
    align-self: center;
    flex-grow: 1;
    padding: 15px
}

.project-info h3 {
    font-size: 1.5em;
    font-weight: 300;
    color: #1958e0;
    margin: 0 0 15px 0
}

.project-info p {
    color: #74808a;
    margin: 0 0 15px 0;
    font-size: 0.9em
}

.no-image .project-info {
    position: relative;
    margin: 0;
    padding: 30px 15px;
    transform: none
}

#more-projects {
    display: none
}

.project-image .image {     /* 项目图片容器 */
    cursor: pointer;
    transition: 0.3s
}

.project-image .image:hover {       /* 鼠标悬停时的效果 */
    opacity: 0.8; /* 透明度变化 */
    /* 增加fantastic效果 */
    scale: 1.05; /* 放大效果 */
    transform: translateY(-5px); /* 向上移动5px */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1), 0 6px 6px rgba(0, 0, 0, 0.1); /* 添加阴影 */
    border-radius: 4px; /* 圆角效果 */
    transition: all 0.3s ease; /* 平滑过渡 */
    filter: brightness(1.1); /* 亮度降低 */
}

.project-video img {     /* 项目图片容器 */
    width: 100%;
    height: 100%;
    object-fit: cover; /* 关键属性：裁剪多余部分 */
    cursor: pointer;
    transition: 0.3s
}

.project-video .image:hover {       /* 鼠标悬停时的效果 */
    opacity: 0.8; /* 透明度变化 */
    /* 增加fantastic效果 */
    scale: 1.05; /* 放大效果 */
    transform: translateY(-5px); /* 向上移动5px */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1), 0 6px 6px rgba(0, 0, 0, 0.1); /* 添加阴影 */
    border-radius: 4px; /* 圆角效果 */
    transition: all 0.3s ease; /* 平滑过渡 */
    filter: brightness(1.1); /* 亮度降低 */
}

.project-text {
    cursor: pointer;
    transition: 0.3s
}

.project-text:hover {
    opacity: 0.7;
    /* 增加fantastic效果 */
    scale: 1.05; /* 放大效果 */
    transform: translateY(-2px); /* 向上移动5px */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1), 0 6px 6px rgba(0, 0, 0, 0.1); /* 添加阴影 */
    border-radius: 4px; /* 圆角效果 */
    transition: all 0.3s ease; /* 平滑过渡 */
    filter: brightness(1.1); /* 亮度降低 */    
}

.project-video .image {
    cursor: pointer;
    transition: 0.3s
}

.project-video .image:hover {
    opacity: 0.7
}

.project-glb .image {
    cursor: pointer;
    transition: 0.3s
}

.project-glb .image:hover {
    opacity: 0.7
}

.overlay-viewer {
    display: none;
    position: fixed;
    z-index: 100;
    padding-top: 60px;      /* 减少顶部间距 */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: #000;
    background-color: rgba(0, 0, 0, 0.9)
}

/* 新增：模态内容容器（Flex布局） */
.modal-container {
    position: relative;
    display: flex;
    flex: 1; 
    min-height: 0;      /* 修复Flex容器高度塌陷 */
    margin: 0 auto;
    background: #222;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.7);
}

.modal-container-video {
    position: relative;
    display: flex;  
    flex: 1;
    min-height: 0;      /* 修复Flex容器高度塌陷 */
    margin: 0 auto;
    flex-direction: column;
    overflow: hidden;
    border-radius: 8px;
}    

/* 图片区域样式 */
.modal-image {
    flex: 1;
    min-width: 50%;
}
.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* 保持图片比例完整显示 */
    margin: 0 auto;
}
/* 视频样式 */
.modal-video {
  position: relative;
  width: 100%; 
  padding-top: 56.25%; 
  background: #000;
}

.modal-video video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain; /* 关键！保持比例完整显示 */
}


/* 新增：文字描述区域 */
.description-panel {
    flex: 0 0 30%;
    padding: 25px;
    color: #eee;
    overflow-y: auto;
    background: rgba(30, 30, 30, 0.95);
    border-left: 1px solid #444;
}
.description-panel h3 {
    margin-top: 0;
    color: #4fc3f7;
    border-bottom: 1px solid #555;
    padding-bottom: 10px;
}


.modal-content {
    margin: auto;
    display: block;
    width: 85%;
    max-width: 1200px
}

.modal-content {
    animation-name: zoom;
    animation-duration: 0.6s
}

.glb-content {
    margin: auto;
    display: block;
    width: 85%;
    height: 85%;
    max-width: 1200px;
    background: #fff;
    animation-name: zoom;
    animation-duration: 0.6s
}

.highlight {
    font-weight: bold;
    font-style: italic;
    color: #0585d5;
}

@keyframes zoom {
    from {
        transform: scale(0)
    }

    to {
        transform: scale(1)
    }
}

.overlay-viewer .close {
    position: absolute;
    z-index: 9999; /* 设置足够高的值 */
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 8rem;
    font-weight: bold;
    transition: 0.3s
}

.overlay-viewer .close:hover,
.overlay-viewer .close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer
}

@media only screen and (max-width: 700px) {
    .modal-content {
        width: 100%
    }
}

#skills {
    padding: 50px 15px;
    text-align: center
}

#skills h2 {
    color: #374054;
    margin-bottom: 50px
}

#skills ul {
    display: block;
    margin: 0 auto;
    padding: 0;
    max-width: 800px
}

#skills li {
    display: inline-block;
    margin: 7px;
    padding: 5px 10px;
    color: #374054;
    background: #e4e4ea;
    list-style: none;
    cursor: default;
    font-size: 1.2em
}

#contact {
    padding: 50px 15px;
    background: #3498db;
    text-align: center
}

#contact h2 {
    margin: 0 0 15px 0;
    color: #fff;
    font-weight: 500
}

#contact-form {
    max-width: 500px;
    margin: 0 auto;
    text-align: left
}

#contact-form input,
#contact-form textarea {
    display: block;
    width: 100%;
    padding: 10px;
    border-radius: 4px;
    border: none;
    margin-bottom: 10px;
    background: #1d6fa5;
    color: #fff;
    transition: .5s ease all
}

#contact-form input::-webkit-input-placeholder,
#contact-form textarea::-webkit-input-placeholder {
    color: #fff
}

#contact-form input:-moz-placeholder,
#contact-form textarea:-moz-placeholder {
    color: #fff;
    opacity: 1
}

#contact-form input::-moz-placeholder,
#contact-form textarea::-moz-placeholder {
    color: #fff;
    opacity: 1
}

#contact-form input:-ms-input-placeholder,
#contact-form textarea:-ms-input-placeholder {
    color: #fff
}

#contact-form input:focus,
#contact-form textarea:focus {
    outline: none;
    background: #16527a
}

#contact-form textarea {
    height: 150px;
    resize: none
}

#contact-form button {
    display: block;
    width: 100%;
    background: #fff;
    border-radius: 4px;
    padding: 5px 10px;
    border: none;
    color: #3498db;
    font-weight: 700;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
    transition: .5s ease all
}

#contact-form button:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23)
}

#contact-form article {
    font-size: 2rem;
    color: #f2f2f5
}

#contact-form article span {
    margin-left: 2rem
}

.optional-section {
    padding: 50px 15px;
    text-align: center;
    border-top: 1px solid #dcd9d9
}

.optional-section h2 {
    color: #374054
}

.optional-section-block {
    max-width: 700px;
    margin: 0 auto 30px auto;
    padding: 15px;
    border: 1px solid #dcd9d9;
    background: #fff;
    text-align: left
}

.optional-section-block h3 {
    font-weight: 500;
    margin: 0 0 15px 0;
    color: #374054
}

.optional-section-block h4 {
    color: #74808a;
    clear: both;
    font-weight: 500;
    margin: 0 0 15px 0
}

.optional-section-block p,
.optional-section-block ul {
    margin: 0 0 15px 0;
    color: #74808a;
    font-size: 0.9em
}

.optional-section-block ul {
    padding: 0 0 0 15px
}

/* github格式 */
.github-link {
    display: inline-flex;
    align-items: center;
    padding: 8px 15px;
    border-radius: 4px;
    color: #f2f2f5; /* GitHub文字颜色 */
    background: transparent !important; /* 关键修改：背景透明 */
    transition: all 0.3s; /* 平滑过渡效果 */
    border: none !important; /* 强制清除边框 */
}
.github-link:hover {
    background: transparent !important; /* 关键修改：背景透明 */
    transform: translateY(-2px); /* 轻微上浮效果 */
    box-shadow: 0 4px 8px rgba(244, 239, 239, 0.1); /* 悬停阴影 */
    border: none !important; /* 确保悬停状态无边框 */
}
.github-link i {
    margin-left: 0px;   /* 图标与文字间距 */
    font-size: 1.2em;     /* 放大图标 */
}

a:hover .fa-github, 
a:hover span {
    color: #6e5494; /* GitHub主题紫色 */
    transform: scale(1.5); /* 轻微放大 */
    transition: all 0.3s ease;
}

@media only screen and (max-width: 750px) {

    #experience-timeline:before,
    #experience-timeline:after {
        left: 23px
    }

    .vtimeline-date {
        width: auto;
        text-align: left;
        position: relative;
        margin-bottom: 15px;
        display: block;
        margin-left: 70px
    }

    .vtimeline-icon {
        margin-left: 0
    }

    .vtimeline-content {
        margin-left: 70px
    }
}

@media only screen and (max-width: 992px) {
    #lead {
        /* height: 100vh; 使用视口高度确保全屏覆盖 */
        height: 100%;   /* 使用视口高度确保全屏覆盖 */
        min-height: 500px; /* 保留最小高度 */
        max-height: auto;
        padding: 100px 15px        /* ​上下内边距​：100px, 左右内边距​：15px */
        /* background-repeat: no-repeat; 禁止重复 */
        /* background-size: auto 100%; 关键修改：高度100%填充，宽度自适应 */
        /* background-position: center;  */
        /* overflow: hidden; 隐藏溢出的左右部分  */
    }

    #lead-content {
        position: relative;
        transform: none;
        left: auto;
        top: auto
    }

    #lead-content h1 {
        font-size: 3em
    }

    #lead-content h2 {
        font-size: 1.75em
    }

    #about {
        text-align: center
    }

    #about p {
        text-align: left
    }
}

@media only screen and (max-width: 768px) {
    header {
        position: fixed;        
        display: none;      
        z-index: 999;
        animation: none;
        bottom: 0;
        height: 100%
    }

    #mobile-menu-open,
    #mobile-menu-close {           /* 用于触发移动菜单的展开/关闭 */
        display: block
    }

    .modal-container {
        position: relative;
        display: flex;  
        flex: 1;
        min-height: 0;      /* 修复Flex容器高度塌陷 */
        margin: 0 auto;
        flex-direction: column;
        height: 100vh;  /* 父容器占满视口 */
        overflow: hidden;
        border-radius: 8px;
    }

    .modal-container-video {
        position: relative;
        display: flex;  
        flex: 1;
        min-height: 0;      /* 修复Flex容器高度塌陷 */
        margin: 0 auto;
        flex-direction: column;
        overflow: hidden;
        border-radius: 8px;
    }    
    
    .description-panel {
        min-height: 0; /* 关键修复：阻止内容无限扩展 */
        flex: 0 0 30%;
        overflow-y: auto; /* 允许滚动 */
        overscroll-behavior: contain; /* 防止滚动链干扰 */
        -webkit-overflow-scrolling: touch; /* iOS设备平滑滚动 */
    }    

    .modal-image {
        position: relative;
    }    
    /* 图片区域样式 */
    .modal-image {
        flex: 1;
        min-width: 0%;
        display: flex; /* 新增：启用Flex布局 */
        justify-content: safe center; /* 自动切换对齐方式 */
        align-items: center; /* 垂直居中 */
        overflow-y: hidden; /* 禁止垂直滚动 */
        overflow-x: auto; /* 关键：启用横向滚动条 */
        flex-shrink: 0; /* 禁止收缩，保持原始宽度 */
        scroll-behavior: smooth; /* 平滑滚动 */
        -webkit-overflow-scrolling: touch; /* 优化移动端滚动 */
    }
    .modal-image img {
        width: auto; /* 关键修改：宽度自适应 */
        height: 90%;
        object-fit: contain; /* 完整显示图片，避免裁剪 */
        margin: 0 auto;
    }

    /* 视频样式 */
    .modal-video {
        position: relative;
        width: 100%; 
        padding-top: 75%;
        background: #000;
    }

    .modal-video video {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: contain; /* 关键！保持比例完整显示 */
    }    

    #menu {
        height: 100%;
        overflow-y: auto;
        box-shadow: none;
        border-radius: 0;
        width: 100%
    }

    #menu li {
        display: block;
        margin-bottom: 10px
    }

    #lead-content h1 {
        font-size: 2em
    }

    #lead-content h2 {
        font-size: 1.3em
    }

    #lead-content a {
        padding: 10px 20px
    }

    #lead-down {
        display: none
    }

    .education-block h3,
    .education-block span {
        float: none
    }

    .project-content { flex-direction: column}    /* 子元素垂直排列 */
    .project-image { display: block; width: 100%; height: 90%}     /* 图片宽度占满容器 */
    
    .project-image img {
        width: 100%;
        height: 100%;
        object-fit: cover; /* 关键属性：裁剪多余部分 */
    }
    .project-text {
        text-align: center; /* 文字居中 */
        margin-top: -45px; /* 与图片间距 */
    }    

    .overlay-viewer {
    display: none;
    position: fixed;
    z-index: 100;
    padding-top: 60px;      /* 减少顶部间距 */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: #000;
    background-color: rgba(0, 0, 0, 0.9)
    }

    .project-info {
        position: relative;
        margin: 0;
        padding: 30px 15px;
        top: auto;
        transform: none
    }

    .project-game .project-image {
        display: none
    }

    footer {
        text-align: center
    }

    .social {
        text-align: center
    }
}

 @media only screen and (max-width: 480px) {     /* 仅对屏幕设备生效（排除打印机等） */
                                                /* 当屏幕宽度≤480px时生效（典型手机尺寸） */
    #lead-content h1 {
        /* ​主标题字体缩小至1.5em（默认值约24px → 调整后约24px） */
        font-size: 1.5em
    }

    #lead-content h2 {
        /* ​副标题字体缩小至1em（默认值约16px → 调整后约16px） */
        font-size: 1em
    }

    #lead-content a {
        /* ​按钮字体缩小至0.9em（约14.4px），​内边距减小（更紧凑） */
        font-size: 0.9em;
        padding: 5px 10px
    }
}