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

/* Base */
body {
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    color: #000;
    background-color: #fff;
    line-height: 1.6;
    font-size: 16px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    color: #000;
    text-decoration: underline;
}

a:hover {
    opacity: 0.6;
}

/* Container */
.container {
    max-width: 650px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    position: sticky;
    top: 20px;
    z-index: 100;
    padding: 20px 0;
    margin-bottom: 20px;
}

.navbar .container {
    text-align: center;
}

.nav-links {
    list-style: none;
    display: inline-flex;
    gap: 0;
    background-color: #000;
    padding: 8px 12px;
    border-radius: 20px;
}

.nav-links a {
    text-decoration: none;
    font-size: 14px;
    color: #fff;
    padding: 6px 16px;
    border-radius: 14px;
    transition: background-color 0.2s ease;
}

.nav-links a:hover {
    background-color: #333;
    opacity: 1;
}

.nav-links a.active {
    background-color: #333;
}

/* Main Content */
main {
    flex: 1;
    padding: 40px 0;
}

/* Profile Section */
.profile {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
    align-items: flex-start;
}

.profile-image {
    flex-shrink: 0;
}

.profile-image img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-text {
    flex: 1;
}

.profile-text p {
    margin-bottom: 15px;
    line-height: 1.7;
}

/* News Section */
.news-section {
    margin-top: 50px;
}

.news-section h2 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
}

.news-list {
    list-style: none;
}

.news-item {
    margin-bottom: 12px;
    line-height: 1.6;
}

.news-date {
    display: inline;
    font-size: 14px;
    color: #666;
}

.news-content {
    display: inline;
}

/* Blog Section */
.blog-section {
    padding: 0;
}

.posts-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.post-card {
    padding-bottom: 30px;
    border-bottom: 1px solid #ddd;
}

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

.post-card-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

.post-card-title a {
    text-decoration: none;
}

.post-card-date {
    display: block;
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
}

.post-card-excerpt {
    color: #333;
    margin-bottom: 10px;
    line-height: 1.6;
}

.read-more {
    font-size: 14px;
}

.no-posts {
    color: #666;
    text-align: center;
    padding: 40px 0;
}

/* Post Content Styling */
.post-container {
    padding: 0;
}

.post-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.post-title {
    font-size: 36px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.3;
}

.post-meta {
    font-size: 13px;
    color: #666;
}

.post-content {
    line-height: 1.7;
    color: #000;
}

/* Markdown Elements */
.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    font-weight: 600;
    margin-top: 30px;
    margin-bottom: 15px;
    line-height: 1.3;
}

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

.post-content h2 {
    font-size: 26px;
}

.post-content h3 {
    font-size: 22px;
}

.post-content h4 {
    font-size: 18px;
}

.post-content h5 {
    font-size: 16px;
}

.post-content h6 {
    font-size: 15px;
}

.post-content p {
    margin-bottom: 20px;
}

.post-content ul,
.post-content ol {
    margin-bottom: 20px;
    padding-left: 25px;
}

.post-content li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.post-content li>ul,
.post-content li>ol {
    margin-top: 8px;
    margin-bottom: 0;
}

.post-content blockquote {
    margin: 20px 0;
    padding-left: 20px;
    border-left: 3px solid #ddd;
    color: #666;
    font-style: italic;
}

.post-content blockquote p {
    margin-bottom: 10px;
}

.post-content code {
    background-color: #f5f5f5;
    padding: 2px 6px;
    font-size: 14px;
    font-family: 'Courier New', Consolas, monospace;
}

.post-content pre {
    background-color: #f5f5f5;
    padding: 15px;
    overflow-x: auto;
    margin-bottom: 20px;
    line-height: 1.5;
}

.post-content pre code {
    background-color: transparent;
    padding: 0;
}

.post-content hr {
    border: none;
    border-top: 1px solid #ddd;
    margin: 30px 0;
}

.post-content img {
    max-width: 100%;
    height: auto;
    margin: 20px 0;
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.post-content table th,
.post-content table td {
    border: 1px solid #ddd;
    padding: 8px 12px;
    text-align: left;
}

.post-content table th {
    background-color: #f5f5f5;
    font-weight: 600;
}

.post-content a {
    color: #000;
    text-decoration: underline;
}

.post-content strong {
    font-weight: 600;
}

.post-content em {
    font-style: italic;
}

.post-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.back-link {
    font-size: 14px;
}

/* Table of Contents */
.post-layout {
    position: relative;
}

.toc-wrapper {
    position: fixed;
    left: calc(50% - 550px);
    top: 140px;
    width: 200px;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.toc {
    font-size: 13px;
}

.toc-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #000;
}

.toc ul {
    list-style: none;
    padding-left: 0;
}

.toc li {
    margin-bottom: 8px;
    line-height: 1.4;
}

.toc a {
    color: #666;
    text-decoration: none;
    display: block;
    transition: color 0.2s ease;
}

.toc a:hover {
    color: #000;
    opacity: 1;
}

.toc a.active {
    color: #000;
    font-weight: 600;
}

/* Hide TOC on smaller screens */
@media (max-width: 1200px) {
    .toc-wrapper {
        display: none;
    }
}

/* Footer */
.footer {
    border-top: 1px solid #ddd;
    padding: 20px 0;
    text-align: center;
    font-size: 13px;
    color: #666;
}

/* Responsive */
@media (max-width: 600px) {
    .profile {
        flex-direction: column;
        gap: 20px;
    }

    .profile-image img {
        width: 100px;
        height: 100px;
    }
}