@import url("https://cdn.metroui.org.ua/4.5.12/icons.css");

* {
    box-sizing: border-box;
}

:root {
    --app-gutter: clamp(26px, 4.5vw, 48px);
    --app-gap: clamp(24px, 4vw, 48px);
    --app-unit: clamp(32px, 5vw, 48px);
    --app-grid-gap: 4px;
    --app-blue: #087db3;
}

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
}

body {
    display: flex;
    flex-direction: column;
    /* color: #1d1d1d; */
    /* background: #f5f5f5; */
    color: #fff;
    /* background: #494949; */
    background: #292929;
    font-family: "Segoe UI", Tahoma, sans-serif;
}

body > header {
    flex: 0 0 auto;
    width: 100%;
    padding: var(--app-gutter) var(--app-gutter) 20px;
}

body > main {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    min-height: 0;
    height: 0;
    box-sizing: border-box;
    padding: 0 var(--app-gutter) var(--app-gutter);
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
}

body > main {
    scrollbar-width: none;
}

body > main::-webkit-scrollbar {
    width: 0;
}

body > main::-webkit-scrollbar:vertical {
    display: none;
}

body > footer {
    flex: 0 0 auto;
    width: 100%;
}

body > main::-webkit-scrollbar {
    height: 10px;
}

body > main::-webkit-scrollbar-thumb {
    background: #777;
}

.mobile-navigation {
    display: none;
}

@media (max-width: 700px) {
    html,
    body {
        background: #000;
    }

    body > main {
        padding: 0 0 70px;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
    }

    .mobile-navigation {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 100;
        display: flex;
        height: 58px;
        color: #fff;
        background: #000;
    }

    .mobile-navigation a {
        display: grid;
        width: 33.333%;
        height: 58px;
        place-items: center;
        color: #fff;
        text-decoration: none;
    }

    .mobile-navigation a:active {
        background: #222;
    }

    body > header .header-wrapper {
        padding: 0;
    }

    body > header h1 {
        font-size: 28px;
        font-weight: 300;
    }
}

.grid {
    display: flex;
    align-items: flex-start;
    gap: var(--app-gap);
    height: 100%;
    min-height: 0;
    width: max-content;
}

.category {
    display: grid;
    grid-template-columns: repeat(4, var(--app-unit));
    grid-auto-rows: calc(var(--app-unit) * 2 + var(--app-grid-gap));
    align-content: start;
    gap: var(--app-grid-gap);
    width: max-content;
    height: 100%;
    min-height: 0;
}

.category h2 {
    grid-column: 1 / -1;
    margin: 0 0 8px;
    color: #333;
    font-size: 20px;
    font-weight: 300;
}

.tile {
    position: relative;
    display: flex;
    min-width: 0;
    overflow: hidden;
    padding: 8px;
    color: #fff;
    background: #00a3ee;
    cursor: pointer;
    transition: transform 160ms ease, filter 160ms ease;
}

.tile:hover {
    filter: brightness(1.08);
    /* transform: translateY(-2px); */
}

.tile:active {
    transform: scale(.97);
}

.tile.wide {
    grid-column: span 4;
    grid-row: span 2;
}

.tile.large {
    grid-column: span 4;
    grid-row: span 4;
}

.tile .title {
    position: absolute;
    right: 10px;
    bottom: 10px;
    left: 10px;
    z-index: 2;
    margin: 0;
    font-size: 13px;
}

.tile-thumbnail {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tile-thumbnail::after {
    content: "";
}

.tile.has-thumbnail .title {
    padding-top: 40px;
    background: rgba(0, 0, 0, .58);
}

.project-meta {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    font-size: 11px;
}

@media (max-width: 700px) {
    body > header {
        padding: 28px 24px 16px;
    }

    body > main {
        padding: 0 24px 32px;
    }

    .grid {
        gap: 32px;
    }

    .category {
        grid-template-columns: repeat(4, var(--app-unit));
    }
}
