/* Brand Colors */
:root {
    --navy: #0F2A3F;
    --gold: #C9A227;
    --light-gray: #F5F5F5;
    --dark-gray: #333;
    --white: #FFFFFF;
    --border: #E0E0E0;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--light-gray);
    color: var(--dark-gray);
    line-height: 1.6;
}

/* Banner */
.banner {
    background-color: var(--navy);
    background-image:
        linear-gradient(rgba(201, 162, 39, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(201, 162, 39, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
    color: var(--white);
    padding: 2rem 1rem;
    text-align: center;
    border-bottom: 3px solid var(--gold);
}

.banner-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.avatar-container {
    flex-shrink: 0;
}

.avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid var(--gold);
    object-fit: cover;
}

.header-text {
    text-align: left;
}

.name {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.title {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gold);
    font-weight: 500;
}

.disclaimer {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin: 0 auto;
    font-style: italic;
}

/* Floating Toggle Button */
.floating-toggle-btn {
    position: fixed;
    bottom: 140px;
    left: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--gold);
    color: var(--white);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(201, 162, 39, 0.4);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.floating-toggle-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(201, 162, 39, 0.6);
}

.floating-toggle-btn .button-text {
    position: relative;
    z-index: 2;
}

/* Pulsing ring animation */
.pulse-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: var(--gold);
    opacity: 0.3;
    animation: pulse-animation 2s infinite;
}

@keyframes pulse-animation {
    0% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.4);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 0;
    }
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Controls */
.controls {
    padding: 1rem;
    background-color: var(--white);
    border-bottom: 1px solid var(--border);
    text-align: right;
}

.control-btn {
    background-color: var(--navy);
    color: var(--white);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.control-btn:hover {
    background-color: #1a3f5f;
}

/* Chat Container */
.chat-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
    min-height: 60vh;
    max-height: 70vh;
    overflow-y: auto;
}

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

/* Message Bubbles */
.message {
    display: flex;
    gap: 0.75rem;
    max-width: 85%;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message.assistant {
    align-self: flex-start;
}

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.message.user .message-avatar {
    background-color: var(--navy);
    color: var(--white);
}

.message.assistant .message-avatar {
    background-color: var(--gold);
    color: var(--navy);
}

.message-content {
    background-color: var(--white);
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.message.user .message-content {
    background-color: var(--navy);
    color: var(--white);
}

.message-content p {
    margin-bottom: 0.5rem;
}

.message-content p:last-child {
    margin-bottom: 0;
}

.message-content strong {
    font-weight: 600;
}

.message-content ul, .message-content ol {
    margin-left: 1.5rem;
    margin-top: 0.5rem;
}

/* Starter Chips */
.starter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Category Chips */
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.chip {
    background-color: var(--light-gray);
    border: 1px solid var(--gold);
    color: var(--navy);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.chip:hover {
    background-color: var(--gold);
    color: var(--navy);
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Media Attachments */
.media-attachments {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.media-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background-color: rgba(201, 162, 39, 0.1);
    border-left: 3px solid var(--gold);
    border-radius: 4px;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.2s;
}

.media-item:hover {
    background-color: rgba(201, 162, 39, 0.2);
}

.media-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.media-thumbnail {
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
    border: 1px solid var(--border);
}

.media-text {
    flex: 1;
}

.media-caption {
    font-size: 0.9rem;
    font-weight: 500;
}

.media-source {
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.25rem;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 0.25rem;
    padding: 0.5rem;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background-color: var(--gold);
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

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

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

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Input Container */
.input-container {
    background-color: var(--white);
    border-top: 1px solid var(--border);
    padding: 1rem;
    position: sticky;
    bottom: 0;
}

/* Utility Buttons */
.utility-buttons {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: nowrap;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    overflow-x: auto;
}

.utility-btn {
    padding: 0.5rem 0.75rem;
    background-color: transparent;
    border: 1px solid var(--gold);
    color: var(--gold);
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.utility-btn:hover {
    background-color: var(--gold);
    color: var(--white);
}

/* Mobile optimization for utility buttons */
@media (max-width: 600px) {
    .utility-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
    }
}

#chat-form {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    gap: 0.75rem;
}

.honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
}

#user-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 24px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

#user-input:focus {
    border-color: var(--gold);
}

#send-btn {
    background-color: var(--navy);
    color: var(--white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 24px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: background-color 0.2s;
}

#send-btn:hover {
    background-color: #1a3f5f;
}

#send-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Resume View */
.resume-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.resume-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.resume-header h2 {
    color: var(--navy);
    font-size: 1.75rem;
}

/* Avatar Video Container */
.avatar-video-container {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    text-align: center;
}

.video-placeholder {
    color: #666;
    font-style: italic;
    padding: 3rem;
    background-color: var(--light-gray);
    border-radius: 8px;
    border: 2px dashed var(--gold);
}

.responsive-video {
    width: 100%;
    max-width: 750px;
    aspect-ratio: 16/9;
    border-radius: 8px;
    border: none;
}

/* Career Summary Text */
.career-summary-text {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.career-summary-text p {
    margin-bottom: 1.5rem;
    color: var(--dark-gray);
}

.career-summary-text p:last-child {
    margin-bottom: 0;
    font-style: italic;
    color: var(--navy);
    font-weight: 500;
}

/* Career Entries Heading */
.career-entries-heading {
    color: var(--navy);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    padding-left: 0.5rem;
    border-left: 4px solid var(--gold);
}

/* Project References */
.project-references {
    margin-bottom: 3rem;
}

.project-group {
    margin-bottom: 3rem;
}

.project-group-heading {
    color: var(--navy);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.project-group-subtitle {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.project-card {
    background-color: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    overflow: hidden;
}

.project-card:hover {
    border-color: var(--gold);
    box-shadow: 0 2px 8px rgba(201, 162, 39, 0.2);
}

.project-card-header {
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    position: relative;
}

.project-card-header h5 {
    color: var(--navy);
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0;
    flex: 1;
    min-width: 200px;
}

.project-meta {
    color: #666;
    font-size: 0.9rem;
    flex: 1;
    min-width: 150px;
}

.expand-icon {
    color: var(--gold);
    font-size: 1.5rem;
    font-weight: 600;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--gold);
    border-radius: 50%;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.project-card.expanded .expand-icon {
    transform: rotate(45deg);
}

.project-card-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding: 0 1.25rem;
}

.project-card.expanded .project-card-content {
    max-height: 800px;
    overflow-y: auto;
    padding: 0 1.25rem 1.25rem 1.25rem;
}

.project-role {
    color: var(--gold);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.project-card-content p {
    color: var(--dark-gray);
    line-height: 1.7;
    margin: 0;
}

.project-card-content p:not(:last-child) {
    margin-bottom: 0.75rem;
}

.project-image {
    width: 100%;
    height: auto;
    margin-top: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: block;
}

/* Ask AI Button in Project Cards */
.ask-ai-btn {
    display: inline-block;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: transparent;
    border: 1.5px solid var(--gold);
    color: var(--gold);
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.ask-ai-btn:hover {
    background-color: var(--gold);
    color: var(--white);
    transform: translateX(3px);
}

.resume-content {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.resume-entry {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.resume-entry:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.resume-entry h3 {
    color: var(--navy);
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.resume-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: #666;
}

.resume-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.resume-description {
    color: var(--dark-gray);
    line-height: 1.6;
}

.loading {
    text-align: center;
    color: #666;
    padding: 2rem;
}

/* Error Messages */
.error-message {
    background-color: #ffe0e0;
    border-left: 3px solid #cc0000;
    padding: 1rem;
    border-radius: 4px;
    margin-top: 1rem;
}

/* Call to Action Buttons */
.cta-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.cta-btn {
    flex: 1;
    min-width: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-icon {
    font-size: 1.25rem;
}

.cta-primary {
    background-color: var(--gold);
    color: var(--navy);
    border-color: var(--gold);
}

.cta-primary:hover {
    background-color: var(--navy);
    color: var(--gold);
    border-color: var(--gold);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.cta-secondary {
    background-color: var(--white);
    color: var(--navy);
    border-color: var(--navy);
}

.cta-secondary:hover {
    background-color: var(--navy);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .banner-content {
        flex-direction: row;
        text-align: left;
    }

    .header-text {
        text-align: left;
    }

    .avatar {
        width: 60px;
        height: 60px;
    }

    .name {
        font-size: 1.5rem;
    }

    .message {
        max-width: 95%;
    }

    .chat-container {
        padding: 1rem 0.5rem;
    }

    .resume-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    /* Adjust floating button position for mobile */
    .floating-toggle-btn {
        bottom: 120px;
        left: 15px;
        width: 55px;
        height: 55px;
        font-size: 0.9rem;
    }
}
