.home {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15rem;
}

.home-content {
    display: flex;
    flex-direction: column;
    align-items: baseline;
    text-align: left;
    justify-content: center;
    margin-top: 3rem;
}

.home-content h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-top: 1.5rem;
    line-height: 1;
}

.home-content h1 span {
    color: var(--main-color);
}

.home-content h3 {
    margin-bottom: 2rem;
    margin-top: 2.5rem;
    font-size: 3rem;
}

/* h3 text animation */
.text-animation {
    font-size: 34px;
    font-weight: 600;
    min-width: 280px;
}

.text-animation span {
    position: relative;
    display: inline-block;
}

.text-animation span::before {
    content: "";
    color: var(--main-color);
    animation: words 20s infinite;
}

.text-animation span::after {
    content: "";
    background-color: var(--bg-color);
    position: absolute;
    width: calc(100% + 8px);
    height: 100%;
    border-left: 3px solid var(--bg-color);
    right: -8px;
    animation: cursor 0.6s infinite, typing 20s steps(14) infinite;
}

@keyframes cursor {
    to {
        border-left: 2px solid var(--main-color);
    }
}

@keyframes words {

    0%,
    20% {
        content: "Software";
    }

    21%,
    40% {
        content: "Hardware";
    }

    41%,
    60% {
        content: "Data Analytics";
    }

    61%,
    80% {
        content: "Fintech";
    }

    81%,
    100% {
        content: "Sports";
    }
}

@keyframes typing {

    10%,
    15%,
    30%,
    35%,
    50%,
    55%,
    70%,
    75%,
    90%,
    95% {
        width: 0;
    }

    5%,
    20%,
    25%,
    40%,
    45%,
    60%,
    65%,
    80%,
    85% {
        width: calc(100% + 8px);
    }
}

.home-content p {
    font-size: 1.8rem;
    font-weight: 500;
    line-height: 1.3;
    max-width: 1000px;
}

/* Laptop image in home page */
.home-img img {
    position: relative;
    top: 2.2rem;
    width: 33vw;
    border-radius: 24%;
    box-shadow: 0 0 25px var(--main-color);
    cursor: pointer;
    transition: 0.4s ease-in-out;
}

.home-img img:hover {
    box-shadow: 0 0 25px var(--main-color),
        0 0 50px var(--main-color);
}

/* LinkedIn and GitHub buttons */
.social-icons a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 4.5rem;
    height: 4.5rem;
    background: transparent;
    border: 2px solid var(--main-color);
    font-size: 2.5rem;
    border-radius: 50%;
    color: var(--text-color);
    margin: 3rem 1.5rem 3rem 0;
    transition: 0.3s ease-in-out;
}

.social-icons a:hover {
    color: var(--text-color);
    transform: scale(1.2)translateY(-5px);
    box-shadow: 0 0 20px var(--main-color);
    background-color: var(--main-color);
}

/* Resume button */
.resume-btn {
    display: inline-block;
    padding: 1rem 2.2rem;
    /* keep button size */
    background: var(--main-color);
    box-shadow: 0 0 5px var(--main-color);
    border-radius: 4rem;
    font-size: 2rem;
    /* bigger text */
    color: black;
    border: 2px solid transparent;
    letter-spacing: 0.1rem;
    font-weight: 600;
    line-height: 1;
    /* ensure text fits vertically */
    transition: 0.3s ease-in-out;
    cursor: pointer;
}

.resume-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px var(--main-color);
}

/* -------------------- Media Queries -------------------- */
@media (max-width: 991px) {
    .home {
        flex-direction: column-reverse;
        /* Stack image on top of content */
        gap: 5rem;
        padding-top: 11.5rem;
    }

    .home-content {
        align-items: center;
        /* Center content on smaller screens */
        text-align: center;
    }

    .home-content h1 {
        font-size: 3rem;
    }

    .home-img img {
        width: 60vw;
    }
}

@media (max-width: 768px) {
    .home-content h1 {
        font-size: 2.5rem;
    }

    .home-content h3 {
        font-size: 2.5rem;
    }

    .home-content p {
        font-size: 1.6rem;
    }
}