/* ============================================
   1. ROOT VARIABLES
   ============================================ */
:root {
    --primary: #0d1117;
    --secondary: #161b22;
    --accent: #0d6efd;
    --accent-dark: #0b5ed7;
    --text-light: #f8f9fa;
    --text-muted: #8b949e;
    --border: #30363d;
}

/* ============================================
   2. GLOBAL & BASE
   ============================================ */
body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--primary);
    color: var(--text-light);
    min-height: 100vh;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

.container {
    position: relative;
    z-index: 1;
}

/* ============================================
   3. SCROLL TO TOP BUTTON
   ============================================ */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: rgba(13, 110, 253, 0.3);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background: var(--accent-dark);
    transform: translateY(-3px);
    box-shadow: 0 0 10px rgba(13, 110, 253, 0.9);
}

/* ============================================
   4. CONTENT SECTIONS
   ============================================ */
.content-section {
    padding: 60px 10px;
    background: transparent !important;
}

.section-title {
    color: var(--text-light);
    font-weight: 700;
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 15px;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--accent);
}

/* ============================================
   5. PROFESSIONAL HEADER (HOME PAGE)
   ============================================ */
.professional-header {
    background: var(--primary);
    color: white;
    padding: 60px 0 30px;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}

.header-content {
    padding: 20px;
    background: rgba(13, 110, 253, 0.05);
    border-radius: 16px;
    position: relative;
    z-index: 2;
}

.main-profile-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
}

.avatar-container {
    flex-shrink: 0;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--accent-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    border: 3px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.9);
    opacity: 0;
    transform: scale(0);
    animation: avatarMorph 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) 0.7s forwards;
    overflow: hidden;
}

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

.profile-info {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.name {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin: 0 0 0.5rem;
    line-height: 1.1;
}

.title {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin: 0 0 1rem;
    font-weight: 300;
}

.badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.badge {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 500;
}

/* ============================================
   6. DESKTOP NAVIGATION (fixed-top-nav)
   ============================================ */
.fixed-top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    background: rgba(13, 17, 23, 0.95);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border);
    padding: 12px 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.sidebar-toggle-btn {
    background: rgba(13, 110, 253, 0.15);
    border: 1px solid var(--border);
    color: var(--accent);
    padding: 8px 12px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-toggle-btn:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    transform: scale(1.05);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-light);
    font-size: 1.2rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.nav-logo i {
    font-size: 1.5rem;
    color: var(--accent);
}

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

.main-links a {
    text-decoration: none;
    transition: all 0.3s ease;
}

.main-links a:hover {
    color: #0d6efd !important;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.nav-right {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-left: auto;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(13, 110, 253, 0.1);
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid rgba(13, 110, 253, 0.3);
    white-space: nowrap;
}

.user-info i {
    font-size: 1.2rem;
    color: var(--accent);
}

.user-info span {
    color: var(--text-light);
    font-size: 0.9rem;
}

.nav-login-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(13, 110, 253, 0.9);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nav-login-btn:hover {
    background: var(--accent-dark);
    color: white;
    transform: translateY(-2px);
}

/* Progress bar under nav */
.nav-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(13, 110, 253, 0.2);
    z-index: 1031;
}

.nav-progress-bar {
    height: 100%;
    background: rgba(13, 110, 253, 0.5);
    width: 0;
    transition: width 0.05s linear;
}

.nav-progress-ball {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(13, 110, 253, 0.5);
    color: white;
    font-size: 9px;
    font-weight: bold;
    padding: 2px 5px;
    border-radius: 20px;
    font-family: monospace;
    white-space: nowrap;
    box-shadow: 0 0 4px #0d6efd;
    pointer-events: none;
    transition: left 0.05s linear, opacity 0.2s;
}

/* ============================================
   7. SIDEBAR (mobile drawer)
   ============================================ */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1041;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.boot-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100%;
    background: rgba(13, 17, 23, 0.98);
    backdrop-filter: blur(15px);
    border-right: 1px solid var(--border);
    z-index: 1042;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    display: flex;
    flex-direction: column;
    box-shadow: 5px 0 25px rgba(0, 0, 0, 0.5);
}

.boot-sidebar.open {
    transform: translateX(0);
}

.sidebar-header {
    padding: 25px 20px;
    border-bottom: 1px solid var(--border);
    text-align: center;
}

.sidebar-header .logo {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
}

.sidebar-header .logo small {
    font-size: 0.7rem;
    color: var(--text-muted);
    display: block;
    margin-top: 5px;
}

.sidebar-menu {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.sidebar-menu .menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.sidebar-menu .menu-item i {
    font-size: 1.2rem;
    width: 24px;
}

.sidebar-menu .menu-item:hover,
.sidebar-menu .menu-item.active {
    background: rgba(13, 110, 253, 0.1);
    color: var(--accent);
    border-left-color: var(--accent);
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border);
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
}

.sidebar-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sidebar-close:hover {
    color: var(--accent);
    transform: rotate(90deg);
}

/* ============================================
   8. MOBILE BOTTOM NAVIGATION
   ============================================ */
.mobile-navigation {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(13, 17, 23, 0.98);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(15px);
    z-index: 9999;
    padding: 6px 10px;
    animation: slideDown 0.3s ease-out;
}

.mobile-nav-container {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 100%;
    margin: 0 auto;
}

.mobile-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3px 5px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex: 1;
    min-width: 0;
    max-width: 55px;
    min-height: 35px;
    margin: 0 3px;
    position: relative;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.mobile-nav-btn i {
    font-size: 1.1rem;
    margin-bottom: 2px;
    transition: all 0.3s ease;
}

.mobile-nav-btn span {
    font-size: 0.55rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    transition: all 0.3s ease;
}

.mobile-nav-btn:hover,
.mobile-nav-btn.active,
.mobile-nav-btn.active:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
    box-shadow: 0 0 10px rgba(13, 110, 253, 0.9);
    transform: translateY(-2px);
}

/* Tooltip on hover */
.mobile-nav-btn::after {
    content: attr(aria-label);
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(13, 17, 23, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--accent);
    border-radius: 8px;
    padding: 3px 5px;
    color: white;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999;
    pointer-events: none;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.9);
}

.mobile-nav-btn::before {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid var(--accent);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999;
    pointer-events: none;
}

.mobile-nav-btn:hover::after,
.mobile-nav-btn:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* ============================================
   9. CARDS & BLOCKS
   ============================================ */
.card {
    background: var(--primary);
    border: 1px solid var(--border);
    color: var(--text-light);
}

.card-custom {
    margin: 5px;
    border-radius: 15px;
    transition: box-shadow 0.2s ease-out;
    backface-visibility: hidden;
}

.card-custom:hover {
    box-shadow: 0 0 12px rgba(13, 110, 253, 0.8);
}

.card-custom.active-type {
    background: rgba(13, 110, 253, 0.2);
    border-color: #0d6efd;
    transform: scale(1.02);
    box-shadow: 0 0 15px rgba(13, 110, 253, 0.3);
}

.explore-block-style {
    background: rgba(13, 110, 253, 0.05);
    border-radius: 16px;
}

.custom-style {
    background: rgba(13, 110, 253, 0.03) !important;
    color: #0d6efd;
    border: 1px solid rgba(13, 110, 253, 0.3);
}

.smart-text-block {
    background: rgba(13, 110, 253, 0.05);
    border-radius: 12px;
    margin-bottom: 10px;
}

/* ============================================
   10. BUTTONS & BADGES
   ============================================ */
.btn-outline-primary {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-outline-primary:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.btn-group {
    gap: 0.5rem;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 100px;
    justify-content: center;
}

.nav-btn:hover {
    background: rgba(13, 110, 253, 0.2);
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

.nav-btn.active,
.nav-btn.active:hover {
    background: var(--accent) !important;
    color: white !important;
    border-color: var(--accent) !important;
    box-shadow: 0 0 15px rgba(13, 110, 253, 0.9) !important;
}

.smart-badge {
    background: rgba(13, 110, 253, 0.3);
    top: -10px;
    right: -10px;
    transform: translate(10%, -10%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.smart-badge-icon {
    background: rgba(13, 110, 253, 0.5);
    position: absolute;
    top: -12px;
    right: -12px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

/* ============================================
   11. UTILITIES / HELPERS
   ============================================ */
.text-muted {
    color: var(--text-muted) !important;
}

.text-primary {
    color: var(--accent) !important;
}

.text-accent {
    color: var(--accent) !important;
}

.text-success {
    color: #198754 !important;
}

.text-warning {
    color: #ffc107 !important;
}

.text-info {
    color: #0dcaf0 !important;
}

.text-light {
    color: var(--text-light) !important;
}

.highlight-primary {
    color: var(--accent);
    font-weight: 600;
}

.highlight-accent {
    color: var(--text-light);
    font-weight: 500;
    background: rgba(13, 110, 253, 0.1);
    padding: 0.1rem 0.3rem;
    border-radius: 4px;
}

.author-link {
    color: white;
}

.author-link:hover {
    color: #0d6efd;
}

.custom-margin-top {
    margin-top: 80px;
}

hr {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    margin: 1.5rem 0;
    opacity: 0.3;
}

.mb-5 img,
.text-light img,
.markdown-body img,
.full-description-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
    margin: 20px auto;
}

.mb-5 table,
.text-light table {
    max-width: 100%;
    overflow-x: auto;
    display: block;
}

.full-description-content {
    border-radius: 16px;
    margin: 10px;
    padding: 20px;
    background: rgba(13, 110, 253, 0.05);
}

.full-description-content pre {
    background: #0d1117;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    border-left: 4px solid #0d6efd;
}

.full-description-content code {
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

.full-description-content p code {
    background: rgba(13, 110, 253, 0.15);
    padding: 2px 6px;
    border-radius: 4px;
}

.full-description-content pre code {
    background: transparent;
    padding: 0;
}

.smart-select {
    background: rgba(13, 110, 253, 0.05) !important;
    border: 1px solid rgba(13, 110, 253, 0.3) !important;
    color: #0d6efd !important;
    padding: 0.375rem 2.25rem 0.375rem 0.75rem !important;
    border-radius: 6px !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
    min-height: 38px !important;
    position: relative !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%230d6efd' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.75rem center !important;
    background-size: 16px 12px !important;
}

.smart-select:hover {
    background-color: rgba(13, 110, 253, 0.1) !important;
    border-color: #0d6efd !important;
    box-shadow: 0 0 15px rgba(13, 110, 253, 0.2) !important;
}

.smart-select:focus {
    background-color: rgba(13, 110, 253, 0.1) !important;
    border-color: #0d6efd !important;
    box-shadow: 0 0 5px rgba(13, 110, 253, 0.3) !important;
    outline: none !important;
}

.smart-select::after {
    display: none !important;
}

.smart-dropdown-menu {
    background: rgba(13, 17, 23, 0.98) !important;
    backdrop-filter: blur(15px) !important;
    border: 1px solid rgba(13, 110, 253, 0.3) !important;
    padding: 0 !important;
    margin-top: 4px !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
    max-height: 300px !important;
    overflow-y: auto !important;
}

.smart-dropdown-menu .dropdown-item {
    color: #0d6efd !important;
    padding: 10px 16px !important;
    font-weight: 500 !important;
    background: transparent !important;
    border-bottom: 1px solid rgba(13, 110, 253, 0.08) !important;
    transition: all 0.2s ease !important;
    font-size: 0.9rem !important;
}

.smart-dropdown-menu .dropdown-item:last-child {
    border-bottom: none !important;
}

.smart-dropdown-menu .dropdown-item:hover {
    background: rgba(13, 110, 253, 0.15) !important;
    color: #ffffff !important;
    padding-left: 20px !important;
}

.smart-dropdown-menu .dropdown-item.active {
    background: rgba(13, 110, 253, 0.2) !important;
    color: #ffffff !important;
}

.smart-dropdown-menu .dropdown-item.active::before {
    content: '✓ ';
    color: #0d6efd;
}

.smart-dropdown-menu::-webkit-scrollbar {
    width: 4px;
}

.smart-dropdown-menu::-webkit-scrollbar-track {
    background: rgba(13, 110, 253, 0.05);
}

.smart-dropdown-menu::-webkit-scrollbar-thumb {
    background: rgba(13, 110, 253, 0.3);
    border-radius: 2px;
}

.smart-dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(13, 110, 253, 0.5);
}

.smart-input-group .input-group-text {
    background: rgba(13, 110, 253, 0.05) !important;
    border: 1px solid rgba(13, 110, 253, 0.3) !important;
    color: #0d6efd !important;
    border-radius: 6px 0 0 6px !important;
}

.smart-input-group .input-group-text i {
    color: #0d6efd !important;
}

.smart-search-input {
    background: rgba(13, 110, 253, 0.05) !important;
    border: 1px solid rgba(13, 110, 253, 0.3) !important;
    color: #f8f9fa !important;
    min-height: 38px !important;
}

.smart-search-input:focus {
    background: rgba(13, 110, 253, 0.1) !important;
    border-color: #0d6efd !important;
    box-shadow: 0 0 5px rgba(13, 110, 253, 0.5) !important;
    outline: none !important;
}

.smart-search-input::placeholder {
    color: #8b949e !important;
    opacity: 1 !important;
}

.smart-clear-btn {
    background: rgba(13, 110, 253, 0.05) !important;
    border: 1px solid rgba(13, 110, 253, 0.3) !important;
    color: #0d6efd !important;
    min-height: 38px !important;
    border-radius: 0 6px 6px 0 !important;
}

.smart-clear-btn:hover {
    background: rgba(13, 110, 253, 0.15) !important;
    border-color: #0d6efd !important;
    box-shadow: 0 0 15px rgba(13, 110, 253, 0.2) !important;
}

.hidden-by-search,
.app-card-hidden {
    display: none !important;
}

.page-link {
    background-color: transparent !important;
    color: #0d6efd !important;
    border-color: #0d6efd !important;
}

.page-link:hover {
    background-color: rgba(13, 110, 253, 0.2) !important;
}

.page-item.active .page-link {
    background-color: #0d6efd !important;
    color: white !important;
}

.page-item.disabled .page-link {
    background-color: transparent !important;
    color: #6c757d !important;
    border-color: #6c757d !important;
}

/* ============================================
   12. ANIMATIONS
   ============================================ */
@keyframes avatarMorph {
    0% {
        opacity: 0;
        transform: scale(0) rotate(-180deg);
        border-radius: 30%;
    }
    70% {
        opacity: 1;
        transform: scale(1.1) rotate(10deg);
        border-radius: 45%;
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0);
        border-radius: 50%;
    }
}

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

.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.stagger-delay:nth-child(1) { transition-delay: 0.1s; }
.stagger-delay:nth-child(2) { transition-delay: 0.2s; }
.stagger-delay:nth-child(3) { transition-delay: 0.3s; }
.stagger-delay:nth-child(4) { transition-delay: 0.4s; }
.stagger-delay:nth-child(5) { transition-delay: 0.5s; }
.stagger-delay:nth-child(6) { transition-delay: 0.6s; }

/* ============================================
   13. MEDIA QUERIES (Desktop first → Mobile)
   ============================================ */
/* Hide sidebar toggle & show desktop menu on large screens */
@media (min-width: 992px) {
    .sidebar-toggle-btn {
        display: none !important;
    }
    .boot-sidebar {
        display: none !important;
    }
    .sidebar-overlay {
        display: none !important;
    }
    .nav-container .d-none.d-lg-flex {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        white-space: nowrap;
    }
}

/* Tablet & below */
@media (max-width: 992px) {
    .name {
        font-size: 2rem;
    }
    .title {
        font-size: 1.1rem;
    }
    .profile-avatar {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .professional-header {
        padding: 2rem 0;
    }
    .nav-btn {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
        min-width: auto;
        flex: 1;
    }
    .nav-btn span {
        display: none;
    }
    .nav-btn i {
        font-size: 1.1rem;
    }
    .scroll-to-top {
        right: 30px;
        bottom: 30px;
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    .boot-sidebar {
        width: 260px;
    }
    .fixed-top-nav {
        padding: 10px 15px;
    }
    .nav-logo .logo-text {
        display: inline-block;
        font-size: 0.85rem;
    }
    .user-info .user-name {
        display: none;
    }
    .mb-5 img,
    .text-light img {
        border-radius: 8px;
        margin: 15px auto;
    }
    /* Hide particle canvas on mobile */
    #particle-canvas {
        display: none !important;
    }
    /* Mobile nav container adjustments */
    .mobile-nav-container {
        gap: 0;
    }
    .mobile-nav-btn {
        max-width: 55px;
        min-height: 35px;
    }
    .mobile-nav-btn i {
        font-size: 1.1rem;
    }
    .mobile-nav-btn span {
        font-size: 0.55rem;
    }
}

@media (max-width: 480px) {
    .name {
        font-size: 1.8rem;
    }
    .title {
        font-size: 1rem;
    }
    .badge {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }
    .fixed-top-nav {
        padding: 8px 12px;
    }
    .sidebar-toggle-btn {
        padding: 6px 10px;
        font-size: 1rem;
    }
    .mobile-navigation {
        padding: 6px 10px;
    }
    .mobile-nav-btn {
        max-width: 55px;
        min-height: 35px;
        margin: 0 2px;
    }
    .mobile-nav-btn i {
        font-size: 1rem;
        margin-bottom: 1px;
    }
    .mobile-nav-btn span {
        font-size: 0.5rem;
    }
}

@media (max-width: 360px) {
    .mobile-nav-btn i {
        font-size: 0.95rem;
    }
    .mobile-nav-btn span {
        display: none;
    }
}

@media (max-width: 320px) {
    .mobile-navigation {
        padding: 5px 8px;
    }
    .mobile-nav-btn {
        border-radius: 6px;
        margin: 0 1px;
    }
    .mobile-nav-btn i {
        font-size: 0.9rem;
    }
    .mobile-nav-btn span {
        display: none;
    }
}

/* No hover tooltips on touch devices */
@media (hover: none) and (pointer: coarse) {
    .mobile-nav-btn::after,
    .mobile-nav-btn::before {
        display: none !important;
    }
}


.platform-badge {
    background: rgba(13, 110, 253, 0.15);
    color: #7ab3ff;
    padding: 0.25rem 0.7rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}
.language-badge {
    background: rgba(255, 255, 255, 0.1);
    color: #eef3ff;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-family: monospace;
}
.related-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background: rgba(13, 110, 253, 0.03);
    border: 1px solid rgba(13, 110, 253, 0.15);
    border-radius: 20px;
    height: 100%;
}
.related-card:hover {
    transform: translateY(-4px);
    border-color: rgba(13, 110, 253, 0.4);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.2);
    background: rgba(13, 110, 253, 0.06);
}
.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.smart-small-card {
    background: rgba(13, 110, 253, 0.05);
    border-radius: 12px 12px 0 0;
    padding: 10px
}

/* Console */
#devConsole {
    overflow: hidden;
}

#consoleInput::placeholder {
    color: #333;
}

#consoleOutput::-webkit-scrollbar {
    width: 3px;
}

#consoleOutput::-webkit-scrollbar-track {
    background: #111;
}

#consoleOutput::-webkit-scrollbar-thumb {
    background: #00ff9d;
}

.smart-console-toggle {
    bottom: 20px;
    left: 20px;
    z-index: 9999;
    opacity: 0.7;
    border-radius: 20px;
}

.smart-dev-console {
    display: none;
    position: fixed;
    bottom: 70px;
    left: 20px;
    width: 90%;
    max-width: 500px;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    border-right: 3px solid #00ff9d;
    border-radius: 6px;
    z-index: 9998;
    font-family: 'Courier New', monospace;
    box-shadow: 0 0 20px rgba(0, 255, 157, 0.2);
}

.smart-console-input {
    background: transparent;
    border: none;
    color: #00ff9d;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    width: 85%;
    outline: none;
    margin-left: 5px;
}

@media (min-width: 768px) {
    #devConsole {
        width: 500px !important;
        left: 20px !important;
    }
    #consoleOutput {
        height: 350px !important;
    }
}

@media (max-width: 767px) {
    #devConsole {
        width: calc(100% - 30px) !important;
        left: 15px !important;
        right: 15px !important;
        bottom: 70px !important;
        max-width: none !important;
    }
    #consoleOutput {
        height: 200px !important;
    }
}

@media (orientation: landscape) and (max-height: 500px) {
    #devConsole {
        bottom: 60px !important;
    }
    #consoleOutput {
        height: 120px !important;
    }
}