/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
    color: #333;
    background-color: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0.6rem;
}

p {
    margin-bottom: 0.6rem;
}

a {
    color: #2563eb;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #1d4ed8;
}

/* Navigation */
.navbar {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0.6rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand a {
    font-size: 1.4rem;
    font-weight: 700;
    color: #333;
}

.nav-menu {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    color: #666;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #2563eb;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* Main Content */
main {
    margin-top: 55px;
    padding: 0.8rem 0;
}

/* Page Header */
.page-header {
    background: #f8fafc;
    padding: 1.2rem 0;
    text-align: center;
    margin-bottom: 1.2rem;
}

.page-title {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 0.4rem;
}

.page-subtitle {
    font-size: 1rem;
    color: #666;
}

/* Section Styling with Shadow Boundaries */
section {
    margin-bottom: 1.2rem;
    padding: 1rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.section-title {
    font-size: 1.4rem;
    color: #333;
    margin-bottom: 1rem;
    text-align: left;
}

/* Year Section in Publications */
.year-section {
    margin-bottom: 1.2rem;
}

.year-title {
    font-size: 1.6rem;
    color: #2563eb;
    margin-bottom: 1rem;
    text-align: left;
    border-bottom: 3px solid #e0e7ff;
    padding-bottom: 0.3rem;
}

/* About Section (Muyi Zhu) */
.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.2rem;
    align-items: start;
}

.about-text {
    font-size: 0.95rem;
}

.research-interests {
    list-style: none;
    margin: 0.4rem 0;
}

.research-interests li {
    margin-bottom: 0.25rem;
    padding-left: 0.6rem;
    position: relative;
}

.research-interests li::before {
    content: "•";
    color: #2563eb;
    font-weight: bold;
    position: absolute;
    left: 0;
}

.education {
    margin-top: 1rem;
}

.education h3 {
    color: #2563eb;
    margin-bottom: 0.4rem;
}

.education-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.4rem;
    padding: 0.4rem;
    background: #f8fafc;
    border-radius: 6px;
}

.school-icon {
    width: 35px;
    height: 35px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.6rem;
    color: #2563eb;
    font-size: 1rem;
    overflow: hidden;
    border: 2px solid #e0e7ff;
    flex-shrink: 0;
}

.school-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
    padding: 2px;
}

.school-icon i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.education-details p {
    margin: 0;
    line-height: 1.3;
    font-size: 0.9rem;
}

/* Internships Section */
.internships-section {
    margin-bottom: 1.2rem;
    padding: 1rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.internships-list {
    list-style: none;
    margin: 0.4rem 0;
}

.internships-list li {
    margin-bottom: 0.25rem;
    padding-left: 0.6rem;
    position: relative;
    line-height: 1.4;
    font-size: 0.9rem;
}

.internships-list li::before {
    content: "•";
    color: #2563eb;
    font-weight: bold;
    position: absolute;
    left: 0;
}

.internships-list li:last-child {
    margin-bottom: 0;
}

/* Awards Section */
.awards-section {
    margin-bottom: 1.2rem;
    padding: 1rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.awards-list {
    list-style: none;
    margin: 0.4rem 0;
}

.awards-list li {
    margin-bottom: 0.25rem;
    padding-left: 0.6rem;
    position: relative;
    line-height: 1.4;
    font-size: 0.9rem;
}

.awards-list li::before {
    content: "•";
    color: #2563eb;
    font-weight: bold;
    position: absolute;
    left: 0;
}

.awards-list li:last-child {
    margin-bottom: 0;
}

.awards-list a {
    color: #2563eb;
    text-decoration: underline;
}

.awards-list a:hover {
    color: #1d4ed8;
}

/* Profile Section */
.about-profile {
    text-align: center;
}

.profile-image {
    margin-bottom: 0.8rem;
}

.profile-photo {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #f1f5f9;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.profile-info h3 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 0.3rem;
}

.school {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 0.8rem;
}

.contact-info {
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 0.6rem;
}

.contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #f8fafc;
    border-radius: 50%;
    color: #2563eb;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.contact-icon:hover {
    background: #2563eb;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.contact-icon i {
    width: auto;
    margin: 0;
}

/* News Section */
.news-container {
    max-height: 280px;
    overflow-y: auto;
    padding-right: 8px;
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.news-item {
    padding: 0.8rem;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid #2563eb;
}

.news-date {
    display: inline-block;
    background: #2563eb;
    color: white;
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.news-item p {
    margin: 0;
    line-height: 1.4;
    font-size: 0.9rem;
}

.news-item a {
    color: #2563eb;
    text-decoration: underline;
}

.news-item a:hover {
    color: #1d4ed8;
}

/* Publications Section */
.publications-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.publication-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid #2563eb;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    gap: 1rem;
}

.publication-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.1);
}

.publication-content {
    flex: 1;
}

.publication-title {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.publication-title a {
    color: #333;
    text-decoration: none;
}

.publication-title a:hover {
    color: #2563eb;
}

.publication-meta {
    margin-bottom: 0.5rem;
}

.publication-keywords {
    margin-bottom: 0.4rem;
}

.keyword {
    display: inline-block;
    background: #e0e7ff;
    color: #3730a3;
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
    font-size: 0.75rem;
    margin-right: 0.3rem;
    margin-bottom: 0.25rem;
}

.publication-authors {
    color: #666;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.publication-journal {
    color: #888;
    font-style: italic;
    font-size: 0.8rem;
    margin-bottom: 0.4rem;
}

.publication-image {
    width: 180px;
    height: 140px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid #e2e8f0;
}

.publication-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    background: #fff;
    padding: 4px;
}

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

.publication-image-placeholder {
    font-size: 1.5rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* Portfolio Section */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.portfolio-item {
    background: #f8fafc;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 4px solid #2563eb;
    cursor: pointer;
}

.portfolio-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.portfolio-image {
    aspect-ratio: 3508 / 2481;
    height: auto;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
    transition: transform 0.3s ease;
}

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

.portfolio-image-placeholder {
    font-size: 2rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.portfolio-info {
    padding: 0.8rem;
}

.portfolio-info h3 {
    color: #333;
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.portfolio-date {
    color: #2563eb;
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
}

.portfolio-description {
    color: #666;
    line-height: 1.4;
    font-size: 0.85rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 0.85rem;
}

.btn-primary {
    background: #2563eb;
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
    color: white;
}

.btn-outline {
    background: transparent;
    color: #2563eb;
    border: 2px solid #2563eb;
}

.btn-outline:hover {
    background: #2563eb;
    color: white;
}

.text-center {
    text-align: center;
}

/* Footer */
.footer {
    background: #f8fafc;
    padding: 1rem 0;
    margin-top: 1.2rem;
    text-align: center;
    color: #666;
}

/* Visitors & Map (removed) */

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 55px;
        flex-direction: column;
        background-color: #fff;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 1rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .about-profile {
        order: -1;
    }

    .publication-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.6rem;
    }

    .publication-image {
        width: 100%;
        height: 140px;
        align-self: center;
    }

    .internships-section,
    .awards-section {
        padding: 0.8rem;
        margin-bottom: 1rem;
    }

    .internships-list li,
    .awards-list li {
        margin-bottom: 0.2rem;
        font-size: 0.85rem;
        padding-left: 0.5rem;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 0 12px;
    }

    section {
        padding: 0.8rem;
        margin-bottom: 1rem;
    }

    .section-title {
        font-size: 1.3rem;
    }

    .page-title {
        font-size: 1.6rem;
    }

    main {
        margin-top: 50px;
        padding: 0.6rem 0;
    }

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

    .contact-icon {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 8px;
    }

    section {
        padding: 0.6rem;
    }

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

    .btn {
        padding: 0.35rem 0.7rem;
        font-size: 0.8rem;
    }

    .page-title {
        font-size: 1.4rem;
    }

    .publication-image {
        height: 120px;
    }

    .contact-icon {
        width: 28px;
        height: 28px;
        font-size: 0.85rem;
    }
}

/* Scrollbar Styling */
.news-container::-webkit-scrollbar {
    width: 6px;
}

.news-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.news-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.news-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Project Detail Pages */
.back-link {
    margin-bottom: 1rem;
}

.back-link a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.back-link a:hover {
    color: #1d4ed8;
}

.project-date {
    color: #2563eb;
    font-weight: 500;
    font-size: 1rem;
    margin-top: 0.5rem;
}

.project-site {
    color: #475569;
    font-size: 0.95rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.project-site i {
    color: #ef4444;
}

.project-content {
    margin-top: 1rem;
}

.project-description h2 {
    color: #333;
    margin-bottom: 0.8rem;
    font-size: 1.4rem;
}

.project-description h3 {
    color: #444;
    margin: 1rem 0 0.5rem 0;
    font-size: 1.1rem;
}

.project-description p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.project-description ul {
    margin: 0.5rem 0 1rem 1.5rem;
    color: #666;
}

.project-description li {
    margin-bottom: 0.3rem;
    line-height: 1.5;
}

.project-gallery {
    margin-top: 2rem;
}

.project-gallery h2 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

/* Embedded PDF viewer for project pages */
.pdf-viewer {
    height: 900px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 1rem;
}

.gallery-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
    width: 100%;
    height: auto;
    max-height: 900px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

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

.image-placeholder {
    height: 550px;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 2rem;
}

.image-placeholder p {
    margin: 0.5rem 0 0 0;
    font-size: 0.9rem;
    color: #64748b;
}

/* Responsive Design for Project Pages */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .gallery-item img {
        max-height: 650px;
    }
    
    .image-placeholder {
        height: 400px;
    }
    
    .project-description h2 {
        font-size: 1.3rem;
    }

    .pdf-viewer {
        height: 650px;
    }
}

@media (max-width: 480px) {
    .gallery-item img {
        max-height: 450px;
    }
    
    .image-placeholder {
        height: 280px;
    }
    
    .project-description h2 {
        font-size: 1.2rem;
    }
    
    .back-link {
        margin-bottom: 0.8rem;
    }

    .pdf-viewer {
        height: 480px;
    }
}

/* Wider content area for project detail pages */
.project-content .container {
    max-width: 1400px;
}
