@font-face {
    font-family: 'Sole Serif';
    src: url('fonts/Sole Serif Small Caption Light Italic.ttf') format('truetype');
    font-weight: normal;
    font-style: italic;
}

@font-face {
    font-family: 'Elza Round';
    src: url('fonts/Elza Round Variable Light.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

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

body {
    background-color: #514535;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
    font-family: 'Sole Serif', serif;
}

.container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Pink overlay images */
.pink-overlay {
    position: absolute;
    pointer-events: none;
    z-index: 1;
    background-size: contain;
    background-repeat: no-repeat;
}

.overlay-1 {
    width: 130vw;
    height: 130vh;
    bottom: -60vh;
    left: -12vw;
    transform: rotate(35deg);
    background-image: url('images/oelschiefer-7116-rosa 1.png');
}

.overlay-2 {
    width: 140vw;
    height: 140vh;
    top: -40vh;
    right: -78vw;
    transform: rotate(-10deg);
    background-image: url('images/oelschiefer-7122-rosa 1.png');
}

/* Text content */
.text-content {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: 101;
    pointer-events: none;
}

.text-content .title {
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Sole Serif', serif;
    font-style: italic;
    font-weight: 300;
    font-size: 162px;
    color: rgb(238, 254, 63);
    letter-spacing: 0.05em;
    margin: 0;
    white-space: nowrap;
}

.text-content .about {
    position: absolute;
    left: 30px;
    top: 0;
    font-family: 'Sole Serif', serif;
    font-style: italic;
    font-weight: 300;
    font-size: 80px;
    color: #EEFE3F;
    letter-spacing: 0.05em;
    margin: 0;
    pointer-events: auto;
    cursor: pointer;
}

.text-content .sorted {
    position: absolute;
    top: 0;
    right: 30px;
    font-family: 'Sole Serif', serif;
    font-style: italic;
    font-weight: 300;
    font-size: 80px;
    color: #EEFE3F;
    letter-spacing: 0.05em;
    margin: 0;
    pointer-events: auto;
    cursor: pointer;
}

.category-title {
    position: absolute;
    bottom: -15px;
    right: 30px;
    font-family: 'Sole Serif', serif;
    font-style: italic;
    font-weight: 300;
    font-size: 162px;
    letter-spacing: 0.05em;
    margin: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease-out;
    z-index: 108;
}

/* Category overlays */
.category-gallery-overlay {
    position: fixed;
    right: 5%;
    top: 0;
    width: 45%;
    height: 100vh;
    z-index: 103;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease-out;
    filter: drop-shadow(0px -4px 4px rgba(0, 0, 0, 0.25)) drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.25));
}

.gallery-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gallery-image-wrapper {
    height: 60%;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    margin-top: 20%;
}

.gallery-image {
    width: 100%;
    height: 100%;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.gallery-image-description {
    position: absolute;
    bottom: 24px;
    left: 40px;
    font-family: 'elzaregular', Arial, sans-serif;
    font-size: 26px;
    opacity: 0.8;
    max-width: 400px;
    line-height: 1;
}

.gallery-arrow {
    background: none;
    border: none;
    font-size: 48px;
    color: inherit;
    cursor: pointer;
    padding: 10px;
    transition: opacity 0.3s ease;
    flex-shrink: 0;
    pointer-events: auto;
}

.gallery-arrow:hover:not(:disabled) {
    opacity: 0.7;
}

.gallery-arrow:disabled {
    opacity: 0.3;
    cursor: default;
}

.category-text-overlay {
    position: fixed;
    right: 0;
    top: 0;
    width: 45%;
    height: 100vh;
    z-index: 104;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease-out;
    overflow-y: auto;
    scrollbar-width: none;
    filter: drop-shadow(0px -4px 4px rgba(0, 0, 0, 0.25));
}

.category-text-overlay::-webkit-scrollbar {
    display: none;
}

/* Project view navigation bar */
.project-nav-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 10vh;
    z-index: 106;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease-out;
    display: flex;
    align-items: center;
    padding: 0 40px;
    gap: 20px;
    background: transparent;
}

/* Project overlays (horizontal) */
.project-gallery-overlay {
    position: fixed;
    left: 0;
    bottom: 10%;
    width: 100%;
    height: 80%;
    z-index: 105;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease-out;
    filter: drop-shadow(4px 0px 4px rgba(0, 0, 0, 0.25)) drop-shadow(-4px 0px 4px rgba(0, 0, 0, 0.25));
}

.project-gallery-overlay .gallery-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
}

.project-gallery-overlay .gallery-image-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 80%;
    align-self: flex-start;
    margin-top: 3%;
}

.project-gallery-overlay .gallery-image {
    width: 100%;
    height: 100%;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.project-text-overlay {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 70%;
    z-index: 105;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease-out;
    overflow-y: auto;
    scrollbar-width: none;
    filter: drop-shadow(4px 0px 4px rgba(0, 0, 0, 0.25));
}

.project-text-overlay::-webkit-scrollbar {
    display: none;
}

.project-text-container {
    display: flex;
    width: 100%;
    min-height: 100%;
    padding: 42px 60px 200px 42px;
    box-sizing: border-box;
    gap: 60px;
}

.project-text-left {
    width: 33.33%;
    flex-shrink: 0;
    position: relative;
}

.project-text-right {
    width: 66.67%;
    flex-shrink: 0;
}

.project-title {
    font-family: 'Sole Serif', serif;
    font-weight: 400;
    font-size: 69px;
    margin: 0 0 20px 0;
    line-height: 1;
}

.project-authors {
    font-family: 'Sole Serif', serif;
    font-weight: 400;
    font-size: 50px;
    margin: 0 0 30px 0;
    line-height: 1;
}

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

.project-paragraph {
    font-family: 'elzaregular', Arial, sans-serif;
    font-size: 35px;
    line-height: 1.1;
    width: 80%;
    margin-bottom: 30px;
}

.project-description {
    font-family: 'elzaregular', Arial, sans-serif;
    font-size: 35px;
    line-height: 1.1;
    width: 80%;
}

.category-text-overlay::-webkit-scrollbar {
    display: none;
}

.category-headline {
    font-family: 'Sole Serif', serif;
    font-size: 88px;
    font-weight: 400;
    line-height: 1;
    margin: 0 0 15px 0;
}

.category-subheadline {
    font-family: 'Sole Serif', serif;
    font-size: 58px;
    font-weight: 400;
    line-height: 1;
    margin: 0 0 40px 0;
}

.category-text-content {
    font-family: 'Elza Round', sans-serif;
    font-size: 35px;
    font-weight: 300;
    line-height: 1.1;
    margin: 0;
}

/* Floating images container */
.floating-images {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 80;
    pointer-events: none;
}

.floating-item {
    position: absolute;
    transition: transform 0.5s ease-out, opacity 0.3s ease;
    cursor: pointer;
    will-change: transform;
    pointer-events: auto;
}

.floating-item img {
    display: block;
    max-width: 100%;
    height: auto;
    user-select: none;
    -webkit-user-drag: none;
}

/* Size variations */
.small-item img {
    max-width: 83px;
}

.medium-item img {
    max-width: 124px;
}

/* Default hover effect for overview and sorted view - yellow #EEFE3F */
.medium-item:hover img,
.medium-item.hover-silhouette img {
    filter: brightness(0) saturate(100%) invert(88%) sepia(34%) saturate(813%) hue-rotate(12deg) brightness(105%) contrast(106%);
}

/* Category view hover - uses dynamic color from CSS variable based on category */
.category-rock:hover img {
    filter: var(--category-silhouette-filter, brightness(0) saturate(100%) invert(54%) sepia(89%) saturate(2349%) hue-rotate(325deg) brightness(101%) contrast(101%));
}

/* Project view hover - uses dynamic color from CSS variable */
.project-view-rock:hover img {
    filter: var(--project-silhouette-filter, brightness(0) saturate(100%) invert(54%) sepia(89%) saturate(2349%) hue-rotate(325deg) brightness(101%) contrast(101%));
}

/* Active project rock - uses dynamic color from CSS variable */
.medium-item.active-project-rock img {
    filter: var(--project-silhouette-filter, brightness(0) saturate(100%) invert(54%) sepia(89%) saturate(2349%) hue-rotate(325deg) brightness(101%) contrast(101%));
}

.medium-item.category-rock {
    opacity: 1;
    transition: opacity 0.3s ease-out;
}

.medium-item.category-rock:hover {
    opacity: 1 !important;
}

.category-hover-title {
    position: fixed;
    bottom: 30px;
    left: 42px;
    font-family: 'Sole Serif', serif;
    font-size: 35px;
    font-style: italic;
    font-weight: 300;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 108;
    max-width: 600px;
    line-height: 1;
}

.main-item img {
    max-width: 336px;
}

/* Hover effects */
.main-item {
    z-index: 10;
}

.main-item:hover {
    z-index: 20;
    transform: scale(1.05);
}

.main-item.locked-category:hover {
    transform: none;
}

.main-item.active-category {
    opacity: 1 !important;
}

.main-item.active-category:hover {
    transform: none;
    opacity: 1 !important;
}

.floating-item.dimmed {
    transform: none !important;
    opacity: 0.6;
}

.main-item.dimmed-main {
    opacity: 0.6;
}

/* Link styling */
a.floating-item {
    text-decoration: none;
}

/* Animation pause class */
.paused {
    animation-play-state: paused !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .text-content .title {
        font-size: 60px;
    }
    
    .text-content .about,
    .text-content .sorted {
        font-size: 40px;
    }
    
    .small-item img {
        max-width: 80px;
    }
    
    .medium-item img {
        max-width: 120px;
    }
    
    .main-item img {
        max-width: 180px;
    }
}

/* About overlay */
.about-overlay {
    position: fixed;
    left: -50vw;
    top: 0;
    width: 50vw;
    height: 100vh;
    background-color: #514535;
    z-index: 100;
    overflow: hidden;
    transition: left 0.5s ease-out;
    filter: drop-shadow(0px 4px 8px rgba(0, 0, 0, 0.25));
}

.about-overlay.active {
    left: 0;
}

.about-scroll-container {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.about-scroll-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.about-content-wrapper {
    width: 75%;
    margin-left: 30px;
    padding: 130px 0;
}

.about-text {
    font-family: 'Elza Round';
    font-size: 35px;
    font-weight: 300;
    color: #FFD5F4;
    line-height: 1.1;
    margin-bottom: 25px;
}

.about-footer-links {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 60px;
    padding-bottom: 60px;
    line-height: 1;
}

.about-footer-link {
    font-family: 'Sole Serif', serif;
    font-style: normal;
    font-weight: 400;
    font-size: 40px;
    color: #EEFE3F;
    text-decoration: none;
    transition: color 0.3s ease;
}

.about-footer-link:hover {
    color: #E475C3;
}

.about-close-button {
    position: absolute;
    top: 30px;
    right: 30px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 110;
    padding: 0;
}

.about-close-button img {
    filter: brightness(0) saturate(100%) invert(88%) sepia(34%) saturate(813%) hue-rotate(12deg) brightness(105%) contrast(106%);
}

.about-text strong {
    font-weight: 500;
}

/* Sorted overlay */
.sorted-overlay {
    position: fixed;
    right: -100vw;
    top: 0;
    width: 100vw;
    height: 100vh;
    background-color: #514535;
    z-index: 70;
    overflow: hidden;
    transition: right 0.5s ease-out;
}

.sorted-overlay.active {
    right: 0;
}

.sorted-content {
    width: 100%;
    height: 100%;
    padding: 80px 100px 300px 100px;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.sorted-content::-webkit-scrollbar {
    display: none;
}

.sorted-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.sorted-table tr {
    border-bottom: 1px solid rgba(238, 254, 63, 0.2);
    cursor: pointer;
}

.sorted-table td {
    padding: 30px 20px;
    vertical-align: bottom;
}

.sorted-image-cell {
    width: 150px;
}

.sorted-image-cell img {
    width: 100px;
    height: auto;
    display: block;
}

.sorted-image-placeholder {
    width: 100px;
    height: 100px;
    display: block;
}

.sorted-image-placeholder img {
    transition: transform 0.3s ease;
}

.sorted-table tr:hover .sorted-image-placeholder img {
    transform: rotate(90deg);
}

.sorted-title-cell {
    width: 40%;
    font-family: 'Sole Serif', serif;
    font-weight: 500;
    font-size: 55px;
    line-height: 1;
    color: #FDC2EE;
    transition: color 0.3s ease;
}

.sorted-table tr:hover .sorted-title-cell {
    color: #EEFE3F;
}

.sorted-author-cell {
    width: 20%;
    font-family: 'Elza Round';
    font-weight: 300;
    font-size: 31px;
    line-height: 1;
    color: #E475C3;
    white-space: pre-line;
    transition: color 0.3s ease;
}

.sorted-table tr:hover .sorted-author-cell {
    color: #EEFE3F;
}

.sorted-tags-cell {
    width: 20%;
    font-family: 'Elza Round';
    font-weight: 300;
    font-size: 31px;
    line-height: 1;
    white-space: normal;
}

.category-tag-pill {
    display: inline-block;
    padding: 4px 12px;
    background-color: #E475C3;
    color: #514535;
    border-radius: 20px;
    margin: 2px;
    white-space: nowrap;
    transition: background-color 0.3s ease;
    cursor: pointer;
}

.category-tag-pill:hover {
    background-color: #EEFE3F;
}

/* Glossary Terms */
.glossary-term {
    position: relative;
    text-decoration: none;
    cursor: help;
    display: inline-block;
    /* Color will be set inline via JavaScript using category's titleGallery color */
}

.glossary-term:hover {
    opacity: 1;
}

.glossary-tooltip {
    position: absolute;
    top: -4px;
    left: -8px;
    padding: 0;
    border-radius: 0;
    border: none;
    white-space: normal;
    min-width: 405px;
    width: fit-content;
    max-width: 600px;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 99999;
    box-shadow: none;
    filter: drop-shadow(-4px 0px 4px rgba(0, 0, 0, 0.25));
    /* Background and text color will be set inline via JavaScript */
}

.glossary-tooltip-title {
    font-weight: inherit;
    font-size: inherit;
    line-height: inherit;
    font-family: inherit;
    padding: 4px 8px;
    margin: 0;
    white-space: nowrap;
}

.glossary-tooltip-text {
    font-family: 'Elza Round';
    font-weight: 300;
    font-size: 26px;
    line-height: 1.1;
    padding: 0 8px 12px 8px;
    margin: 0;
}

.glossary-term:hover .glossary-tooltip {
    opacity: 1;
    visibility: visible;
}
