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

body {
    color: #010101;
    background-color: #79a2d6;

    font-size: 1rem;
    overflow-x: hidden;
}


/* Clouds */
/* tutorials: https://www.youtube.com/watch?v=V5TzSm-INrY&ab_channel=CatalystCoder */
#background-wrap {
    padding-top: 3.125rem;
    width:100%;
    position: fixed;
    z-index: -1;
}

.x1 {
    animation: animateCloud 40s linear infinite;
    transform: scale(0.65);
}

.x2 {
    animation: animateCloud 20s linear infinite;
    transform: scale(0.3);
}

.x3 {
    animation: animateCloud 30s linear infinite;
    transform: scale(0.5);
}

.x4 {
    animation: animateCloud 15s linear infinite;
    transform: scale(0.4);
}

.x5 {
    animation: animateCloud 25s linear infinite;
    transform: scale(0.55);
}

.x6 {
    animation: animateCloud 15s linear infinite;
    transform: scale(0.75);
}

.x7 {
    animation: animateCloud 35s linear infinite;
    transform: scale(0.95);
}

.cloud {
    animation: fadeIn 2s;
    background: #fafcff;
    border-radius: 6.25em; 
    box-shadow: 0 0.5em 0.3125em rgba(0, 0, 0, 0.1); 
    height: 7.5em; 
    position: relative;
    width: 21.875em; 
}

.cloud:after, .cloud:before {
    animation: fadeIn 2s;
    background: #fafcff;
    content: '';
    position: absolute;
    z-index: -1;
}

.cloud:after {
    border-radius: 6.25em; 
    height: 6.25em; 
    left: 3.125em; 
    top: -3.125em; 
    width: 6.25em; 
}

.cloud:before {
    border-radius: 12.5em; 
    width: 11.25em; 
    height: 11.25em; 
    right: 3.125em; 
    top: -5.625em; 
}

         
/* star */
/* Youtube tutorial: https://www.youtube.com/shorts/K7EvRT1rzUs */
.star {
    display: inline-block; 
    width: 0.8em; 
    height: 0.8em; 
    background-color: black;
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    margin-left: 1rem; 
    margin-bottom: 0.5rem;
    vertical-align: middle; 
    animation: scale-and-spin 5s alternate ease-in-out;
}

.hero-heading-line h1 .star {
    display: inline-block; 
}

h1{
    font-size: 5rem;
    font-family: 'Montserrat Alternates', sans-serif;
    font-weight: 800;
    animation: slide-bottom 1s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
    margin-bottom: 1rem;
}

h2{
    font-family: 'Montserrat Alternates', sans-serif;
    font-weight: 800;
    animation: slowFadeIn 1s;
}

h3{
    font-family: 'Montserrat Alternates', sans-serif;
    font-weight: 400;
    animation: slowFadeIn 1s;
}

p{
    font-family: 'Lato', sans-serif;
    font-weight: 300;
    margin-bottom: 1.25rem;
    font-size: 1.25rem;
    animation: slide-right 1s;
}

ul li{
    text-decoration: none;
    list-style-type: none;
    font-family: 'Lato', sans-serif;
    font-weight: 300;
    animation: slide-right 1s;
}

.hero-heading-lines p{
    font-family: 'Montserrat Alternates', sans-serif;
    font-weight: 400;
    font-size: 2rem;
    animation: slowFadeIn 1s;
}

.hero-heading-lines span{
    font-weight: 800;
}

.home-container {
    width: 100%;
    max-width: 102.5rem;
    margin-left: auto;
    margin-right: auto;
    padding-left: 3rem;
    padding-right: 3rem;
}

.header-container{
    width: 100%;
    max-width: 102.5rem;
    margin-top: 0.5rem;
    margin-left: auto;
    margin-right: auto;
    padding-left: 2rem;
    padding-right: 2rem;
}

.header-container img{
    opacity: 0;
}


/* nav */
.navs{
    padding: 1rem 2rem;
}

nav ul li a{
    text-decoration: none;
    font-family: 'Lato', sans-serif;
    font-weight: 800;
    color: #000;
    transition: 0.5s;
    font-size: 0.55rem;
}

nav ul li a:hover{
    color: #ffffff;
}

/* button 
a cloud button tutorial from a short video in an chinese app: http://xhslink.com/P86F2w*/
nav ul{
    list-style: none;
    margin: 0;
    padding: 0;
}

nav ul li {
    --c: #000000;
    color: var(--c);
    width: 6.5rem;
    height: 2rem;
    border: 0.2rem solid var(--c);
    border-radius: 0.7rem;
    text-align: center;
    font-weight: bold;
    cursor: pointer;
    margin-left: 1rem;
    line-height: 1.45em;
    position: relative;
    overflow: hidden;
    z-index: 2;
    transition: 0.5s;
}

nav ul li span{
    position: absolute;
    width: 40%;
    height: 100%;
    background-color: var(--c);
    border-radius: 50%;
    transform: translateY(150%);
    left: calc((var(--n) - 1) * 25%);

    transition: 0.5s;
    transition-delay: calc((var(--n) - 1) * 0.1s);
    z-index: -1;
}

nav ul li:hover span{
    transform: translateY(0) scale(2);
}

nav ul li a:focus {
    background-color: #000;
    color: #fff;
}

nav ul li span:nth-child(1){
    --n:1;
}

nav ul li span:nth-child(2){
    --n:2;
}

nav ul li span:nth-child(3){
    --n:3;
}

nav ul li span:nth-child(4){
    --n:4;
}

/* heading */
.hero-heading-line h1{
    margin: 0;
}

.hero-heading-lines p{
    font-weight: 400;
    margin: 15rem 0 0 0;
}

.hero-heading-line h1 span {
    display: block; 
}


/* selected work */
.cloud-effect{
    margin: 0;
}
.cloud-effect ul{
    list-style: none;
    margin: 0;
    padding: 0;
}

.cloud-effect ul li{
    --c:#79a2d6;
    color: var(--c);
    width: 100%;
    height: auto;
    /* border: 0.4rem solid #000000; */
    /* border-radius: 2rem; */
    text-align: center;
    line-height: 2.5rem;
    font-weight: bold;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: 8;
    transition: 0.5s;
}

.cloud-effect ul li span{
    position: absolute;
    width: 70%;
    height: 70%;
    background-color: var(--c);
    border-radius: 50%;
    transform: translateY(150%);
    left: calc((var(--n) - 2) * 50%);

    transition: 0.5s;
    transition-delay: calc((var(--n) - 1) * 0.1s);
    z-index: 6;
}

.cloud-effect ul li:hover span,
.cloud-effect ul li a:focus span{
    transform: translateY(0) scale(2);
}

.cloud-effect ul li span:nth-child(1){
    --n:1;
}

.cloud-effect ul li span:nth-child(2){
    --n:2;
}

.cloud-effect ul li span:nth-child(3){
    --n:3;
}

.cloud-effect ul li span:nth-child(4){
    --n:4;
}

.selected-work {
    position: relative;
    background-color: #fafcff;
    padding-bottom: 10vh;
    margin-top: 1rem;
}

.work-one ul li{
    animation: slowFadeIn 2s;
    border-radius: 2rem 12rem 2rem 12rem;
}
.work-two ul li{
    animation: slowFadeIn 3s;
    border-radius: 12rem 12rem 2rem 2rem;
}
.work-three ul li{
    animation: slowFadeIn 4s;
    border-radius: 2rem 2rem 12rem 12rem;
}
.work-four ul li{
    animation: slowFadeIn 5s;
    border-radius: 12rem 2rem 2rem 12rem;
}

.works-heading h2{
    margin-top: 3rem;
    margin-bottom: 1rem;
    font-size: 2rem;

    color: #000000;
}

.works-selections h3{
    font-size: 1.5rem;
}

.works-heading {
    position: relative; 
    padding-top: 1rem;
}

.works-selections {
    position: relative; 
}

.image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 100%;
    overflow: hidden;
}

.image-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.wrapper-one::before{
    background: rgba(0, 0, 0, 0.5);
}

.wrapper-two::before{
    background: rgba(0, 0, 0, 0.5);
}

.wrapper-three::before{
    background: rgba(0, 0, 0, 0.5);
}

.wrapper-four::before{
    background: rgba(0, 0, 0, 0.5);
}

.image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.image-title {
    position: absolute;
    text-align: center;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    color: white; 
    transition: color 1s; 
}

.cloud-effect ul li:hover .image-title {
    color: black; 
}

/* I wouldn't get the focus state to trigger the title animation, only hover would. Therefore, I ask chatgpt with prompt: giving the following HTML structure, how to get focus state to work for the image-title animation? */
/* Focus State for the anchor */
.cloud-effect ul li a:focus-within .image-title {
    color: black; 
}

/* Chatgpt prompt: the .name-and-role, .heading also scroll when scrolling, I want it to be fixed and the work-section to be relative */
.name-and-role{
    position: fixed;
    top: 0; 
    left: 0; 
    right: 0; 
    z-index: 1; 
}

.heading{
    background-color: transparent;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    animation: slowFadeIn 3s;
    position: fixed;
    top: 0; 
    left: 0; 
    right: 0; 
    z-index: 2; 
}

.nav-flex img {
    width: 100%;
    height: 10vh;
    padding: 1rem 0 1rem;
    transition: transform 0.2s ease; 
    margin-left: 0;
}

.nav-flex{
    text-align: left;
}

.button-flex{
    display: flex;
    flex-wrap: nowrap;
}

/* buttons */
.button-secondary{
    display: inline-block;  
    padding: 1rem 2rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 0.7rem;
    color: rgb(255, 255, 255);
    background-color: #000000;
    text-decoration: none;
    transition-property: background-color; 
    transition-duration: 0.5s;
    /* text-align: center; */
    border: 0.2rem solid transparent;
    font-family: 'Lato', sans-serif;
    font-weight: 800;
    animation: slowFadeIn 2s;
}

.button-secondary:hover, .button-secondary:focus {
    background-color: transparent;
    border-radius: 0.7rem;
    padding: 1rem 2rem;
    border: 0.2rem solid;
    color: #000000;
}

/* Higher z-index for work-section to scroll over fixed elements */
.work-section {
    position: relative;
    top: 70vh;
    z-index: 2; 
}

/* ---------- footer ---------- */
.footer {
    z-index: 4;
    background-color: rgb(255, 255, 255);
    color: #000000;
    padding: 1.5rem 0;
    font-size: 0.9rem;
    box-shadow: 0 -0.3rem 0.3rem -0.3rem rgba(0, 0, 0, 0.2);
}

.footer-content {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    flex-wrap: wrap;
    max-width: 100%;
    margin: 0 auto;
}

.footer-section {
    margin-bottom: 1.5rem;
}

.footer-section h3 {
    color: #000000;
    margin-bottom: 1rem;
    font-weight: 700;
}

.footer-section ul {
    list-style: none;
    font-family: 'Lato', sans-serif;
    padding: 0;
}

.footer-section ul li{
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #000000;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: #79a2d6;
}

.footer-bottom {
    text-align: center;
    margin-top: 1.5rem;
}

.footer-bottom p{
    font-size: 0.75rem;
}

.follow-me{
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
}

.follow-me img{
    width: 2rem;
    height: auto;
}