* {
    font-family: "Google Sans Flex";
}

html body {
    position: relative;
    height: max-content;
    width: 100vw;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

main {
    position: relative;
    height: 100%;
    padding: 5% 8%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 30px;
}


header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: rgb(255, 254, 254);
    padding: 0px 50px;
    font-size: 20px;
    /* border: 2px solid black; */
    /* border-radius: 60px; */
}

header>nav {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

header>nav>a {
    color: rgb(94, 94, 94);
    /* background-color: black; */
    padding: 10px 10px;
    border-radius: 50px;
}

header>nav>a:hover {
    color: black;
    background-color: rgb(224, 221, 221);
}

a {
    text-decoration: none;
}

.intro {
    display: flex;
    height: 60%;
    width: 100%;
    justify-content: center;
    align-items: center;
}

.intro>article>p {
    font-size: 30px;
}

.reveal-text {
    display: block;
    width: fit-content;
    position: relative;
    margin: 4px;
}

.gradient-text {
    color: transparent;
    font-weight: 700;
    background: linear-gradient(90deg,
            #4b90ff,
            #6852ba,
            #ff5546,
            #4b90ff);

    background-size: 200% auto;

    /* Clipping */
    background-clip: text;
    font-weight: 700;

    animation-name: move-gradient;
    animation-duration: 5s;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

.gradient-text::after {
    content: "";
    /* position: absolute; */
    right: 0;
    height: 100%;
    width: 61%;

}

.line-1::after {
    content: "";
    position: absolute;
    right: -5px;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgb(255, 255, 255);
    border-left: 2px solid #ffffff;

    /* animation */
    animation-name: curtain-wipe, cursor-disappear;
    animation-duration: 1s;
    animation-delay: 0s;
    animation-fill-mode: forwards;
    animation-timing-function: cubic-bezier(0.7, 0, 0.3, 1), steps(2), ;
    animation-iteration-count: 1;
}

.line-2::after {
    content: "";
    position: absolute;
    right: -5px;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgb(255, 255, 255);
    border-left: 4px solid #ffffff;

    /* animation */
    animation-name: curtain-wipe, cursor-disappear;
    animation-duration: 1.5s, 1.5s;
    animation-delay: 1s, 1s;
    animation-fill-mode: forwards, forwards;
    animation-timing-function: cubic-bezier(0.7, 0, 0.3, 1), steps(2), linear;
    animation-iteration-count: 1, 1;
}

.line-3::after {
    content: "";
    position: absolute;
    right: -5px;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgb(255, 255, 255);
    border-left: 4px solid #ffffff;

    /* animation */
    animation-name: curtain-wipe, cursor-disappear;
    animation-duration: 2s, 2s;
    animation-delay: 2.5s, 2.5s;
    animation-fill-mode: forwards, forwards;
    animation-timing-function: cubic-bezier(0.7, 0, 0.3, 1), steps(2), linear;
    animation-iteration-count: 1, 1;
}

.line-4::after {
    content: "";
    position: absolute;
    right: -5px;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgb(255, 255, 255);
    border-left: 4px solid #ffffff;

    /* animation */
    animation-name: curtain-wipe, cursor-disappear;
    animation-duration: 2s, 2s;
    animation-delay: 4.5s, 4.5s;
    animation-fill-mode: forwards, forwards;
    animation-timing-function: cubic-bezier(0.7, 0, 0.3, 1), steps(2), linear;
    animation-iteration-count: 1, 1;
}

.line-5 {
    color: rgb(252, 252, 252);
    opacity: 0%;
    font-size: 18px;
    top: 80px;
    left: 0px;
    animation-name: appear;
    animation-timing-function: linear;
    animation-delay: 6.5s;
    animation-duration: 1s;
    animation-fill-mode: forwards;
}


@keyframes appear {
    100% {
        color: #000000;
        opacity: 100%;
    }
}


.skills-section {
    position: relative;
    background-color: #f9f9f9;
    padding: 1px 0px;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.skills-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    max-width: 80%;
    margin: 0;
    box-sizing: border-box;
}

.title {
    text-align: center;
    margin: 1%;
    font-size: 35px;
}

.skill-item {
    font-size: 24px;
    font-weight: 500;
    color: #555;
    user-select: none;
    cursor: pointer;

    /* Base State (Visible) */
    opacity: 1;
    transform: scale(1);

    /* Hover Transition */
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.3s ease;

    /* Entrance Animation */
    /* 'backwards' ensures it stays hidden (opacity 0) during the delay period */
    animation: bubble-pop 2s cubic-bezier(0.175, 0.885, 0.32, 1.275) backwards;
}

/* STAGGER DELAYS (One by one effect) */
.skill-item:nth-child(1) {
    animation-delay: 1.1s;
}

.skill-item:nth-child(2) {
    animation-delay: 1.2s;
}

.skill-item:nth-child(3) {
    animation-delay: 1.3s;
}

.skill-item:nth-child(4) {
    animation-delay: 1.4s;
}

.skill-item:nth-child(5) {
    animation-delay: 1.5s;
}

.skill-item:nth-child(6) {
    animation-delay: 1.6s;
}

.skill-item:nth-child(7) {
    animation-delay: 1.7s;
}

.skill-item:nth-child(8) {
    animation-delay: 1.8s;
}

.skill-item:nth-child(9) {
    animation-delay: 1.9s;
}

.skill-item:nth-child(10) {
    animation-delay: 2.0s;
}

.skill-item:nth-child(11) {
    animation-delay: 2.1s;
}

.skill-item:nth-child(12) {
    animation-delay: 2.2s;
}

/* DELAYED TEXT CSS */
.delayed-text {
    margin-top: 50px;
    font-size: 16px;
    color: #888;
    opacity: 0;
    /* Hidden initially */

    /* Animation: name | duration | easing | fill-mode | DELAY */
    animation: fade-in-up 1s ease forwards 3s;
}

/* POP ENTRANCE KEYFRAMES */
@keyframes bubble-pop {
    0% {
        opacity: 0;
        transform: scale(0);
    }

    80% {
        transform: scale(1.1);
        /* Bounce effect (overshoot) */
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* FADE IN UP KEYFRAMES */
@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* HOVER INTERACTION */
.skill-item:hover {
    transform: scale(1.5);
    /* Scales up significantly */
    color: #4b90ff;
    /* Highlight color */
    z-index: 10;
}

/* --- SKILLS CSS END --- */

@keyframes scroll-left {
    0% {
        transform: translateX(0%);
    }

    100% {
        transform: translateX(-50%);
    }
}

@keyframes move-gradient {
    0% {
        background-position: 0% center;
    }

    100% {
        background-position: 200% center;
    }
}

@keyframes curtain-wipe {
    from {
        width: 100%
    }

    to {
        width: 0%;
    }
}

@keyframes cursor-disappear {
    0% {
        border-left: 2px solid black;
    }

    99% {
        border-left: 2px solid black;
    }
}

footer {
    text-align: center;
    margin-top: 50px;
}

.contact-section {
    width: 100%;
    height: 70%;
}

.contact-container {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    height: 100%;
    width: 100%;
}

.text-stack-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* padding: 0px 50px; */
    box-sizing: border-box;
    width: 50%;
    height: 100%;
    gap: 30px;
    margin-bottom: 60px;
}

.text-stack-container>:first-child {
    font-size: 55px;
    margin: 0px;
}

.text-stack-container>:nth-child(2) {
    font-size: 45px;
    margin: 0px;
    text-align: center;
}

.text-stack-container>:nth-child(3) {
    font-size: 25px;
    margin: 0px;
    text-align: center;
}

/* .text-stack-container>p {
    margin-left: 0px;
    margin-top: 8px;
    margin-bottom: 8px;
    height: 100%;
} */

.enquiry-form-container {
    position: relative;
    display: flex;
    padding: 0px 50px;
    font-size: 24px;
    width: 25%;
    height: 100%;
    flex-direction: column;
    gap: 10px;
}

div>input,
textarea {
    background-color: #ececec;
    border: 1px solid rgb(233, 228, 228);
    border-radius: 40px;
    width: 100%;
    height: 100%;
    min-height: 45px;
    padding: 3px 20px;
    box-sizing: border-box;
}

div>label {
    /* padding: 10px; */
    padding-left: 10px;
}

form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    height: fit-content;
    gap: 10px;
}

form>div {
    gap: 10px;
    /* min-width: 250px; */
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 5px;
    height: fit-content;
}

#email {
    grid-column: span 2;
}

#message {
    grid-column: span 2;
}

textarea {
    width: 100%;
    padding: 3px 20px;
    box-sizing: border-box;
    flex-shrink: 1;
}

button {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 40%;
    border-radius: 200px;
    border: 1px solid gray;
    font-size: 24px;
    border-style: none;
    padding: 10px;
}

#submit{
    grid-column: span 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding:10px;
    width: 100%;
    box-sizing: border-box;
}

input:focus,
textarea:focus {
    border-color: #888;
    outline: none;
    font-size: 18px;
}

.projects-section {
    padding-top: 10%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: 100%;
    gap: 30px;
    /* background-color: #555; */
}

div>a {
    color: grey;
    font-size: 28px;
}

div>a:hover {
    color: #4b90ff;
    transition: 0.7s;
}

.projects-section>div {
    color: grey;
    font-size: 28px;
}

.projects-section>div:hover {
    transform: scale(1.2);
    transition: 0.7s;
    color: #4b90ff;
}

.projects-section>p {
    font-size: 32px;
    animation: text-appear;
    color: #309641;
}

.projects-section>p::after {
    content: "";
    position: absolute;
    right: -5px;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgb(255, 255, 255);
    border-left: 4px solid #ffffff;

    /* animation */
    animation-name: curtain-wipe, cursor-disappear;
    animation-duration: 2s, 2s;
    animation-delay: 0s, 0s;
    animation-fill-mode: forwards, forwards;
    animation-timing-function: cubic-bezier(0.7, 0, 0.3, 1), steps(2), linear;
    animation-iteration-count: 1, 1;
}

@media screen and (max-width: 768px) {

    /* CSS rules here apply ONLY if screen is 768px or smaller */
    html body {
        position: relative;
        height: 100vh;
    }

    header {
        display: flex;
        flex-direction: column;
    }

    header>nav {
        gap: 0px;
    }

    .intro {
        position: relative;
        top: -14%;
        height: 20%;
    }

    .intro>article {
        flex-direction: column;
        display: flex;
        align-items: center;
        width: 100%;
    }

    .intro>article>p {
        font-size: 24px;
    }

    .skill-item {
        margin-top: 10px;
        font-size: 18px;
    }

    .title {
        font-size: 30px;
    }

    .skills-container {
        gap: 10px;
    }

    .delayed-text {
        margin-top: 10px;
    }

    footer {
        margin: auto;
    }

    header>h1 {
        text-align: center;
        width: max-content;
    }

    .projects-section {
        padding-top: 10%;
    }

    .projects-section>p {
        font-size: 25px;
    }

    .projects-section>div {
        text-align: center;
        font-size: 15px;
    }

    .projects-section>div>a {
        font-size: 20px;
    }

    .contact-container {
        display: flex;
        flex-direction: column;
    }

    .enquiry-form-container {
        padding: 0%;
        width: fit-content;
    }

    .contact-section {
        width: 90%;
        height: 100%;
        padding-top: 25%;
    }

    .text-stack-container{
        width: 100%;
        gap: 10px;
        justify-content: flex-start;
        height: fit-content;
        /* padding-bottom: 20px; */
    }

    .text-stack-container>:first-child{
        font-size: 38px;
    }

    .text-stack-container>:nth-child(2){
        font-size: 28px;
    }

    .text-stack-container>:nth-child(3){
        font-size: 20px;

    }
}