* {
    box-sizing: border-box;
}

/* Page sections for combined layout */
.page-section {
    width: 100%;
    position: relative;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
}

a {
    text-decoration: none;
}

p {
    margin: 0;
    font-family: var(--secondary-font-family);
}

h3 {
    font-weight: 400;
    margin: 0;
}

h4 {
    margin: 0;
    font-weight: 400;
    font-size: var(--text-2xl);
    line-height: 125%;
    font-family: var(--secondary-font-family);
}

h5 {
    font-weight: 400;
    margin: 0;
}

button {
    margin: 0;
    border: none;
}


/* Nav bar */
.nav-bar {
    display: flex;
    position: fixed;
    width: 100vw;
    left: 50%;
    justify-content: start;
    transform: translateX(-50%);
    padding: var(--spacing-md);
    bottom: 0;
    flex-direction: row;
    transform: translateX(-50%);
    gap: var(--spacing-sm);
    z-index: 10;
}

.email-container {
    font-family: var(--secondary-font-family);
    line-height: 140%;
    padding: var(--button-padding);
    border-radius: var(--radius-full);
    background-color: var(--primary-colour);
    color: var(--surface);
    width: fit-content;
    font-size: var(--text-base);
    text-decoration: none !important;
    -webkit-text-decoration: none !important;
}

.menu-button {
    display: flex;
    height: var(--space-8);
    font-family: var(--secondary-font-family);
    line-height: 140%;
    padding: var(--button-padding);
    border-radius: var(--radius-full);
    background-color: var(--surface);
    color: var(--primary-colour);
    border: 1px solid var(--secondary-colour);
    font-size: var(--text-base);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    transition: 350ms cubic-bezier(0.42, 1.67, 0.21, 0.90);
}

.scrim {
    position: fixed !important;
    width: 100vw;
    height: 100vh;
    background-color: var(--on-surface);
    opacity: 0.4;
    z-index: 9;
    top: 0;
    left: 0;
}

.website-menu-container {
    display: flex;
    flex-direction: column;
    position: fixed;
    left: var(--spacing-md);
    bottom: calc(var(--spacing-md) * 2 + var(--text-base) * 1.4 + var(--spacing-sm));
    z-index: 10;

}

.menu-image-container {
    background-color: aqua;
}

.menu-header {
    padding-left: var(--spacing-md);
    padding-top: var(--spacing-md);
}

.menu-project-container {
    display: flex;
    flex-direction: column;
    padding: var(--spacing-xl);
    border-radius: var(--radius-md);
    background-color: var(--surface);
    gap: var(--spacing-sm);
    cursor: pointer;
}

.menu-project-list-item {
    font-family: var(--secondary-font-family);
    font-size: var(--text-lg);
    line-height: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-full);
    transition: 300ms cubic-bezier(0.2, 0.0, 0, 1.0);
}

.menu-project-list-item:hover {
    background-color: var(--surface-hover);
}

/* New header css */

.pre-wrapper {
    background-color: var(--surface);
}

.page-wrapper {
    max-width: 1440px;
    margin: 0 auto;
    gap: var(--section-gap);
}

.hero-image {
    width: 100%;
    height: auto;
    margin: 0;
    display: block;
}

.hero-text-container {
    display: flex;
    padding: var(--container-padding);
    gap: var(--spacing-lg);
    margin: 0 auto;
}

.hero-headline {
    flex: 2;
    font-family: var(--primary-font-family);
    font-size: var(--text-3xl);
}

.highlight {
    color: var(--primary-colour);
}

.paragraph-container {
    display: flex;
    flex: 1;
    flex-direction: column;
    font-family: var(--secondary-font-family);
    gap: var(--space-3);
}

.hero-paragraph {
    font-size: var(--text-xl);
    line-height: 140%;
    color: var(--on-surface)
}

.hero-description {
    font-size: var(--text-xs);
    line-height: 140%;
    color: var(--on-surface-variant)
}

.discipline-tag {
    background-color: var(--surface-container);
    border-radius: var(--radius-sm);
    padding: var(--tag-padding);
    white-space: nowrap;
}

.section-container {
    display: flex;
    align-items: flex-start;
    padding: var(--container-padding);
    gap: var(--spacing-lg);
    margin: 0 auto;
}

.section-title {
    flex: 2;
}

/* Project block CSS */

.project-wrapper {
    display: flex;
    max-width: 1440px;
    margin: 0 auto;
    padding: var(--container-padding);
    gap: var(--section-gap);
}

.project-title-sticky {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: var(--spacing-xxl) 0 var(--section-gap) 0;
    font-family: var(--primary-font-family);
    font-size: 2.5rem;
    line-height: 90%;
    gap: var(--space-3);
    position: sticky;
    top: 0;
    align-self: flex-start;
    height: fit-content;
}

.secondary-highlight {
    color: var(--secondary-colour);
}

a.see-more-button {
    font-family: var(--secondary-font-family);
    font-size: var(--text-lg);
    line-height: 140%;
    padding: var(--button-padding);
    border-radius: var(--radius-full);
    background-color: var(--negative-surface-container);
    color: var(--on-negatve-surface-container);
    width: fit-content;
    cursor: pointer;
    user-select: none;
    transition: 300ms cubic-bezier(0.2, 0.0, 0, 1.0);
}

a.see-more-button:hover {
    background-color: var(--negative-surface-container-hover);

}

.project-content {
    display: flex;
    flex-direction: column;
    flex: 3;
    padding: var(--spacing-xxl) 0;
    gap: var(--content-gap);
}

.project-description {
    display: flex;
    gap: var(--content-gap);
    padding-bottom: var(--content-gap);
}

.description-paragraph {
    display: flex;
    flex: 1;
    color: var(--on-surface)
}

/* Page structure styles */
.page-title-container {
    display: block;
    gap: var(--spacing-xs);
    font-family: var(--primary-font-family);
    font-size: var(--text-3xl);
    align-items: center;
    justify-self: center;
}

.title-home-button {
    font-weight: 300;
    background-color: #F1F1FF;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 200ms cubic-bezier(0.34, 0.80, 0.34, 1.00);
}

.title-home-button:hover {
    background-color: #e4e4ff;
}

.content-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0px var(--space-35);
    gap: var(--content-gap)
}

.text-content {
    display: flex;
    flex-direction: column;
    padding: var(--space-12) 0px;
    max-width: 680px;
    gap: var(--spacing-sm);
}

.body-paragraph,
.overline {
    font-family: var(--secondary-font-family);
    text-align: left;
    color: #333;
    margin: 0;
}

.overline {
    font-size: var(--text-xs);
}

.body-paragraph {
    font-size: var(--text-xl);
    line-height: 140%;
}

/* ==========================================
           MODULAR MEDIA ASSET SYSTEM
           ========================================== */

/* Base media container - works for both images and videos */
.media-container {
    width: 100%;
    height: 0;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: #f0f0f0;
    /* Fallback color while loading */
}

/* Media elements (both img and video) */
.media-container img,
.media-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Aspect ratio classes */
.aspect-1x1 {
    padding-bottom: 100%;
    /* 1:1 */
}

.aspect-2x1 {
    padding-bottom: 50%;
    /* 2:1 */
}

.aspect-16x9 {
    padding-bottom: 56.25%;
    /* 16:9 */
}

.aspect-9x16 {
    padding-bottom: 177.78%;
    /* 9:16 (portrait) */
}

.aspect-4x3 {
    padding-bottom: 75%;
    /* 4:3 */
}

.aspect-4x5 {
    padding-bottom: 125%;
    /* 4:5 (portrait) */
}

/* Layout utilities */
.image-content {
    display: flex;
    flex-direction: column;
    gap: var(--content-gap);
    width: 100%;
}

.image-row {
    display: flex;
    width: 100%;
    gap: var(--content-gap);
    align-items: stretch;
}

/* Flex sizing for row items based on aspect ratios */
.flex-1 {
    flex: 1;
}

.flex-1-33 {
    flex: 1.33;
}

/* You can add more flex ratios as needed */
.flex-1-5 {
    flex: 1.5;
}

.flex-2 {
    flex: 2;
}

.flex-3 {
    flex: 3;
}

.flex-4 {
    flex: 4;
}

.flex-5 {
    flex: 5;
}

.flex-6 {
    flex: 6;
}

.flex-7 {
    flex: 7;
}

.flex-8 {
    flex: 8;
}

.flex-9 {
    flex: 9;
}

.flex-10 {
    flex: 10;
}

.flex-12 {
    flex: 12;
}

.flex-15 {
    flex: 15;
}

.flex-16 {
    flex: 16;
}

.flex-18 {
    flex: 18;
}

.flex-20 {
    flex: 20;
}

.flex-27 {
    flex: 27;
}

.flex-32 {
    flex: 32;
}

.flex-36 {
    flex: 36;
}

/* Exact values for all combinations */
.flex-11 {
    flex: 11;
}

.flex-13 {
    flex: 13;
}

.flex-14 {
    flex: 14;
}

.flex-17 {
    flex: 17;
}

.flex-19 {
    flex: 19;
}

.flex-21 {
    flex: 21;
}

.flex-22 {
    flex: 22;
}

.flex-23 {
    flex: 23;
}

.flex-24 {
    flex: 24;
}

.flex-25 {
    flex: 25;
}

.flex-26 {
    flex: 26;
}

.flex-28 {
    flex: 28;
}

.flex-29 {
    flex: 29;
}

.flex-30 {
    flex: 30;
}

.flex-31 {
    flex: 31;
}

.flex-33 {
    flex: 33;
}

.flex-34 {
    flex: 34;
}

.flex-35 {
    flex: 35;
}

.flex-37 {
    flex: 37;
}

.flex-38 {
    flex: 38;
}

.flex-39 {
    flex: 39;
}

.flex-40 {
    flex: 40;
}

.flex-41 {
    flex: 41;
}

.flex-42 {
    flex: 42;
}

.flex-43 {
    flex: 43;
}

.flex-44 {
    flex: 44;
}

.flex-45 {
    flex: 45;
}

.flex-48 {
    flex: 48;
}

.flex-50 {
    flex: 50;
}

.flex-54 {
    flex: 54;
}

.flex-64 {
    flex: 64;
}

.flex-79 {
    flex: 79;
}

.flex-80 {
    flex: 80;
}

.flex-81 {
    flex: 81;
}

.flex-256 {
    flex: 256;
}

/* Optional: Smaller border radius variant */
.media-container.small-radius {
    border-radius: var(--content-gap);
}

/* Optional: No border radius */
.media-container.no-radius {
    border-radius: 0;
}

/* ========================================
   RESPONSIVE BREAKPOINTS
   ======================================== */

/* ======== Tablet: 991px and down ======= */
@media (max-width: 991px) {
    /* Keep all layouts as rows on tablet - just adjust spacing and sizing */

    /* Remove sticky behavior on tablet for better scrolling */
    .project-title-sticky {
        position: relative;
    }

    /* Reduce project content padding on tablet */
    .project-content {
        padding: var(--spacing-xl) var(--spacing-xl);
    }

    /* Discipline tags - allow wrapping */
    .hero-description {
        display: flex;
        flex-wrap: wrap;
        gap: var(--spacing-xs);
    }

    /* Image rows - allow wrapping for better tablet layout */
    .image-row {
        flex-wrap: wrap;
    }
}

@media (max-width: 834px) {
    .hero-paragraph {
        font-size: var(--text-base);
    }

    /* Project wrapper - stack title and content */
    .project-wrapper {
        flex-direction: column;
        gap: var(--spacing-lg);
        padding: var(--spacing-md);
    }

    .project-title-sticky {
        position: relative;
        flex: none;
        padding: 0 0 var(--spacing-lg) 0;
    }

    .project-content {
        flex: none;
        padding: 0;
        gap: var(--spacing-md);
    }

    /* Project description - stack on mobile */
    .project-description {
        gap: var(--spacing-md);
    }

    /* Image rows - stack on mobile */
    .image-row {
        flex-direction: column;
        gap: var(--spacing-md);
        flex-wrap: nowrap;
    }

    /* Reset flex values for image containers to fill width */
    .image-row>* {
        flex: none;
        width: 100%;
    }

    /* Page wrapper adjustments */
    .page-wrapper {
        gap: var(--spacing-md);
    }

    /* Content block adjustments */
    .content-block {
        padding: 0 var(--spacing-sm);
    }

    /* Discipline tags - smaller on mobile */
    .discipline-tag {
        font-size: var(--text-xs);
        padding: calc(var(--spacing-xs) * 0.5) var(--spacing-xs);
    }

    /* Button adjustments */
    .see-more-button {
        font-size: var(--text-sm);
        padding: var(--spacing-sm) var(--spacing-lg);
    }

    /* Typography adjustments for mobile */
    .project-title-sticky {
        font-size: 2rem;
        line-height: 100%;
    }
}

/* ======== Mobile: 600px and down ======== */
@media (max-width: 600px) {
    /* Mobile gets full stacking behavior */

    .nav-bar {
        justify-content: center;
    }

    .website-menu-container {
        right: var(--spacing-md);
    }

    .menu-project-container {
        padding: var(--);
        padding: var(--spacing-md);
    }

    .menu-project-list-item {
        font-size: var(--text-base);
        line-height: 140%;
    }


    h5 {
        font-size: var(--text-3xl);
    }

    /* Hero section - stack headline and paragraph */
    .hero-text-container {
        flex-direction: column;
        gap: var(--spacing-md);
        padding: var(--spacing-lg);
    }

    .hero-headline {
        flex: none;
    }

    .paragraph-container {
        flex: none;
    }

    /* Section containers - stack title and content */
    .section-container {
        flex-direction: column;
        gap: var(--spacing-md);
        padding: var(--spacing-lg);
    }

    .section-title {
        flex: none;
    }

    /* Project wrapper - stack title and content */
    .project-wrapper {
        flex-direction: column;
        gap: var(--spacing-lg);
        padding: var(--spacing-lg);
    }

    .project-title-sticky {
        position: relative;
        flex: none;
        padding: 0 0 var(--spacing-lg) 0;
    }

    .project-content {
        flex: none;
        padding: 0;
        gap: var(--spacing-md);
    }

    /* Project description - stack on mobile */
    .project-description {
        flex-direction: column;
        gap: var(--spacing-md);
    }

    /* Image rows - stack on mobile */
    .image-row {
        flex-direction: column;
        gap: var(--spacing-md);
        flex-wrap: nowrap;
    }

    /* Reset flex values for image containers to fill width */
    .image-row>* {
        flex: none;
        width: 100%;
    }

    /* Page wrapper adjustments */
    .page-wrapper {
        gap: var(--spacing-md);
    }

    /* Content block adjustments */
    .content-block {
        padding: 0 var(--spacing-sm);
    }

    /* Discipline tags - smaller on mobile */
    .discipline-tag {
        font-size: var(--text-xs);
        padding: calc(var(--spacing-xs) * 0.5) var(--spacing-xs);
    }

    /* Button adjustments */
    .see-more-button {
        font-size: var(--text-sm);
        padding: var(--spacing-sm) var(--spacing-lg);
    }

    /* Typography adjustments for mobile */
    .project-title-sticky {
        font-size: 2rem;
        line-height: 100%;
    }
}

.flier {
    pointer-events: none;
}

/* flier animation */

.flier>* {
    /* Adjust animation duration to change the element’s speed */
    animation: fly 50s linear infinite;
    pointer-events: none !important;
    top: 0;
    left: 0;
    transform: translateX(-120%) translateY(-120%) rotateZ(0);
    position: fixed;
    animation-delay: 1s;
    z-index: 999999;
}

/* Keyframe values control where the element will begin
    and end its trajectory across the screen. Each rule
    represents a path the element follows across the screen. */


@keyframes fly {

    98.001%,
    0% {
        display: block;
        transform: translateX(-100%) translateY(100vh) rotateZ(0deg)
    }

    15% {
        transform: translateX(100vw) translateY(-100%) rotateZ(180deg)
    }

    15.001%,
    18% {
        transform: translateX(100vw) translateY(-30%) rotateZ(0deg)
    }

    40% {
        transform: translateX(-100%) translateY(3vh) rotateZ(-180deg)
    }

    40.001%,
    43% {
        transform: translateX(-100%) translateY(-100%) rotateZ(-180deg)
    }

    65% {
        transform: translateX(100vw) translateY(50vh) rotateZ(0deg)
    }

    65.001%,
    68% {
        transform: translateX(20vw) translateY(-100%) rotateZ(180deg)
    }

    95% {
        transform: translateX(10vw) translateY(100vh) rotateZ(0deg)
    }
}

#rive-canvas {
    width: 300px !important;
    height: 300px !important;
    max-width: 300px;
    max-height: 300px;
    display: block;
}

#hero-rive-canvas {
    width: 100% !important;
    display: block;
    aspect-ratio: 360 / 103;

}

.hero-image-container {
    width: 100%;
    position: sticky;
    top: 0;
    z-index: -1;
}