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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333333;
    background-color: #ffffff;
    font-size: 16px;
}

/* Container */
.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Header */
.header {
    padding: 1rem 2rem;
    border-bottom: 1px solid #e2e2e2;
    background-color: #ffffff;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
    width: 100%;
    box-sizing: border-box;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.nav-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: #000000;
    text-decoration: none;
    letter-spacing: -0.025em;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: #666666;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    position: relative;
}

.nav-link:hover {
    color: #333333;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #333333;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Main Content */
.main {
    flex: 1;
    padding: 3rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 0;
    background: white;
    color: #333333;
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
}

.hero p {
    font-size: 1.25rem;
    color: #666666;
    max-width: 600px;
    margin: 0 auto;
}

/* Blog Styles */
.blog-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.blog-card {
    background: white;
    padding: 1rem 0;
    border-bottom: 1px solid #e2e2e2;
    transition: all 0.3s ease;
}

.blog-card:last-child {
    border-bottom: none;
}

.blog-card:hover {
    background-color: #f9f9f9;
}

.blog-card h2 {
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: #000000;
    line-height: 1.4;
}

.blog-card h2 a {
    color: inherit;
    text-decoration: none;
}

.blog-card h2 a:hover {
    color: #333333;
}

.blog-meta {
    color: #888888;
    font-size: 0.8rem;
    margin: 0;
}

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

.article-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e2e2e2;
}

.article-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #000000;
    line-height: 1.2;
}

.article-meta {
    color: #888888;
    font-size: 1rem;
}

.article-content {
    background: white;
    padding: 3rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin: 1.5rem auto;
    display: block;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #000000;
    font-weight: 600;
}

.article-content h2 {
    font-size: 1.875rem;
    border-bottom: 2px solid #e2e2e2;
    padding-bottom: 0.5rem;
}

.article-content h3 {
    font-size: 1.5rem;
}

.article-content p {
    margin-bottom: 1.5rem;
    line-height: 1.7;
    word-break: break-all;
    overflow-wrap: break-word;
}

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

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

.article-content blockquote {
    border-left: 4px solid #333333;
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    background-color: #f5f5f5;
    border-radius: 0 8px 8px 0;
    font-style: italic;
}

.article-content code {
    background-color: #f5f5f5;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 0.875rem;
    color: #333333;
    word-break: break-all;
    overflow-wrap: break-word;
}

.article-content pre {
    background-color: #333333;
    color: #ffffff;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 2rem 0;
    word-break: break-all;
    overflow-wrap: break-word;
}

.article-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* Syntax Highlighting Styles */
.article-content pre[class*="language-"] {
    background-color: #2d3748;
    color: #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    overflow-x: auto;
    margin: 2rem 0;
    line-height: 1.5;
}

.article-content code[class*="language-"] {
    color: #e2e8f0;
    background: none;
    font-family: 'SFMono-Regular', Consolas, Monaco, 'Liberation Mono', 'Lucida Console', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Token colors for syntax highlighting */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
    color: #718096;
}

.token.punctuation {
    color: #a0aec0;
}

.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted {
    color: #f56565;
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
    color: #68d391;
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
    color: #4fd1c7;
}

.token.atrule,
.token.attr-value,
.token.keyword {
    color: #9f7aea;
}

.token.function,
.token.class-name {
    color: #63b3ed;
}

.token.regex,
.token.important,
.token.variable {
    color: #f6ad55;
}

.token.important,
.token.bold {
    font-weight: bold;
}

.token.italic {
    font-style: italic;
}

/* Back to Blog */
.back-to-blog {
    margin-bottom: 2rem;
}

.back-to-blog a {
    color: #333333;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s ease;
}

.back-to-blog a:hover {
    color: #000000;
}

/* Footer */
.footer {
    border-top: 1px solid #e2e2e2;
    padding: 2rem;
    background-color: #ffffff;
    width: 100%;
    box-sizing: border-box;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: #888888;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #333333;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        padding: 0.75rem 0.5rem;
    }
    
    .nav-logo {
        font-size: 1.125rem;
    }
    
    .nav-links {
        gap: 1rem;
        font-size: 0.875rem;
    }
    
    .main {
        padding: 2rem 0.5rem;
    }
    
    .footer {
        padding: 2rem 0.5rem;
    }
    
    .nav {
        gap: 1rem;
    }
    
    .hero {
        margin: 0;
        padding: 3rem 0.5rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .blog-grid {
        max-width: 100%;
        padding: 0 0.5rem;
    }
    
    .article-title {
        font-size: 2rem;
    }
    
    .article-content {
        padding: 2rem;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 0.5rem 0.5rem;
    }
    
    .nav-logo {
        font-size: 1rem;
    }
    
    .nav-links {
        font-size: 0.8rem;
        gap: 0.75rem;
    }
    
    .hero {
        padding: 2rem 0.5rem;
    }
    
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .article-content {
        padding: 1.5rem;
    }
    
    .blog-card {
        padding: 1rem;
    }
}