/*=======================
         fonts
=======================*/
@font-face {
    font-family: Sans_Font;
    src: url("../font/BalsamiqSans-Bold.woff2");
}

@font-face {
    font-family: PlayFairDisplay_Font;
    src: url("../font/PlayfairDisplaySC-Black.woff");
}

/*============================
        * & elements 
=============================*/
html {
    scroll-behavior: smooth;
    max-width: 100vw;
}

* {
    box-sizing: border-box;
    margin: 0px;
    padding: 0px;
}

section, div.menuGrid {
    background-color: #F1ecdb;
    padding: 1rem;
}

section>div, .menuGrid>div { padding: 0.5rem; }

h1:not(.start>h1) { text-decoration: underline; }

body {
    background-color: #292F17;
    text-align: center;
}

img {
    border-radius: 2rem;
    box-shadow: 5px 10px 8px rgba(0, 0, 0, 0.85);
}

p { padding: 1rem 0rem; }

button {
    background-color: transparent;
    border: none;
    font-family: Sans_Font;
    font-size: clamp(0.65rem, 1vw, 1rem);
}

/*============================
            FOOTER  
=============================*/
footer {
    border-top: 1px solid #F1ecdb;
    background-color: #292F17;
    display: grid;
    grid-template-columns: repeat(4, auto);
    grid-template-rows: repeat(2, auto);
    max-width: 100vw;
    padding-top: 1rem;
}

footer * { color: #F1ecdb; font-family: Sans_Font; }

footer img {
    border: none;
    box-shadow: none;
    border-radius: 0;
    width: clamp(50px, 7.5vw, 100px);
}

/* specific grid pos */
footer>div:nth-of-type(2) { grid-column: 2; grid-row: 1/span 2; text-align: left; }
footer>div:nth-of-type(3) { grid-column: 3; grid-row: 1/span 2; text-align: left; }
footer>div:nth-of-type(3)>img { height: 15vh; width: auto; }
footer>h6 { grid-row: 2; grid-column: 1; justify-self: center; }
footer>.logo { grid-column: 1; grid-row: 1; justify-self: center; }

footer nav, footer div:nth-last-of-type(2) {
    display: flex;
    flex-direction: column;
    row-gap: 1.15vh;
}

footer button { text-align: left; font-size: clamp(0.6rem, 0.75vw, 0.85rem); border: none; color: #F1ecdb; }
footer a { padding: 0; font-size: clamp(0.6rem, 0.75vw, 0.85rem); }

/* form */
footer div:nth-last-of-type(1) {
    text-align: left;
    grid-row: 1/span 2;
    grid-column: 4;
    display: flex;
    flex-direction: column;
}

footer div:nth-last-of-type(1)>form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

footer div:nth-last-of-type(1)>form>input {
    width: 80%;
    border-radius: 0.25rem;
    height: 3.5vh;
    border: 1px solid #F1ecdb;
    background-color: rgba(255, 255, 255, 0.094);
}

footer div:nth-last-of-type(1)>form input::placeholder {
    color: #F1ecdb;
    opacity: 1;
    padding-left: 0.5rem;
}

footer div:nth-last-of-type(1)>form input[type=submit] { width: 50%; }

/*=====================
         header
=====================*/
h1 { font-size: clamp(1.75rem, 3vw, 4rem); }
h2 { font-size: clamp(1.25rem, 2vw, 2.5rem); }
h3 { font-size: clamp(1rem, 1.5vw, 2rem); }

a, button>a { text-decoration: none; color: #F1ecdb; }
ol, ul { list-style-position: inside; }
header>a>img, a>img { box-shadow: none; }

/* ======================
            menus
========================*/
.menuGrid {
    display: grid;
    grid-template-columns: 2fr 1.25fr;
    grid-template-rows: 1fr;
    padding: 0%;
    font-family: Sans_Font;
}

.menuGrid>nav:not(.logo) {
    grid-column: 2;
    display: flex;
    justify-content: space-evenly;
    padding: 0%;
}

.menuGrid>.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    grid-column: 1;
    font-family: PlayFairDisplay_Font;
    color: #F1ecdb;
}

.menuGrid>.logo>a { display: flex; align-items: center; }
.menuGrid>.logo>a>h4 { margin: 0%; }

.menuGrid>.logo>a>img {
    height: 5vh;
    width: auto;
    padding: 0rem 1rem;
}

#menu {
    grid-row: 1;
    color: #4b3d2f;
    background-color: #292F17;
    padding: 0rem 1rem;
}

header>div:nth-child(2) { display: none; }

/* ======================
       music on / off
========================*/
body>button:nth-last-of-type(1) {
    position: fixed;
    bottom: 1rem;
    left: 1.5rem;
    justify-content: space-between;
    height: 3vh;
    width: clamp(20px, 1.75vw, 30px);
    display: flex;
}

body>button:nth-last-of-type(1)>span {
    width: clamp(4px, 0.5vw, 8px);
    height: 100%;
    background-color: #F1ecdb;
    border-radius: 3px;
    animation: move 2.2s ease infinite alternate;
    transform-origin: bottom;
    text-shadow: 2px 2px 4px #5e5d5dcf;
}

body>button:nth-last-of-type(1)>span:nth-of-type(2) { animation-delay: -2.2s; }
body>button:nth-last-of-type(1)>span:nth-of-type(3) { animation-delay: -3.7s; }

@keyframes move {
    10%  { transform: scaleY(0.3); }
    30%  { transform: scaleY(1); }
    60%  { transform: scaleY(0.5); }
    80%  { transform: scaleY(0.75); }
    100% { transform: scaleY(0.6); }
}

@keyframes mutedMove {
    0%   { transform: scaleY(0); }
    10%  { transform: scaleY(0.15); }
    30%  { transform: scaleY(0.35); }
    60%  { transform: scaleY(0.25); }
    80%  { transform: scaleY(0.075); }
    100% { transform: scaleY(0.125); }
}

/*======================
        start Grid 
=======================*/
.start {
    display: grid;
    grid-row: 1;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;
    padding: 2rem;
}

.start * { color: #F1ecdb; }
.start h1, .start p, .start a { margin: 2rem 1rem; }
.start>a { border-radius: 2rem; }
.start p { font-family: Sans_Font; }

/*===========================
        INDEX PAGE
===========================*/
.indexGridContainer>main {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(3, auto);
    display: grid;
}

.indexGridContainer>* { font-family: Sans_Font; color: #F1ecdb; }

.indexGridContainer section.start {
    grid-row: 1;
    background-image: url('../image/Index_start.jpg');
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, auto);
}

section.start>h1 {
    grid-row: 1;
    grid-column: 1 / span 3;
    font-size: clamp(2.5rem, 7.5vw, 9rem);
    align-self: end;
}

.indexGridContainer section.start>div {
    grid-row: 2;
    grid-column: 1 / span 3;
    font-size: clamp(2rem, 7.5vw, 9rem);
}

.indexGridContainer section.start>div>p {
    padding: 0;
    color: transparent;
    -webkit-text-stroke: 1px #F1ecdb;
}

.indexGridContainer main section.start>h1,
.indexGridContainer>main>section.start>div>p {
    padding: 0;
    margin: 0;
    font-family: PlayFairDisplay_Font;
}

.abtMeGridContainer .start {
    grid-row: 1;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, auto);
}

/* =========================
            index 
==========================*/
#introduction {
    grid-row: 2;
    background-color: #F1ecdb;
    color: #3C1B0F;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(3, auto);
    padding: 2rem;
    text-align: left;
    min-height: 75vh;
}

#introduction>h1 {
    padding: 1rem 2rem;
    grid-row: 1;
    grid-column: 1;
    font-size: clamp(2.5rem, 7vw, 9rem);
    text-decoration: none;
    min-height: 40vh;
}

#introduction>div:nth-of-type(1) {
    font-family: Sans_Font;
    padding: 1rem 2rem;
    grid-row: 2;
    grid-column: 1;
}

#introduction>div:nth-of-type(1) p {
    font-size: clamp(0.85rem, 1.1vw, 1.15rem);
}

#introduction>div:nth-of-type(2) {
    grid-row: 3;
    grid-column: 1;
    display: flex;
    justify-content: space-around;
    padding: 1vh 0vw;
}

#introduction>img {
    grid-row: 1/span 3;
    grid-column: 2;
    justify-self: center;
    align-self: center;
}

.Logo img { border-radius: 50%; width: clamp(50px, 12.5vh, 100px); }
.Logo a:nth-last-of-type(1)>img { border: 5px solid #4b3d2f; }

.typewriter { display: inline-block; }
.typewriter::after { content: '_'; animation: blink 0.7s step-end infinite; }
.typewriter.typing::after { animation: none; opacity: 1; }

@keyframes blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

.dot span::after { content: '•'; padding: 0vh 1vw; font-size: clamp(1rem, 3vw, 3rem); vertical-align: middle; }
.dot span { font-size: clamp(0.65rem, 1vw, 1rem); }
.dot { background-color: #292F17; padding: 0%; border-bottom: 2px solid #F1ecdb; }

/* card logic */
.logic {
    transform: rotate(-15deg);
    width: clamp(180px, 24vw, 340px);
    max-height: 55vh;
    border-radius: 25px;
    cursor: grab;
    transition: transform 0.06s ease-out, box-shadow 0.06s ease-out, filter 0.06s ease-out;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    will-change: transform;
}

.logic:active { cursor: grabbing; }

#journey {
    background-color: #F1ecdb;
    position: relative;
    min-height: 105vh;
    padding: 5vh 5vw;
}

#journey a, #journey div {
    padding: 1%;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    cursor: pointer;
    transform-origin: bottom center;
    transition: transform 0.4s ease;
    display: block;
    line-height: 0;
}

#journey div { top: 25vh; z-index: 4; }
#journey a:nth-of-type(3) { top: 15vh; z-index: 3; left: 45%; }
#journey a:nth-of-type(2) { top: 5vh; z-index: 2; left: 55%; }
#journey a:nth-of-type(1) { top: 0vh; z-index: 1; left: 49%; }

#journey img {
    min-width: 60vw;
    display: block;
    border-radius: 0;
    box-shadow: none;
    padding-top: 2vh;
    margin-top: -2vh;
}

#journey a:nth-of-type(1):hover,
#journey a:nth-of-type(3):hover { transform: translateX(calc(-50% - 5vw)) translateY(calc(-20%)) rotate(7.5deg); }
#journey a:nth-of-type(2):hover { transform: translateX(calc(-50% + 10vw)) translateY(calc(-20%)) rotate(-7.5deg); }

/* =========================
           project
=========================== */
.projBody section.start {
    background-image: url(../image/projectbg.jpg);
    min-height: 105vh;
    grid-template-columns: 1fr;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    border-bottom: solid 3px #3C1B0F;
}

.projBody section.start>div,
.aboutBody section.start>div,
.eventBody section.start>div {
    font-size: clamp(0.75rem, 1.15vw, 1.25rem);
    font-family: Sans_Font;
    grid-column: 1 / span 3;
}

.projBody section.start>nav,
.aboutBody section.start>nav,
.eventBody section.start>nav {
    display: flex;
    justify-content: space-evenly;
}

/* =========================
           event
=========================== */
.eventBody section.start {
    background-image: url(../image/eventbg.jpg);
    min-height: 105vh;
    grid-template-columns: 1fr;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    border-bottom: solid 5px #3C1B0F;
}

#showcase { min-height: 105vh; }

/* =========================
           gallery
=========================== */
#horizontalGallery { overflow: hidden; }
.scrollable-Horizontal { width: 100%; overflow: hidden; padding: 0%; }
.timeline_H { display: flex; width: max-content; }
#verticalGallery { overflow: hidden; width: 100%; padding: 0%; }

/* =========================
            highlight
=========================== */
#highlight, #showcase { min-height: 105vh; overflow: hidden; }

#showcase>h2, #highlight>h2 {
    color: #3C1B0F;
    font-family: Sans_Font;
    font-size: clamp(1.75rem, 5.5vw, 7rem);
    text-align: center;
}

/* =========================
    project carousel
=========================== */
.carousel-wrapper {
    position: relative;
    display: flex;
    align-items: stretch;
    gap: 0;
}

.carousel-arrow {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    color: #3C1B0F;
    z-index: 10;
    flex-shrink: 0;
    border: solid #3C1B0F;
    border-width: 0 clamp(2px, 0.5vw, 6px) clamp(2px, 0.5vw, 6px) 0;
    padding: clamp(6px, 0.75vw, 12px);
}

#nextBtn { transform: rotate(-45deg); -webkit-transform: rotate(-45deg); }
#prevBtn { transform: rotate(135deg); -webkit-transform: rotate(135deg); }

.carousel-viewport { flex: 1; overflow: hidden; padding: 2.5vh 0.5vw; }
.carousel-track { display: flex; gap: 1vw; align-items: stretch; will-change: transform; }

/* =========================
    project card
=========================== */
.proj-card {
    background: #fff8ee;
    border: 2px solid #3C1B0F;
    border-radius: 1vw;
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
    width: 20vw;
    display: flex;
    flex-direction: column;
}

.proj-card:hover:not(.open) { transform: translateY(-4px); box-shadow: 5px 10px 8px rgba(0, 0, 0, 0.85); }
.proj-card.open { width: 45vw; cursor: default; box-shadow: 5px 10px 8px rgba(0, 0, 0, 0.85); }

.card-thumb {
    width: 100%;
    height: 55vh;
    object-fit: cover;
    border-radius: 0;
    box-shadow: none;
    display: block;
    background: #3C1B0F;
    flex-shrink: 0;
}

.card-thumb-placeholder {
    width: 100%;
    height: 55vh;
    background: #3C1B0F;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1rem, 2.5vw, 3rem);
    color: #F1ecdb;
    flex-shrink: 0;
}

.card-body { padding: 0.5vh 0.5vw; display: flex; flex-direction: column; flex: 1; }

.card-title {
    font-family: PlayFairDisplay_Font;
    font-size: clamp(0.75rem, 1.25vw, 1.5rem);
    color: #3C1B0F;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.open .card-title { white-space: normal; font-size: clamp(0.9rem, 1.75vw, 2rem); }

.card-detail {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.open .card-detail { max-height: 55vh; opacity: 1; }

.card-desc {
    font-size: clamp(0.7rem, 1.15vw, 1.25rem);
    color: #3C1B0F;
    line-height: 1.5;
    padding: 1vh 2vw;
    font-family: Sans_Font;
}

.card-link {
    display: inline-block;
    font-size: clamp(0.65rem, 1vw, 1.1rem);
    color: #F1ecdb;
    background: #3C1B0F;
    padding: 1vh 1vw;
    border-radius: 1vw;
    text-decoration: none;
    font-family: Sans_Font;
}

.card-link:hover { background: #292F17; }

/* =========================
            card tags
=========================== */
.tags { display: flex; flex-wrap: wrap; gap: 0.3vw; padding: 0.5vh; align-self: anchor-center; }

.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25vw;
    color: #F1ecdb;
    font-size: clamp(0.55rem, 0.85vw, 1rem);
    padding: 0.5vh 0.5vw;
    border-radius: 1vw;
    white-space: nowrap;
}

.tag.lang     { background: #29292b; }
.tag.platform { background: #342621; }
.tag.type     { background: #516858; }
.tag.solo     { background: #ab829c; }

.tag-dot { width: clamp(4px, 0.5vw, 8px); height: clamp(4px, 0.5vw, 8px); border-radius: 50%; display: inline-block; flex-shrink: 0; }

/* =========================
            contact
=========================== */
.aboutBody section.start {
    background-image: url(../image/aboutbackground.jpg);
    min-height: 105vh;
    grid-template-columns: 1fr;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    border-bottom: solid 3px #3C1B0F;
}

.aboutBody section.start>div>p,
.eventBody section.start>div>p,
.projBody section.start>div>p { -webkit-text-fill-color: #3C1B0F; }

.aboutBody section.start>h1, .aboutBody section.start nav *,
.eventBody .start h1, .eventBody section.start nav *,
.projBody .start h1, .projBody section.start nav * { color: #3C1B0F; }

#contact {
    background-image: url(../image/folderbg.jpg);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    border-bottom: solid 3px #3C1B0F;
}

#contact>h2 {
    padding: 1vh 1vw;
    color: #3C1B0F;
    font-family: Sans_Font;
    font-size: clamp(1.5rem, 4.5vw, 6rem);
    text-align: left;
}

#contact nav {
    padding: 1vh 1vw;
    display: flex;
    justify-content: space-evenly;
    flex-wrap: wrap;
    row-gap: 3vh;
}

#contact nav button:hover { transform: translateY(-8px) rotate(var(--rot)); }
#contact img { max-width: clamp(120px, 24vw, 300px); }

/*============================
        TABLET — 769px to 1024px
=============================*/
@media (min-width: 769px) and (max-width: 1024px) {
    .logic {
        width: clamp(130px, 18vw, 200px);
        max-height: 32vh;
    }
}

/*============================
        MOBILE — max 768px
=============================*/
@media screen and (max-width: 768px) {

    /* --- nav --- */
    .menuGrid {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        padding: 1rem;
        gap: 0.5rem;
    }

    .menuGrid>.logo { grid-column: 1; justify-content: center; }
    .menuGrid>.logo>a>img { height: 4vh; }

    .menuGrid>nav:not(.logo) {
        grid-column: 1;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }

    .menuGrid>nav:not(.logo) button { font-size: clamp(0.65rem, 3vw, 0.9rem); }

    /* --- footer --- */
    footer {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        padding: 1.5rem 5vw;
        gap: 1.5rem;
    }

    footer>.logo { grid-column: 1; grid-row: 1; }
    footer>div:nth-of-type(2) { grid-column: 1; grid-row: 2; }
    footer>div:nth-of-type(3) { grid-column: 1; grid-row: 3; }
    footer div:nth-last-of-type(1) { grid-column: 1; grid-row: 4; }
    footer>h6 { grid-column: 1; grid-row: 5; }

    footer img { width: clamp(50px, 15vw, 80px); }
    footer button { font-size: clamp(0.7rem, 3vw, 0.9rem); }
    footer a { font-size: clamp(0.7rem, 3vw, 0.9rem); }

    footer div:nth-last-of-type(1)>form>input { width: 100%; }

    /* --- index start --- */
    section.start>h1 { font-size: clamp(2rem, 10vw, 4rem); margin: 1rem 0; }

    .indexGridContainer section.start>div { font-size: clamp(1.5rem, 8vw, 3rem); }

    /* --- introduction — single col, img after icons --- */
    #introduction {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto auto;
        min-height: unset;
        padding: 1.5rem;
    }

    #introduction>h1 {
        grid-row: 1;
        grid-column: 1;
        font-size: clamp(2rem, 10vw, 4rem);
        min-height: unset;
        padding: 0.5rem 0;
    }

    #introduction>div:nth-of-type(1) {
        grid-row: 2;
        grid-column: 1;
        padding: 0.5rem 0;
    }

    #introduction>div:nth-of-type(2) {
        grid-row: 3;
        grid-column: 1;
        flex-wrap: wrap;
        gap: 1rem;
    }

    /* img moves after the icons */
    #introduction>img {
        grid-row: 4;
        grid-column: 1;
        width: 70vw;
        min-height: unset;
        margin: 1.5rem auto 0 auto;
    }

    .Logo img { width: clamp(40px, 10vw, 70px); }

    .dot span::after { font-size: clamp(1rem, 5vw, 2rem); padding: 0 2vw; }
    .dot span { font-size: clamp(0.65rem, 3vw, 1rem); }

    /* --- journey --- */
    #journey { min-height: 60vh; }
    #journey img { min-width: 80vw; }

    /* --- highlight / showcase --- */
    #showcase>h2, #highlight>h2 { font-size: clamp(1.25rem, 7vw, 2.5rem); }

    /* --- carousel on mobile — one card visible --- */
    .proj-card { width: 75vw; border-radius: 3vw; }
    .proj-card.open { width: 88vw; }

    .card-thumb, .card-thumb-placeholder { height: 35vh; }
    .card-thumb-placeholder { font-size: clamp(1rem, 5vw, 2rem); }
    .card-title  { font-size: clamp(0.85rem, 4vw, 1.25rem); }
    .open .card-title { font-size: clamp(1rem, 5vw, 1.5rem); }
    .card-desc   { font-size: clamp(0.7rem, 3.5vw, 1rem); padding: 1vh 3vw; }
    .card-link   { font-size: clamp(0.7rem, 3.5vw, 1rem); padding: 1vh 3vw; border-radius: 3vw; }

    .tag  { font-size: clamp(0.55rem, 2.5vw, 0.8rem); padding: 0.5vh 1.5vw; border-radius: 3vw; }
    .tag-dot { width: clamp(4px, 2vw, 8px); height: clamp(4px, 2vw, 8px); }

    .carousel-arrow {
        border-width: 0 2px 2px 0;
        padding: clamp(5px, 2vw, 10px);
    }

    /* --- contact --- */
    #contact>h2 { font-size: clamp(1.25rem, 7vw, 2.5rem); }
    #contact img { max-width: 60vw; }
    #contact nav { flex-direction: column; align-items: center; }

    /* --- about/project/event start pages --- */
    .projBody section.start>div,
    .aboutBody section.start>div,
    .eventBody section.start>div { font-size: clamp(0.75rem, 3.5vw, 1rem); }

    .projBody section.start>nav button,
    .aboutBody section.start>nav button,
    .eventBody section.start>nav button { font-size: clamp(0.65rem, 3vw, 0.9rem); }

    /* music button — hide on mobile to save space */
    body>button:nth-last-of-type(1) { display: none; }
}

/* mobile-short / mobile-hide helper classes */
@media (max-width: 768px) {
    .mobile-short { display: block; }
    .mobile-hide  { display: none; }
    
}
@media screen and (max-width: 768px) {

    /* override the absolute positioning entirely */
    #journey {
        min-height: unset;
        padding: 3vh 5vw;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }

    /* reset all the absolute-positioned children */
    #journey a,
    #journey div {
        position: static;       /* remove absolute */
        transform: none;        /* remove translateX */
        left: unset;
        top: unset;
        padding: 0;
        width: 100%;
        display: flex;
        justify-content: center;
    }

    /* cover image div — show it first */
    #journey div {
        order: -1;
        z-index: auto;
    }

    #journey img {
        min-width: unset;
        width: 75vw;
        height: auto;
        border-radius: 1rem;
        padding-top: 0;
        margin-top: 0;
    }

    /* disable hover transforms on mobile — they break the layout */
    #journey a:nth-of-type(1):hover,
    #journey a:nth-of-type(2):hover,
    #journey a:nth-of-type(3):hover {
        transform: none;
    }
}
@media (min-width: 769px) {
    .mobile-short { display: none; }
    .mobile-hide  { display: block; }
}