:root {
    --bg-main: #0a0e17;
    --bg-surface: #111726;
    --bg-surface-hover: #161e31;
    --border-subtle: #1e293b;
    --border-accent: #334155;
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #8b9cb0;
    
    --spotlight-green: #10b981;
    --spotlight-green-bg: rgba(16, 185, 129, 0.08);
    --spotlight-blue: #38bdf8;
    --spotlight-blue-bg: rgba(56, 189, 248, 0.08);
    --spotlight-purple: #a855f7;
    --spotlight-purple-bg: rgba(168, 85, 247, 0.08);
    --spotlight-amber: #f59e0b;
    --spotlight-amber-bg: rgba(245, 158, 11, 0.08);
    
    --font-head: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    max-width: 1040px;
    margin: 0 auto;
    padding: 0 24px;
}

.container-narrow {
    max-width: 840px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header & Navigation */
header {
    border-bottom: 1px solid var(--border-subtle);
    position: sticky;
    top: 0;
    background: rgba(10, 14, 23, 0.92);
    backdrop-filter: blur(12px);
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}

.nav-logo {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.2s ease;
}

.nav-logo:hover {
    opacity: 0.85;
}

.nav-logo .pulse {
    width: 7px;
    height: 7px;
    background: var(--spotlight-green);
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-link {
    font-family: var(--font-mono);
    font-size: 0.84rem;
    color: var(--text-secondary);
    transition: color 0.2s ease;
    padding: 6px 4px;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 4px;
    right: 4px;
    height: 2px;
    background: var(--spotlight-blue);
    border-radius: 2px;
}

.nav-github-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    background: #1e293b;
    color: var(--text-primary);
    border: 1px solid var(--border-accent);
    transition: all 0.2s ease;
}

.nav-github-btn:hover {
    background: var(--spotlight-blue);
    color: #0c4a6e;
    border-color: var(--spotlight-blue);
    transform: translateY(-1px);
}

/* Breadcrumbs */
.breadcrumbs {
    padding: 20px 0 10px;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.breadcrumbs a {
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.breadcrumbs a:hover {
    color: var(--spotlight-blue);
}

.breadcrumbs .sep {
    color: var(--border-accent);
}

.breadcrumbs .current {
    color: var(--text-muted);
}

/* Article Hero & Headers */
.page-hero {
    padding: 32px 0 40px;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 40px;
}

.page-category-tag {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 4px 10px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 16px;
}

.tag-green {
    background: var(--spotlight-green-bg);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.tag-blue {
    background: var(--spotlight-blue-bg);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.tag-purple {
    background: var(--spotlight-purple-bg);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.tag-amber {
    background: var(--spotlight-amber-bg);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.page-title {
    font-family: var(--font-head);
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: 16px;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
}

.article-meta-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--text-muted);
    padding-top: 16px;
    border-top: 1px solid var(--border-subtle);
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Article Body Typography & Components */
.article-body {
    padding-bottom: 80px;
    font-size: 1.05rem;
    line-height: 1.8;
    color: #cbd5e1;
}

.article-body h2 {
    font-family: var(--font-head);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 48px 0 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-subtle);
}

.article-body h3 {
    font-family: var(--font-head);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 32px 0 14px;
}

.article-body p {
    margin-bottom: 22px;
}

.article-body strong {
    color: var(--text-primary);
    font-weight: 600;
}

.article-body ul, .article-body ol {
    margin: 0 0 24px 28px;
    color: #cbd5e1;
}

.article-body li {
    margin-bottom: 10px;
    line-height: 1.7;
}

.article-body blockquote {
    background: var(--bg-surface);
    border-left: 4px solid var(--spotlight-blue);
    padding: 18px 24px;
    border-radius: 0 8px 8px 0;
    margin: 28px 0;
    color: #e2e8f0;
    font-style: italic;
}

.article-body hr {
    border: none;
    height: 1px;
    background: var(--border-subtle);
    margin: 48px 0;
}

/* Callout Boxes */
.callout {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 24px;
    margin: 28px 0;
}

.callout.callout-info {
    border-left: 4px solid var(--spotlight-blue);
    background: linear-gradient(90deg, rgba(56, 189, 248, 0.05) 0%, var(--bg-surface) 100%);
}

.callout.callout-success {
    border-left: 4px solid var(--spotlight-green);
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.05) 0%, var(--bg-surface) 100%);
}

.callout.callout-warning {
    border-left: 4px solid var(--spotlight-amber);
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.05) 0%, var(--bg-surface) 100%);
}

.callout-title {
    font-family: var(--font-head);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

/* Code Snippets & Syntax Blocks */
code:not(pre code) {
    font-family: var(--font-mono);
    font-size: 0.88em;
    background: #1e293b;
    color: #38bdf8;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #334155;
}

.code-block-wrapper {
    margin: 28px 0;
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 10px;
    overflow: hidden;
}

.code-header {
    background: #1e293b;
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-secondary);
    border-bottom: 1px solid #334155;
}

.code-lang-badge {
    text-transform: uppercase;
    font-weight: 700;
    color: #94a3b8;
}

pre {
    padding: 20px;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.88rem;
    line-height: 1.65;
    color: #e2e8f0;
}

/* Data Tables */
.table-wrapper {
    overflow-x: auto;
    margin: 28px 0;
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    text-align: left;
}

th {
    background: var(--bg-surface);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.84rem;
    font-weight: 700;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-subtle);
}

td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-subtle);
    color: #cbd5e1;
}

tr:last-child td {
    border-bottom: none;
}

tr:nth-child(even) td {
    background: rgba(17, 23, 38, 0.4);
}

/* Author Box */
.author-box {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 28px;
    margin-top: 50px;
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.author-avatar {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981 0%, #38bdf8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-head);
    font-size: 1.5rem;
    font-weight: 800;
    color: #0a0e17;
    flex-shrink: 0;
}

.author-info h4 {
    font-family: var(--font-head);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.author-role {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--spotlight-green);
    margin-bottom: 10px;
}

.author-bio {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 12px;
}

.author-links {
    display: flex;
    gap: 14px;
    font-family: var(--font-mono);
    font-size: 0.82rem;
}

.author-links a {
    color: var(--spotlight-blue);
}

.author-links a:hover {
    text-decoration: underline;
}

/* Cards & Grid Systems */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.article-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.article-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-accent);
    box-shadow: 0 12px 30px rgba(0,0,0,0.3);
}

.article-card-tag {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 14px;
    display: inline-block;
}

.article-card-title {
    font-family: var(--font-head);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.35;
    margin-bottom: 12px;
    transition: color 0.2s ease;
}

.article-card:hover .article-card-title {
    color: var(--spotlight-blue);
}

.article-card-excerpt {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.article-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-muted);
    padding-top: 16px;
    border-top: 1px solid var(--border-subtle);
}

.read-more-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--spotlight-green);
    font-weight: 600;
}

/* Footer */
footer {
    padding: 48px 0;
    border-top: 1px solid var(--border-subtle);
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--text-muted);
    background: var(--bg-main);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 28px;
}

.footer-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

footer a {
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

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

/* Copy Code Button */
.copy-code-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #1e293b;
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    padding: 4px 10px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.copy-code-btn:hover {
    background: #334155;
    color: var(--text-primary);
    border-color: #475569;
}

.copy-code-btn.copied {
    border-color: var(--spotlight-green);
    background: rgba(16, 185, 129, 0.1);
}

/* Search Bar Component */
.search-container {
    margin-bottom: 36px;
    position: relative;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 16px;
    color: var(--text-muted);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 14px 18px 14px 44px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input:focus {
    border-color: var(--spotlight-blue);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.no-results-msg {
    display: none;
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
    font-family: var(--font-mono);
    background: var(--bg-card);
    border: 1px dashed var(--border-subtle);
    border-radius: var(--radius-md);
}

/* Interactive Tools Styling */
.tool-playground {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin: 32px 0;
}

.slider-group {
    margin-bottom: 20px;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.slider-val {
    color: var(--spotlight-green);
    font-weight: 600;
}

.custom-range {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #334155;
    outline: none;
    cursor: pointer;
}

.tool-canvas-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 24px 0;
}

.canvas-panel {
    background: var(--bg-primary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
}

.canvas-panel h4 {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.canvas-panel canvas {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    background: #000;
}

.drop-zone {
    border: 2px dashed var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 40px 24px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.drop-zone:hover, .drop-zone.dragover {
    border-color: var(--spotlight-blue);
    background: rgba(56, 189, 248, 0.05);
}

/* Responsive adjustments */
@media (max-width: 860px) {
    .grid-2, .grid-3, .tool-canvas-grid {
        grid-template-columns: 1fr;
    }
    .page-title {
        font-size: 1.95rem;
    }
    .nav-right {
        gap: 12px;
    }
    .author-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .author-links {
        justify-content: center;
    }
}
