a.text-decoration-none {
    color: rgb(58, 94, 124);
}

/* Chat Button - Fixed Bottom Right */
.chat-button-container {
    position: fixed;
    bottom: max(20px, env(safe-area-inset-bottom));
    right: max(20px, env(safe-area-inset-right));
    z-index: 9998;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    animation: slideInRight 0.5s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.chat-button-label {
    background: white;
    padding: 12px 20px;
    border-radius: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.chat-button-label:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.chat-icon-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #575656 0%, #575656 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.chat-icon-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

/* Chat Button Unavailable State */
.chat-button-container.unavailable {
    cursor: not-allowed;
}

.chat-button-container.unavailable .chat-button-label {
    color: #6c757d;
}

.chat-button-container.unavailable .chat-icon-button {
    background: #ccc;
    filter: grayscale(1);
}

/* Chat Modal */
.chat-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.chat-modal-overlay.show {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.chat-modal {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    display: flex;
    flex-direction: column;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.gradient-header {
    background: linear-gradient(135deg, #575656 0%, #575656 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-button {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
}

.close-button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.chat-modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

.btn-gradient {
    background: linear-gradient(135deg, #575656 0%, #575656 100%);
    border: none;
    color: white;
}

.btn-gradient:hover {
    background: linear-gradient(135deg, #575656 0%, #575656 100%);
    color: white;
}

.btn-gradient:disabled {
    opacity: 0.6;
}

.response-box {
    background-color: #f8f9fa;
    border-left: 4px solid #575656;
    display: none;
    padding: 15px;
    border-radius: 8px;
    max-height: 50vh;
    /* 50% of viewport height */
    overflow-y: auto;
    margin-bottom: 15px;

}

.response-box.show {
    display: block;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hint-text {
    font-size: 0.875rem;
    color: #6c757d;
}

.loading-text {
    color: #667eea;
    font-style: italic;
}

.error-text {
    color: #dc3545;
}

textarea {
    resize: vertical;
    min-height: 120px;
}

.icon-spacing {
    margin-right: 8px;
}

/* Custom Tab Styles */
.custom-tabs {
    border-bottom: 2px solid #dee2e6;
    margin-bottom: 1.5rem;
}

.custom-tabs .nav-link {
    border: none;
    color: #6c757d;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    position: relative;
    transition: all 0.3s ease;
    border-radius: 0;
}

.custom-tabs .nav-link:hover {
    color: #575656;
    background-color: transparent;
}

.custom-tabs .nav-link.active {
    color: #575656;
    background-color: transparent;
    border-bottom: 3px solid #575656;
    margin-bottom: -2px;
}

/* Project Card Styles */
.project-card {
    border-left: 4px solid #575656;
    padding-left: 1rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.project-card:hover {
    border-left-color: rgb(58, 94, 124);
    transform: translateX(5px);
}

.project-tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.tech-badge {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.85rem;
    color: #495057;
}

/* Publication Card Styles */
.publication-card {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid #dee2e6;
}

.publication-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.publication-meta {
    color: #6c757d;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.project-card .truncate,
.publication-card .truncate {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    #profile-pic {
        width: 180px;
    }

    .chat-icon-button {
        display: none;
    }

    .chat-modal {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }

    .custom-tabs {
        overflow-x: auto;
        overflow-y: hidden;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        /* Firefox */
        -ms-overflow-style: none;
        /* IE/Edge */
    }

    .custom-tabs::-webkit-scrollbar {
        display: none;
        /* Chrome/Safari */
    }

    .custom-tabs .nav-link {
        padding: 0.75rem 1rem;
        white-space: nowrap;
        font-size: 0.9rem;
    }

    .custom-tabs .nav-item {
        flex-shrink: 0;
    }

    h3 {
        font-size: 1.5rem;
    }

    h5 {
        font-size: 1.1rem;
    }

    .fs-6 {
        font-size: 0.9rem !important;
    }

    /* For publication abstracts - shorter on mobile */
    .project-card .truncate,
    .publication-card .truncate {
        -webkit-line-clamp: 3;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}