@font-face {
    font-family: 'Tiempos';
    src: url('../type/tiempos-text-web-regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
}
@font-face {
    font-family: 'Tiempos';
    src: url('../type/tiempos-text-medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
}
  
:root {
    --background-color: 255, 255, 255;
    --text-color: 15, 10, 10;
    --shadow-color: rgba(15, 10, 10, 0.4);
    --block-background-color: #e0e0e0;
    --button-background-color: #fff;
    --border-radius: 0.25rem;
    --link-color: #0070f3;
    --media-border-color: rgba(0, 0, 0, .15);
    --header-background-color: 15, 16, 17;
    --header-shadow-color: 35, 37, 41;
    --header-text-color: 250, 250, 250;
}
@media (prefers-color-scheme: dark) {
    :root {
        --background-color: 15, 16, 17; /*0f0f0f 17191c  block: 262626*/
        --block-background-color: #232529;
        --text-color: 230, 230, 230;
        --shadow-color: rgba(0, 0, 0, 0.8);
        --header-text-color: 230, 230, 230;
    }
}
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: "Lato", sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 0.96rem;
    line-height: 1;
}
@media (prefers-color-scheme: dark) {
    * {
        font-weight: 300;
    }
}

body {
    margin: 1rem;
    background-color: rgba(var(--background-color), 1);
    color: rgba(var(--text-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;
    font-weight: 700;
    cursor: pointer;
}

@media (prefers-color-scheme: dark) {
    nav a, h2 {
        font-weight: 400;
    }
}

nav a.current {
    background-color: rgba(var(--background-color), 0.7);
    box-shadow: 0.125rem 0.125rem 0.25rem rgba(var(--text-color), 0.08);
}
nav a:hover {
    background-color: rgba(var(--background-color), 1);
    box-shadow: 0.125rem 0.125rem 0.25rem rgba(var(--text-color), 0.1);
}
@media (prefers-color-scheme: dark) {
    nav a.current {
        background-color: rgba(var(--background-color), 0.6);
        color: rgba(var(--text-color), 0.75);
        box-shadow: -0.125rem -0.125rem 0.35rem rgba(var(--text-color), 0.08), inset 0 0 0.25rem 0.125rem rgba(0,0,0, 0.08);
        /* box-shadow: inset 0 0 0.25rem 0.125rem rgba(0,0,0, 0.08); */
    }
    nav a.current::before {
        opacity: 0.75;
    }
    nav a:hover {
        background-color: rgba(var(--background-color), 0.9);
        box-shadow: -0.125rem -0.125rem 0.25rem rgba(var(--text-color), 0.08);
    }
}
nav a::before, h2::before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 24px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

@media (prefers-color-scheme: dark) {
    nav a::before, h2::before {
        filter: invert(1);
    }
}

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/logo-vc.svg');
}
.nav-right li:nth-child(2) a::before {
    background-image: url('../icons/nonlinear.svg');
}
.nav-right li:nth-child(3) a::before {
    background-image: url('../icons/particular.svg');
}
.nav-right li:nth-child(4) a::before {
    background-image: url('../icons/active-matrix.svg');
}

header {
    display: block;
    text-align: center;
    border-radius: var(--border-radius);
    background-color: rgba(var(--header-background-color), 1);
    color: rgba(var(--header-text-color), 1);
    padding: 8.5vw 2rem; /*8rem 2rem*/
    position: relative;
    overflow: hidden;
}
header .block #stage canvas {
    filter: saturate(3);
}

@media (prefers-color-scheme: dark) {
    header {
        box-shadow: inset 0 0 15rem 0.25rem rgba(var(--header-shadow-color), 0.45);
        outline: 1px solid rgba(250, 250, 250, 0.03);
        outline-offset: -1px;
    }
    header .block #stage canvas {
        filter: saturate(2);
    }
}

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-family: 'Tiempos', serif;
    font-weight: 400;
    filter: drop-shadow(0 0 2rem var(--text-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');
}
h2.featured, 
h2.information,
h2.peac,
h2.no-icon {
    cursor: auto;
}

main {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

section.block {
    background-color: var(--block-background-color);
    border-radius: var(--border-radius);
    height: 94.5vh;
    min-height: 550px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    outline-offset: -1px;
}
@media (max-width: 700px) {
    section.block {
        height: auto;
        min-height: 50px;
    }
    /* section.block:has(.post .media > :not(.mediaLightMode):not(.mediaDarkMode):nth-child(2)) {
        height: auto;
        min-height: 94vh;
    } */
    
}
section.block .post {
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    padding: 1rem 2rem;
    text-decoration: none;
    color: black;
    position: relative;
}

section.block .post .media {
    height: 100%;
    width: 100%;
    flex: 1;
    min-height: 0;
    object-fit: contain;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    opacity: 0;
    transition: opacity 0.35s ease;
}

@media (max-width: 700px) {
    section.block .post .media {
        flex-direction: column;
        gap: 1.5rem;
    }
}
section.block .post .media.is-visible {
    opacity: 1;
}
section.block .post .media img, 
section.block .post .media video {
    max-height: 100%;
    max-width: 100%;
    height: auto;
    width: auto;
    object-fit: contain;
    flex: 0 1 auto;
}

section.block .post .media img.placeholder-image {
    height: 100%;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    filter: blur(5px);
}

section.block .post .media img:only-child,
section.block .post .media video:only-child {
    max-width: 100%;
    max-height: 100%;
}

@media (max-width: 700px) {
    section.block .post .media img, 
    section.block .post .media video {
        max-height: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        width: auto !important;
    }
    section.block .post .media img.placeholder-image {
        width: 100% !important;
    }
}

/* For multiple images, constrain width to share space */
section.block .post .media:has(img:nth-child(2):last-child) img,
section.block .post .media:has(video:nth-child(2):last-child) video {
    max-width: calc(50% - 0.5rem);
}

section.block .post .media:has(img:nth-child(3):last-child) img,
section.block .post .media:has(video:nth-child(3):last-child) video {
    max-width: calc(33.333% - 0.667rem);
}

section.block .post .media:has(img:nth-child(4):last-child) img,
section.block .post .media:has(video:nth-child(4):last-child) video {
    max-width: calc(25% - 0.75rem);
}

@media (max-width: 700px) {
    section.block .post .media:has(img:nth-child(2):last-child) img,
    section.block .post .media:has(video:nth-child(2):last-child) video {
        max-width: 100%;
    }
    section.block .post .media:has(img:nth-child(3):last-child) img,
    section.block .post .media:has(video:nth-child(3):last-child) video {
        max-width: 100%;
    }
    section.block .post .media:has(img:nth-child(4):last-child) img,
    section.block .post .media:has(video:nth-child(4):last-child) video {
        max-width: 100%;
    }
}

section.block .post p {
    text-align: center;
    flex-shrink: 0;
    font-size: 0.96rem;
    font-weight: inherit;
    color: rgba(var(--text-color), 0.5);
}
section.block .post p.title {
    /* margin-top: 0.25rem; */
    margin-top: 0.1rem;
    margin-bottom: 1rem;
}
section.block .post p.caption {
    margin-top: 1.2rem;
    /* margin-bottom: 0.2rem; */
}
/* section.block .post .media img.dropshadow, 
section.block .post .media video.dropshadow {
    filter: drop-shadow(0 0.5rem 1rem rgba(15,10,10, 0.8));
} */

.dropshadow {
    filter: drop-shadow(0 0.5rem 1rem var(--shadow-color));
}

section.block .post:not(:has(.caption)) .media {
    margin-bottom: 1rem;
}

.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.loading-image-dark,
.loading-image-light {
    width: 27px;
    height: 27px;
}

.loading-image-dark {
    display: none;
}

.loading-image-light {
    display: inline-block;
}

@media (prefers-color-scheme: dark) {
    .loading-image-dark {
        display: inline-block;
    }
    .loading-image-light {
        display: none;
    }
}

.block-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
}

.block-loader img {
    width: 27px;
    height: 27px;
    object-fit: contain;
}

.block-loader-dark {
    display: none;
}

.block-loader-single {
    display: block;
}

.block-loader-light {
    display: block;
}

@media (prefers-color-scheme: dark) {
    .block-loader-dark {
        display: block;
    }

    .block-loader-light {
        display: none;
    }
}

.mediaLightMode {
    display: block;
}

.mediaDarkMode {
    display: none;
}

@media (prefers-color-scheme: dark) {
    .mediaLightMode {
        display: none;
    }

    .mediaDarkMode {
        display: block;
    }
}

/* Desktop and mobile media blocks */
section.block .post .media.desktop {
    display: flex;
}

section.block .post .media.mobile {
    display: none;
}

@media (max-width: 700px) {
    section.block .post .media.desktop {
        display: none !important;
    }

    section.block .post .media.mobile {
        display: flex !important;
    }
}

/* section a.block, section div.block {
    padding: 2rem;
    padding-top: 3rem;
    display: flex;
    flex-direction: row;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    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;
} */

section.information-header {
    height: auto;
    min-height: 100px;
}

section.information-header .post {
    padding-top: 2rem;
}

section.information-header .post .media {
    aspect-ratio: 3 / 1;
    min-height: 0;
}

@media (max-width: 700px) {
    section.information-header .post {
        padding: 1.2rem 1rem !important;
    }

    section.information-header .post .media {
        aspect-ratio: 1 / 1;
        margin-bottom: 0 !important;
    }

    section.information-header .post .media img:nth-child(2),
    section.information-header .post .media img:nth-child(3) {
        display: none;
    }
}

section.portrait-block .post {
    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;
} */

.border {
    border: 1px solid rgba(var(--text-color), 0.1);
}
/* Tooltip styles */
section.block {
    position: relative;
}
header section.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(--text-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(--text-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.8rem;
    color: rgba(var(--text-color), 0.5);
    padding: 0 2rem;
}

.caption {
    position: absolute;
    bottom: 1.4rem;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 0.8rem;
    color: rgba(var(--text-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;
    font-weight: 400;
}

section.biography a {
    color: inherit;
    text-decoration-line: underline;
    text-decoration-color: rgba(var(--text-color), 0.25);
}
section.biography a:hover {
    color: #0b3fce;
    text-decoration-color: #0b3fce;
}
@media (prefers-color-scheme: dark) {
    section.biography a:hover {
        color: #0f43d2;
        text-decoration-color: #0f43d2;
    }
}

nav.contact .nav-left li:nth-child(1) a::before,
.reveal-nav.reveal-nav-center .nav-center li:nth-child(1) a::before {
    background-image: url('../icons/email.svg');
}
nav.contact .nav-left li:nth-child(2) a::before,
.reveal-nav.reveal-nav-center .nav-center li:nth-child(2) a::before {
    background-image: url('../icons/instagram.svg');
}
nav.contact .nav-left li:nth-child(3) a::before,
.reveal-nav.reveal-nav-center .nav-center 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;
}

@media (prefers-color-scheme: dark) {
    .nonlinear {
        filter: invert(1) brightness(0.85);
    }
    .activematrix {
        filter: invert(1) brightness(0.85);
    }
}

.reveal-nav {
    position: fixed;
    top: 1rem;
    background-color: var(--block-background-color);
    /* background-color: transparent !important; */
    border-radius: 0.25rem;
    z-index: 1000;
    transform: translateY(calc(-100% - 1.1rem));
    overflow: hidden;
    transition: transform 0.3s ease-in-out, background-color 0.2s ease;
    /* backdrop-filter: blur(0.5rem) brightness(1.05); */
}
.reveal-nav.reveal-nav-left {
    left: 2rem;
}
.reveal-nav.reveal-nav-right {
    right: 2rem;
}
.reveal-nav.reveal-nav-center {
    left: 50%;
    transform: translateX(-50%) translateY(calc(-100% - 1.1rem));
}
.reveal-nav.reveal-nav-center.visible {
    transform: translateX(-50%) translateY(0);
}

.reveal-nav.visible {
    transform: translateY(0);
}

.reveal-nav ul {
    border-radius: 0.25rem;
    padding: 0.25rem;
    box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
    list-style: none;
    margin: 0;
    display: flex;
    flex-direction: row;
    gap: 0.2rem;
    /* background-color: transparent !important; */
    backdrop-filter: brightness(1.09);
}

.reveal-nav ul li a.active, 
.reveal-nav ul li a:hover {
    background-color: rgba(var(--background-color), 0.5);
    border-radius: calc(var(--border-radius) * 0.75);
    box-shadow: 0.125rem 0.125rem 0.25rem rgba(var(--text-color), 0.1);
}
.reveal-nav ul li a {
    display: inline-block;
    margin: 0;
    /* padding: 0 0.4rem 0.2rem 0.2rem; */
    padding: 0.2rem 0.4rem 0.2rem 0.2rem;
    font-size: 0.86rem;
    text-decoration: none;
    color: rgba(var(--text-color), 1);
    font-weight: 700;
    cursor: pointer;
    position: relative;
    display: flex;
  align-items: center;
  justify-content: center;
}

.reveal-nav a::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    position: relative;
    top: 0.5px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}
.reveal-nav.reveal-nav-right a {
    padding: 0.2rem;
}

@media (prefers-color-scheme: dark) {
    .reveal-nav {
        background-color: var(--block-background-color);
    }
    .reveal-nav ul {
        backdrop-filter: brightness(1.3);
    }
    .reveal-nav ul li a.active, 
    .reveal-nav ul li a:hover {
        background-color: rgba(var(--background-color), 0.5);
        /* background-color: transparent !important;
        backdrop-filter: brightness(0.1); */
        border-radius: calc(var(--border-radius) * 0.75);
        box-shadow: -0.125rem -0.125rem 0.25rem rgba(var(--text-color), 0.1);
    }
    .reveal-nav ul li a:hover {
        opacity: 1;
    }
    .reveal-nav ul li a {
        color: rgba(var(--text-color), 1);
        opacity: 0.9;

    }
    .reveal-nav a::before {
        filter: invert(1);
    }
}

/* .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');
} */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 700px) {
    body {
        margin: 0.5rem;
    }
    .nav-right {
        display: none;
    }
    header h1 {
        font-size: 7.3vw;
        line-height: 1.36;
    }
    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%;
    }

    section.block .media {
        padding: var(--mobile-padding, 0);
    }

    section.block .post {
        padding: 1rem 1rem;
    }
    section.block .post p {
        font-size: 1.2rem;
        line-height: 1.25;
        text-wrap: balance;
    }
    p.title {
        top: 1.2rem;
    }
    p.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://img.benb.co/w/2000/v2.1/general/benbarry-mobile-bg-light.png');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
    }

    @media (prefers-color-scheme: dark) {
        header {
            background-image: url('https://img.benb.co/w/2000/v2.1/general/benbarry-mobile-bg-dark.png');
        }
    }
}