body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #111;
    background: #fff;
}

.container {
    width: 100%;
}

/* Ensure header uses same max-width + padding as gallery */
.header-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 32px 0; /* padding inside wrapper */
    font-size: 26px;
}

.logo {
    font-size: 19px;
    opacity: 0.6;
}

.logo a {
    margin: 0;
    padding: 0;
}

.nav {
    font-size: 18px;
    opacity: 0.6;
}

.nav a {
    font-size: 18px;
    opacity: 0.6;
}

header a {
    text-decoration: none;
    color: #111;
    margin-left: 24px;
    opacity: 0.75;
}
header a:hover {
    opacity: 1;
}

/* Hero wrapper aligns exactly like header & gallery */
.hero-wrapper {
    max-width: 1200px;
    margin: 0 auto 80px auto;
    padding: 0 24px;
}

.hero-wrapper p {
    margin-bottom: 1rem;
}

.hero {
    max-width: 480px;
    margin: 110px 0 0 0; /* desktop spacing */
}

.hero h1 {
    font-size: 42px;
    line-height: 1.25;
    letter-spacing: -0.3px;
    font-weight: 300;
}

/* Gallery styling — unchanged */
#gallery {
    max-width: 1200px;
    margin: 60px auto 30px;
    padding: 0 24px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: auto;
    grid-gap: 28px;
}

#gallery img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 3px;
    display: block;
    box-shadow: 0 1px 6px rgba(0,0,0,0.04);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

#gallery img.loaded {
    opacity: 1;
    transform: translateY(0px);
}

#gallery img:hover {
    box-shadow: 0 4px 18px rgba(0,0,0,0.08);
}

#gallery img.landscape {
    grid-column: 1 / 3;
}

#gallery img.portrait {
    grid-column: span 1;
}

.footer {
    text-align: center;
    font-size: 0.85rem;
    color: #555;
    margin-top: 3rem;
    padding-bottom: 4rem;
    line-height: 1.6;
}

.footer-links {
    margin-top: 0.5rem;
}

.footer-links a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid currentColor;
    padding-bottom: 2px;
}

.footer-links a:hover {
    opacity: 0.7;
}

.footer-links span {
    margin: 0 6px;
    opacity: 0.6;
}

/* preview bar */
#previewBar {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 40px 0 20px 0;
    overflow-x: visible;
    box-sizing: border-box;
    padding: 0 16px;
}

/* hide scrollbars only when overflow-x applies (retain previous behaviour on desktop) */
#previewBar::-webkit-scrollbar { display: none; }
#previewBar { scrollbar-width: none; }

.preview-thumb {
    height: 80px;
    width: auto;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 3px;
    object-fit: cover;
    cursor: pointer;
    opacity: 0.75;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
}

/* Hover effect for devices that support it */
@media (hover: hover) and (pointer: fine) {
    .preview-thumb {
        transition: transform 0.2s ease, opacity 0.2s ease;
    }

    .preview-thumb:hover {
        transform: scale(1.07);
        opacity: 1;
    }
}

/* gallery pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    margin: 40px auto 20px auto;
    font-size: 0.9rem;
    letter-spacing: 0.5px;

    max-width: 1200px;  /* align with gallery */
    padding: 0 24px;    /* same left/right padding */
}

.paginationTop {
    margin-top: 60px;
    margin-bottom: 14px;
}

.paginationBottom {
    /*margin-top: 14px;
    margin-bottom: 60px;*/
    display: none !important;
}

.pagination button {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.pagination button:hover:not(:disabled) {
    opacity: 1;
}

.pagination button:disabled {
    opacity: 0.3;
    cursor: default;
}

#pageNumber {
    opacity: 0.45;
}

.pagination, #previewBar {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Mobile adjustments */
@media (max-width: 700px) {
    .logo {
        font-size: 14px;
    }

    .nav {
        font-size: 13px;
    }

    .nav a {
        font-size: 13px;
    }

    .hero {
        margin: 40px 0;
        text-align: center;
    }

    .hero h1 {
        font-size: 30px;
    }

    #previewBar {
        gap: 8px;
        padding: 0 12px;
    }
    .preview-thumb {
        height: 56px;
        max-width: 18%;
        object-fit: cover;
    }

    #gallery {
        grid-template-columns: 1fr;
    }
    #gallery img.landscape,
    #gallery img.portrait {
        grid-column: 1;
    }
}
