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

:root {
    --max-width: 1500px;
    --sidebar-width: 280px;
    --header-height: 70px;
    --spacing: 20px;
    --bg-color: #ffffff;
    --text-color: #333333;
    --border-color: #e8e8e8;
    --accent-color: #000000;
    --hover-color: #666666;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

/* Header */
header {
    height: var(--header-height);
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

header h1 {
    font-size: 1.25rem;
    font-weight: 400;
    letter-spacing: 0.5px;
    color: var(--accent-color);
    text-transform: uppercase;
    max-width: calc(var(--max-width) + var(--sidebar-width) + 40px);
    width: 100%;
    padding: 0 20px;
}

header h1 a {
    text-decoration: none !important;
    color: inherit;
    border-bottom: none;
}

header h1 a:hover {
    text-decoration: none !important;
    border-bottom: none;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    width: 36px;
    height: 36px;
    position: relative;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background-color: var(--accent-color);
    transition: all 0.3s ease;
    position: absolute;
}

.nav-toggle span:nth-child(1) {
    top: 10px;
}

.nav-toggle span:nth-child(2) {
    top: 17px;
}

.nav-toggle span:nth-child(3) {
    top: 24px;
}

.nav-toggle.active span:nth-child(1) {
    top: 17px;
    transform: rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    top: 17px;
    transform: rotate(-45deg);
}

/* Container */
.container {
    display: flex;
    min-height: calc(100vh - var(--header-height));
    max-width: calc(var(--max-width) + var(--sidebar-width) + 40px);
    margin: 0 auto;
    padding: 0 20px;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    padding: 40px 30px 40px 0;
}

.sidebar::-webkit-scrollbar {
    width: 0;
}

.month-selector h2 {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 30px;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.year-group {
    margin-bottom: 30px;
}

.year-group h3 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--accent-color);
}

.year-group ul {
    list-style: none;
}

.year-group ul li {
    margin: 0;
}

.year-group ul li a {
    text-decoration: none;
    color: var(--text-color);
    display: block;
    padding: 6px 0;
    transition: color 0.2s ease;
    font-size: 0.875rem;
}

.year-group ul li a:hover,
.year-group ul li a.active {
    color: var(--accent-color);
}

.all-photos-link {
    text-decoration: none;
    color: var(--accent-color);
    font-weight: normal;
}

/* Main Content */
main {
    flex: 1;
    padding: 40px 0;
    max-width: var(--max-width);
    min-width: 0;
}

.photo-grid {
    display: flex;
    flex-direction: column;
    gap: 60px;
}

.photo-item {
    background: transparent;
    width: 100%;
    display: flex;
    justify-content: center;
}

.photo-item img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: var(--max-width);
    display: block;
    margin: 0 auto;
}

.photo-item img.lazy-image {
    min-height: 600px;
    background: #f0f0f0;
}

.photo-item img.loaded {
    min-height: auto;
}

.photo-caption {
    display: none;
}

.photo-description {
    display: none;
}

/* Pagination */
.pagination-data {
    display: none;
}

.loading-indicator {
    text-align: center;
    padding: 40px;
    font-size: 0.875rem;
    color: #999;
}

.end-indicator {
    text-align: center;
    padding: 60px 20px;
    font-size: 0.875rem;
    color: #999;
    border-top: 1px solid var(--border-color);
    margin-top: 40px;
}

/* Hidden class for filtering */
.photo-item.hidden {
    display: none;
}

/* Contact page */
.contact-page {
    flex: 1;
    padding: 40px 20px;
    max-width: 800px;
}

.contact-content {
    line-height: 1.8;
}

.contact-content h1 {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 30px;
    color: var(--accent-color);
}

.contact-content p {
    margin-bottom: 20px;
}

.contact-content strong {
    font-weight: 500;
}

.contact-content ul {
    list-style: none;
    padding-left: 0;
}

.contact-content ul li {
    margin: 8px 0;
}

.contact-content a {
    color: var(--accent-color);
    text-decoration: none;
}

.contact-content a:hover {
    color: var(--hover-color);
}

/* Responsive Design */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 220px;
    }
    
    .container {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    :root {
        --sidebar-width: 180px;
        --header-height: 60px;
    }
    
    header h1 {
        font-size: 1.125rem;
    }
    
    .sidebar {
        padding: 30px 20px 30px 0;
    }
    
    main {
        padding: 30px 0;
    }
    
    .photo-grid {
        gap: 40px;
    }
}

@media (max-width: 640px) {
    :root {
        --header-height: 50px;
    }
    
    header {
        justify-content: space-between;
        padding: 0 20px;
    }
    
    header h1 {
        font-size: 1rem;
        padding: 0;
        max-width: none;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .container {
        flex-direction: column;
        padding: 0 20px;
    }
    
    .sidebar {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        width: 100%;
        height: calc(100vh - var(--header-height));
        padding: 30px 20px;
        background-color: var(--bg-color);
        border-bottom: 1px solid var(--border-color);
        z-index: 99;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: 2px 0 8px rgba(0,0,0,0.1);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    main {
        width: 100%;
        padding: 30px 0;
    }
    
    .photo-grid {
        gap: 30px;
    }
    
    .photo-item img {
        max-width: 100%;
    }
}

/* Mobile landscape orientation */
@media (max-width: 1024px) and (orientation: landscape) {
    .photo-item img {
        max-width: 100%;
        max-height: 75vh;
    }
    
    .photo-grid {
        gap: 40px;
    }
    
    main {
        padding: 30px 0;
    }
}
