/* Add Apple's font stack */
:root {
    --apple-system: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Icons", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.about-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    padding-bottom: 0;
    font-family: var(--apple-system);
}

.about-container {
    padding: 2rem;
}

.profile-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.profile-info {
    text-align: center;
    flex: 1;
}

.profile-image {
    margin-left: 3rem;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.profile-image:hover {
    transform: scale(1.02);
}

.avatar {
    width: 200px;
    height: 250px;
    border-radius: 16px;
    object-fit: cover;
}

.profile-name {
    font-size: 2.5rem;
    margin: 0 auto 1rem;
    color: rgb(29, 29, 31);
    font-weight: 600;
    letter-spacing: -0.015em;  /* Apple's typical letter spacing */
    font-family: var(--apple-system);
}

.profile-email,
.profile-office {
    font-size: 1.1rem;
    color: rgb(110, 110, 115);
    margin: 0 auto 0.5rem;
    font-family: var(--apple-system);
    letter-spacing: -0.01em;
}

.profile-intro {
    font-size: 1.1rem;
    color: rgb(110, 110, 115);
    line-height: 1.4;
    max-width: 500px;
    margin: 0 auto;
    font-family: var(--apple-system);
    letter-spacing: -0.01em;
}

.about-content {
    line-height: 1.8;
    margin: 2rem 0;
    color: rgb(29, 29, 31);
    font-family: var(--apple-system);
    letter-spacing: -0.01em;
}

.about-content h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin: 2rem 0 1rem;
    letter-spacing: -0.015em;
}

.about-content p {
    margin: 1rem 0;
}

.about-content ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1rem;
}

.social-link {
    padding: 0.35rem 0.75rem;
    border-radius: 16px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-family: var(--apple-system);
    font-weight: 500;
}

/* Specific colors for each social link */
.social-links a[href*="github"] {
    background: rgb(36, 41, 47);  /* GitHub black */
}

.social-links a[href*="scholar"] {
    background: rgb(66, 133, 244);  /* Google Scholar blue */
}

.social-links a[href*="twitter"] {
    background: rgb(29, 155, 240);  /* Twitter blue */
}

.social-links a[href*="linkedin"] {
    background: rgb(0, 119, 181);  /* LinkedIn blue */
}

.social-link:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

@media (prefers-color-scheme: dark) {
    .about-wrapper {
        background: none;
    }
    .about-container {
        background: none;
    }

    .profile-name {
        color: rgb(245, 245, 247);
    }

    .profile-email,
    .profile-office,
    .profile-intro {
        color: rgb(170, 170, 170);
    }

    .about-content {
        color: rgb(245, 245, 247);
    }
}

@media (max-width: 600px) {
    .profile-section {
        flex-direction: column-reverse;
        text-align: center;
    }

    .profile-info {
        text-align: center;
        margin-top: 1rem;
    }

    .profile-image {
        margin-left: 0;
    }
}

/* Publications styles (moved outside) */
.publications-section {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
    box-sizing: border-box;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: rgb(29, 29, 31);
    font-weight: 600;
    letter-spacing: -0.015em;
}

.publications-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 100%;
}

.publication-card {
    display: flex;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: rgba(0, 0, 0, 0.05) 0px 0px 0px 1px;
    transition: transform 0.3s ease;
    cursor: pointer;
    width: 100%;
}

.publication-card:hover {
    transform: translateY(-4px);
}

.publication-image {
    width: 40%;
    min-width: 40%;
    height: 300px;
    flex-shrink: 0;
    overflow: hidden;
}

.pub-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Frame only the video, so taller text cannot create letterboxing around it. */
.publication-card.publication-card--video {
    align-items: flex-start;
    background: none;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
}

.publication-card--video:hover {
    transform: none;
}

.publication-image--video {
    align-self: flex-start;
    height: auto;
    border-radius: 12px;
}

.publication-image--video .pub-media {
    display: block;
    height: auto;
    object-fit: contain;
}

.publication-info {
    width: 60%;
    min-width: 60%;
    padding: 2rem;
    flex: none;
    overflow: hidden;
}

.publication-card--video .publication-info {
    flex: 1;
    width: auto;
    min-width: 0;
    padding: 0 0 0 2rem;
}

.publication-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    color: rgb(29, 29, 31);
    word-wrap: break-word;
}

.publication-authors {
    font-size: 1rem;
    color: rgb(110, 110, 115);
    margin-bottom: 1rem;
}

.publication-links {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.pub-link {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.9rem;
    text-decoration: none;
    transition: opacity 0.3s ease;
    margin-right: 0.5rem;
    display: inline-block;
}

.pub-link:hover {
    opacity: 0.8;
}

.pub-link.webpage {
    background: rgb(0, 113, 235);
    color: white;
}

.pub-link.arxiv {
    background: rgb(180, 0, 0);
    color: white;
}

.pub-link.github {
    background: rgb(36, 41, 46);
    color: white;
}

.pub-link.youtube {
    background: rgb(255, 0, 0);
    color: white;
}

.pub-link.pdf {
    background: rgb(0, 128, 128);
    color: white;
}

.pub-link.video {
    background: #FB7299;
    color: white;
}

.publication-conference {
    font-size: 1rem;
    color: rgb(0, 113, 235);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

@media (prefers-color-scheme: dark) {
    .section-title {
        color: rgb(245, 245, 247);
    }

    .publication-card {
        background: rgb(30, 30, 30);
    }

    .publication-title {
        color: rgb(245, 245, 247);
    }

    .publication-authors {
        color: rgb(170, 170, 170);
    }

    .publication-conference {
        color: rgb(48, 176, 255);
    }
}

@media (max-width: 600px) {
    .publication-card {
        flex-direction: column;
    }

    .publication-image,
    .publication-info {
        width: 100%;
    }

    .publication-card--video .publication-info {
        width: 100%;
        padding: 1.25rem 0 0;
    }
}

/* News and Experience shared styles */
.news-section,
.experience-section {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
    box-sizing: border-box;
}

.news-grid,
.experience-grid {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: rgba(0, 0, 0, 0.05) 0px 0px 0px 1px;
}

.news-item,
.experience-item {
    font-size: 1.1rem;
    color: rgb(110, 110, 115);
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

@media (prefers-color-scheme: dark) {
    .news-grid,
    .experience-grid {
        background: rgb(30, 30, 30);
    }

    .news-item,
    .experience-item {
        color: rgb(170, 170, 170);
    }
}

/* Add consistent spacing between sections */
.experience-section {
    margin-bottom: 2rem;
}

.projects-section {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
    box-sizing: border-box;
}

.project-abstract {
    font-size: 1rem;
    color: rgb(110, 110, 115);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

@media (prefers-color-scheme: dark) {
    .project-abstract {
        color: rgb(170, 170, 170);
    }
}

/* Add specific styles for project cards to override publication card styles */
.projects-section .publication-card {
    cursor: default;  /* Remove the pointer cursor */
    margin-bottom: 2rem;  /* ✅ New: add spacing between blocks */
}

/* Remove hover effect for project cards */
.projects-section .publication-card:hover {
    transform: none;  /* Remove the lift effect on hover */
}

.services-section {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
    box-sizing: border-box;
}

.services-grid {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: rgba(0, 0, 0, 0.05) 0px 0px 0px 1px;
}

.service-category {
    margin-bottom: 1.5rem;
}

.service-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: rgb(29, 29, 31);
    margin-bottom: 0.5rem;
}

.service-item {
    font-size: 1.1rem;
    color: rgb(110, 110, 115);
    line-height: 1.6;
    margin-bottom: 0.5rem;
    padding-left: 1rem;
}

@media (prefers-color-scheme: dark) {
    .services-grid {
        background: rgb(30, 30, 30);
    }

    .service-title {
        color: rgb(245, 245, 247);
    }

    .service-item {
        color: rgb(170, 170, 170);
    }
}
