/*
 * Written by Constantine Heinrich Chen (ConsHein Chen)
 * Last Change: 2025-09-19
 */

/* Light theme styles - inherits from dark theme and overrides specific properties */
body.light-theme {
    /* Override CSS variables for light theme */
    --primary: #3498db;
    --secondary: #2980b9;
    --accent: #34ccff;
    --dark: #2c3e50;
    --light: #ecf0f1;
    --background: #ffffff;
    --text: #2c3e50;
    --card-bg: #f8f9fa;
    --border: #dee2e6;
    
    /* Override background and text color */
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
    color: var(--text);
}

body.light-theme .navbar {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

body.light-theme .logo {
    background: rgba(255, 255, 255, 0.98) !important;
}

body.light-theme .logo span {
    color: var(--dark);
}

body.light-theme .logo img {
    filter: invert(100%) !important;
}

body.light-theme .nav-links a {
    color: var(--dark);
}

body.light-theme .nav-links a:hover,
body.light-theme .nav-links a.active {
    color: var(--primary);
}

body.light-theme .nav-links a::after {
    background: var(--primary);
}

body.light-theme .nav-links a:hover::after {
    background: var(--primary);
}

body.light-theme .nav-links a.active::after {
    background: var(--primary);
}

body.light-theme .language-switch,
body.light-theme .theme-switch {
    background: rgba(52, 152, 219, 0.1) !important;
    color: var(--dark) !important;
    border: 1px solid var(--primary) !important;
}

body.light-theme .language-switch:hover,
body.light-theme .theme-switch:hover {
    background: rgba(52, 152, 219, 0.2) !important;
}

body.light-theme .card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

body.light-theme .section-title h2,
body.light-theme .intro-section h3,
body.light-theme .news-section h3 {
    color: var(--dark);
}

body.light-theme .language-switch-container,
body.light-theme .theme-switch-container {
    background: rgba(255, 255, 255, 0.9) !important;
    border-bottom: 1px solid var(--border) !important;
}

body.light-theme .switch-buttons-container {
    background: rgba(255, 255, 255, 0.9) !important;
}

body.light-theme .nav-links {
    background: rgba(255, 255, 255, 0.9) !important;
}

/* Custom scrollbar for light theme */
body.light-theme ::-webkit-scrollbar-track {
    background: rgba(236, 240, 241, 0.5);
}

body.light-theme ::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, var(--primary), var(--secondary));
    border: 2px solid rgba(236, 240, 241, 0.5);
}

body.light-theme ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, var(--accent), var(--primary));
}

/* For Firefox in light theme */
body.light-theme * {
    scrollbar-color: var(--primary) rgba(236, 240, 241, 0.5);
}

/* Footer styles for light theme - inherits from dark theme and overrides specific properties */
body.light-theme footer {
    color: var(--dark) !important;
    background: var(--card-bg) !important;
    border-top: 1px solid var(--border);
}

/* Light theme footer styles for landscape mode - inherits from dark theme and overrides specific properties */
@media screen and (max-width: 768px) and (orientation: landscape) {
    body.light-theme footer {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        z-index: 999;
        padding: 1rem;
        text-align: center;
        color: var(--dark) !important;
        background: var(--card-bg) !important;
        border-top: 1px solid var(--border);
        backdrop-filter: blur(10px);
    }
}

body.light-theme #footer a {
    color: var(--primary) !important;
}

body.light-theme #footer a:hover {
    color: var(--primary) !important;
}

body.light-theme .no-content-message {
    color: var(--text) !important;
}

/* Home page styles for light theme */
body.light-theme .info-section {
    background: var(--card-bg) !important;
    border: 1px solid var(--border) !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05) !important;
}

body.light-theme .info-content h2 {
    color: var(--primary) !important;
}

body.light-theme .info-icon {
    filter: invert(30%) !important;
}

body.light-theme .profile-photo {
    border-color: var(--primary) !important;
}

body.light-theme .info-item span,
body.light-theme .info-item a {
    color: var(--text) !important;
}

body.light-theme .info-item a:hover {
    color: var(--primary) !important;
}

body.light-theme .intro-section,
body.light-theme .news-section {
    background: var(--card-bg) !important;
    border: 1px solid var(--border) !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05) !important;
}

/* News content styles for light theme */
body.light-theme .news-content {
    color: #d35400 !important;
}

body.light-theme .news-content a {
    color: var(--primary) !important;
}

body.light-theme .news-date {
    color: var(--primary) !important;
}

body.light-theme .news-item:first-child {
    border-left-color: var(--primary) !important;
    background: rgba(52, 152, 219, 0.1) !important;
}

body.light-theme .news-item:first-child .news-date {
    color: var(--primary) !important;
}

body.light-theme .news-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-theme .news-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

body.light-theme .latest-label {
    color: var(--primary) !important;
    background: rgba(52, 152, 219, 0.2) !important;
}

/* Module container styles for light theme */
body.light-theme .module-container {
    background: var(--card-bg) !important;
    border: 1px solid var(--border) !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05) !important;
}

/* Publication module specific styles for light theme */
body.light-theme .module-container.publication {
    border-left: 4px solid var(--primary) !important;
}

body.light-theme .module-container.publication .module-title {
    color: var(--dark) !important;
}

body.light-theme .module-container.publication .module-content p strong:first-of-type {
    color: var(--primary) !important;
}

/* Education module styles for light theme */
body.light-theme .module-container.education {
    border-left: 4px solid var(--accent) !important;
}

/* Experience module styles for light theme */
body.light-theme .module-container.experience {
    border-left: 4px solid #4caf50 !important;
}

/* Honor module styles for light theme */
body.light-theme .module-container.honor {
    border-left: 4px solid #ff9800 !important;
}

/* Patent module styles for light theme */
body.light-theme .module-container.patent {
    border-left: 4px solid #f5deb3 !important;
}

/* Teaching module styles for light theme */
body.light-theme .module-container.teaching {
    border-left: 4px solid #9c27b0 !important;
}

/* Reviewer module styles for light theme */
body.light-theme .module-container.reviewer {
    border-left: 4px solid #607d8b !important;
}

/* Module title styles for light theme */
body.light-theme .module-title {
    color: var(--dark) !important;
}

/* Module subtitle styles for light theme */
body.light-theme .module-subtitle {
    color: var(--text) !important;
}

/* Module content styles for light theme */
body.light-theme .module-content {
    color: var(--text) !important;
}

/* Education module strong:first-child styles for light theme */
body.light-theme .module-container.education .module-content strong:first-child {
    color: var(--primary) !important;
}

/* Patent module patent-type styles for light theme */
body.light-theme .module-container.patent .module-content strong.patent-type {
    color: #8b4513 !important;
}

/* Module date styles for light theme */
body.light-theme .module-date {
    color: var(--primary) !important;
}

/* Education module date styles for light theme */
body.light-theme .module-container.education .module-date {
    color: #e74c3c !important;
}

/* Module link styles for light theme */
body.light-theme .module-link {
    color: var(--primary) !important;
    background: rgba(52, 152, 219, 0.1) !important;
    border: 1px solid rgba(52, 152, 219, 0.2) !important;
}

/* Special link type styles for light theme */
body.light-theme .module-link.video-link {
    background: rgba(255, 0, 0, 0.1) !important;
    border-color: rgba(255, 0, 0, 0.2) !important;
    color: #ff5252 !important;
}

body.light-theme .module-link.site-link {
    background: rgba(76, 175, 80, 0.1) !important;
    border-color: rgba(76, 175, 80, 0.2) !important;
    color: #66bb6a !important;
}

body.light-theme .module-link.paper-link {
    background: rgba(33, 150, 243, 0.1) !important;
    border-color: rgba(33, 150, 243, 0.2) !important;
    color: #42a5f5 !important;
}

body.light-theme .module-link.code-link {
    background: rgba(156, 39, 176, 0.1) !important;
    border-color: rgba(156, 39, 176, 0.2) !important;
    color: #ba68c8 !important;
}

/* Module tags styles for light theme */
body.light-theme .module-tag {
    background: rgba(52, 152, 219, 0.2) !important;
    color: var(--primary) !important;
}

/* Module image container styles for light theme */
body.light-theme .module-image {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

body.light-theme .module-image-container:hover .module-image {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3) !important;
}

body.light-theme .module-container.publication .module-image-container:hover .module-image {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3) !important;
}

/* Tabs container styles for light theme */
body.light-theme .tabs {
    border-bottom: 2px solid rgba(52, 152, 219, 0.3);
}

body.light-theme .tab-button {
    color: rgba(44, 62, 80, 0.7);
}

body.light-theme .tab-button:hover {
    color: var(--primary);
}

body.light-theme .tab-button.active {
    color: var(--primary);
}

body.light-theme .tab-button.active::after {
    background: var(--primary);
}

/* CV section styles for light theme */
body.light-theme .cv-pdf-viewer {
    background: #ffffff !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1) !important;
}

body.light-theme .pdf-fallback {
    background: var(--card-bg) !important;
    color: var(--text) !important;
}

body.light-theme .pdf-fallback a {
    color: var(--primary) !important;
}

body.light-theme .pdf-error-message {
    background: var(--card-bg) !important;
    color: var(--text) !important;
}

body.light-theme .pdf-loading-indicator {
    background: var(--card-bg) !important;
    color: var(--text) !important;
}

/* Year header and container styles for light theme */
body.light-theme .year-header {
    border-bottom: 2px solid var(--primary) !important;
}

body.light-theme .year-header h3 {
    color: var(--primary) !important;
}