body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    text-align: center;
    background-color: #f4f4f4;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background-color: #333;
    color: white;
    padding: 20px;
}

h1, h2 {
    color: #333;
}

section {
    background-color: white;
    margin: 20px auto;
    padding: 20px;
    width: 80%;
    max-width: 600px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.profile-photo {
    width: 200px;
    height: 200px;
    border-radius: 50%;  
    object-fit: cover;
    margin: 20px auto;
    display: block;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

footer {
    background-color: #333;
    color: white;
    padding: 10px;
    margin-top: auto;
}

.navbar {
    background-color: #333;
    padding: 15px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar a {
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    margin: 0 5px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.navbar a:hover {
    background-color: #555;
}

.education-item, .project-item, .experience-item {
    margin: 20px 0;
    text-align: left;
}

.experience-item ul {
    text-align: left;
    padding-left: 20px;
}

h3 {
    color: #444;
    margin-bottom: 10px;
}

.interests-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.interest-item {
    background-color: #f8f8f8;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.interest-item:hover {
    transform: translateY(-5px);
}

.interest-item h3 {
    color: #333;
    margin-bottom: 10px;
}

.interest-item p {
    color: #666;
    font-size: 0.9em;
}

.education-item {
    margin: 40px 0;
    padding: 30px;
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.education-item:hover {
    transform: translateY(-5px);
}

.education-item h3 {
    color: #2c5282;
    font-size: 1.8em;
    margin-bottom: 20px;
}

.edu-content p {
    line-height: 1.6;
    color: #444;
    margin-bottom: 20px;
    text-align: left;
}

.course-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.course-tags span {
    background-color: #e2e8f0;
    color: #2d3748;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    transition: background-color 0.2s;
}

.course-tags span:hover {
    background-color: #cbd5e0;
}

.project-title {
    color: #2c5282;
    text-decoration: none;
}

.view-details {
    font-size: 0.8em;
    color: #4299e1;
    margin-left: 10px;
}

#project-detail {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.project-header {
    text-align: center;
    margin-bottom: 40px;
}

.project-header h2 {
    color: #2c5282;
    margin-bottom: 10px;
}

.project-sections {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.section h3 {
    color: #2c5282;
    margin-bottom: 15px;
}

.image-grid {
    display: grid;
    gap: 15px;
    margin: 20px 0;
}

.three-images {
    grid-template-columns: repeat(3, 1fr);
}

.two-images {
    grid-template-columns: repeat(2, 1fr);
}

.project-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.project-img:hover {
    transform: scale(1.02);
}

.media-content {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.project-video {
    width: 100%;
    height: 200px;
    border-radius: 8px;
    object-fit: cover;
}

.component-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 20px 0;
}

.component {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.component img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    margin: 15px 0;
}

.timeline {
    position: relative;
    margin: 40px 0;
}

.timeline-item {
    margin: 30px 0;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.project-section {
    margin: 40px 0;
}

.project-section h3 {
    color: #2c5282;
    margin-bottom: 20px;
}

.project-details {
    margin-top: 20px;
    overflow: hidden;
}

.details-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.project-details.expanded .details-content {
    max-height: 1000px;
    transition: max-height 0.5s ease-in;
}

.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.image-gallery img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.2s;
}

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

.details-text {
    margin: 20px 0;
    line-height: 1.6;
    color: #444;
}

.toggle-details {
    background-color: #4299e1;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.toggle-details:hover {
    background-color: #3182ce;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin: 20px 0;
}

.project-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-card h4 {
    color: #2c5282;
    font-size: 1.4em;
    margin-bottom: 10px;
}

.project-meta {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 15px;
    font-size: 0.9em;
}

.project-meta .institution {
    color: #2c5282;
    font-weight: 500;
}

.project-meta .supervisor,
.project-meta .duration {
    color: #666;
    font-style: italic;
}

.project-meta a {
    color: #4299e1;
    text-decoration: none;
    margin-top: 5px;
}

.project-meta a:hover {
    text-decoration: underline;
}

.project-card ul {
    margin: 15px 0;
    padding-left: 20px;
    flex-grow: 1;
}

.project-card li {
    margin: 8px 0;
    color: #444;
}

.toggle-details {
    background-color: #4299e1;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: auto;
    align-self: flex-start;
}

.toggle-details:hover {
    background-color: #3182ce;
}

.experience-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.exp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.exp-header h3 {
    color: #2c5282;
    font-size: 1.4em;
    margin: 0;
}

.duration {
    color: #666;
    font-style: italic;
}

.role {
    color: #4a5568;
    font-weight: 500;
    margin-bottom: 15px;
}

.exp-description {
    color: #444;
    line-height: 1.6;
    margin-bottom: 20px;
}

.highlight {
    background-color: #f7fafc;
    padding: 15px;
    border-radius: 8px;
    color: #2d3748;
    border-left: 4px solid #4299e1;
}

.interests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

.interest-card {
    background: white;
    border-radius: 15px;
    padding: 0;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
    overflow: hidden;
}

.interest-card:hover {
    transform: translateY(-5px);
}

.interest-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

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

.interest-card:hover .interest-image img {
    transform: scale(1.05);
}

.interest-icon {
    font-size: 2.5em;
    margin: 20px 0 10px;
}

.interest-card h3 {
    color: #2c5282;
    margin-bottom: 15px;
}

.interest-card p {
    color: #444;
    line-height: 1.6;
    padding: 0 25px 25px;
}

.progress-img {
    max-height: 300px;
    object-fit: cover;
    object-position: center;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.progress-img:hover {
    opacity: 0.9;
}

.studio-img {
    max-height: 250px;
    object-fit: cover;
}

.game-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 15px;
}

.game-tags span {
    background-color: #f0f4f8;
    color: #2d3748;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.9em;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90vh;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.modal-close:hover {
    color: #bbb;
}

.welcome-text {
    font-size: 1.8em;
    color: #2c5282;
    text-align: center;
    margin: 30px 0;
    font-weight: bold;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.profile-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 250px 1fr;  /* 控制图片区域宽度为250px */
    gap: 50px;
    align-items: start;
}

.profile-image {
    width: 100%;
    max-width: 250px;  /* 限制图片最大宽度 */
}

.profile-image img {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    .three-images, .two-images, .media-content {
        grid-template-columns: 1fr;
    }
}

.image-caption {
    text-align: center;
    margin-top: 8px;
    font-weight: bold;
    font-size: 1.1em;
    color: #333333;
    padding: 5px;
    background-color: #f5f5f5;
    border-radius: 4px;
}
