* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: #000000;
    color: #ffffff;
    line-height: 1.6;
    font-size: 16px;
}

a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #cccccc;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

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

.logo {
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.logo:hover {
    opacity: 0.7;
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-links a {
    font-size: 14px;
    color: #888888;
    font-weight: 500;
    cursor: pointer;
}

.nav-links a.active {
    color: #ffffff;
    border-bottom: 2px solid #ffffff;
    padding-bottom: 2px;
}

/* Main Content */
main {
    margin-top: 60px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    padding: 60px 20px;
}

section {
    display: none;
}

section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Research Hero Image */
.research-hero {
    width: 100%;
    margin-bottom: 40px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.research-hero-image {
    width: 100%;
    height: auto;
    display: block;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
}

/* Home Section */
.hero {
    margin-bottom: 60px;
    display: flex;
    gap: 40px;
    align-items: center;
}

.hero-content {
    flex: 1;
}

.hero-image {
    flex-shrink: 0;
}

.hero-image img {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #ffffff;
}

.hero h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #fff;
    line-height: 1.2;
}

.hero h3 {
    font-size: 20px;
    font-weight: 400;
    color: #cccccc;
}

.hero p {
    font-size: 18px;
    color: #cccccc;
    margin-bottom: 30px;
    max-width: 600px;
}

.cta-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.btn-primary {
    background-color: #ffffff;
    color: #000000;
}

.btn-primary:hover {
    background-color: #cccccc;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: #ffffff;
    border: 1px solid #ffffff;
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Twitter Feed Section */
#twitter-feed {
    margin-top: 80px;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.twitter-container {
    max-width: 600px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    min-height: 400px;
}

/* Article Cards */
.article-grid {
    display: grid;
    gap: 30px;
    margin-bottom: 40px;
}

.article-card {
    border-left: 3px solid #ffffff;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.article-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.article-card h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #fff;
}

.article-card p {
    color: #cccccc;
    font-size: 15px;
    margin-bottom: 15px;
}

.article-date {
    font-size: 12px;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Project Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.projects-grid a {
    text-decoration: none;
    color: inherit;
}

.project-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 25px;
    transition: all 0.2s ease;
    text-align: center;
}

.project-card:hover {
    border-color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
}

.project-logo {
    width: 120px;
    height: 50px;
    margin: 0 auto 15px auto;
    display: block;
    object-fit: contain;
    background: white;
    padding: 8px;
    border-radius: 6px;
}

.project-card h3 {
    font-size: 18px;
    margin-bottom: 12px;
    color: #fff;
}

.project-card p {
    color: #cccccc;
    font-size: 14px;
    margin-bottom: 15px;
}

.project-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.tag {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

/* Publications Section */
.publications-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 40px;
}

.publications-grid a {
    text-decoration: none;
    color: inherit;
}

.publication-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 25px;
    transition: all 0.3s ease;
}

.publication-card:hover {
    border-color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
}

.publication-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 12px;
}

.publication-card h3 {
    font-size: 20px;
    color: #fff;
    line-height: 1.4;
    margin: 0;
    flex: 1;
}

.publication-year {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 4px;
    white-space: nowrap;
}

.publication-authors {
    font-size: 15px;
    color: #cccccc;
    margin-bottom: 8px;
    font-style: italic;
}

.publication-venue {
    font-size: 14px;
    color: #888888;
    margin-bottom: 12px;
    font-weight: 500;
}

.publication-stats {
    margin-bottom: 15px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.citation-count {
    font-size: 13px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    padding: 4px 10px;
    border-radius: 4px;
}

.publication-abstract {
    font-size: 14px;
    color: #aaaaaa;
    line-height: 1.6;
    margin: 0;
}

/* Research Interests */
.research-interests {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 40px;
}

.interest-tag {
    display: inline-block;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: default;
}

.interest-tag:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

/* Carousel - Updated for smaller images */
.carousel-container {
    position: relative;
    width: 100%;
    max-width: 700px;
    margin: 0 auto 60px;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.carousel {
    position: relative;
    width: 100%;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.carousel-slide.active {
    opacity: 1;
    z-index: 1;
}

.carousel-slide img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.carousel-caption {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.3);
    font-size: 36px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
}

.carousel-btn:hover {
    background: rgba(255, 255, 255, 0.9);
    color: #000000;
    border-color: #ffffff;
}

.carousel-prev {
    left: 20px;
}

.carousel-next {
    right: 20px;
}

/* Thumbnail Navigation */
.carousel-thumbnails {
    display: flex;
    gap: 15px;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
}

.thumbnail {
    width: 100px;
    height: 70px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    opacity: 0.6;
}

.thumbnail:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

.thumbnail.active {
    border-color: #ffffff;
    opacity: 1;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

/* Books Section */
.books-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.books-grid a {
    text-decoration: none;
    color: inherit;
}

.book-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}

.book-card:hover {
    border-color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
}

.book-cover {
    width: 100%;
    height: 400px;
    overflow: hidden;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.book-content {
    padding: 20px;
}

.book-content h3 {
    font-size: 20px;
    margin-bottom: 8px;
    color: #fff;
}

.book-author {
    font-size: 14px;
    color: #888888;
    font-style: italic;
    margin-bottom: 12px;
}

.book-description {
    font-size: 14px;
    color: #cccccc;
    line-height: 1.6;
}

/* Talks Section */
.talks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.talks-grid a {
    text-decoration: none;
    color: inherit;
}

.talk-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.talk-card:hover {
    border-color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
}

.talk-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    background: #1a1a1a;
    overflow: hidden;
}

.talk-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    color: white;
    background: rgba(0, 0, 0, 0.7);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding-left: 5px; /* Offset to center triangle */
}

.talk-card:hover .play-icon {
    background: rgba(255, 0, 0, 0.9);
    transform: translate(-50%, -50%) scale(1.1);
}

.talk-content {
    padding: 20px;
}

.talk-content h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: #fff;
}

.talk-content p {
    color: #cccccc;
    font-size: 14px;
}

/* About Section */
.about-content {
    max-width: 700px;
}

.about-content h2 {
    font-size: 32px;
    margin-bottom: 20px;
    color: #fff;
}

.about-content p {
    margin-bottom: 20px;
    color: #cccccc;
    line-height: 1.8;
}

.skills-section {
    margin-top: 40px;
}

.skills-section h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #fff;
}

.skill-category {
    margin-bottom: 25px;
}

.skill-category-title {
    font-size: 14px;
    color: #ffffff;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.skill-items {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-item {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border-radius: 4px;
    font-size: 14px;
}

/* Footer */
footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 40px 20px;
    text-align: center;
    color: #888888;
    font-size: 14px;
}

.footer-content {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 0.5rem;
    align-items: center;
}

.social-links a {
    color: #ffffff;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-links a:hover {
    opacity: 0.7;
    transform: translateY(-2px);
}

.social-links svg {
    width: 24px;
    height: 24px;
    fill: #ffffff;
    transition: fill 0.3s ease;
}

.social-links a:hover svg {
    fill: #cccccc;
}

.analytics-badge {
    margin: 0.5rem 0;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.analytics-badge:hover {
    opacity: 1;
}

.analytics-badge img {
    height: 35px;
    width: auto;
    display: block;
}

.copyright {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 1024px) {
    .books-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        text-align: center;
    }

    .hero-content {
        order: 2;
    }

    .hero-image {
        order: 1;
        margin-bottom: 30px;
    }

    .hero-image img {
        width: 200px;
        height: 200px;
    }

    .hero h1 {
        font-size: 36px;
    }

    .hero p {
        font-size: 16px;
        max-width: 100%;
    }

    .cta-buttons {
        justify-content: center;
    }

    .nav-links {
        gap: 15px;
    }

    .nav-links a {
        font-size: 12px;
    }

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

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

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

    .twitter-container {
        padding: 15px;
    }

    .carousel {
        height: 300px;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 28px;
    }

    .carousel-prev {
        left: 10px;
    }

    .carousel-next {
        right: 10px;
    }

    .carousel-caption {
        font-size: 12px;
        padding: 6px 14px;
    }

    .carousel-thumbnails {
        gap: 10px;
        padding: 15px;
    }

    .thumbnail {
        width: 70px;
        height: 50px;
    }

    .research-hero {
        margin-bottom: 30px;
    }
}

/* Carousel Thumbnails Styling */
.carousel-thumbnails {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
    padding: 10px;
}

.thumbnail {
    width: 80px;
    height: 60px;
    cursor: pointer;
    border: 3px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    opacity: 0.6;
}

.thumbnail:hover {
    opacity: 0.9;
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.5);
}

.thumbnail.active {
    opacity: 1;
    border-color: #fff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Improved carousel container spacing */
.carousel-container {
    margin-bottom: 40px;
}

/* Smooth transitions for carousel slides */
.carousel-slide {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.carousel-slide.active {
    opacity: 1;
}

/* Responsive adjustments for thumbnails */
@media (max-width: 768px) {
    .thumbnail {
        width: 60px;
        height: 45px;
    }
    
    .carousel-thumbnails {
        gap: 8px;
        margin-top: 15px;
    }
}

@media (max-width: 480px) {
    .thumbnail {
        width: 50px;
        height: 38px;
    }
    
    .carousel-thumbnails {
        gap: 6px;
        margin-top: 10px;
    }
}

/* Research Section */
.research-grid {
    display: grid;
    gap: 25px;
    margin-bottom: 40px;
}

.research-grid a {
    text-decoration: none;
    color: inherit;
}

.research-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-left: 4px solid #ffffff;
    border-radius: 8px;
    padding: 25px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.research-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #ffffff;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.patent-card {
    border-left-color: #ffffff;
}

.patent-card:hover {
    border-left-color: #ffffff;
}

.research-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.research-year {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 4px;
    letter-spacing: 1px;
}

.research-type {
    font-size: 12px;
    font-weight: 600;
    color: #888888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.patent-badge {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 4px;
}

.research-card h3 {
    font-size: 20px;
    line-height: 1.4;
    margin-bottom: 12px;
    color: #fff;
}

.research-authors {
    font-size: 14px;
    color: #cccccc;
    font-style: italic;
    margin-bottom: 8px;
}

.research-venue {
    font-size: 14px;
    color: #ffffff;
    font-weight: 500;
    margin-bottom: 15px;
}

.research-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.research-summary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 30px;
    margin-top: 60px;
}

.research-summary h2 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #fff;
}

.research-summary p {
    font-size: 16px;
    line-height: 1.8;
    color: #cccccc;
}

@media (max-width: 768px) {
    .research-card h3 {
        font-size: 18px;
    }
    
    .research-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}