/* Font */
body {
    font-family: 'saira', sans-serif;
    justify-content: right;
    display: flex;
    background: rgb(35, 32, 44);
    overflow: hidden;
    height: var(--full-height);
    margin: 0;
}

/* variables */
:root {
    --background-image: url("../assets/images/background-2.jpg");
    --font-color: white;
    --font-color-alt: black;
    --button-background: rgba(255, 255, 255, 0.5);
    --font-weight: normal;
    --full-height: 100vh;
    --full-height: 100dvh;
}

.background {
    position: fixed;
    left: 0;
    top: 0;
    width: 100vw;
    height: var(--full-height);
    background-image: var(--background-image);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    z-index: -1;
}


/* global modal styles */

.modal.show {
    visibility: visible;
}

.modal {
    visibility: hidden;
    border-radius: 35px;
    background: rgba(255, 255, 255, 0.8);
    z-index: 11;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    overflow: auto;
    position: absolute;
}

.modal-container {
    opacity: 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transition: backdrop-filter opacity;
    transition-duration: 0.3s;
    transition-timing-function: ease;
    z-index: -1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-container.show {
    opacity: 1;
    z-index: 10;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
}

.images-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 50vw;
    padding: 20px;
    overscroll-behavior: contain;
    scrollbar-width: none;
    overflow: auto;
    position: relative;
}

.images-container::-webkit-scrollbar {
    display: none;
}

.images-container img {
    width: 100%;
    height: auto;
    border-radius: 20px;
}

iframe {
    width: auto;
    height: auto;
    aspect-ratio: 16 / 9;
    border-radius: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    padding: 10px;
}

.description {
    width: 30vw;
    display: flex;
    flex-direction: column;
    overscroll-behavior: contain;
    scrollbar-width: none;
    padding: 30px 20px;
    position: relative;
    align-items: center;
    height: auto;
}

.buttonv2 {
    position: absolute;
    bottom: 15px;
}

.description p {
    overflow: auto;
    overscroll-behavior: contain;
    position: relative;
    bottom: 20px;
    scrollbar-width: none;
    padding-bottom: 60px;
    mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
}

.description p::-webkit-scrollbar {
    display: none;
}

.description::-webkit-scrollbar {
    display: none;
}

.description img {
    height: auto;
    width: 100px;
    border-radius: 32px;
    transition: all 0.3s ease;
}

/* individual modal styles */

#wechat-modal img {
    width: 95vw;
    max-width: 400px;
    height: auto;
}

#wechat-modal {
    display: flex;
}

#email-modal {
    padding: 5px 20px;
}

#matchatab-modal {
    width: 80vw;
    max-width: 900px;
    height: 80vh;
    max-height: 550px;
    display: flex;
    flex-direction: row;
}

#youtube-modal {
    width: 80vw;
    max-width: 1000px;
    height: 80vh;
    max-height: 600px;
    display: flex;
    flex-direction: row;
}

/* button styles */
.button,
.button:visited {
    padding: 5px 5px;
    align-items: center;
    justify-content: center;
    border: none;
    text-decoration: none;
    background: var(--button-background);
    border-radius: 20px;
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    box-sizing: border-box;
    transition: all 0.2s ease, color 0.3s ease;
    color: var(--font-color-alt);
    backdrop-filter: blur(20px);
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    min-width: fit-content;
}

.button.scrolled {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    min-width: none;
    min-height: none;
    padding: 10px 10px;
    border-radius: 17px;
}

.button img {
    display: block;
    margin: 0 auto;
    border-radius: 20px;
    width: 70px;
    height: 70px;
    transition: margin-left 0.2s ease;
}

.button.scrolled img {
    margin-left: 5px;
}

.button span {
    text-align: center;
    display: none;
}

.button.scrolled span {
    display: block;
}

/* buttonv2 styles */
.buttonv2,
.buttonv2:visited {
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    text-decoration: none;
    padding: 10px 10px;
    border-radius: 17px;
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    box-sizing: border-box;
    transition: all 0.2s ease, color 0.3s ease;
    color: white;
    background: rgba(0, 0, 0, 0.757);
    backdrop-filter: blur(5px);
    overflow: hidden;
    width: fit-content;
    padding: 10px 50px;
}


.buttonv3 {
    position: absolute;
    right: 20px;
    top: 20px;
    height: 40px;
    width: 40px;
    padding: 7px;
    border-radius: 50%;
    background: rgb(175, 175, 175);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    border: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.buttonv3 svg {
    stroke: rgb(54, 54, 54);
}

/* social section */
.social-section {
    display: flex;
    gap: 10px;
    height: fit-content;
    margin-top: 15px;
    margin-bottom: 40px;
    overflow-x: auto;
    scrollbar-width: none;
}

.social-section::-webkit-scrollbar {
    display: none;
}

.social-section.scrolled {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
    grid-auto-rows: 100px;
}

/* quick link section */
.quick-link-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(187px, 1fr));
    grid-auto-rows: 100px;
    gap: 10px;
    height: fit-content;
    margin-top: 30px;
    margin-bottom: 40px;
}

#back-button {
    position: absolute;
    display: none;
    opacity: 0;
    top: 0;
    right: -15px;
}

#back-button.scrolled {
    display: block;
    opacity: 1;
    transition: all 0.5s 0.3s;
}

.outer-container {
    max-width: 550px;
    width: 80vw;
    justify-content: center;
    align-items: center;
    padding: 30px;
    padding-top: 0px;
    border-radius: 35px 35px 0 0;
    margin-top: calc(var(--full-height) - 440px);
    transition-property: background, box-shadow, margin-top;
    transition-duration: 0.1s;
    transition-timing-function: ease;
    position: relative;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: none;
}

.outer-container.scrolled {
    background: rgba(255, 255, 255, 0.45);
    box-shadow: 0 0 50px rgba(149, 149, 149, 0.518);
    backdrop-filter: blur(10px) brightness(1.3) contrast(0.85);
    padding-top: 15px;
}


.off-screen-section {
    margin-top: 100px;
}

.off-screen-section.scrolled {
    margin-top: 0;
}


#scroll-up-text {
    position: absolute;
    top: -70px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    transition: filter 0.5s, top 0.2s;
}

#scroll-up-text.scrolled {
    filter: blur(10px);
    top: -100px;
}

#scroll-up-text svg {
    fill: white;
    animation: inf-bounce 4s infinite;
}

.font-color {
    color: var(--font-color);
    transition: color 0.3s ease;
}

.font-weight {
    font-weight: var(--font-weight);
}

/* header section */
.header-section {
    background: rgba(0, 0, 0, 0.497);
    padding: 10px 30px;
    border-radius: 17px;
    backdrop-filter: blur(10px);
    transition:
        padding 0.3s ease,
        text-align 0.3s ease,
        background 0.3s ease,
        max-height 0.3s ease,
        margin-top 0.2s ease;
    margin-top: 13px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    max-height: 260px;
    overflow: hidden;
}

.header-section.scrolled {
    background: rgba(0, 0, 0, 0);
    backdrop-filter: none;
    padding: 0 0 5px 0;
    margin-top: 5px;
    box-shadow: none;
    text-align: justify;
    max-height: none;
}

.blur-overshoot.animate-in {
    animation: blur-overshoot-in 0.25s;
}

.blur-overshoot.animate-out {
    animation: blur-overshoot-out 0.25s;
}

/* widget section */
.widget-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    top: 0;
    width: auto;
    max-width: 500px;
    padding: 30px;
    transition: all 0.3s ease;
    scrollbar-width: none;
}

#widget-close-button {
    display: none;
}

.widget-scroll-container {
    max-height: var(--full-height);
    overflow-y: auto;
    scrollbar-width: none;
    overscroll-behavior: contain;
    position: sticky;
    top: 0;
    display: block;
}

.scroll-container {
    height: var(--full-height);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.scroll-container::-webkit-scrollbar {
    /* hide scrollbar in WebKit browsers */
    display: none;
}


@supports (mask-image: linear-gradient(black, transparent), linear-gradient(black, transparent)) {
    .widget-container {
        mask-image:
            linear-gradient(to bottom, black 90%, transparent 100%),
            linear-gradient(to left, black 90%, transparent 100%),
            linear-gradient(to right, black 95%, transparent 100%),
            linear-gradient(to top, black 95%, transparent 100%);
        mask-composite: intersect;
        backdrop-filter: blur(10px);
    }

    .stock.card {
        backdrop-filter: none;
    }
}

.widget-container::-webkit-scrollbar {
    display: none;
}

/* global card styles */
.card {
    background: rgba(0, 0, 0, 0.497);
    transition: box-shadow 0.18s;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    font-family: inherit;
    font-weight: 500;
    border-radius: 16px;
}

/* stock section */
.stock-section {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    position: relative;
    justify-content: right;
}

.stock.card {
    height: 100px;
    width: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.stock-ticker {
    position: relative;
    font-size: 1.04rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #ffffffda;
    margin-bottom: 7px;
}

.stock-price {
    position: relative;
    font-size: 1.13rem;
    font-weight: 700;
    color: #ffffff;
    text-wrap: wrap;
    text-align: center;
}

/* top container styles */
.top-container {
    position: sticky;
    top: 20px;
    width: 100%;
    display: flex;
    height: 40px;
    z-index: 1;
}

.top-button-container {
    display: flex;
    gap: 7px;
    width: 100%;
    position: relative;
    overflow: auto;
    scrollbar-width: none;
    overscroll-behavior: contain;
    transition: all 0.3s ease;
}

.top-button-container::-webkit-scrollbar {
    display: none;
}

.top-button-container.scrolled {
    margin-right: 40px;
    mask-image: linear-gradient(to right, black 85%, transparent 100%);
    padding-right: 40px;
}

.buttonv4,
.buttonv4:visited {
    border-radius: 25px;
    outline: none;
    border: none;
    padding: 6px 13px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    color: white;
    gap: 10px;
    transition: background 0.5s ease;
    cursor: pointer;
    text-decoration: none;
}

.buttonv4.scrolled {
    backdrop-filter: none;
    background: rgb(36, 36, 36);
}

.buttonv4 svg {
    fill: white;
    width: 20px;
    height: 20px;
}

#widget-button {
    display: none;
}

/* animation keyframes */

@keyframes blur-overshoot-in {
    0% {
        filter: blur(0px);
    }

    50% {
        filter: blur(3px);
    }

    100% {
        filter: blur(0px);
    }
}

@keyframes blur-overshoot-out {
    0% {
        filter: blur(0px);
    }

    50% {
        filter: blur(2px);
    }

    100% {
        filter: blur(0px);
    }
}

@keyframes inf-bounce {
    0% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-13px) scale(1.2);
        filter: blur(1px);
    }

    100% {
        transform: translateY(0) scale(1);
    }
}


/* responsive styles */

@media(max-width: 882px) {
    body {
        justify-content: center;
    }

    .widget-container {
        display: none;
        mask-image: none;
        backdrop-filter: none;
    }

    .widget-scroll-container {
        position: fixed;
        z-index: 10;
    }

    .widget-container.show {
        opacity: 1;
        position: fixed;
        display: flex;
        flex-direction: column;
        align-items: center;
        top: 0;
        right: 50%;
        transform: translateX(50%);
        min-width: 100vw;
        max-width: 100vw;
        max-height: var(--full-height);
        min-height: var(--full-height);
        scrollbar-width: none;
        backdrop-filter: none;
        backdrop-filter: blur(30px);
        overflow: auto;
    }

    #widget-close-button {
        display: block;
        z-index: 1;
        position: relative;
        margin-bottom: 30px;
        right: -40%;
    }

    .stock-section {
        justify-content: center;
        max-width: 70%;
    }

    #widget-button {
        display: flex;
    }
}

@media(max-width: 620px) {

    #matchatab-modal,
    #youtube-modal {
        flex-direction: column;
    }

    .stock-section {
        max-width: 90%;
    }

    .description {
        width: calc(80vw - 40px);
        padding: 10px 20px;
        bottom: 0;
        height: 50%;
        transition: height 0.3s ease;
    }

    .images-container {
        width: fit-content;
        position: relative;
        mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
    }

    .description p {
        bottom: 35px;
        margin-top: 30px;
        padding-bottom: 35px;
    }

    .description img {
        position: absolute;
        top: -90px;
        right: 10px;
        box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
    }

    .header-section {
        padding: 10px 15px;
    }

    .header-section.scrolled {
        text-align: justify;
    }

    .about-me {
        mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
        max-height: 100px;
        overflow: hidden;
    }

    .about-me.scrolled {
        max-height: none;
        mask-image: none;
    }

    .outer-container {
        margin-top: calc(var(--full-height) - 395px);
    }
}

@media(max-width: 410px) {
    .outer-container {
        width: 90vw;
        margin-top: calc(var(--full-height) - 400px);
        padding: 5px;
    }

    .outer-container.scrolled {
        padding: 15px;
    }

    #back-button {
        right: 0;
    }

    #matchatab-modal,
    #youtube-modal {
        width: 95vw;
        align-items: center;
    }

    .description {
        height: 57%;
        width: calc(100% - 60px);
    }

    .description img {
        top: -70px;
        left: 50%;
        transform: translateX(-50%) scale(0.7);
    }
}