/* Favicon and Icon Optimization - Horizontal Fit */
link[rel="icon"] {
    width: auto;
    height: 16px;
    max-width: 24px;
    object-fit: contain;
    aspect-ratio: auto;
}

link[rel="shortcut icon"] {
    width: auto;
    height: 16px;
    max-width: 24px;
    object-fit: contain;
    aspect-ratio: auto;
}

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

body {
    font-family: 'Times New Roman', Times, 'Liberation Serif', 'DejaVu Serif', Georgia, serif;
    line-height: 1.6;
    color: #1a1a1a;
    background-color: #ffffff;
    font-weight: 400;
    overflow-x: hidden;
}

a {
    color: #000000;
    text-decoration: none;
    transition: all 0.2s ease;
    border-bottom: 1px solid transparent;
}

a:hover {
    border-bottom: 1px solid #000000;
}

/* Nature journal link styling */
.nature-link {
    color: #d32f2f !important;
    display: inline-flex;
    align-items: bottom;
    text-decoration: none;
}

.nature-link:hover {
    color: #b71c1c !important;
    border-bottom: 1px solid #d32f2f !important;
}

/* Nature journal logo icon */
.nature-icon {
    height: 0.8rem;
    width: 0.8rem;
    margin-right: 0.3rem;
    vertical-align: text-bottom;
    position: relative;
    top: 0.22rem;
}

/* Container Layout */
.container {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    background-color: #ffffff;
    min-height: 100vh;
    justify-content: center;
    align-items: flex-start;
}

/* Profile Section */
.profile-section {
    width: 280px;
    background-color: transparent;
    padding: 2rem 1rem;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.profile-card {
    text-align: left;
}

.profile-image {
    width: 180px;
    height: 180px;
    margin: 0 0 1.5rem 0;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #e5e5e5;
    transition: transform 0.3s ease, border-color 0.3s ease;
    background-color: #f5f5f5;
}

.profile-image:hover {
    transform: scale(1.02);
    border-color: #000000;
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(20%);
    transition: filter 0.3s ease;
}

.profile-image:hover img {
    filter: grayscale(0%);
}

.name {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #000000;
    letter-spacing: -0.02em;
    text-align: left;
}

.title {
    font-size: 0.9rem;
    color: #666666;
    margin-bottom: 2rem;
    font-weight: 400;
    line-height: 1.4;
    text-align: left;
}

.contact-info {
    text-align: left;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    color: #333333;
}

.contact-item i {
    width: 18px;
    margin-right: 0.75rem;
    color: #666666;
    flex-shrink: 0;
}

.contact-item a {
    color: #000000;
    word-break: break-all;
    font-weight: 400;
    transition: color 0.2s ease;
}

.contact-item a:hover {
    color: #666666;
    border-bottom: none;
}

/* Main Content */
.main-content {
    flex: 1;
    max-width: 820px;
    padding: 2rem;
    background-color: #ffffff;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Hide scrollbar but keep functionality */
.main-content::-webkit-scrollbar {
    display: none;
}

.main-content {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.content-section {
    margin-bottom: 2rem;
}

.content-section h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #000000;
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
    padding-bottom: 0.2rem;
    border-bottom: 1px solid #e5e5e5;
    display: block;
    width: 100%;
}

.content-section h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #000000;
    margin: 2rem 0 1rem 0;
    letter-spacing: -0.02em;
}

.content-section h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #000000;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.content-section p {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: #333333;
    font-size: 1rem;
}

/* About Section */
.about-content {
    font-size: 1rem;
}

.about-content a {
    color: #265BA9;
}

.about-content a:hover {
    color: #1d4ed8;
    border-bottom: 1px solid #265BA9;
}

.links-section {
    margin: 1.5rem 0;
    padding: 0.8rem;
    background-color: #fafafa;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
}

.content-link {
    color: #000000;
    font-weight: 500;
    margin-right: 0.5rem;
}

.content-link:hover {
  background-color: #e3f2fd;
  color: #1565c0;
    padding: 0.25rem 0.5rem;
    border-radius: 2px;
    border-bottom: none;
}

.news-section {
    margin-top: 2rem;
}

.news-list {
    list-style: none;
    padding-left: 0;
}

.news-list > li {
    margin-bottom: 1rem;
    padding-left: 1rem;
    border-left: 2px solid #e5e5e5;
    position: relative;
    transition: border-color 0.2s ease;
}

.news-list > li:hover {
    border-left-color: #000000;
}

.news-list > li::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 0.5rem;
    width: 8px;
    height: 8px;
    background-color: #000000;
    border-radius: 50%;
}

.sub-news {
    list-style: none;
    margin-top: 0.75rem;
    padding-left: 1rem;
}

.sub-news li {
    margin-bottom: 0.5rem;
    color: #666666;
    font-size: 0.9rem;
}

/* Research Section */
.research-content {
    font-size: 1rem;
}

.research-areas {
    display: grid;
    gap: 1.5rem;
    margin: 2rem 0;
}

.research-area {
    padding: 1.5rem;
    background-color: #fafafa;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.research-area:hover {
    background-color: #f5f5f5;
    border-color: #cccccc;
    transform: translateY(-2px);
}

.research-area h4 {
    color: #000000;
    margin-bottom: 0.75rem;
}

.research-area p {
    color: #666666;
    margin-bottom: 0;
}

.publications-subsection {
    margin-top: 2rem;
}

.publications-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.publication {
    display: flex;
    gap: 2rem;
    padding: 1.5rem;
    background-color: transparent;
    border: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    align-items: center;
}

.publication:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.pub-figure {
    flex-shrink: 0;
    width: 260px;
    height: 140px;
    background-color: transparent;
    border: none;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999999;
    font-size: 0.7rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pub-figure:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.pub-figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 2px;
    background-color: transparent;
}

/* Show full content for first two papers with wider images */
.publication:nth-child(1) .pub-figure img,
.publication:nth-child(2) .pub-figure img {
    object-fit: contain;
}



/* Special handling for placeholder content */
.pub-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background-color: #f8f9fa;
    color: #666666;
    text-align: center;
    padding: 0.5rem;
    border: 2px dashed #cccccc;
    border-radius: 4px;
}

.pub-placeholder i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #dc3545;
}

.pub-placeholder span {
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.2;
}

.pub-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.pub-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.pub-title a {
    color: #265BA9;
}

.pub-title a:hover {
    color: #1d4ed8;
    border-bottom: 1px solid #265BA9;
}

.pub-authors {
    color: #666666;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    line-height: 1.4;
}

.pub-venue-name {
    font-size: 0.85rem;
    color: #333333;
    margin-bottom: 0.1rem;
    font-weight: 500;
}

.pub-venue-name a {
    color: #265BA9;
    font-weight: 400;
}

.pub-venue-name a:hover {
    color: #1d4ed8;
    border-bottom: 1px solid #265BA9;
}

.pub-venue {
    font-size: 0.85rem;
    color: #333333;
    margin-top: 0.5rem;
}

.pub-venue a {
    color: #000000;
    font-weight: 500;
    margin-right: 0.25rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.pub-venue a i {
    font-size: 0.8rem;
}

.pub-summary {
    padding: 0.75rem;
    background-color: #f8f9fa;
    border-left: 3px solid #e5e5e5;
    margin: 0.5rem 0;
    font-style: italic;
    color: #555555;
    line-height: 1.5;
    border-radius: 0 4px 4px 0;
    flex-grow: 1;
}


/* Experience Section */
.experience-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.experience-item {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    padding: 0;
    background-color: transparent;
    border: none;
    border-radius: 0;
    margin-bottom: 0.1rem;
}

.exp-content {
    flex: 1;
    min-width: 0;
    padding-right: 0.5rem;
}

.exp-image {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    background-color: transparent;
    border: none;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666666;
    font-size: 0.75rem;
    text-align: center;
    padding: 8px;
    transition: transform 0.2s ease;
    margin-left: auto;
}

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

.exp-image img {
    max-width: 80%;
    max-height: 80%;
    object-fit: cover;
    filter: grayscale(10%);
    transition: filter 0.2s ease;
}

.exp-image:hover img {
    filter: grayscale(0%);
}

/* Individual logo size customizations with proper specificity */
/* .experience-item.hms-item .exp-image {
    width: 60px !important;
    height: 60px !important;
    /* padding: 8px !important; */
    /* align-items: center;
} */

.exp-image img.logo-hms {
    width: 45px !important;
    height: 45px !important;
    max-width: 45px !important;
    max-height: 45px !important;
    align-items: center;
}

.exp-image img.logo-insilico {
    width: 50px !important;
    height: 50px !important;
    max-width: 50px !important;
    max-height: 50px !important;
    align-items: center;
}

.exp-image img.logo-yale {
    width: 40px !important;
    height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
    align-items: center;
}

.exp-image img.logo-columbia {
    width: 40px !important;
    height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
    align-items: center;
}

.exp-content h4 {
    color: #265BA9;
    margin-bottom: 0.25rem;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
}

.exp-content h4:hover {
    color: #1d4ed8;
}

.exp-location {
    font-weight: 400;
    color: #666666;
}

.exp-role {
    font-style: italic;
    font-weight: 400;
    color: #000000;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.exp-date {
    font-style: normal;
    font-weight: 400;
    color: #000000;
}

.exp-description {
    color: #333333;
    line-height: 1.7;
    font-size: 0.9rem;
}

/* Teaching Section */
.teaching-list {
    list-style-type: disc;
    padding-left: 1.5rem;
    margin-top: 1rem;
}

.teaching-list li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
    font-size: 0.95rem;
    color: #333333;
}

.teaching-list li strong {
    color: #000000;
    font-weight: 600;
}

.teaching-list li a {
    color: #265BA9;
    text-decoration: none;
    border-bottom: none;
}

.teaching-list li a:hover {
    color: #1d4ed8;
    border-bottom: 1px solid #265BA9;
}

.teaching-list li a strong {
    color: inherit;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .container {
        flex-direction: column;
        max-width: 100%;
    }
    
    .profile-section {
        width: 100%;
        min-height: auto;
        padding: 2rem 1.5rem;
        position: static;
        height: auto;
    }
    
    .main-content {
        max-width: 100%;
        padding: 2rem 1.5rem;
    }
    
    .profile-image {
        width: 160px;
        height: 160px;
    }
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
        padding: 0;
    }
    
    .profile-section {
        width: 100%;
        padding: 1rem 1.5rem 0.5rem 1.5rem;
        position: static;
        height: auto;
        text-align: left;
        background-color: #ffffff;
        border-bottom: none;
    }
    
    .profile-card {
        text-align: left;
        max-width: none;
        margin: 0;
        display: flex;
        align-items: center;
        gap: 1rem;
    }
    
    .profile-image {
        width: 60px;
        height: 60px;
        margin: 0;
        flex-shrink: 0;
    }
    
    .profile-text {
        flex: 1;
        min-width: 0;
    }
    
    .name {
        text-align: left;
        font-size: 1.2rem;
        margin-bottom: 0.25rem;
        font-weight: 600;
    }
    
    .title {
        text-align: left;
        font-size: 0.9rem;
        margin-bottom: 0;
        color: #666666;
        line-height: 1.3;
    }
    
    /* Hide contact info on mobile */
    .contact-info {
        display: none;
    }
    
    .main-content {
        width: 100%;
        padding: 1.5rem;
        max-width: 100%;
    }
    
    .content-section h2 {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }
    
    .about-content p {
        font-size: 0.9rem;
        line-height: 1.6;
    }
    
    .links-section {
        margin: 1rem 0;
        padding: 0.75rem;
        text-align: left;
        background-color: transparent;
        border: none;
        padding: 0;
    }
    
    .content-link {
        font-size: 0.85rem;
        margin-right: 0.5rem;
    }
    
    .publication {
        flex-direction: row;
        padding: 1rem;
        gap: 1.5rem;
        margin-bottom: 1.5rem;
        align-items: flex-start;
        border: none;
        border-radius: 0;
        background-color: transparent;
        padding: 1rem 0;
        border-bottom: 1px solid #e5e5e5;
    }
    
    .pub-figure {
        width: 160px;
        height: 120px;
        flex-shrink: 0;
        margin-bottom: 0;
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    
    .pub-figure img {
        border-radius: 8px;
        transition: transform 0.2s ease;
    }
    
    .pub-figure:hover img {
        transform: scale(1.02);
    }
    
    .pub-content {
        text-align: left;
        width: 100%;
        flex: 1;
        min-width: 0;
    }
    
    .pub-title {
        font-size: 0.9rem;
        line-height: 1.4;
        margin-bottom: 0.5rem;
    }
    
    .pub-authors {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }
    
    .pub-venue-name {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }
    
    .pub-venue {
        font-size: 0.8rem;
    }
    
    .pub-venue a {
        margin-right: 0.5rem;
        font-size: 0.8rem;
    }
    
    .experience-item {
        flex-direction: row;
        padding: 1rem;
        margin-bottom: 1rem;
        border: none;
        border-radius: 0;
        background-color: transparent;
        gap: 1rem;
        align-items: flex-start;
        text-align: left;
        padding: 1rem 0;
        border-bottom: 1px solid #e5e5e5;
    }
    
    .exp-image {
        width: 30px;
        height: 30px;
        margin: 0;
        align-self: flex-start;
        margin-top: 0.25rem;
    }
    
    .experience-item.hms-item .exp-image {
        width: 60px !important;
        height: 60px !important;
        align-items: center;
    }
    
    .exp-content {
        text-align: left;
        padding-right: 0;
        width: 100%;
        flex: 1;
        min-width: 0;
    }
    
    .exp-content h4 {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
        line-height: 1.3;
    }
    
    .exp-role {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }
    
    .teaching-list {
        padding-left: 1rem;
    }
    
    .teaching-list li {
        font-size: 0.85rem;
        margin-bottom: 0.5rem;
        line-height: 1.6;
    }
    
    /* Modal improvements for mobile */
    div[style*="background-color: white"] {
        width: 95% !important;
        max-width: 95% !important;
        margin: 1rem;
        max-height: 90vh;
    }
    
    div[style*="background-color: white"] pre {
        font-size: 0.8rem !important;
        line-height: 1.3 !important;
        overflow-x: auto;
        white-space: pre-wrap;
        word-break: break-all;
    }
    
    div[style*="background-color: white"] h3 {
        font-size: 1.2rem;
        margin-bottom: 0.75rem;
    }
    
    div[style*="background-color: white"] button {
        padding: 0.75rem 1rem !important;
        font-size: 0.9rem !important;
        margin: 0.25rem !important;
        width: auto;
        min-width: 80px;
    }
}

@media (max-width: 480px) {
    .profile-image {
        width: 100px;
        height: 100px;
    }
    
    .name {
        font-size: 1.1rem;
    }
    
    .title {
        font-size: 0.8rem;
    }
    
    .contact-item {
        font-size: 0.75rem;
        margin-bottom: 0.4rem;
        min-width: 100px;
    }
    
    .contact-item i {
        width: 14px;
        margin-right: 0.4rem;
        font-size: 0.75rem;
    }
    
    .content-section h2 {
        font-size: 1.2rem;
    }
    
    .content-section {
        margin-bottom: 1rem;
    }
    
    .publication {
        padding: 0.75rem;
        margin-bottom: 1rem;
        gap: 0.75rem;
    }
    
    .pub-figure {
        width: 140px;
        height: 105px;
        border-radius: 6px;
        box-shadow: 0 1px 6px rgba(0, 0, 0, 0.1);
    }
    
    .pub-figure img {
        border-radius: 6px;
    }
    
    .pub-title {
        font-size: 0.85rem;
    }
    
    .pub-authors {
        font-size: 0.75rem;
    }
    
    .pub-venue-name {
        font-size: 0.75rem;
    }
    
    .pub-venue a {
        font-size: 0.75rem;
    }
    
    .experience-item {
        padding: 0.75rem;
    }
    
    .exp-image {
        width: 35px;
        height: 35px;
    }
    
    .experience-item.hms-item .exp-image {
        width: 65px !important;
        height: 65px !important;
    }
    
    .exp-content h4 {
        font-size: 0.85rem;
    }
    
    .exp-role {
        font-size: 0.75rem;
    }
    
    .teaching-list li {
        font-size: 0.8rem;
    }
    
    /* Very small screen modal adjustments */
    div[style*="background-color: white"] {
        width: 98% !important;
        margin: 0.5rem;
        padding: 1rem !important;
    }
    
    div[style*="background-color: white"] pre {
        font-size: 0.75rem !important;
    }
    
    div[style*="background-color: white"] button {
        width: 100%;
        margin: 0.25rem 0 !important;
    }
}

/* Selection Styles */
::selection {
    background-color: #000000;
    color: #ffffff;
}

::-moz-selection {
    background-color: #000000;
    color: #ffffff;
}

/* Focus Styles */
a:focus,
button:focus {
    outline: 2px solid #000000;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    body {
        background-color: #ffffff;
        color: #000000;
    }
    
    .profile-section {
        background-color: #ffffff;
        border-right: 1px solid #000000;
    }
}