* {
    box-sizing: border-box;
}

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

a {
    color: inherit;
    text-decoration: none;
}


/* header */

.site-header {
    background: #fff;
    border-bottom: 1px solid #eee;
}

.header-inner {
    max-width: 1400px;
    height: 64px;
    margin: auto;
    padding: 0 20px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 20px;
    font-weight: 700;
}

nav {
    display: flex;
    gap: 25px;
}


/* hero */

.hero {
    padding: 70px 20px;
    text-align: center;
    background: #fff;
}

.hero h1 {
    margin: 0 0 25px;
    font-size: 32px;
}


/* search */

.search-form {
    max-width: 650px;
    margin: auto;

    display: flex;

    border: 2px solid #222;
    border-radius: 8px;

    overflow: hidden;
}

.search-form input {
    flex: 1;
    min-width: 0;

    padding: 16px;

    font-size: 16px;

    border: 0;
    outline: none;
}

.search-form button {
    width: 100px;

    border: 0;

    background: #222;
    color: #fff;

    cursor: pointer;
}


/* tags */

.popular-tags {
    margin-top: 20px;
    font-size: 14px;
}

.popular-tags a {
    margin-right: 12px;
}


/* content */

.content {
    max-width: 1400px;
    margin: auto;
    padding: 40px 20px;
}

.section-title {
    margin-bottom: 20px;
}


/* image grid */

.image-grid {
    display: grid;

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

    gap: 8px;
}

.image-card {
    position: relative;

    aspect-ratio: 1 / 1;

    overflow: hidden;

    background: #eee;
}

.image-card img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    transition:
        transform .2s ease;
}

.image-card:hover img {
    transform: scale(1.04);
}


/* detail */

.image-detail {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
}

.detail-image {
    text-align: center;
}

.detail-image img {
    max-width: 100%;
    max-height: 85vh;
}

.image-info {
    margin-top: 20px;
}


/* footer */

.site-footer {
    margin-top: 50px;
    padding: 30px;

    text-align: center;

    color: #888;

    border-top: 1px solid #eee;
}


/* tablet */

@media(max-width:1000px) {

    .image-grid {
        grid-template-columns:
            repeat(4, 1fr);
    }

}


/* smartphone */

@media(max-width:600px) {

    .header-inner {
        height: 55px;
    }

    nav {
        gap: 12px;
        font-size: 13px;
    }

    .hero {
        padding: 45px 15px;
    }

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

    .content {
        padding:
            25px 8px;
    }

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

        gap: 3px;
    }

}
/* ========================================
   Detail information
======================================== */

.image-info {
    max-width: 850px;
    margin: 25px auto 0;
}

.image-info h1 {
    font-size: 22px;
    margin-bottom: 25px;
}

.detail-category,
.detail-tags {
    margin-bottom: 18px;
}

.meta-label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #888;
}

.category-link {
    display: inline-block;
    padding: 7px 13px;
    background: #222;
    color: #fff;
    border-radius: 5px;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.tag-link {
    display: inline-block;
    padding: 7px 11px;
    background: #eee;
    border-radius: 5px;
    font-size: 14px;
}

.tag-link:hover {
    background: #ddd;
}

.image-meta {
    margin-top: 20px;
    color: #888;
    font-size: 14px;
}


/* ========================================
   Related
======================================== */

.related-section {
    margin-top: 60px;
}

.related-section h2 {
    margin-bottom: 20px;
}


/* ========================================
   Archive
======================================== */

.archive-header {
    margin-bottom: 30px;
}

.archive-header h1 {
    margin-bottom: 5px;
}

.archive-header p {
    margin: 0;
    color: #888;
}


/* ========================================
   Pagination
======================================== */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;

    margin-top: 40px;
}

.pagination a {
    padding: 10px 18px;
    background: #222;
    color: #fff;
    border-radius: 5px;
}