        * { margin: 0; padding: 0; box-sizing: border-box; }
        body {
            background: #0b1120;
            overflow: hidden;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
        }

        /* Modal overlay */
        .modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.8);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 10000;
        }
        .modal-content {
            position: relative;
            max-height: 80vh;
            overflow-y: auto;
        }
        .modal-content p {
            margin: 8px 0;
        }

        /* Settings Popup */
        .settings-popup {
            position: fixed;
            top: 70px;
            right: 20px;
            width: 320px;
            background: rgba(11, 17, 32, 0.95);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 8px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
            z-index: 1000;
            backdrop-filter: blur(10px);
        }
        .settings-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px 16px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
            color: #fff;
            font-weight: 500;
            font-size: 14px;
        }
        .settings-close {
            background: transparent;
            border: none;
            color: rgba(255, 255, 255, 0.6);
            font-size: 20px;
            cursor: pointer;
            padding: 0;
            line-height: 1;
            transition: color 0.15s;
        }
        .settings-close:hover {
            color: #fff;
        }
        .settings-content {
            padding: 16px;
        }
        .settings-slider {
            display: flex;
            flex-direction: column;
            gap: 4px;
            margin-bottom: 16px;
            padding-bottom: 12px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        }
        .settings-slider:last-child {
            margin-bottom: 0;
            padding-bottom: 0;
            border-bottom: none;
        }
        .settings-slider .conn-label {
            font-size: 12px;
            color: rgba(255, 255, 255, 0.7);
            margin-bottom: 4px;
        }
        .settings-slider input[type="range"] {
            width: 100%;
            margin: 4px 0;
        }
        .settings-slider .slider-value {
            font-size: 11px;
            color: #10a37f;
            text-align: right;
        }

        /* About view - enable native scrolling */
        body.view-about {
            overflow-y: auto;
            overflow-x: hidden;
        }
        body.view-about #graph-container {
            height: auto;
            min-height: calc(100vh - 56px);
            overflow: visible;
        }

        /* Graph container height */
        #graph-container {
            height: calc(100vh - 56px);  /* nav only */
        }
        body.view-about #graph-container {
            min-height: calc(100vh - 56px);
            padding-bottom: 40px;
        }

        /* Navigation Header */
        nav.site-nav {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            height: 56px;
            background: rgba(11, 17, 32, 0.95);
            border-bottom: 1px solid rgba(255,255,255,0.1);
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 32px;
            z-index: 200;
            backdrop-filter: blur(10px);
        }
        .logo-group {
            display: flex;
            align-items: center;
            gap: 16px;
        }
        .site-logo {
            font-size: 20px;
            font-weight: 700;
            color: #fff;
            text-decoration: none;
        }
        .site-logo span { color: #10a37f; }
        .nav-links {
            display: flex;
            gap: 24px;
        }
        .nav-link {
            color: rgba(255,255,255,0.7);
            text-decoration: none;
            font-size: 14px;
            font-weight: 500;
            transition: color 0.2s;
            padding: 8px 0;
        }
        .nav-link:hover { color: #10a37f; }
        .nav-link.active {
            color: #10a37f;
            border-bottom: 2px solid #10a37f;
        }

        #graph-container {
            width: 100vw;
            /* height set above: calc(100vh - 56px - 32px) for footer */
            margin-top: 56px;
            margin-left: 0;
            transition: margin-left 0.3s ease, width 0.3s ease;
        }

        /* Sidebar expanded state - push graph */
        body.sidebar-expanded #graph-container {
            margin-left: 320px;
            width: calc(100vw - 320px);
        }

        /* Search box - inline with controls */
        #search-container {
            position: relative;
            display: flex;
            flex-direction: column;
            margin-right: 16px;
        }
        #search-input {
            width: 200px;
            padding: 6px 12px;
            font-size: 13px;
            border: 1px solid rgba(255,255,255,0.2);
            border-radius: 6px;
            background: rgba(255, 255, 255, 0.08);
            color: #fff;
            outline: none;
            font-family: inherit;
        }
        #search-input:focus {
            border-color: #10a37f;
            background: rgba(255, 255, 255, 0.12);
        }
        #search-input::placeholder {
            color: rgba(255,255,255,0.5);
        }
        #search-results {
            position: absolute;
            top: 100%;
            left: 0;
            margin-top: 4px;
            width: 280px;
            max-height: 300px;
            overflow-y: auto;
            background: rgba(11, 17, 32, 0.98);
            border-radius: 6px;
            border: 1px solid rgba(255,255,255,0.1);
            display: none;
            box-shadow: 0 4px 12px rgba(0,0,0,0.3);
        }
        .search-result {
            padding: 8px 12px;
            cursor: pointer;
            border-bottom: 1px solid rgba(255,255,255,0.1);
            color: #fff;
            font-size: 12px;
        }
        .search-result:hover {
            background: rgba(16, 163, 127, 0.2);
        }
        .search-result .year {
            color: #10a37f;
            font-size: 11px;
        }

        /* Info panel - Academic style */
        #info-panel {
            position: fixed;
            top: 56px;  /* Align with nav bar bottom */
            right: 0;
            width: 380px;
            height: calc(100vh - 56px);
            background: rgba(0, 0, 0, 0.5);
            backdrop-filter: blur(10px);
            border-left: 1px solid rgba(255,255,255,0.1);
            box-shadow: -4px 0 20px rgba(0,0,0,0.3);
            color: #ffffff;
            z-index: 100;
            display: none;
            overflow: hidden;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
        }
        #info-panel.visible {
            display: flex;
            flex-direction: column;
        }
        #info-panel .panel-header {
            padding: 12px 16px;
            background: rgba(255,255,255,0.05);
            border-bottom: 1px solid rgba(255,255,255,0.1);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        #info-panel .panel-header .topic-badge {
            font-family: -apple-system, sans-serif;
            font-size: 11px;
            padding: 3px 8px;
            border-radius: 3px;
            background: rgba(255,255,255,0.15);
            color: rgba(255,255,255,0.9);
        }
        #info-panel .close-btn {
            background: none;
            border: none;
            color: rgba(255,255,255,0.6);
            font-size: 20px;
            cursor: pointer;
            padding: 0;
            line-height: 1;
        }
        #info-panel .close-btn:hover {
            color: #fff;
        }
        #info-panel .citation-body {
            padding: 20px;
            overflow-y: auto;
            flex: 1;
        }
        #info-panel .citation-title {
            font-size: 18px;
            font-weight: bold;
            color: #fff;
            margin-bottom: 12px;
            line-height: 1.4;
        }
        #info-panel .citation-authors {
            font-size: 14px;
            color: rgba(255,255,255,0.9);
            margin-bottom: 10px;
            line-height: 1.8;
        }
        #info-panel .citation-authors .author-link {
            color: #93c5fd;
            text-decoration: none;
            cursor: pointer;
            display: inline-block;
        }
        #info-panel .citation-authors .author-link:hover {
            color: #60a5fa;
            text-decoration: underline;
        }
        #info-panel .citation-venue {
            font-size: 14px;
            color: rgba(255,255,255,0.8);
            margin-bottom: 16px;
        }
        #info-panel .citation-venue em {
            font-style: italic;
        }
        #info-panel .citation-venue .volume {
            font-weight: bold;
        }
        #info-panel .citation-doi {
            font-family: -apple-system, sans-serif;
            font-size: 12px;
            color: rgba(255,255,255,0.7);
            margin-bottom: 16px;
        }
        #info-panel .citation-doi a {
            color: #60a5fa;
            text-decoration: none;
        }
        #info-panel .citation-doi a:hover {
            text-decoration: underline;
        }
        #info-panel .citation-abstract {
            font-family: -apple-system, sans-serif;
            font-size: 13px;
            color: rgba(255,255,255,0.8);
            line-height: 1.6;
            margin-top: 16px;
            padding-top: 16px;
            border-top: 1px solid rgba(255,255,255,0.1);
            max-height: 200px;
            overflow-y: auto;
        }
        #info-panel .citation-abstract .abstract-label {
            font-weight: 600;
            color: rgba(255,255,255,0.6);
            font-size: 11px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 8px;
        }
        #info-panel .citation-connections {
            font-family: -apple-system, sans-serif;
            font-size: 13px;
            color: rgba(255,255,255,0.8);
            margin-top: 16px;
            padding-top: 16px;
            border-top: 1px solid rgba(255,255,255,0.1);
            max-height: 200px;
            overflow-y: auto;
        }
        #info-panel .citation-connections .connections-label {
            font-weight: 600;
            color: rgba(255,255,255,0.6);
            font-size: 11px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 8px;
        }
        #info-panel .connection-item {
            padding: 8px 0;
            border-bottom: 1px solid rgba(255,255,255,0.1);
        }
        #info-panel .connection-item:last-child {
            border-bottom: none;
        }
        #info-panel .connection-title {
            font-size: 12px;
            color: rgba(255,255,255,0.9);
            margin-bottom: 4px;
            cursor: pointer;
        }
        #info-panel .connection-title:hover {
            color: #60a5fa;
        }
        #info-panel .connection-shared {
            font-size: 11px;
            color: rgba(255,255,255,0.5);
        }
        #info-panel .connection-shared .keyword {
            background: rgba(96, 165, 250, 0.2);
            color: #93c5fd;
            padding: 1px 5px;
            border-radius: 3px;
            margin-right: 4px;
        }
        #info-panel .connection-shared .topic-tag {
            background: rgba(167, 139, 250, 0.2);
            color: #c4b5fd;
            padding: 1px 5px;
            border-radius: 3px;
        }
        #info-panel .panel-actions {
            padding: 12px 16px;
            background: rgba(255,255,255,0.05);
            border-top: 1px solid rgba(255,255,255,0.1);
            display: flex;
            gap: 8px;
        }
        #info-panel .action-btn {
            font-family: -apple-system, sans-serif;
            font-size: 12px;
            padding: 8px 14px;
            border: 1px solid rgba(255,255,255,0.2);
            border-radius: 4px;
            background: rgba(255,255,255,0.1);
            color: #fff;
            cursor: pointer;
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            gap: 4px;
        }
        #info-panel .action-btn:hover {
            background: rgba(255,255,255,0.2);
            border-color: rgba(255,255,255,0.3);
        }
        #info-panel .action-btn.primary {
            background: #3b82f6;
            border-color: #3b82f6;
            color: #fff;
        }
        #info-panel .action-btn.primary:hover {
            background: #2563eb;
        }

        /* Paper iframe overlay */
        #paper-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            background: rgba(0,0,0,0.8);
            z-index: 200;
            display: none;
        }
        #paper-overlay.visible {
            display: flex;
            flex-direction: column;
        }
        #paper-overlay .overlay-header {
            padding: 12px 20px;
            background: #fff;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        #paper-overlay .overlay-title {
            font-family: -apple-system, sans-serif;
            font-size: 14px;
            color: #333;
            max-width: 80%;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        #paper-overlay iframe {
            flex: 1;
            border: none;
            background: #fff;
        }

        /* Stats - hidden per user request */
        #stats {
            display: none;
        }

        /* Connection type selector - unified control bar (RIGHT-aligned) */
        #connection-selector {
            position: absolute;
            top: 68px;  /* Account for nav bar */
            right: 20px;  /* Right-aligned with padding */
            left: auto;  /* Remove left constraint */
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            z-index: 100;
            align-items: center;
            background: rgba(11, 17, 32, 0.85);
            padding: 8px 12px;
            border-radius: 8px;
            border: 1px solid rgba(255,255,255,0.1);
            backdrop-filter: blur(8px);
            max-width: 600px;  /* Prevent it from getting too wide */
        }
        .checkbox-label {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            padding: 6px 12px;
            font-size: 13px;
            border: 1px solid rgba(255,255,255,0.2);
            border-radius: 6px;
            background: rgba(255, 255, 255, 0.08);
            color: rgba(255,255,255,0.7);
            cursor: pointer;
            transition: all 0.2s;
            user-select: none;
        }
        .checkbox-label:hover {
            border-color: rgba(255,255,255,0.4);
            color: #fff;
        }
        .checkbox-label:has(input:checked) {
            border-color: #8b5cf6;
            background: rgba(139, 92, 246, 0.2);
            color: #8b5cf6;
        }
        .show-checkbox {
            appearance: none;
            width: 14px;
            height: 14px;
            border: 1px solid rgba(255,255,255,0.4);
            border-radius: 3px;
            background: transparent;
            cursor: pointer;
            position: relative;
        }
        .show-checkbox:checked {
            background: #8b5cf6;
            border-color: #8b5cf6;
        }
        .show-checkbox:checked::after {
            content: '✓';
            position: absolute;
            top: -1px;
            left: 2px;
            font-size: 10px;
            color: white;
        }
        /* Type filter checkboxes - compact styling */
        .type-filter {
            padding: 4px 8px;
            font-size: 11px;
        }
        .type-filter-label {
            margin-left: 8px;
        }
        .type-checkbox {
            appearance: none;
            width: 12px;
            height: 12px;
            border: 1px solid rgba(255,255,255,0.4);
            border-radius: 2px;
            background: transparent;
            cursor: pointer;
            position: relative;
        }
        .type-checkbox:checked {
            background: #10a37f;
            border-color: #10a37f;
        }
        .type-checkbox:checked::after {
            content: '✓';
            position: absolute;
            top: -2px;
            left: 1px;
            font-size: 9px;
            color: white;
        }
        .type-count {
            font-size: 10px;
            color: rgba(255,255,255,0.5);
        }
        .conn-label {
            color: rgba(255,255,255,0.6);
            font-size: 13px;
            font-weight: 500;
            margin-right: 6px;
        }

        /* View/Person Dropdown Selectors */
        .dropdown-container {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            margin-right: 8px;
        }
        .dropdown-label {
            color: rgba(255,255,255,0.6);
            font-size: 11px;
            font-weight: 500;
        }
        .view-dropdown,
        .person-dropdown {
            background: rgba(11, 17, 32, 0.95);
            border: 1px solid rgba(255,255,255,0.3);
            border-radius: 4px;
            color: #fff;
            font-size: 11px;
            padding: 3px 6px;
            cursor: pointer;
            min-width: 80px;
        }
        .person-dropdown {
            max-width: 140px;  /* Limit person dropdown width */
        }
        .view-dropdown:hover,
        .person-dropdown:hover {
            border-color: #10a37f;
        }
        .view-dropdown:focus,
        .person-dropdown:focus {
            outline: none;
            border-color: #10a37f;
            box-shadow: 0 0 0 2px rgba(16, 163, 127, 0.2);
        }

        /* Multi-Select Dropdown Styles */
        .multiselect-container {
            position: relative;
            display: inline-block;
            margin-right: 8px;
        }
        .multiselect-btn {
            display: flex;
            align-items: center;
            gap: 6px;
            background: rgba(11, 17, 32, 0.95);
            border: 1px solid rgba(255,255,255,0.3);
            border-radius: 4px;
            color: #fff;
            font-size: 11px;
            padding: 5px 10px;
            cursor: pointer;
            min-width: 100px;
            transition: all 0.2s;
        }
        .multiselect-btn:hover {
            border-color: #10a37f;
        }
        .multiselect-btn.active {
            border-color: #10a37f;
            background: rgba(16, 163, 127, 0.1);
        }
        .multiselect-label {
            color: rgba(255,255,255,0.6);
            font-weight: 500;
        }
        .multiselect-count {
            color: #10a37f;
            font-weight: 600;
        }
        .multiselect-arrow {
            color: rgba(255,255,255,0.4);
            font-size: 8px;
            margin-left: auto;
            transition: transform 0.2s;
        }
        .multiselect-btn.active .multiselect-arrow {
            transform: rotate(180deg);
        }
        .multiselect-dropdown {
            display: none;
            position: absolute;
            top: 100%;
            left: 0;
            margin-top: 4px;
            background: rgba(11, 17, 32, 0.98);
            border: 1px solid rgba(255,255,255,0.2);
            border-radius: 6px;
            padding: 8px 0;
            min-width: 180px;
            max-height: 300px;
            overflow-y: auto;
            z-index: 1000;
            box-shadow: 0 4px 12px rgba(0,0,0,0.3);
        }
        .multiselect-dropdown.show {
            display: block;
        }
        .multiselect-option {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 6px 12px;
            cursor: pointer;
            transition: background 0.15s;
            font-size: 12px;
            color: rgba(255,255,255,0.8);
        }
        .multiselect-option:hover {
            background: rgba(255,255,255,0.08);
        }
        .multiselect-option input[type="checkbox"] {
            appearance: none;
            width: 14px;
            height: 14px;
            border: 1px solid rgba(255,255,255,0.4);
            border-radius: 3px;
            background: transparent;
            cursor: pointer;
            position: relative;
            flex-shrink: 0;
        }
        .multiselect-option input[type="checkbox"]:checked {
            background: #10a37f;
            border-color: #10a37f;
        }
        .multiselect-option input[type="checkbox"]:checked::after {
            content: '✓';
            position: absolute;
            top: -1px;
            left: 2px;
            font-size: 10px;
            color: white;
        }
        .multiselect-actions {
            display: flex;
            gap: 8px;
            padding: 8px 12px 4px;
            border-top: 1px solid rgba(255,255,255,0.1);
            margin-top: 4px;
        }
        .multiselect-action {
            flex: 1;
            padding: 4px 8px;
            font-size: 10px;
            background: rgba(255,255,255,0.1);
            border: none;
            border-radius: 3px;
            color: rgba(255,255,255,0.7);
            cursor: pointer;
            transition: all 0.15s;
        }
        .multiselect-action:hover {
            background: rgba(255,255,255,0.2);
            color: #fff;
        }
        /* Institution "only" button - select only this item */
        .inst-label-text {
            flex: 1;
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .inst-only-btn,
        .wtype-only-btn,
        .people-only-btn {
            padding: 2px 6px;
            font-size: 9px;
            background: transparent;
            border: 1px solid rgba(255,255,255,0.2);
            border-radius: 3px;
            color: rgba(255,255,255,0.5);
            cursor: pointer;
            transition: all 0.15s;
            opacity: 0;
            margin-left: auto;
            flex-shrink: 0;
        }
        .multiselect-option:hover .inst-only-btn,
        .multiselect-option:hover .wtype-only-btn,
        .multiselect-option:hover .people-only-btn {
            opacity: 1;
        }
        .inst-only-btn:hover,
        .wtype-only-btn:hover,
        .people-only-btn:hover {
            background: rgba(16, 163, 127, 0.3);
            border-color: #10a37f;
            color: #10a37f;
        }
        .view-dropdown option,
        .person-dropdown option {
            background: #0b1120;
            color: #fff;
        }

        /* Timeline - compact inline for top controls */
        #timeline-container {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 6px 12px;
            background: rgba(11, 17, 32, 0.9);
            border: 1px solid rgba(255,255,255,0.2);
            border-radius: 6px;
            margin-left: 20px;
        }
        #timeline-container .timeline-label {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            color: rgba(255,255,255,0.7);
            font-size: 12px;
        }
        #timeline-container .year-display {
            color: #10a37f;
            font-weight: bold;
        }
        .range-slider {
            position: relative;
            width: 120px;
            height: 6px;
        }
        .range-slider input[type="range"] {
            position: absolute;
            width: 100%;
            height: 6px;
            -webkit-appearance: none;
            background: transparent;
            pointer-events: none;
            outline: none;
        }
        .range-slider input[type="range"]::-webkit-slider-thumb {
            -webkit-appearance: none;
            width: 14px;
            height: 14px;
            background: #10a37f;
            border-radius: 50%;
            cursor: pointer;
            pointer-events: auto;
            box-shadow: 0 2px 6px rgba(0,0,0,0.3);
        }
        .range-slider input[type="range"]::-moz-range-thumb {
            width: 14px;
            height: 14px;
            background: #10a37f;
            border-radius: 50%;
            cursor: pointer;
            pointer-events: auto;
            border: none;
            box-shadow: 0 2px 6px rgba(0,0,0,0.3);
        }
        .range-track {
            position: absolute;
            width: 100%;
            height: 6px;
            background: rgba(255,255,255,0.2);
            border-radius: 3px;
            top: 0;
        }
        .range-selected {
            position: absolute;
            height: 6px;
            background: #10a37f;
            border-radius: 3px;
            top: 0;
        }
        .year-labels {
            display: none; /* Hide in compact mode */
        }
        .play-btn {
            background: rgba(16, 163, 127, 0.3);
            border: 1px solid #10a37f;
            color: #10a37f;
            padding: 4px 8px;
            border-radius: 4px;
            cursor: pointer;
            font-size: 11px;
            transition: all 0.2s;
        }
        .play-btn:hover {
            background: rgba(16, 163, 127, 0.5);
        }
        .play-btn.playing {
            background: rgba(239, 68, 68, 0.3);
            border-color: #ef4444;
            color: #ef4444;
        }
        /* Attractor Force Slider */
        #attractor-container {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-left: 12px;
            padding-left: 12px;
            border-left: 1px solid rgba(255,255,255,0.15);
        }
        .attractor-slider {
            width: 80px;
            height: 6px;
            -webkit-appearance: none;
            background: linear-gradient(to right, #ef4444 0%, rgba(255,255,255,0.3) 50%, #10a37f 100%);
            border-radius: 3px;
            outline: none;
            cursor: pointer;
        }
        .attractor-slider::-webkit-slider-thumb {
            -webkit-appearance: none;
            width: 14px;
            height: 14px;
            background: white;
            border-radius: 50%;
            cursor: pointer;
            box-shadow: 0 2px 6px rgba(0,0,0,0.3);
        }
        .attractor-slider::-moz-range-thumb {
            width: 14px;
            height: 14px;
            background: white;
            border-radius: 50%;
            cursor: pointer;
            border: none;
            box-shadow: 0 2px 6px rgba(0,0,0,0.3);
        }
        .slider-value {
            color: rgba(255,255,255,0.8);
            font-size: 11px;
            min-width: 36px;
            text-align: right;
        }

        /* Papers List - vertical scrollable list on the right */
        #papers-row {
            position: absolute;
            left: 0;
            right: 0;
            bottom: 0;
            height: 200px;
            background: rgba(11, 17, 32, 0.95);
            border-top: 1px solid rgba(255,255,255,0.1);
            display: flex;
            flex-direction: column;
            padding: 15px 20px;
            overflow-y: auto;
            gap: 8px;
            z-index: 100;
        }
        #papers-row::-webkit-scrollbar {
            width: 6px;
        }
        #papers-row::-webkit-scrollbar-track {
            background: rgba(255,255,255,0.1);
        }
        #papers-row::-webkit-scrollbar-thumb {
            background: rgba(255,255,255,0.3);
            border-radius: 3px;
        }
        .paper-card {
            width: 100%;
            background: rgba(255,255,255,0.05);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 6px;
            padding: 8px 12px;
            cursor: pointer;
            transition: all 0.2s;
            display: flex;
            flex-direction: row;
            align-items: center;
            gap: 12px;
        }
        .paper-card:hover {
            border-color: rgba(255,255,255,0.3);
            background: rgba(255,255,255,0.08);
        }
        .paper-card.selected {
            border-color: #10a37f;
            background: rgba(16, 163, 127, 0.15);
            box-shadow: 0 0 10px rgba(16, 163, 127, 0.3);
        }
        .paper-card .paper-title {
            font-size: 13px;
            color: #fff;
            line-height: 1.3;
            flex: 1;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .paper-card .paper-meta {
            font-size: 11px;
            color: rgba(255,255,255,0.5);
            display: flex;
            align-items: center;
            gap: 8px;
            flex-shrink: 0;
        }
        .paper-card .paper-year {
            color: #10a37f;
            font-weight: 600;
        }
        .paper-card .paper-topic {
            padding: 2px 6px;
            border-radius: 3px;
            font-size: 9px;
        }
        #papers-row-label {
            color: rgba(255,255,255,0.5);
            font-size: 11px;
            text-transform: uppercase;
            letter-spacing: 1px;
            margin-bottom: 5px;
            padding-bottom: 10px;
            border-bottom: 1px solid rgba(255,255,255,0.1);
        }
        .load-more-btn {
            width: 100%;
            padding: 12px 16px;
            background: rgba(16, 163, 127, 0.2);
            border: 1px solid #10a37f;
            border-radius: 6px;
            color: #10a37f;
            cursor: pointer;
            font-size: 12px;
            margin-top: 5px;
        }
        .load-more-btn:hover {
            background: rgba(16, 163, 127, 0.3);
        }

        /* Team sidebar - uses unified collapsible pattern */
        #team-sidebar {
            /* Inherits from .collapsible-sidebar */
        }
        #team-sidebar .sidebar-tab-icon {
            background: rgba(16, 163, 127, 0.2);
            color: #10a37f;
        }
        #team-sidebar:hover .sidebar-tab-icon {
            background: rgba(16, 163, 127, 0.3);
        }
        #team-sidebar .sidebar-header {
            padding: 16px;
            border-bottom: 1px solid rgba(255,255,255,0.1);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        #team-sidebar .sidebar-header h3 {
            color: #fff;
            font-size: 14px;
            font-weight: 600;
        }
        #team-sidebar .sidebar-header .clear-btn {
            font-size: 12px;
            color: rgba(255,255,255,0.5);
            cursor: pointer;
            padding: 4px 8px;
            border-radius: 4px;
        }
        #team-sidebar .sidebar-header .clear-btn:hover {
            background: rgba(255,255,255,0.1);
            color: #fff;
        }
        #team-sidebar .team-search-container {
            padding: 8px 16px;
            border-bottom: 1px solid rgba(255,255,255,0.1);
        }
        #team-sidebar .team-search-input {
            width: 100%;
            padding: 8px 12px;
            font-size: 13px;
            border: 1px solid rgba(255,255,255,0.2);
            border-radius: 6px;
            background: rgba(255, 255, 255, 0.08);
            color: #fff;
            outline: none;
            font-family: inherit;
        }
        #team-sidebar .team-search-input:focus {
            border-color: #10a37f;
            background: rgba(255, 255, 255, 0.12);
        }
        #team-sidebar .team-search-input::placeholder {
            color: rgba(255,255,255,0.4);
        }
        /* Role filter container - matches pub-type-filters styling */
        #team-sidebar .role-filter-container {
            padding: 8px 16px;
            border-bottom: 1px solid rgba(255,255,255,0.1);
            display: flex;
            flex-wrap: wrap;
            gap: 4px 12px;
            align-items: center;
        }
        #team-sidebar .role-filter-container .filter-section-label {
            font-size: 11px;
            color: rgba(255,255,255,0.5);
            width: 100%;
            margin-bottom: 4px;
        }
        #team-sidebar .role-filter-container .type-filter {
            display: flex;
            align-items: center;
            gap: 4px;
            font-size: 12px;
            color: rgba(255,255,255,0.7);
            cursor: pointer;
            user-select: none;
        }
        #team-sidebar .role-filter-container .type-filter input[type="checkbox"] {
            width: 12px;
            height: 12px;
            accent-color: #10a37f;
        }
        #team-sidebar .role-filter-container .type-count {
            color: rgba(255,255,255,0.4);
            font-size: 10px;
        }
        #team-sidebar .team-list {
            flex: 1;
            overflow-y: auto;
            padding: 8px 0;
        }
        #team-sidebar .role-group {
            margin-bottom: 8px;
        }
        #team-sidebar .role-header {
            padding: 8px 16px;
            font-size: 11px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            color: rgba(255,255,255,0.5);
            display: flex;
            align-items: center;
            gap: 8px;
        }
        #team-sidebar .role-header .role-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
        }
        #team-sidebar .team-member {
            padding: 10px 16px 10px 32px;
            font-size: 13px;
            color: rgba(255,255,255,0.8);
            cursor: pointer;
            transition: all 0.15s;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        #team-sidebar .team-member:hover {
            background: rgba(255,255,255,0.05);
            color: #fff;
        }
        #team-sidebar .team-member.selected {
            background: rgba(16, 163, 127, 0.2);
            color: #10a37f;
        }
        #team-sidebar .team-member .paper-count {
            font-size: 11px;
            color: rgba(255,255,255,0.4);
            background: rgba(255,255,255,0.1);
            padding: 2px 6px;
            border-radius: 10px;
        }
        #team-sidebar .team-member.selected .paper-count {
            background: rgba(16, 163, 127, 0.3);
            color: #10a37f;
        }

        /* Publications Sidebar - uses unified collapsible pattern */
        #publications-sidebar {
            /* Inherits from .collapsible-sidebar */
        }
        #publications-sidebar .sidebar-tab-icon {
            background: rgba(59, 130, 246, 0.2);
            color: #3b82f6;
        }
        #publications-sidebar:hover .sidebar-tab-icon {
            background: rgba(59, 130, 246, 0.3);
        }
        /* Wider sidebar content for full citations */
        #publications-sidebar:hover,
        #publications-sidebar.expanded {
            width: 400px;
        }
        #publications-sidebar .sidebar-content {
            width: 352px;
        }
        #publications-sidebar .sidebar-header {
            padding: 16px;
            border-bottom: 1px solid rgba(255,255,255,0.1);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        #publications-sidebar .sidebar-header h3 {
            color: #fff;
            font-size: 16px;
            font-weight: 600;
        }
        #publications-sidebar .author-filter {
            color: #10a37f;
            font-size: 12px;
        }
        #publications-sidebar .pub-search-container {
            padding: 8px 16px;
            border-bottom: 1px solid rgba(255,255,255,0.1);
        }
        #publications-sidebar .pub-search-input {
            width: 100%;
            padding: 8px 12px;
            font-size: 13px;
            border: 1px solid rgba(255,255,255,0.2);
            border-radius: 6px;
            background: rgba(255, 255, 255, 0.08);
            color: #fff;
            outline: none;
            font-family: inherit;
        }
        #publications-sidebar .pub-search-input:focus {
            border-color: #10a37f;
            background: rgba(255, 255, 255, 0.12);
        }
        #publications-sidebar .pub-search-input::placeholder {
            color: rgba(255,255,255,0.4);
        }
        #publications-sidebar .pub-type-filters {
            padding: 8px 16px;
            border-bottom: 1px solid rgba(255,255,255,0.1);
            display: flex;
            flex-wrap: wrap;
            gap: 4px 12px;
        }
        #publications-sidebar .type-filter-label {
            display: flex;
            align-items: center;
            gap: 4px;
            font-size: 11px;
            color: rgba(255,255,255,0.7);
            cursor: pointer;
            user-select: none;
        }
        #publications-sidebar .type-filter-label input[type="checkbox"] {
            width: 12px;
            height: 12px;
            accent-color: #10a37f;
        }
        #publications-sidebar .type-filter-label .type-count {
            color: rgba(255,255,255,0.4);
            font-size: 10px;
        }
        #publications-sidebar .publications-list {
            flex: 1;
            overflow-y: auto;
            padding: 8px 0;
        }
        #publications-sidebar .year-group {
            margin-bottom: 12px;
        }
        #publications-sidebar .year-header {
            padding: 8px 16px;
            font-size: 14px;
            font-weight: 600;
            color: #10a37f;
            display: flex;
            align-items: center;
            gap: 8px;
            cursor: pointer;
        }
        #publications-sidebar .year-header .count {
            font-size: 11px;
            color: rgba(255,255,255,0.5);
            font-weight: 400;
        }
        #publications-sidebar .publication-item {
            padding: 10px 16px 10px 24px;
            cursor: pointer;
            color: rgba(255,255,255,0.85);
            font-size: 12px;
            line-height: 1.5;
            transition: background 0.2s;
            display: block;
            border-bottom: 1px solid rgba(255,255,255,0.05);
        }
        #publications-sidebar .publication-item:hover {
            background: rgba(16, 163, 127, 0.15);
        }
        #publications-sidebar .publication-item.selected {
            background: rgba(16, 163, 127, 0.25);
            border-left: 3px solid #10a37f;
        }
        #publications-sidebar .pub-authors {
            color: rgba(255,255,255,0.7);
            margin-bottom: 4px;
        }
        #publications-sidebar .pub-title {
            font-style: italic;
            color: #fff;
            margin-bottom: 4px;
        }
        #publications-sidebar .pub-venue {
            color: rgba(255,255,255,0.5);
            font-size: 11px;
        }

        /* Collapsible Sidebar Base Styles */
        .collapsible-sidebar {
            position: fixed;
            left: 0;
            top: 56px;
            width: 48px;
            height: calc(100vh - 56px);
            background: rgba(11, 17, 32, 0.98);
            border-right: 1px solid rgba(255,255,255,0.1);
            z-index: 150;
            display: none;
            flex-direction: column;
            backdrop-filter: blur(10px);
            transition: width 0.3s ease;
            overflow: hidden;
        }
        .collapsible-sidebar.visible {
            display: flex;
        }
        .collapsible-sidebar:hover,
        .collapsible-sidebar.expanded {
            width: 320px;
        }
        .collapsible-sidebar .sidebar-tab {
            width: 48px;
            height: 100%;
            position: absolute;
            left: 0;
            top: 0;
            display: flex;
            flex-direction: column;
            align-items: center;
            padding-top: 16px;
            cursor: pointer;
        }
        .collapsible-sidebar .sidebar-tab-icon {
            width: 32px;
            height: 32px;
            background: rgba(168, 85, 247, 0.2);
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #a855f7;
            font-size: 16px;
            transition: background 0.2s;
        }
        .collapsible-sidebar:hover .sidebar-tab-icon {
            background: rgba(168, 85, 247, 0.3);
        }
        .collapsible-sidebar .sidebar-tab-label {
            writing-mode: vertical-rl;
            text-orientation: mixed;
            transform: rotate(180deg);
            color: rgba(255,255,255,0.7);
            font-size: 12px;
            font-weight: 500;
            margin-top: 12px;
            letter-spacing: 1px;
        }
        .collapsible-sidebar .sidebar-content {
            margin-left: 48px;
            width: 272px;
            height: 100%;
            opacity: 0;
            transition: opacity 0.2s ease 0.1s;
            display: flex;
            flex-direction: column;
        }
        .collapsible-sidebar:hover .sidebar-content,
        .collapsible-sidebar.expanded .sidebar-content {
            opacity: 1;
        }

        /* Positions Sidebar - for Open Positions view */
        #positions-sidebar {
            /* Inherits from .collapsible-sidebar */
        }
        #positions-sidebar .sidebar-header {
            padding: 16px;
            border-bottom: 1px solid rgba(255,255,255,0.1);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        #positions-sidebar .sidebar-header h3 {
            color: #fff;
            font-size: 16px;
            font-weight: 600;
        }
        #positions-sidebar .positions-count {
            color: #a855f7;
            font-size: 12px;
        }
        #positions-sidebar .positions-list {
            flex: 1;
            overflow-y: auto;
            padding: 8px 0;
        }
        #positions-sidebar .type-group {
            margin-bottom: 12px;
        }
        #positions-sidebar .type-header {
            padding: 8px 16px;
            font-size: 14px;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 8px;
            cursor: pointer;
        }
        #positions-sidebar .type-header.postdoc { color: #a855f7; }
        #positions-sidebar .type-header.phd { color: #3b82f6; }
        #positions-sidebar .type-header.research-scientist { color: #22c55e; }
        #positions-sidebar .type-header.visiting { color: #f59e0b; }
        #positions-sidebar .type-header .count {
            font-size: 11px;
            color: rgba(255,255,255,0.5);
            font-weight: 400;
        }
        #positions-sidebar .position-item {
            padding: 12px 16px 12px 24px;
            cursor: pointer;
            color: rgba(255,255,255,0.85);
            font-size: 12px;
            line-height: 1.4;
            transition: background 0.2s;
            display: block;
            border-bottom: 1px solid rgba(255,255,255,0.05);
        }
        #positions-sidebar .position-item:hover {
            background: rgba(168, 85, 247, 0.15);
        }
        #positions-sidebar .position-item.selected {
            background: rgba(168, 85, 247, 0.25);
            border-left: 3px solid #a855f7;
        }
        #positions-sidebar .position-title {
            font-weight: 500;
            color: #fff;
            margin-bottom: 4px;
        }
        #positions-sidebar .position-project {
            color: rgba(255,255,255,0.7);
            font-size: 11px;
            margin-bottom: 4px;
        }
        #positions-sidebar .position-meta {
            display: flex;
            gap: 12px;
            color: rgba(255,255,255,0.5);
            font-size: 10px;
        }
        #positions-sidebar .position-meta .funding {
            color: #22c55e;
        }
        #positions-sidebar .position-meta .deadline {
            color: #f59e0b;
        }

        /* ========================================
           About Page - Clean, professional layout
           ======================================== */
        .about-page {
            background: linear-gradient(180deg, #0b1120 0%, #111827 100%);
            min-height: calc(100vh - 56px);
            /* Scrolling handled by body.view-about */
            color: #fff;
        }
        .about-hero {
            padding: 60px 40px;
            text-align: center;
            background: linear-gradient(180deg, rgba(16, 163, 127, 0.1) 0%, transparent 100%);
            border-bottom: 1px solid rgba(255,255,255,0.1);
        }
        .about-hero-content {
            max-width: 800px;
            margin: 0 auto;
        }
        .about-title {
            font-size: 48px;
            font-weight: 700;
            margin-bottom: 16px;
            background: linear-gradient(135deg, #10a37f 0%, #3b82f6 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }
        .about-subtitle {
            font-size: 20px;
            color: rgba(255,255,255,0.7);
        }
        .about-content {
            max-width: 900px;
            margin: 0 auto;
            padding: 40px 20px 80px;
        }
        .about-section {
            margin-bottom: 48px;
        }
        .about-section h2 {
            font-size: 24px;
            font-weight: 600;
            color: #10a37f;
            margin-bottom: 20px;
            padding-bottom: 12px;
            border-bottom: 2px solid rgba(16, 163, 127, 0.3);
        }
        .about-section p {
            font-size: 16px;
            line-height: 1.8;
            color: rgba(255,255,255,0.85);
            margin-bottom: 16px;
        }
        .about-bullets {
            list-style: none;
            padding: 0;
            margin: 16px 0;
        }
        .about-bullets li {
            padding: 12px 16px;
            background: rgba(16, 163, 127, 0.1);
            border-left: 3px solid #10a37f;
            margin-bottom: 8px;
            font-size: 15px;
            line-height: 1.6;
            border-radius: 0 8px 8px 0;
        }
        .research-areas-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 16px;
        }
        .research-area-card {
            background: rgba(59, 130, 246, 0.1);
            border: 1px solid rgba(59, 130, 246, 0.3);
            padding: 20px;
            border-radius: 12px;
            text-align: center;
        }
        .research-area-card .area-name {
            font-size: 15px;
            font-weight: 500;
            color: #3b82f6;
        }
        .leadership-card {
            background: rgba(255,255,255,0.05);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 16px;
            padding: 24px;
            display: flex;
            align-items: center;
            gap: 24px;
        }
        .leader-info h3 {
            font-size: 20px;
            font-weight: 600;
            margin-bottom: 8px;
        }
        .leader-title {
            color: #10a37f;
            font-weight: 500;
            margin-bottom: 4px !important;
        }
        .leader-position, .leader-dept {
            color: rgba(255,255,255,0.6) !important;
            font-size: 14px !important;
            margin-bottom: 2px !important;
        }
        .contact-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 20px;
        }
        .contact-item {
            background: rgba(255,255,255,0.05);
            padding: 20px;
            border-radius: 12px;
        }
        .contact-label {
            display: block;
            font-size: 12px;
            color: rgba(255,255,255,0.5);
            text-transform: uppercase;
            letter-spacing: 1px;
            margin-bottom: 8px;
        }
        .contact-value {
            display: block;
            font-size: 15px;
            color: #fff;
        }
        a.contact-value {
            color: #10a37f;
            text-decoration: none;
        }
        a.contact-value:hover {
            text-decoration: underline;
        }
        .about-cta {
            text-align: center;
            padding: 40px;
            background: rgba(16, 163, 127, 0.1);
            border-radius: 16px;
            border: 1px solid rgba(16, 163, 127, 0.2);
        }
        .about-cta h2 {
            border-bottom: none;
            padding-bottom: 0;
        }
        .about-cta p {
            margin-bottom: 24px;
        }
        .cta-button {
            display: inline-block;
            background: #10a37f;
            color: white;
            padding: 14px 32px;
            border-radius: 8px;
            text-decoration: none;
            font-weight: 600;
            font-size: 16px;
            transition: background 0.2s;
        }
        .cta-button:hover {
            background: #0d8a6b;
        }

        /* ========================================
           Positions Page - Sidebar + Quiz Layout
           ======================================== */
        .positions-welcome {
            display: flex;
            align-items: center;
            justify-content: center;
            min-height: calc(100vh - 56px);
            background: linear-gradient(180deg, #0b1120 0%, #111827 100%);
            padding: 40px;
        }
        .welcome-content {
            text-align: center;
            max-width: 900px;
        }
        .welcome-content h1 {
            font-size: 48px;
            margin-bottom: 12px;
            background: linear-gradient(135deg, #a855f7 0%, #3b82f6 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }
        .welcome-subtitle {
            font-size: 18px;
            color: rgba(255,255,255,0.7);
            margin-bottom: 48px;
        }
        .welcome-info {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 24px;
            margin-bottom: 48px;
        }
        .info-card {
            background: rgba(255,255,255,0.05);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 16px;
            padding: 32px 24px;
            text-align: center;
        }
        .info-card .info-icon {
            font-size: 36px;
            display: block;
            margin-bottom: 16px;
        }
        .info-card h3 {
            font-size: 18px;
            margin-bottom: 12px;
            color: #fff;
        }
        .info-card p {
            font-size: 14px;
            color: rgba(255,255,255,0.6);
            line-height: 1.6;
        }
        .welcome-cta p {
            color: rgba(255,255,255,0.5);
            font-size: 14px;
        }

        /* Quiz Container */
        .position-quiz-container {
            max-width: 800px;
            margin: 0 auto;
            padding: 40px 20px;
            height: calc(100vh - 56px);
            overflow-y: auto;
            background: linear-gradient(180deg, #0b1120 0%, #111827 100%);
        }
        .quiz-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 32px;
            padding-bottom: 24px;
            border-bottom: 1px solid rgba(255,255,255,0.1);
        }
        .quiz-position-info h2 {
            font-size: 28px;
            margin-bottom: 8px;
        }
        .position-type-badge {
            display: inline-block;
            background: #a855f7;
            color: white;
            padding: 4px 12px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 500;
            margin-bottom: 12px;
        }
        .position-project-name {
            color: rgba(255,255,255,0.6);
            font-size: 14px;
        }
        .learn-more-btn {
            background: rgba(59, 130, 246, 0.2);
            border: 1px solid rgba(59, 130, 246, 0.4);
            color: #3b82f6;
            padding: 12px 20px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 14px;
            transition: all 0.2s;
        }
        .learn-more-btn:hover {
            background: rgba(59, 130, 246, 0.3);
        }

        .quiz-content {
            margin-bottom: 32px;
        }
        .quiz-intro h3 {
            font-size: 20px;
            color: #a855f7;
            margin-bottom: 16px;
        }
        .quiz-intro > p {
            color: rgba(255,255,255,0.7);
            line-height: 1.6;
            margin-bottom: 24px;
        }
        .position-description, .position-requirements {
            background: rgba(255,255,255,0.05);
            border-radius: 12px;
            padding: 20px;
            margin-bottom: 20px;
        }
        .position-description h4, .position-requirements h4 {
            font-size: 14px;
            color: rgba(255,255,255,0.5);
            text-transform: uppercase;
            letter-spacing: 1px;
            margin-bottom: 12px;
        }
        .position-description p {
            color: rgba(255,255,255,0.8);
            line-height: 1.6;
        }
        .position-requirements ul {
            list-style: none;
            padding: 0;
        }
        .position-requirements li {
            padding: 8px 0;
            padding-left: 24px;
            position: relative;
            color: rgba(255,255,255,0.8);
        }
        .position-requirements li::before {
            content: '✓';
            position: absolute;
            left: 0;
            color: #22c55e;
        }

        .quiz-start-section {
            text-align: center;
            padding: 32px;
            background: rgba(168, 85, 247, 0.1);
            border-radius: 16px;
            border: 1px solid rgba(168, 85, 247, 0.2);
        }
        .start-quiz-btn {
            background: #a855f7;
            color: white;
            border: none;
            padding: 16px 40px;
            border-radius: 8px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: background 0.2s;
        }
        .start-quiz-btn:hover {
            background: #9333ea;
        }
        .quiz-note {
            margin-top: 12px;
            color: rgba(255,255,255,0.5);
            font-size: 13px;
        }

        /* Quiz Questions */
        .quiz-progress {
            margin-bottom: 24px;
        }
        #quiz-progress-text {
            display: block;
            font-size: 14px;
            color: rgba(255,255,255,0.6);
            margin-bottom: 8px;
        }
        .progress-bar {
            height: 4px;
            background: rgba(255,255,255,0.1);
            border-radius: 2px;
            overflow: hidden;
        }
        .progress-fill {
            height: 100%;
            background: #a855f7;
            transition: width 0.3s;
        }
        .quiz-question h3 {
            font-size: 20px;
            margin-bottom: 24px;
            line-height: 1.5;
        }
        .question-type {
            font-size: 12px;
            color: #a855f7;
            text-transform: uppercase;
            margin-bottom: 12px;
        }
        .question-options {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }
        .option-label {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 16px;
            background: rgba(255,255,255,0.05);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s;
        }
        .option-label:hover {
            background: rgba(255,255,255,0.08);
        }
        .option-label.selected {
            background: rgba(168, 85, 247, 0.2);
            border-color: #a855f7;
        }
        .option-label input[type="radio"] {
            width: 20px;
            height: 20px;
            accent-color: #a855f7;
        }
        .option-text {
            flex: 1;
            color: rgba(255,255,255,0.9);
        }

        .quiz-navigation {
            display: flex;
            justify-content: space-between;
            margin-top: 32px;
            padding-top: 24px;
            border-top: 1px solid rgba(255,255,255,0.1);
        }
        .quiz-nav-btn {
            background: rgba(255,255,255,0.1);
            border: none;
            color: white;
            padding: 12px 24px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 14px;
            transition: background 0.2s;
        }
        .quiz-nav-btn:hover:not(:disabled) {
            background: rgba(255,255,255,0.2);
        }
        .quiz-nav-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }
        .quiz-nav-btn.primary {
            background: #a855f7;
        }
        .quiz-nav-btn.primary:hover:not(:disabled) {
            background: #9333ea;
        }
        .quiz-nav-btn.submit {
            background: #22c55e;
        }
        .quiz-nav-btn.submit:hover:not(:disabled) {
            background: #16a34a;
        }

        /* Quiz Results */
        .quiz-result {
            text-align: center;
            padding: 48px;
        }
        .result-icon {
            font-size: 64px;
            margin-bottom: 24px;
        }
        .quiz-result h2 {
            font-size: 28px;
            margin-bottom: 16px;
        }
        .quiz-result.passed h2 {
            color: #22c55e;
        }
        .quiz-result.failed h2 {
            color: #ef4444;
        }
        .result-score {
            font-size: 20px;
            color: rgba(255,255,255,0.7);
            margin-bottom: 16px;
        }
        .result-message {
            color: rgba(255,255,255,0.6);
            margin-bottom: 32px;
        }
        .apply-section, .retry-section {
            margin-top: 32px;
        }
        .apply-btn {
            display: inline-block;
            background: #22c55e;
            color: white;
            padding: 16px 40px;
            border-radius: 8px;
            text-decoration: none;
            font-size: 16px;
            font-weight: 600;
            transition: background 0.2s;
        }
        .apply-btn:hover {
            background: #16a34a;
        }
        .apply-note {
            margin-top: 12px;
            color: rgba(255,255,255,0.5);
            font-size: 13px;
        }
        .retry-btn {
            background: #ef4444;
            color: white;
            border: none;
            padding: 16px 32px;
            border-radius: 8px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            margin-right: 12px;
        }
        .retry-btn:hover {
            background: #dc2626;
        }

        /* ========================================
           Topics Sidebar (Network View)
           ======================================== */
        #topics-sidebar .topic-item {
            padding: 12px 16px;
            cursor: pointer;
            border-bottom: 1px solid rgba(255,255,255,0.05);
            transition: all 0.2s;
            display: flex;
            align-items: center;
            gap: 12px;
        }
        #topics-sidebar .topic-item:hover {
            background: rgba(74, 222, 128, 0.1);
        }
        #topics-sidebar .topic-item.selected {
            background: rgba(74, 222, 128, 0.2);
            border-left: 3px solid #4ade80;
        }
        /* Checkbox styling for topic filters */
        #topics-sidebar .topic-checkbox {
            width: 18px;
            height: 18px;
            border: 2px solid rgba(255,255,255,0.3);
            border-radius: 4px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            transition: all 0.2s;
        }
        #topics-sidebar .topic-checkbox.checked {
            background: var(--checkbox-color);
            border-color: var(--checkbox-color);
        }
        #topics-sidebar .topic-checkbox .check-icon {
            width: 12px;
            height: 12px;
            opacity: 0;
            transition: opacity 0.2s;
            color: #0b1120;
        }
        #topics-sidebar .topic-checkbox.checked .check-icon {
            opacity: 1;
        }
        #topics-sidebar .topic-item:not(.checked) {
            opacity: 0.5;
        }
        #topics-sidebar .topic-item:not(.checked):hover {
            opacity: 0.8;
        }
        #topics-sidebar .topic-color {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            flex-shrink: 0;
        }
        #topics-sidebar .topic-info {
            flex: 1;
            min-width: 0;
        }
        #topics-sidebar .topic-name {
            font-size: 14px;
            font-weight: 500;
            color: #fff;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        #topics-sidebar .topic-count {
            font-size: 12px;
            color: rgba(255,255,255,0.5);
        }
        #topics-sidebar .topic-badge {
            background: rgba(255,255,255,0.1);
            padding: 4px 10px;
            border-radius: 12px;
            font-size: 12px;
            color: rgba(255,255,255,0.7);
            flex-shrink: 0;
        }
        /* Two-dimensional topic taxonomy */
        #topics-sidebar .topic-dimension {
            border-bottom: 1px solid rgba(255,255,255,0.1);
        }
        #topics-sidebar .dimension-header {
            padding: 12px 16px;
            display: flex;
            align-items: center;
            gap: 8px;
            background: rgba(255,255,255,0.03);
            cursor: default;
        }
        #topics-sidebar .dimension-icon {
            font-size: 14px;
        }
        #topics-sidebar .dimension-title {
            font-size: 11px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 1px;
            color: rgba(255,255,255,0.6);
        }
        #topics-sidebar .topics-list {
            max-height: 200px;
            overflow-y: auto;
        }

        /* ========================================
           Theses View
           ======================================== */
        #theses-sidebar .thesis-item {
            padding: 12px 16px;
            cursor: pointer;
            border-bottom: 1px solid rgba(255,255,255,0.05);
            transition: background 0.2s;
        }
        #theses-sidebar .thesis-item:hover {
            background: rgba(168, 85, 247, 0.1);
        }
        #theses-sidebar .thesis-item.selected {
            background: rgba(168, 85, 247, 0.2);
            border-left: 3px solid #a855f7;
        }
        #theses-sidebar .thesis-degree {
            font-size: 11px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 4px;
        }
        #theses-sidebar .thesis-title {
            font-size: 13px;
            font-weight: 500;
            color: #fff;
            line-height: 1.4;
            margin-bottom: 4px;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        #theses-sidebar .thesis-author {
            font-size: 12px;
            color: rgba(255,255,255,0.6);
        }

        .theses-welcome {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            min-height: calc(100vh - 56px);
            padding: 40px;
            text-align: center;
        }
        .theses-welcome .welcome-content {
            max-width: 800px;
        }
        .theses-welcome h1 {
            font-size: 48px;
            margin-bottom: 16px;
            background: linear-gradient(135deg, #a855f7 0%, #3b82f6 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .thesis-detail {
            max-width: 900px;
            margin: 0 auto;
            padding: 60px 40px;
        }
        .thesis-detail-header {
            display: flex;
            align-items: center;
            gap: 16px;
            margin-bottom: 24px;
        }
        .degree-badge {
            padding: 8px 16px;
            border-radius: 20px;
            font-size: 13px;
            font-weight: 600;
            color: white;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        .thesis-detail .thesis-year {
            font-size: 16px;
            color: rgba(255,255,255,0.6);
        }
        .thesis-detail .thesis-title {
            font-size: 32px;
            font-weight: 700;
            line-height: 1.3;
            margin-bottom: 32px;
            color: #fff;
        }
        .thesis-meta {
            display: flex;
            gap: 48px;
            margin-bottom: 32px;
            padding: 24px;
            background: rgba(255,255,255,0.03);
            border-radius: 12px;
        }
        .thesis-meta .meta-item {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }
        .thesis-meta .meta-label {
            font-size: 12px;
            color: rgba(255,255,255,0.5);
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        .thesis-meta .meta-value {
            font-size: 18px;
            color: #fff;
            font-weight: 500;
        }
        .thesis-topics {
            margin-bottom: 32px;
        }
        .thesis-topics .topics-label {
            font-size: 14px;
            color: rgba(255,255,255,0.6);
            margin-right: 12px;
        }
        .thesis-topics .topic-tag {
            display: inline-block;
            padding: 6px 14px;
            background: rgba(59, 130, 246, 0.15);
            color: #60a5fa;
            border-radius: 20px;
            font-size: 13px;
            margin: 4px 4px 4px 0;
        }
        .thesis-abstract {
            background: rgba(255,255,255,0.03);
            padding: 32px;
            border-radius: 12px;
            margin-bottom: 32px;
        }
        .thesis-abstract h3 {
            font-size: 14px;
            color: rgba(255,255,255,0.5);
            text-transform: uppercase;
            letter-spacing: 1px;
            margin-bottom: 16px;
        }
        .thesis-abstract p {
            color: rgba(255,255,255,0.85);
            line-height: 1.8;
            font-size: 16px;
        }
        .thesis-actions {
            text-align: center;
        }
        .dspace-btn {
            display: inline-block;
            padding: 16px 32px;
            background: linear-gradient(135deg, #a855f7 0%, #3b82f6 100%);
            color: white;
            text-decoration: none;
            border-radius: 8px;
            font-weight: 600;
            font-size: 16px;
            transition: transform 0.2s, box-shadow 0.2s;
        }
        .dspace-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 24px rgba(168, 85, 247, 0.3);
        }

        /* Quiz Modal */
        .quiz-modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0,0,0,0.85);
            z-index: 1000;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }
        .quiz-modal {
            background: #1a1f2e;
            border-radius: 12px;
            max-width: 700px;
            width: 100%;
            max-height: 90vh;
            overflow-y: auto;
            border: 1px solid rgba(255,255,255,0.1);
        }
        .quiz-header {
            padding: 24px;
            border-bottom: 1px solid rgba(255,255,255,0.1);
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
        }
        .quiz-header h2 {
            font-size: 20px;
            margin-bottom: 8px;
        }
        .quiz-header p {
            color: rgba(255,255,255,0.6);
            font-size: 14px;
        }
        .quiz-header .close-btn {
            background: none;
            border: none;
            color: rgba(255,255,255,0.5);
            font-size: 24px;
            cursor: pointer;
            padding: 0;
            line-height: 1;
        }
        .quiz-header .close-btn:hover {
            color: #fff;
        }
        .quiz-body {
            padding: 24px;
        }
        .quiz-question {
            margin-bottom: 32px;
            padding-bottom: 24px;
            border-bottom: 1px solid rgba(255,255,255,0.05);
        }
        .quiz-question:last-child {
            border-bottom: none;
            margin-bottom: 0;
        }
        .quiz-question .q-number {
            font-size: 12px;
            color: #10b981;
            text-transform: uppercase;
            letter-spacing: 1px;
            margin-bottom: 8px;
        }
        .quiz-question .q-text {
            font-size: 15px;
            line-height: 1.6;
            margin-bottom: 16px;
            white-space: pre-wrap;
        }
        .quiz-question .q-text code {
            background: rgba(0,0,0,0.3);
            padding: 2px 6px;
            border-radius: 4px;
            font-family: 'Monaco', 'Menlo', monospace;
            font-size: 13px;
        }
        .quiz-question pre {
            background: rgba(0,0,0,0.4);
            padding: 12px;
            border-radius: 6px;
            overflow-x: auto;
            font-size: 13px;
            margin: 12px 0;
        }
        .quiz-options {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }
        .quiz-option {
            background: rgba(255,255,255,0.03);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 8px;
            padding: 12px 16px;
            cursor: pointer;
            transition: all 0.2s;
            display: flex;
            align-items: flex-start;
            gap: 12px;
        }
        .quiz-option:hover {
            background: rgba(255,255,255,0.06);
            border-color: rgba(255,255,255,0.2);
        }
        .quiz-option.selected {
            background: rgba(16, 185, 129, 0.15);
            border-color: #10b981;
        }
        .quiz-option.correct {
            background: rgba(34, 197, 94, 0.2);
            border-color: #22c55e;
        }
        .quiz-option.incorrect {
            background: rgba(239, 68, 68, 0.2);
            border-color: #ef4444;
        }
        .quiz-option .option-letter {
            width: 24px;
            height: 24px;
            border-radius: 50%;
            background: rgba(255,255,255,0.1);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
            font-weight: 600;
            flex-shrink: 0;
        }
        .quiz-option.selected .option-letter {
            background: #10b981;
            color: #fff;
        }
        .quiz-footer {
            padding: 24px;
            border-top: 1px solid rgba(255,255,255,0.1);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .quiz-footer .progress {
            font-size: 14px;
            color: rgba(255,255,255,0.6);
        }
        .quiz-footer .submit-btn {
            background: #10b981;
            color: #fff;
            border: none;
            padding: 12px 24px;
            border-radius: 8px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
        }
        .quiz-footer .submit-btn:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
        }
        .quiz-footer .submit-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            transform: none;
            box-shadow: none;
        }
        .quiz-result {
            text-align: center;
            padding: 40px;
        }
        .quiz-result.passed h3 {
            color: #22c55e;
            font-size: 24px;
            margin-bottom: 12px;
        }
        .quiz-result.failed h3 {
            color: #ef4444;
            font-size: 24px;
            margin-bottom: 12px;
        }
        .quiz-result p {
            color: rgba(255,255,255,0.7);
            margin-bottom: 24px;
        }
        .quiz-result .apply-btn-final {
            display: inline-block;
            background: #10b981;
            color: #fff;
            padding: 14px 32px;
            border-radius: 8px;
            text-decoration: none;
            font-weight: 600;
            font-size: 16px;
        }
        .quiz-result .retry-btn {
            background: rgba(255,255,255,0.1);
            color: #fff;
            border: none;
            padding: 12px 24px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 14px;
        }

        /* Academic Position Details Styling */
        .position-details {
            font-family: 'Computer Modern Serif', 'Latin Modern', Georgia, serif;
            color: rgba(255, 255, 255, 0.95);
            text-align: left;
            padding: 32px;
            max-height: 65vh;
            overflow-y: auto;
            line-height: 1.7;
        }

        .position-details h1, .position-details h2 {
            font-weight: 400;
            letter-spacing: 0.5px;
            margin-bottom: 16px;
        }

        .position-details h1 {
            font-size: 22px;
            border-bottom: 1px solid rgba(255,255,255,0.2);
            padding-bottom: 12px;
        }

        .position-details h2 {
            font-size: 17px;
            margin-top: 24px;
            color: rgba(255,255,255,0.9);
        }

        .position-details h3 {
            font-size: 15px;
            margin-top: 20px;
            margin-bottom: 10px;
            color: rgba(255,255,255,0.85);
        }

        .position-details p {
            margin-bottom: 14px;
            font-size: 14px;
        }

        .position-details ul, .position-details ol {
            margin-left: 24px;
            margin-bottom: 16px;
        }

        .position-details li {
            margin-bottom: 6px;
            font-size: 14px;
        }

        .position-details a {
            color: #60a5fa;
            text-decoration: none;
            border-bottom: 1px solid rgba(96, 165, 250, 0.3);
        }

        .position-details a:hover {
            border-bottom-color: #60a5fa;
        }

        .position-details strong {
            color: rgba(255,255,255,1);
        }

        .position-details code {
            background: rgba(255,255,255,0.1);
            padding: 2px 6px;
            border-radius: 3px;
            font-size: 13px;
        }

        /* Team Photo Carousel */
        .team-carousel {
            margin-top: 32px;
            padding: 20px 0;
            border-top: 1px solid rgba(255,255,255,0.1);
            overflow: hidden;
        }

        .team-carousel-title {
            font-size: 11px;
            color: rgba(255,255,255,0.5);
            text-transform: uppercase;
            letter-spacing: 2px;
            margin-bottom: 14px;
            text-align: center;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
        }

        .carousel-track {
            display: flex;
            animation: carousel-scroll 45s linear infinite;
            width: max-content;
        }

        .carousel-track:hover {
            animation-play-state: paused;
        }

        @keyframes carousel-scroll {
            0% { transform: translateX(0); }
            100% { transform: translateX(-50%); }
        }

        .team-photo {
            width: 56px;
            height: 56px;
            border-radius: 50%;
            object-fit: cover;
            margin: 0 6px;
            border: 2px solid rgba(255,255,255,0.1);
            transition: transform 0.3s, border-color 0.3s;
        }

        .team-photo:hover {
            transform: scale(1.15);
            border-color: rgba(255,255,255,0.3);
        }

        /* Apply Section in Position Details */
        .apply-section {
            text-align: center;
            margin-top: 24px;
            padding-top: 20px;
            border-top: 1px solid rgba(255,255,255,0.1);
        }

        .apply-section .apply-btn-final {
            display: inline-block;
            background: #10b981;
            color: #fff;
            padding: 14px 32px;
            border-radius: 4px;
            text-decoration: none;
            font-weight: 600;
            font-size: 15px;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
            transition: background 0.2s;
        }

        .apply-section .apply-btn-final:hover {
            background: #059669;
        }

        /* Loading state */
        .position-details.loading {
            text-align: center;
            padding: 60px;
        }

        .position-details.loading p {
            color: rgba(255,255,255,0.6);
        }

        /* Take Quiz button style */
        .job-card .quiz-btn {
            background: #3b82f6;
            color: #fff;
            padding: 10px 20px;
            border-radius: 6px;
            text-decoration: none;
            font-weight: 500;
            font-size: 14px;
            white-space: nowrap;
            border: none;
            cursor: pointer;
            transition: transform 0.2s, box-shadow 0.2s;
        }
        .job-card .quiz-btn:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
        }

        /* Selection indicator - pulsating ring centered on node */
        #selection-indicator {
            position: fixed;
            pointer-events: none;
            z-index: 150;
            display: none;
            width: 0;
            height: 0;
        }
        #selection-indicator.visible {
            display: block;
        }
        #selection-indicator .ring {
            width: 60px;
            height: 60px;
            border: 3px solid #10a37f;
            border-radius: 50%;
            position: absolute;
            top: -30px;   /* Half of height */
            left: -30px;  /* Half of width */
            animation: pulse-ring 1.5s ease-out infinite;
        }
        #selection-indicator .ring-inner {
            width: 40px;
            height: 40px;
            border: 2px solid #10a37f;
            border-radius: 50%;
            position: absolute;
            top: -20px;   /* Half of height */
            left: -20px;  /* Half of width */
            animation: pulse-ring 1.5s ease-out infinite 0.3s;
        }
        @keyframes pulse-ring {
            0% {
                transform: scale(1);
                opacity: 1;
            }
            100% {
                transform: scale(2);
                opacity: 0;
            }
        }

        /* Feedback Popup */
        #feedback-popup {
            display: none;
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: white;
            border-radius: 12px;
            padding: 24px;
            width: 450px;
            max-width: 90vw;
            z-index: 2000;
            box-shadow: 0 20px 60px rgba(0,0,0,0.4);
        }
        #feedback-popup.visible { display: block; }
        #feedback-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0,0,0,0.5);
            z-index: 1999;
        }
        #feedback-overlay.visible { display: block; }
        .feedback-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 16px;
        }
        .feedback-header h3 {
            margin: 0;
            color: #1e293b;
            font-size: 18px;
        }
        .feedback-close {
            background: none;
            border: none;
            font-size: 24px;
            cursor: pointer;
            color: #64748b;
        }
        .feedback-paper-title {
            font-size: 14px;
            color: #475569;
            background: #f8fafc;
            padding: 12px;
            border-radius: 8px;
            margin-bottom: 16px;
            border-left: 3px solid #10a37f;
        }
        .feedback-textarea {
            width: 100%;
            height: 120px;
            padding: 12px;
            border: 1px solid #e2e8f0;
            border-radius: 8px;
            font-size: 14px;
            resize: vertical;
            font-family: inherit;
        }
        .feedback-textarea:focus {
            outline: none;
            border-color: #10a37f;
        }
        .feedback-actions {
            display: flex;
            gap: 12px;
            margin-top: 16px;
            justify-content: flex-end;
        }
        .feedback-btn {
            padding: 10px 20px;
            border-radius: 6px;
            font-size: 14px;
            cursor: pointer;
            border: none;
        }
        .feedback-btn-cancel {
            background: #f1f5f9;
            color: #475569;
        }
        .feedback-btn-submit {
            background: #10a37f;
            color: white;
        }
        .feedback-btn-submit:hover { background: #0d8a6a; }
        .feedback-btn-submit:disabled {
            background: #94a3b8;
            cursor: not-allowed;
        }
        .feedback-status {
            margin-top: 12px;
            padding: 8px 12px;
            border-radius: 6px;
            font-size: 13px;
            display: none;
        }
        .feedback-status.success {
            display: block;
            background: #dcfce7;
            color: #166534;
        }
        .feedback-status.error {
            display: block;
            background: #fee2e2;
            color: #991b1b;
        }
        .feedback-hint {
            font-size: 12px;
            color: #94a3b8;
            margin-top: 8px;
        }

        /* AI Assistant Button - in header */
        .ai-assistant-btn {
            width: 32px;
            height: 32px;
            background: #10a37f;
            border: none;
            border-radius: 50%;
            cursor: pointer;
            box-shadow: 0 2px 8px rgba(16, 163, 127, 0.3);
            display: flex;
            align-items: center;
            justify-content: center;
            transition: transform 0.2s, box-shadow 0.2s;
        }
        .ai-assistant-btn:hover {
            transform: scale(1.1);
            box-shadow: 0 4px 12px rgba(16, 163, 127, 0.5);
        }
        .ai-assistant-btn svg { width: 16px; height: 16px; fill: white; }

        /* AI Chat Popup */
        #ai-chat-popup {
            display: none;
            position: fixed;
            top: 64px;
            left: 180px;
            width: 400px;
            max-height: 500px;
            background: #1a1a1a;
            border: 1px solid #333;
            border-radius: 12px;
            box-shadow: 0 8px 32px rgba(0,0,0,0.4);
            z-index: 1001;
            flex-direction: column;
        }
        #ai-chat-popup.open { display: flex; }
        .chat-header {
            padding: 16px 20px;
            border-bottom: 1px solid #333;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .chat-header h3 { font-size: 16px; font-weight: 600; color: #fff; }
        .chat-close {
            background: none;
            border: none;
            color: #a0a0a0;
            cursor: pointer;
            font-size: 20px;
        }
        .chat-messages {
            flex: 1;
            overflow-y: auto;
            padding: 16px;
            max-height: 300px;
        }
        .chat-message {
            margin-bottom: 12px;
            padding: 12px 16px;
            border-radius: 8px;
            font-size: 14px;
            color: #fff;
        }
        .chat-message.user {
            background: #10a37f;
            margin-left: 40px;
        }
        .chat-message.assistant {
            background: #252525;
            margin-right: 40px;
        }
        /* Markdown content styling in chat */
        .chat-message.markdown-content h1,
        .chat-message.markdown-content h2,
        .chat-message.markdown-content h3 {
            font-size: 15px;
            font-weight: 600;
            margin: 12px 0 8px 0;
            color: #fff;
        }
        .chat-message.markdown-content h2 { font-size: 14px; }
        .chat-message.markdown-content h3 { font-size: 13px; }
        .chat-message.markdown-content p {
            margin: 8px 0;
            line-height: 1.5;
        }
        .chat-message.markdown-content ul,
        .chat-message.markdown-content ol {
            margin: 8px 0;
            padding-left: 20px;
        }
        .chat-message.markdown-content li {
            margin: 4px 0;
            line-height: 1.4;
        }
        .chat-message.markdown-content strong {
            font-weight: 600;
            color: #fff;
        }
        .chat-message.markdown-content em {
            font-style: italic;
        }
        .chat-message.markdown-content code {
            background: rgba(255,255,255,0.1);
            padding: 2px 6px;
            border-radius: 4px;
            font-family: monospace;
            font-size: 13px;
        }
        .chat-message.markdown-content pre {
            background: rgba(0,0,0,0.3);
            padding: 12px;
            border-radius: 6px;
            overflow-x: auto;
            margin: 8px 0;
        }
        .chat-message.markdown-content a {
            color: #10a37f;
            text-decoration: none;
        }
        .chat-message.markdown-content a:hover {
            text-decoration: underline;
        }
        .chat-input-container {
            padding: 16px;
            border-top: 1px solid #333;
            display: flex;
            gap: 8px;
        }
        .chat-input {
            flex: 1;
            padding: 10px 14px;
            background: #0a0a0a;
            border: 1px solid #333;
            border-radius: 8px;
            color: #fff;
            font-size: 14px;
        }
        .chat-input:focus { outline: none; border-color: #10a37f; }
        .chat-send {
            padding: 10px 16px;
            background: #10a37f;
            border: none;
            border-radius: 8px;
            color: white;
            cursor: pointer;
        }

        /* Chat Feedback UI */
        .chat-feedback-prompt {
            margin-top: 12px;
            padding-top: 12px;
            border-top: 1px solid rgba(255,255,255,0.1);
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
        }
        .feedback-label {
            font-size: 12px;
            color: rgba(255,255,255,0.6);
        }
        .feedback-btn {
            background: rgba(255,255,255,0.1);
            border: 1px solid rgba(255,255,255,0.2);
            border-radius: 6px;
            padding: 4px 10px;
            font-size: 12px;
            cursor: pointer;
            color: #fff;
            transition: all 0.2s;
        }
        .feedback-btn:hover {
            background: rgba(255,255,255,0.2);
            border-color: rgba(255,255,255,0.3);
        }
        .feedback-positive:hover { background: rgba(34, 197, 94, 0.3); border-color: #22c55e; }
        .feedback-negative:hover { background: rgba(239, 68, 68, 0.3); border-color: #ef4444; }
        .feedback-detailed:hover { background: rgba(59, 130, 246, 0.3); border-color: #3b82f6; }
        .feedback-thanks {
            font-size: 12px;
            color: #22c55e;
        }
        .feedback-thanks a {
            color: #60a5fa;
            margin-left: 8px;
        }

        .chat-feedback-form {
            background: #1e1e1e;
            border: 1px solid #333;
            border-radius: 8px;
            padding: 16px;
            margin-top: 12px;
        }
        .feedback-form-header {
            font-size: 14px;
            font-weight: 600;
            margin-bottom: 12px;
            color: #fff;
        }
        .chat-feedback-form textarea {
            width: 100%;
            background: #2a2a2a;
            border: 1px solid #444;
            border-radius: 6px;
            padding: 10px;
            color: #fff;
            font-size: 13px;
            resize: vertical;
            font-family: inherit;
        }
        .chat-feedback-form textarea:focus {
            outline: none;
            border-color: #3b82f6;
        }
        .feedback-form-actions {
            display: flex;
            gap: 8px;
            margin-top: 12px;
        }
        .feedback-submit-btn {
            background: #3b82f6;
            color: #fff;
            border: none;
            border-radius: 6px;
            padding: 8px 16px;
            font-size: 13px;
            cursor: pointer;
        }
        .feedback-submit-btn:hover { background: #2563eb; }
        .feedback-cancel-btn {
            background: transparent;
            color: #a0a0a0;
            border: 1px solid #444;
            border-radius: 6px;
            padding: 8px 16px;
            font-size: 13px;
            cursor: pointer;
        }
        .feedback-cancel-btn:hover { background: rgba(255,255,255,0.05); }

        /* ECE350-tutor style inline negative feedback form */
        .feedback-negative-form {
            margin-top: 8px;
            padding-top: 8px;
            border-top: 1px solid rgba(255,255,255,0.1);
        }
        .feedback-prompt-text {
            font-size: 13px;
            color: #a0a0a0;
            margin-bottom: 8px;
        }
        .feedback-negative-form textarea {
            width: 100%;
            background: #2a2a2a;
            border: 1px solid #444;
            border-radius: 6px;
            padding: 8px 10px;
            color: #fff;
            font-size: 13px;
            resize: none;
            font-family: inherit;
        }
        .feedback-negative-form textarea:focus {
            outline: none;
            border-color: #3b82f6;
        }
        .feedback-negative-form .feedback-form-actions {
            display: flex;
            gap: 8px;
            margin-top: 8px;
        }
        .feedback-skip-btn {
            background: transparent;
            color: #a0a0a0;
            border: 1px solid #444;
            border-radius: 6px;
            padding: 6px 12px;
            font-size: 12px;
            cursor: pointer;
        }
        .feedback-skip-btn:hover { background: rgba(255,255,255,0.05); }
        .feedback-negative-form .feedback-submit-btn {
            padding: 6px 12px;
            font-size: 12px;
        }
