/* SkillGen Blog Styles - Shared CSS for all blog posts */
/* Based on skillgen.io brand: dark theme, amber accents */

/* ============================================
   CSS VARIABLES & BASE
   ============================================ */
:root {
    /* Brand Colors */
    --bg-primary: #0c0a09;
    --bg-secondary: #1c1917;
    --bg-tertiary: #292524;
    --text-primary: #fafaf9;
    --text-secondary: #e7e5e4;
    --text-muted: #a8a29e;
    --text-subtle: #78716c;
    --accent: #fbbf24;
    --accent-hover: #f59e0b;
    --accent-glow: rgba(251, 191, 36, 0.5);
    --surface: rgba(255, 255, 255, 0.03);
    --surface-hover: rgba(255, 255, 255, 0.06);
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.12);
    
    /* Typography */
    --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    
    /* Spacing */
    --max-width: 800px;
    --header-height: 64px;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-secondary);
    line-height: 1.7;
    min-height: 100vh;
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}

/* ============================================
   BACKGROUND PATTERNS
   ============================================ */
.circuit-bg {
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 20h10v10h-10zM40 40h10v10h-10zM60 60h10v10h-10zM80 20h10v10h-10zM20 80h10v10h-10z' fill='none' stroke='rgba(251,191,36,0.02)' stroke-width='1'/%3E%3C/svg%3E");
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.glass-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.accent-text {
    color: var(--accent);
}

.accent-border {
    border-color: rgba(251, 191, 36, 0.3);
}

/* ============================================
   HEADER
   ============================================ */
.blog-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(12, 10, 9, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
}

.header-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-accent {
    color: var(--accent);
}

.nav {
    display: flex;
    gap: 1.5rem;
}

.nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

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

/* ============================================
   MAIN CONTENT
   ============================================ */
.blog-main {
    position: relative;
    z-index: 10;
    padding-top: calc(var(--header-height) + 40px);
    padding-bottom: 80px;
}

/* ============================================
   ARTICLE HEADER
   ============================================ */
.article-header {
    margin-bottom: 48px;
}

.category-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 9999px;
    color: var(--accent);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.category-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
}

.article-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.article-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
    color: var(--text-subtle);
    font-size: 0.875rem;
}

.article-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.article-meta-icon {
    width: 16px;
    height: 16px;
    color: var(--text-subtle);
}

.author-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
}

/* Hero Image */
.hero-image-container {
    margin: 2.5rem 0;
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
}

.hero-image {
    width: 100%;
    height: auto;
    display: block;
}

.hero-image-caption {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-subtle);
    padding: 1rem;
    margin: 0;
}

/* Hero Gradient Fallback */
.hero-gradient {
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, #1c1917 0%, #292524 50%, #0c0a09 100%);
    position: relative;
    overflow: hidden;
}

.hero-gradient::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 70%, rgba(251, 191, 36, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 30%, rgba(245, 158, 11, 0.08) 0%, transparent 50%);
}

/* ============================================
   BREADCRUMBS
   ============================================ */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-subtle);
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

.breadcrumb-separator {
    color: var(--bg-tertiary);
}

.breadcrumb-current {
    color: var(--text-subtle);
}

/* ============================================
   ARTICLE CONTENT
   ============================================ */
.article-content {
    font-size: 1.125rem;
    line-height: 1.8;
}

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

.article-content h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 3rem 0 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
    letter-spacing: -0.01em;
}

.article-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 2.5rem 0 1rem;
    letter-spacing: -0.01em;
}

.article-content h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 2rem 0 0.75rem;
}

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

.article-content em {
    color: var(--text-secondary);
    font-style: italic;
}

/* Links */
.article-content a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
    border-bottom: 1px solid transparent;
}

.article-content a:hover {
    color: var(--accent-hover);
    border-bottom-color: var(--accent-hover);
}

/* Lists */
.article-content ul,
.article-content ol {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
}

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

.article-content li::marker {
    color: var(--accent);
}

/* Blockquotes */
.article-content blockquote {
    background: var(--surface);
    border-left: 4px solid var(--accent);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0 0.75rem 0.75rem 0;
    font-style: italic;
}

.article-content blockquote p {
    margin-bottom: 0;
    color: var(--text-muted);
}

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

/* Code */
.article-content code {
    background: var(--bg-tertiary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.9375em;
    color: var(--accent);
}

.article-content pre {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 0.75rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    border: 1px solid var(--border);
}

.article-content pre code {
    background: none;
    padding: 0;
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

/* Tables */
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 1rem;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    overflow: hidden;
}

.article-content th,
.article-content td {
    padding: 0.875rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.article-content th {
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.article-content td {
    color: var(--text-secondary);
}

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

.article-content tr:nth-child(even) {
    background: var(--surface);
}

/* Horizontal Rule */
.article-content hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 3rem 0;
}

/* Callout Boxes */
.callout {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin: 2rem 0;
}

.callout-title {
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.callout p:last-child {
    margin-bottom: 0;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* CTA Box */
.cta-box {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(245, 158, 11, 0.1));
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 1rem;
    padding: 2rem;
    margin: 2.5rem 0;
    text-align: center;
}

.cta-box h3 {
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    margin-top: 0;
}

.cta-box p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.cta-button {
    display: inline-block;
    background: var(--accent);
    color: var(--bg-primary);
    padding: 0.875rem 2rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.cta-button:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(251, 191, 36, 0.3);
}

/* ============================================
   FAQ SECTION
   ============================================ */
.faq-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2rem;
    margin: 3rem 0;
}

.faq-section h2 {
    margin-top: 0;
    border-bottom: none;
}

.faq-item {
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 0;
}

.faq-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.faq-item:first-child {
    padding-top: 0;
}

.faq-question {
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.faq-answer {
    color: var(--text-muted);
    font-size: 1rem;
}

.faq-answer p:last-child {
    margin-bottom: 0;
}

/* ============================================
   TAGS
   ============================================ */
.tags-section {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    padding: 2rem 0;
    border-top: 1px solid var(--border);
    margin-top: 2rem;
}

.tags-label {
    color: var(--text-muted);
    font-weight: 500;
    margin-right: 0.5rem;
}

.tag {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 9999px;
    font-size: 0.875rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s ease;
}

.tag:hover {
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.3);
    color: var(--accent);
}

/* ============================================
   SHARE SECTION
   ============================================ */
.share-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 2rem 0;
}

.share-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.share-buttons {
    display: flex;
    gap: 0.75rem;
}

.share-button {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.share-button:hover {
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.3);
    color: var(--accent);
    transform: translateY(-2px);
}

/* ============================================
   AUTHOR BOX
   ============================================ */
.author-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2rem;
    margin: 3rem 0;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.author-box-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.author-box-content {
    flex: 1;
    min-width: 200px;
}

.author-box-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.author-box-role {
    color: var(--accent);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.author-box-bio {
    color: var(--text-muted);
    font-size: 0.9375rem;
    margin-bottom: 1rem;
}

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

.author-social a {
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.author-social a:hover {
    color: var(--accent);
}

/* ============================================
   FOOTER
   ============================================ */
.blog-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 3rem 0;
    margin-top: 4rem;
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.footer-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

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

.footer-copyright {
    color: var(--text-subtle);
    font-size: 0.875rem;
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-subtle);
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    :root {
        --header-height: 56px;
    }
    
    .article-title {
        font-size: 1.75rem;
    }
    
    .article-subtitle {
        font-size: 1.125rem;
    }
    
    .article-content {
        font-size: 1rem;
    }
    
    .article-content h2 {
        font-size: 1.5rem;
    }
    
    .article-content h3 {
        font-size: 1.25rem;
    }
    
    .article-content h4 {
        font-size: 1.125rem;
    }
    
    .article-content pre {
        padding: 1rem;
        font-size: 0.875rem;
    }
    
    .article-content table {
        font-size: 0.875rem;
    }
    
    .article-content th,
    .article-content td {
        padding: 0.625rem 0.75rem;
    }
    
    .article-meta {
        gap: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cta-box {
        padding: 1.5rem;
    }
    
    .author-box {
        flex-direction: column;
        text-align: center;
    }
    
    .author-box-avatar {
        margin: 0 auto;
    }
    
    .author-social {
        justify-content: center;
    }
    
    .share-section {
        flex-direction: column;
        text-align: center;
    }
    
    .nav {
        gap: 1rem;
    }
    
    .nav a {
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .article-content blockquote {
        padding: 1rem;
    }
    
    .faq-section {
        padding: 1.5rem;
    }
}
