:root {
    --bg-overview: rgba(239, 243, 248, 1);
    --bg-overview-0: rgba(239, 243, 248, 0);
    --bg-projects: rgba(229, 237, 254, 1);
    --bg-projects-semi: rgb(229 237 254 / 50%);
    --bg-projects-0: rgba(229, 237, 254, 0);
    --bg-footer: #222222;
    --fg-primary: #3C3D61;
    --fg-secondary: hsl(227, 19%, 59%);
    --text-color: var(--fg-primary);
    --text-light: #ffffff;
    --accent: #8797ae;
    --padding-x: 3rem;

    --footer-bg: #e7e3f0;
    --footer-text: #6b546e;
    --footer-accent: var(--footer-text);

    --btn-bg: #ffffff;
    --btn-text: var(--fg-primary);
    --strike-color: var(--fg-primary);
    font-size: .875em;
}

/* inter-300 - latin */
@font-face {
    font-display: swap;
    /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Inter';
    font-style: normal;
    font-weight: 300;
    src: url('../portfolio/fonts/inter-v18-latin-300.woff2') format('woff2');
    /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* inter-regular - latin */
@font-face {
    font-display: swap;
    /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    src: url('../portfolio/fonts/inter-v18-latin-regular.woff2') format('woff2');
    /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* inter-500 - latin */
@font-face {
    font-display: swap;
    /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    src: url('../portfolio/fonts/inter-v18-latin-500.woff2') format('woff2');
    /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* manrope-500 - latin */
@font-face {
    font-display: swap;
    /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Manrope';
    font-style: normal;
    font-weight: 500;
    src: url('../portfolio/fonts/manrope-v15-latin-500.woff2') format('woff2');
    /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* manrope-600 - latin */
@font-face {
    font-display: swap;
    /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Manrope';
    font-style: normal;
    font-weight: 600;
    src: url('../portfolio/fonts/manrope-v15-latin-600.woff2') format('woff2');
    /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* ibm-plex-mono-italic - latin */
@font-face {
    font-display: swap;
    /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'IBM Plex Mono';
    font-style: italic;
    font-weight: 400;
    src: url('../portfolio/fonts/ibm-plex-mono-v19-latin-italic.woff2') format('woff2');
    /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body,
html {
    /*scroll-snap-type: y mandatory;*/
    font-family: sans-serif;
    color: var(--text-color);
    background: var(--bg-overview);

    color: var(--fg-primary);
    font-size: 1.1em;
    font-family: "Inter", sans-serif;
    font-optical-sizing: auto;
    font-weight: 300;
    font-style: normal;

    width: 100vw;
    overflow-x: clip;
    transition: background 300ms ease;
}

body.portfolio {
    background-color: var(--bg-projects);
}

.manrope-medium,
h1,
h2,
h3 {
    font-family: "Manrope", sans-serif;
    font-optical-sizing: auto;
    font-weight: 600;
    font-style: normal;
    line-height: normal;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    padding: 4rem var(--padding-x) 2rem;
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75em;
}

header a {
    text-decoration: none;
}

.site-header h1 {
    line-height: .8em;
    z-index: 1;
    position: relative;
    color: var(--fg-primary);
    font-size: 1.75em;
    font-weight: inherit;
    transition: all 300ms ease-in-out;
    cursor: pointer;
}

.site-header h1.light {
    color: var(--fg-secondary);
}

.header-gradient {
    position: absolute;
    top: -6rem;
    left: 0;
    width: 100vw;
    height:17rem;
    background: linear-gradient(to bottom, var(--bg-overview) 60%, var(--bg-overview-0) 100%);
    pointer-events: none;
    z-index: 0;
    opacity: 0.9;
    filter: blur(.625em);
    -webkit-filter: blur(.625em);
}

main {
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
    /* Optional: prevent layout shifts that affect snapping */
    /*overscroll-behavior-y: contain;*/
}

main>section {
    width: 100vw;
    padding: var(--padding-x);
    scroll-snap-align: start;
}

a.back {
    text-decoration: none;
    display: block;
    column-span: all;
    margin: 0 0 1em -0.1em;
    color: #2c45ba !important;
}

#overview {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    height: calc(100vh - 4rem);
    background: var(--bg-overview);
    position: relative;
    padding: 18vh var(--padding-x);
}

.text-block {
    max-width: 24em;
    min-width: 14em;
    width: 30%;
    z-index: 1;
    align-self: flex-start;
    margin-top: 0;
}

#legal {
    column-count: 4;
    column-gap: 2rem;
    padding: 2rem;
    min-height: calc(100vh - 4rem);
    background: var(--bg-overview);
    position: relative;
    padding: 18vh var(--padding-x) 4rem;
}

.section-block {
    break-inside: avoid;
    display: block;
    /* ensures block-level container */
}

#legal h2 {
    font-size: 1.1em;
    margin: 0 0 0.25em;
}

#legal h3 {
    font-size: 0.9em;
    font-weight: 500;
    margin: 0.25em 0 0 0;
}

#legal p {
    font-size: 0.9em;
}

#legal a {
    color: var(--accent);
}

#legal h2,
#legal h3,
#legal h4,
#legal p {
    break-inside: avoid;
    width: 100%;
    display: block;
}

#project {
    min-height: 100vh;
    padding-bottom: 11vh;
    display: flex;
    padding: 18vh var(--padding-x) 5em;
    gap: 2em;
    align-items: flex-start;
}

#project .notfound {
    display: none;
}

#project.error {
    align-items: center;
    padding-bottom: 12vh;
    padding-top: 0;
}

#project.error .notfound {
    display: block;
}

#project.error #meta-container,
#project.error #media-container {
    display: none;
}

#project .notfound p {
    max-width: 35em;
    margin: 1em 0 1.5em;
}

.project-nav a {
    text-decoration: none;
}

.project-nav button {
    padding: .72em .75em 0.78em;
    background: none;
    color: var(--fg-primary);
    border: 1px solid var(--fg-primary);
    border-radius: .75em;
    font-size: 1em;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: .5em;
}

.project-nav button:hover {
    box-shadow: 0 0 0 .5px var(--fg-primary);
    /* thick inner border */
    letter-spacing: -0.01em;
    font-weight: 500;
    cursor: pointer;
}

.project-nav {
    width: 100vw;
    background: var(--bg-projects);
    padding: 2em var(--padding-x) 2.5em;
    display: flex;
    gap: .75em;
    justify-content: space-between;
}

.column-first {
    flex: 1;
    overflow-y: auto;
    max-height: 100%;
    display: grid;
    gap: .25em;
}

#media-container img {
    width: 100%;
}

.unmute-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.3rem 0.5rem;
    background: rgba(255, 255, 255, 0.8);
    color: var(--fg-secondary);
    border: none;
    border-radius: .5em;
    cursor: pointer;
    z-index: 10;
    font-size: 0.8em;
    pointer-events: auto;
    transition: scale 300ms ease;
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.icon-muted {
    display: inline-block;
    width: 1.5em;
    height: 1.5em;
    background-color: currentColor;
    mask-size: contain;
    mask-position: center;
    /* Icon takes text color */
    -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M18 14L20.0005 12M22 10L20.0005 12M20.0005 12L18 10M20.0005 12L22 14"/><path d="M2 13.8571V10.1429C2 9.03829 2.89543 8.14286 4 8.14286H6.9C7.09569 8.14286 7.28708 8.08544 7.45046 7.97772L13.4495 4.02228C14.1144 3.5839 15 4.06075 15 4.85714V19.1429C15 19.9392 14.1144 20.4161 13.4495 19.9777L7.45046 16.0223C7.28708 15.9146 7.09569 15.8571 6.9 15.8571H4C2.89543 15.8571 2 14.9617 2 13.8571Z"/></svg>') no-repeat center / contain;
    mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M18 14L20.0005 12M22 10L20.0005 12M20.0005 12L18 10M20.0005 12L22 14"/><path d="M2 13.8571V10.1429C2 9.03829 2.89543 8.14286 4 8.14286H6.9C7.09569 8.14286 7.28708 8.08544 7.45046 7.97772L13.4495 4.02228C14.1144 3.5839 15 4.06075 15 4.85714V19.1429C15 19.9392 14.1144 20.4161 13.4495 19.9777L7.45046 16.0223C7.28708 15.9146 7.09569 15.8571 6.9 15.8571H4C2.89543 15.8571 2 14.9617 2 13.8571Z"/></svg>') no-repeat center / contain;
}

.icon-grid {
    display: inline-block;
    width: 1.2em;
    height: 1.2em;
    mask-size: contain !important;
    mask-position: center;
    background-color: currentColor;
    mask: url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg width='24px' height='24px' stroke-width='1.5' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg' color='%23000000'%3E%3Cpath d='M3 7.4V3.6C3 3.26863 3.26863 3 3.6 3H9.4C9.73137 3 10 3.26863 10 3.6V7.4C10 7.73137 9.73137 8 9.4 8H3.6C3.26863 8 3 7.73137 3 7.4Z' stroke='%23000000' stroke-width='1.5'%3E%3C/path%3E%3Cpath d='M14 20.4V16.6C14 16.2686 14.2686 16 14.6 16H20.4C20.7314 16 21 16.2686 21 16.6V20.4C21 20.7314 20.7314 21 20.4 21H14.6C14.2686 21 14 20.7314 14 20.4Z' stroke='%23000000' stroke-width='1.5'%3E%3C/path%3E%3Cpath d='M14 12.4V3.6C14 3.26863 14.2686 3 14.6 3H20.4C20.7314 3 21 3.26863 21 3.6V12.4C21 12.7314 20.7314 13 20.4 13H14.6C14.2686 13 14 12.7314 14 12.4Z' stroke='%23000000' stroke-width='1.5'%3E%3C/path%3E%3Cpath d='M3 20.4V11.6C3 11.2686 3.26863 11 3.6 11H9.4C9.73137 11 10 11.2686 10 11.6V20.4C10 20.7314 9.73137 21 9.4 21H3.6C3.26863 21 3 20.7314 3 20.4Z' stroke='%23000000' stroke-width='1.5'%3E%3C/path%3E%3C/svg%3E");
    -webkit-mask: url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg width='24px' height='24px' stroke-width='1.5' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg' color='%23000000'%3E%3Cpath d='M3 7.4V3.6C3 3.26863 3.26863 3 3.6 3H9.4C9.73137 3 10 3.26863 10 3.6V7.4C10 7.73137 9.73137 8 9.4 8H3.6C3.26863 8 3 7.73137 3 7.4Z' stroke='%23000000' stroke-width='1.5'%3E%3C/path%3E%3Cpath d='M14 20.4V16.6C14 16.2686 14.2686 16 14.6 16H20.4C20.7314 16 21 16.2686 21 16.6V20.4C21 20.7314 20.7314 21 20.4 21H14.6C14.2686 21 14 20.7314 14 20.4Z' stroke='%23000000' stroke-width='1.5'%3E%3C/path%3E%3Cpath d='M14 12.4V3.6C14 3.26863 14.2686 3 14.6 3H20.4C20.7314 3 21 3.26863 21 3.6V12.4C21 12.7314 20.7314 13 20.4 13H14.6C14.2686 13 14 12.7314 14 12.4Z' stroke='%23000000' stroke-width='1.5'%3E%3C/path%3E%3Cpath d='M3 20.4V11.6C3 11.2686 3.26863 11 3.6 11H9.4C9.73137 11 10 11.2686 10 11.6V20.4C10 20.7314 9.73137 21 9.4 21H3.6C3.26863 21 3 20.7314 3 20.4Z' stroke='%23000000' stroke-width='1.5'%3E%3C/path%3E%3C/svg%3E");
}

.icon-arrow-right {
    display: inline-block;
    width: 1.2em;
    height: 1.2em;
    mask-size: contain !important;
    mask-position: center;
    background-color: currentColor;
    mask: url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg width='24px' height='24px' viewBox='0 0 24 24' stroke-width='1.5' fill='none' xmlns='http://www.w3.org/2000/svg' color='%23000000'%3E%3Cpath d='M3 12L21 12M21 12L12.5 3.5M21 12L12.5 20.5' stroke='%23000000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3C/path%3E%3C/svg%3E");
    -webkit-mask: url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg width='24px' height='24px' viewBox='0 0 24 24' stroke-width='1.5' fill='none' xmlns='http://www.w3.org/2000/svg' color='%23000000'%3E%3Cpath d='M3 12L21 12M21 12L12.5 3.5M21 12L12.5 20.5' stroke='%23000000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3C/path%3E%3C/svg%3E");
}


.unmute-btn:hover {
    scale: 1.05;
}

.column-second {
    width: 40%;
    max-width: 30em;
    height: fit-content;
    position: sticky;
    top: 18vh;
}

#meta-container header {
    margin-top: -0.5em;
}

#meta-container .meta {
    color: var(--fg-secondary);
    margin: 0.5em 0 1em;
}

#meta-container p a {
    text-decoration: none;
    border-bottom: dotted 1px var(--accent);
    color: var(--accent);
}

#meta-container p.parameter {
    display: flex;
    align-items: center;
    gap: .5em;
    line-height: 1.25em;
}

#meta-container p.parameter img {
    width: 3em;
    height: 3em;
}

p {
    line-height: 1.62em;
    margin: 0 0 1em 0;
}

p strong {
    font-weight: 500;
}

.project-description p:last-child {
    margin: 0;
}

.text-block p span.highlight {
    color: var(--fg-primary, #3C3D61);
    font-family: "IBM Plex Mono";
    font-size: 0.96em;
    font-style: italic;
    font-weight: 400;
    line-height: 26px;
    letter-spacing: -0.62px;
    white-space: nowrap;
}

#canvas {
    flex: 1;
    height: 100%;
    max-height: 40vw;
    width: auto;
    opacity: 0;
    transition: opacity 400ms ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

#canvas canvas {
    /*
    width: 80% !important;
    height: 80% !important;
        position: absolute;
    top: 5vh;
    right: -6vw;
    */
    width: 50vw !important;
    height: 50vw !important;
    cursor: auto;

    z-index: 0;
}

#projects {
    background: var(--bg-projects);
    padding-top: 1rem;
    /*transition: all 50ms ease-out;*/
    min-height: 80vh;
}

#projects h2 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: var(--fg-secondary);
    font-weight: 600;
    position: sticky;
    top: 5.6rem;
    /*transition: all 50ms ease-out;*/
}

/* ––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––– PORTFOLIO */

/*
.portfolio #projects {
    padding-top: 5.6rem;
}

.portfolio #projects h2 {
    font-size: 1.75rem;
    z-index: 1000;
}
*/

#scroll-overlay:hover, #allprojects:hover {
    cursor:pointer;
}

.portfolio #projects h2 {
    z-index: 1000;
}

.portfolio h1 {
    translate: 0 -1.2em;
}

.portfolio h1.light {
    opacity: 0;
}

.portfolio .header-gradient {
    filter: none;
    background: var(--bg-projects-semi);
    backdrop-filter: blur(1.25em);
    -webkit-backdrop-filter: blur(1.25em);
    opacity: 1;
    position: absolute;
    top: -6.7rem;
    height:18rem;
}

.portfolio main>section {
    scroll-snap-align: none;
}

.project-grid {
    column-count: 4;
    column-gap: 1rem;
}

.tile {
    padding: .5em;
    align-items: end;

    background: var(--accent);
    display: inline-flex;
    width: 100%;
    margin-bottom: 1rem;
    border-radius: .5em;
    height: auto;
    min-height: 19em;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--bg-projects);

    filter: grayscale(100%);
    -webkit-filter: grayscale(100%);
    mix-blend-mode: multiply;
    transition: all 400ms ease;

    text-decoration: none;
}

.tile div {
    opacity: 0;
    height: fit-content;
    display: inline-flex;
    padding: 0.5em 0.75em;
    align-items: flex-start;
    gap: .5em;
    border-radius: .625em;
    background: linear-gradient(-60deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.4) 100%);
    box-shadow: 0 113px 32px 0 rgba(88, 90, 111, 0.01), 0 72px 29px 0 rgba(88, 90, 111, 0.05), 0 41px 24px 0 rgba(88, 90, 111, 0.17), 0 1.5em 1.5em 0 rgba(88, 90, 111, 0.29), 0 5px .625em 0 rgba(88, 90, 111, 0.34);
    /*filter: drop-shadow(0 30 20 rgba(88, 90, 111, 0.2));*/
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    transition: all 300ms ease;
}

.tile .title {
    color: var(--fg-primary);
    font-family: "Manrope";
    font-size: 0.9em;
    font-style: normal;
    font-weight: 600;
    line-height: 1.45em;
    position: relative;
    top: 0.5px;
    /* 144.444% */
}

.tile .year {
    color: var(--fg-primary);
    opacity: 0.7;
    font-family: "Inter";
    font-size: 0.65em;
    font-style: normal;
    font-weight: 400;
    position: relative;
    top: 0.3em;
}

@media (pointer: fine) {
    .tile:hover {
        border-radius: .75em;
        filter: grayscale(0%);
        -webkit-filter: grayscale(0%);
        mix-blend-mode: normal;
        cursor: pointer;

    }

    .tile:hover div {
        opacity: 1;
    }
}

.tile.hidden {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
    position: absolute;
    display: none;
}


/* ––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––– FOOTER */

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    padding: 2rem var(--padding-x) 3rem;
    background: var(--footer-bg);
    color: var(--footer-text);
    flex-wrap: wrap;
    width: 100vw;
}

.site-footer p {
    margin: 0 0 0.2em 0;
    max-width: 24em;
}

.site-footer p span {
    vertical-align: middle;
    display: inline-block;
}

.site-footer .footer-column {
    flex: 0 0 auto;
    min-width: max-content;
}

.site-footer .footer-column:first-child {
    max-width: 21em;
    min-width: auto;
}


.site-footer h4 {
    margin-bottom: 0.5rem;
    color: var(--footer-accent);
}

.site-footer a {
    color: var(--footer-text);
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

.site-footer ul {
    list-style: none;
    padding: 0;
}

.icon-golf {
    display: inline-block;
    width: 1.25em;
    height: 1.25em;
    mask-size: contain;
    background-color: var(--footer-text);
    -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 18L12 12M12 12V3.40992C12 2.97917 12.4404 2.68876 12.8364 2.85844L21.2803 6.47729C21.7549 6.68065 21.7681 7.34854 21.302 7.5705L12 12Z"/><path d="M12 22C15.866 22 19 20.433 19 18.5C19 16.567 15.866 15 12 15C8.13401 15 5 16.567 5 18.5C5 20.433 8.13401 22 12 22Z"/></svg>') no-repeat center / contain;
    mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 18L12 12M12 12V3.40992C12 2.97917 12.4404 2.68876 12.8364 2.85844L21.2803 6.47729C21.7549 6.68065 21.7681 7.34854 21.302 7.5705L12 12Z"/><path d="M12 22C15.866 22 19 20.433 19 18.5C19 16.567 15.866 15 12 15C8.13401 15 5 16.567 5 18.5C5 20.433 8.13401 22 12 22Z"/></svg>') no-repeat center / contain;
    vertical-align: middle;
    top: -0.1em;
    position: relative;
}

.icon-arrow {
    display: inline-block;
    width: 1.5em;
    height: 1.5em;
    mask-size: contain;
    background-color: var(--footer-text);
    -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"><path d=\"M7 17L17 7\"/><path d=\"M7 7H17V17\"/></svg>') no-repeat center / contain;
    mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"><path d=\"M7 17L17 7\"/><path d=\"M7 7H17V17\"/></svg>') no-repeat center / contain;
    vertical-align: middle;
    top: -1px;
    position: relative;
}

.disclosure {
    font-size: 0.8em;
    opacity: 0.4;
    font-weight: 300;
    margin: 1em 0 -1em;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* Default: 4 columns */
    gap: 1rem;
    width: 100%;
}

.footer-main {
    grid-column: span 2;
}

.footer-secondary {
    padding-top: 1.7em;
}


/* ––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––– COMPONENTS */

.view-toggle-container {
    font-weight: 500;
}

.view-toggle-container.min .toggle-button:not(.inactive) {
    cursor: no-drop;
}

.toggle-button {
    display: inline-block;
    position: relative;
    background: var(--btn-bg);
    color: var(--btn-text);
    border: 2px solid var(--bg-overview);
    padding: 0.3em 0.4em 0.25em 0.4em;
    margin: 0 0 0 -0.2em;
    line-height: 1em;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 0.375em;
    font-weight: 500;
    cursor: pointer;
}

.toggle-button:hover:not(.inactive) {
    border-color: var(--btn-bg);
}

.toggle-button.inactive {
    background: transparent;
    opacity: 0.8;
}

.toggle-button .strike {
    position: absolute;
    bottom: 48%;
    left: 0;
    height: 2px;
    background: var(--strike-color);
    width: 0%;
    transition: width 0.3s ease;
    pointer-events: none;
    opacity: 0.6;
}

.toggle-button.inactive.hover .strike {
    width: 0%;
}

.toggle-button.inactive:not(.hover) .strike {
    width: 100%;
}

.filters {
    padding: 0.3em 0 2em 0;
    z-index: 100000;
    position: sticky;
    top: 8.2rem;
}

.filters,
#projects h2 {
    mix-blend-mode: multiply;
}

.filter-button {
    display: inline-block;
    position: relative;
    background: none;
    color: var(--fg-secondary);
    border: 1px solid var(--fg-secondary);
    padding: 0.3em 0.4em 0.25em 0.4em;
    margin: 0 0.25em 0 0;
    line-height: 1em;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 0.375em;
    font-weight: 400;
    cursor: pointer;
    transition: all 300ms ease;
}

.filter-button.selected {
    border: 2px solid var(--fg-secondary);
    background-color: var(--fg-secondary);
    color: var(--bg-overview);
    font-weight: 400;
}

.filter-button:hover {
    scale: 1.05;
}


#preview-container {
    --preview-height: 20em;
    width: 22em;
    height: var(--preview-height);
    padding: .625em;
    align-items: flex-end;
    gap: .625em;
    flex-shrink: 0;
    border-radius: 1em;
    border: 0.5px solid rgba(116, 118, 135, 0.50);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    /* image preview */
    box-shadow: 0 270 76px 0 rgba(0, 0, 0, 0.00), 0 173px 69px 0 rgba(0, 0, 0, 0.02), 0 97px 5.5em 0 rgba(0, 0, 0, 0.05), 0 43px 43px 0 rgba(0, 0, 0, 0.09), 0 11px 24px 0 rgba(0, 0, 0, 0.11);
    position: absolute;
    bottom: calc(-2vh - var(--preview-height));
    left: calc(var(--padding-x) - 4px);

    transition: all 300ms ease-in-out;

    opacity: 0;
    display: none;

    z-index: 1000;
}

.preview #preview-container {
    bottom: 6rem;
    opacity: 1;
}

.preview .text-block {
    transition: all 300ms ease-in-out;
    filter: blur(4px);
    -webkit-filter: blur(4px);
    opacity: 0.6;
}

#preview-container div {
    display: inline-flex;
    padding: 0.625em 1em;
    align-items: flex-start;
    gap: .5em;
    border-radius: .625em;
    background: linear-gradient(-60deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.4) 100%);
    box-shadow: 0 113px 32px 0 rgba(88, 90, 111, 0.01), 0 72px 29px 0 rgba(88, 90, 111, 0.05), 0 41px 24px 0 rgba(88, 90, 111, 0.17), 0 1.5em 1.5em 0 rgba(88, 90, 111, 0.29), 0 5px .625em 0 rgba(88, 90, 111, 0.34);
    /*filter: drop-shadow(0 30 20 rgba(88, 90, 111, 0.2));*/
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

#preview-container .title {
    color: var(--fg-primary);
    font-family: "Manrope";
    font-size: 1.125em;
    font-style: normal;
    font-weight: 600;
    line-height: 1.45em;
    position: relative;
    top: -0.05em;
    /* 144.444% */
}

#preview-container .year {
    color: var(--fg-primary);
    opacity: 0.7;
    font-family: "Inter";
    font-size: 0.75em;
    font-style: normal;
    font-weight: 400;
    position: relative;
    top: 0.3em;
}


#scroll-overlay {
    position: fixed;
    bottom: 6rem;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 9999;
    cursor: default;
    user-select: none;
    transition: opacity 0.5s ease;
}

/* Arrow: a simple downward pointing chevron with animation */
.arrow {
    border: solid var(--fg-secondary);
    border-width: 0 3px 3px 0;
    display: inline-block;
    padding: .5em;
    transform: rotate(45deg);
    animation: bounce 1.5s infinite;
    opacity: 0.8;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0) rotate(45deg);
        opacity: 0.8;
    }

    50% {
        transform: translateY(.625em) rotate(45deg);
        opacity: 1;
    }
}


/* ————————————————————————————————————————————————————————————— MEDIA QUERIES */

@media (min-width: 1300px) {
    #media-container {
        max-width: calc(50vw - var(--padding-x) - 2rem);
    }
}

@media (max-width: 1300px) {
    .project-grid {
        column-count: 3;
    }

    #legal {
        column-count: 3;
    }

    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .project-grid {
        column-count: 2;
    }

    #legal {
        column-count: 2;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 680px) {
    :root {
        --padding-x: 1.5em;
        font-size: .875em;
    }

    #overview {
        height: auto;
    }

    .project-grid {
        column-count: 1;
    }

    #legal {
        column-count: 1;
    }

    .footer-grid {
        grid-template-columns: repeat(1, 1fr);
    }

    .footer-main {
        grid-column: span 1;
    }

    #overview {
        flex-direction: column;
        min-height: auto;
        padding-bottom: 4rem;
    }

    #projects {
        padding-bottom: 6rem;
    }

    .text-block {
        width: 100%;
        max-width: 26em;
    }

    #canvas,
    .view-toggle-container {
        display: none;
    }

    .portfolio h1 {
        translate: 0 -2em;
    }

    .portfolio #projects h2 {
        top: 4.2rem;
    }

    .portfolio #projects .filters {
        top: 7rem;
    }

    .portfolio .header-gradient {
        top: -7.7rem;
    }

    .tile {
        transition: none;
        mix-blend-mode: normal;
        margin-bottom: 4em;
    }

    .portfolio .header-gradient::before {
        content: "";
        display: block;
        width: 100vw;
        height: 7rem;
        position: fixed;
        left: 0;
        top: 7.7rem;
        background: linear-gradient(180deg, var(--bg-projects) 0%, var(--bg-projects-0) 100%);
    }

    .tile div {
        opacity: 1;
        height: fit-content;
        display: inline-flex;
        padding: 0;
        align-items: flex-start;
        gap: .5em;
        border-radius: 0;
        background: none;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        transition: none;
        position: relative;
        left: -.5em;
        top: 2.5em;
    }

    .tile {
        filter: none;
        -webkit-filter: none;
    }

    .tile .title {
        color: var(--fg-primary);
        font-family: "Manrope";
        font-size: 1em;
        font-style: normal;
        font-weight: 500;
        line-height: 1.45em;
        position: relative;
        top: -0.05em;
    }

    .tile .year {
        color: var(--fg-primary);
        opacity: 0.7;
        font-family: "Inter";
        font-size: 0.65em;
        font-style: normal;
        font-weight: 400;
        position: relative;
        top: 0.3em;
    }

    #project {
        flex-direction: column-reverse;
    }

    #meta-container {
        width: 100%;
        position: relative;
        top: 0;
    }

    #scroll-overlay {
        display: none;
    }

}