/* Custom CSS for Portfolio Website */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 1s ease-out;
}

/* Navbar scroll effect */
#navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Project cards hover effect */
.project-card {
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Tool badges */
.tool-badge {
    display: inline-block;
    background-color: #EFF6FF;
    color: #2563EB;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    margin: 0.25rem;
}

/* Experience timeline */
.experience-item {
    position: relative;
    padding-left: 2rem;
    border-left: 2px solid #3B82F6;
    transition: all 0.3s ease;
}

.experience-item:hover {
    border-left-color: #1D4ED8;
}

.experience-item::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #3B82F6;
}

/* Paper cards */
.paper-card {
    transition: all 0.3s ease;
    border-left: 4px solid #3B82F6;
}

.paper-card:hover {
    background-color: #F9FAFB;
    border-left-color: #1D4ED8;
}

/* Review Slider */
.review-slider-container {
    position: relative;
    margin: 0 auto;
    max-width: 100%;
}

.review-slider {
    display: flex;
    transition: transform 0.5s ease-in-out;
    position: relative;
    min-height: 200px;
}

.review-slide {
    min-width: 100%;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.review-slide.active {
    display: flex;
    opacity: 1;
}

.review-image {
    max-width: 100%;
    max-height: 300px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin: 0 auto;
}

/* Navigation Arrows */
.review-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.review-nav:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-50%) scale(1.1);
}

.review-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.review-nav-prev {
    left: 10px;
}

.review-nav-next {
    right: 10px;
}

.review-nav i {
    color: #3B82F6;
    font-size: 1.2rem;
}

/* Dots Indicator */
.review-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.review-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: #CBD5E1;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.review-dot:hover {
    background: #94A3B8;
    transform: scale(1.2);
}

.review-dot.active {
    background: #3B82F6;
    width: 12px;
    height: 12px;
}

/* Responsive adjustments for review slider */
@media (max-width: 768px) {
    .review-image {
        max-height: 200px;
    }
    
    .review-nav {
        width: 35px;
        height: 35px;
    }
    
    .review-nav-prev {
        left: 5px;
    }
    
    .review-nav-next {
        right: 5px;
    }
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(37, 99, 235, 0.3);
    border-radius: 50%;
    border-top-color: #2563EB;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #3B82F6;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2563EB;
}

/* Video container */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 0.5rem;
    margin-top: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    background: #000;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 0.5rem;
}

/* Profile image without background/border */
.profile-image-no-bg {
    width: auto;
    height: auto;
    max-width: 200px;
    max-height: 200px;
    object-fit: contain;
    /* No border, no shadow, no rounded corners */
    border: none;
    box-shadow: none;
    border-radius: 0;
    background: transparent;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .tool-badge {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
    
    .experience-item {
        padding-left: 1.5rem;
    }
    
    .profile-image-no-bg {
        max-width: 200px;
        max-height: 200px;
    }
}

/* Link hover effects */
a {
    transition: all 0.3s ease;
}

/* Button animations */
button, .btn {
    transition: all 0.3s ease;
}

button:active, .btn:active {
    transform: scale(0.95);
}

/* Section fade-in on scroll */
section {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Error message styling */
.error-message {
    background-color: #FEE2E2;
    color: #991B1B;
    padding: 1rem;
    border-radius: 0.5rem;
    margin: 1rem 0;
    border-left: 4px solid #DC2626;
}

/* Success message styling */
.success-message {
    background-color: #D1FAE5;
    color: #065F46;
    padding: 1rem;
    border-radius: 0.5rem;
    margin: 1rem 0;
    border-left: 4px solid #10B981;
}

/* Stats counter animation */
.stat-number {
    font-variant-numeric: tabular-nums;
    transition: all 0.3s ease;
}

/* Hero section with background banner */
.hero-banner {
    background-image: url('data/background_banner.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed; /* Creates parallax effect on scroll */
}

/* Ensure text is readable over background */
#home h1,
#home h2,
#home p {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* Responsive background for mobile */
@media (max-width: 768px) {
    .hero-banner {
        background-attachment: scroll; /* Better performance on mobile */
    }
}

/* Mobile menu animation */
#mobile-menu {
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

#mobile-menu.show {
    display: block;
    animation: slideDown 0.3s ease;
}

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

/* Print styles */
@media print {
    nav, footer {
        display: none;
    }
    
    section {
        page-break-inside: avoid;
    }
}

/* ============================================
   CHATBOT STYLES
   ============================================ */

/* Chatbot Container */
#chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    font-family: inherit;
}

/* Chatbot Toggle Button */
.chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 0;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.6);
}

.chatbot-toggle.active {
    background: linear-gradient(135deg, #1D4ED8 0%, #1E40AF 100%);
}

.chatbot-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #EF4444;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    border: 2px solid white;
}

/* Chatbot avatar image styles */
.chatbot-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.chatbot-avatar-img-small {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Pulse animation for chatbot button */
@keyframes chatbotPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(37, 99, 235, 0.6);
    }
}

.chatbot-toggle.chatbot-pulse {
    animation: chatbotPulse 2s infinite;
}

/* Chatbot Window */
.chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 600px;
    max-height: calc(100vh - 100px);
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUpFromBottom 0.5s ease-out;
    transform-origin: bottom right;
    z-index: 1001;
}

.chatbot-window.hidden {
    display: none;
}

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

@keyframes slideUpFromBottom {
    from {
        opacity: 0;
        transform: translateY(100px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Chatbot Header */
.chatbot-header {
    background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chatbot-header-content i {
    font-size: 24px;
}

.chatbot-header-content h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.chatbot-subtitle {
    margin: 0;
    font-size: 12px;
    opacity: 0.9;
}

.chatbot-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.chatbot-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Chatbot Messages */
.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #F9FAFB;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chatbot-message {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    animation: fadeInMessage 0.3s ease;
}

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

.chatbot-message-user {
    flex-direction: row-reverse;
}

.chatbot-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 16px;
    overflow: hidden;
    border: 2px solid #E5E7EB;
}

.chatbot-avatar-user {
    background: linear-gradient(135deg, #6B7280 0%, #4B5563 100%);
}

.chatbot-message-content {
    max-width: 75%;
    background: white;
    padding: 12px 16px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.chatbot-message-user .chatbot-message-content {
    background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
    color: white;
}

.chatbot-message-content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}

.chatbot-message-error .chatbot-message-content {
    background: #FEE2E2;
    color: #991B1B;
    border-left: 3px solid #DC2626;
}

/* Typing Indicator */
.chatbot-typing-indicator {
    display: flex;
    gap: 4px;
    padding: 8px 0;
}

.chatbot-typing-indicator span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #9CA3AF;
    animation: typing 1.4s infinite;
}

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

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

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

/* Chatbot Input */
.chatbot-input-container {
    background: white;
    border-top: 1px solid #E5E7EB;
    padding: 16px;
}

.chatbot-input-wrapper {
    display: flex;
    gap: 8px;
    align-items: center;
}

.chatbot-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #E5E7EB;
    border-radius: 24px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
}

.chatbot-input:focus {
    border-color: #2563EB;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.chatbot-send {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.chatbot-send:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.chatbot-send:active {
    transform: scale(0.95);
}

.chatbot-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.chatbot-footer {
    margin: 8px 0 0 0;
    font-size: 11px;
    color: #9CA3AF;
    text-align: center;
}

/* Responsive Chatbot */
@media (max-width: 768px) {
    #chatbot-container {
        bottom: 15px;
        right: 15px;
        z-index: 1000;
    }
    
    .chatbot-toggle {
        width: 56px;
        height: 56px;
        font-size: 22px;
    }
    
    .chatbot-window {
        width: calc(100vw - 30px);
        max-width: 100%;
        height: 70vh;
        max-height: 600px;
        min-height: 400px;
        bottom: 76px;
        right: 15px;
        border-radius: 12px;
        position: fixed;
    }
    
    .chatbot-message-content {
        max-width: 85%;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .chatbot-window {
        width: calc(100vw - 20px);
        height: 65vh;
        max-height: 500px;
        min-height: 350px;
        bottom: 70px;
        right: 10px;
    }
    
    #chatbot-container {
        bottom: 10px;
        right: 10px;
    }
}

