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

html, body {
    height: 100%;
    font-family: Arial, sans-serif;
    font-size: 15px;
    color: #292e54;
    background: #FFFEC2;
}

.layout {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 220px;
    min-width: 220px;
    padding: 2rem 2rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-title {
    font-weight: bold;
    font-size: 0.95rem;
    line-height: 1.4;
}

.sidebar-title .subtitle {
    display: block;
    font-weight: normal;
    font-size: 0.8rem;
    margin-top: 0.2rem;
}

.post-list { list-style: none; display: flex; flex-direction: column; gap: 0.1rem; }

.post-list li a {
    display: block;
    padding: 0.3rem 0.4rem;
    text-decoration: none;
    color: #292e54;
    font-size: 0.85rem;
    line-height: 1.4;
}

.post-list li a:hover { text-decoration: underline; }
.post-list li a.active { font-weight: bold; }

.post-list li a .post-date {
    display: block;
    font-size: 0.75rem;
    color: #292e54;
}

.post-list li:first-child {
  border-bottom: 1px solid #000;
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
}

/* Main */
.main {
    flex: 1;
    overflow-y: auto;
    padding: 2rem 3rem;
    max-width: auto;
}

.post { display: none; }
.post.visible { display: block; }

.post-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
}

.post-header h1 { font-size: 1.4rem; line-height: 1.3; margin-bottom: 0.3rem; }
.post-meta { font-size: 0.8rem; color: #292e54; }

.post-content { line-height: 1.7; }
.post-content p { margin-bottom: 1em; }
.post-content h2 { font-size: 1.1rem; margin: 1.8em 0 0.5em; }
.post-content h3 { font-size: 1rem; margin: 1.5em 0 0.4em; }
.post-content blockquote {
    margin: 1em 0;
    padding: 0 1em;
    border-left: 3px solid #292e54;
    font-style: italic;
}
.post-content code {
    font-family: monospace;
    font-size: 0.9em;
    background: #f0f0f0;
    padding: 0.1em 0.3em;
}
.post-content pre {
    background: #f0f0f0;
    padding: 1em;
    overflow-x: auto;
    margin: 1em 0;
}
.post-content pre code { background: none; padding: 0; }
.post-content ul, .post-content ol { padding-left: 1.5em;}
.post-content li { margin-bottom: 0.3em; }
.post-content a { color: #292e54; }
.post-content img { max-width: 100%; margin: 1em 0; }

.welcome { padding-top: 1rem; color: #292e54; font-size: 0.9rem; }

@media (max-width: 600px) {
    .layout { flex-direction: column; }
    .sidebar { width: 100%; min-width: unset; border-right: none; border-bottom: 1px solid #292e54; }
    .main { padding: 1.5rem; }
}