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

button {
    border: none !important;
    background: none;
    font-family: inherit;
    cursor: pointer;
    outline: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

/* Force all suggestion buttons to be styled */
button.suggestion-btn,
.suggestion-btn,
[class*="suggestion"] {
    background: #f8fafc !important;
    border: none !important;
    padding: 0.75rem 1rem !important;
    border-radius: 20px !important;
    text-align: center !important;
    cursor: pointer !important;
    font-size: 0.875rem !important;
    color: #667eea !important;
    transition: all 0.2s ease !important;
    font-family: inherit !important;
    font-weight: 500 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
    outline: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    display: inline-block !important;
    margin: 0 !important;
}

button.suggestion-btn:hover,
.suggestion-btn:hover,
[class*="suggestion"]:hover {
    background: #667eea !important;
    color: white !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2) !important;
}

/* Prevent focus/active state background changes */
button.suggestion-btn:focus,
button.suggestion-btn:active,
.suggestion-btn:focus,
.suggestion-btn:active,
[class*="suggestion"]:focus,
[class*="suggestion"]:active {
    background: #f8fafc !important;
    color: #667eea !important;
    outline: none !important;
    transform: none !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: #2d3748;
    background: #f8fafc;
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem 0;
}

.profile {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.avatar {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.info h1 {
    font-size: 1.75rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 0.25rem;
}

.title {
    color: #667eea;
    font-weight: 500;
}

.header-links {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.header-link {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.25rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.header-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    color: white;
}

/* Main Content */
.main {
    margin-top: 1rem;
    display: grid;
    gap: 1.5rem;
}

.card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.card h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 1rem;
}

.card p {
    color: #4a5568;
    margin-bottom: 1rem;
}

/* Highlights */
.highlights {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.highlight {
    background: #f0f4ff;
    color: #667eea;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Skills */
.skills {
    display: grid;
    gap: 1rem;
}

.skill-group h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.skill-group p {
    color: #718096;
    font-size: 0.9rem;
    margin: 0;
}

/* Contact */
.contact {
    display: grid;
    gap: 0.75rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.contact-item i {
    width: 20px;
    color: #667eea;
}

.contact-item a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: #764ba2;
}

.contact-item span {
    color: #4a5568;
}

/* Inline Chat Interface */
.chat-container-inline {
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    border: 1px solid #e2e8f0;
    height: fit-content;
    max-height: 600px;
}

.chat-header-inline {
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 20px 20px 0 0;
}

.chat-title-inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    max-height: 350px;
    min-height: 200px;
}

.message {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

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

.bot-message .message-avatar {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.user-message .message-avatar {
    background: #e2e8f0;
    color: #4a5568;
}

.message-content {
    flex: 1;
}

.message-content p {
    background: #f7fafc;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    margin-bottom: 0.5rem;
    line-height: 1.5;
    margin: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
}

.user-message .message-content p {
    background: #667eea;
    color: white;
    margin-left: auto;
    max-width: 85%;
}

.suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
    isolation: isolate;
    contain: layout style;
}

.message-content .suggestions {
    margin-top: 1rem;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
}

.bot-message .message-content .suggestion-btn,
.message-content .suggestion-btn,
.suggestions .suggestion-btn {
    background: #f8fafc !important;
    border: none !important;
    padding: 0.75rem 1rem !important;
    border-radius: 20px !important;
    text-align: center !important;
    cursor: pointer !important;
    font-size: 0.875rem !important;
    color: #667eea !important;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease !important;
    font-family: inherit !important;
    font-weight: 500 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
    outline: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    display: inline-block !important;
    position: relative !important;
    z-index: 1 !important;
}

.bot-message .message-content .suggestion-btn:hover,
.message-content .suggestion-btn:hover,
.suggestions .suggestion-btn:hover {
    background: #667eea !important;
    color: white !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2) !important;
    z-index: 2 !important;
}

.bot-message .message-content .suggestion-btn:focus,
.bot-message .message-content .suggestion-btn:active,
.message-content .suggestion-btn:focus,
.message-content .suggestion-btn:active,
.suggestions .suggestion-btn:focus,
.suggestions .suggestion-btn:active {
    background: #f8fafc !important;
    color: #667eea !important;
    outline: none !important;
    transform: none !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
}

.suggestion-btn {
    background: #f8fafc !important;
    border: none !important;
    padding: 0.75rem 1rem !important;
    border-radius: 20px !important;
    text-align: center;
    cursor: pointer;
    font-size: 0.875rem !important;
    color: #667eea !important;
    transition: all 0.2s ease;
    font-family: inherit;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    outline: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

.suggestion-btn:hover {
    background: #667eea !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2) !important;
}


.chat-input-area {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.chat-input-wrapper {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.chat-info {
    text-align: center;
    margin-top: 0.5rem;
}

.chat-note {
    font-size: 0.75rem;
    color: #718096;
    margin: 0;
    font-style: italic;
}

.input-wrapper {
    display: flex;
    gap: 0.5rem;
}

#chatInput {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.3s ease;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

#chatInput:focus {
    border-color: #667eea;
}

.chat-send-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}

.chat-send-btn:hover {
    background: #764ba2;
}


/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 0.75rem 1rem;
    background: #f7fafc;
    border-radius: 12px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: #cbd5e0;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.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);
    }
    30% {
        transform: translateY(-6px);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem 0.75rem;
    }

    .header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .profile {
        flex-direction: column;
        text-align: center;
    }

    .chat-container-inline {
        max-height: 400px;
    }

    .card {
        padding: 1.5rem;
    }

    .highlights {
        justify-content: center;
    }

    .info h1 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0.75rem 0.5rem;
    }

    .card {
        padding: 1.25rem;
    }

    .chat-container-inline {
        max-height: 350px;
    }

    .highlights {
        flex-direction: column;
        align-items: center;
    }

    .highlight {
        text-align: center;
    }
}

/* Smooth animations */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}