@property --degree {
    syntax: "<angle>";
    inherits: false;
    initial-value: 90deg;
}

section {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-around;
    align-items: center;
    gap: 3rem;
    min-height: 80vh;
    width: 100vw;
    padding: 0 10%;
    color: white;
}

section#intro {
    justify-content: flex-start;
}

section#intro h1 {
    font-size: 6rem;
    background: linear-gradient(var(--degree), orangered, orange, yellow, lightgreen, lightblue);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: rotate 5s linear infinite;
}

section#intro h2 {
    font-size: 2.5rem;
    font-weight: bold;
    margin: 1rem 0;
}

section#intro h2.dynamic-role {
    color: red;
}

/* The cursor */
section#intro h2.dynamic-role::after {
    content: '|';
    display: inline-block;
    animation: blink 1s linear infinite;
}

section#about {
    color: black;
    flex-direction: column;
    gap: 1rem;
}

section#about .about-me {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    width: 100%;
}

section#about .about-me>div {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

section#about h1 {
    font-size: 3rem;
    font-weight: bold;
    margin: 1rem 0;
}

section#about p {
    font-size: 1.2rem;
    font-weight: 500;
    text-align: justify;
    margin: 1rem 0;
    line-height: 1.5;
}

section#about img {
    height: clamp(100px, 40vw, 500px);
    width: auto;
    border-radius: 5px;
    aspect-ratio: 9 / 16;
    object-fit: cover;
    border: 1px solid black;
}

section#coding h1 {
    font-size: 3rem;
    font-weight: bold;
    margin: 1rem 0 2rem 0;
}

section#coding progress {
    position: relative;
    width: 100%;
    height: 1rem;
    margin: 0.75rem 0 1.5rem 0;
    border-radius: 0.5rem;
    appearance: none;
}

section#coding progress::before {
    content: attr(value) "%";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    text-shadow: 0 0 0.5rem black;
    user-select: none;
    pointer-events: none;
}

section#coding progress::-webkit-progress-bar {
    background: lightgray;
    border-radius: 0.5rem;
}

section#coding progress::-webkit-progress-value {
    background: orangered;
    border-radius: 0.5rem;
}

section#social-media {
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

section#social-media h1 {
    font-size: 3rem;
    font-weight: bold;
    margin: 1rem 0 2rem 0;
}

section#social-media>.socials {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

section#social-media>.socials>div {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

section#social-media i:not(#arrow-up) {
    font-size: 10rem;
    cursor: pointer;
    transition: all 0.3s ease-out;

    &:hover {
        transform: translateY(-0.5rem);
        opacity: 0.8;
    }
}

section div.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: max-content;
    font-weight: 500;
    gap: 5px;
    position: relative;
    padding: 1rem 2rem;
    margin: 2rem 0;
    font-size: 1.5rem;
    font-weight: 500;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: white;
    background: red;
    border: 2px solid red;
    border-radius: 0.5rem;
    cursor: pointer;
    user-select: none;
    transition: background 0.3s ease-out;

    &:hover {
        background: transparent;
    }
}

section div.btn>button {
    border: none;
    background: none;
    color: white;
    font-size: 1.5rem;
}

section div.btn>i {
    font-size: 2rem;
}

section img {
    position: relative;
    height: auto;
    width: clamp(100px, 20vw, 200px);
    border-radius: 50%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    user-select: none;
    pointer-events: none;
}

/* RGB effect */
@keyframes rotate {
    0% {
        --degree: 0deg;
    }

    25% {
        --degree: 90deg;
    }

    50% {
        --degree: 180deg;
    }

    75% {
        --degree: 270deg;
    }

    100% {
        --degree: 360deg;
    }
}

@keyframes blink {
    0% {
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

@media only screen and (max-width: 768px) {
    section {
        padding: 0 5%;
    }

    section#social-media>.socials {
        flex-direction: column;
        gap: 2rem;
    }

    section img {
        display: none;
    }
}