@font-face {
    font-family: 'Tiempos';
    src: url('../type/tiempos-text-web-regular.woff2') format('woff2');
}
:root {
    --background-color: 255, 255, 255;
    --foreground-color: 15, 10, 10;
    --block-background-color: #e0e0e0;
    --button-background-color: #fff;
    --border-radius: 0.25rem;
    --link-color: #0070f3;
    --media-border-color: rgba(0, 0, 0, .15);
}
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1;
}


body {
    margin: 1rem;
    background-color: rgba(var(--background-color), 1);
    color: rgba(var(--foreground-color), 1);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background-color: var(--block-background-color);
    border-radius: var(--border-radius);
}
nav ul {
    list-style: none;
    display: flex;
    gap: 0.5rem;
}
nav a, h2 {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    text-decoration: none;
    color: inherit;
    padding: 0.35rem 0.85rem 0.35rem 0.5rem;
    border-radius: var(--border-radius);
    transition: background-color 0.2s ease;
}

nav a.current {
    background-color: rgba(var(--background-color), 0.8);
    box-shadow: 0.125rem 0.125rem 0.25rem rgba(var(--foreground-color), 0.08);
}
nav a:hover {
    background-color: rgba(var(--background-color), 1);
    box-shadow: 0.125rem 0.125rem 0.25rem rgba(var(--foreground-color), 0.1);
}
nav a::before, h2::before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 24px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}
h2.no-icon::before {
    display: none;
}
.nav-left li:nth-child(1) a::before {
    background-image: url('../icons/featured.svg');
}
.nav-left li:nth-child(2) a::before {
    background-image: url('../icons/information.svg');
}
.nav-right li:nth-child(1) a::before {
    background-image: url('../icons/nonlinear.svg');
}
.nav-right li:nth-child(2) a::before {
    background-image: url('../icons/particular.svg');
}
.nav-right li:nth-child(3) a::before {
    background-image: url('../icons/active-matrix.svg');
}

header {
    display: block;
    text-align: center;
    border-radius: var(--border-radius);
    background-color: rgba(var(--foreground-color), 1);
    color: rgba(255, 255, 255, 1);
    padding: 8.5vw 2rem; /*8rem 2rem*/
    position: relative;
    overflow: hidden;
}
header a {
    color: inherit;
    text-decoration: none;
}
#stage {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}
#stage canvas {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
header h1 {
    position: relative;
    z-index: 1;
    font-size: 2.85vw; /*2rem*/
    line-height: 1.25;
    font-weight: 400;
    font-family: 'Tiempos', serif;
    filter: drop-shadow(0 0 2rem var(--foreground-color));
}

.section-break {
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}
h2.featured::before {
    background-image: url('../icons/featured.svg');
}
h2.information::before {
    background-image: url('../icons/information.svg');
}
h2.peace::before {
    background-image: url('../icons/peace.svg');
}

main {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
section a.block, section div.block {
    padding: 2rem;
    padding-top: 3rem;
    background-color: var(--block-background-color);
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: row;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    /* position: relative; */
    min-height: 200px;
    flex-wrap: wrap;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}
section a.block > div, section div.block > div {
    min-width: 18%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.information section a.block, .information section div.block {
    padding-top: 2rem;
}

/* Set max-widths based on number of media items */
section a.block:has(> div:nth-child(2)) > div,
section div.block:has(> div:nth-child(2)) > div {
    max-width: calc(50% - 0.5rem);
}

section a.block:has(> div:nth-child(3)) > div,
section div.block:has(> div:nth-child(3)) > div {
    max-width: calc(33.333% - 0.667rem);
}

section a.block:has(> div:nth-child(4)) > div,
section div.block:has(> div:nth-child(4)) > div {
    max-width: calc(25% - 0.75rem);
}

section a.block:has(> div:nth-child(5)) > div,
section div.block:has(> div:nth-child(5)) > div {
    max-width: calc(33.333% - 0.667rem);
}

section a.block:has(> div:nth-child(7)) > div,
section div.block:has(> div:nth-child(7)) > div {
    max-width: calc(25% - 0.75rem);
}

section a.block:has(> div:nth-child(9)) > div,
section div.block:has(> div:nth-child(9)) > div {
    max-width: calc(20% - 0.8rem);
}

section a img, section a video, section div img, section div video {
    max-width: 100%;
    max-height: 75vh;
    width: auto;
    height: auto;
}
/* .one-quarter-scale {
    max-height: 37.5vh;
    margin-top: 18.75vh;
    margin-bottom: 18.75vh;
} */
.one-quarter-scale {
    max-height: 25vh;
    margin-top: 25vh;
    margin-bottom: 25vh;
}
.half-scale {
    max-height: 50vh;
    margin-top: 12.5vh;
    margin-bottom: 12.5vh;
}
.three-quarters-scale {
    max-height: 62.5vh;
    margin-top: 6.25vh;
    margin-bottom: 6.25vh;
}

.dropshadow {
    filter: drop-shadow(0 0.5rem 1rem rgba(var(--foreground-color), 0.4));
}
.border {
    border: 1px solid rgba(var(--foreground-color), 0.1);
}
/* Tooltip styles */
.block {
    position: relative;
}
header .block {
    position: static;
}
.tooltip {
    position: fixed;
    padding: 0.25rem 0.4rem 0.2rem 0.4rem;
    background-color: rgba(var(--background-color), 0.7);
    color: rgba(var(--foreground-color), 1);
    font-size: 0.65rem;
    line-height: 1.25;
    text-align: left;
    border-radius: calc(var(--border-radius) / 2);
    opacity: 0;
    backdrop-filter: blur(0.5rem);
    pointer-events: none;
    z-index: 1000;
    white-space: nowrap;
    box-shadow: 0.125rem 0.125rem 0.25rem rgba(var(--foreground-color), 0.08);
}

/* Only show icon for header tooltip */
.tooltip.header-tooltip {
    display: flex;
    align-items: center;
    gap: 0.1rem;
    padding: 0.2rem 0.4rem 0.1rem 0.2rem;
}

.tooltip.header-tooltip::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    position: relative;
    bottom: 0.05rem;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-image: url('../icons/information.svg');
}

.title {
    position: absolute;
    top: 1.4rem;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 0.7rem;
    color: rgba(var(--foreground-color), 0.5);
    opacity: 0.6;
    padding: 0 2rem;
}

.caption {
    position: absolute;
    bottom: 1.4rem;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 0.7rem;
    color: rgba(var(--foreground-color), 0.5);
    padding: 0 2rem;
}
/* Add spacing only when caption is present */
.block:has(.caption) {
    padding-bottom: 3rem;
}

section.biography {
    margin: 2rem auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}
section.biography p, section.biography a {
    font-size: 1.5rem;
    line-height: 1.5;
    max-width: 60ch;
    font-family: 'Tiempos', serif;
}
section.biography a {
    color: inherit;
    text-decoration-line: underline;
    text-decoration-color: rgba(var(--foreground-color), 0.25);
}
section.biography a:hover {
    color: #0b3fce;
    text-decoration-color: #0b3fce;
}

nav.contact .nav-left li:nth-child(1) a::before {
    background-image: url('../icons/email.svg');
}
nav.contact .nav-left li:nth-child(2) a::before {
    background-image: url('../icons/instagram.svg');
}
nav.contact .nav-left li:nth-child(3) a::before {
    background-image: url('../icons/threads.svg');
}

.external-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.external-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 33.333%;
    height: 225px;
    padding: 2rem;
    border-radius: var(--border-radius);
}
.external-links a img {
    max-width: 100%;
    max-height: 100%;
}
.nonlinear {
    background: #111;
    padding: 3rem !important;
}
.particular {
    background: #0b3fce;
}
.activematrix {
    background: #111;
    padding: 4rem !important;
}

.reveal-nav {
    position: fixed;
    top: -4px;
    left: 2rem;
    z-index: 1000;
    padding: calc(0.4rem + 3px) 0.4rem 0.4rem 0.4rem;
    background-color: #f0f0f0;
    border-radius: 0.25rem;
    box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
    transform: translateY(-100%);
    transition: transform 0.3s ease-in-out;
}
.reveal-nav.visible {
    transform: translateY(0);
}
.reveal-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: row;
    gap: 0.2rem;
}

.reveal-nav ul li a.active, .reveal-nav ul li a:hover {
    background-color: #fff;
    border-radius: calc(var(--border-radius) * 0.75);
    box-shadow: 0.125rem 0.125rem 0.25rem rgba(var(--foreground-color), 0.1);
}
.reveal-nav ul li a {
    display: inline-block;
    margin: 0;
    padding: 0 0.4rem 0.2rem 0.2rem;
    font-size: 0.7rem;
    text-decoration: none;
    color: #000;
}
.reveal-nav a::before {
    content: '';
    display: inline-block;
    width: 15px;
    height: 15px;
    position: relative;
    top: 3px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}
.reveal-nav li:nth-child(1) a::before {
    background-image: url('../icons/featured.svg');
}
.reveal-nav li:nth-child(2) a::before {
    background-image: url('../icons/information.svg');
}

@media (max-width: 700px) {
    body {
        margin: 0.5rem;
    }
    .nav-right {
        display: none;
    }
    header h1 {
        font-size: 4.85vw;
    }
    header a h1 br {
        display: none;
    }
    .reveal-nav {
        display: none;
    }
    section a.block, section div.block, .caption, .title {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    section a.block, section div.block {
        flex-direction: column;
    }
    section a.block:has(> div:nth-child(2)) > div,
    section div.block:has(> div:nth-child(2)) > div {
        max-width: 100%;
    }

    section a.block:has(> div:nth-child(3)) > div,
    section div.block:has(> div:nth-child(3)) > div {
        max-width: 100%;
    }

    section a.block:has(> div:nth-child(4)) > div,
    section div.block:has(> div:nth-child(4)) > div {
        max-width: 100%;
    }

    section a.block:has(> div:nth-child(5)) > div,
    section div.block:has(> div:nth-child(5)) > div {
        max-width: 100%;
    }

    section a.block:has(> div:nth-child(7)) > div,
    section div.block:has(> div:nth-child(7)) > div {
        max-width: 100%;
    }

    section a.block:has(> div:nth-child(9)) > div,
    section div.block:has(> div:nth-child(9)) > div {
        max-width: 100%;
    }

    .three-quarters-scale, .half-scale, .one-quarter-scale {
        max-height: 100%;
        margin-top: 0;
        margin-bottom: 0;
    }

    .title, .caption {
        text-overflow: ellipsis;
        overflow: hidden;
        white-space: nowrap;
    }

    .title {
        top: 1.2rem;
    }
    .caption {
        bottom: 1.1rem;
    }

    section.biography p, section.biography a {
        font-size: 1.25rem;
    }
    .external-links {
        flex-direction: column;
    }
    .external-links a {
        width: 100%;
    }
    .information section a.block, .information section div.block {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
    section.biography {
        margin: 1rem auto;
        padding: 0 1rem;
    }
    nav.contact a {
        font-size: 1rem;
    }
    nav.contact a::before {
        height: 24px;
        width: 24px;
    }
    #stage {
        display: none;
    }
    header {
        background-image: url('https://benbarry.imgix.net/v2.0/general/benbarry-mobile-bg.jpg?fit=max&fm=webp&h=1500&q=100&sharp=20&w=3000&s=30c3830edea2e8cae70d3158031d74f8');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
    }
}