/* Basic Reset & Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth; /* Enable smooth scrolling */
}

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', Source Han Sans,sans-serif; /* Common font stack */
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    /* padding: 0 20px; */
}

h1, h3 {
    margin-bottom: 1rem;
}

/* h2 {
    text-align: center;
    font-size: 2.2rem;
    color: #333;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 10px;
} */

/* Add a simple underline effect for section titles */
/* h2::after {
    content: '';
    display: block;
    height: 1px;
    background-color: #C4C4C4; 
    margin: 24px auto 0;
} */

a {
    color: #0055F0;
    text-decoration: none;
}

a:focus {
    color: #0055F0;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

.content-section {
    padding: 60px 0;
}

.alt-bg {
    background-color: #f8f9fa; /* Light grey background for alternating sections */
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.3s ease;
    font-size: 0.9rem;
}

.btn-primary {
    background-color: #0055F0;
    color: #fff;
}

.btn-primary:hover {
    background-color: #0047CA;
    text-decoration: none;
    color: #fff;
}

.btn-secondary {
    background-color: #0055F0;
    color: #fff;
}

.btn-secondary:hover {
    background-color: #0047CA;
     text-decoration: none;
     color: #fff;
}

/* 章节标题和图标 */
.section-header {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0px 0px 16px 0px;
    gap: 16px;
    border-width: 0px 0px 1px 0px;
    border-style: solid;
    border-color: #C4C4C4;
}

.title-icon {
    width: 80px;
    height: 80px;
}
.section-header h2 {
    font-size: 2rem; 
    color: #333;
    text-align: center;
    margin: 0;
}

/* banner */
#banner1 {
    background-image: url('image/banner1.jpg'); /* --- RESPONSIVE CHANGE --- Background directly on section */
    background-size: cover;
    background-position: center center;
    color: #333;
    text-align: left; /* --- RESPONSIVE CHANGE --- Align content left */
    max-height: 100vh; /* --- RESPONSIVE CHANGE --- Adjusted height */
    display: flex;
    flex-direction: column; /* Stack content and stats */
    justify-content: center; /* Center vertically */
    align-items: flex-start; /* Align items to the start (left) */
    padding: 100px 0 60px; /* Add padding */
    position: relative; /* Needed for potential overlay */
    gap: 40px; /* --- RESPONSIVE CHANGE --- Reduced default gap */
    max-width: 100%; /* --- RESPONSIVE CHANGE --- Allow banner to be full width */
    margin: 0 auto 100px auto;/* Remove top/bottom margin, center if needed */
}

/* #banner1 {
    background-image: url('image/banner1.jpg');
    background-size: cover;
    background-position: center center;
    color: #333; 
    text-align: center;
    min-height: 60vh;
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    max-width: 1200px;
    margin: 100px auto;
    gap: 406px;
} */
/* Add a subtle overlay if needed to improve text readability */
/* #banner1::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 900px;
    background-image: url('image/banner1.jpg');
    z-index: 1;
} */

/* #banner1 .banner1-content {
    position: relative;
    z-index: 2;
    max-width: 700px; 
    text-align: left;
} */

#banner1 .banner1-content {
    position: relative;
    z-index: 2; /* Ensure content is above overlay if used */
    max-width: 700px; /* Limit text width */
    margin-left: calc((100% - 1200px) / 2 + 15px); /* --- RESPONSIVE CHANGE --- Align with container roughly */
}

@media (max-width: 1230px) { /* 1200px container + 15px padding each side */
    #banner1 .banner1-content {
        margin-left: 15px; /* Align with container padding */
        margin-right: 15px;
    }
}

.default-text { 
    color: #333; /* 深灰色 */
}  
.name-text { 
    color: #0055F0; /* 蓝色 */
}   

#banner1 h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

#banner1 p {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #999;
}

#banner1 h2 {
    font-size: 1.8rem;
    font-weight: 300;
    letter-spacing: 2px;
    color: #eee; 
}
#banner1 h2::after {
    display: none; 
}

.hero-stats {
    border-radius: 16px;
    display: flex;
    flex-wrap: wrap; 
    justify-content: space-evenly; 
    align-items: center;
    padding: 24px;
    background: rgba(255, 255, 255, 0.5);
    box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.1); 
    z-index: 2; 
    gap: 24px;
    width: calc(100% - 30px); 
    max-width: 1200px; 
    margin: 0 auto; 
    position: relative;
    bottom: -140px;
    backdrop-filter: blur(6px);
    border: 1px solid #ffffff;
}

.stat-item {
    text-align: center;
    /* background: rgba(255, 255, 255, 0.1);  */
    padding: 15px 30px;
    border-radius: 8px;
    min-width: 150px;
}

.stats-line {
    width: 1px;
    height: 90px;
    background-color: #c4c4c4;
}

/* --- 响应式更改 --- 当可能发生堆叠时，在较小的屏幕上隐藏线条 */
@media (max-width: 768px) {
    .stats-line {
        display: none;
    }
    .hero-stats {
        justify-content: space-around; /* 包裹时调整间距 */
    }
}
@media (max-width: 480px) {
    .hero-stats {
       flex-direction: column; /* 在非常小的屏幕上垂直堆叠 */
       align-items: center;
       gap: 15px;
    }
     .stat-item {
        width: 80%; /* 堆叠时占用更多宽度 */
        max-width: none;
        min-width: 0;
        padding: 10px;
    }
}

.stat-item h3 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 5px;
    font-weight: bold;
}
.stat-item h3 .unit {
    font-size: 1.5rem;
    font-weight: normal;
    margin-left: 5px;
}


.stat-item p {
    font-size: 0.9rem;
    color: #ddd;
    margin: 0;
}

/* 关于我 */
#about .about-content {
    display: flex;
    align-items: flex-start; /* Align items to the top */
    gap: 40px; /* Space between image and text */
    margin-top: 60px;
}


#about .about-image {
    /* flex-basis: 200px; Fixed width for the image container */
    flex-shrink: 0;
    text-align: center;
}

#about .about-image img {
    width: 280px; /* Adjust size */
    height: 280px;
    border-radius: 50%; /* Make it circular */
    object-fit: cover;
    border: 5px solid #eee;
    margin: 0 auto; /* Center if flex-basis is wider */
}

.info {
    float: left;
    margin-right: 50px;
}

#about .about-text {
    flex-grow: 1; /* Allow text to take remaining space */
}
#about .about-text p {
    margin-bottom: 10px;
    color: #999;
    font-weight: n;
}

#about .about-text ol {
    list-style-position: inside;
    padding-top: 40px; /* Reset default padding */
    float: left;
}
#about .about-text ol li {
    margin-bottom: 10px;
    color: #333;
    line-height: 1.7;
}


/* 工作经历 */
.experience-list {
    margin-top: 24px;
}

.job-item {
    display: flex;
    background-color: #fff;
    padding: 40px;
    border-radius: 8px;
    margin-bottom: 24px;
    /* box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); */
    gap: 25px; /* Space between logo and details */
    align-items: flex-start;
}

.job-logo {
    /* flex-basis: 80px; Adjust as needed */
    flex-shrink: 0;
    text-align: center;
}

.job-logo img {
    max-width: 100%;
    max-height: 50px; /* Limit logo height */
    object-fit: contain;
}

.job-details {
    flex-grow: 1;
    float: left;
}

.job-details h3 {
    margin-bottom: 5px;
    color: #333;
    font-size: 1.3rem;
}

.job-details .job-title {
    color: #999;
    margin-bottom: 15px;
    font-size: 0.95rem;
}
.job-details p {
    color: #333;
    font-size: 0.95rem;
    width: 200px
}
.job-details strong {
     color: #333;
}

.job-details ol {
    padding-left: 20px;
    margin-top: 10px;
    float: left;
}

.job-details ol li {
    margin-bottom: 8px;
    color: #333;
    font-size: 16px;
}

.responsibilities .core {
    float: left;
}
/* 软件技能 */
.skills-grid {
    display: flex;
    /* grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); Responsive grid */
    /* gap: 25px; */
    margin-top: 24px;
    /* text-align: center; */
    gap: 24px 24px;
    flex-wrap: wrap;
}

/* .skill-item {
    background-color: #f8f9fa;
    padding: 16px 24px;
    border-radius: 8px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    align-items: center;
    gap: 32px;
} */

.size1 {
    width: 384px;
    height: 128px;
    border-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 32px 16px;
    gap: 32px;	
    background: #f8f9fa;
}
.size2 {
    width: 248px;
    height: 128px;
    border-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 32px 16px;
    gap: 32px;	
    background: #f8f9fa;
}

.size3 {
    width: 282px;
    height: 128px;
    border-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 32px 16px;
    gap: 32px;	
    background: #f8f9fa;
}

.size4 {
    width: 588px;
    height: 128px;
    border-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 32px 16px;
    gap: 32px;	
    background: #f8f9fa;
}
.skill-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.skills-grid img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border-radius: 12px;
}

.skills-grid span {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

/* 项目经验 */
.project-list {
    margin-top: 24px;
}

.project-item {
    display: flex;
    align-items: flex-start; /* Align items to top */
    background-color: #fff;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 24px;
    /* box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); */
    gap: 24px; /* Space between elements */
}

.project-number {
    font-size: 24px;
    font-weight: bold;
    color: #0055F0;
    flex-shrink: 0;
    width: 30px; /* Fixed width for number */
}

.project-info {
    flex-grow: 1; /* Take remaining space */
}

.project-info h3 {
    margin-bottom: 10px;
    font-size: 24px;
    color: #333;
}

.project-info p {
    font-size: 16px;
    color: #333;
    line-height: 2;
}

.project-item .btn {
    flex-shrink: 0; /* Prevent button from shrinking */
    align-self: center; /* Vertically center button */
    margin-left: auto; /* Push button to the right */
    display: flex;
    gap: 16px;
}

/* Footer */
#main-footer {
    /* background-color: #c4c4c4; Dark footer */
    color: #999;
    text-align: center;
    padding: 20px 0;
    /* margin-top: 60px; Space before footer */
    font-size: 0.9rem;
}

#main-footer p {
    margin: 0;
}


/* 响应式设计/Responsive Design */
@media (max-width: 991.98px) {
    .container {
        max-width: 720px; /* Adjust container size */
    }

    #main-header .contact-info {
        display: none; /* Hide contact info */
    }

    #banner1 h1 {
        font-size: 2.5rem;
    }
    #banner1 p {
        font-size: 1.3rem;
    }
    .hero-stats {
         gap: 15px; /* Reduce gap */
    }
    .stat-item h3 {
        font-size: 2rem;
    }
     .stat-item h3 .unit {
        font-size: 1.1rem;
    }
    .section-header h2 {
        font-size: 1.8rem; /* Slightly smaller section titles */
    }

     /* Adjust skill item base size if needed */
    .skill-item {
        flex-basis: 130px;
        min-width: 110px;
    }
}

/* Small devices (landscape phones, less than 768px) */
@media (max-width: 767.98px) {
    .container {
        max-width: 540px; /* Adjust container size */
    }
     .content-section {
        padding: 40px 0; /* Reduce section padding */
    }

    #banner1 {
        min-height: 50vh;
        padding: 80px 0 40px;
        text-align: center; /* Center text on mobile */
        align-items: center; /* Center content */
    }
    #banner1 .banner1-content {
        margin-left: 15px; /* Use padding */
        margin-right: 15px;
        text-align: center;
    }
    #banner1 h1 { font-size: 2.2rem; }
    #banner1 p { font-size: 1.1rem; }

    .hero-stats {
        padding: 20px;
        /* Already set to wrap, might adjust gap */
        gap: 15px;
    }
    .stat-item {
        min-width: 120px; /* Ensure minimum width */
    }

    #about .about-content {
        flex-direction: column; /* Stack image and text */
        align-items: center; /* Center items */
        gap: 30px;
    }
    #about .about-image {
        flex-basis: auto; /* Reset basis */
        margin-bottom: 0; /* Remove bottom margin as gap handles it */
    }
    #about .about-image img {
        width: 200px; /* Smaller image on mobile */
        height: 200px;
    }
     #about .about-text {
        text-align: left; /* Keep text left-aligned */
        width: 100%; /* Take full width */
     }
     #about .about-text .info-grid {
        justify-content: center; /* Center info items */
        text-align: center;
     }
      #about .about-text .info-grid p {
        flex-basis: 100%; /* Stack info items */
        text-align: center;
     }
     #about .about-text ol {
        padding-left: 20px;
     }

    .job-item {
        flex-direction: column; /* Stack logo and details */
        align-items: center; /* Center items */
        text-align: center;
        padding: 20px;
        gap: 20px;
    }
    .job-logo {
        flex-basis: auto; /* Reset basis */
        margin-bottom: 0;
    }
    .job-details {
        text-align: left; /* Keep details left-aligned */
        width: 100%;
    }
     .job-details ol {
         padding-left: 20px;
     }

    .project-item {
        flex-direction: column; /* Stack number/info and button */
        align-items: flex-start; /* Align content to start */
        gap: 15px;
    }
    .project-number {
        width: auto; /* Reset width */
        margin-bottom: 0;
        font-size: 1.3rem;
    }
    .project-info {
        width: 100%; /* Ensure info takes full width */
    }
    .project-item .project-buttons {
        justify-content: flex-start; /* Align button to left */
        width: 100%;
        margin-top: 10px;
    }

    /* Mobile Menu (Keep existing logic, ensure it works) */
    #main-header nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #fff;
        border-top: 1px solid #eee;
        border-bottom: 1px solid #eee;
        z-index: 1000; /* Make sure menu is on top */
    }
    #main-header nav.active {
        display: block;
    }
    #main-header nav ul {
        flex-direction: column;
    }
    #main-header nav ul li {
        margin: 0;
        text-align: center;
        border-bottom: 1px solid #eee;
    }
     #main-header nav ul li:last-child {
        border-bottom: none;
     }
    #main-header nav ul li a {
        display: block;
        padding: 15px;
        width: 100%;
    }
    #main-header nav ul li a:hover,
    #main-header nav ul li a.active {
        background-color: #f8f9fa;
    }
    #mobile-menu-toggle {
        display: block; /* Show hamburger */
    }
     #main-header .contact-info {
        display: none; /* Ensure it's hidden */
    }
    .section-header h2 {
        font-size: 1.6rem; /* Smaller section titles */
    }
    .section-header .title-icon {
        width: 50px;
        height: 50px;
    }
    .btn {
        padding: 8px 16px; /* Slightly smaller buttons */
        font-size: 0.85rem;
    }
    .skills-grid {
        gap: 15px;
    }
    .skill-item {
        flex-basis: 110px; /* Adjust size */
        min-width: 100px;
        padding: 15px 10px;
    }
    .skills-grid img {
        width: 40px;
        height: 40px;
    }
    .skills-grid span {
        font-size: 0.9rem;
    }
}

/* Extra small devices (phones, less than 576px) */
@media (max-width: 575.98px) {
     .container {
        max-width: 100%; /* Full width */
        padding: 0 10px; /* Reduce padding slightly */
     }
      #banner1 h1 { font-size: 1.8rem; }
      #banner1 p { font-size: 1rem; }

     .content-section { padding: 30px 0; } /* Further reduce section padding */

     .section-header h2 { font-size: 1.5rem; }
     .section-header { margin-bottom: 25px;}

     .hero-stats {
        padding: 15px;
     }
     .stat-item h3 {
        font-size: 1.8rem;
    }
     .stat-item h3 .unit {
        font-size: 1rem;
    }

    /* Ensure skills grid items are reasonably sized */
     .skills-grid {
        gap: 10px;
     }
     .skill-item {
        flex-basis: calc(50% - 5px); /* Aim for 2 columns */
        min-width: 0; /* Allow shrinking */
        padding: 12px 8px;
     }
     .skill-item img {
        width: 35px;
        height: 35px;
     }
     .skill-item span {
        font-size: 0.8rem;
     }

     .job-details ol, .project-info p, #about .about-text ol {
        font-size: 0.9rem; /* Adjust list/paragraph text size */
     }
     .project-info h3 {
        font-size: 1.2rem;
     }
     .job-details h3 {
        font-size: 1.2rem;
     }

     #about .about-image img {
        width: 160px;
        height: 160px;
    }

    /* Ensure mobile nav button is easily clickable */
    #mobile-menu-toggle {
        padding: 5px;
        font-size: 1.5rem; /* Make hamburger icon larger */
    }
}