/* ========================================
   VARIABLES & THEME SYSTEM
   ======================================== */

:root {
    /* Dark Theme Colors */
    --bg-primary: #0a0a0a;
    --bg-secondary: #141414;
    --bg-tertiary: #1e1e1e;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-tertiary: #707070;
    
    /* Light Theme Colors */
    --bg-primary-light: #ffffff;
    --bg-secondary-light: #f8f8f8;
    --bg-tertiary-light: #f0f0f0;
    --text-primary-light: #1a1a1a;
    --text-secondary-light: #4a4a4a;
    --text-tertiary-light: #6a6a6a;
    
    /* Accent Colors */
    --accent-gold: #d4af37;
    --accent-gold-dark: #b8941f;
    --accent-gold-light: #e6c968;
    
    /* Gradients */
    --gradient-gold: linear-gradient(135deg, #d4af37 0%, #f4d03f 100%);
    --gradient-dark: linear-gradient(135deg, #0a0a0a 0%, #1e1e1e 100%);
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    
    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.2);
    --shadow-gold: 0 4px 20px rgba(212, 175, 55, 0.3);
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-full: 9999px;
}

/* Light Theme Override */
body.light-theme {
    --bg-primary: var(--bg-primary-light);
    --bg-secondary: var(--bg-secondary-light);
    --bg-tertiary: var(--bg-tertiary-light);
    --text-primary: var(--text-primary-light);
    --text-secondary: var(--text-secondary-light);
    --text-tertiary: var(--text-tertiary-light);
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* ========================================
   RESET & BASE STYLES
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    transition: background-color var(--transition-normal), color var(--transition-normal);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

ul {
    list-style: none;
}

/* ========================================
   CONTAINER & LAYOUT
   ======================================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.section {
    padding: var(--spacing-xl) 0;
    position: relative;
}

/* ========================================
   THEME TOGGLE BUTTON
   ======================================== */

.theme-toggle {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1000;
    width: 50px;
    height: 50px;
    border-radius: var(--radius-full);
    background: var(--bg-secondary);
    border: 2px solid var(--accent-gold);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md);
}

.theme-toggle:hover {
    transform: rotate(180deg);
    box-shadow: var(--shadow-gold);
}

.theme-toggle svg {
    width: 24px;
    height: 24px;
    color: var(--accent-gold);
}

.dark-theme .sun-icon {
    display: none;
}

.dark-theme .moon-icon {
    display: block;
}

.light-theme .sun-icon {
    display: block;
}

.light-theme .moon-icon {
    display: none;
}

/* ========================================
   NAVIGATION
   ======================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
    transition: all var(--transition-normal);
}

.light-theme .navbar {
    background: rgba(255, 255, 255, 0.95);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem var(--spacing-md);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    font-family: var(--font-mono);
    letter-spacing: -0.05em;
}

.logo .accent {
    color: var(--accent-gold);
}

.nav-menu {
    display: flex;
    gap: var(--spacing-md);
}

.nav-link {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-gold);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 2px;
    background: var(--accent-gold);
    transition: transform var(--transition-fast);
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: translateX(-50%) scaleX(1);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: all var(--transition-fast);
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

.parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(212, 175, 55, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(212, 175, 55, 0.05) 0%, transparent 50%);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: var(--spacing-md);
    line-height: 1.2;
}

.greeting {
    display: block;
    font-size: 0.4em;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.name {
    display: block;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    min-height: 80px;
}

.typed-text {
    color: var(--accent-gold);
}

.cursor {
    display: inline-block;
    animation: blink 1s infinite;
    color: var(--accent-gold);
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto var(--spacing-lg);
    line-height: 1.8;
}

.hero-cta {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
    margin-bottom: var(--spacing-lg);
}

.btn {
    padding: 0.875rem 2rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--gradient-gold);
    color: #000;
    border-color: var(--accent-gold);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
}

.btn-outline {
    border: 2px solid var(--accent-gold);
    color: var(--accent-gold);
}

.btn-outline:hover {
    background: var(--accent-gold);
    color: #000;
    transform: translateY(-2px);
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--spacing-md);
    max-width: 600px;
    margin: 0 auto;
}

.stat {
    text-align: center;
    padding: var(--spacing-sm);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent-gold);
    font-family: var(--font-mono);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.mouse {
    width: 30px;
    height: 50px;
    border: 2px solid var(--accent-gold);
    border-radius: 20px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 10px;
    background: var(--accent-gold);
    border-radius: 2px;
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 1.5s infinite;
}

@keyframes scroll {
    0% { opacity: 1; top: 10px; }
    100% { opacity: 0; top: 30px; }
}

/* ========================================
   SECTION HEADERS
   ======================================== */

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: var(--spacing-sm);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-gold);
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-top: var(--spacing-md);
}

/* ========================================
   ABOUT SECTION
   ======================================== */

.about {
    background: var(--bg-secondary);
}

.about-text {
    max-width: 900px;
    margin: 0 auto;
}

.lead {
    font-size: 1.25rem;
    line-height: 1.8;
    margin-bottom: var(--spacing-md);
}

.about-text p {
    margin-bottom: var(--spacing-sm);
    color: var(--text-secondary);
}

.about-highlights {
    display: grid;
    gap: var(--spacing-sm);
    margin: var(--spacing-lg) 0;
}

.highlight {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm);
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--accent-gold);
    transition: all var(--transition-fast);
}

.highlight:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
}

.highlight svg {
    color: var(--accent-gold);
    flex-shrink: 0;
    margin-top: 2px;
}

.contact-info {
    display: grid;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-lg);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--text-secondary);
}

.contact-item svg {
    color: var(--accent-gold);
    flex-shrink: 0;
}

.contact-item a:hover {
    color: var(--accent-gold);
}

/* ========================================
   EXPERIENCE TIMELINE
   ======================================== */

.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding-left: 50px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent-gold), transparent);
}

.timeline-item {
    position: relative;
    margin-bottom: var(--spacing-lg);
}

.timeline-marker {
    position: absolute;
    left: -36px;
    top: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-gold);
    border: 4px solid var(--bg-primary);
    z-index: 1;
}

.timeline-content {
    background: var(--bg-secondary);
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(212, 175, 55, 0.1);
    transition: all var(--transition-normal);
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-gold);
}

.timeline-period {
    font-size: 0.875rem;
    color: var(--accent-gold);
    font-weight: 600;
    font-family: var(--font-mono);
    margin-bottom: var(--spacing-xs);
}

.timeline-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
}

.timeline-company {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
}

.timeline-description {
    list-style: disc;
    padding-left: 1.5rem;
}

.timeline-description li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

/* ========================================
   PORTFOLIO SECTION
   ======================================== */

.portfolio {
    background: var(--bg-secondary);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.portfolio-card {
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-normal);
    border: 1px solid rgba(212, 175, 55, 0.1);
}

.portfolio-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-gold);
}

.portfolio-image {
    position: relative;
    height: 250px;
    overflow: hidden;
    background: var(--bg-secondary);
}

.portfolio-image img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    object-position: center;
}

.portfolio-card:hover .portfolio-image img {
    transform: scale(1.1);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.portfolio-card:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-content {
    padding: var(--spacing-md);
}

.portfolio-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: var(--spacing-sm);
}

.tag {
    padding: 0.25rem 0.75rem;
    background: rgba(212, 175, 55, 0.1);
    color: var(--accent-gold);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.portfolio-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
}

.portfolio-description {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
    line-height: 1.6;
}

.portfolio-year {
    font-size: 0.875rem;
    color: var(--accent-gold);
    font-family: var(--font-mono);
}

/* ========================================
   SKILLS SECTION
   ======================================== */

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.skill-category {
    background: var(--bg-secondary);
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(212, 175, 55, 0.1);
    transition: all var(--transition-normal);
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-gold);
}

.skill-category-title {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    color: var(--accent-gold);
}

.skill-category-title svg {
    flex-shrink: 0;
}

.skill-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.skill-item {
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    border-left: 3px solid var(--accent-gold);
    transition: all var(--transition-fast);
}

.skill-item:hover {
    transform: translateX(5px);
    color: var(--text-primary);
    background: rgba(212, 175, 55, 0.05);
}

.education-section {
    margin-top: var(--spacing-lg);
}

.education-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--spacing-md);
}

.education-card {
    max-width: 600px;
    margin: 0 auto;
    background: var(--bg-secondary);
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    border: 1px solid rgba(212, 175, 55, 0.1);
    transition: all var(--transition-normal);
}

.education-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-gold);
}

.education-icon {
    font-size: 3rem;
}

.education-content h4 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.education-content p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.education-year {
    color: var(--accent-gold);
    font-family: var(--font-mono);
    font-size: 0.875rem;
}

/* ========================================
   CONTACT SECTION
   ======================================== */

.contact {
    background: var(--bg-secondary);
}

.contact-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
    max-width: 900px;
    margin: 0 auto;
}

.contact-card {
    background: var(--bg-tertiary);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    text-align: center;
    border: 1px solid rgba(212, 175, 55, 0.1);
    transition: all var(--transition-normal);
}

.contact-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-gold);
}

.contact-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.1);
    margin-bottom: var(--spacing-sm);
}

.contact-icon svg {
    color: var(--accent-gold);
}

.contact-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
}

.contact-card a {
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.contact-card a:hover {
    color: var(--accent-gold);
}

.contact-card p {
    color: var(--text-secondary);
}

/* ========================================
   FOOTER
   ======================================== */

.footer {
    background: var(--bg-primary);
    padding: var(--spacing-md) 0;
    border-top: 1px solid rgba(212, 175, 55, 0.1);
}

.footer-content {
    text-align: center;
    color: var(--text-secondary);
}

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

.footer-tagline {
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

/* ========================================
   CHAT MODAL STYLES
   ======================================== */

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.9), rgba(20, 20, 20, 0.95));
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: linear-gradient(135deg, var(--bg-primary), var(--bg-secondary));
    margin: 3% auto;
    padding: 0;
    border: 1px solid var(--accent-gold); /* Reduced border */
    border-radius: 15px; /* Smaller radius */
    width: 90%;
    max-width: 600px; /* Smaller width */
    max-height: 80vh; /* Smaller height */
    display: flex;
    flex-direction: column;
    box-shadow: 0 15px 40px rgba(212, 175, 55, 0.2); /* Reduced shadow */
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(30px); /* Smaller slide */
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md) var(--spacing-lg); /* Reduced padding */
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(212, 175, 55, 0.05));
    border-bottom: 1px solid rgba(212, 175, 55, 0.3); /* Thinner border */
    border-radius: 15px 15px 0 0;
}

.modal-header h3 {
    margin: 0;
    color: var(--accent-gold);
    font-size: 1.2rem; /* Smaller font */
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-header h3::before {
    content: '🤖';
    font-size: 1.4rem; /* Smaller emoji */
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); } /* Smaller bounce */
}

.modal-close {
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid var(--accent-gold); /* Thinner border */
    border-radius: 50%;
    font-size: 1.2rem; /* Smaller font */
    color: var(--accent-gold);
    cursor: pointer;
    padding: 0;
    width: 32px; /* Smaller size */
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--accent-gold);
    color: #000;
    transform: rotate(90deg);
}

.chat-container {
    display: flex;
    flex-direction: column;
    height: 450px; /* Reduced height for more focus on chat */
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md); /* Reduced gap */
    background: var(--bg-primary);
}

/* Custom scrollbar for chat */
.chat-messages::-webkit-scrollbar {
    width: 6px; /* Thinner scrollbar */
}

.chat-messages::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 8px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--accent-gold);
    border-radius: 8px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #b8941f;
}

.message {
    display: flex;
    gap: var(--spacing-sm); /* Reduced gap */
    max-width: 90%; /* More space for chat */
    animation: messageSlide 0.3s ease;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(8px); /* Smaller slide */
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-avatar {
    width: 36px; /* Smaller avatar */
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem; /* Smaller font */
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--accent-gold), #f4d03f);
    box-shadow: 0 3px 8px rgba(212, 175, 55, 0.2); /* Smaller shadow */
}

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

.user-message .message-avatar {
    background: linear-gradient(135deg, #4a4a4a, #6a6a6a);
}

.user-message .message-content {
    background: linear-gradient(135deg, var(--accent-gold), #f4d03f);
    color: #000;
    border-radius: 15px 15px 3px 15px; /* Smaller radius */
}

.ai-message .message-content {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 15px 15px 15px 3px;
}

.message-content {
    padding: var(--spacing-sm) var(--spacing-md); /* Reduced padding */
    word-wrap: break-word;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1); /* Smaller shadow */
}

.message-content p {
    margin: 0;
    line-height: 1.5; /* Adjusted line height */
}

/* Markdown support styles */
.message-content strong {
    font-weight: 700;
    color: var(--accent-gold);
}

.message-content em {
    font-style: italic;
    color: var(--text-secondary);
}

.message-content code {
    background: rgba(212, 175, 55, 0.1);
    padding: 2px 4px;
    border-radius: 3px;
    font-family: var(--font-mono);
    font-size: 0.9em;
}

.message-content pre {
    background: var(--bg-tertiary);
    padding: var(--spacing-sm);
    border-radius: 8px;
    overflow-x: auto;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.message-content pre code {
    background: none;
    padding: 0;
}

.message-content ul, .message-content ol {
    padding-left: var(--spacing-md);
    margin: var(--spacing-xs) 0;
}

.message-content li {
    margin-bottom: 0.25rem;
}

.message-content blockquote {
    border-left: 3px solid var(--accent-gold);
    padding-left: var(--spacing-sm);
    margin: var(--spacing-xs) 0;
    color: var(--text-secondary);
    font-style: italic;
}

.typing-indicator {
    display: flex;
    gap: 3px; /* Smaller gap */
    padding: var(--spacing-xs);
}

.typing-dot {
    width: 6px; /* Smaller dots */
    height: 6px;
    border-radius: 50%;
    background: var(--accent-gold);
    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);
    }
    30% {
        transform: translateY(-6px); /* Smaller bounce */
    }
}

.chat-input-container {
    display: flex;
    gap: var(--spacing-sm); /* Reduced gap */
    padding: var(--spacing-md) var(--spacing-lg); /* Reduced padding */
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.05), rgba(212, 175, 55, 0.02));
    border-top: 1px solid rgba(212, 175, 55, 0.3); /* Thinner border */
    border-radius: 0 0 15px 15px;
}

#chatInput {
    flex: 1;
    padding: var(--spacing-sm) var(--spacing-md); /* Reduced padding */
    border: 1px solid rgba(212, 175, 55, 0.3); /* Thinner border */
    border-radius: 20px; /* Smaller radius */
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem; /* Smaller font */
    transition: all var(--transition-fast);
}

#chatInput:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.15); /* Smaller shadow */
}

#sendBtn {
    padding: var(--spacing-sm) var(--spacing-md); /* Smaller padding */
    border-radius: 20px;
    background: linear-gradient(135deg, var(--accent-gold), #f4d03f);
    color: #000;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.2); /* Smaller shadow */
    font-size: 0.9rem; /* Smaller font */
}

#sendBtn:hover {
    transform: translateY(-1px); /* Smaller hover */
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

#sendBtn:active {
    transform: translateY(0);
}

/* Mobile responsive - More compact */
@media (max-width: 768px) {
    .modal-content {
        margin: 5% auto;
        width: 95%;
        max-height: 85vh;
    }
    
    .chat-container {
        height: calc(100vh - 180px); /* Adjusted for mobile */
    }
    
    .message {
        max-width: 95%;
        gap: var(--spacing-xs);
    }
    
    .modal-header h3 {
        font-size: 1rem;
    }
    
    .message-content {
        padding: var(--spacing-xs) var(--spacing-sm);
        font-size: 0.9rem;
    }
    
    .chat-input-container {
        padding: var(--spacing-sm) var(--spacing-md);
    }
    
    #chatInput {
        font-size: 0.9rem;
    }
    
    #sendBtn {
        padding: var(--spacing-xs) var(--spacing-sm);
        font-size: 0.85rem;
    }
}

/* Light theme adjustments */
.light-theme .modal {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(240, 240, 240, 0.98));
}

.light-theme .modal-content {
    background: linear-gradient(135deg, #ffffff, #f8f8f8);
}

.light-theme .ai-message .message-content {
    background: #f5f5f5;
    border-color: rgba(212, 175, 55, 0.3);
}
