:root {
    --bg-primary: #0a0e27;
    --bg-secondary: #151932;
    --bg-card: rgba(21, 25, 50, 0.6);
    --text-primary: #e0e6ff;
    --text-secondary: #a0a8c5;
    --accent-primary: #00d9ff;
    --accent-secondary: #7c3aed;
    --accent-tertiary: #ec4899;
    --border-color: rgba(0, 217, 255, 0.1);
    --shadow: rgba(0, 217, 255, 0.1);
}

[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.7);
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --accent-primary: #0ea5e9;
    --accent-secondary: #8b5cf6;
    --accent-tertiary: #ec4899;
    --border-color: rgba(14, 165, 233, 0.2);
    --shadow: rgba(14, 165, 233, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
    position: relative;
    min-height: 100vh;
}

/* Animated gradient background */
.background-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(124, 58, 237, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 217, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(236, 72, 153, 0.1) 0%, transparent 50%);
    z-index: -1;
    pointer-events: none;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* Cursor glow effect */
.cursor-glow {
    position: fixed;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 217, 255, 0.08) 0%, transparent 70%);
    pointer-events: none;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
    z-index: 1;
    opacity: 0;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Scroll progress */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary), var(--accent-tertiary));
    z-index: 1000;
    transition: width 0.1s ease;
}

/* Header - Centered & Minimal */
header {
    padding: 8rem 0 4rem;
    position: relative;
    text-align: center;
}

.site-title {
    font-size: 4.5rem;
    font-weight: 900;
    margin: 0;
    letter-spacing: -0.03em;
    line-height: 1;
    display: inline-flex;
    flex-direction: column;
    gap: 0.5rem;
}

.title-word {
    display: block;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary), var(--accent-tertiary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeInUp 0.8s ease calc(var(--delay) * 0.15s) both;
    position: relative;
}

.title-word::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
    transform: scaleX(0);
    animation: lineExpand 0.8s ease calc(var(--delay) * 0.15s + 0.4s) both;
}

@keyframes lineExpand {
    to { transform: scaleX(1); }
}

/* Theme Toggle */
.theme-toggle {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 52px;
    height: 52px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    z-index: 100;
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(10deg);
    border-color: var(--accent-primary);
    box-shadow: 0 0 30px var(--shadow);
}

.theme-toggle:active {
    transform: scale(0.95);
}

.sun-icon, .moon-icon {
    position: absolute;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

body:not([data-theme="light"]) .sun-icon {
    opacity: 0;
    transform: rotate(180deg) scale(0);
}

body:not([data-theme="light"]) .moon-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

[data-theme="light"] .sun-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

[data-theme="light"] .moon-icon {
    opacity: 0;
    transform: rotate(-180deg) scale(0);
}

/* Category Navigation */
.category-nav {
    padding: 0 0 3rem;
    margin-bottom: 3rem;
    animation: fadeInUp 0.6s ease 0.4s both;
}

.category-nav .container {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.category-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.category-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: var(--accent-primary);
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
    z-index: -1;
    opacity: 0.1;
}

.category-btn:hover::before {
    width: 300px;
    height: 300px;
}

.category-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateY(-3px);
}

.category-btn.active {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-color: transparent;
    color: white;
    box-shadow: 0 8px 24px var(--shadow);
}

/* Posts Grid */
.posts-grid {
    display: grid;
    gap: 2rem;
    margin-bottom: 4rem;
}

.post-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.6s ease both;
    position: relative;
    overflow: hidden;
}

.post-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 217, 255, 0.1), transparent);
    transition: left 0.6s ease;
}

.post-card:hover::before {
    left: 100%;
}

.post-card::after {
    content: '→';
    position: absolute;
    right: 2rem;
    bottom: 2rem;
    font-size: 1.8rem;
    color: var(--accent-primary);
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.post-card:hover {
    transform: translateY(-8px) scale(1.01);
    border-color: var(--accent-primary);
    box-shadow: 0 16px 48px var(--shadow);
}

.post-card:hover::after {
    opacity: 1;
    transform: translateX(0);
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.2rem;
}

.post-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.post-category {
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-tech {
    background: rgba(0, 217, 255, 0.15);
    color: var(--accent-primary);
    border: 1px solid rgba(0, 217, 255, 0.3);
}

.category-philosophy {
    background: rgba(124, 58, 237, 0.15);
    color: var(--accent-secondary);
    border: 1px solid rgba(124, 58, 237, 0.3);
}

.category-theory {
    background: rgba(99, 102, 241, 0.15);
    color: #6366f1;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.category-economics {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.category-fun {
    background: rgba(236, 72, 153, 0.15);
    color: var(--accent-tertiary);
    border: 1px solid rgba(236, 72, 153, 0.3);
}

.category-crypto {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.post-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.8rem;
    transition: color 0.3s ease;
    line-height: 1.3;
}

.post-card:hover .post-title {
    color: var(--accent-primary);
}

.post-excerpt {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
}

/* Empty State */
.empty-state {
    display: none;
    padding: 6rem 2rem;
    text-align: center;
    animation: fadeInUp 0.6s ease 0.4s both;
}

.empty-state.show {
    display: block;
}

.empty-state-content {
    max-width: 400px;
    margin: 0 auto;
}

.empty-state svg {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    opacity: 0.5;
}

.empty-state h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.empty-state-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
    padding: 0.8rem 1.5rem;
    border: 1px solid var(--accent-primary);
    border-radius: 50px;
    transition: all 0.3s ease;
}

.empty-state-link:hover {
    background: var(--accent-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--shadow);
}

/* Footer */
footer {
    padding: 3rem 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 4rem;
}

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

/* Focus styles for accessibility */
*:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 4px;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }

    header {
        padding: 5rem 0 3rem;
    }

    .site-title {
        font-size: 3rem;
    }

    .theme-toggle {
        width: 48px;
        height: 48px;
        top: 1.5rem;
        right: 1.5rem;
    }

    .category-nav .container {
        gap: 0.8rem;
    }

    .category-btn {
        font-size: 0.85rem;
        padding: 0.5rem 1.2rem;
    }

    .post-card {
        padding: 1.5rem;
    }

    .post-card::after {
        display: none;
    }

    .post-title {
        font-size: 1.4rem;
    }

    .empty-state {
        padding: 4rem 2rem;
    }

    .empty-state h2 {
        font-size: 1.6rem;
    }
}