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

:root {
    --purple-primary: #6b46c1;
    --purple-dark: #553c9a;
    --purple-light: #9f7aea;
    --gold: #d4af37;
    --gold-light: #f4d03f;
    --gold-dark: #b8941f;
    --text: #2d3748;
    --text-light: #718096;
    --bg: #faf9f7;
    --bg-content: #ffffff;
    --border: #d4af37;
    --border-light: #e2d5a8;
}

body {
    font-family: Georgia, 'Times New Roman', serif;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
}

.wiki-container {
    max-width: 1100px;
    margin: 0 auto;
    background: var(--bg-content);
    border-left: 1px solid var(--border-light);
    border-right: 1px solid var(--border-light);
    min-height: 100vh;
}

/* Header - DokuWiki Style */
.wiki-header {
    background: linear-gradient(to bottom, var(--purple-primary), var(--purple-dark));
    border-bottom: 3px solid var(--gold);
    padding: 1.5rem 2rem;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.site-title {
    font-size: 2rem;
    font-weight: bold;
    color: var(--gold);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hamburger {
    display: flex;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    gap: 0.4rem;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--gold);
    transition: all 0.3s;
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.wiki-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.wiki-nav a {
    background: rgba(255,255,255,0.1);
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(212,175,55,0.3);
    border-radius: 3px;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.wiki-nav a:hover {
    background: var(--gold);
    color: var(--purple-dark);
    border-color: var(--gold);
}

/* Main Content */
.wiki-content {
    padding: 2rem;
}

.content-section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border-light);
}

.section-heading {
    color: var(--purple-primary);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--gold);
}

/* Recent Article - Featured */
.recent-article {
    background: linear-gradient(135deg, #f8f5ff 0%, #fffbf0 100%);
    border: 2px solid var(--gold);
    padding: 2rem;
    margin-bottom: 3rem;
    border-radius: 4px;
}

.featured-post {
    background: white;
    padding: 1.5rem;
    border-left: 4px solid var(--purple-primary);
}

.featured-post h3 {
    color: var(--purple-dark);
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
}

.featured-post .meta {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.featured-post .excerpt {
    line-height: 1.8;
    margin-bottom: 1rem;
}

.featured-post .read-more {
    display: inline-block;
    background: var(--purple-primary);
    color: white;
    padding: 0.5rem 1.5rem;
    text-decoration: none;
    border-radius: 3px;
    transition: background 0.3s;
}

.featured-post .read-more:hover {
    background: var(--purple-dark);
}

/* Posts Grid - Wiki Style */
.posts-grid, .lessons-grid, .business-grid, .projects-grid {
    display: grid;
    gap: 1rem;
}

.post-item, .lesson-item, .business-item, .project-item {
    background: white;
    border: 1px solid var(--border-light);
    padding: 1.2rem;
    transition: all 0.3s;
    cursor: pointer;
}

.post-item:hover, .lesson-item:hover, .business-item:hover, .project-item:hover {
    border-color: var(--gold);
    box-shadow: 0 2px 8px rgba(107,70,193,0.1);
    transform: translateX(4px);
}

.post-item h3, .lesson-item h3, .business-item h3, .project-item h3 {
    color: var(--purple-primary);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.post-item .meta, .lesson-item .meta, .business-item .meta, .project-item .meta {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.post-item .tag, .lesson-item .tag, .business-item .tag, .project-item .tag {
    display: inline-block;
    background: var(--gold-light);
    color: var(--purple-dark);
    padding: 0.2rem 0.6rem;
    font-size: 0.8rem;
    border-radius: 3px;
    margin-right: 0.5rem;
}

/* Reading List */
.reading-list ul {
    list-style: none;
}

.reading-list li {
    background: white;
    border-left: 3px solid var(--purple-light);
    padding: 1rem;
    margin-bottom: 0.8rem;
    transition: all 0.3s;
}

.reading-list li:hover {
    border-left-color: var(--gold);
    background: #fafafa;
}

.reading-list .book-title {
    font-weight: bold;
    color: var(--purple-dark);
    font-size: 1.1rem;
}

.reading-list .book-author {
    color: var(--text-light);
    font-style: italic;
    font-size: 0.9rem;
}

/* About Section */
.about-section {
    background: linear-gradient(to right, #f8f5ff, #fffbf0);
    padding: 2rem;
    border-radius: 4px;
}

.about-content {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.profile-pic {
    width: 200px;
    height: 200px;
    border-radius: 8px;
    border: 4px solid var(--gold);
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.about-text {
    flex: 1;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--purple-primary);
    color: white;
    padding: 0.6rem 1.2rem;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
    font-size: 0.95rem;
}

.social-link:hover {
    background: var(--gold);
    color: var(--purple-dark);
    transform: translateY(-2px);
}

.social-link .icon {
    width: 20px;
    height: 20px;
}

/* Footer */
.wiki-footer {
    background: var(--purple-dark);
    color: var(--gold-light);
    text-align: center;
    padding: 1.5rem;
    font-size: 0.9rem;
    border-top: 3px solid var(--gold);
}

/* Side Menu Overlay */
.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s;
}

.menu-overlay.active {
    display: block;
    opacity: 1;
}

/* Hamburger Menu - Always visible */
.wiki-nav {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100vh;
    background: linear-gradient(to bottom, var(--purple-primary), var(--purple-dark));
    flex-direction: column;
    gap: 0;
    padding: 4rem 0 2rem 0;
    transition: right 0.3s ease;
    z-index: 999;
    overflow-y: auto;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3);
}

.wiki-nav.active {
    right: 0;
}

.wiki-nav a {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    text-align: left;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    transition: all 0.3s;
}

.wiki-nav a:hover {
    background: rgba(212, 175, 55, 0.15);
    border-left: 4px solid var(--gold);
    color: var(--gold);
    padding-left: 1.75rem;
}

/* Responsive */
@media (max-width: 768px) {
    .wiki-header {
        padding: 1rem;
    }
    
    .header-top {
        margin-bottom: 0;
    }
    
    .site-title {
        font-size: 1.5rem;
    }
    
    .wiki-content {
        padding: 1rem;
    }
    
    .about-content {
        flex-direction: column;
    }
    
    .profile-pic {
        width: 150px;
        height: 150px;
    }
    
    .social-links {
        flex-direction: column;
    }
}

/* Article Page Styles */
.article-page {
    max-width: 800px;
    margin: 0 auto;
}

.article-loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
    font-size: 1.2rem;
}

.article-error {
    text-align: center;
    padding: 3rem;
}

.article-error h2 {
    color: var(--purple-primary);
    margin-bottom: 1rem;
}

.article-header {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border-light);
}

.back-link {
    display: inline-block;
    color: var(--purple-primary);
    text-decoration: none;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.back-link:hover {
    color: var(--gold);
}

.article-header h1 {
    color: var(--purple-dark);
    font-size: 2.5rem;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    color: var(--text-light);
    font-size: 0.95rem;
}

.article-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text);
}

.article-body h2 {
    color: var(--purple-primary);
    font-size: 1.8rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--gold-light);
}

.article-body h3 {
    color: var(--purple-dark);
    font-size: 1.4rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.article-body p {
    margin-bottom: 1.5rem;
}

.article-body ul, .article-body ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.article-body li {
    margin-bottom: 0.75rem;
}

.article-body code {
    background: #f5f5f5;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: var(--purple-dark);
}

.article-body pre {
    background: #2d3748;
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--gold);
}

.article-body pre code {
    background: none;
    padding: 0;
    color: inherit;
    font-size: 0.95rem;
}

.article-body blockquote {
    background: linear-gradient(to right, #f8f5ff, #fffbf0);
    border-left: 4px solid var(--gold);
    padding: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--text);
}

.article-body blockquote p:last-child {
    margin-bottom: 0;
}

.article-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-light);
}

@media (max-width: 768px) {
    .article-header h1 {
        font-size: 1.8rem;
    }
    
    .article-body {
        font-size: 1rem;
    }
    
    .article-body h2 {
        font-size: 1.5rem;
    }
    
    .article-body h3 {
        font-size: 1.2rem;
    }
}
