:root {
    --primary-color: #1a73e8;
    --text-color: #333;
    --bg-color: #fff;
    --card-bg: #fff;
    --border-color: #e0e0e0;
}

/* Dark mode variables */
[data-theme="dark"] {
    --primary-color: #90caf9;
    --text-color: #fff;
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --border-color: #333;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.sticky-header {
    position: sticky;
    top: 0;
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
}

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

/* Hero Section */
.hero {
    padding: 4rem 0;
}

.profile-container {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
}

.profile-image {
    width: 192px;
    height: 192px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--primary-color);
}

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

.profile-info {
    flex: 1;
    min-width: 300px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tag {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
}

.tag-blue { background-color: #e3f2fd; color: #1565c0; }
.tag-green { background-color: #e8f5e9; color: #2e7d32; }
.tag-purple { background-color: #f3e5f5; color: #7b1fa2; }
.tag-red { background-color: #ffebee; color: #c62828; }

[data-theme="dark"] .tag {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
}

/* Section Styles */
.section {
    margin: 4rem 0;
    padding: 2rem;
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Publications */
.filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: none;
    background-color: var(--primary-color);
    color: white;
    border-radius: 4px;
    cursor: pointer;
    transition: opacity 0.3s;
}

.filter-btn:hover {
    opacity: 0.9;
}

.publications-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.publication-card {
    padding: 1.5rem;
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.publication-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.publication-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.publication-card .authors {
    color: var(--text-color);
    opacity: 0.8;
    margin-bottom: 0.5rem;
}

.publication-card .venue {
    color: var(--text-color);
    opacity: 0.7;
    font-style: italic;
    margin-bottom: 0.5rem;
}

.publication-card .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.publication-card .tag {
    background-color: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    opacity: 0.8;
}

.filter-dropdown {
    position: absolute;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.dropdown-content {
    padding: 0.5rem 0;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.dropdown-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.dropdown-item.active {
    background-color: var(--primary-color);
    color: white;
}

/* Courses Grid */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.course-card {
    padding: 1.5rem;
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Contact Grid */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.contact-card {
    padding: 1.5rem;
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Back to Top Button */
#backToTop {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s;
}

#backToTop.visible {
    opacity: 1;
}

/* Dark Mode Toggle */
#darkModeToggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .profile-container {
        flex-direction: column;
        text-align: center;
    }
    
    nav {
        display: none;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
}