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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #1a1a1a;
    color: #fff;
    line-height: 1.6;
}

/* Fixed Left Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 200px;
    height: 100vh;
    background-color: #0a0a0a;
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 40px 30px;
}

/* Site Header in Sidebar */
.site-header {
    margin-bottom: 60px;
}

.site-title {
    font-size: 2rem;
    font-weight: bold;
    letter-spacing: 2px;
    line-height: 1.2;
    margin-bottom: 10px;
}

.site-tagline {
    font-size: 0.75rem;
    color: #888;
    letter-spacing: 1px;
}

/* Navigation */
.main-nav {
    flex-grow: 1;
}

.main-nav ul {
    list-style: none;
}

.main-nav li {
    margin-bottom: 20px;
}

.main-nav a {
    color: #999;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
    display: block;
}

.main-nav a:hover {
    color: #fff;
}

.main-nav a.active {
    color: #4ade80; /* Green accent for active link */
}

/* Sidebar Footer */
.sidebar-footer {
    margin-top: auto;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.social-links a {
    color: #666;
    text-decoration: none;
    font-size: 1.2rem;
    transition: color 0.3s;
}

.social-links a:hover {
    color: #fff;
}

.copyright {
    font-size: 0.7rem;
    color: #555;
}

/* Main Gallery Area */
.gallery-main {
    margin-left: 200px;
    min-height: 100vh;
    padding: 0;
}

/* Square Thumbnail Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(259px, 1fr));
    gap: 0;
    padding: 0;
}

.gallery-item {
    position: relative;
    width: 100%;
    padding-bottom: 100%; /* Creates 1:1 aspect ratio square */
    overflow: hidden;
    cursor: pointer;
    background-color: #2a2a2a;
}

.gallery-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Crops image to fill square */
    object-position: center;
    display: block;
    transition: transform 0.3s, filter 0.3s;
}

.gallery-item:hover img {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* Responsive Design */
@media (max-width: 1400px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
}

@media (max-width: 1024px) {
    .sidebar {
        width: 180px;
    }
    
    .gallery-main {
        margin-left: 180px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .sidebar {
        position: static;
        width: 100%;
        height: auto;
        padding: 20px;
    }
    
    .sidebar-content {
        padding: 20px;
    }
    
    .site-header {
        margin-bottom: 30px;
    }
    
    .main-nav ul {
        display: flex;
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .main-nav li {
        margin-bottom: 0;
    }
    
    .gallery-main {
        margin-left: 0;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .site-title {
        font-size: 1.5rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

/* Loading State for Images */
.gallery-item img[src=""] {
    background: #2a2a2a;
    min-height: 300px;
}
