/* CSS Variables */
:root {
    --bg-primary: #0a0e14;
    --bg-secondary: #111519;
    --bg-tertiary: #1a1f26;
    --text-primary: #e6e6e6;
    --text-secondary: #a0a0a0;
    --text-muted: #666;
    --accent-primary: #00ff9f;
    --accent-secondary: #00d4ff;
    --accent-danger: #ff3366;
    --border-color: #2a2f36;
    --code-bg: #0d1117;
    --link-color: #00d4ff;
    --link-hover: #00ff9f;
}

/* Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 16px;
}

code, pre, .brand {
    font-family: 'Monaco', 'Courier New', monospace;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background-color: var(--bg-secondary);
    border-bottom: 2px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.brand a {
    color: var(--accent-primary);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: -0.5px;
}

.brand a:hover {
    color: var(--accent-secondary);
}

/* Navigation */
nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s ease;
    position: relative;
}

nav a:hover {
    color: var(--text-primary);
}

nav a.active {
    color: var(--accent-primary);
}

nav a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-primary);
}

.nav-cta {
    background: var(--accent-primary);
    color: var(--bg-primary) !important;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.nav-cta:hover {
    background: var(--accent-secondary);
    transform: translateY(-1px);
}

/* Status Bar */
.status {
    background: var(--bg-tertiary);
    padding: 0.5rem 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.status-indicator {
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Main Content */
main {
    min-height: calc(100vh - 300px);
    padding: 3rem 0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.3;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

a {
    color: var(--link-color);
    text-decoration: none;
}

a:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

/* Post Styles */
.post-container {
    max-width: 800px;
}

.post {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 3rem;
}

.post-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.post-header h1 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.separator {
    color: var(--border-color);
}

.type-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.type-review { background: rgba(0, 255, 159, 0.15); color: var(--accent-primary); }
.type-comparison { background: rgba(0, 212, 255, 0.15); color: var(--accent-secondary); }
.type-tutorial { background: rgba(255, 159, 0, 0.15); color: #ff9f00; }
.type-resource { background: rgba(159, 0, 255, 0.15); color: #9f00ff; }
.type-guide { background: rgba(255, 51, 102, 0.15); color: var(--accent-danger); }

/* Post Content */
.post-content {
    color: var(--text-secondary);
}

.post-content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.75rem;
}

.post-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    font-size: 1.35rem;
}

.post-content ul, .post-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.post-content li {
    margin-bottom: 0.5rem;
}

.post-content code {
    background: var(--code-bg);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.9em;
    color: var(--accent-primary);
}

.post-content pre {
    background: var(--code-bg);
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
}

.post-content pre code {
    background: none;
    padding: 0;
    color: var(--text-secondary);
}

.post-content blockquote {
    border-left: 3px solid var(--accent-primary);
    padding-left: 1rem;
    margin: 1rem 0;
    color: var(--text-secondary);
    font-style: italic;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 1.5rem 0;
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: var(--bg-tertiary);
    border-radius: 6px;
    overflow: hidden;
}

.post-content table th,
.post-content table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.post-content table th {
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-weight: 600;
}

/* Callout CTA */
.callout {
    background: linear-gradient(135deg, rgba(0, 255, 159, 0.1) 0%, rgba(0, 212, 255, 0.1) 100%);
    border: 2px solid var(--accent-primary);
    border-radius: 8px;
    padding: 2rem;
    margin: 2rem 0;
    text-align: center;
}

.callout h3 {
    color: var(--accent-primary);
    margin-bottom: 0.75rem;
}

.callout p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.btn {
    display: inline-block;
    background: var(--accent-primary);
    color: var(--bg-primary);
    padding: 0.75rem 2rem;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn:hover {
    background: var(--accent-secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 255, 159, 0.3);
    text-decoration: none;
}

.disclosure-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 1rem;
}

/* Author Box */
.author-box {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1.5rem;
    margin-top: 3rem;
}

.author-info h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.author-info p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.author-link {
    color: var(--accent-primary);
    font-weight: 500;
}

.author-link:hover {
    color: var(--accent-secondary);
}

/* Hub Pages */
.hub-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.hub-header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.hub-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.post-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.2s ease;
    text-decoration: none;
    display: block;
}

.post-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    text-decoration: none;
}

.post-card h3 {
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.post-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.post-card-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
}

/* Home Page */
.hero {
    text-align: center;
    padding: 4rem 0;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.hero .tagline {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

.section-header {
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 2rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-header h2::before {
    content: '>';
    color: var(--accent-primary);
}

.view-all {
    color: var(--accent-primary);
    font-weight: 500;
    margin-top: 2rem;
    display: inline-block;
}

/* Static Pages */
.content-page {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 3rem;
}

.content-page h1 {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.content-page h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.content-page ul, .content-page ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.content-page li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

/* Footer */
footer {
    background: var(--bg-secondary);
    border-top: 2px solid var(--border-color);
    margin-top: 4rem;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--accent-primary);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.footer-section h4 {
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.footer-section p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-section a:hover {
    color: var(--accent-primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        gap: 1rem;
    }

    nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero .tagline {
        font-size: 1.2rem;
    }

    .posts-grid {
        grid-template-columns: 1fr;
    }

    .post {
        padding: 1.5rem;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
}

/* Skip to content link (accessibility) */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--accent-primary);
    color: var(--bg-primary);
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* Breadcrumbs */
.breadcrumbs {
    padding: 1rem 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.breadcrumbs a {
    color: var(--text-secondary);
    text-decoration: none;
}

.breadcrumbs a:hover {
    color: var(--accent-primary);
}

.breadcrumb-separator {
    margin: 0 0.5rem;
    color: var(--border-color);
}

/* Related posts section */
.related-posts {
    margin: 3rem 0;
    padding: 2rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
}

.related-posts h2 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.related-post {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1rem;
    transition: all 0.2s ease;
}

.related-post:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.related-post a {
    text-decoration: none;
    display: block;
}

.related-post h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.related-post p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

/* Post navigation (prev/next) */
.post-navigation {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--bg-tertiary);
    border-radius: 6px;
}

.post-navigation a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 500;
}

.post-navigation a:hover {
    color: var(--accent-secondary);
    text-decoration: underline;
}

.prev-post {
    text-align: left;
}

.next-post {
    text-align: right;
}
