@font-face {
    font-family: Spartan MB;
    font-weight: 600;
    src: url(/assets/spartan-mb.semibold.otf);
}

@font-face {
    font-family: Spartan MB;
    font-weight: 300;
    src: url(/assets/spartan-mb.light.otf);
}

@font-face {
    font-family: Spartan MB;
    font-weight: 100;
    src: url(/assets/spartan-mb.thin.otf);
}

@font-face {
    font-family: Areal;
    src: url(/assets/ABCArealVariable.ttf);
}

:root {
    font-size: 20px;
    --red: #f44941;
    color: var(--red);
    background-color: #fff;
    font-family: Areal, sans-serif;
    --nav-font-size: 25px;
    --nav-inset-vertical: 20px;
    --nav-inset-horizontal: 30px;
    --side-margin: 85px;
}

a {
    color: var(--red);
}

body {
    margin: 0;
}

#smooth-content {
    padding-bottom: calc(var(--nav-font-size) + 2*var(--nav-inset-vertical));
}

#hero {
    font-family: Spartan MB, sans-serif;
    width: 100%;
    height: 100vh;
    display: grid;
    align-items: center;
    justify-content: center;
    user-select: none;
    /*background: url(/projects/2024-namesti-snp/0000.jpg) center/cover;*/
}

#brand {
    font-size: 30px;
    font-weight: 600;
}

#logo-wrapper {
    margin: 0 3.75em;
}

#logo-wrapper, #brand > span {
    opacity: 0;
}

nav {
    position: fixed;
    font-family: Spartan MB;
    font-size: var(--nav-font-size);
    padding: var(--nav-inset-vertical) var(--nav-inset-horizontal);
    inset: 0 0;
    height: 1cap;
    display: flex;
    justify-content: space-between;
    white-space: nowrap;
    font-weight: 600;
}

nav svg.logo {
    height: 1cap;
    display: block;
}

.nav-buttons {
    display: flex;
    gap: 1em;
    align-items: center;
}

nav > div > a {
    transition: color 0.25s;
    height: fit-content;
}

nav > div > a:hover {
    color: var(--red);
}

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

nav a:focus {
    outline: none;
}

.nav-title {
    position: absolute;
    left: 85px;
}

.nav-spacer {
    width: 100%;
    font-size: var(--nav-font-size);
    font-family: Spartan MB;
    height: calc(1cap + 2 * var(--nav-inset-vertical));
}

main {
    margin: 0 var(--side-margin);
}

/* images are wrapped in <picture> by eleventy-img; block kills the inline baseline gap */
picture {
    display: block;
}

/* eleventy-img emits width/height attributes. Those map to CSS as presentational
   hints, so any image sized by a CSS `width` alone would also take the pixel
   height and stretch. `height: auto` restores the intrinsic ratio while the
   attributes still give the browser an aspect ratio to reserve space with. */
img {
    height: auto;
}

#highlights {
    display: grid;
    grid-template-columns: repeat(11, 1fr);
    grid-template-rows: repeat(var(--rows), 0) auto;
    gap: 8vw 4vw;
}

#highlights > div {
    align-self: start;
}

/* project galleries: every row sizes to its photos, so nothing overlaps */
#highlights.gallery {
    grid-template-rows: none;
    grid-auto-rows: auto;
    gap: 6vw 4vw;
}

#highlights figure {
    --perspective: 1600px;
    display: flex;
    flex-flow: column;
    margin: 0;
    transition: transform 0.25s;
    transform-origin: 50% 10%;
    transform: perspective(var(--perspective));
}

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

#highlights a:focus {
    outline: none;
}

#highlights figcaption {
    display: flex;
    justify-content: space-between;
}

#highlights .cover-wrapper {
    overflow: hidden;
    margin-bottom: .5em;
}

#highlights .cover {
    display: block;
    min-height: 0;
    width: auto;
    height: auto;
    max-width: 100%;
    transition: filter 0.3s, transform 0.3s ease;
}

#highlights .back {
    position: absolute;
    inset: 0;
    background-color: #fff;
    z-index: -1;
    transition: z-index 0.25s;
}

/*
#highlights > div:nth-child(even) > figure:hover {
    transform: perspective(var(--perspective)) rotateY(180deg);
}

#highlights > div:nth-child(even) > figure:hover .back {
    z-index: 1;
}

#highlights > div:nth-child(odd) > figure:hover {
    transform: perspective(var(--perspective)) rotateY(-180deg);
}

#highlights > div:nth-child(odd) > figure:hover .back {
    z-index: 1;
}*/

/*#highlights figure:hover .cover {
    transform: scale(1.1);
}

#highlights:has(figure:hover) figure:not(:hover) .cover {
    filter: brightness(1.2) contrast(3) grayscale(1);
}*/

footer {
    padding: 25px 0;
}

footer .table {
    display: grid;
    margin-bottom: 10px;
    grid-template-columns: repeat(4, 1fr);
    gap: 2em;
}

footer .table > div {
    display: flex;
    flex-direction: column;
}

footer .table > span {
    text-align: right;
    font-style: italic;
}

footer a {
    color: inherit;
}

footer > div.m {
    user-select: none;
    font-weight: 600;
    font-size: 30px;
    text-align: center;
    width: 100%;
}

#contact .map {
    position: absolute;
    right: 0;
    top: 0;
}

#contact .map img {
    width: 13em;
}

#group-photo {
    width: 100%;
}

article {
    width: 60em;
    margin: 0 auto;
}

#project-grid {
    display: grid;
    grid-template: auto / repeat(4, 1fr);
    gap: calc(var(--side-margin) - 1em - 10px) var(--side-margin);
}

#project-grid > .project {
    display: block;
    text-overflow: ellipsis;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
}

#project-grid > .project > .wrapper {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

#project-grid > .project img {
    width: 100%;
    transform: scale(1);
}

/* .project's display: block would otherwise override [hidden] */
#project-grid > .project[hidden] {
    display: none;
}

#project-filter button {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    transition: color 0.25s;
}

#project-filter button[aria-pressed="true"] {
    text-decoration: underline;
}

#project-grid > .project span {
    white-space: nowrap;
}

#project-grid .h {
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
}

.team-grid {
    display: grid;
    grid-template: auto / repeat(6, 1fr);
    gap: 10px;
}

.team-grid img {
    width: 100%;
}

.ggg {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: var(--side-margin);
}

.ggg :first-child {
    grid-column: 1;
}

.ggg p {
    margin-top: 0;
}

.ggg :not(:first-child) {
    grid-column: 2;
}

#project .meta .timeline {
    margin: 0;
    padding: 0;
    list-style: none;
}

#project .meta .credits {
    margin: 0;
}

/* label and value share a line and wrap as one run, the way the hard-broken
   markdown paragraph used to */
#project .meta dt {
    display: inline;
    font-weight: bold;
}

#project .meta dt::after {
    content: ":";
}

#project .meta dd {
    display: inline;
    margin: 0;
}

#project .meta dd::after {
    content: "";
    display: block;
}

#zoom {
    z-index: 1;
    opacity: 0;
    visibility: hidden;
    transition: 0.5s opacity, 0.5s visibility;
    color: #fff;
}

#zoom > .bg {
    position: fixed;
    background-color: #000000a0;
    inset: 0;
    width: 100vw;
    height: 100vh;
}

#zoom > .zoom-img-wrapper {
    position: fixed;
    top: 50vh;
    left: 50vw;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
}

#zoom > .zoom-img-wrapper > div {
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
}

#zoom #zoom-img {
    max-width: 70vw;
    max-height: 70vh;
}

#zoom button {
    position: fixed;
    font-weight: 900;
    top: 50vh;
    transform: translateY(-50%);
    background-color: transparent;
    font-size: 70px;
    padding: 20px;
    border: none;
    cursor: pointer;
    color: inherit;
}

#zoom .prev {
    left: 80px;
}

#zoom .next {
    right: 80px;
}

.mobile-hide {
    display: inline;
}

.employee {
    width: 10em;
}

@media (max-width: 991px) {
    :root {
        --side-margin: var(--nav-inset-horizontal);
    }

    #project-grid {
        grid-template-columns: 1fr 1fr;
    }

    #highlights {
        display: flex;
        flex-direction: column;
    }

    #about .ggg {
        grid-template-columns: auto;
    }

    #about .ggg :first-child {
        grid-column: 1;
    }

    .mobile-hide {
        display: none;
    }
}
