:root {
    /* Navigation & Automation Theme Colors */
    --primary-color: #2563eb;
    --primary-light: #3b82f6;
    --primary-dark: #1d4ed8;
    --secondary-color: #10b981;
    --accent-color: #f59e0b;
    --warning-color: #ef4444;
    --success-color: #10b981;
    --info-color: #06b6d4;
    
    /* Neutral Colors */
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --border-color: #e5e7eb;
    --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-heavy: 0 10px 15px rgba(0, 0, 0, 0.1);
    
    /* Automation-specific colors */
    --robot-blue: #2563eb;
    --ml-purple: #7c3aed;
    --ai-green: #059669;
    --regression-orange: #ea580c;
    --heatmap-red: #dc2626;
}

[data-theme="dark"] {
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;
    --bg-primary: #111827;
    --bg-secondary: #1f2937;
    --bg-tertiary: #374151;
    --border-color: #4b5563;
    --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-medium: 0 4px 6px rgba(0, 0, 0, 0.2);
    --shadow-heavy: 0 10px 15px rgba(0, 0, 0, 0.3);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-medium);
}

.theme-toggle:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.theme-toggle i {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.theme-toggle:hover i {
    transform: rotate(180deg);
}

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

.hero {
    background: linear-gradient(135deg, var(--robot-blue) 0%, var(--ml-purple) 100%);
    color: white;
    padding: 100px 0 60px;
    position: relative;
    overflow: hidden;
    min-height: 70vh;
    display: flex;
    align-items: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="40" height="40" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><rect x="10" y="10" width="8" height="8" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></svg>');
    animation: float 20s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 15s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.original-post-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    padding: 8px 16px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 32px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.original-post-link:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: translateY(-2px);
}

.hero-title {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.3rem;
    font-weight: 400;
    margin-bottom: 28px;
    opacity: 0.95;
    line-height: 1.4;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    font-size: 16px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.8;
}

.meta-item i {
    font-size: 14px;
}

.article {
    max-width: 800px;
    margin: 0 auto;
    padding: 80px 20px;
    line-height: 1.8;
    font-size: 18px;
}

.article h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 48px 0 24px;
    position: relative;
}

.article h2::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -20px;
    width: 4px;
    height: calc(100% + 16px);
    background: linear-gradient(135deg, var(--robot-blue), var(--ml-purple));
    border-radius: 2px;
}

.article h2:first-child {
    margin-top: 0;
}

.article h3 {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 32px 0 16px;
}

.article h4 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 24px 0 12px;
}

.article h5 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 20px 0 8px;
}

.article p {
    margin-bottom: 24px;
    color: var(--text-secondary);
}

.article a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.article a:hover {
    color: var(--primary-dark);
    border-bottom-color: var(--primary-color);
}

.intro-section {
    margin-bottom: 48px;
}

.navigation-challenge-box {
    background: linear-gradient(135deg, var(--robot-blue), var(--ai-green));
    color: white;
    padding: 32px;
    border-radius: 16px;
    margin: 48px 0;
    position: relative;
    overflow: hidden;
}

.navigation-challenge-box::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: url('data:image/svg+xml,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path d="M50 10 L90 90 L10 90 Z" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="2"/></svg>');
    opacity: 0.3;
}

.navigation-challenge-box h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: white;
}

.navigation-challenge-box h3 i {
    font-size: 1.2rem;
}

.navigation-challenge-box p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0;
}

.image-container {
    margin: 48px 0;
    text-align: center;
}

.demo-image, .result-image, .loss-curve, .real-world-result {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: var(--shadow-heavy);
    transition: all 0.3s ease;
}

.demo-image:hover, .result-image:hover, .loss-curve:hover, .real-world-result:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.15);
}

.image-caption {
    font-size: 16px;
    color: var(--text-muted);
    margin-top: 16px;
    font-style: italic;
    line-height: 1.5;
}

.toy-problem-analysis {
    margin: 48px 0;
}

.challenge-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px;
    box-shadow: var(--shadow-medium);
}

.challenge-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.challenge-header i {
    font-size: 1.5rem;
    color: var(--info-color);
}

.challenge-header h4 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.challenge-content p {
    margin-bottom: 24px;
}

.difficulty-factors {
    display: grid;
    gap: 16px;
}

.factor-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    border-left: 4px solid var(--info-color);
}

.factor-item i {
    font-size: 1.2rem;
    color: var(--info-color);
    min-width: 20px;
}

.factor-item span {
    color: var(--text-secondary);
    font-weight: 500;
}

.approach-comparison {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 32px;
    margin: 48px 0;
    align-items: start;
}

.approach-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px;
    box-shadow: var(--shadow-medium);
    transition: all 0.3s ease;
}

.approach-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-heavy);
}

.approach-card.regression {
    border-top: 4px solid var(--regression-orange);
}

.approach-card.heatmap {
    border-top: 4px solid var(--heatmap-red);
}

.approach-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.approach-header i {
    font-size: 1.5rem;
}

.approach-card.regression .approach-header i {
    color: var(--regression-orange);
}

.approach-card.heatmap .approach-header i {
    color: var(--heatmap-red);
}

.approach-header h4 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.approach-content p {
    margin-bottom: 20px;
    color: var(--text-secondary);
}

.pros-cons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.pros h5, .cons h5 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.pros h5 {
    color: var(--success-color);
}

.cons h5 {
    color: var(--warning-color);
}

.pros h5 i, .cons h5 i {
    font-size: 0.9rem;
}

.pros ul, .cons ul {
    list-style: none;
    padding: 0;
}

.pros li, .cons li {
    padding: 6px 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.pros li::before {
    content: '•';
    color: var(--success-color);
    margin-right: 8px;
    font-weight: bold;
}

.cons li::before {
    content: '•';
    color: var(--warning-color);
    margin-right: 8px;
    font-weight: bold;
}

.vs-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
}

.insight-box {
    padding: 32px;
    border-radius: 16px;
    margin: 48px 0;
    position: relative;
    overflow: hidden;
}

.insight-box.success {
    background: linear-gradient(135deg, var(--success-color), var(--ai-green));
    color: white;
}

.insight-box.warning {
    background: linear-gradient(135deg, var(--warning-color), var(--regression-orange));
    color: white;
}

.insight-box.info {
    background: linear-gradient(135deg, var(--info-color), var(--robot-blue));
    color: white;
}

.insight-box::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(25%, -25%);
}

.insight-box h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: white;
}

.insight-box h3 i {
    font-size: 1.2rem;
}

.insight-box p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0;
}

.problem-evolution {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin: 48px 0;
    padding: 32px;
    background: var(--bg-secondary);
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.evolution-step {
    text-align: center;
    flex: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin: 0 auto 16px;
}

.step-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.step-content p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.step-result {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.step-result.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.step-result.failure {
    background: rgba(239, 68, 68, 0.1);
    color: var(--warning-color);
}

.step-result.challenge {
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent-color);
}

.evolution-arrow {
    font-size: 1.5rem;
    color: var(--text-muted);
    font-weight: bold;
}

.breakthrough-box {
    background: linear-gradient(135deg, var(--ml-purple), var(--primary-color));
    color: white;
    padding: 40px;
    border-radius: 20px;
    margin: 48px 0;
    position: relative;
    box-shadow: var(--shadow-heavy);
}

.breakthrough-box::before {
    content: '✨';
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    opacity: 0.3;
}

.breakthrough-box h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: white;
}

.breakthrough-box h3 i {
    font-size: 1.4rem;
    animation: pulse 2s infinite;
}

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

.breakthrough-box p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 0;
}

.key-learnings {
    margin: 64px 0;
}

.key-learnings h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 32px;
    text-align: center;
    justify-content: center;
}

.key-learnings h3 i {
    color: var(--ml-purple);
}

.learning-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.learning-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-medium);
    transition: all 0.3s ease;
}

.learning-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-heavy);
    border-color: var(--primary-color);
}

.learning-item i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 16px;
}

.learning-item h5 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.learning-item p {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 0;
}

.contact-section {
    background: linear-gradient(135deg, var(--robot-blue), var(--ai-green));
    color: white;
    padding: 48px 32px;
    border-radius: 20px;
    margin: 64px 0;
    text-align: center;
}

.contact-section h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: white;
    justify-content: center;
}

.contact-section h3 i {
    font-size: 1.6rem;
}

.contact-section p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.tags-section {
    margin: 64px 0 48px;
}

.tags-section h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 24px;
}

.tags-section h3 i {
    color: var(--primary-color);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.tag {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.tag:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    padding: 16px 0;
    margin: 48px 0;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
}

.back-link:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    transform: translateX(-4px);
}

.back-link i {
    transition: transform 0.3s ease;
}

.back-link:hover i {
    transform: translateX(-4px);
}

.footer {
    text-align: center;
    padding: 48px 0;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .hero {
        padding: 80px 0 50px;
        min-height: 60vh;
    }
    
    .hero-content {
        padding: 0 16px;
    }
    
    .hero-title {
        font-size: 2.2rem;
        line-height: 1.1;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-meta {
        flex-direction: column;
        gap: 12px;
    }
    
    .article {
        padding: 60px 16px;
        font-size: 16px;
    }
    
    .article h2 {
        font-size: 2rem;
    }
    
    .approach-comparison {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .vs-divider {
        order: -1;
        margin: 0 auto;
    }
    
    .problem-evolution {
        flex-direction: column;
        gap: 16px;
    }
    
    .evolution-arrow {
        transform: rotate(90deg);
    }
    
    .learning-grid {
        grid-template-columns: 1fr;
    }
    
    .pros-cons {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .theme-toggle {
        top: 16px;
        right: 16px;
        padding: 10px 14px;
    }
    
    body {
        padding-top: 20px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 60px 0 40px;
        min-height: 50vh;
    }
    
    .hero-content {
        padding: 0 12px;
    }
    
    .hero-title {
        font-size: 1.8rem;
        line-height: 1.1;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .article {
        padding: 40px 12px;
    }
    
    .navigation-challenge-box, .insight-box, .breakthrough-box {
        padding: 20px;
    }
    
    .contact-section {
        padding: 32px 20px;
    }
    
    .tags {
        justify-content: center;
    }
    
    .tag {
        font-size: 12px;
        padding: 6px 12px;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 1400px;
    }
    
    .article {
        font-size: 19px;
        line-height: 1.9;
    }
    
    .learning-grid {
        grid-template-columns: repeat(2, 1fr);
    }
} 