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

html, body {
    background: #ffffff;
    color: #2b2b2b;
    font-family: 'Patrick Hand', 'Patrick Hand SC', 'Comic Sans MS', cursive, sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    zoom: 0.8;
}

/* header and nav */
header.site-header {
    background: #ffffff;
    border-bottom: 1px solid #e6e6e6;
    padding: 14px 40px 10px;
    position: sticky;
    top: 0;
    z-index: 100;
}

nav.site-nav{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;            /* min-spacing if a screen is ever too narrow */
    width: 100%;
    max-width: 1100px;    /* cap how wide the nav can stretch */
    margin: 0 auto;
}

/* nav-link wraps image and text label.
The image is the label and the text label is kept for screen readers */

.nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: transparent;
    font-size: 0;
    line-height: 0;
    cursor: pointer;
    transition: transform 0.18s ease, filter 0.18s ease;
}

.nav-link img {
    height: 70px;
    width: auto;
    display: block;
    /* make space between JPGs, lots of whitespace around the text already so that's why */
}

.nav-link:hover { transform: translateY(-2px); }
.nav-link:hover img { filter: brightness(0.9) saturate(1.15); }
.nav-link.active img { filter: brightness(0.85) saturate(1.2); }

.nav-logo, .nav-head {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
}

.nav-logo img {
    height: 100px;
    width: auto;
    display: block;
}

.nav-head img {
    height: 60px;
    width: auto;
    display: block;
    transition: transform 0.18s ease;
}

.nav-head:hover img { transform: scale(1.05); }
/* layout */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 36px 24px 80px;
}

.page { animation: fadeIn 0.25s ease; }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: none; }
}
/* section title image */
.section-title {
    display: flex;
    justify-content: center;
    margin-bottom: 28px;
}

.section-title img {
    max-width: 420px;
    width: 60%;
    height: auto;
    display: block;
}
/* the actual grid */
.gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    align-items: start;
}

.gallery.two-col {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
    max-width: 1000px;
    margin: 0 auto;
}

.tile {
    width: 100%;
    overflow: hidden;
    background: #fff;
    cursor: zoom-in;
}

.tile img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.tile:hover img {
    transform: scale(1.01);
    box-shadow: 0 6px 22px rgba(0,0,0,0.08);
}
/* lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    cursor: zoom-out;
    padding: 24px;
}
.lightbox.open { display: flex; }
.lightbox img {
    max-width: 92vw;
    max-height: 92vh;
    width: auto;
    height: auto;
    display: block;
    border: 4px solid #fff;
}
/* responsive part */
@media (max-width: 1000px) {
    nav.site-nav { gap: 24px; flex-wrap: wrap; }
    .nav-link img { height: 52px; }
    .nav-logo img { height: 78px; }
    .nav-head img { height: 48px; }
    .gallery { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .gallery.two-col { grid-template-columns: 1fr; }
}

@media (max-width: 540px) {
    header.site-header { padding: 10px 12px 8px; }
    nav.site-nav {gap: 14px; }
    .nav-link img { height: 40px; }
    .nav-logo img { height: 60px; }
    .nav-head img { height: 38px; }
    .gallery { grid-template-columns: 1fr; }
}
