@font-face {
    font-family: 'Josefin Sans';
    src: url('fonts/JosefinSans-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'Fredoka';
    src: url('fonts/Fredoka-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

:root {
    --vtab-w: 30px;
    --vtab-h: 100vh;
    --tabs-size: calc(25 * var(--vtab-w));
    --content-w: calc(100vw - var(--tabs-size));
    --title-top-distance: 30px;
    --image-max-width: 500px;
    --image-max-height: 500px;
    --footer-height: 90px;
    --min-active-width: 30px;
}

body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    overflow: hidden;
}

.main-content {
    display: flex;
    flex-flow: row nowrap;
    width: 100vw;
    height: var(--vtab-h);
    overflow-x: auto;
}

.container {
    position: relative;
    flex: 0 0 var(--vtab-w);
    height: var(--vtab-h);
    overflow: hidden;
    transition: flex 0.4s ease;
    border-left: 1px solid white;
    background-color: var(--project-color, #E6E6E6);
    min-width: 30px;
}

.container:first-child {
    border-left: none;
}

.container .vtab {
    position: absolute;
    top: 0;
    right: 0;
    transform-origin: top right;
    transform: rotate(-90deg) translate(0, -100%);
    width: var(--vtab-h);
    height: var(--vtab-w);
    z-index: 3;
    background-color: none;
}

.container .tab {
    font-size: 0.9em;
    line-height: var(--vtab-w);
    padding-right: 10px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: white;
    text-align: right;
    user-select: none;
}

.container .cwrapper {
    display: none;
    z-index: 1;
}

.container.active {
    flex: 1 1 var(--content-w);
    min-width: var(--min-active-width);
}

.container.active .cwrapper {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
}

.container .content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    height: 100%;
    box-sizing: border-box;
}

.container .content h2 {
    margin: 50px 10px 10px 10px;
    text-align: center;
    white-space: nowrap;
    font-size: 40px;
    color: white;
    line-height: 1;
    user-select: none;
    font-family: 'Josefin Sans', Arial, sans-serif;
    letter-spacing: 0.07em;
}

.image-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.container .content img {
    margin: 10px 10px 10px 10px;
    max-width: var(--image-max-width);
    max-height: var(--image-max-height);
    width: var(--image-max-width);
    height: var(--image-max-height);
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
}

.container .content img.clickable {
    cursor: pointer;
}

#project1 {
    background-color: #222222;
}
#project1 .content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: 100%;
    padding: 2px 20px;
    box-sizing: border-box;
    flex-direction: column;
    justify-content: space-between;
}
#project1 .content h2 {
    margin: 75px 10px 10px 10px;
    color: white;
    text-align: center;
    font-size: 30px;
    user-select: none;
}
#project1 .custom-content {
    color: white;
    width: 100%;
    height: 100%;
    max-width: 200px;
    min-width: 200px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}
#project1 .custom-content h3 {
    font-size: 1.5em;
    font-weight: normal;
    text-align: center;
    margin-bottom: 20px;
    user-select: none;
    letter-spacing: 0.1em;
}
#project1 .custom-content p {
    margin-bottom: 15px;
    text-align: left;
    user-select: none;
}
#project1 .about-section {
 margin-top: 20px;
 margin-bottom: 30px;
}
#project1 .about-section,
#project1 .contact-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#project1 .contact-section {
    margin-bottom: auto;
}
#project1.active .cwrapper {
    overflow-y: auto;
    max-height: 100%;
    color:yellow;
} 
#project1 .custom-content .copyright {
    text-align: center;
    font-size: 12px;
    width: 100%;
    padding: 10px 0;
    user-select: none;
    white-space: nowrap;
}
#project1 .custom-content .mail a,
#project1 .custom-content .insta a {
    color: white;
    text-decoration: none;
    user-select: none;
}

#project1 .about-text,
#project1 .about-container {
    display: none;
    user-select: none;
}

.container .content img.clickable {
    cursor: pointer;
}

.about-text {
    cursor: pointer;
    color: white;
    font-weight: bold;
    position: static;
    padding: 30px;
    transform: translateY(-20px);
    user-select: none;
    letter-spacing: 0.07em;
}

.about-container {
    position: absolute;
    top: 30px;
    left: 30px;
    right: 30px;
    bottom: 30px;
    background-color: #E6E6E6;
    overflow-y: auto;
    z-index: 10;
    color: #222222;
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-content {
    max-width: 440px;
    min-width: 440px;
    padding: 33px 20px;
    margin-left: calc(50% - 220px - 15px);
    user-select: none;
}

.close-button {
    position: absolute;
    width: 40px;
    height: 40px;
    cursor: pointer;
    z-index: 1002;
    transform: translateY(40px);
}

.close-button::before,
.close-button::after {
    content: '';
    position: absolute;
    background-color: white;
    top: 50%;
    left: 50%;
    width: 35px;
    height: 3px;
}

.close-button::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.close-button::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.footer {
    width: 100%;
    height: var(--footer-height);
    display: flex;
    justify-content: center;
    align-items: center;
}

.container:last-child[id^="project"] .content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: 100%;
    padding: 20px;
    box-sizing: border-box;
}
.container:last-child[id^="project"] .custom-content {
    color: #222222;
    width: 100%;
    max-width: 220px;
    min-width: 220px;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}
.container:last-child[id^="project"] .writing-section,
.container:last-child[id^="project"] .music-section {
    margin-top: 0px;
    margin-bottom: 30px;
    width: 100%;
}
.container:last-child[id^="project"] .custom-content h3 {
    font-size: 1.5em;
    font-weight: normal;
    user-select: none;
    letter-spacing: 0.1em;
    text-align: center;
    margin-bottom: 40px;
}
.container:last-child[id^="project"] .custom-content .selection-section {
    text-align: center;
}
.container:last-child[id^="project"] .custom-content .writing-section p,
.container:last-child[id^="project"] .custom-content .music-section p {
    margin-bottom: 10px;
    line-height: 1.4;
    user-select: none;
    margin-left: 40px;
}
.container:last-child[id^="project"].active .cwrapper {
    overflow-y: auto;
    max-height: 100%;
}

.container:last-child[id^="project"] .music-section h3 {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color 0.2s ease;
}

.container:last-child[id^="project"] .music-section .arrow-link {
    margin-left: 5px;
    font-size: 0.7em;
}

.container.active::before,
.container.active::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50%;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    z-index: 2;
    background-size: 700% 100%;
}

.container.active::before {
    left: 0;
    background-image: linear-gradient(
        to right,
        #A9E4F7, #A9E4F7,  /* Blue */
        #a99fec, #a99fec, /* Violet */
        #A9E4F7, #A9E4F7,  /* Blue */
        #a99fec, #a99fec, /* Violet */
        #A9E4F7, #A9E4F7  /* Blue */
    );
    animation: flowLeftOutward 22s linear infinite -1.1s;
}

.container.active::after {
    right: 0;
    background-image: linear-gradient(
        to left,
        #A9E4F7, #A9E4F7,  /* Blue */
        #a99fec, #a99fec, /* Violet */
        #A9E4F7, #A9E4F7,  /* Blue */
        #a99fec, #a99fec, /* Violet */
        #A9E4F7, #A9E4F7  /* Blue */
    );
    animation: flowRightOutward 22s linear infinite -1.1s;
}

@keyframes flowLeftOutward {
    0% {
        background-position: 100% 0%;
    }
    100% {
        background-position: 400% 0%;
    }
}

@keyframes flowRightOutward {
    0% {
        background-position: 0% 0%;
    }
    100% {
        background-position: -300% 0%;
    }
}

/* Animation trigger */
@media (max-width: calc(25 * 30px + 30px)) {
    .container.active::before,
    .container.active::after {
        opacity: 1;
    }
}

/* Existing CSS remains unchanged */

@media only screen and (max-device-width: 1024px) and (orientation: portrait), only screen and (max-device-width: 1024px) and (orientation: landscape) {
    html, body {
        height: 100%;
        margin: 0;
        padding: 0;
        overflow: hidden; /* Ensures no unwanted scroll */
    }
    .desktop-view {
        display: none;
    }
    .mobile-view {
        display: flex;
        flex-direction: column;
        height: 100%;
    }
    .mobile-header {
        background-color: #222222;
        color: white;
        position: sticky; /* Changed from fixed to sticky for scrolling behavior */
        top: 0;
        left: 0;
        right: 0;
        z-index: 100; /* Increased z-index to ensure it's above other elements */
        min-height: 60px; /* Minimum height remains at 60px */
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column; /* Retained from the original to allow for dropdown positioning */
    }

    .header-content {
        height: 60px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 20px;
        cursor: pointer;
        font-family: 'Josefin Sans', Arial, sans-serif;
        background-color: #222222;
        z-index: 120; /* Sits above the dropdown */
        width: 100%;
    }

    .header-dropdown {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        height: calc(100% - 60px);
        background-color: #222222;
        overflow-y: hidden;
        padding: 0px 20px;
        box-sizing: border-box;
        transform: translateY(-100%);
        transition: transform 0.3s ease;
        z-index: 110;
        display: flex;
        flex-direction: column;
    }

    .mobil.mobile-header.expanded {
        height: 100%;
    }

    .mobile-header.expanded .header-dropdown {
        transform: translateY(0); /* Slide down the dropdown when expanded */
    }

    .header-dropdown .about-section,
    .header-dropdown .contact-section {
        margin-bottom: 5px;
    }

    .header-dropdown h3 {
        font-size: 24px;
        margin-bottom: 30px;
        font-weight: normal;
        font-family: Arial, sans-serif;
        letter-spacing: 0.07em;
    }

    .header-dropdown p {
        font-size: 16px;
        margin-bottom: 20px;
        line-height: 1.4;
    }

    .header-dropdown .contact-section p {
        margin-bottom: 30px;
    }

    .header-dropdown a {
        color: white;
        text-decoration: none;
    }

    .copyright-container {
        margin-top: auto;
        text-align: center;
        width: 100%;
    }

    .copyright-container p {
        font-size: 12px;
    }

        .mobile-project-container {
        position: relative;
        flex: 1;
        overflow: hidden;
        background-color: #E6E6E6;
        display: flex; /* Added to enable flexbox */
        flex-direction: column; /* Ensures column layout */
        justify-content: center; /* Centers content vertically */
        align-items: center; /* Centers content horizontally */
        flex-grow: 1; /* Allows the container to expand and fill available space */
    }

    .mobile-project-container > * {
            max-height: 100%;
            max-width: 100%;
            overflow: hidden;
        }

    .mobile-project-image,
    .mobile-project-about {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }

    .mobile-project-image {
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: #E6E6E6;
        z-index: 1;
    }

    .mobile-project-image img {
        max-width: 90%;
        max-height: 90%;
        object-fit: contain;
        width: auto;
        height: auto;
    }

    .mobile-project-about {
        background-color: #E6E6E6;
        transform: translateY(100%);
        transition: transform 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 20px;
        box-sizing: border-box;
        z-index: 2;
    }

    .mobile-project-about-content {
        max-width: 100%;
        overflow-y: auto;
        max-height: 100%;
        color: #222222;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .mobile-project-about-content::-webkit-scrollbar {
        display: none;
    }

    .swiped-up .mobile-project-about {
        transform: translateY(0);
    }

    .mobile-footer {
        background-color: #e6e6e6;
        height: 8vh;
        min-height: 60px;
        position: sticky;
        bottom: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 15px;
        color: white;
        font-size: 22px;
        z-index: 20;
        font-family: 'Josefin Sans', Arial, sans-serif;
    }
   .mobile-project-list {
        position: fixed;
        left: 0;
        right: 0;
        width: 100%;
        background-color: #e6e6e6;
        height: calc(100% - 120px);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out, bottom 0.3s ease-out;
        bottom: 60px;
        border-top: 1px solid white;
    }

    .mobile-footer.expanded .mobile-project-list {
        bottom: 60px;
        max-height: calc(100% - 120px);
        overflow-y: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
        border-bottom: 1px solid white;
    }
    .mobile-footer.expanded .mobile-project-list::-webkit-scrollbar {
        display: none;
    }
    .mobile-project-list ul {
        list-style-type: none;
        padding: 0;
        margin: 0;
    }
    .mobile-project-list li {
        position: relative;
        overflow: hidden;
        padding: 10px 20px;
        border-bottom: 1px solid white;
        z-index: 1;
    }
    .mobile-project-list li::before,
    .mobile-project-list li::after {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        height: 50%;
        opacity: 0;
        transition: opacity 0.2s ease;
        pointer-events: none;
        z-index: 2;
        background-size: 100% 700%;
    }
    .mobile-project-list li::before {
        top: 0;
        background-image: linear-gradient(
            to bottom,
            #A9E4F7, #A9E4F7,
            #a99fec, #a99fec,
            #A9E4F7, #A9E4F7,
            #a99fec, #a99fec,
            #A9E4F7, #A9E4F7
        );
        animation: flowTopOutward 30s linear infinite;
    }
    .mobile-project-list li::after {
        bottom: 0;
        background-image: linear-gradient(
            to top,
            #A9E4F7, #A9E4F7,
            #a99fec, #a99fec,
            #A9E4F7, #A9E4F7,
            #a99fec, #a99fec,
            #A9E4F7, #A9E4F7
        );
        animation: flowBottomOutward 30s linear infinite;
    }
    .mobile-project-list li.active::before,
    .mobile-project-list li.active::after {
        opacity: 1;
    }
    @keyframes flowTopOutward {
        0% { background-position: 0% 100%; }
        100% { background-position: 0% 400%; }
    }
    @keyframes flowBottomOutward {
        0% { background-position: 0% 0%; }
        100% { background-position: 0% -300%; }
    }
    .mobile-project-list li:last-child {
        border-bottom: none;
    }
    .mobile-project-list li span {
        position: relative;
        display: block;
        z-index: 3;
    }
    .moving-caret-wrapper {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    }

    .moving-caret-indicator {
        position: absolute;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 40px;
        color: white;
        opacity: 0;
        transition: opacity 0.3s ease, bottom 1s ease-in-out;
        font-family: 'Fredoka', sans-serif;
    }

    .moving-caret-indicator.fade-in {
        opacity: 1;
    }

    .moving-caret-indicator.move-up {
        bottom: 60%;
    }

    .moving-caret-indicator.fade-out {
        opacity: 0;
    }
}
