/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Karla', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fafafa;
}

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

/* Sidebar */
.sidebar {
    width: 20%;
    background-color: #fff;
    border-right: 1px solid #e5e5e5;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-content {
    padding: 3rem 2rem;
}

.site-header {
    margin-bottom: 2rem;
}

.logo {
    margin-bottom: 1rem;
    color: #666;
}

.site-title {
    font-family: 'Lustria', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.about-text {
    margin-bottom: 2rem;
    color: #666;
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.7;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.main-nav li {
    margin-bottom: 0;
}

.nav-link {
    display: block;
    padding: 0.5rem 0;
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    color: #333;
}

/* Main Content */
.main-content {
    width: 80%;
    margin-left: 20%;
    padding: 2rem;
}

/* Photo Grid */
.photo-grid {
    column-count: 2;
    column-gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.photo-item {
    display: inline-block;
    width: 100%;
    margin-bottom: 1.5rem;
    break-inside: avoid;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.photo-item:hover {
    transform: translateY(-2px);
}

.photo {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease;
}

.photo:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Lightbox */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    box-sizing: border-box;
}

#lightbox-image {
    max-width: calc(100vw - 6rem);
    max-height: calc(100vh - 6rem);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
}

.lightbox-close {
    position: absolute;
    top: -3rem;
    right: -1rem;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: opacity 0.2s ease;
}

.lightbox-close:hover {
    opacity: 0.7;
}

/* Mobile lightbox adjustments */
@media (max-width: 768px) {
    .lightbox-content {
        padding: 2rem;
    }
    
    #lightbox-image {
        max-width: calc(100vw - 4rem);
        max-height: calc(100vh - 4rem);
    }
    
    .lightbox-close {
        top: -2rem;
        right: -0.5rem;
        font-size: 1.5rem;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        position: static;
        height: auto;
        border-right: none;
        border-bottom: 1px solid #e5e5e5;
    }
    
    .sidebar-content {
        padding: 2rem 1rem;
    }
    
    .main-content {
        width: 100%;
        margin-left: 0;
        padding: 1rem;
    }
    
    .photo-grid {
        column-count: 1;
        column-gap: 1rem;
    }
    
    .site-title {
        font-size: 1.25rem;
        font-weight: 700;
    }
    
    .about-text {
        font-size: 0.85rem;
    }
    
    .nav-link {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .sidebar-content {
        padding: 1.5rem 1rem;
    }
    
    .main-content {
        padding: 0.5rem;
    }
    
    .photo-grid {
        column-gap: 0.5rem;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus states for accessibility */
.nav-link:focus,
.photo:focus,
.lightbox-close:focus {
    outline: 2px solid #333;
    outline-offset: 2px;
}

/* Journal Page Styles */
.journal-container {
    max-width: 800px;
    margin: 0 auto;
}

.journal-header {
    margin-top: 2rem;
    margin-bottom: 4rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e5e5e5;
}

.journal-title {
    font-family: 'Lustria', serif;
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin: 0 0 1rem 0;
    line-height: 1.2;
}

.journal-intro {
    font-size: 1.1rem;
    font-weight: 400;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

.posts-archive {
    margin-top: 2rem;
}

.posts-group {
    margin-bottom: 3rem;
}

.posts-group-title {
    font-family: 'Lustria', serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #999;
    margin: 0 0 1.5rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.posts-list {
    margin: 0;
}

.post-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #fafafa;
}

.post-title {
    font-family: 'Karla', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    flex-grow: 1;
}

.post-link {
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
}

.post-link:hover {
    color: #666;
}

.post-date {
    font-size: 0.9rem;
    color: #999;
    margin-left: 1rem;
    flex-shrink: 0;
}

/* Responsive adjustments for journal */
@media (max-width: 768px) {
    .journal-title {
        font-size: 1.75rem;
        font-weight: 700;
    }
    
    .journal-intro {
        font-size: 1rem;
    }
    
    .post-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .post-date {
        margin-left: 0;
        margin-top: 0.25rem;
    }
}

/* Blog Post Detail Styles */
.post-detail {
    max-width: 800px;
    margin: 0 auto;
}

.post-featured-image {
    margin-bottom: 3rem;
}

.featured-image {
    width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: box-shadow 0.2s ease;
}

.featured-image:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.post-header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e5e5e5;
}

.post-detail .post-title {
    font-family: 'Lustria', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin: 0 0 1.5rem 0;
    line-height: 1.2;
}

.post-meta {
    margin-top: 1.5rem;
}

.post-intro {
    font-size: 1.2rem;
    font-weight: 400;
    color: #666;
    line-height: 1.6;
    margin: 0 0 1.5rem 0;
}

.post-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #999;
}

.post-category {
    background-color: #f8f8f8;
    padding: 0.25rem 0.75rem;
    border-radius: 3px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-content {
    font-size: 1.1rem;
    font-weight: 400;
    line-height: 1.7;
    color: #444;
}

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

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

/* Ensure all images in post content are properly sized */
.post-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1.5rem auto;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: box-shadow 0.2s ease;
}

.post-content img:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Single Column Images */
.post-image-single {
    margin: 2.5rem 0;
    max-width: 100%;
    overflow: hidden;
}

.post-image {
    width: 100%;
    max-width: 800px;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: box-shadow 0.2s ease;
    display: block;
    margin: 0 auto;
}

.post-image:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Two Column Image Grid */
.post-images-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin: 2.5rem 0;
}

.post-image-item {
    overflow: hidden;
}

/* Post Navigation */
.post-navigation {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e5e5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-back,
.nav-next-post {
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.nav-back:hover,
.nav-next-post:hover {
    color: #333;
}

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

/* Responsive adjustments for blog post */
@media (max-width: 768px) {
    .post-detail .post-title {
        font-size: 2rem;
        font-weight: 700;
    }
    
    .post-intro {
        font-size: 1.1rem;
    }
    
    .post-content {
        font-size: 1rem;
    }
    
    .post-details {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .post-images-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .post-navigation {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .nav-next {
        text-align: center;
    }
} 