/* Minimal/Compact Theme */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.4;
    color: #333;
    background-color: #fff;
    font-size: 14px;
}

/* Header */
.header {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 0.5rem 0;
}

.nav {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand a {
    font-size: 1.2rem;
    font-weight: 600;
    text-decoration: none;
    color: #333;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1rem;
    align-items: center;
}

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

.nav-menu a:hover {
    color: #0066cc;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
}

.nav-toggle span {
    width: 20px;
    height: 2px;
    background: #333;
    margin: 2px 0;
    transition: 0.3s;
}

/* Search */
.search-container {
    position: relative;
}

#search-input {
    padding: 0.25rem 0.5rem;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 0.8rem;
    width: 150px;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 3px 3px;
    max-height: 200px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
}

.search-results.active {
    display: block;
}

.search-result {
    padding: 0.5rem;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    font-size: 0.8rem;
}

.search-result:hover {
    background: #f8f9fa;
}

.search-result:last-child {
    border-bottom: none;
}

.search-result h4 {
    margin: 0 0 0.25rem 0;
    font-size: 0.8rem;
}

.search-result p {
    margin: 0;
    font-size: 0.7rem;
    color: #666;
}

/* Main content */
.main {
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem;
    min-height: calc(100vh - 120px);
}

/* Hero section */
.hero {
    text-align: center;
    padding: 1rem 0;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

.hero h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.hero-subtitle {
    font-size: 0.9rem;
    color: #666;
}

/* Page headers */
.page-header {
    text-align: center;
    padding: 1rem 0;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 1.5rem;
}

.page-header h1 {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.page-subtitle {
    font-size: 0.9rem;
    color: #666;
}

/* Content sections */
.content-section {
    margin-bottom: 1.5rem;
}

.content-section h2 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    color: #333;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 0.25rem;
}

/* Post grid - Masonry brick layout */
.post-grid {
    columns: 3;
    column-gap: 1rem;
    column-fill: balance;
}

@media (max-width: 768px) {
    .post-grid {
        columns: 2;
    }
}

@media (max-width: 480px) {
    .post-grid {
        columns: 1;
    }
}

.post-card {
    background: #ffffff;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    break-inside: avoid;
    margin-bottom: 1rem;
    display: inline-block;
    width: 100%;
}

.post-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e0;
}

/* Variable brick sizes */
.post-card:nth-child(4n+1) {
    min-height: 200px;
}

.post-card:nth-child(4n+2) {
    min-height: 150px;
}

.post-card:nth-child(4n+3) {
    min-height: 180px;
}

.post-card:nth-child(4n+4) {
    min-height: 160px;
}

.post-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1rem;
    line-height: 1.3;
}

.post-card h3 a {
    text-decoration: none;
    color: #333;
}

.post-card h3 a:hover {
    color: #0066cc;
}

.post-card .post-meta {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.75rem;
}

.post-card .post-category {
    background: #0066cc;
    color: white;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.7rem;
    margin-left: 0.5rem;
}

.post-card .post-excerpt {
    color: #555;
    line-height: 1.4;
    font-size: 0.9rem;
}

/* Minimal Blog Posts (from inline styles) */
.blog-posts-minimal-inline {
    margin: 0;
}

.blog-post-minimal-inline {
    margin-bottom: 10px;
    padding: 6px 0;
    border-bottom: 1px dotted #ddd;
}

.blog-post-minimal-inline:last-child {
    border-bottom: none;
}

.post-line {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: nowrap;
}

.post-date-minimal {
    color: #999;
    font-size: 10px;
    font-family: monospace;
    min-width: 35px;
    flex-shrink: 0;
}

.post-title-and-excerpt {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 0.9rem;
    font-weight: normal;
    line-height: 1.2;
    flex: 1;
}

.post-title-and-excerpt a {
    font-family: 'Telex', sans-serif;
    font-size: 1.1rem;
    color: #333;
    text-decoration: none;
    font-weight: bold;
}

.post-title-and-excerpt a:hover {
    color: #0066cc;
    text-decoration: underline;
}

/* Raindrop list - Compact layout */
.raindrop-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.raindrop-item {
    padding: 0.5rem;
    border-left: 2px solid #ddd;
    background: #f8f9fa;
    border-radius: 3px;
}

.raindrop-item h4 {
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
    line-height: 1.3;
}

.raindrop-item h4 a {
    text-decoration: none;
    color: #333;
}

.raindrop-item h4 a:hover {
    color: #0066cc;
}

.raindrop-item time {
    font-size: 0.7rem;
    color: #666;
}

/* Individual post styles */
.post, .raindrop {
    max-width: 800px;
    margin: 0 auto;
}

.post-header, .raindrop-header {
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e9ecef;
}

.post-title, .raindrop-title {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
    line-height: 1.2;
    color: #333;
}

.post-meta {
    font-size: 0.8rem;
    color: #666;
}

.post-category {
    background: #0066cc;
    color: white;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.7rem;
    margin-left: 0.5rem;
}

.post-content, .raindrop-content {
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.post-content h1, .post-content h2, .post-content h3,
.raindrop-content h1, .raindrop-content h2, .raindrop-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: #333;
}

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

.post-content ul, .post-content ol,
.raindrop-content ul, .raindrop-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.post-content blockquote, .raindrop-content blockquote {
    margin: 1rem 0;
    padding: 0.75rem 1rem;
    border-left: 3px solid #ddd;
    background: #f8f9fa;
    border-radius: 0 3px 3px 0;
}

.post-content code, .raindrop-content code {
    background: #f4f4f4;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.85rem;
}

.post-content pre, .raindrop-content pre {
    background: #f4f4f4;
    padding: 1rem;
    border-radius: 3px;
    overflow-x: auto;
    margin: 1rem 0;
}

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

/* Navigation */
.post-navigation, .raindrop-navigation {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-top: 1px solid #e9ecef;
    margin-top: 1.5rem;
}

.nav-link {
    text-decoration: none;
    color: #0066cc;
    font-size: 0.9rem;
    max-width: 45%;
}

.nav-link:hover {
    text-decoration: underline;
}

.nav-prev {
    text-align: left;
}

.nav-next {
    text-align: right;
}

.back-to-raindrops {
    display: inline-block;
    margin-top: 1rem;
    text-decoration: none;
    color: #0066cc;
    font-size: 0.9rem;
}

.back-to-raindrops:hover {
    text-decoration: underline;
}

/* Footer */
.footer {
    background: #f8f9fa;
    padding: 1rem;
    text-align: center;
    border-top: 1px solid #e9ecef;
    margin-top: 2rem;
    font-size: 0.8rem;
    color: #666;
}

/* Pagination */
.pagination-info {
    text-align: center;
    color: #666;
    font-size: 0.8rem;
    margin: 1rem 0;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 1.5rem 0;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pagination-numbers {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.pagination-link {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    text-decoration: none;
    color: #666;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 3px;
    font-size: 0.8rem;
    min-width: 30px;
    text-align: center;
    transition: all 0.2s ease;
}

.pagination-link:hover {
    background: #f8f9fa;
    border-color: #0066cc;
    color: #0066cc;
}

.pagination-link.current {
    background: #0066cc;
    color: #fff;
    border-color: #0066cc;
}

.pagination-link.prev,
.pagination-link.next {
    padding: 0.25rem 0.75rem;
}

.pagination-ellipsis {
    color: #666;
    padding: 0.25rem 0.125rem;
}

/* Admin styles */
.admin-link {
    color: #999 !important;
    text-decoration: underline;
    font-size: 0.8rem;
}

.admin-controls {
    display: none;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.admin-btn-edit, .admin-btn-delete {
    padding: 0.25rem 0.5rem;
    margin-right: 0.5rem;
    border: none;
    border-radius: 3px;
    font-size: 0.7rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.admin-btn-edit {
    background: #0066cc;
    color: white;
}

.admin-btn-delete {
    background: #dc3545;
    color: white;
}

/* Admin navigation buttons */
.admin-nav-btn {
    background: #0066cc;
    color: white !important;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid #0066cc;
    transition: all 0.2s ease;
}

.admin-nav-btn:hover {
    background: #0052a3;
    border-color: #0052a3;
    color: white !important;
}

.admin-nav-btn.new-page {
    background: #17a2b8;
    border-color: #17a2b8;
}

.admin-nav-btn.new-page:hover {
    background: #138496;
    border-color: #138496;
}

.admin-nav-btn.new-post {
    background: #28a745;
    border-color: #28a745;
}

.admin-nav-btn.new-post:hover {
    background: #218838;
    border-color: #218838;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .nav {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.5rem;
    }
    
    .nav-menu {
        position: static;
        flex-direction: column;
        background: none;
        width: auto;
        gap: 0.5rem;
        padding: 0;
        box-shadow: none;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    #search-input {
        width: 120px;
    }
    
    .post-line {
        flex-direction: column;
        gap: 4px;
        align-items: flex-start;
    }
    
    .post-date-minimal {
        min-width: auto;
    }
    
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .page-header h1 {
        font-size: 1.4rem;
    }
    
    .post-title, .raindrop-title {
        font-size: 1.3rem;
    }
    
    .pagination {
        gap: 0.25rem;
    }
    
    .pagination-link {
        padding: 0.2rem 0.4rem;
        font-size: 0.7rem;
        min-width: 25px;
    }
    
    .pagination-link.prev,
    .pagination-link.next {
        padding: 0.2rem 0.6rem;
    }
    
    .post-navigation, .raindrop-navigation {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-link {
        max-width: 100%;
    }
}
