/* ============================================
   CSS Variables for Theme Switching
   ============================================ */
:root {
    /* Light Theme Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-card: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --accent-color: #2563eb;
    --accent-hover: #1d4ed8;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-hover: rgba(0, 0, 0, 0.15);
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    
    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;
}

/* Dark Theme */
[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border-color: #334155;
    --accent-color: #3b82f6;
    --accent-hover: #60a5fa;
    --shadow: rgba(0, 0, 0, 0.3);
    --shadow-hover: rgba(0, 0, 0, 0.5);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ============================================
   Navigation Bar
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    z-index: 1000;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.9);
}

[data-theme="dark"] .navbar {
    background-color: rgba(15, 23, 42, 0.9);
}

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

.nav-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.nav-logo:hover {
    color: var(--accent-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    font-size: 0.95rem;
}

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

.theme-toggle {
    background: none;
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background-color: var(--bg-secondary);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

/* ============================================
   Main Section
   ============================================ */
.main-section {
    margin-top: 80px;
    padding-top: var(--spacing-2xl);
}

.container-simple {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.profile-header {
    display: flex;
    gap: var(--spacing-xl);
    align-items: flex-start;
    margin-bottom: var(--spacing-2xl);
    padding-bottom: var(--spacing-2xl);
    border-bottom: 1px solid var(--border-color);
}

.profile-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 20px var(--shadow);
    flex-shrink: 0;
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.profile-affiliation {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
}

/* ============================================
   Section Styles
   ============================================ */
.section {
    padding: var(--spacing-2xl) var(--spacing-lg);
}

.section-alt {
    background-color: var(--bg-secondary);
}

.container {
    max-width: 1000px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-lg);
    color: var(--text-primary);
    text-align: center;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: var(--spacing-lg);
}

/* ============================================
   Social Links
   ============================================ */
.social-links {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

.social-link i {
    font-size: 1.1rem;
}

/* ============================================
   Publications Section
   ============================================ */
.publications-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--border-color);
}

/* ============================================
   Publications Section
   ============================================ */
.publication-card {
    background: var(--bg-card);
    border-left: 3px solid var(--border-color);
    padding: var(--spacing-md) var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    transition: all 0.3s ease;
}

.publication-card:hover {
    border-left-color: var(--accent-color);
    background: var(--bg-secondary);
}

.pub-header {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
    margin-bottom: var(--spacing-sm);
    flex-wrap: wrap;
}

.pub-badge {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pub-badge-neurips {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.pub-badge-aaai {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.pub-badge-pricai {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.pub-badge-under-review {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: white;
}

.pub-type {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-style: italic;
}

.pub-title {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
    line-height: 1.4;
}

.pub-authors {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
    font-size: 0.95rem;
}

.pub-abstract {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: var(--spacing-md);
}

.pub-links {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.pub-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    color: var(--accent-color);
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
}

.pub-link:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-2px);
}

/* ============================================
   Projects Section
   ============================================ */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: var(--spacing-lg);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px var(--shadow);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow-hover);
    border-color: var(--accent-color);
}

.project-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--accent-color), #8b5cf6);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
    margin-bottom: var(--spacing-md);
}

.project-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

.project-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--spacing-md);
}

.project-links {
    display: flex;
    gap: var(--spacing-sm);
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    color: var(--accent-color);
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
}

.project-link:hover {
    background: var(--accent-color);
    color: white;
}

/* ============================================
   Experience Section
   ============================================ */
.experience-timeline {
    position: relative;
    padding-left: 2rem;
}

.experience-timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.experience-item {
    position: relative;
    margin-bottom: var(--spacing-xl);
    padding-left: 2rem;
}

.experience-item::before {
    content: '';
    position: absolute;
    left: -2rem;
    top: 0.5rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent-color);
    border: 3px solid var(--bg-secondary);
}

.experience-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.experience-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.experience-company {
    font-size: 1.1rem;
    color: var(--accent-color);
    margin-bottom: var(--spacing-sm);
}

.experience-company a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.experience-company a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.experience-description {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ============================================
   Blog Section
   ============================================ */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.blog-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: var(--spacing-lg);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px var(--shadow);
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow-hover);
    border-color: var(--accent-color);
}

.blog-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: var(--spacing-sm);
    font-family: var(--font-mono);
}

.blog-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
    line-height: 1.4;
}

.blog-excerpt {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--spacing-md);
}

.blog-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

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

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--bg-secondary);
    padding: var(--spacing-xl) var(--spacing-lg);
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.footer p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .profile-image {
        width: 150px;
        height: 150px;
    }
    
    .profile-name {
        font-size: 2rem;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .publications-title {
        font-size: 1.5rem;
    }
    
    .pub-title {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 1rem;
    }
    
    .profile-image {
        width: 120px;
        height: 120px;
    }
    
    .profile-name {
        font-size: 1.75rem;
    }
    
    .section {
        padding: var(--spacing-lg) var(--spacing-sm);
    }
    
    .publication-card {
        padding: var(--spacing-sm) var(--spacing-md);
    }
    
    .social-link {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }
}

/* ============================================
   Smooth Animations
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.publication-card,
.project-card,
.blog-card,
.experience-item {
    animation: fadeIn 0.6s ease-out;
}

