:root {
    --primary-bg-color: #0a0a0a;
    --secondary-bg-color: #161616;
}

/* Global Styles */
body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: Arial, sans-serif;
    background-color: var(--primary-bg-color);
    color: var(--secondary-bg-color);
}

/* Layout */
.container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    box-sizing: border-box;
    background-color: var(--primary-bg-color);
}

.content {
    display: flex;
    flex-direction: column;
    align-items: center;
    //text-align: center;
    max-width: 1600px;
    width: 100%;
}

/* Typography */
h1 {
    font-size: 2.5rem;
    margin: 0 0 10px 0;
    color: #888;
}
h2 {
    font-size: 2rem;
    margin: 0 0 10px 0;
    color: #888;
}
h3 {
    font-size: 1.5rem;
    margin: 0 0 10px 0;
    color: #888;
}
h4 {
    font-size: 1.25rem;
    margin: 0 0 10px 0;
    color: #888;
}
p {
    font-size: 1rem;
    color: #888;
}
span {
    color: #888;
}


/* Logo */
.fade-img {
    position: relative;
    width: 100%;
    max-width: 400px;
    height: auto;
    // overlap with opacity gradient
    margin-bottom: -100px;
    display: inline-block;
}
.fade-img img {
    display: block;
    width: 100%;
    height: auto;
}

.fade-img::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    background: linear-gradient(
        to bottom, 
        rgb(from var(--primary-bg-color) r g b / 0%) 0%,
        rgb(from var(--primary-bg-color) r g b / 100%) 60%,
        rgb(from var(--primary-bg-color) r g b / 100%) 100%
    );
    height: 60%;
    pointer-events: none;
    z-index: 1;
}

.home-h1 {
    font-family: 'ITC Bookman', 'Bold', serif;
    position: relative;
    z-index: 2;
    margin: -30px 0 0 0;
    background-color: transparent; 
    color: lightgray; 
    font-size: 6rem; 
    margin-bottom: 10px; /* Maintain the original h1 bottom margin */
    width: 100%;
    max-width: 600px;
    text-align: center;
}

.subtitle {
    font-size: 1rem;
    padding: 0px; 
    margin: 0px;
    text-align: center;
}
/* Stats */
.stats {
    font-size: 0.7rem;
}

.dot {
    margin: 0 5px;
}
/* Header and Search Bar */
#site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000; // Make sure it's on top of everything
}

#site-header.home {
    position: static;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

#site-header.show {
    transform: translateY(0);
    transition: transform 0.5s ease-in-out; 
}
#site-header.hidden {
    transform: translateY(-100%);
    transition: transform 0.5s ease-in-out; 
}

.search-container {
    display: flex;
    justify-content: center;
    position: relative;
    padding: 20px 0 10px 0;
    text-align: center;
}

#site-header:not(.home) .search-container {
    max-width: 600px;
    margin: 0 auto;
}

.search-input {
    display: block;
    width: 300px;
    padding: 10px;
    font-size: 1rem;
    background-color: var(--primary-bg-color);
    border-radius: 50px;
    border: 1px solid var(--secondary-bg-color);
    color: lightgray;
}

.search-input:focus {
    outline: none;
    box-shadow: 0 0 5px 3px rgb(187, 187, 187);
    caret-color: var(--secondary-bg-color);
}

.search-input:focus::placeholder {
    color: transparent;
}

.search-shortcut {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    color: #555;
}

/* Adjust container padding to account for fixed header */
.container {
    padding-top: 75px; 
}

.container.home {
    padding-top: 20px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}


/* Frame view */
.frame-div {
    margin-bottom: 20px;
    text-align: center;
}

.frame-div img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}
/* Masonry Grid */
.masonry-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    margin: 0 auto;
}

.masonry-item {
    width: calc(25% - 10px);
    margin: 5px;
    box-sizing: border-box;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.05, .45, .25, .95);
}

.masonry-item .aspect-ratio-box {
    position: relative;
    height: 0;
    padding-top: 100%;
    overflow: hidden;
    background-color: var(--secondary-bg-color); // its nice to see the masonry grid before images load
}

.masonry-item img {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    width: 100%;
    height: 100%; 
    object-fit: cover;
    border-radius: 5px;
    opacity: 0;
    filter: blur(9px);
}

/* Show images when loaded */
.masonry-item img.loaded {

    opacity: 1;
    // seems smoother without opacity transition
    // transition: opacity 1s cubic-bezier(0.05, .45, .25, .95);
    filter: blur(0);
    transition: filter 1s cubic-bezier(0.05, .45, .25, .95);

}

/* Hover effect on the container and image*/
.masonry-item:hover {
    transform: scale(1.03);
}


/* Responsive adjustments */
@media (max-width: 1400px) {
    .masonry-item {
        width: calc(33.333% - 10px);
    }
}

@media (max-width: 900px) {
    .masonry-item {
        width: calc(50% - 10px);
    }
    .home-h1 {
        font-size: 5rem;
    }
}

@media (max-width: 600px) {
    .masonry-item {
        width: calc(100% - 10px);
    }
    .search-input {
        width: 100%;
        max-width: 300px;
    }
    .home-h1 {
        font-size: 4rem;
    }
}

@media (max-width: 400px) {
    .home-h1 {
        font-size: 3rem;
    }
}
