/* =========================================
   JOBTKIN PHOTOGRAPHY
   ========================================= */

:root {
    --background: #0a0a0a;
    --text: #ffffff;
    --gap: 5px;
}

/* =========================================
   RESET
   ========================================= */

* {
    box-sizing: border-box;
}

html {
    background: var(--background);
}

body {
    margin: 0;
    padding: 0;

    background: var(--background);
    color: var(--text);

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;
}

/* =========================================
   HEADER
   ========================================= */

.site-header {
    position: fixed;

    top: 0;
    left: 0;

    width: 100%;

    z-index: 10;

    padding: 22px 28px;

    pointer-events: none;
}

.logo {
    display: inline-block;

    color: #ffffff;

    font-size: 18px;
    font-weight: 600;

    letter-spacing: -0.02em;

    text-decoration: none;

    pointer-events: auto;

    text-shadow:
        0 1px 4px rgba(0, 0, 0, 0.5);
}

/* =========================================
   PHOTO GRID
   ========================================= */

.gallery {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: var(--gap);

    width: 100%;

    padding-top: 0;
}

/* =========================================
   PHOTO
   ========================================= */

.photo {
    position: relative;

    display: block;

    width: 100%;

    padding: 0;
    margin: 0;

    border: 0;

    background: transparent;

    cursor: pointer;

    overflow: hidden;

    aspect-ratio: 4 / 3;
}

.photo img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    transition:
        transform 0.5s ease,
        opacity 0.3s ease;
}

/* Subtle hover effect */

.photo:hover img {
    transform: scale(1.025);
}

/* Keyboard focus */

.photo:focus-visible {
    outline: 2px solid white;
    outline-offset: -2px;
}

/* =========================================
   LIGHTBOX
   ========================================= */

.lightbox {
    position: fixed;

    inset: 0;

    z-index: 100;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 60px;

    background: rgba(0, 0, 0, 0.96);

    opacity: 0;

    visibility: hidden;

    transition:
        opacity 0.25s ease,
        visibility 0.25s ease;
}

.lightbox.active {
    opacity: 1;

    visibility: visible;
}

/* =========================================
   LIGHTBOX IMAGE
   ========================================= */

.lightbox-image {
    display: block;

    max-width: calc(100vw - 140px);
    max-height: calc(100vh - 120px);

    width: auto;
    height: auto;

    object-fit: contain;

    user-select: none;

    -webkit-user-drag: none;
}

/* =========================================
   LIGHTBOX BUTTONS
   ========================================= */

.close-button,
.previous-button,
.next-button {
    position: fixed;

    z-index: 110;

    border: 0;

    background: transparent;

    color: white;

    cursor: pointer;

    font-family: inherit;

    line-height: 1;

    opacity: 0.75;

    transition: opacity 0.2s ease;
}

.close-button:hover,
.previous-button:hover,
.next-button:hover {
    opacity: 1;
}

.close-button:focus-visible,
.previous-button:focus-visible,
.next-button:focus-visible {
    outline: 2px solid white;
    outline-offset: 4px;
}

/* Close */

.close-button {
    top: 18px;
    right: 25px;

    font-size: 42px;

    font-weight: 200;
}

/* Previous */

.previous-button {
    left: 20px;
    top: 50%;

    transform: translateY(-50%);

    font-size: 64px;

    font-weight: 200;
}

/* Next */

.next-button {
    right: 20px;
    top: 50%;

    transform: translateY(-50%);

    font-size: 64px;

    font-weight: 200;
}

/* =========================================
   MOBILE
   ========================================= */

@media (max-width: 800px) {

    .site-header {
        padding: 16px 18px;
    }

    .logo {
        font-size: 16px;
    }

    .gallery {
        grid-template-columns: repeat(2, 1fr);

        gap: 3px;
    }

    .photo {
        aspect-ratio: 1 / 1;
    }

    .lightbox {
        padding: 35px 15px;
    }

    .lightbox-image {
        max-width: calc(100vw - 30px);
        max-height: calc(100vh - 70px);
    }

    .previous-button,
    .next-button {
        display: none;
    }

    .close-button {
        top: 8px;
        right: 15px;

        font-size: 36px;
    }
}

/* =========================================
   REDUCE MOTION
   ========================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }

}

