html {
    background-color: #fefefe;
}

body p, li {
    color: #454545;
    font-size: 20px;
}

body {
    font-family: Palatino, "EB Garamond", Georgia, "Times New Roman", serif
}

.row:not(#publications) a {
    text-decoration: underline;
}

.image-link {
    text-decoration: none !important;
}

/* Publication teaser images */
.pub-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
    gap: 20px;
}

.pub-teaser {
    flex-shrink: 0;
    width: 280px;
    height: 120px;
}

.pub-teaser img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background-color: white;
}

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

.pub-content {
    flex: 1;
    min-width: 0;
}

.pub-content h4 {
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.pub-content .authors {
    margin: 8px 0;
    line-height: 1.4;
}

.pub-content .venue {
    margin: 8px 0;
    font-style: italic;
}

.pub-content .links {
    margin: 12px 0;
}

.pub-content .abstract {
    margin-top: 15px;
}

/* Remove bullets from publication list items */
.pub-item {
    list-style: none;
}

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

/* Add bullets to subcategory headings */
#publications h3:before {
    content: "• ";
    font-weight: bold;
    margin-right: 8px;
}

/* Talks section styling */
.talk-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
    gap: 20px;
    list-style: none;
}

.talk-video {
    flex-shrink: 0;
    width: 280px;
    height: 157px; /* 16:9 aspect ratio for 280px width */
}

.talk-video iframe {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.talk-video iframe:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.talk-content {
    flex: 1;
    min-width: 0;
}

.talk-content h4 {
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.talk-content .venue {
    margin: 8px 0;
    font-style: italic;
    color: #666;
}

.talk-content .description {
    margin: 12px 0;
    line-height: 1.5;
}

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

/* Bio/Header section styling */
.bio-section {
    margin-bottom: 10px;
}

.bio-item {
    display: flex;
    align-items: flex-start;
    gap: 30px;
    margin-bottom: 10px;
}

.bio-photo {
    flex-shrink: 0;
    width: 280px;
}

.bio-photo img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bio-photo img:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.bio-photo .info-card {
    margin-top: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.bio-photo .info-card h5 {
    margin: 0 0 8px 0;
    font-size: 1.1em;
    font-weight: bold;
}

.bio-photo .info-card .title {
    color: #666;
    font-size: 0.95em;
    line-height: 1.4;
    margin: 0;
}

.bio-content {
    flex: 1;
    min-width: 0;
}

.bio-content h1 {
    margin-bottom: 20px;
    line-height: 1.2;
    color: #555;
}

.bio-content .contact-info {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}


/* News section styling */
.news-section {
    margin-bottom: 40px;
}

.news-section h2 {
    color: #2a5298;
    border-bottom: 2px solid #87CEEB;
    padding-bottom: 8px;
    margin-bottom: 20px;
    position: relative;
}

.news-section h2:after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: #2a5298;
}

.news-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #2a5298;
    list-style: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.news-date {
    flex-shrink: 0;
    font-weight: bold;
    font-size: 0.85em;
    color: #2a5298;
    min-width: 75px;
}

.news-content {
    flex: 1;
    line-height: 1.4;
    font-size: 0.85em;
}


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

/* Honors section styling */
.honors-section {
    margin-bottom: 40px;
}

.honors-section h2 {
    color: #2a5298;
    border-bottom: 2px solid #87CEEB;
    padding-bottom: 8px;
    margin-bottom: 20px;
    position: relative;
}

.honors-section h2:after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: #2a5298;
}

.honor-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #2a5298;
    list-style: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.honor-icon {
    flex-shrink: 0;
    font-size: 1.2em;
    color: #2a5298;
}

.honor-content {
    flex: 1;
}

.honor-content .award-name {
    font-weight: bold;
    color: #2a5298;
    margin-bottom: 4px;
}

.honor-content .award-details {
    color: #666;
    font-size: 0.9em;
    line-height: 1.4;
}


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

/* Publication links styling */
.pub-content .links a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: 8px;
    margin-bottom: 6px;
    padding: 6px 12px;
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 15px;
    text-decoration: none !important;
    font-size: 0.85em;
    font-weight: 500;
    color: #1976d2 !important;
    transition: all 0.2s ease;
}

.pub-content .links a:hover {
    background: #bbdefb;
    color: #0d47a1 !important;
    transform: translateY(-1px);
    text-decoration: none !important;
}

.pub-content .links a i {
    font-size: 0.9em;
    opacity: 0.8;
}

/* Services section styling */
.services-section {
    margin-bottom: 40px;
}

.services-section h2 {
    color: #2a5298;
    border-bottom: 2px solid #87CEEB;
    padding-bottom: 8px;
    margin-bottom: 20px;
    position: relative;
}

.services-section h2:after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: #2a5298;
}

/* Talks section styling */
#talks h2 {
    color: #2a5298;
    border-bottom: 2px solid #87CEEB;
    padding-bottom: 8px;
    margin-bottom: 20px;
    position: relative;
}

#talks h2:after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: #2a5298;
}

/* Publications section styling */
#publications h2 {
    color: #2a5298;
    border-bottom: 2px solid #87CEEB;
    padding-bottom: 8px;
    margin-bottom: 20px;
    position: relative;
}

#publications h2:after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: #2a5298;
}

/* Publication sub-category styling */
#publications h3 {
    color: #666;
    font-size: 1.7em;
    font-weight: 500;
    margin: 30px 0 30px 0;
    padding: 0;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s ease;
}

#publications h3:hover {
    color: #555;
}

#publications h3:before {
    content: '';
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 15px solid #666;
    margin-right: 12px;
    display: inline-block;
    transition: transform 0.3s ease;
    vertical-align: middle;
    margin-top: -2px;
}

#publications h3.collapsed:before {
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 15px solid #666;
    border-right: none;
    transform: rotate(0deg);
}

/* Hide content when collapsed - handled by JavaScript for better control */

/* Attribution section styling */
.attribution-section {
    margin-bottom: 30px;
}

.attribution-card {
    padding: 0;
    background: transparent;
    border: none;
    font-style: italic;
    color: #666;
    font-size: 0.9em;
    text-align: center;
    box-shadow: none;
}

.service-category {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #2a5298;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.service-category h4 {
    font-weight: bold;
    color: #2a5298;
    margin-bottom: 5px;
    font-size: 1.4em;
    margin-top: 0;
}

.service-category h4:before {
    content: "🔍 ";
    font-size: 1.1em;
}

.service-venues {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.service-venue {
    background: #e3f2fd;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.9em;
    color: #2a5298;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid #bbdefb;
}

.service-venue:hover {
    background: #bbdefb;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}


/* Modern Header Styling */
.fixed-header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    padding: 12px 0 !important;
    font-size: 16px !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.fixed-header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.fixed-header .nav-brand {
    font-weight: bold;
    font-size: 1.1em;
    color: white !important;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.fixed-header .nav-brand a {
    color: white !important;
    text-decoration: none !important;
    font-weight: bold;
    font-size: 1em;
    transition: color 0.3s ease;
    cursor: pointer;
}

.fixed-header .nav-brand a:hover {
    color: #87ceeb !important;
    text-decoration: none !important;
}

.fixed-header .nav-links {
    display: flex;
    gap: 25px;
    align-items: center;
}

.fixed-header .nav-links a {
    color: rgba(255,255,255,0.9) !important;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
}

.fixed-header .nav-links a:hover {
    color: white !important;
    background: rgba(255,255,255,0.15);
    transform: translateY(-1px);
    text-decoration: none;
}


.fixed-header .nav-links a i {
    font-size: 0.9em;
    opacity: 0.8;
}

.fixed-header .nav-links a i.ai-google-scholar {
    font-size: 1.2em;
}

/* Citation count badge */
.citation-badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background: #be3333;
    color: white;
    font-size: 11px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1;
}

.nav-links a[title*="Google Scholar"] {
    position: relative;
}

/* Responsive Design for Mobile Devices */
@media (max-width: 768px) {
    /* Mobile Header Fixes */
    .fixed-header {
        padding: 8px 0 !important;
    }
    
    .fixed-header nav {
        flex-direction: row;
        gap: 8px;
        padding: 8px 15px;
        justify-content: space-between;
        align-items: center;
    }
    
    .fixed-header .nav-links {
        gap: min(8px, 1.5vw);
        flex-wrap: nowrap;
        justify-content: flex-end;
        flex-shrink: 1;
    }

    /* Two-line name on mobile */
    .fixed-header .nav-brand a {
        font-size: 0.85em;
        line-height: 1.1;
        text-align: center;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    .fixed-header .nav-links a {
        padding: 8px 12px;
        font-size: 0.85em;
        border-radius: 15px;
    }

    /* Icons with small text labels on mobile */
    .fixed-header .nav-links a {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        text-indent: 0;
        overflow: visible;
        width: min(55px, 13vw);
        height: 60px;
        justify-content: center;
        padding: 4px 2px;
        position: relative;
        font-size: min(9px, 2.2vw);
        line-height: 1.1;
        text-align: center;
        flex-shrink: 1;
    }

    .fixed-header .nav-links a i {
        font-size: 16px;
        opacity: 1;
        margin-bottom: 2px;
    }

    .fixed-header .nav-links a i.ai-google-scholar {
        font-size: 18px;
    }

    /* Keep citation badge positioned correctly */
    .citation-badge {
        text-indent: 0;
        position: absolute;
        top: -6px;
        right: -6px;
    }

    /* Adjust body padding for mobile header (single row) */
    body {
        padding-top: 70px !important;
    }

    /* Container width adjustments */
    .container {
        width: 95% !important;
        padding: 0 10px;
    }

    /* Publications Section - Mobile Layout */
    .pub-item {
        flex-direction: column;
        gap: 15px;
        margin-bottom: 35px;
    }

    .pub-teaser {
        width: 100%;
        max-width: 300px;
        height: auto;
        margin: 0 auto;
    }

    .pub-teaser img {
        height: auto;
        max-height: 150px;
    }

    .pub-content {
        text-align: left;
    }

    .pub-content h4 {
        font-size: 1.1em;
        line-height: 1.4;
    }

    .pub-content .links a {
        margin-right: 6px;
        margin-bottom: 8px;
        padding: 8px 12px;
        font-size: 0.8em;
    }

    /* Bio Section - Mobile Layout */
    .bio-item {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .bio-photo {
        width: 100%;
        max-width: 250px;
        margin: 0 auto;
    }

    .bio-content {
        text-align: left;
    }

    .bio-content h1 {
        font-size: 1.8em;
        text-align: center;
        margin-bottom: 15px;
    }

    .bio-content h1 span {
        font-size: 0.7em;
        display: block;
        margin-top: 5px;
    }

    /* Talks Section - Mobile Layout */
    .talk-item {
        flex-direction: column;
        gap: 15px;
    }

    .talk-video {
        width: 100%;
        height: auto;
        max-width: 100%;
    }

    .talk-video iframe {
        width: 100%;
        height: 200px;
    }

    /* News Section - Mobile Optimizations */
    .news-item {
        flex-direction: column;
        gap: 8px;
        padding: 12px;
    }

    .news-date {
        min-width: auto;
        font-size: 0.8em;
        font-weight: bold;
        color: #2a5298;
    }

    .news-content {
        font-size: 0.9em;
    }

    /* Honors Section - Mobile Layout */
    .honor-item {
        flex-direction: row;
        text-align: left;
        gap: 12px;
        padding: 12px;
        align-items: flex-start;
    }

    .honor-icon {
        font-size: 1.2em;
        flex-shrink: 0;
    }

    /* Services Section - Mobile Layout */
    .service-category {
        padding: 15px;
    }

    .service-venues {
        justify-content: center;
    }

    .service-venue {
        font-size: 0.85em;
        padding: 3px 8px;
        margin: 2px;
    }

    /* Attribution Section - Mobile */
    .attribution-card {
        padding: 12px 15px;
        font-size: 0.85em;
        text-align: center;
    }

    /* Mobile Typography */
    h1 {
        font-size: 1.8em !important;
    }

    h2 {
        font-size: 1.5em !important;
        margin-bottom: 15px;
    }

    h3 {
        font-size: 1.3em !important;
    }

    h4 {
        font-size: 1.1em !important;
    }

    p, li {
        font-size: 0.95em !important;
        line-height: 1.5;
    }

    /* Modal Mobile Adjustments */
    .bib-modal-content {
        width: 95%;
        max-width: 400px;
        padding: 20px;
        max-height: 90%;
    }

    .bib-modal-text {
        font-size: 0.8em;
        padding: 15px;
    }

    /* Citation Badge Mobile Positioning */
    .citation-badge {
        top: -6px;
        right: -8px;
        font-size: 10px;
        min-width: 16px;
        height: 16px;
        padding: 1px 4px;
    }
}

/* Extra small phones (< 480px) */
@media (max-width: 480px) {
    .fixed-header .nav-links {
        gap: min(4px, 1vw);
    }
    
    .fixed-header .nav-links a {
        width: min(48px, 12vw);
        font-size: min(8px, 2vw);
    }
    
    .fixed-header .nav-links a i {
        font-size: 14px;
    }
}

/* Image popup modal */
.pub-teaser img {
    cursor: pointer;
}

.image-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.image-modal img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.image-modal:hover {
    background-color: rgba(0, 0, 0, 0.3);
}

/* Bib popup modal */
.bib-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    cursor: pointer;
    backdrop-filter: blur(3px);
}

.bib-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #1e1e1e;
    padding: 0;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    max-width: 800px;
    width: 90%;
    max-height: 80%;
    overflow: hidden;
    cursor: default;
    border: 1px solid #333;
}

.bib-modal-header {
    display: none;
}

.bib-modal-title {
    display: none;
}

.bib-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.2em;
    color: #888;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.bib-modal-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.bib-modal-text {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.85em;
    line-height: 1.6;
    color: #d4d4d4;
    background: #1e1e1e;
    padding: 25px 30px;
    border-radius: 8px;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-y: auto;
    max-height: 80vh;
    position: relative;
}

/* Custom scrollbar for bib modal */
.bib-modal-text::-webkit-scrollbar {
    width: 8px;
}

.bib-modal-text::-webkit-scrollbar-track {
    background: #2d2d2d;
}

.bib-modal-text::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 4px;
}

.bib-modal-text::-webkit-scrollbar-thumb:hover {
    background: #666;
}
