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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #ffffff;
    color: #242424;
    line-height: 1.58;
    font-size: 18px;
    font-weight: 400;
}

/* Article container */
.article-container {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Article header */
.article-header {
    margin: 40px 0 60px 0;
    text-align: center;
}

/* Branding */
.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    margin-bottom: 16px;
}

.brand-logo {
    width: 48px;
    height: 48px;
    /* border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06); */
}

.brand-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.brand-name {
    font-weight: 700;
    color: #242424;
    letter-spacing: -0.01em;
}

.brand-slogan {
    font-size: 14px;
    color: #666666;
}

.article-title {
    font-size: 42px;
    font-weight: 700;
    line-height: 1.2;
    color: #242424;
    margin: 0;
    letter-spacing: -0.02em;
}

.pub-date {
    font-size: 16px;
    color: #666;
    margin: 0 0 8px 0;
    font-style: italic;
}

/* Article content */
.article-content {
    margin-bottom: 80px;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    color: #242424;
    font-weight: 600;
    margin: 40px 0 20px 0;
    line-height: 1.3;
}

.article-content h1 {
    font-size: 32px;
}

.article-content h2 {
    font-size: 28px;
}

.article-content h3 {
    font-size: 24px;
}

.article-content p {
    margin: 0 0 24px 0;
    color: #242424;
}

.article-content ul,
.article-content ol {
    margin: 0 0 24px 0;
    padding-left: 0;
}

.article-content ul {
    list-style: none;
}

.article-content ul li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 12px;
    color: #242424;
    line-height: 1.6;
}

.article-content ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.7em;
    width: 6px;
    height: 6px;
    background-color: #242424;
    border-radius: 50%;
    transform: translateY(-50%);
}

.article-content ol {
    padding-left: 30px;
}

.article-content ol li {
    margin-bottom: 12px;
    color: #242424;
    line-height: 1.6;
}

.article-content blockquote {
    margin: 40px 0;
    padding-left: 20px;
    border-left: 4px solid #e6e6e6;
    font-style: italic;
    color: #666;
}

.article-content code {
    background-color: #f6f6f6;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 16px;
}

.article-content pre {
    background-color: #f6f6f6;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 24px 0;
}

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

/* Images */
figure {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 40px 0;
}

figure img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Article footer */
.article-footer {
    margin-top: 60px;
}

.recommended-section {
    border-top: 1px solid #e6e6e6;
    padding-top: 40px;
    margin-bottom: 40px;
}

.recommended-title {
    font-size: 24px;
    font-weight: 600;
    color: #242424;
    margin: 0 0 30px 0;
    text-align: center;
}

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

.recommended-article {
    background: #ffffff;
    border: 1px solid #e6e6e6;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.recommended-article:hover {
    border-color: #242424;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    transform: translateY(-4px);
}

.recommended-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.recommended-article-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: #f8f8f8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.recommended-article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.recommended-article:hover .recommended-article-image img {
    transform: scale(1.05);
}

.recommended-article-content {
    padding: 20px;
}

.recommended-article-title {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    color: #242424;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.footer-bottom {
    text-align: center;
    padding: 40px 0;
    border-top: 1px solid #e6e6e6;
}

.copyright {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* Index page styles */
.page-title {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.2;
    color: #242424;
    margin: 0 0 40px 0;
    text-align: center;
    letter-spacing: -0.02em;
}

.articles-list {
    display: grid;
    gap: 32px;
    margin-bottom: 60px;
}

.article-preview {
    background: #ffffff;
    border: 1px solid #e6e6e6;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.article-preview:hover {
    border-color: #242424;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    transform: translateY(-4px);
}

.article-preview-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.article-preview-image {
    width: 100%;
    height: 240px;
    overflow: hidden;
    background: #f8f8f8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.article-preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-preview:hover .article-preview-image img {
    transform: scale(1.05);
}

.article-preview-content {
    padding: 24px;
}

.article-preview-title {
    font-size: 24px;
    font-weight: 600;
    line-height: 1.4;
    color: #242424;
    margin: 0 0 12px 0;
}

.article-preview-date {
    font-size: 14px;
    color: #666;
    margin: 0;
    font-style: italic;
}

.no-articles {
    text-align: center;
    color: #666;
    font-size: 18px;
    margin: 60px 0;
}

/* Responsive design */
@media (max-width: 768px) {
    .article-container {
        padding: 0 16px;
    }
    
    .article-title {
        font-size: 32px;
    }
    
    .article-content h1 {
        font-size: 28px;
    }
    
    .article-content h2 {
        font-size: 24px;
    }
    
    .article-content h3 {
        font-size: 20px;
    }
    
    .recommended-articles {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .recommended-article-image {
        height: 160px;
    }
    
    .recommended-article-content {
        padding: 16px;
    }
    
    .recommended-article-title {
        font-size: 16px;
    }
    
    .page-title {
        font-size: 28px;
    }
    
    .articles-list {
        gap: 24px;
    }
    
    .article-preview-image {
        height: 200px;
    }
    
    .article-preview-content {
        padding: 20px;
    }
    
    .article-preview-title {
        font-size: 20px;
    }
}
