body {
    background-color: #1a1a1a; /* Dark Grey */
    color: #a0a0a0; /* Understated light grey */
    font-family: 'Inter', -apple-system, sans-serif;
    margin: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

header { padding: 2rem; }
h1 { color: #ffffff; font-weight: 300; margin: 0; }

.gallery-container {
    display: grid;
    grid-template-columns: 3fr 1fr;
    height: 100vh;      /* Use full viewport height */
    width: 100vw;
    overflow: hidden;   /* KEY: Prevents overflow spilling */
}

/* 2. Make the viewer a rigid box that holds the image */
.image-viewer {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;   /* KEY: Truncates anything larger than this box */
    background: #000;
}

/* 3. Force the image to shrink to fit the box without distorting */
.image-viewer img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* Keeps the whole image visible */
    display: block;      /* Removes extra bottom whitespace */
}
.controls {
    position: absolute;
    bottom: 20px;
    display: flex;
    gap: 10px;
}

.controls button {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid #444;
    padding: 10px 20px;
    cursor: pointer;
    backdrop-filter: blur(5px);
}

.controls button:hover { background: rgba(255, 255, 255, 0.2); }

/* Custom navigation overrides */
.prev, .next, .prev a, .next a {
    color: #000000 !important;
}

.image-viewer img {
    max-width: 100%;    /* Never wider than the 3fr column */
    max-height: 100%;   /* Never taller than the viewport */
    object-fit: contain; /* Keeps aspect ratio */
}
.exif-info {
    overflow-y: auto;    /* Allows scrolling only IF text is too long */
    border-left: 1px solid #333;
    background: #1a1a1a;
}
.exif-info ul { list-style: none; padding: 0; }
.exif-info li { margin-bottom: 1rem; font-size: 0.9rem; letter-spacing: 0.05em; }
.exif-info strong { color: #666; display: block; font-size: 0.7rem; text-transform: uppercase; }