/* Cover image for home page */
.cover-image-wrap {
    width: 100%;
    overflow: hidden;
    border-radius: 5px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 16px rgba(0,0,0,0.08);
}
.cover-image {
    width: 100%;
    height: 260px;
    object-fit: cover;
    object-position: center 60%; /* focus on middle 60% vertically */
    display: block;
    border-radius: 5px;
    background: #eaeaea;
}
@media (max-width: 700px) {
    .cover-image {
        height: 140px;
    }
}
/* About page avatar image */
.about-avatar {
    float: right;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    margin-left: 2rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    background: #eee;
    display: block;
}

@media (max-width: 700px) {
    .about-avatar {
        float: none;
        display: block;
        width: 200px;
        height: 200px;
        margin: 1.5rem auto 1rem auto;
    }
    .main-content > .about-avatar {
        order: 1;
    }
    .main-content > h2 {
        order: 0;
    }
    .main-content > p:first-of-type {
        order: 2;
    }
}
/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    line-height: 1.6;
    color: #232323;
    background-color: #fff;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container with responsive margins */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%; /* Mobile first: 5% margins */
}

/* Desktop margins: 20% on each side */
@media (min-width: 768px) {
    .container {
        padding: 0 20%;
    }
}

/* Header */
.site-header {
    padding: 1rem 0;
    border-bottom:1px solid #cecece;
    margin-bottom: 1rem;
}

.site-header h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.site-header h1 a {
    text-decoration: none;
    color: #232323;
}

.main-nav {
    display: flex;
    gap: 1.5rem;
}

.main-nav a {
    text-decoration: none;
    color: #444;
    font-weight: 500;
    transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav a:focus {
    color: #0066cc;
}

/* Main content */
.main-content {
    margin-bottom: 3rem;
}

.intro {
    margin-top: 2rem;
    margin-bottom: 3rem;
}

.intro h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #232323;
}

.intro p {
    font-size: 1.1rem;
    color: #555;
}

/* Posts section */
.recent-posts h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: #232323;
}

.post-preview {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
}

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

.post-preview h4 {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
}

.post-preview h4 a {
    text-decoration: none;
    color: #232323;
    transition: color 0.2s ease;
}

.post-preview h4 a:hover,
.post-preview h4 a:focus {
    color: #444;
}

.post-preview time {
    display: block;
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 0.5rem;
}

.post-preview p {
    color: #555;
}

/* Post content styles */
.post-content h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: #232323;
}

.post-meta {
    margin-bottom: 2rem;
    color: #777;
    font-size: 0.9rem;
}

.post-content p {
    margin-bottom: 1rem;
}

.post-content h2 {
    font-size: 1.4rem;
    margin: 2rem 0 1rem;
    color: #232323;
}

.post-content h3 {
    font-size: 1.2rem;
    margin: 1.5rem 0 0.5rem;
    color: #333;
}

.post-content ul,
.post-content ol {
    margin: 1rem 0 1rem 1.5rem;
}

.post-content blockquote {
    border-left: 3px solid #ddd;
    margin: 1.5rem 0;
    padding-left: 1rem;
    color: #666;
}

.post-content code {
    background-color: #f5f5f5;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;
    font-size: 0.9em;
}

.post-content pre {
    background-color: #f5f5f5;
    padding: 1rem;
    border-radius: 5px;
    overflow-x: auto;
    margin: 1rem 0;
}

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

/* Navigation links in posts */
.post-nav {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.post-nav a {
    text-decoration: none;
    color: #666;
    font-size: 0.9rem;
}

.post-nav a:hover {
    color: #333;
}

/* Footer */
.site-footer {
    padding: 2rem 0;
    border-top: 1px solid #eee;
    text-align: center;
    color: #777;
    font-size: 0.9rem;
}

/* Additional post elements */

/* Lead paragraph */
.lead {
    font-size: 1.2rem;
    font-weight: 400;
    color: #444;
    margin-bottom: 1.5rem;
}

/* Text styling */
mark {
    background-color: #fff3cd;
    padding: 0.1rem 0.2rem;
}

/* Definition lists */
.definition-list dt {
    font-weight: 600;
    margin-top: 1rem;
    margin-bottom: 0.25rem;
    color: #232323;
}

.definition-list dd {
    margin-left: 1rem;
    margin-bottom: 0.5rem;
    color: #555;
}

/* Blockquote citations */
blockquote cite {
    display: block;
    margin-top: 0.5rem;
    font-style: italic;
    color: #777;
    font-size: 0.9rem;
}

/* Images and figures */
.image {
    margin: 1.5rem 0;
}

.image img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.image figcaption {
    font-size: 0.9rem;
    color: #666;
    text-align: center;
    margin-top: 0.5rem;
    font-style: italic;
}

.image-full {
    margin: 2rem -1rem;
}

.image-center {
    text-align: center;
}

.image-center img {
    max-width: 80%;
}

/* Horizontal rules */
hr {
    border: none;
    border-top: 1px solid #ddd;
    margin: 2rem 0;
}

/* Callout boxes */
.callout {
    padding: 1rem;
    margin: 1.5rem 0;
    border-radius: 4px;
    border-left: 4px solid;
}

.callout p {
    margin: 0;
}

.callout-info {
    background-color: #e7f3ff;
    border-left-color: #0066cc;
}

.callout-warning {
    background-color: #fff3cd;
    border-left-color: #ffcc00;
}

.callout-success {
    background-color: #d1e7dd;
    border-left-color: #198754;
}

/* Tables */
.simple-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.simple-table th,
.simple-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.simple-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.simple-table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Mobile responsive images */
@media (max-width: 480px) {
    .image-full {
        margin: 1.5rem -0.5rem;
    }
    
    .image-center img {
        max-width: 100%;
    }
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .site-header h1 {
        font-size: 1.5rem;
    }
    
    .main-nav {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .intro h2 {
        font-size: 1.3rem;
    }
    
    .callout {
        padding: 0.75rem;
        margin: 1rem 0;
    }
    
    .simple-table {
        font-size: 0.9rem;
    }
    
    .simple-table th,
    .simple-table td {
        padding: 0.5rem;
    }
}
