/* style.css - Minimal Indexhibit Style */

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

body {
    background-color: #f7f7f7; /* Very subtle light gray */
    color: #333333;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 13px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

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

a:hover {
    opacity: 0.5;
}

/* Layout container */
#container {
    display: flex;
    min-height: 100vh;
    padding: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Menu Sidebar */
#menu {
    width: 200px;
    flex-shrink: 0;
    position: sticky;
    top: 40px;
    height: fit-content;
}

#menu h1 {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 30px;
}

#menu ul {
    list-style: none;
}

#menu li {
    margin-bottom: 8px;
}

.menu-category {
    margin-top: 20px;
    margin-bottom: 10px;
    font-weight: 500;
}

/* Main Content */
#content {
    flex-grow: 1;
    padding-left: 40px;
}

/* Project Images Stack */
.view-toggle {
    font-size: 11px;
    margin-bottom: 40px;
    letter-spacing: 0.5px;
}

.view-toggle a {
    cursor: pointer;
    color: #999;
    padding-bottom: 2px;
    margin-right: 8px;
}

.view-toggle a:hover {
    color: #333;
}

.view-toggle a.active {
    color: #333;
    pointer-events: none;
    border-bottom: 1px solid #333;
}

.project-images {
    display: block; /* Removed flex column and width constraints */
    margin-bottom: 20px;
}

.project-images img {
    max-width: 100%;
    max-height: 90vh; /* Keeps it within screen height */
    width: auto;
    height: auto;
    display: block;
    margin-bottom: 20px;
}

#image-gallery img {
    display: none; /* Hide all images by default in slide mode */
}

#image-gallery img.slide-active {
    display: block; /* Show only the active slide */
}

/* Slide Navigation */
.slide-nav {
    display: flex;
    gap: 15px;
    font-size: 11px;
    color: #999;
    letter-spacing: 0.5px;
}

.slide-nav span {
    cursor: pointer;
    transition: color 0.2s;
}

.slide-nav span:hover {
    color: #333;
}

/* Overview Layout - using robust CSS Grid for Safari */
.project-images.overview-active {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.project-images.overview-active img {
    max-width: 100%;
    height: auto;
    display: block; /* Force show all images in overview */
    cursor: pointer; /* Give affordance that it opens lightbox */
    transition: opacity 0.3s;
}

/* Minimal Text Formatting */
.text-block {
    max-width: 600px;
}

.text-block p {
    margin-bottom: 1em;
}

/* Works List */
.works-list {
    list-style: none;
}
.works-list li {
    margin-bottom: 10px;
}
.works-list a {
    display: inline-block;
    border-bottom: 1px solid transparent;
}
.works-list a:hover {
    border-bottom: 1px solid #333;
    opacity: 1;
}

/* Lightbox Modal */
#lightbox {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 9999;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(20, 20, 20, 0.95); /* Deep semi-transparent grey */
    align-items: center;
    justify-content: center;
}

#lightbox.active {
    display: flex; /* Activate flex container */
    animation: fadeIn 0.2s ease;
}

#lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    box-shadow: 0 4px 30px rgba(0,0,0,0.5);
    user-select: none;
    cursor: default;
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: #aaa;
    font-size: 24px;
    cursor: pointer;
    transition: color 0.2s;
    user-select: none;
}

.lightbox-close:hover {
    color: #fff;
}

/* Navigation Arrows */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    font-size: 30px;
    padding: 20px;
    cursor: pointer;
    transition: color 0.2s;
    user-select: none;
}

.lightbox-nav:hover {
    color: #fff;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive (Mobile) */
@media (max-width: 768px) {
    #container {
        flex-direction: column;
        padding: 20px;
    }
    #menu {
        width: 100%;
        position: static;
        margin-bottom: 40px;
    }
    #content {
        padding-left: 0;
    }
    .lightbox-nav {
        font-size: 20px;
        padding: 10px;
    }
}
