/* Theme variables */
:root {
    /* Light theme (default) */
    --primary-color: #5c6bc0;
    --text-color: #333;
    --bg-color: #f8f9fa;
    --container-bg: #fff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
    --spacing: 20px;
}

/* Dark theme */
[data-theme="dark"] {
    --primary-color: #7986cb;
    --text-color: #e1e1e1;
    --bg-color: #121212;
    --container-bg: #1e1e1e;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

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

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    margin: 0;
    padding: 0;
}

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

/* Header & Navigation */
header {
    background-color: var(--container-bg);
    box-shadow: var(--shadow);
    padding: 15px 0;
    margin-bottom: 30px;
}

nav {
    display: flex;
    gap: 20px;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

nav a:hover {
    background-color: rgba(92, 107, 192, 0.1);
    color: var(--primary-color);
}

nav a.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

/* Main content */
main {
    min-height: calc(100vh - 180px);
}

main .container {
    background-color: var(--container-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 30px;
}

h1 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 2.5rem;
    font-weight: 600;
}

h2 {
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.8rem;
    color: #444;
}

h3 {
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 1.4rem;
    color: #444;
}

p {
    margin-bottom: 20px;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Profile section */
.profile {
    display: flex;
    align-items: flex-start;
    gap: 30px;
    margin-bottom: 30px;
}

.content {
    flex: 1;
}

.subtitle {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 20px;
}

.profile-pic {
    width: 220px;
    height: 280px;
    border-radius: var(--border-radius);
    object-fit: cover;
    border: 3px solid var(--container-bg);
    box-shadow: var(--shadow);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.social-links a {
    display: flex;
    align-items: center;
    padding: 8px 15px;
    background-color: #f0f2f5;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.social-links a:hover {
    background-color: #e4e6eb;
    text-decoration: none;
}

/* Publications */
.publications {
    margin-top: 30px;
}

.publication-item {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

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

.publication-item h3 {
    margin-bottom: 10px;
}

.spotlight-badge {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.2em 0.55em;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    vertical-align: middle;
    line-height: 1.2;
    color: #fff;
    background-color: #c62828;
    border-radius: 4px;
}

[data-theme="dark"] .spotlight-badge {
    background-color: #e53935;
    color: #fff;
}

.publication-authors {
    color: #666;
    font-style: italic;
    margin-bottom: 5px;
}

.publication-venue {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 3px;
    font-size: 0.95rem;
}

.publication-year {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

/* Courses */
.courses {
    margin-top: 30px;
}

.course-item {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

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

.course-details {
    color: #666;
    font-style: italic;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
    font-size: 0.9rem;
    color: #777;
}

/* Responsive design */
@media (max-width: 768px) {
    .profile {
        flex-direction: column-reverse;
        align-items: center;
    }
    
    .profile-pic {
        width: 100%;
        max-width: 280px;
        height: auto;
        margin-bottom: 20px;
    }
    
    .social-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    nav {
        justify-content: center;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .container {
        padding: 15px;
    }
    
    main .container {
        padding: 20px;
    }
}

/* Theme switcher */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
    margin-left: auto;
    gap: 8px;
}

.theme-switch {
    display: inline-block;
    height: 22px;
    position: relative;
    width: 40px;
}

.theme-switch input {
    display: none;
}

.slider {
    background-color: #ccc;
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
}

.slider:before {
    background-color: white;
    bottom: 3px;
    content: "";
    height: 16px;
    left: 4px;
    position: absolute;
    transition: .4s;
    width: 16px;
}

input:checked + .slider {
    background-color: var(--primary-color);
}

input:checked + .slider:before {
    transform: translateX(17px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Theme icons */
.theme-icon {
    display: flex;
    align-items: center;
    position: relative;
    width: 18px;
    height: 18px;
}

.sun-icon, .moon-icon {
    position: absolute;
    left: 0;
    top: 0;
    fill: var(--text-color);
    stroke: var(--text-color);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Show sun icon when in light mode */
.sun-icon {
    opacity: 1;
    transform: scale(1);
}

.moon-icon {
    opacity: 0;
    transform: scale(0.5);
}

/* Show moon icon when in dark mode */
[data-theme="dark"] .sun-icon {
    opacity: 0;
    transform: scale(0.5);
}

[data-theme="dark"] .moon-icon {
    opacity: 1;
    transform: scale(1);
}

/* Additional dark theme color adjustments */
[data-theme="dark"] h2,
[data-theme="dark"] h3 {
    color: #e1e1e1;
}

[data-theme="dark"] .publication-authors,
[data-theme="dark"] .publication-year,
[data-theme="dark"] .course-details,
[data-theme="dark"] .theme-icons,
[data-theme="dark"] .subtitle,
[data-theme="dark"] footer {
    color: #aaa;
}

[data-theme="dark"] .social-links a {
    background-color: #2d2d2d;
    color: #e1e1e1;
}

[data-theme="dark"] .social-links a:hover {
    background-color: #3d3d3d;
}

/* Social icons */
.social-icon {
    display: inline-block;
    vertical-align: middle;
    margin-right: 6px;
    fill: currentColor;
}

/* Icon-specific colors on hover */
.social-links a:hover .github {
    fill: #333;
}

.social-links a:hover .scholar {
    fill: #4285F4;
}

.social-links a:hover .linkedin {
    fill: #0077B5;
}

[data-theme="dark"] .social-links a:hover .github {
    fill: #fff;
}

[data-theme="dark"] .social-links a:hover .scholar {
    fill: #4285F4;
}

[data-theme="dark"] .social-links a:hover .linkedin {
    fill: #0077B5;
}

/* Content text formatting */
main p {
    text-align: justify;
    margin-bottom: 20px;
    hyphens: auto;
}

/* But keep some elements with their original alignment */
.publication-authors,
.publication-year,
.course-details,
.subtitle,
footer p,
h1, h2, h3, h4, h5, h6 {
    text-align: left;
}

/* Language switcher */
.language-switch-wrapper {
    display: flex;
    align-items: center;
    margin-left: 15px;
}

.language-switch {
    display: inline-block;
    height: 22px;
    position: relative;
    width: 40px;
    margin: 0 5px;
}

.language-switch input {
    display: none;
}

.language-label {
    font-size: 0.8rem;
    font-weight: 600;
} 

/* Section styling */
.section {
    margin: var(--spacing) 0;
}

.section h2,
main .container h2 {
    color: var(--primary-color) !important;
    margin-bottom: calc(var(--spacing) / 2);
    font-size: 1.5rem;
    font-weight: 600;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 8px;
}

/* Responsive video container */
.video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    margin: var(--spacing) 0;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: var(--border-radius);
}

/* Reviewer list styling */
.reviewer-list {
    list-style: none;
    padding: 0;
    margin: var(--spacing) 0;
}

.reviewer-list li {
    padding: 8px 0;
    color: var(--text-color);
    font-size: 1rem;
    line-height: 1.4;
}

/* News section styling */
.news-list {
    /* Use a div-based list to avoid any browser list markers */
    padding: 0;
    margin: var(--spacing) 0;
}

.news-item {
    padding: 20px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    line-height: 1.5;
}

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

.news-date {
    font-weight: 900;
    color: #000;
    display: inline;
    margin-right: 8px;
}

/* Keep the date readable in dark mode while still "highlighted" */
[data-theme="dark"] .news-date {
    color: #fff;
}

.news-content {
    display: inline;
    color: var(--text-color);
}

.news-item div.news-content {
    display: block;
    margin-top: 0.35em;
}

.news-item ul.news-paper-list {
    margin: 0.45em 0 0;
    padding-left: 1.35em;
    list-style-type: disc;
}

.news-item ul.news-paper-list li {
    margin: 0.3em 0;
    text-align: left;
}