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

:root {
    /* Professional Color Palette */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #a5b4fc;
    --secondary: #06b6d4;
    --secondary-dark: #0891b2;
    --accent: #f59e0b;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;

    /* Light Theme */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-card: #ffffff;
    --bg-overlay: rgba(255, 255, 255, 0.8);

    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-inverse: #ffffff;

    --border-light: #e2e8f0;
    --border-medium: #cbd5e1;
    --shadow-light: rgba(0, 0, 0, 0.05);
    --shadow-medium: rgba(0, 0, 0, 0.1);
    --shadow-heavy: rgba(0, 0, 0, 0.15);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* Dark Theme */
html.dark-mode {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-card: #1e293b;
    --bg-overlay: rgba(15, 23, 42, 0.8);

    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-inverse: #0f172a;

    --border-light: #334155;
    --border-medium: #475569;
    --shadow-light: rgba(0, 0, 0, 0.3);
    --shadow-medium: rgba(0, 0, 0, 0.5);
    --shadow-heavy: rgba(0, 0, 0, 0.7);
}

/* Base Styles */
html, body {
    height: 100%;
    scroll-behavior: smooth;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

main {
    flex-grow: 1;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1.125rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Professional Navbar */
.navbar {
    background: var(--bg-overlay);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    padding: 1rem 0;
    box-shadow: 0 4px 20px var(--shadow-light);
    transition: all 0.3s ease;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: var(--text-secondary) !important;
    transition: all 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link:hover {
    color: var(--primary) !important;
    transform: translateY(-1px);
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after {
    width: 100%;
}

/* Professional Buttons */
.btn {
    font-weight: 600;
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-primary);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.btn-outline-primary {
    border: 2px solid var(--primary);
    color: var(--primary);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.btn-success {
    background: var(--gradient-accent);
}

/* Professional Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    box-shadow: 0 4px 20px var(--shadow-light);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px var(--shadow-medium);
}

.card-body {
    padding: 2rem;
}

.card-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

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

/* Glassmorphism Effect */
.glass-card {
    background: var(--bg-overlay);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Professional Forms */
.form-control {
    background: var(--bg-secondary);
    border: 2px solid var(--border-light);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    color: var(--text-primary);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    background: var(--bg-card);
}

.form-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

/* Professional Hero Section */
.hero-section {
    background: var(--gradient-primary);
    color: white;
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="1000" height="1000" fill="url(%23grain)"/></svg>');
    opacity: 0.1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

/* Professional Stats Cards */
.stats-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 20px var(--shadow-light);
    transition: all 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px var(--shadow-medium);
}

.stats-number {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stats-label {
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.875rem;
}

/* Professional Avatar Styles */
.avatar {
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border-light);
    transition: all 0.3s ease;
}

.avatar:hover {
    border-color: var(--primary);
    transform: scale(1.05);
}

/* Professional Badges */
.badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary {
    background: var(--gradient-primary);
}

.badge-success {
    background: var(--success);
}

.badge-warning {
    background: var(--warning);
}

/* Professional Footer */
#main-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-light);
    padding: 3rem 0 1rem;
    margin-top: auto;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

#main-footer.footer-visible {
    opacity: 1;
    visibility: visible;
}

.footer-link {
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-link:hover {
    color: var(--primary);
    transform: translateX(5px);
}

/* Professional Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

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

::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Professional Loading States */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Professional Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 3rem 0;
    }

    .card-body {
        padding: 1.5rem;
    }

    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
}

/* Professional Focus States */
.btn:focus,
.form-control:focus,
.nav-link:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Professional Hover Effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--shadow-medium);
}

/* Professional Theme Toggle */
.theme-toggle-btn {
    background: var(--bg-secondary);
    border: 2px solid var(--border-light);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.theme-toggle-btn:hover {
    border-color: var(--primary);
    transform: scale(1.1);
}

/* Professional Utility Classes */
.text-primary-custom { color: var(--primary) !important; }
.bg-primary-custom { background: var(--primary) !important; }
.border-primary-custom { border-color: var(--primary) !important; }

.shadow-soft { box-shadow: 0 2px 10px var(--shadow-light) !important; }
.shadow-medium { box-shadow: 0 4px 20px var(--shadow-medium) !important; }
.shadow-heavy { box-shadow: 0 8px 30px var(--shadow-heavy) !important; }

/* Professional Grid System */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* Professional Spacing */
.spacing-section { padding: 5rem 0; }
.spacing-lg { padding: 3rem 0; }
.spacing-md { padding: 2rem 0; }
.spacing-sm { padding: 1rem 0; }

/* Remaining styles (unchanged, verified for theme compatibility) */
.chat-box {
    scrollbar-width: thin;
    scrollbar-color: var(--primary) transparent;
}

.chat-box::-webkit-scrollbar {
    width: 8px;
}

.chat-box::-webkit-scrollbar-thumb {
    background-color: var(--primary);
    border-radius: 4px;
}

.article-hero {
    margin-top: -20px;
    overflow: hidden;
}

.article-hero-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
}

.article-content {
    line-height: 1.8;
    background-color: var(--card-light);
    border-radius: 8px;
}

.article-body p {
    font-size: 1.1rem;
    color: var(--text-light);
}

.article-stats span {
    font-size: 0.9rem;
    color: var(--muted-light);
}

.comments-section .comment {
    transition: background-color 0.3s ease;
}

.comments-section .comment:hover {
    background-color: var(--card-light);
}

html.dark-mode .comments-section .comment:hover,
html.dark-mode .review:hover {
    background-color: var(--card-dark);
}

.related-article:hover h6 a {
    color: var(--primary);
}

.professional-hero {
    margin-top: -20px;
    overflow: hidden;
}

.professional-hero-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
}

.review {
    transition: background-color 0.3s ease;
}

.review:hover {
    background-color: var(--card-light);
}

.portfolio-item img {
    transition: transform 0.3s ease;
}

.portfolio-item img:hover {
    transform: scale(1.05);
}

.floating-action-bar {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--card-light);
    padding: 10px 15px;
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    transition: opacity 0.3s;
}

.floating-action-bar.hidden {
    opacity: 0;
}

.floating-action-bar .btn {
    font-size: 0.9rem;
}

.badge.bg-primary {
    background-color: var(--primary) !important;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

html.dark-mode .badge.bg-primary {
    background-color: var(--primary-dark) !important;
}

.badge.bg-success {
    background-color: #28a745 !important;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

.category-scroll-container {
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--muted-light) var(--background-light);
}

.category-scroll-container::-webkit-scrollbar {
    height: 6px;
}

.category-scroll-container::-webkit-scrollbar-thumb {
    background: var(--muted-light);
    border-radius: 3px;
}

.category-scroll-container::-webkit-scrollbar-track {
    background: var(--background-light);
}

html.dark-mode .category-scroll-container {
    scrollbar-color: var(--muted-dark) var(--background-dark);
}

html.dark-mode .category-scroll-container::-webkit-scrollbar-thumb {
    background: var(--muted-dark);
}

html.dark-mode .category-scroll-container::-webkit-scrollbar-track {
    background: var(--background-dark);
}

.category-scroll {
    padding-left: 10px;
    padding-right: 10px;
}

.category-circle {
    display: inline-block;
    min-width: 70px;
}

.category-circle .circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--card-light);
    border: 1px solid var(--muted-light);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

html.dark-mode .category-circle .circle {
    background-color: var(--card-dark);
    border-color: var(--muted-dark);
}

.category-circle .circle-image {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-color: transparent;
}

.category-circle .circle-initials {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-light);
}

.category-circle:hover .circle {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.category-circle.active .circle {
    border-width: 2px;
    border-color: var(--primary);
    box-shadow: 0 0 8px rgba(0, 123, 255, 0.6);
}

.category-circle.active p {
    font-weight: 600;
    color: var(--primary) !important;
}

.category-circle p {
    white-space: normal;
    word-wrap: break-word;
    font-size: 0.75rem;
    line-height: 1.2;
    margin-bottom: 0;
    color: var(--text-light);
}

.professional-card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.professional-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.professional-card .stretched-link::after {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
    content: "";
}

.job-card {
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.form-label {
    font-weight: 500;
    color: var(--text-light);
}

.form-control, .form-control-file {
    border-radius: 8px;
    border: 1px solid var(--muted-light);
    background-color: var(--card-light);
    color: var(--text-light);
    transition: border-color 0.3s, background-color 0.3s, color 0.3s;
}

html.dark-mode .form-control {
    background-color: var(--card-dark);
    color: var(--text-dark);
    border-color: var(--muted-dark);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.3);
}

html.dark-mode .form-control:focus {
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

.text-danger {
    color: #dc3545;
}

small.text-muted {
    display: block;
    margin-top: 0.25rem;
    color: var(--muted-light);
}

footer .small {
    font-size: 0.875rem;
}

.social-links a {
    color: var(--text-light);
}

html.dark-mode .social-links a {
    color: var(--text-dark);
}

.social-links i {
    font-size: 1.25rem;
}

.sticky-top {
    z-index: 1000;
}

@media (max-width: 991px) {
    .sticky-top {
        position: static;
    }
}

.comment-actions {
    margin-top: 0.5rem;
}

.comment-actions .btn {
    background: none;
    border: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.comment-actions .btn:hover {
    color: #007bff;
}

.comment-actions .text-danger:hover {
    color: #dc3545;
}

.reply .like-comment-form {
    margin-top: 0.5rem;
}


