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

body {
    font-family: Georgia, serif;
    background-color: #F5FFFA;
    color: #333;
    line-height: 1.6;
}

.container {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 0;
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

/* Header */
.header {
    grid-column: 1 / -1;
    text-align: center;
    padding: 20px 0;
    border-bottom: 2px solid #ddd;
}

.header h1 {
    font-size: 2em;
    margin-bottom: 5px;
}

.header .subtitle {
    font-size: 0.9em;
    color: #666;
    font-style: italic;
    margin-top: 5px;
}

.header nav {
    margin-top: 10px;
}

.header nav a {
    margin: 0 15px;
    text-decoration: none;
    color: #333;
}

.header nav a:hover {
    text-decoration: underline;
}

/* Sidebar */
.sidebar {
    background: #fff;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    height: fit-content;
    position: sticky;
    top: 20px;
}

.sidebar h2 {
    font-size: 1.1em;
    margin: 15px 0 8px 0;
    font-weight: bold;
}

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

.sidebar h2 a {
    color: #000;
    text-decoration: none;
}

.sidebar h2 a:hover {
    color: #0066cc;
}

.sidebar ul {
    list-style: none;
    margin: 0 0 0 10px;
}

.sidebar li {
    margin: 4px 0;
}

.sidebar li a {
    color: #666;
    text-decoration: none;
    font-size: 0.95em;
}

.sidebar li a:hover {
    color: #0066cc;
}

.sidebar li::before {
    content: "○ ";
    margin-right: 5px;
}

.search-box {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.search-box h2 {
    color: #666;
    font-size: 0.95em;
    font-weight: normal;
    font-style: italic;
}

.search-box h2 a {
    color: #666;
    text-decoration: none;
}

.search-box h2 a:hover {
    color: #0066cc;
}

/* Search page */
.search-container {
    margin-top: 20px;
}

#search-input {
    width: 100%;
    padding: 12px 15px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-family: Georgia, serif;
}

#search-input:focus {
    outline: none;
    border-color: #0066cc;
}

#search-results {
    margin-top: 30px;
}

/* Main Content */
.main {
    background: #fff;
    padding: 30px;
    padding-left: 40px;
    border: 1px solid #ddd;
    border-radius: 4px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    min-width: 0;
}

.bio {
    margin-bottom: 40px;
}

.bio h1 {
    font-size: 1.8em;
    margin-bottom: 20px;
}

.bio-photo {
    float: right;
    margin: 0 0 20px 20px;
    max-width: 220px;
}

.bio-photo img {
    width: 100%;
    height: auto;
    border: 1px solid #ccc;
}

.bio p {
    margin-bottom: 1.2em;
    text-align: justify;
}

.bio em {
    font-style: italic;
}

.clear {
    clear: both;
}

/* Articles */
.articles h2 {
    font-size: 1.5em;
    margin: 30px 0 20px 0;
    padding-top: 30px;
    border-top: 1px solid #ddd;
}

.article-item {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.article-info-full {
    grid-column: 1 / -1;
    padding-left: 220px;
}

.article-thumbnail {
    width: 200px;
}

.article-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

.article-placeholder {
    width: 200px;
    height: 150px;
    background: #f0f0f0;
    border: 1px solid #ddd;
}

.article-info h3 {
    font-size: 1.3em;
    margin-bottom: 8px;
}

.article-info h3 a {
    color: #000;
    text-decoration: none;
}

.article-info h3 a:hover {
    color: #0066cc;
}

.article-meta {
    color: #666;
    font-size: 0.9em;
    margin: 8px 0;
}

.article-summary {
    margin-top: 10px;
    color: #333;
}

.article-meta a {
    color: #0066cc;
    text-decoration: none;
}

.article-meta a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        order: -1;
    }

    .bio-photo {
        float: none;
        margin: 20px auto;
        display: block;
    }

    .article-item {
        grid-template-columns: 1fr;
    }
}

/* Single post */
.post-content {
    line-height: 1.8;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

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

.post-content p {
    margin-bottom: 1.2em;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.post-content pre,
.post-content code {
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.post-content blockquote {
    word-wrap: break-word;
    overflow-wrap: break-word;
    margin: 1em 0;
    padding-left: 20px;
    border-left: 3px solid #ddd;
}

.post-title {
    font-size: 2em;
    margin-bottom: 10px;
}

.post-meta {
    color: #666;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #ddd;
}
