@font-face {
	font-family: 'Arial';
	src: url(../fonts/arial_narrow-webfont.woff2);
}
@font-face {
	font-family: 'Times';
	src: url(../fonts/times_new_roman-webfont.woff);
}
@font-face {
	font-family: 'Times Italic';
	src: url(../fonts/times_new_roman_italic-webfont.woff);
}
@font-face {
	font-family: 'Times Small Text';
	src: url(../fonts/Times-Small-Text-MT-Std-Regular.woff2);
}
:root {
    --backgroundcolor: rgb(255, 255, 255);
    --buttoncolor: #ffffff;
    --buttonhovercolor: var(--backgroundcolor);
    --textcolor: black;
    --accentcolor: blue;
    --buttonShadow: 0px 7px 15px rgba(0, 0, 0, 0.2);
    --borderRadius01: 5px;
    --borderRadius02: calc(var(--borderRadius01) + 0.9rem);
    --bodytextsize: 9pt;
}
* {
    margin: 0;
    box-sizing: border-box;
}
::selection {
    background: none;
}
main {
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
}

html {
    overflow: hidden;
    height: 100vh;
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
}
body {
    overflow: scroll;
    height: 100vh;
    /* background-color: var(--backgroundcolor); */
    font-weight: unset;
    position: relative;
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
}
p {
    font-family: "Times Small Text";
    font-size: var(--bodytextsize);
}
a {
    font-size: var(--bodytextsize);
    text-decoration: none;
    color: var(--textcolor);
    font-family: "Times Small Text";
}
img {
    pointer-events: none;
    display: block;
    width: 100%;
    /* height: 100%; */
    object-fit: cover;
}
/* Homepage: dedicated scroll container so scroll always works */
.homepage-scroll-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100svh;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    z-index: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.homepage-scroll-wrapper::-webkit-scrollbar {
    display: none;
}

.homepage-scroll-content {
    width: 100%;
    height: 200vh;
    height: 200svh;
}

/* Homepage viewer: single image carousel + scroll-reveal overlay */
.homepage-viewer {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100svh;
    overflow: hidden;
}

.homepage-image-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100svh;
    transform-origin: top center;
    transform: scaleY(1);
    z-index: 1;
    transition: none;
}

.homepage-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.homepage-click-zone {
    position: fixed;
    left: 0;
    width: 100%;
    z-index: 100;
    cursor: pointer;
}

.homepage-click-prev {
    top: 0;
    height: 50%;
}

.homepage-click-next {
    top: 50%;
    height: 50%;
}

.homepage-project-overlay {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    transform: translateY(100%);
    z-index: 50;
    overflow: auto;
    pointer-events: auto;
    transition: none;
}

.homepage-scroll-spacer {
    width: 100%;
    pointer-events: none;
}

body.homepage-body,
body.homepage-body main {
    scroll-snap-type: none;
}

body.homepage-body {
    overflow-y: auto;
    overflow-x: hidden;
    height: 100vh;
    height: 100svh;
}

body.homepage-body main {
    min-height: 200vh;
    min-height: 200svh;
}

.project-card {
    height: 100vh;
}
.project-card-image {
    height: 100vh;
}
a:hover {
    cursor: pointer;
    color: #666;
}
.gradient-overlay {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100svh; /* Use small viewport height for iOS Safari */
    z-index: 500;
    mix-blend-mode: difference;
    pointer-events: none;
}

.gradient-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 300px;
    background: linear-gradient(
        to top,
        white,
        white,
        rgba(255, 255, 255, 0),
        rgba(255, 255, 255, 0)
    );
    z-index: 1000;
}
.gradient-top {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 300px;
    background: linear-gradient(
        to bottom,
        white,
        white,
        rgba(255, 255, 255, 0),
        rgba(255, 255, 255, 0)
    );
    z-index: 1000;
}
.blur-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 600;
    pointer-events: none;
}

.blur-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 220px;
    background-color: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(13px);
    -webkit-backdrop-filter: blur(13px);
    mask-image: linear-gradient(
        to bottom,
        transparent,
        white,
        white);
}
.blur-top {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 220px;
    background-color: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(13px);
    -webkit-backdrop-filter: blur(13px);
    mask-image: linear-gradient(
        to top,
        transparent,
        white,
        white);
}
.logo {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 160px;
    height: auto;
    z-index: 3000;
    mix-blend-mode: difference;
    padding: 0.8rem;
    opacity: 0.5;
    /* padding: 20px 120px 20px 120px; */
}
/* Hide scrollbar for infinite scrolling */
html {
    overflow-x: hidden;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    -webkit-overflow-scrolling: touch; /* iOS smooth scrolling */
}

html::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
    width: 0;
    height: 0;
}

body {
    overflow-x: hidden;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    -webkit-overflow-scrolling: touch; /* iOS smooth scrolling */
}

body::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
    width: 0;
    height: 0;
}

/* Mobile-specific scrollbar hiding and iOS Safari viewport fixes */
@media screen and (max-width: 768px) {
    html, body {
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
        width: 100% !important;
    }
    
    html::-webkit-scrollbar,
    body::-webkit-scrollbar {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
        background: transparent !important;
    }
    
    /* Hide scrollbar on mobile Safari */
    html, body {
        -webkit-appearance: none;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        -khtml-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }
    
    /* iOS Safari specific fixes */
    @supports (-webkit-touch-callout: none) {
        .stage {
            height: 100svh !important;
        }
        
        .container {
            height: 100svh !important;
        }
        
        .gradient-overlay {
            height: 100svh !important;
        }
    }
    
}

/* Vertical 3D Carousel Styles */
.stage {
    height: 100vh;
    height: 100svh; /* Use small viewport height for iOS Safari */
    width: 100%;
    position: relative;
    overflow: hidden;
    /* background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%); */
}


.container {
    perspective: 1450px;
    width: 100%;
    height: 100vh;
    height: 100svh; /* Use small viewport height for iOS Safari */
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: scale(var(--container-zoom, 1));
    transform-origin: center center;
}


.ring {
    position: relative;
    width: 200px;
    height: 200px;
    transform-style: preserve-3d;
    opacity: 0;
    transform: translateY(30px);
}

.item {
    position: absolute;
    width: var(--card-width, 200px);
    height: var(--card-height, 300px);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transform-style: preserve-3d;
    cursor: pointer;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
}

/* Desktop - Much bigger cards */
@media only screen and (min-width: 701px) {
    .ring {
        width: 400px;
        height: 400px;
    }

    .item {
        width: var(--card-width, 400px);
        height: var(--card-height, 600px);
    }

}

.project-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
}
.project-link:hover {
    cursor: pointer;
}

.project-card {
    width: 100%;
    height: 100%;
    background: white;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    scroll-snap-align: start;
}

.project-card img {
    width: 100%;
    /* height: 100%; */
    object-fit: cover;
}

.project-info {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: left;
    align-items: left;
    text-align: left;
}

.project-info h3 {
    font-family: "Times Small Text";
    font-weight: bold;
    margin-bottom: 5px;
    color: var(--textcolor);
    text-align: left;
}

.project-info .year {
    font-family: "Times Small Text";
    font-size: var(--bodytextsize);
    color: #666;
    text-align: left;
    width: fit-content;
}

/* Hover effects */
.item:hover .project-card {
    /* transform: translateY(-0px); */
    cursor: pointer;
}

/* Active project indicator (for debugging) */
.item[data-active="true"] .project-card {
    /* border: 3px solid #007acc; */
    /* box-shadow: 0 0 20px rgba(0, 122, 204, 0.5); */
}

/* No projects fallback */
.no-projects {
    text-align: center;
    color: var(--textcolor);
}

.no-projects h2 {
    font-family: "Times Small Text";
    margin-bottom: 10px;
}

.no-projects p {
    font-family: "Times Small Text";
    color: #666;
}
.project-overlay * {
    line-height: 1;
    font-size: var(--bodytextsize);
    font-family: "Times Small Text";
}
/* Project Info Overlay */
.project-overlay {
    background: white;
    text-align: left;
    pointer-events: none;
    /* background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(13px); */
    padding: 0.8rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* justify-content: space-between; */
    gap: 2rem;
    row-gap: 15rem;
    /* align-items: center; */
    width: auto;
    min-height: 100%;
    max-width: 100vw;
    filter: invert(1);
}
.project-overlay * {
    color: grey;
}

.project-overlay.expanded {
    gap: 60px;
    width: calc(100% - 40px);
    align-items: baseline;
}
.project-infos-general {
    white-space: nowrap;
}
.project-infos-imprint {
    grid-column: 2 / span 2;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.project-overlay.expanded .project-infos-general {

}

#overlay-title {
    text-align: left;
    text-wrap: nowrap;
}
.project-overlay .year {
    text-align: left;
}
.project-infos-description {
    flex-grow: 1;
}
.project-infos-credits {
    padding: 0;
    /* border-radius: 10px; */
    /* background: rgba(0, 0, 0, 0.1); */
    /* border: 1px solid rgba(0, 0, 0, 0.1); */
}
.project-infos-credits hr {
    width: 100%;
    height: 1px;
    border: none;
    background: rgba(0, 0, 0, 0.2);
    margin: 5px 0;
}
.project-infos-credits hr:last-of-type {
    display: none;
}
.project-credits-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
    width: 100%;
}
.project-overlay.expanded .project-infos-description {
    opacity: 1;
    width: 40%;
    max-height: 500px;
}
.project-overlay.expanded .project-infos-credits {
    opacity: 1;
    /* padding: 10px; */
    /* width: 100%; */
    width: fit-content;
    flex-grow: 1;
    max-height: 500px;
}
.project-overlay h2 {
    font-family: "Times Small Text";
    font-size: var(--bodytextsize);
    margin: 0;
    font-weight: unset;
}

.project-overlay .year {
    font-family: "Times Small Text";
    font-size: var(--bodytextsize);
    color: #666;
}
.openclose {
    /* flex-grow: 1; */
    text-align: right;
    cursor: pointer;
    pointer-events: auto;
    user-select: none;
    transition: transform 0.3s ease;
    padding: 2px 5px;
    padding-top: 5px;
    padding-bottom: 2px;
    /* margin: -10px -15px; */
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: fit-content;
    background: greenyellow;
    margin-left: auto;
    border-radius: 50%;
    zoom: 0.7;
}
.openclose-symbol {
    opacity: 0;
}
.openclose:hover {
}

.openclose:active {
}

.openclose *{
    font-family: "Times Small Text";
    font-size: var(--bodytextsize);
    color: black;
    line-height: 1;
}
/* PROJECT PAGE STYLES */
.project-imgs-container {
    /* width: 48vw; */
    /* max-height: 5vh; */
    position: fixed;
    top: 50%;
    left: 50%;
    translate: -50% -50%;
    /* padding: 550px; */
}
.images-container {
    display: flex;
    flex-direction: row;
    gap: 0;
}
.project-image-container {
    width: 100%;
    max-height: 100%;
    object-fit: cover;
}
.project-image {
    width: 13vw;
    height: auto;
    object-fit: cover;
}
.project-image:hover {
    cursor: pointer;
    filter: invert(1);
}
.projectpage-bg-blur {
    width: 100%;
    height: 100dvh;
}
iframe {
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 2000;
    background-color: rgba(255, 255, 255, 0.4);
    /* backdrop-filter: blur(13px);
    -webkit-backdrop-filter: blur(13px); */
}
.close-project {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 2000;
    color: black;
}


/* Responsive adjustments */
@media only screen and (max-width: 700px) {
    #overlay-title {
        text-wrap: wrap;
        width: 95%;
    }
    .project-overlay {
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }
    .project-infos-imprint {
        margin-top: 10rem;
    }
    .project-infos-description {
        /* width: 100% !important; */
    }
    .project-overlay.expanded .project-infos-general {
        display: flex;
        gap: 20px;
    }
    .project-overlay.expanded .project-infos-credits {
        width: 100% !important;
    }
    .openclose {
        margin: 0 auto;
    }
    .project-overlay.expanded {
        gap: 20px;
    }
    .project-overlay.expanded .project-infos-description {
        width: 100% !important;;
    }
    .project-card img {
        /* height: 280px; */
    }
    
    .project-info {
        display: none; /* Hide project info inside cards on mobile since we have overlay */
    }
    .gradient-overlay {
        display: none;
    }
    .gradient-bottom {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 250px;
        background: linear-gradient(
            to top,
            white,
            white,
            rgba(255, 255, 255, 0),
            rgba(255, 255, 255, 0)
        );
        z-index: 1000;
    }
    .gradient-top {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 250px;
        background: linear-gradient(
            to bottom,
            white,
            white,
            rgba(255, 255, 255, 0),
            rgba(255, 255, 255, 0)
        );
        z-index: 1000;
    }
    .blur-bottom {
        height: 170px;
    }
    .blur-top {
        height: 170px;
    }
    .project-image {
        max-width: 20vw;
        width: auto;
    }

}