:root {
    --primary-green: #00ff88;
    --primary-blue: #00d4ff;
    --primary-purple: #7c77c6;
    
    --bg-dark: #0f0f0f;
    --bg-darker: #0a0a0a;
    --card-bg: #1a1a1a;
    --card-hover: #2a2a2a;
    
    --text-primary: #ffffff;
    --text-secondary: #eee;
    --text-muted: #aaa;
    --text-light: #888;
    
    --border-color: #333;
    --sidebar-width: 280px;
    
    --gradient-primary: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-blue) 100%);
    --shadow-hover: 0 10px 30px rgba(0, 255, 136, 0.15);
    --shadow-glow: 0 0 20px rgba(0, 255, 136, 0.3);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-dark);
    color: var(--text-secondary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--card-bg);
    padding: 20px;
    overflow-y: auto;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1000;
    border-right: 1px solid var(--border-color);
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header h2 {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.5rem;
    font-weight: 700;
}

.close-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    color: var(--primary-green);
    background: rgba(0, 255, 136, 0.1);
}

/* Profile Section */
.profile-section {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.03) 0%, rgba(0, 212, 255, 0.03) 100%);
    border-radius: 15px;
    border: 1px solid rgba(0, 255, 136, 0.1);
}

.profile-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--primary-green);
    margin-bottom: 15px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-glow);
}

.profile-img:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.4);
}

.profile-section h3 {
    color: var(--text-primary);
    margin-bottom: 5px;
    font-size: 1.2rem;
}

.profile-section p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Navigation Menu */
.nav-menu {
    list-style: none;
    margin-bottom: 30px;
}

.nav-menu li {
    margin-bottom: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 15px 18px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    border-left: 3px solid transparent;
}

.nav-link i {
    margin-right: 12px;
    width: 20px;
    font-size: 1.1rem;
}

.nav-link:hover,
.nav-link.active {
    background: var(--gradient-primary);
    color: var(--bg-dark);
    transform: translateX(5px);
    border-left-color: var(--primary-green);
    box-shadow: var(--shadow-hover);
}

/* Social Links */
.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    text-decoration: none;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.social-links a:hover {
    background: var(--primary-green);
    color: var(--bg-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
    border-color: var(--primary-green);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--primary-green);
    font-size: 1.2rem;
    padding: 12px 15px;
    border-radius: 12px;
    cursor: pointer;
    z-index: 999;
    transition: all 0.3s ease;
}

.menu-toggle:hover {
    background: var(--primary-green);
    color: var(--bg-dark);
    box-shadow: var(--shadow-glow);
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 40px;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

/* Blog Header */
.blog-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 35px 20px;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.05) 0%, rgba(0, 212, 255, 0.05) 100%);
    border-radius: 20px;
    border: 1px solid rgba(0, 255, 136, 0.1);
    position: relative;
    overflow: hidden;
}

.blog-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
}

.blog-header h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    font-weight: 700;
}

.blog-header p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* Search Container */
.search-container {
    display: flex;
    max-width: 600px;
    margin: 0 auto 50px;
    gap: 0;
    box-shadow: var(--shadow-hover);
    border-radius: 50px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.search-input {
    flex: 1;
    padding: 15px 25px;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 27px 0 0 27px;
    border-right: none;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 01 0 0 2px rgba(0, 255, 136, 0.1);
}

.search-input::placeholder {
    color: var(--text-light);
}

.search-btn {
    padding: 18px 25px;
    background: var(--gradient-primary);
    border: none;
    color: var(--bg-dark);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 1rem;
}

.search-btn:hover {
    filter: brightness(1.1);
    transform: scale(1.02);
}

/* Blog Posts Grid */
.blog-posts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(40%, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

/* Blog Cards */
.blog-card {
    background: var(--card-bg);
    padding: 35px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.blog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-green);
    background: var(--card-hover);
}

/* Post Meta */
.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.category {
    padding: 8px 16px;
    background: var(--gradient-primary);
    color: var(--bg-dark);
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8rem;
}

.date {
    color: var(--text-light);
    font-weight: 500;
}

/* Post Content */
.post-title {
    font-size: 1.6rem;
    margin-bottom: 18px;
    color: var(--text-primary);
    line-height: 1.3;
    font-weight: 600;
    transition: color 0.3s ease;
}

.blog-card:hover .post-title {
    color: var(--primary-green);
}

.post-excerpt {
    color: var(--text-muted);
    margin-bottom: 25px;
    line-height: 1.7;
    font-size: 1rem;
}

/* Tags */
.post-tags {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.tag {
    background: rgba(0, 255, 136, 0.1);
    color: var(--primary-green);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.tag:hover {
    border-color: var(--primary-green);
    background: transparent;
}

/* Read More Button */
.read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-green);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.read-more::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-green);
    transition: width 0.3s ease;
}

.read-more:hover {
    transform: translateX(5px);
}

.read-more:hover::after {
    width: 100%;
}

.read-more i {
    transition: transform 0.3s ease;
}

.read-more:hover i {
    transform: translateX(3px);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 60px 0 40px;
}

.page-btn {
    width: 50px;
    height: 50px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.page-btn:hover:not(:disabled) {
    background: var(--primary-green);
    color: var(--bg-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
    border-color: var(--primary-green);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#pageInfo {
    color: var(--primary-green);
    font-weight: 600;
    font-size: 1.1rem;
    padding: 0 20px;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
}

.no-results i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.3;
    color: var(--primary-green);
}

.no-results p {
    font-size: 1.2rem;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-green);
    border-radius: 4px;
    box-shadow: var(--shadow-glow);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-blue);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.blog-card {
    animation: fadeInUp 0.6s ease both;
}

.blog-card:nth-child(1) { animation-delay: 0.1s; }
.blog-card:nth-child(2) { animation-delay: 0.2s; }
.blog-card:nth-child(3) { animation-delay: 0.3s; }
.blog-card:nth-child(4) { animation-delay: 0.4s; }
.blog-card:nth-child(5) { animation-delay: 0.5s; }
.blog-card:nth-child(6) { animation-delay: 0.6s; }
.blog-card:nth-child(7) { animation-delay: 0.7s; }
.blog-card:nth-child(8) { animation-delay: 0.8s; }

/* Responsive Design */
@media (max-width: 1200px) {
    .blog-posts {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
}

@media (max-width: 1024px) {
    .main-content {
        margin-left: 0;
        padding: 20px;
    }

    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
        box-shadow: var(--shadow-hover);
    }

    .menu-toggle {
        display: block;
    }

    .close-btn {
        display: block;
    }

    .blog-header {
        margin: 80px 0 40px;
        padding: 40px 20px;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 15px;
    }

    .blog-posts {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .blog-card {
        padding: 25px;
    }

    .post-title {
        font-size: 1.4rem;
    }

    .blog-header h1 {
        font-size: 2.5rem;
    }

        .search-container {
        flex-direction: column;
        border-radius: 15px;
        gap: 0;
    }

    .search-input,
    .search-btn {
        border-radius: 0;
    }

    .search-input {
        border-bottom: none;
    }

    .search-btn {
        border-radius: 0 0 15px 15px;
    }
}

@media (max-width: 480px) {
    .menu-toggle {
        top: 15px;
        left: 15px;
        padding: 10px 12px;
    }

    .blog-header {
        margin: 70px 0 30px;
        padding: 30px 15px;
    }

    .blog-header h1 {
        font-size: 2rem;
    }

    .blog-header p {
        font-size: 1rem;
    }

    .blog-card {
        padding: 20px;
    }

    .post-title {
        font-size: 1.3rem;
    }

    .post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .pagination {
        gap: 15px;
        margin: 40px 0 30px;
    }

    .page-btn {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }

    #pageInfo {
        font-size: 1rem;
        padding: 0 15px;
    }
}

/* Accessibility & Performance */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus Styles */
a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--primary-green);
    outline-offset: 2px;
}

/* Selection */
::selection {
    background: var(--primary-green);
    color: var(--bg-dark);
}

::-moz-selection {
    background: var(--primary-green);
    color: var(--bg-dark);
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--primary-green);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

.text-center {
    text-align: center;
}

/* Smooth Transitions */
* {
    transition-property: background-color, border-color, color, transform, box-shadow;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.icon-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--card-hover);
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary-green);
    border: 1px solid var(--border-color);
}

[data-theme="light"] {
    --primary-green: #00cc6a;
    --primary-blue: #0099cc;
    --primary-purple: #6b66a3;
    
    --bg-dark: #ffffff;
    --bg-darker: #f8f9fa;
    --card-bg: #ffffff;
    --card-hover: #f1f3f4;
    
    --text-primary: #1a1a1a;
    --text-secondary: #333333;
    --text-muted: #666666;
    --text-light: #888888;
    
    --border-color: #e0e0e0;
    --shadow-hover: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 20px rgba(0, 204, 106, 0.2);
}

.theme-toggle,
.mobile-theme-toggle {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
}

.theme-toggle:hover,
.mobile-theme-toggle:hover {
    color: var(--primary-green);
    background: rgba(0, 255, 136, 0.1);
    border-color: var(--primary-green);
    transform: rotate(180deg);
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
}

/* Light Mode Specific Adjustments */
[data-theme="light"] .search-input {
    background: var(--card-bg);
    border-color: var(--border-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .search-input:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 2px rgba(0, 204, 106, 0.1);
}

[data-theme="light"] .blog-card {
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .blog-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .sidebar {
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}
[data-theme="light"] .sidebar-header h2 {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
[data-theme="light"] .tag {
    background: rgba(0, 204, 106, 0.1);
    color: var(--primary-green);
}

[data-theme="light"] .social-links a {
    background: var(--bg-darker);
}

[data-theme="light"] .profile-section {
    background: linear-gradient(135deg, rgba(0, 204, 106, 0.05) 0%, rgba(0, 153, 204, 0.05) 100%);
    border-color: rgba(0, 204, 106, 0.15);
}

[data-theme="light"] .blog-header {
    background: linear-gradient(135deg, rgba(0, 204, 106, 0.08) 0%, rgba(0, 153, 204, 0.08) 100%);
    border-color: rgba(0, 204, 106, 0.15);
}
[data-theme="light"] .filter-info{
    background-color: var(--card-hover);
}
/* Scrollbar Light Mode */
[data-theme="light"] ::-webkit-scrollbar-track {
    background: var(--bg-darker);
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: var(--primary-green);
    box-shadow: none;
}

/* Mobile Responsive for Theme Toggle */
@media (max-width: 1024px) {
    .theme-toggle {
        display: none;
    }
    
    .mobile-theme-toggle {
        display: flex;
    }
}

@media (min-width: 1025px) {
    .mobile-theme-toggle {
        display: none;
    }
}
/* Filter Info Styles */
.filter-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    padding: 15px;
    background: var(--card-bg);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.clear-filters {
    background: var(--primary-green);
    color: var(--bg-dark);
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.clear-filters:hover {
    background: #ff3838;
    transform: translateY(-1px);
}

/* No Results Styles */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    background: var(--card-bg);
    border-radius: 12px;
    margin: 40px 0;
}

.no-results i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
    color: var(--primary-color);
}

.no-results h3 {
    color: var(--text-color);
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.no-results p {
    font-size: 1rem;
    opacity: 0.8;
}


/* Enhanced Active States */
.nav-link.active {
    background: var(--primary-gradient);
    color: var(--primary-green);
    transform: translateX(5px);
}

.nav-link.active i {
    color: var(--primary-green);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .filter-info {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .no-results {
        padding: 40px 15px;
    }
    
    .no-results i {
        font-size: 3rem;
    }
}
