/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Theme Variables */
:root[data-theme="light"] {
    --bg-color: #ffffff;
    --text-color: #333;
    --header-bg: #fff;
    --card-bg: #fff;
    --shadow-color: rgba(0,0,0,0.1);
    --hover-color: #007bff;
    --footer-bg: #2c3e50;
    --footer-text: #fff;
    --section-bg: #f8f9fa;
    --card-border: #e9ecef;
    --link-color: #007bff;
    --secondary-text: #666;
}

:root[data-theme="dark"] {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --header-bg: #1e1e1e;
    --card-bg: #1e1e1e;
    --shadow-color: rgba(0,0,0,0.4);
    --hover-color: #4da3ff;
    --footer-bg: #1e1e1e;
    --footer-text: #e0e0e0;
    --section-bg: #1a1a1a;
    --card-border: #2d2d2d;
    --link-color: #4da3ff;
    --secondary-text: #a0a0a0;
}

/* Global link styles */
a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--hover-color);
}

body {
    font-family: "Avenir", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: "Avenir", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-weight: 600;
    letter-spacing: -0.02em;
}

#hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
    color: var(--text-color);
}

section h2 {
    font-size: 2.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 2rem;
    text-align: left;
}

.research-item h3 {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 1rem;
}

.publication-item h3 {
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 0.5rem;
}

.nav-links li a {
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* Container and Section Alignment */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 50px 0;
    background-color: var(--section-bg);
}

section:nth-child(even) {
    background-color: var(--bg-color);
}

section h2 {
    font-size: 2.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 2rem;
    text-align: left;
}

/* Header and Navigation */
header {
    background-color: var(--header-bg);
    box-shadow: 0 2px 5px var(--shadow-color);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

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

.nav-links {
    display: flex;
    list-style: none;
    padding: 1rem 0;
    flex-wrap: wrap;
    gap: 1rem;
}

.nav-links li {
    margin: 0;
}

.nav-links li a {
    text-decoration: none;
    color: var(--text-color);
    transition: color 0.3s ease;
    position: relative;
    font-size: 0.95rem;
    white-space: nowrap;
}

.nav-links li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--hover-color);
    transition: width 0.3s ease;
}

.nav-links li a:hover::after {
    width: 100%;
}

.social-links-header {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.social-links-header a {
    color: var(--text-color);
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.social-links-header a:hover {
    color: var(--hover-color);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1001;
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    color: var(--text-color);
    cursor: pointer;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px var(--shadow-color);
}

.theme-toggle:hover {
    transform: scale(1.1);
    background-color: var(--hover-color);
    color: var(--bg-color);
    border-color: var(--hover-color);
    box-shadow: 0 6px 20px var(--shadow-color);
}

.theme-toggle:active {
    transform: scale(0.95);
}

/* Theme toggle icon */
.theme-toggle i {
    transition: opacity 0.4s ease;
    position: relative;
}

/* Update responsive design for theme toggle */
@media (max-width: 768px) {
    .theme-toggle {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
}

/* Hero Section */
#hero {
    background: var(--section-bg);
    padding: 150px 0 100px;
    text-align: center;
}

#hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
    color: var(--text-color);
}

#hero h2 {
    font-size: 1.8rem;
    font-weight: 400;
    letter-spacing: -0.01em;
    color: var(--secondary-text);
    margin-bottom: 0.5rem;
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    align-items: center;
}

.profile-image {
    width: 300px;
    height: 300px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 50%;
    box-shadow: 0 8px 20px var(--shadow-color);
    border: 4px solid var(--card-bg);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-image:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 25px var(--shadow-color);
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

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

.bio p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

/* Publications Section */
.publications-list {
    max-width: 1200px;
    margin: 0;
}

.publication-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--card-border);
}

.publication-item:last-child {
    border-bottom: none;
}

.publication-item .paper-title {
    color: var(--text-color);
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.publication-item .authors {
    color: var(--secondary-text);
    font-size: 1rem;
    margin-bottom: 4px;
}

.publication-item .conference {
    color: var(--secondary-text);
    font-size: 0.95rem;
    font-style: italic;
    margin-bottom: 8px;
}

.publication-item .award {
    color: var(--text-color);
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.publication-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.publication-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--link-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.publication-link:hover {
    color: var(--hover-color);
}

.publication-link i {
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .publication-item {
        padding: 10px 0;
    }
    
    .publication-item .paper-title {
        font-size: 1.1rem;
    }
    
    .publication-item .authors {
        font-size: 0.95rem;
    }
    
    .publication-links {
        gap: 10px;
    }
    
    .publication-link {
        font-size: 0.85rem;
    }
}

/* Contact Section */
.contact-info {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contact-item {
    margin-bottom: 20px;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--link-color);
    margin-right: 10px;
}

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

.social-links a {
    color: #333;
    font-size: 1.5rem;
    margin: 0 15px;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #007bff;
}

/* Footer */
footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 20px 0;
    text-align: center;
    border-top: 1px solid var(--card-border);
}

/* News Timeline Section */
#news {
    background-color: var(--section-bg);
    padding: 60px 0;
}

.timeline {
    position: relative;
    max-width: 1200px;
    margin: 0;
    padding: 10px 0;
    margin-left: -20px;
    height: 400px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--hover-color) var(--card-border);
    padding-right: 20px;
}

.timeline-line {
    position: absolute;
    left: 15px;
    top: 0;
    width: 1px;
    background: var(--card-border);
    z-index: 0;
}

/* Custom scrollbar for Webkit browsers */
.timeline::-webkit-scrollbar {
    width: 6px;
    margin-left: 20px;
}

.timeline::-webkit-scrollbar-track {
    background: var(--card-border);
    border-radius: 3px;
    margin-left: 20px;
}

.timeline::-webkit-scrollbar-thumb {
    background-color: var(--hover-color);
    border-radius: 3px;
}

.timeline:hover {
    scrollbar-color: var(--hover-color) var(--card-border);
}

.timeline-item {
    padding: 12px 0;
    position: relative;
    width: 100%;
    display: flex;
    align-items: flex-start;
}

.timeline-dot {
    width: 8px;
    height: 8px;
    background: var(--hover-color);
    border-radius: 50%;
    position: absolute;
    left: 15px;
    margin-left: -4px;
    top: 16px;
    z-index: 1;
}

.timeline-content {
    width: calc(100% - 35px);
    margin-left: 35px;
    padding: 0;
    position: relative;
    padding-right: 20px;
}

.timeline-date {
    color: var(--secondary-text);
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.timeline-content h3 {
    color: var(--text-color);
    margin-bottom: 6px;
    font-size: 1.1rem;
    font-weight: 500;
}

.timeline-content p {
    color: var(--secondary-text);
    font-size: 0.95rem;
    line-height: 1.4;
    margin: 0;
}

/* Responsive Timeline */
@media (max-width: 768px) {
    .timeline::before {
        left: 20px;
    }

    .timeline-dot {
        left: 20px;
    }

    .timeline-content {
        width: calc(100% - 40px);
        margin-left: 40px;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        width: 95%;
        padding: 0 15px;
    }

    section {
        padding: 60px 0;
    }

    section h2 {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .profile-image {
        margin: 0 auto;
    }

    .nav-container {
        flex-direction: column;
        padding: 1rem;
    }

    .nav-links {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-bottom: 1rem;
    }

    .nav-links li a {
        font-size: 0.9rem;
    }

    .social-links-header {
        margin-top: 1rem;
    }

    #hero {
        padding: 120px 0 60px;
    }

    #hero h1 {
        font-size: 2rem;
    }

    .header-right {
        flex-direction: column;
        gap: 1rem;
    }

    .theme-toggle {
        margin-bottom: 1rem;
    }
}

/* Awards Section */
.awards-list {
    max-width: 1200px;
    margin: 0;
}

.award-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--card-border);
    display: flex;
    gap: 20px;
}

.award-item:last-child {
    border-bottom: none;
}

.award-date {
    min-width: 50px;
    color: var(--secondary-text);
    font-weight: 600;
    font-size: 0.95rem;
}

.award-content {
    flex: 1;
    max-width: 800px;
}

.award-content h3 {
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.award-organization {
    color: var(--secondary-text);
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.award-description {
    color: var(--text-color);
    font-size: 0.9rem;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .award-item {
        flex-direction: column;
        gap: 5px;
        padding: 10px 0;
    }
    
    .award-date {
        font-size: 0.9rem;
    }
    
    .award-content h3 {
        font-size: 1rem;
    }
    
    .award-organization {
        font-size: 0.85rem;
    }
    
    .award-description {
        font-size: 0.85rem;
    }
}

/* Mentoring Section */
.mentoring-list {
    max-width: 1200px;
    margin: 0;
}

.mentoring-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--card-border);
    display: flex;
    gap: 20px;
}

.mentoring-item:last-child {
    border-bottom: none;
}

.mentoring-date {
    min-width: 120px;
    color: var(--secondary-text);
    font-weight: 600;
    font-size: 0.95rem;
}

.mentoring-content {
    flex: 1;
    width: 100%;
}

.mentoring-content h3 {
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.mentoring-role {
    color: var(--secondary-text);
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.mentoring-description {
    color: var(--text-color);
    font-size: 0.9rem;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .mentoring-item {
        flex-direction: column;
        gap: 5px;
        padding: 10px 0;
    }
    
    .mentoring-date {
        font-size: 0.9rem;
        min-width: auto;
    }
    
    .mentoring-content h3 {
        font-size: 1rem;
    }
    
    .mentoring-role {
        font-size: 0.85rem;
    }
    
    .mentoring-description {
        font-size: 0.85rem;
    }
}

/* Service Section */
.service-list {
    max-width: 1200px;
    margin: 0;
}

.service-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--card-border);
    display: flex;
    gap: 20px;
}

.service-item:last-child {
    border-bottom: none;
}

.service-date {
    min-width: 120px;
    color: var(--secondary-text);
    font-weight: 600;
    font-size: 0.95rem;
}

.service-content {
    flex: 1;
    max-width: 800px;
}

.service-content h3 {
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.service-role {
    color: var(--secondary-text);
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.service-description {
    color: var(--text-color);
    font-size: 0.9rem;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .service-item {
        flex-direction: column;
        gap: 5px;
        padding: 10px 0;
    }
    
    .service-date {
        font-size: 0.9rem;
        min-width: auto;
    }
    
    .service-content h3 {
        font-size: 1rem;
    }
    
    .service-role {
        font-size: 0.85rem;
    }
    
    .service-description {
        font-size: 0.85rem;
    }
}

/* Affiliates Section */
.affiliates-grid {
    display: flex;
    gap: 5px;
    align-items: center;
    overflow: hidden;
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-240px * 7 - 5px * 6));
    }
}

.affiliate-item {
    flex: 0 0 auto;
    width: 200px;
    padding: 10px;
    background: transparent;
    animation: scroll 30s linear infinite;
}

.affiliate-logo {
    width: 100%;
    height: 120px;
    object-fit: contain;
    border-radius: 12px;
}

@media (max-width: 768px) {
    .affiliates-grid {
        padding: 10px 15px;
    }
    
    .affiliate-item {
        width: 150px;
        padding: 8px;
    }
    
    .affiliate-logo {
        height: 100px;
        border-radius: 8px;
        padding: 8px;
    }
    
    @keyframes scroll {
        0% {
            transform: translateX(0);
        }
        100% {
            transform: translateX(calc(-166px * 7 - 5px * 6));
        }
    }
} 