/* Black and White Theme with Colored Image */

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-card: #161616;
    --text-primary: #f5f5f5;
    --text-secondary: #888888;
    --text-muted: #555555;
    --border-color: #2a2a2a;
    --accent: #ffffff;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Layout Container */
.container {
    display: flex;
    min-height: 100vh;
}

/* Left Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 35%;
    height: 100vh;
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    z-index: 100;
}

.sidebar-content {
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Image Container - KEEP COLOR */
.image-container {
    margin-bottom: 2rem;
    position: relative;
}

.nana-image {
    width: 100%;
    max-width: 320px;
    height: auto;
    border-radius: 8px;
    display: block;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    /* No grayscale filter - keeping the image colored */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.nana-image:hover {
    transform: scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6);
}

/* Sidebar Info */
.sidebar-info {
    flex: 1;
}

.site-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.site-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 300;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.site-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.post-count {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Right Main Content */
.main-content {
    margin-left: 35%;
    width: 65%;
    min-height: 100vh;
    padding: 3rem;
}

.posts-container {
    max-width: 800px;
    margin: 0 auto;
}

/* Blog Post Cards */
.post-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.post-card:hover {
    border-color: #3a3a3a;
    transform: translateY(-2px);
}

.post-card:nth-child(1) { animation-delay: 0.1s; }
.post-card:nth-child(2) { animation-delay: 0.2s; }
.post-card:nth-child(3) { animation-delay: 0.3s; }
.post-card:nth-child(4) { animation-delay: 0.4s; }
.post-card:nth-child(5) { animation-delay: 0.5s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.post-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.post-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-title a:hover {
    color: var(--text-secondary);
}

.post-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.post-content {
    font-size: 1.05rem;
    line-height: 1.9;
    color: var(--text-secondary);
}

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

.post-content p:last-child {
    margin-bottom: 0;
}

.post-content h1,
.post-content h2,
.post-content h3 {
    font-family: 'Cormorant Garamond', serif;
    color: var(--text-primary);
    margin: 1.5rem 0 1rem;
    line-height: 1.3;
}

.post-content h1 {
    font-size: 1.5rem;
}

.post-content h2 {
    font-size: 1.3rem;
}

.post-content h3 {
    font-size: 1.1rem;
}

.post-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

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

.post-content br {
    line-height: 2;
}

/* Poetry Styling */
.post-content .poem {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.15rem;
    line-height: 2;
}

.post-content .poem p {
    margin-bottom: 1.5rem;
    white-space: pre-wrap;
}

.post-content .poem p:last-child {
    margin-bottom: 0;
}

/* Line breaks within poetry stanzas */
.post-content .poem br {
    display: block;
    margin-bottom: 0.5rem;
}

/* Preserve leading whitespace in poetry lines */
.post-content .poem p {
    white-space: pre-wrap;
}

/* Original Link */
.original-link {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.original-link a {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.original-link a:hover {
    color: var(--text-primary);
}

/* Loading Spinner */
.loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 2px solid var(--border-color);
    border-top-color: var(--text-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading.hidden {
    display: none !important;
}

/* End Message */
.end-message {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #444;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .sidebar {
        width: 40%;
    }
    
    .main-content {
        margin-left: 40%;
        width: 60%;
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .sidebar-content {
        min-height: auto;
        padding: 2rem;
        flex-direction: row;
        align-items: center;
        gap: 2rem;
    }
    
    .image-container {
        margin-bottom: 0;
        flex-shrink: 0;
    }
    
    .nana-image {
        max-width: 150px;
    }
    
    .sidebar-info {
        flex: 1;
    }
    
    .site-title {
        font-size: 1.5rem;
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 1.5rem;
    }
    
    .post-card {
        padding: 1.5rem;
    }
    
    .post-title {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .sidebar-content {
        flex-direction: column;
        text-align: center;
    }
    
    .nana-image {
        max-width: 200px;
        margin: 0 auto;
    }
    
    .post-card {
        padding: 1.25rem;
    }
    
    .post-title {
        font-size: 1.2rem;
    }
    
    .post-content {
        font-size: 0.95rem;
    }
}

/* Print Styles */
@media print {
    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        page-break-after: always;
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    .post-card {
        page-break-inside: avoid;
        border: 1px solid #ccc;
    }
}
