@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Inter", sans-serif;
    outline: none;
}

:root {
    --color-primary: 72, 90, 130;
    --color-secondary: 183, 165, 125;
    --color-background: 255, 255, 255;
    --color-background-diff: 240, 240, 240;
    --color-text: 40, 40, 40;
    --color-border: 220, 220, 220;
}

body {
    background-color: rgb(var(--color-background));
    width: 100vw;
    height: max-content;
    overflow-x: hidden;
}

section {
    width: 100%;
    height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: "Montserrat", sans-serif;
}

span.brand {
    color: rgb(var(--color-primary)) !important;
}

.navbar {
    position: fixed;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0 4rem;
    background-color: rgb(var(--color-background));
    border-bottom: 1px solid rgb(var(--color-border));
    width: 100%;
    height: 80px;
    z-index: 9999;
}

.navbar > .navbar-right {
    flex: 1;
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    align-items: center;
}

.navbar > .navbar-right > a {
    color: rgb(var(--color-text));
    text-decoration: none;
}

.navbar > .navbar-right > a::after {
    content: "";
    display: block;
    position: relative;
    bottom: -1px;
    background-color: rgb(var(--color-primary));
    height: 1px;
    width: 100%;
    transform-origin: left center;
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

.navbar > .navbar-right > a:focus::after, .navbar > .navbar-right > a:hover::after {
    transform: scaleX(1);
}

.navbar > .navbar-right > a:not(:hover):not(:focus)::after {
    transform: scaleX(0);
    transform-origin: right center;
}

.navbar > .logo-container {
    flex: 1;
    display: flex;
    height: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
}

.navbar > .logo-container > h1 {
    font-size: 1.6em;
    color: rgb(var(--color-primary));
}

.banner {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
}

.banner > .module {
    flex: 1;
    height: 100%;
}

.banner > .left {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 5rem;
    flex: 2;
    border-right: 1px solid rgb(var(--color-border));
}

.banner > .right {
    flex: 3;
    background-color: rgb(var(--color-background-diff));
    overflow: auto;
}

.banner .search-container {
    font-size: 1.4em;
    margin-top: 0.8em;
    width: 100%;
    height: 2em;
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 0.4em;
}

.banner .search-container input {
    padding: 0 1.2em;
    align-items: center;
    height: 100%;
    flex: 1;
    border-radius: 5em;
    transition: 0.2s ease;
}

.banner .search-field {
    min-width: 80%;
    background-color: rgb(var(--color-background-diff));
    border: 1px solid rgb(var(--color-border));
    outline: none;
}

.banner .search-field:hover {
    min-width: 81%;
}

.banner .search-field:focus, .banner:has(.tag:focus) .search-field {
    border: 1px solid rgb(180, 180, 180);
    min-width: 82%;
}

.banner .search-submit:hover ~ .search-field, .banner .search-submit:focus ~ .search-field {
    min-width: 79%;
}

.banner .search-submit {
    background-color: rgb(var(--color-primary));
    color: rgb(var(--color-background));
    border: 1px solid rgb(var(--color-primary));
    cursor: pointer;
}

.banner .search-submit:focus {
    border: 1px solid rgb(var(--color-border));
}

.tag-cluster {
    padding: 1em 0.2em;
    width: 100%;
    display: flex;
    flex-flow: row wrap;
    gap: 0.4em;
}

.tag {
    font-size: 0.8em;
    border-radius: 5em;
    padding: 0.5em 0.8em;
    background-color: rgb(var(--color-background-diff));
    border: 1px solid rgb(var(--color-background-diff));
    color: rgb(100, 100, 100);
    cursor: pointer;
}

.tag::before {
    content: "#";
}

.tag:hover, .tag:focus {
    color: rgb(var(--color-text));
    border: 1px solid rgb(var(--color-border));
}

.grid {
    height: auto;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    padding: 0.4em;
    gap: 0.4em;
    grid-auto-flow: dense;
    will-change: transform;
    position: relative;
}

.cell {
    border-radius: 10px;
    aspect-ratio: 1 / 1;
    background: rgb(var(--color-background));
    border: 1px solid rgb(var(--color-border));
    transition: border 0.2s ease, transform 0.2s ease;
    display: flex;
    flex-direction: column;
}

.cell > * {
    flex: 1;
}

.cell .image {
    background: rgb(var(--color-background-diff));
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: background-size 0.2s ease;
    border-radius: 10px;
    cursor: pointer;
}

.cell.large .image {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.cell .content {
    padding: 1.2em;
}

.cell:hover {
    transform: scale(1.01, 1.01);
    border: 1px solid rgb(200, 200, 200);
}

.cell.large-2 {
    grid-column: span 2;
    grid-row: span 2;
}

.cell.large-3 {
    grid-column: span 3;
    grid-row: span 3;
}

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

footer {
    height: 40vh;
    width: 100%;
    background-color: rgb(60, 60, 60);
    color: rgb(var(--color-background));
    padding: 2.4em;
}

@media screen and (max-width: 600px) {
    .banner > .right {
        flex: 0;
    }
}