:root {
    --seattle-red: #AA0000;
    --seattle-white: #FFFFFF;
    --seattle-black: #000000;
    --seattle-gray: #E5E5E5;
    --seattle-dark-gray: #666666;
}

body {
    background-color: #FFFFFF;
    color: #333333;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
}

header {
    background-color: #AA0000; /* Seattle U Red background */
    color: #FFFFFF;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    height: 80px;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 10px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

header .logo {
    height: 100%;
    display: flex;
    align-items: center;
    background-color: white; /* White background for logo */
    padding: 0 20px;
}

header .logo img {
    height: 100%;
    width: auto;
    object-fit: contain;
}

header nav {
    display: flex;
    align-items: center;
    height: 100%;
    padding-right: 20px;
}

header nav a {
    color: #FFFFFF;
    text-decoration: none;
    margin: 0 15px;
    font-weight: bold;
}

header nav a:hover {
    text-decoration: underline;
    color: var(--seattle-gray);
}

main {
    max-width: 800px;
    margin: 30px auto 0;
    padding: 20px;
    padding-top: 100px;
    flex: 1 0 auto;
    box-sizing: border-box;
    min-height: calc(100vh - 100px);
}

main > section:first-of-type {
    margin-top: 40px;
}

section {
    margin-bottom: 40px;
}

section p {
    margin-bottom: 10px;
    line-height: 1.6;
    padding-left: 20px;
}

section ul {
    padding-left: 40px;
}

section ul ul {
    padding-left: 20px;
}

h2 {
    color: #AA0000; /* Seattle U Red for main headings */
    padding-left: 20px;
    border-bottom: 2px solid var(--seattle-gray);
    padding-bottom: 10px;
}

h2:first-of-type {
    margin-top: 20px;
}

h3 {
    color: #000000; /* Black for subheadings */
    margin-top: 20px;
    padding-left: 20px;
}

.project {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 20px;
    transition: box-shadow 0.3s ease;
}

.project:hover {
    box-shadow: 0 4px 8px rgba(170, 0, 0, 0.1);
}

.project h3 {
    color: var(--seattle-red);
}

.project h3 a {
    color: var(--seattle-red);
    text-decoration: none;
}

.project h3 a:hover {
    text-decoration: underline;
}

footer {
    background-color: #AA0000; /* Seattle U Red */
    color: #FFFFFF;
    text-align: center;
    padding: 15px 20px;
    position: relative;
    width: 100%;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

footer p {
    margin: 0;
}

/* Admin Link - Clean pill button */
.admin-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: #FFFFFF;
    border: none;
    border-radius: 20px;
    color: var(--seattle-red);
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.admin-link:hover {
    background: #FFFFFF;
    color: var(--seattle-red-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.admin-link:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.admin-icon {
    font-size: 14px;
    transition: transform 0.3s ease;
}

.admin-link:hover .admin-icon {
    transform: rotate(90deg);
}

.admin-text {
    letter-spacing: 0.3px;
}

.logo-link {
    display: block;
    height: 100%;
    text-decoration: none;
}

.logo-link:hover {
    text-decoration: none;
}

.profile-photo-container {
    perspective: 1000px;
    width: 200px;
    height: 200px;
    margin: -10px auto 20px;
}

.profile-photo-flipper {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    cursor: pointer;
}

.profile-photo-container:hover .profile-photo-flipper {
    transform: rotateY(180deg);
}

.flipper-front, .flipper-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--seattle-red);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.flipper-back {
    transform: rotateY(180deg);
}

.profile-photo, .uc-seal {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Chatbot simulation styles */
#simulation {
    background-color: #f9f9f9;
}

#simulation-root {
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
}

.w-full {
    width: 100%;
}

.max-w-2xl {
    max-width: 42rem;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.p-4 {
    padding: 1rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.text-2xl {
    font-size: 1.5rem;
}

.font-bold {
    font-weight: bold;
}

.h-96 {
    height: 24rem;
}

.border {
    border: 1px solid #e2e8f0;
}

.rounded {
    border-radius: 0.25rem;
}

.overflow-y-auto {
    overflow-y: auto;
}

.text-center {
    text-align: center;
}

.text-gray-500 {
    color: #6b7280;
}

.text-blue-600 {
    color: #2563eb;
}

.text-green-600 {
    color: #059669;
}

.text-red-600 {
    color: #dc2626;
}

@media (max-width: 768px) {
    main {
        padding: 20px 10px;
    }
    
    h2 {
        font-size: 1.5em;
    }
    
    h3 {
        font-size: 1.2em;
    }
}

/* ========================================
   CHATBOT - REFINED DESIGN
   ======================================== */

:root {
    --seattle-red: #AA0000;
    --seattle-red-dark: #880000;
    --seattle-white: #FFFFFF;
    --seattle-black: #000000;
    --seattle-gray: #E5E5E5;
    --seattle-gray-light: #F8F9FA;
    --chat-bg: #FAFBFC;
    --sidebar-width: 250px;
    --header-height: 80px;
}

/* Main Container - Larger, cleaner */
#chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 420px;
    height: 550px;
    background-color: var(--seattle-white);
    border: none;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.1);
    /* Only transition height and box-shadow, NOT position */
    transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    min-width: 400px;
    max-width: 700px;
    max-height: 90vh;
    overflow: hidden;
}

/* Disable ALL transitions during resize/drag for instant response */
#chatbot-container.resizing,
#chatbot-container.dragging {
    transition: none !important;
}

#chatbot-container.closed {
    height: 52px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

#chatbot-container.closed #chatbot-messages,
#chatbot-container.closed #chatbot-input,
#chatbot-container.closed #pipeline-toggle-container,
#chatbot-container.closed #rag-pipeline-viz {
    opacity: 0;
    pointer-events: none;
    height: 0;
    padding: 0;
    overflow: hidden;
}

/* Resize Handle - Subtle */
#chatbot-resize-handle {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 16px;
    height: 16px;
    cursor: nwse-resize;
    z-index: 1001;
    opacity: 0.4;
    background: linear-gradient(135deg, transparent 50%, var(--seattle-gray) 50%);
    border-bottom-right-radius: 16px;
    transition: opacity 0.2s ease;
}

#chatbot-resize-handle:hover {
    opacity: 0.7;
}

/* Hints */
#resize-hint, #header-hint {
    position: absolute;
    background: rgba(30, 30, 30, 0.9);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1002;
    font-weight: 500;
}

#resize-hint {
    bottom: 45px;
    right: 8px;
}

#header-hint {
    top: 56px;
    left: 50%;
    transform: translateX(-50%);
}

#header-hint::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid rgba(30, 30, 30, 0.9);
}

#resize-hint.show, #header-hint.show {
    opacity: 1;
    animation: fadeInOut 4s ease-in-out;
}

@keyframes fadeInOut {
    0% { opacity: 0; }
    10% { opacity: 1; }
    85% { opacity: 1; }
    100% { opacity: 0; }
}

#chatbot-container.closed #chatbot-resize-handle,
#chatbot-container.closed #header-hint {
    display: none;
}

/* Header - Clean gradient */
#chatbot-header {
    background: linear-gradient(135deg, var(--seattle-red) 0%, var(--seattle-red-dark) 100%);
    color: white;
    padding: 14px 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 16px 16px 0 0;
    cursor: pointer;
    user-select: none;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.3px;
    min-height: 52px;
    box-sizing: border-box;
}

#chatbot-header span:first-child {
    display: flex;
    align-items: center;
    gap: 8px;
}

#chatbot-header span:first-child::before {
    content: '🤖';
    font-size: 16px;
}

#chatbot-toggle {
    display: none;
}

/* Messages Area - Clean with better spacing */
#chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background-color: var(--chat-bg);
    font-size: 13px;
    line-height: 1.55;
}

#chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

#chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}

#chatbot-messages::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 3px;
}

#chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}

#chatbot-messages p {
    margin: 0 0 12px 0;
    line-height: 1.55;
}

#chatbot-messages strong {
    color: var(--seattle-red);
    font-weight: 600;
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Bot Message Bubbles - Left aligned */
.bot-message {
    background: white;
    border-radius: 14px 14px 14px 4px;
    padding: 12px 14px;
    margin-bottom: 12px;
    margin-right: 30px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    text-align: left;
}

.bot-message .message-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    color: var(--seattle-red);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    opacity: 0.8;
}

.bot-message h2 {
    color: var(--seattle-red);
    font-size: 14px;
    font-weight: 700;
    margin: 10px 0 6px 0;
    padding: 0;
    border-bottom: none;
}

.bot-message h3 {
    color: var(--seattle-red-dark);
    font-size: 13px;
    font-weight: 600;
    margin: 8px 0 4px 0;
    padding: 0;
}

.bot-message h4 {
    color: #333;
    font-size: 12px;
    font-weight: 600;
    margin: 6px 0 3px 0;
    padding: 0;
}

.bot-message p {
    margin: 4px 0;
    line-height: 1.55;
    font-size: 13px;
    color: #333;
}

.bot-message strong,
#chatbot-messages .bot-message strong,
.bot-message .streaming-content strong {
    color: var(--seattle-red);
    font-weight: 600;
    display: inline !important;
    text-transform: none !important;
    letter-spacing: normal;
    font-size: inherit;
    margin-bottom: 0;
}

.bot-message a {
    color: var(--seattle-red);
    text-decoration: none;
    font-weight: 500;
}

.bot-message a:hover {
    text-decoration: underline;
}

/* Streaming content container */
.bot-message .streaming-content {
    display: block;
}

.bot-message .streaming-content p {
    margin: 4px 0;
}

/* User Message Bubbles - Right aligned */
.user-message {
    background: linear-gradient(135deg, var(--seattle-red) 0%, var(--seattle-red-dark) 100%);
    color: white;
    border-radius: 14px 14px 4px 14px;
    padding: 10px 14px;
    margin-bottom: 12px;
    margin-left: 30px;
    text-align: left;
    box-shadow: 0 2px 6px rgba(170, 0, 0, 0.2);
}

.user-message .message-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.85);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.user-message p {
    margin: 0;
    line-height: 1.5;
    font-size: 13px;
}

/* Legacy p tag messages (fallback) */
#chatbot-messages > p {
    margin-bottom: 10px;
}

#chatbot-messages > p strong:first-child {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    opacity: 0.8;
}

/* Input Area - Modern */
#chatbot-input {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    background: white;
    border-top: 1px solid var(--seattle-gray);
    border-radius: 0 0 16px 16px;
}

#user-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #E0E0E0;
    border-radius: 20px;
    background-color: var(--seattle-gray-light);
    color: #333;
    font-size: 13px;
    font-family: inherit;
    resize: none;
    min-height: 40px;
    max-height: 80px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#user-input:focus {
    outline: none;
    border-color: var(--seattle-red);
    box-shadow: 0 0 0 3px rgba(170, 0, 0, 0.1);
}

#user-input::placeholder {
    color: #999;
    font-size: 12px;
}

#send-button {
    background: linear-gradient(135deg, var(--seattle-red) 0%, var(--seattle-red-dark) 100%);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    white-space: nowrap;
}

#send-button:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(170, 0, 0, 0.3);
}

#send-button:active {
    transform: scale(0.97);
}

/* Typing Indicator - Modern */
.typing-dots {
    display: inline-block;
}

.typing-dots span {
    animation: typing-dot 1.4s infinite;
    opacity: 0;
}

.typing-dots span:nth-child(1) {
    animation-delay: 0s;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing-dot {
    0% { opacity: 0; }
    20% { opacity: 1; }
    100% { opacity: 0; }
}

/* ========================================
   IMAGE UPLOAD & CLASSIFICATION STYLES
   ======================================== */

#image-upload-btn {
    background-color: var(--seattle-gray-light);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 15px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

#image-upload-btn:hover {
    background-color: rgba(170, 0, 0, 0.1);
    transform: scale(1.05);
}

/* Image preview container (above input) */
.image-preview-container {
    padding: 10px 14px;
    background-color: var(--seattle-gray-light);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.image-preview {
    position: relative;
    display: inline-block;
}

.image-preview img {
    max-width: 120px;
    max-height: 80px;
    border-radius: 10px;
    border: 2px solid var(--seattle-red);
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.remove-image-btn {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    background-color: #EF4444;
    color: white;
    border: 2px solid white;
    border-radius: 50%;
    cursor: pointer;
    font-size: 10px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.remove-image-btn:hover {
    background-color: #DC2626;
    transform: scale(1.1);
}

.image-preview-text {
    margin: 6px 0 0 0;
    font-size: 10px;
    color: #888;
    font-style: normal;
    font-weight: 500;
}

/* Uploaded image in chat */
.user-message.with-image {
    margin-bottom: 12px;
}

.user-message .chat-image-container {
    margin-top: 6px;
}

.user-message .chat-uploaded-image {
    max-width: 140px;
    max-height: 100px;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.user-message .image-message-text {
    margin-top: 8px;
    font-size: 13px;
    color: white;
}

/* ========================================
   RAG PIPELINE - CLEAN INLINE DESIGN
   ======================================== */

/* Toggle Container with inline pipeline */
#pipeline-toggle-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 14px;
    background: white;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    gap: 8px;
}

/* Toggle Switch - Compact pill */
.pipeline-toggle-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 11px;
    color: #666;
    gap: 8px;
    padding: 5px 10px;
    background: var(--seattle-gray-light);
    border-radius: 16px;
    transition: all 0.2s ease;
}

.pipeline-toggle-label:hover {
    background: #EAEBEC;
}

.pipeline-toggle-label input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 28px;
    height: 16px;
    background: #C5C5C5;
    border-radius: 16px;
    transition: background 0.25s ease;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

.pipeline-toggle-label input:checked + .toggle-slider {
    background: var(--seattle-red);
}

.pipeline-toggle-label input:checked + .toggle-slider::before {
    transform: translateX(12px);
}

.toggle-text {
    font-weight: 600;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Inline Pipeline Steps - Horizontal dots */
#pipeline-inline {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #1a1a2e 0%, #252B3B 100%);
    border-radius: 20px;
    width: fit-content;
}

#pipeline-inline.hidden {
    display: none;
}

.pipeline-step-mini {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 12px;
    transition: all 0.25s ease;
}

.pipeline-step-mini .step-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    transition: all 0.25s ease;
}

.pipeline-step-mini .step-label {
    font-size: 9px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.pipeline-step-mini.active .step-dot {
    background: var(--seattle-red);
    box-shadow: 0 0 8px rgba(170, 0, 0, 0.6);
    animation: pulse-dot 1s infinite;
}

.pipeline-step-mini.active .step-label {
    color: rgba(255, 255, 255, 0.9);
}

.pipeline-step-mini.completed .step-dot {
    background: #22C55E;
}

.pipeline-step-mini.completed .step-label {
    color: #22C55E;
}

@keyframes pulse-dot {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

#pipeline-total-time {
    font-size: 9px;
    color: #22C55E;
    font-weight: 700;
    margin-left: 6px;
    padding-left: 6px;
    border-left: 1px solid rgba(255, 255, 255, 0.15);
}

/* Retrieved Chunks Panel - Collapsible at bottom (collapsed by default) */
#retrieved-chunks-panel {
    background: linear-gradient(180deg, #f8f9fa 0%, #fff 100%);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    max-height: 120px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

#retrieved-chunks-panel.hidden {
    display: none;
}

#retrieved-chunks-panel.collapsed {
    max-height: 36px;
}

.chunks-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    font-size: 11px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    background: #f0f1f2;
}

.chunks-panel-header:hover {
    background: #e8e9ea;
}

#chunks-collapse-btn {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 10px;
    padding: 2px 6px;
    transition: transform 0.2s ease;
}

#retrieved-chunks-panel.collapsed #chunks-collapse-btn {
    transform: rotate(-90deg);
}

#retrieved-chunks {
    padding: 6px 12px;
    overflow-y: auto;
    max-height: 80px;
}

#retrieved-chunks::-webkit-scrollbar {
    width: 4px;
}

#retrieved-chunks::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 2px;
}

.chunks-header {
    display: none; /* Hide in new design */
}

.chunk-item {
    background: white;
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 6px;
    border-left: 3px solid var(--seattle-red);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.chunk-score {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.score-bar {
    flex: 1;
    height: 3px;
    background: #e5e5e5;
    border-radius: 2px;
    overflow: hidden;
}

.score-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--seattle-red) 0%, #EF4444 100%);
    border-radius: 2px;
    transition: width 0.5s ease;
}

.score-value {
    font-size: 10px;
    font-weight: 700;
    color: var(--seattle-red);
    min-width: 32px;
    text-align: right;
}

.chunk-content {
    font-size: 11px;
    color: #555;
    line-height: 1.4;
    max-height: 32px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.chunk-tags {
    display: flex;
    gap: 3px;
    margin-top: 5px;
    flex-wrap: wrap;
}

.chunk-tag {
    font-size: 8px;
    padding: 2px 6px;
    background: rgba(170, 0, 0, 0.08);
    color: var(--seattle-red);
    border-radius: 8px;
    font-weight: 500;
}

/* Tool Calls Panel - Blue theme for function calling (compact) */
#tool-calls-panel {
    background: linear-gradient(180deg, #f0f7ff 0%, #fff 100%);
    border-top: 1px solid rgba(59, 130, 246, 0.15);
    max-height: 120px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

#tool-calls-panel.hidden {
    display: none;
}

#tool-calls-panel.collapsed {
    max-height: 36px;
}

.tool-calls-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.08) 0%, transparent 100%);
    border-bottom: 1px solid rgba(59, 130, 246, 0.1);
    font-size: 11px;
    font-weight: 600;
    color: #3B82F6;
}

#tools-collapse-btn {
    background: none;
    border: none;
    color: #3B82F6;
    cursor: pointer;
    font-size: 10px;
    padding: 2px 6px;
    transition: transform 0.2s ease;
}

#tool-calls-panel.collapsed #tools-collapse-btn {
    transform: rotate(-90deg);
}

#tool-calls-list {
    padding: 6px 12px;
    overflow-y: auto;
    max-height: 80px;
}

#tool-calls-list::-webkit-scrollbar {
    width: 4px;
}

#tool-calls-list::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.3);
    border-radius: 2px;
}

.tool-call-item {
    background: white;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 8px;
    border-left: 3px solid #3B82F6;
    box-shadow: 0 1px 3px rgba(59, 130, 246, 0.1);
}

.tool-call-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.tool-name {
    font-size: 12px;
    font-weight: 600;
    color: #1E40AF;
    display: flex;
    align-items: center;
    gap: 5px;
}

.tool-name::before {
    content: "⚡";
    font-size: 10px;
}

.tool-duration {
    font-size: 10px;
    color: #6B7280;
    background: #F3F4F6;
    padding: 2px 6px;
    border-radius: 4px;
}

.tool-input {
    font-size: 10px;
    color: #6B7280;
    font-family: 'Monaco', 'Consolas', monospace;
    background: #F8FAFC;
    padding: 4px 8px;
    border-radius: 4px;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.tool-result-preview {
    font-size: 10px;
    color: #059669;
    display: flex;
    align-items: center;
    gap: 4px;
}

.tool-result-preview::before {
    content: "✓";
    font-weight: bold;
}

/* Tools step styling - blue when active */
#tools-step.active .step-dot,
#tools-step.completed .step-dot {
    background: #3B82F6 !important;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.5) !important;
}

#tools-step.active .step-label,
#tools-step.completed .step-label {
    color: #3B82F6 !important;
}

#tools-step.skipped .step-dot {
    background: #D1D5DB !important;
    box-shadow: none !important;
}

#tools-step.skipped .step-label {
    color: #9CA3AF !important;
    text-decoration: line-through;
}

/* ===== PASSWORD INPUT UI (Admin Authentication) ===== */
.password-input-container {
    background: linear-gradient(180deg, #FEF3C7 0%, #FFF 100%);
    border: 1px solid #F59E0B;
    border-radius: 8px;
    padding: 12px;
    margin: 0 10px 10px 10px;
}

.password-prompt {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 12px;
    font-weight: 600;
    color: #92400E;
}

.password-icon {
    font-size: 16px;
}

.password-label {
    letter-spacing: 0.5px;
}

.password-input-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.password-input-row input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.password-input-row input:focus {
    border-color: #F59E0B;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.password-input-row input::placeholder {
    color: #9CA3AF;
}

.password-input-row button {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, transform 0.1s;
}

.password-input-row button:active {
    transform: scale(0.95);
}

#password-submit-btn {
    background: #10B981;
    color: white;
}

#password-submit-btn:hover {
    background: #059669;
}

#password-cancel-btn {
    background: #EF4444;
    color: white;
}

#password-cancel-btn:hover {
    background: #DC2626;
}

/* Additional styling for links */
a {
    color: var(--seattle-red);
}

a:hover {
    color: #880000;
}

/* Style for contact section links */
#contact a {
    color: var(--seattle-red);
    text-decoration: none;
}

#contact a:hover {
    text-decoration: underline;
}

/* ===== HERO METRICS SECTION ===== */
#impact-metrics {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 30px 0 40px 0;
    flex-wrap: wrap;
}

.metric-card {
    background: linear-gradient(135deg, #AA0000 0%, #880000 100%);
    color: white;
    padding: 25px 30px;
    border-radius: 12px;
    text-align: center;
    min-width: 180px;
    max-width: 220px;
    flex: 1;
    box-shadow: 0 4px 15px rgba(170, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(170, 0, 0, 0.4);
}

.metric-number {
    display: block;
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.metric-label {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    opacity: 0.95;
}

.metric-context {
    display: block;
    font-size: 0.8rem;
    opacity: 0.8;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    padding-top: 8px;
    margin-top: 5px;
}

/* ===== FEATURED PROJECTS ===== */
.project.featured {
    background: linear-gradient(135deg, #fff9f9 0%, #fff 100%);
    border: 2px solid var(--seattle-red);
    position: relative;
}

.project.featured::before {
    content: "FEATURED";
    position: absolute;
    top: -1px;
    right: 20px;
    background: var(--seattle-red);
    color: white;
    padding: 4px 12px;
    font-size: 0.7rem;
    font-weight: bold;
    border-radius: 0 0 5px 5px;
    letter-spacing: 1px;
}

.project.featured:hover {
    box-shadow: 0 6px 20px rgba(170, 0, 0, 0.2);
}

.project-links {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.project-links a {
    display: inline-block;
    padding: 6px 14px;
    background: var(--seattle-red);
    color: white !important;
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: background 0.3s ease;
}

.project-links a:hover {
    background: #880000;
    text-decoration: none !important;
}

.project-links a.secondary {
    background: transparent;
    color: var(--seattle-red) !important;
    border: 1px solid var(--seattle-red);
}

.project-links a.secondary:hover {
    background: var(--seattle-red);
    color: white !important;
}

/* ===== VISUAL SKILLS SECTION ===== */
#skills-visual {
    margin-bottom: 40px;
}

.skills-category {
    margin-bottom: 25px;
}

.skills-category h4 {
    color: var(--seattle-red);
    margin-bottom: 12px;
    padding-left: 20px;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.skill-bars {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-left: 20px;
    padding-right: 20px;
}

.skill-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.skill-name {
    min-width: 120px;
    font-weight: 500;
    color: #333;
}

.skill-bar-container {
    flex: 1;
    height: 12px;
    background: var(--seattle-gray);
    border-radius: 6px;
    overflow: hidden;
}

.skill-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--seattle-red) 0%, #cc3333 100%);
    border-radius: 6px;
    transition: width 0.8s ease;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-left: 20px;
}

.skill-tag {
    background: #f0f0f0;
    color: #333;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    border: 1px solid #ddd;
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background: var(--seattle-red);
    color: white;
    border-color: var(--seattle-red);
}

/* ===== OTHER PROJECTS (Smaller) ===== */
.other-projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}

.project.compact {
    padding: 15px;
    margin-bottom: 0;
}

.project.compact h3 {
    font-size: 1rem;
    margin-top: 0;
    padding-left: 0;
}

.project.compact p {
    font-size: 0.9rem;
    padding-left: 0;
    margin-bottom: 0;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    #impact-metrics {
        flex-direction: column;
        align-items: center;
    }

    .metric-card {
        width: 100%;
        max-width: 280px;
    }

    .skill-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .skill-name {
        min-width: auto;
    }

    .skill-bar-container {
        width: 100%;
    }
}
