/* Glassmorphism Blog Theme */
:root {
    --sidebar-bg: #1a1d29;
    --sidebar-text: #a0aec0;
    --sidebar-active: #18bc9c;
    --content-bg: #f0f4f8;
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-shadow: 0 8px 32px rgba(31, 38, 135, 0.12);
    --accent: #18bc9c;
    --accent-hover: #14a085;
    --text-primary: #2d3748;
    --text-muted: #718096;
    --sidebar-width: 280px;
    --header-height: 64px;
    --radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--content-bg);
    color: var(--text-primary);
    min-height: 100vh;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(24, 188, 156, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(99, 102, 241, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 60% 80%, rgba(236, 72, 153, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.app-shell {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    transition: var(--transition);
    border-right: 1px solid rgba(255,255,255,0.05);
}

.sidebar-brand {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-brand a {
    color: #fff;
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.sidebar-brand small {
    display: block;
    color: var(--sidebar-text);
    font-size: 0.75rem;
    margin-top: 0.25rem;
    font-weight: 400;
}

.sidebar-nav { padding: 1rem 0; }

.nav-section-title {
    padding: 0.5rem 1.5rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.3);
    font-weight: 600;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1.5rem;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    color: #fff;
    background: rgba(24, 188, 156, 0.1);
    border-left-color: var(--sidebar-active);
}

.sidebar-nav a.active { color: var(--sidebar-active); }

/* Main */
.main-wrapper {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.top-header {
    height: var(--header-height);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    padding: 0 2rem;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 50;
}

.search-form {
    flex: 1;
    max-width: 480px;
    position: relative;
}

.search-form input {
    width: 100%;
    padding: 0.6rem 1rem 0.6rem 2.5rem;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 50px;
    background: rgba(255,255,255,0.8);
    font-size: 0.9rem;
    transition: var(--transition);
    outline: none;
}

.search-form input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(24, 188, 156, 0.15);
}

.search-form::before {
    content: '🔍';
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.85rem;
    opacity: 0.5;
}

.content-area {
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
    flex: 1;
}

.content-main { min-width: 0; }

/* Glass Cards */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--glass-shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.glass-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(31, 38, 135, 0.18);
}

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 1.5rem;
    letter-spacing: -0.02em;
}

.home-intro {
    margin-bottom: 1.5rem;
}

.home-intro-title {
    margin-bottom: 0.5rem;
}

.home-tagline {
    font-size: 1.05rem;
    color: var(--accent);
    margin: 0 0 1rem;
    font-weight: 500;
}

.home-intro-body p {
    margin: 0 0 0.85rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

.home-intro-body p:last-child {
    margin-bottom: 0;
}

.section-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0 0 1rem;
    letter-spacing: -0.02em;
}

/* Article cards */
.article-card h2 {
    margin: 0 0 0.75rem;
    font-size: 1.25rem;
}

.article-card h2 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}

.article-card h2 a:hover { color: var(--accent); }

.article-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.article-meta .date-badge {
    background: var(--accent);
    color: #fff;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.75rem;
}

.article-excerpt {
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.article-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1rem; }

.tag-pill {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    background: rgba(24, 188, 156, 0.1);
    color: var(--accent);
    border-radius: 50px;
    font-size: 0.75rem;
    text-decoration: none;
    transition: var(--transition);
}

.tag-pill:hover {
    background: var(--accent);
    color: #fff;
}

.btn-read-more {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: var(--accent);
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition);
}

.btn-read-more:hover {
    background: var(--accent-hover);
    transform: translateX(4px);
}

/* Sidebar widgets */
.widget { margin-bottom: 1.5rem; }

.widget h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin: 0 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent);
}

.widget-list { list-style: none; padding: 0; margin: 0; }

.widget-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.widget-list a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: var(--transition);
}

.widget-list a:hover { color: var(--accent); }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 0.35rem; }

/* Pagination */
.pagination {
    display: flex;
    gap: 0.4rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.pagination a, .pagination span {
    padding: 0.5rem 0.85rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.85rem;
    transition: var(--transition);
}

.pagination a {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
}

.pagination a:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.pagination .active {
    background: var(--accent);
    color: #fff;
    font-weight: 600;
}

/* Article detail */
.article-detail .article-content {
    line-height: 1.8;
    font-size: 1rem;
}

.article-detail .article-content pre {
    background: #1a1d29;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
}

.article-detail .article-content code {
    background: rgba(24, 188, 156, 0.1);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
}

/* Footer */
.site-footer {
    margin-left: var(--sidebar-width);
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid rgba(0,0,0,0.05);
}

/* Mobile */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-primary);
}

@media (max-width: 1024px) {
    .content-area { grid-template-columns: 1fr; }
    .content-sidebar { order: -1; }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open { transform: translateX(0); }
    .main-wrapper { margin-left: 0; }
    .site-footer { margin-left: 0; }
    .menu-toggle { display: block; }
    .content-area { padding: 1rem; }
}
