﻿/* ---------- Gloabl settings ---------- */
* {
    box-sizing: border-box;
    color: #fff;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: system-ui, sans-serif;
    /*font (might need to modify later on)*/

    background: url("_assets/Website/Background_decorateArrow.png") center no-repeat,
        url("_assets/Website/Background_leftside.png") center no-repeat,
        url("_assets/Website/planet2.png") center no-repeat,
        url("_assets/Website/Background.png") center no-repeat;
    background-repeat: repeat-y, repeat-y, no-repeat, repeat-y;
    background-position: center center, center center, center calc(50% + 30vh), center center;
    background-size: 100vw auto, 100vw auto, 100vw auto, cover;
    background-attachment: scroll, scroll, fixed, scroll;

    cursor: url("_assets/Others/cursor_32.png"), auto;

    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

img {
    user-select: none;
    -webkit-user-drag: none;
}

a[href] {
    cursor: inherit;
}

p.limited {
    max-width: 50ch;
    overflow-wrap: break-word;
}

.zero-g-drifter {
    width: var(--drifter-size);
}


/* ---------- Navigator ---------- */
nav {
    position: absolute;
    top: 0;
    left: calc(50% + 5%);
    width: 399px;
    padding: 170px 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4rem;
    z-index: 3;
}

.NavBackground {
    position: absolute;
    inset: 0;
    width: 100%;
    height: auto;
    object-fit: cover;
    z-index: -2;
    pointer-events: none;
}

/* buttons */
nav a {
    width: 69%;
    height: 40px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: .75rem 1.5rem;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    overflow: hidden;
    transition: transform .3s;
}

nav a:hover {
    transform: scale(1.05);
}

/* button decoration */
nav a::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("_assets/Website/index_block.png") center / contain no-repeat;
    z-index: -1;
}


/* ---------- About ---------- */
.about {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    right: 17%;
    gap: 2rem;
}

.about .PortraitBg {
    position: relative;
    flex: 0 0 412px;
    aspect-ratio: 439/412;
    background: url("_assets/Website/PortraitBackground.png") center / contain no-repeat;
    z-index: 0;
}

.about .Portrait {
    position: absolute;
    left: 51%;
    top: 57%;
    transform: translate(-50%, -50%);
    height: 60%;
    width: auto;
    object-fit: cover;
    overflow: hidden;
    clip-path: inset(0 0 10% 0);
    z-index: 1;
}

.about .texts {
    margin-left: 9rem;
}

.about .texts p+h1 {
    margin-top: 4rem;
}

.about a {
    text-decoration: none;
    color: #0079fb;
    font-weight: bold;
}

/* ---------- project sections style ---------- */
section {
    position: relative;
    min-height: 50vh;
    /* length of each section */
    display: block;
    width: fit-content;
    margin: 0 auto;
    padding: 0;
    flex-direction: column;
    justify-content: center;
    /* position of section */
    align-items: center;
    text-align: center;
    color: #fff;
}

section .project_background {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
}

section .title {
    position: absolute;
    top: 30%;
    left: 25%;
    padding: .25em .75em;

    background: url("_assets/Website/project_block.png") center / 100% 100% no-repeat;
    font-size: clamp(1.25rem, 2vw + .5rem, 2.5rem);
    z-index: 2;
}

section .btn {
    position: absolute;
    bottom: 4%;
    right: 10%;

    background: url("_assets/Website/project_block.png") center / 100% 100% no-repeat;
    color: #fff;
    padding: .75rem 1.5rem;
    border-radius: 0;
    z-index: 2;
}

section .slideshow {
    position: absolute;
    overflow: hidden;
}

section .slideshow a {
    position: absolute;
    inset: 0;
    display: block;
}

section .slideshow img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: auto;

    opacity: 0;
    transition: opacity .8s ease;
    pointer-events: none;
    z-index: 1;
}

section .slideshow img.show {
    opacity: 1;
}

/* ---------- Audio Player ---------- */
.audio-player { 
    display:inline-flex; 
    align-items:center; 
    gap:0.6rem; 
    position: fixed;
    right: 50px;
    z-index: 5;

    /* properties */
    --buttonSize: 36px;
    --buttonGap: 0px;
}

.audio-player .status {
  color: rgb(145, 155, 250);
  font-size: 13px;
}

.audio-player button {
  width: var(--buttonSize);
  height: var(--buttonSize);
  border: 0;
  border-radius: 5px;
  background: center / 70% no-repeat;
  cursor: inherit;
}

.audio-player .play { 
    position: relative;
    background-image: url('_assets/Others/play.png'); 
    right: var(--buttonGap);
}

.audio-player .pause {
    position: relative;
    background-image: url('_assets/Others/pause.png'); 
}

/* ---------- project 1 ---------- */
#project1 {
    margin-bottom: -5%;
}

#project1 .project_background {
    width: 100%;
    height: auto;
    transform: scaleY(.8);
    transform-origin: top center;
}

#project1 .slideshow {
    top: 60%;
    left: 63.5%;
    transform: translate(-50%, -50%);
    clip-path: inset(0 3% 0 3%);

    width: 65%;
    height: 60%;
}

#project1 .title {
    left: 25%;
    top: 18%;
    transform: scale(.75);
}

#project1 .btn {
    bottom: 21%;
    transform: scale(.75);
}

/* ---------- project 2 ---------- */
#project2 .project_background {
    width: 100%;
    height: auto;
    transform: scaleY(.7);
    transform-origin: top center;
}

#project2 .title {
    top: 15%;
    transform: scale(.85);
}

#project2 .slideshow {
    top: 54%;
    left: 63%;
    transform: translate(-50%, -50%);
    clip-path: inset(0 3% 0 3%);

    width: 65%;
    height: 60%;
}

#project2 .btn {
    bottom: 30%;
    transform: scale(.75);
}

#project2 {
    margin-bottom: -15%;
}

/* ---------- gallery ---------- */
#gallery .title {
    left: 30%;
    top: 23%;
    transform: scale(.75);
}

#gallery .project_background {
    width: 100%;
    height: auto;
    transform: scaleX(.65);
    transform-origin: top center;
}

#gallery .slideshow {
    top: 33.5%;
    left: 41.5%;

    height: 65%;
    width: 35%;
    max-height: 100%;
}

#gallery .btn {
    right: 15%;
    transform: scale(.75);
}

/* ---------- other elements ---------- */
.footer {
    font-size: 12px;
    font-weight: bold;
    margin-top: 10%;
}

.footer a {
    color: #0079fb;
    text-decoration: none;
}

/* button */
.btn {
    display: inline-block;
    margin-top: 1rem;
    padding: .75rem 1.5rem;
    border-radius: 6px;
    background: #ff6f61;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    transition: opacity .25s;
}

.btn:hover {
    opacity: .8;
}


/* ---------- screen size adjustment ---------- */

/* desktop */
:root {
    --drifter-size: clamp(30px, 8vw, 50px);
}

/* Tablet */
@media (max-width: 900px) {
    :root {
        --drifter-size: clamp(30px, 9vmin, 37px);
    }
}

/* Phone */
@media (max-width: 600px) {
    nav {
        display: none;
    }

    html {
        font-size: 93.75%;
        /* 15px */
    }

    body {
        background-size: 100vw auto, 100vw auto, 100% auto, cover;
        /* arrow, leftside, planet, wallpaper */
        align-items: center;
        padding-top: 0;
    }

    .about {
        position: static;
        text-align: center;
        align-items: center;
    }

    .about .texts {
        margin: 0;
    }

    .about .texts .limited {
        margin-left: auto;
        margin-right: auto;
    }

    section {
        width: 100%;
    }

    :root {
        --drifter-size: clamp(25px, 8vmin, 35px);
    }
}

@media (max-width:380px) {
    html {
        font-size: 87.5%;
        /* 14px */
    }
}