body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
    font-size: 16px;
    line-height: 1.5;
    color: #24292e;
    background-color: #ffffff;
}

.header {
    display: flex;
    gap: 25px;
    margin-bottom: 50px;
}

.profile-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
}

.header-content h1 {
    margin: 0 0 4px;
    font-size: 24px;
}

h1 .first-name {
    font-weight: 400;
}

h1 .last-name {
    font-weight: 600;
}

h1 .pronunciation {
    font-size: 16px;
    color: #586069;
    font-weight: normal;
    margin-left: 8px;
}

.header-content p,
.content p {
    margin: 0;
    color: #586069;
    font-size: 15px;
}

.header-content p a,
.content p a {
    color: #444;
    font-weight: 500;
    transition: color 0.2s;
    border-bottom: 1px dotted #666;
}

.header-content p a:hover,
.content p a:hover {
    color: #0366d6;
    border-bottom-color: #0366d6;
}

.role {
    margin-top: 2px !important;
}

.previous {
    color: #666 !important;
}

.writing-info {
    margin-top: 12px !important;
}

a {
    color: #444;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px dotted #666;
}

a:hover {
    color: #0366d6;
    border-bottom-color: #0366d6;
}

.social-links {
    margin-top: 12px;
}

.social-links a {
    color: #586069;
    margin-right: 2px;
    font-size: 16px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.social-links a:hover {
    color: #24292e;
    text-decoration: none;
}

.social-icon {
    width: 12px;
    height: 12px;
}

h1, .header-content h1 {
    font-size: 24px;
    margin: 0 0 4px;
    font-weight: 600;
}

h2 {
    font-size: 20px;
    margin: 40px 0 20px;
    font-weight: 600;
    color: #24292e;
}

h3 {
    font-size: 18px;
    margin: 0 0 8px;
    font-weight: 600;
    color: #24292e;
}

.view-all {
    margin-left: auto;
    font-size: 14px;
    color: #586069;
    font-weight: normal;
}

.project {
    margin-bottom: 25px;
}

.project p {
    margin: 0;
    color: #586069;
    font-size: 14px;
    line-height: 1.5;
}

.stats {
    color: #586069;
    font-size: 14px;
}

.stats strong {
    color: #24292e;
    font-weight: 600;
}

/* Link-style buttons with arrows */
.link-button::after,
.view-all::after,
.show-arrow::after {
    content: " →";
}

/* Link-style buttons */
.link-button,
.view-all {
    background: none;
    border-radius: 0;
    padding: 0;
    margin-right: 0;
    color: #586069;
    font-size: 14px;
    font-weight: normal;
    text-decoration: none;
    border-bottom: 1px dotted #666;
    cursor: pointer;
}

.link-button:hover,
.view-all:hover {
    color: #0366d6;
    border-bottom-color: #0366d6;
    background: none;
}

img {
    max-width: 150px;
}

p {
    margin: 0.5em 0;
}

.navigation a {
    color: black;
    margin-right: 10px;
}

em, strong {
    font-style: italic;
}

/* News list styles */
.news-list {
    margin: 20px 0;
}

.news-item {
    display: flex;
    gap: 15px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eaecef;
}

.news-date {
    font-size: 14px;
    color: #586069;
    min-width: 100px;
}

.news-content {
    color: #24292e;
    font-size: 15px;
    line-height: 1.5;
}

.hidden {
    display: none;
}

/* Publication styles */
.publication {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.pub-thumbnail {
    width: 100px;
    display: flex;
    align-items: center;
}

.pub-thumbnail img {
    width: auto;
    max-width: 100px;
    height: auto;
    max-height: 75px;
    border-radius: 4px;
}

.publication h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #24292e;
}

.publication .authors,
.publication .venue,
.teaching-meta,
.news-content {
    font-size: 14px;
    color: #586069;
}

.pub-links {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pub-links a {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    margin-right: 8px;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    color: #24292e;
    text-decoration: none;
    font-size: 14px;
}

/* Common button styling matching navbar */
.pub-links a, .bibtex-btn, .tab-button {
    display: inline-block;
    padding: 6px 12px;
    margin-right: 8px;
    background: #f6f8fa;
    border-radius: 6px;
    border: none;
    font-size: 14px;
    color: #586069;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s;
}

.pub-links a:hover, .bibtex-btn:hover, .tab-button:hover {
    color: #24292e;
    background: #eaecef;
    text-decoration: none;
}

.tab-button.active {
    color: #24292e;
    font-weight: 600;
    background: #f6f8fa;
    position: relative;
    z-index: 1;
}

/* Copy icon */
.copy-icon {
    width: 14px;
    height: 14px;
}

.pub-content {
    position: relative;  /* For absolute positioning of bibtex-content */
    flex: 1;
}

/* Navbar styles */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
}

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

.nav-links {
    display: flex;
    gap: 25px;
    margin-left: auto;
}

.nav-links a {
    color: #24292e;
    text-decoration: none;
    font-size: 15px;
    padding: 4px 8px;
    background: #f6f8fa;
    border-radius: 6px;
    transition: background 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    background: #eaecef;
    text-decoration: none;
}

/* Adjust main content to account for fixed navbar */
.content {
    margin-top: 80px;
}

/* Adjust header margin */
.header {
    margin-bottom: 40px;
}

.footer {
    margin-top: 60px;
    padding-top: 20px;
    border-top: 1px solid #e1e4e8;
}

.footer-content {
    display: flex;
    align-items: center;
    gap: 20px;
    color: #586069;
    font-size: 14px;
}

.footer .social-links {
    margin-top: 0;
    margin-left: auto;
}

.footer a {
    color: #666;
}

.footer a:hover {
    color: #0366d6;
}

/* Publications page styles */
.publications-header {
    margin-bottom: 40px;
}

.year-divider {
    font-size: 20px;
    margin: 0 0 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eaecef;
}

.publications-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Home page publication title */
.publication h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #24292e;
}

/* Research Overview styles */
.research-topics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0 40px;
}

.topic-card {
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    border: 1px solid #eaecef;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

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

.topic-card.active {
    border-color: #0366d6;
    background: #f1f8ff;
}

.topic-card h3 {
    margin: 0 0 10px 0;
    color: #24292e;
}

.topic-card p {
    margin: 0;
    color: #586069;
    font-size: 14px;
    line-height: 1.5;
}

.topic-count {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #f6f8fa;
    border: 1px solid #e1e4e8;
    border-radius: 20px;
    padding: 2px 8px;
    font-size: 14px;
    color: #586069;
}

.topic-card.active .topic-count {
    background: #0366d6;
    color: white;
    border-color: #0366d6;
}

/* Hide publications that don't match the selected topic */
.publication.hidden {
    display: none;
}

/* Teaching page styles */
.teaching-list {
    margin: 20px 0 40px;
}

.teaching-item {
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.teaching-item-content {
    flex: 1;
}

.teaching-item h3 {
    display: inline;
    font-size: 16px;
    margin: 0;
    font-weight: 600;
    color: #24292e;
}

.teaching-meta {
    color: #586069;
    font-size: 14px;
    margin-left: 8px;
}

.teaching-links {
    margin: 0;
    white-space: nowrap;
}

.teaching-links a {
    display: inline-block;
    padding: 2px 8px;
    margin-right: 8px;
    font-size: 14px;
    color: #24292e;
    background: #f6f8fa;
    border: none;
    border-radius: 6px;
    text-decoration: none;
}

@media (max-width: 600px) {
    .teaching-item {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 16px;
    }
    
    .teaching-meta {
        display: block;
        margin: 4px 0 0 0;
    }
    
    .teaching-links {
        margin-top: 8px;
    }
}

/* People page styles */
.people-intro {
    color: #586069;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 30px;
}

.highlight-tag {
    color: #0366d6;
    cursor: pointer;
    transition: color 0.2s;
}

.highlight-tag:hover {
    color: #044289;
    text-decoration: underline;
}

.people-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 30px;
    padding: 20px 0;
}

.person-link {
    text-decoration: none;
    transition: all 0.3s ease;
    opacity: 1;
}

/* Default state - all items visible */
.people-grid:not(.filtering) .person-link {
    opacity: 1;
}

/* Simple hover effect - dim others when hovering any item */
.people-grid:not(.filtering):hover .person-link {
    opacity: 0.5;
}

.people-grid:not(.filtering):hover .person-link:hover {
    opacity: 1;
}

/* Scale effect on hover */
.person-link:hover .person {
    transform: scale(1.05);
}

/* When filtering, dim unmatched items */
.people-grid.filtering .person-link:not(.highlight) {
    opacity: 0.2;
}

.person {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    transition: transform 0.3s ease;
}

.person img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .people-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 20px;
    }
    
    .person {
        width: 80px;
        height: 80px;
    }
}

.nav-links a.active {
    background: #eaecef;
    text-decoration: none;
}

/* Mobile menu button */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 10px;
    cursor: pointer;
}

.menu-toggle .bar {
    display: block;
    width: 22px;
    height: 2px;
    background: #24292e;
    margin: 4px 0;
    transition: 0.3s;
}

/* Responsive navbar */
@media (max-width: 600px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(255, 255, 255, 0.98);
        padding: 20px;
        gap: 15px;
        border-top: 1px solid #eaecef;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    }

    .nav-links.active {
        display: flex;
    }

    /* Animate hamburger to X */
    .menu-toggle.active .bar:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active .bar:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
}

/* Special cases where we don't want borders */
.nav-links a,
.social-links a,
.pub-links a,
.pub-thumbnail a,
.person-link {
    border-bottom: none;
}

.name-info {
    font-size: 14px;
    color: #24292e;
    margin-left: 8px;
    padding: 2px 8px;
    background: #f6f8fa;
    border-radius: 6px;
    border-bottom: none;
    transition: background 0.2s;
}

.name-info:hover {
    background: #eaecef;
    text-decoration: none;
}

/* Timeline styles */
.timeline {
    position: relative;
    margin: 20px 0;
    padding-left: 120px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Main vertical line */
.timeline::before {
    content: '';
    position: absolute;
    left: 90px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #e1e4e8;
}

.timeline-item {
    position: relative;
    min-height: 50px;
    padding-left: 40px;
}

/* Dots on the timeline */
.timeline-item::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
    border: 2px solid #24292e;
    z-index: 1;
}

.timeline-date {
    position: absolute;
    left: -100px;
    top: 50%;
    transform: translateY(-50%);
    color: #586069;
    font-size: 13px;
    text-align: right;
    width: 80px;
}

.timeline-content {
    margin-left: 10px;
}

.timeline-title {
    font-weight: 600;
    color: #24292e;
    font-size: 15px;
    margin-bottom: 4px;
}

.timeline-subtitle {
    color: #586069;
    font-size: 13px;
    margin: 2px 0;
    line-height: 1.4;
}

/* Mobile responsive timeline */
@media (max-width: 768px) {
    .timeline-title {
        font-size: 14px;
    }
    .timeline-subtitle {
        font-size: 12px;
    }
    .timeline-date {
        font-size: 12px;
        left: -80px;
        width: 60px;
    }
}

@media (max-width: 600px) {
    .timeline {
        overflow-x: auto;
        justify-content: flex-start;
        padding: 0 20px;
        margin: 20px -20px;
        height: 200px;  /* Increased height further */
        -webkit-overflow-scrolling: touch;
    }

    .timeline-item {
        flex: 0 0 140px;
        margin-right: 20px;
        padding: 0 10px;
        height: 200px;  /* Match container height */
    }

    .timeline::before {
        left: 20px;
        width: calc(100% + 600px);
        top: 100px;  /* Move line to middle */
    }

    .timeline::after {
        left: 20px;
        width: calc(100% + 600px);
        top: 100px;  /* Match line position */
        background: linear-gradient(
            to right,
            white,
            transparent 40px,
            transparent calc(100% - 40px),
            white
        );
    }

    .timeline-content,
    .timeline-date {
        white-space: normal;
        width: 130px;
        min-height: 40px;  /* Ensure space for content */
        left: 50%;
        transform: translateX(-50%);
    }

    .timeline-item:nth-child(odd) .timeline-date {
        top: 30px;
    }

    .timeline-item:nth-child(odd) .timeline-content {
        top: 120px;
    }

    .timeline-item:nth-child(even) .timeline-date {
        top: 160px;
    }

    .timeline-item:nth-child(even) .timeline-content {
        top: 60px;
        transform: translate(-50%, -100%);
    }

    .timeline-item::before {
        top: 100px;  /* Match line position */
    }
}

/* Movie recommendations styles */
.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.movie-item {
    position: relative;
    aspect-ratio: 2/3;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.movie-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.movie-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.movie-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
}

.movie-title {
    font-size: 13px;
    font-weight: 600;
    margin: 0;
}

.movie-year {
    font-size: 11px;
    opacity: 0.8;
    margin-top: 4px;
}

@media (max-width: 600px) {
    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 15px;
    }
}

/* Text-based movie cards */
.movie-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.movie-card {
    padding: 15px;
    border-radius: 8px;
    background: #f6f8fa;
    transition: transform 0.2s;
}

.movie-card:hover {
    transform: translateY(-2px);
    background: #eaecef;
}

.movie-card .movie-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    color: #24292e;
}

.movie-card .movie-director {
    font-size: 13px;
    color: #586069;
    margin-top: 4px;
}

.movie-card .movie-year {
    font-size: 12px;
    color: #586069;
    margin-top: 2px;
}

/* Tab styles */
.tab-container {
    display: flex;
    margin-bottom: 30px;
}

.tab-button {
    border: 1px solid #e1e4e8;
    border-radius: 6px 6px 6px 6px;
    margin-right: -1px;
    background: white;
    padding: 8px 24px;
}

.tab-button:first-child {
    border-radius: 6px 0 0 6px;
}

.tab-button:last-child {
    border-radius: 0 6px 6px 0;
}

.tab-button.active {
    color: #24292e;
    font-weight: 600;
    background: #f6f8fa;
    position: relative;
    z-index: 1;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Override margin for buttons with arrows */
.view-all,
a[href="/cv.pdf"],
#show-more-news {
    margin-right: 0;
}

/* Special styling for CV link in social links */
.social-links .social-cv {
    background: none;
    border-bottom: 1px dotted #666;
    border-radius: 0;
    padding: 0;
    margin-left: 8px;
    font-size: 14px;
}

.social-links .social-cv:hover {
    color: #0366d6;
    border-bottom-color: #0366d6;
    background: none;
}

.social-links .social-cv::after {
    content: " →";
}

/* Movie list styles */
.movie-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

/* Ensure hidden class actually hides content */
.movie-list.hidden {
    display: none;
}

.movie-card {
    padding: 15px;
    border-radius: 8px;
    background: #f6f8fa;
    transition: transform 0.2s;
}

.movie-card:hover {
    transform: translateY(-2px);
    background: #eaecef;
}

.movie-card .movie-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    color: #24292e;
}

.movie-card .movie-director {
    font-size: 13px;
    color: #586069;
    margin-top: 4px;
}

.movie-card .movie-year {
    font-size: 12px;
    color: #586069;
    margin-top: 2px;
}

/* Show more button styling */
.show-more-btn {
    color: #586069;
    font-size: 14px;
    font-weight: normal;
    text-decoration: none;
    border-bottom: 1px dotted #666;
    cursor: pointer;
    background: none;
}

.show-more-btn:hover {
    color: #0366d6;
    border-bottom-color: #0366d6;
    background: none;
    text-decoration: none;
}

/* Ensure no arrow is added to show-more-btn */
.show-more-btn::after {
    content: none;
}

/* Author name styling */
.authors strong {
    font-style: normal;
    font-weight: 600;
}

/* Blog styles */
.blog-list {
    margin-top: 30px;
}

.blog-item {
    margin-bottom: 40px;
}

.blog-item h3 {
    margin-bottom: 5px;
}

.blog-item h3 a {
    color: #24292e;
    text-decoration: none;
    border-bottom: none;
}

.blog-item h3 a:hover {
    color: #0366d6;
}

.blog-meta {
    font-size: 14px;
    color: #586069;
    margin-bottom: 10px;
}

.blog-description {
    color: #586069;
    font-size: 15px;
    margin-top: 5px;
}

/* Individual post styles */
.post {
    max-width: 700px;
    margin: 0 auto;
}

.post-meta {
    font-size: 14px;
    color: #586069;
    margin: 10px 0 30px;
}

.post-content {
    font-size: 16px;
    line-height: 1.6;
} 