/* Global Styles - Using 8px Grid System */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #f8f9fa;
    color: #212529;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
}


/* Intro Header Styling */
.intro-header {
    padding: 0 24px;
}

.intro-header h1 {
    font-size: 2.25rem;
    /* 36px */
    letter-spacing: -0.02em;
    margin-bottom: 16px;
    color: #111827;
    /* Deep slate for better readability */
}

.intro-header p {
    font-size: 1.125rem;
    /* 18px */
    line-height: 1.6;
    color: #4b5563;
}

/* Mobile adjustments for the new text */
@media (max-width: 768px) {
    .intro-header h1 {
        font-size: 1.75rem;
    }

    .intro-header p {
        font-size: 1rem;
        padding: 0 8px;
    }
}

/* Sidebar Styles - Claude-like Design */
.sidebar {
    position: fixed;
    left: -280px;
    top: 0;
    width: 280px;
    height: 100vh;
    background: #ffffff;
    border-right: 1px solid #e9ecef;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    transition: left 0.3s ease;
}

.sidebar.active {
    left: 0;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid #e9ecef;
    height: 64px;
}

.sidebar-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #212529;
    margin: 0;
}

.sidebar-close-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sidebar-close-btn:hover {
    background: #f8f9fa;
    color: #212529;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.chat-history-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.history-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.history-section-title {
    font-size: 0.625rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 12px 4px 12px;
}

.chat-history-item {
    display: flex;
    align-items: flex-start;
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.chat-history-item:hover {
    background: #f8f9fa;
}

.chat-history-item.active {
    background: #e9ecef;
}

.chat-history-content {
    flex: 1;
    min-width: 0;
}

.chat-history-title {
    font-size: 0.75rem;
    font-weight: 500;
    color: #212529;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-history-preview {
    font-size: 0.688rem;
    color: #6c757d;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid #e9ecef;
}

.sidebar-footer-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: #495057;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.sidebar-footer-link:hover {
    background: #f8f9fa;
    color: #212529;
}

.sidebar-footer-link i {
    font-size: 0.938rem;
}

/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Main Container - Adjusted for sidebar */
.main-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Desktop: Sidebar always visible */
@media (min-width: 1024px) {
    .sidebar {
        left: 0;
    }

    .main-container {
        margin-left: 280px;
        width: calc(100% - 280px);
    }

    .sidebar-close-btn {
        display: none;
    }

    .sidebar-overlay {
        display: none;
    }
}

/* Tablet and Mobile: Sidebar toggleable */
@media (max-width: 1023px) {
    .sidebar-toggle-btn {
        display: block !important;
    }

    .main-container {
        margin-left: 0;
        width: 100%;
    }
}

/* Navigation - 64px height (8px × 8) */
.navbar {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    height: 64px;
    width: 100%;
    flex-shrink: 0;
}

.navbar .btn-link {
    text-decoration: none;
    transition: all 0.2s ease;
}

.navbar .btn-link:hover {
    transform: scale(1.1);
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.1rem;
}

/* Main Content Wrapper */
.main-content-wrapper {
    flex: 1;
    padding: 0;
    overflow-y: auto;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

/* Search Section - Inspired by Claude/OpenAI Design */
.search-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 32px 24px 24px 24px;
    border-bottom: 1px solid #e9ecef;
    width: 100%;
    box-sizing: border-box;
}

.search-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

/* Search Input Wrapper */
.search-input-wrapper {
    margin-bottom: 16px;
}

.search-input-container {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 4px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.search-input-container:focus-within {
    border-color: #0d6efd;
    box-shadow: 0 4px 16px rgba(13, 110, 253, 0.15);
}

/* Attach CV Button */
.attach-cv-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.attach-cv-btn:hover {
    background: #f8f9fa;
    color: #212529;
}

/* Search Input */
.search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 12px 16px;
    font-size: 0.938rem;
    color: #212529;
    background: transparent;
}

.search-input::placeholder {
    color: #adb5bd;
}

/* Voice Search Button */
.voice-search-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.voice-search-btn:hover {
    background: #f8f9fa;
    color: #dc3545;
}

.voice-search-btn:active {
    background: #fee;
    color: #dc3545;
}

/* Search Button */
.search-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0d6efd;
    border: none;
    border-radius: 8px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-left: 4px;
}

.search-btn:hover {
    background: #0a58ca;
    transform: scale(1.05);
}

.search-btn:active {
    transform: scale(0.95);
}

/* Search Tips / Popular Searches */
.search-tips {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.tip-label {
    font-size: 0.813rem;
    color: #6c757d;
    font-weight: 500;
}

.search-chip {
    padding: 6px 14px;
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 20px;
    font-size: 0.813rem;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.search-chip:hover {
    background: #0d6efd;
    color: #ffffff;
    border-color: #0d6efd;
    transform: translateY(-1px);
}

/* Results Header */
.results-header {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 24px 16px 24px;
    width: 100%;
    box-sizing: border-box;
}

.results-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #212529;
    margin: 0 0 4px 0;
}

.results-subtitle {
    font-size: 0.938rem;
    color: #6c757d;
    margin: 0;
}

/* Professor List */
.professor-list {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    background-color: #f8f9fa;
    padding: 0 24px 24px 24px;
    box-sizing: border-box;
}

/* Professor Card - EXACT STYLING FROM PROVIDED CSS */
.professor-card {
    position: relative;
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 16px;
    width: 100%;
    margin: 0 auto 16px auto;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
}

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

.professor-card:last-child {
    margin-bottom: 0;
}

/* Match Badge - Positioned on top-right edge */
.match-badge {
    position: absolute;
    top: 0;
    right: 20px;
    padding: 8px 16px;
    border-radius: 0 12px 0 12px;
    font-size: 0.813rem;
    font-weight: 600;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.match-badge-strong {
    background-color: #16a34a;
}

.match-badge-good {
    background-color: #2563eb;
}

.match-badge-moderate {
    background-color: #ea580c;
}

.match-badge-weak {
    background-color: #dc2626;
}

/* Card Content - 8px top padding for match badge clearance */
.card-content {
    padding-top: 8px;
}

/* Profile Section - Flexbox with 12px gap (between image and info) */
.profile-section {
    display: flex;
    gap: 12px;
}

/* Profile Image - 80px size (8px × 10) */
.profile-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Profile Info */
.profile-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Professor Name - 8px bottom margin */
.professor-name {
    font-size: 1rem;
    font-weight: 600;
    color: #212529;
    margin: 0;
    line-height: 1.3;
}

/* Research Tags - 8px gap between tags */
.research-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.research-tag {
    display: inline-block;
    padding: 4px 10px;
    background-color: #e9ecef;
    color: #495057;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.research-tag:hover {
    background-color: #dee2e6;
    transform: translateY(-1px);
}

/* Info Section - Location and Grant */
.info-section {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.813rem;
    color: #6c757d;
}

.location-info {
    display: flex;
    align-items: center;
    gap: 4px;
}

.grant-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #198754;
    font-weight: 500;
}

/* Bio Text - 8px top margin with line clamp */
.bio-text {
    font-size: 0.813rem;
    color: #6c757d;
    line-height: 1.5;
    margin: 0;
    display: flex;
    align-items: baseline;
}

.bio-content {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.read-more-link {
    color: #0d6efd;
    text-decoration: none;
    font-weight: 500;
    margin-left: 4px;
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 0.813rem;
    transition: color 0.2s ease;
}

.read-more-link:hover {
    color: #0a58ca;
    text-decoration: underline;
}

/* Bottom Row - Contains action buttons and View Details */
.bottom-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    width: 100%;
}

/* Action Buttons - 8px gap between buttons */
.action-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Icon Buttons - 36px size */
.icon-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    text-decoration: none;
}

.icon-btn-primary {
    background-color: #212529;
    color: #ffffff;
}

.icon-btn-primary:hover {
    background-color: #000000;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.icon-btn-secondary {
    background-color: #e9ecef;
    color: #495057;
}

.icon-btn-secondary:hover {
    background-color: #dee2e6;
    color: #495057;
    transform: translateY(-2px);
}

/* View Details Button */
.view-details-btn {
    padding: 8px 16px;
    background-color: #0d6efd;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 0.813rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.view-details-btn:hover {
    background-color: #0a58ca;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

/* Detail Page Styles */
.detail-main-content {
    flex: 1;
    padding: 24px 0;
    background-color: #f8f9fa;
}

.detail-content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
    box-sizing: border-box;
}

/* Detail Section Cards */
.detail-section-card {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.detail-main-section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #212529;
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e9ecef;
}

.detail-main-section-title i {
    color: #0d6efd;
}

/* Research Subsections */
.research-subsection {
    margin-bottom: 24px;
    padding: 16px;
    border-radius: 8px;
    background: #f8f9fa;
}

.research-subsection:last-child {
    margin-bottom: 0;
}

.highlight-blue {
    background: #eff6ff;
    border-left: 4px solid #0d6efd;
}

.highlight-green {
    background: #f0fdf4;
    border-left: 4px solid #16a34a;
}

.subsection-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.badge-alignment {
    background: #0d6efd;
    color: #ffffff;
}

.badge-collaboration {
    background: #16a34a;
    color: #ffffff;
}

.research-subsection-title {
    font-size: 1rem;
    font-weight: 600;
    color: #212529;
    margin: 0 0 12px 0;
}

.research-text {
    font-size: 0.938rem;
    color: #495057;
    line-height: 1.7;
    margin: 0;
}

.research-overlap-list-detailed {
    list-style: none;
    padding: 0;
    margin: 0;
}

.research-overlap-list-detailed li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    font-size: 0.938rem;
    color: #495057;
}

.research-overlap-list-detailed li i {
    color: #0d6efd;
    margin-top: 4px;
    flex-shrink: 0;
}

/* Publications */
.publication-item {
    padding: 16px;
    background: #ffffff;
    border-radius: 8px;
    margin-bottom: 12px;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.publication-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.publication-item:last-child {
    margin-bottom: 0;
}

.publication-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px;
}

.publication-num {
    color: #0d6efd;
    font-weight: 700;
    font-size: 0.938rem;
    flex-shrink: 0;
}

.publication-title-text {
    font-size: 0.938rem;
    font-weight: 600;
    color: #212529;
    margin: 0;
    line-height: 1.4;
}

.publication-desc {
    font-size: 0.875rem;
    color: #6c757d;
    line-height: 1.6;
    margin: 0;
    padding-left: 28px;
}

/* Overview Subsections */
.overview-subsection {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e9ecef;
}

.overview-subsection:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.overview-subsection-title {
    font-size: 1rem;
    font-weight: 600;
    color: #212529;
    margin: 0 0 12px 0;
}

.overview-text {
    font-size: 0.938rem;
    color: #495057;
    line-height: 1.7;
    margin: 0;
}

/* Metrics Row */
.metrics-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
}

.metric-box {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.metric-box:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.metric-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 4px;
}

.metric-label {
    font-size: 0.813rem;
    color: #6c757d;
}

/* Contact Row */
.contact-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.contact-icon-wrapper {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-email {
    background: #fee;
    color: #dc3545;
}

.contact-phone {
    background: #d1fae5;
    color: #16a34a;
}

.contact-detail {
    font-size: 0.875rem;
    color: #495057;
    font-weight: 500;
}

/* Professional Links */
.prof-link-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 8px;
    border: 1px solid #e9ecef;
    text-decoration: none;
    transition: all 0.2s ease;
}

.prof-link-item:hover {
    background: #e9ecef;
    transform: translateY(-1px);
}

.prof-link-item:last-child {
    margin-bottom: 0;
}

.prof-link-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.prof-link-icon {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.938rem;
}

.prof-icon-scholar {
    background: #212529;
    color: #ffffff;
}

.prof-icon-university {
    background: #f97316;
    color: #ffffff;
}

.prof-icon-personal {
    background: #9333ea;
    color: #ffffff;
}

.prof-link-text {
    font-size: 0.875rem;
    font-weight: 500;
    color: #212529;
}

.prof-link-arrow {
    color: #adb5bd;
    font-size: 0.813rem;
}

/* Pagination */
.pagination-container {
    background-color: #ffffff;
    padding: 16px 0;
    border-top: 1px solid #e9ecef;
    flex-shrink: 0;
}

.pagination {
    margin: 0;
}

.page-link {
    color: #495057;
    border: 1px solid #dee2e6;
    padding: 8px 12px;
    margin: 0 4px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.page-link:hover {
    background-color: #e9ecef;
    color: #212529;
    border-color: #dee2e6;
}

.page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: #ffffff;
}

.page-item.disabled .page-link {
    color: #adb5bd;
    pointer-events: none;
    background-color: #ffffff;
    border-color: #dee2e6;
}

/* Footer */
.footer {
    background-color: #ffffff;
    border-top: 1px solid #e9ecef;
    padding: 16px 0;
    margin-top: auto;
    flex-shrink: 0;
}

.footer p {
    color: #6c757d;
    font-size: 0.875rem;
}

/* User Dropdown Menu */
.dropdown-menu {
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 8px;
    min-width: 180px;
}

.dropdown-item {
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #495057;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: #212529;
}

.dropdown-item i {
    width: 16px;
    font-size: 0.875rem;
}

.dropdown-divider {
    margin: 8px 0;
    border-top: 1px solid #e9ecef;
}

/* Responsive Design */
@media (min-width: 1200px) {
    .professor-card {
        padding: 20px 24px;
    }

    .profile-image {
        width: 96px;
        height: 96px;
    }
}

@media (max-width: 768px) {
    .professor-card {
        padding: 12px;
        margin-bottom: 12px;
    }

    .professor-list {
        padding: 0 16px 16px 16px;
    }

    .main-content-wrapper {
        padding: 0;
    }

    .match-badge {
        right: 16px;
        padding: 6px 12px;
        font-size: 0.75rem;
    }

    .search-section {
        padding: 24px 16px 20px 16px;
    }

    .results-header {
        padding: 20px 16px 12px 16px;
    }

    .results-title {
        font-size: 1.25rem;
    }

    .detail-content-wrapper {
        padding: 0 16px;
    }
}

@media (max-width: 576px) {
    .profile-image {
        width: 72px;
        height: 72px;
    }

    .professor-name {
        font-size: 0.938rem;
    }

    .professor-card {
        padding: 12px;
        margin-bottom: 12px;
    }

    .professor-list {
        padding: 0 8px 8px 8px;
    }

    .match-badge {
        right: 12px;
        padding: 6px 10px;
        font-size: 0.688rem;
    }

    .profile-section {
        gap: 10px;
    }

    .profile-info {
        gap: 6px;
    }

    .search-section {
        padding: 20px 8px 16px 8px;
    }

    .search-input {
        font-size: 0.875rem;
        padding: 10px 12px;
    }

    .attach-cv-btn,
    .voice-search-btn,
    .search-btn {
        width: 36px;
        height: 36px;
    }

    .search-tips {
        flex-direction: column;
        align-items: flex-start;
    }

    .results-header {
        padding: 16px 8px 12px 8px;
    }

    .results-title {
        font-size: 1.125rem;
    }

    .results-subtitle {
        font-size: 0.875rem;
    }
}

@media (max-width: 390px) {
    .navbar-brand {
        font-size: 1rem;
    }

    .professor-card {
        padding: 10px;
    }

    .profile-image {
        width: 64px;
        height: 64px;
    }

    .match-badge {
        right: 10px;
        padding: 5px 8px;
        font-size: 0.625rem;
    }

    .action-buttons {
        gap: 6px;
    }
}

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

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

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

::-webkit-scrollbar-thumb {
    background: #dee2e6;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ced4da;
}


/* Keep all original Global, Sidebar, and Professor Card styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f8f9fa;
    color: #212529;
    line-height: 1.6;
}

/* ... (Existing Sidebar and Search Section Styles) ... */

/* NEW: Steps Section Styles (Integrated from design.html concept) */
.steps-section {
    padding: 32px 24px;
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
    width: 100%;
    border-bottom: 1px solid #e9ecef;
}

.steps-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.step-card {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.step-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    border-color: #0d6efd;
}

.step-tag {
    font-size: 0.625rem;
    color: #3b82f6;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.step-title {
    font-size: 1rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 12px;
}

/* Step Content Elements */
.preview-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.preview-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
}

.preview-circle.blue {
    background: #3b82f6;
}

.preview-text {
    font-size: 0.75rem;
    color: #495057;
}

.preview-text span {
    color: #6c757d;
    font-size: 0.7rem;
}

.step-stat {
    font-size: 1.5rem;
    font-weight: 800;
    color: #212529;
    margin: 4px 0;
}

.step-desc {
    font-size: 0.75rem;
    color: #6c757d;
    margin: 0;
}

.step-text-box {
    background: #f8f9fa;
    border-left: 3px solid #3b82f6;
    padding: 10px;
    font-size: 0.75rem;
    color: #495057;
    border-radius: 4px;
    font-style: italic;
}

.step-btn {
    background: #0d6efd;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.813rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: auto;
}

.step-btn:hover {
    background: #0a58ca;
}

/* ... (Remaining Original Styles: Results, Professor Cards, Responsive) ... */

@media (max-width: 768px) {
    .steps-container {
        grid-template-columns: 1fr;
    }

    .steps-section {
        padding: 24px 16px;
    }
}



/* No Data Found Styling */
.no-data-container {
    padding: 64px 24px;
    background: #ffffff;
    border-radius: 24px;
    border: 1px dashed #e2e8f0;
    max-width: 600px;
    margin: 40px auto;
    transition: all 0.3s ease;
}

.no-data-icon {
    font-size: 3rem;
    color: #cbd5e1;
    margin-bottom: 20px;
}

.no-data-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.no-data-text {
    font-size: 0.938rem;
    color: #64748b;
    margin-bottom: 24px;
    line-height: 1.5;
}

.btn-refine {
    background: transparent;
    border: 1px solid #3b82f6;
    color: #3b82f6;
    padding: 10px 24px;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-refine:hover {
    background: #eff6ff;
    transform: translateY(-1px);
}