/* Google Font Import */
@import url('https://fonts.googleapis.com/css2?family=Courier+Prime&display=swap');

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

html, body {
    height: 100%;
}

html {
    font-size: 13px;
}

body {
    font-family: 'Courier Prime', 'Courier', monospace;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: 0.03em;
    color: #000;
    background-color: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: #000;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #888;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Container */
.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 35px 45px;
}

/* Header */
.site-header {
    margin-bottom: 30px;
}

.site-title {
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.05em;
}

.site-title a {
    color: #000;
}

.site-title a:hover {
    color: #000;
}

/* Main Wrapper */
.main-wrapper {
    display: flex;
    flex: 1;
    gap: 40px;
}

/* Sidebar Navigation */
.sidebar {
    width: 200px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.nav-list {
    margin-bottom: 0;
}

.nav-info {
    margin-top: 20px;
}

.nav-item {
    margin-bottom: 2px;
    letter-spacing: 0.03em;
}

.nav-item > a {
    display: inline-block;
}

.nav-item.active > a,
.nav-item.current > a {
    color: #aaa;
}

/* Sub Navigation */
.sub-nav {
    margin-left: 8px;
    margin-top: 2px;
    display: none;
}

.nav-item.has-children.expanded .sub-nav,
.nav-item.has-children.active .sub-nav {
    display: block;
}

.sub-nav li {
    margin-bottom: 2px;
}

.sub-nav li a {
    color: #000;
}

.sub-nav li a:hover {
    color: #888;
}

.sub-nav li.active a {
    color: #aaa;
}

/* Content Area */
.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Single Image Display */
.image-viewer {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.image-viewer img {
    max-height: 80vh;
    max-width: 90%;
    width: auto;
    height: auto;
    object-fit: contain;
    cursor: pointer;
    margin: 0 auto;
}

/* Hero Image (for homepage) */
.hero-image {
    max-width: 550px;
}

.hero-image img {
    width: 100%;
    height: auto;
}

/* Footer */
.site-footer {
    margin-top: auto;
    padding-top: 40px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.footer-nav {
    display: flex;
    gap: 8px;
}

.footer-nav a,
.footer-nav .nav-link {
    cursor: pointer;
    color: #000;
    text-decoration: none;
}

.footer-nav a:hover,
.footer-nav .nav-link:hover {
    color: #888;
}

.footer-nav .separator {
    color: #000;
}

.footer-controls {
    display: flex;
    gap: 20px;
    align-items: center;
}

.image-counter {
    color: #000;
}

.thumbnail-toggle {
    cursor: pointer;
    color: #000;
}

.thumbnail-toggle:hover {
    color: #888;
}

/* Thumbnails Grid (toggle view) */
.thumbnails-grid {
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    width: 100%;
}

.thumbnails-grid.active {
    display: grid;
}

.thumbnails-grid img {
    width: 100%;
    height: auto;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.thumbnails-grid img:hover {
    opacity: 0.7;
}

.image-viewer.hidden {
    display: none;
}

/* Info Page */
.info-content {
    max-width: 500px;
}

.info-content p {
    margin-bottom: 1.5em;
}

.info-content a {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 900px) {
    .main-wrapper {
        flex-direction: column;
        gap: 40px;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .image-viewer img {
        max-height: 50vh;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 30px 25px;
    }
    
    .image-viewer img {
        max-height: 40vh;
    }
    
    .thumbnails-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
