@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400..700;1,400..700&family=Ojuju:wght@200..800&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

* {
    margin: 0;
    padding: 0;
    font-family: "Poppins", sans-serif;
    color: #fff !important;
}

body {
    background: linear-gradient(270deg, #0f0c29, #302b63, #aa4f00, #5505e9);
    background-size: 600% 600%;
    animation: gradientShift 12s ease infinite;
    color: white;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    25% {
        background-position: 50% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.btn:hover {
    color: white !important;
}

span {
    color: #007ced !important;

}

/* -------------------------------  NAVBAR  --------------------------------------- */

nav {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5));

}

.navbar-brand {
    color: #007ced !important;
    font-weight: bold;
}

.nav-item {
    padding: 0 10px;
}

.nav-item::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: #007ced;
    transition: width 1s;
    margin: auto;
}

.nav-item:hover::after {
    width: 100%;
}

.nav-link {
    color: #fff;
    padding: 10px 30px;
    text-decoration: none;
    border-radius: 20px;
    font-size: 15px;
    border: none;
}

/* ------------------------------------------------------- HOME PAGE ---------------------------------------------------------  */

/* <!---------------------------------------  HOME SECTION  ---------------------------------------> */

.varun_img {
    border-radius: 50%;
}


.flex {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 90%;
    margin: auto;
    text-align: center;

}

.bi-facebook,
.bi-github,
.bi-linkedin,
.bi-instagram {
    border-radius: 50%;
    padding: 5px 12px;
    margin: 10px;
    font-size: 25px;
    background-color: transparent !important;
    color: white !important;
    border: 2px solid white;
}

.bi-linkedin:hover {
    transform: scale(1.2);
    transition: all 0.3s ease-in-out;
    background-color: white !important;
    color: black !important;
}

.bi-instagram:hover {
    transform: scale(1.2);
    transition: all 0.3s ease-in-out;
    background-color: white !important;
    color: black !important;
}

.bi-github:hover {
    transform: scale(1.2);
    transition: all 0.3s ease-in-out;
    background-color: white !important;
    color: black !important;
}

.bi-facebook:hover {
    transform: scale(1.2);
    transition: all 0.3s ease-in-out;
    background-color: white !important;
    color: black !important;
}

.sub-home .typewriter {

    font-size: 30px !important;
}

.sub-home .typewriter span {
    color: #007ced !important;
    font-weight: 2.5rem !important;
    position: relative;
    transition: 0.3 linear;
}

.typewriter span::before {
    content: ' Frontend Developer';
    animation: words 10s infinite;
}

.typewriter span::after {
    content: '|';
    position: absolute;
    right: -10px;
    animation: blink 0.7s infinite;
    color: white !important;
}

@keyframes blink {

    0%,
    50% {
        opacity: 1;
    }

    50.01%,
    100% {
        opacity: 0;
    }
}

@keyframes words {

    0%,
    30% {
        content: 'Frontend Developer';
    }

    30%,
    60% {
        content: 'Python Developer';
    }

    60%,
    90% {
        content: 'Web Developer';
    }

    90%,
    100% {
        content: 'Problem Solver';
    }

}

/* <!---------------------------------------  ABOUT SECTION  ---------------------------------------> */

.page2 {
    padding: 50px 20px;
    height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.page2 h2 {
    color: goldenrod;
    margin-bottom: 20px;
}

/* -------------------------------------------------- SKILLS SECTION ---------------------------------------------------------  */

.page3 {
    height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.page3 h2 {
    margin-top: 20% !important;
}

/* <!---------------------------------------  PROJECT SECTION  ---------------------------------------> */
.page4 {
    height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.page4 h2 {
    margin-top: 15% !important;
}

.card {
    background: linear-gradient(rgba(0, 0, 0.7), rgba(0, 0, 0, 0.7)), url(./Images/bg2.png);
}

.card:hover {
    transform: scale(1.05);
    transition: all 0.3s ease-in-out;
    box-shadow: 0 0 10px #007ced, 0 0 20px #007ced, 0 0 30px #007ced;
    border: 2px solid #007ced;
}

/* --------------------------------------------------  CONTACT SECTION --------------------------------------- */

.page5 {
    height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

}

.bi-envelope-fill,
.bi-telephone-fill {
    color: #007ced !important;
}

/* --------------------------------------------------  MEDIA QUERIES  --------------------------------------- */

@media screen and (max-width:768px) {
    .flex {
        flex-direction: column;
        height: auto;
        padding: 20px 0;
        margin-top: 50px;
        margin-left: 0;
    }

    .bi-facebook,
    .bi-github,
    .bi-linkedin,
    .bi-instagram {
        font-size: 20px;
        padding: 5px 10px;
        margin: 5px;
    }

    .varun_img {
        width: 200px;
        height: 200px;
        margin-left: 10%;
    }

    .skills-container {
        flex-direction: column;
    }

    .card {
        margin-left: 20% !important;
    }

    .page2,
    .page3,
    .page4,
    .page5 {
        height: auto;
        padding: 50px 0;
        width: auto;
    }

    .sub-contact {
        margin-left: 20px;
    }

    .flex-item {
        margin-left: 30% !important;
        text-align: center;
    }

    .home-media {
        flex-direction: column;
        text-align: center;
        margin-left: 0 !important;
    }

    .sub-contact {
        margin-left: 10% !important;
    }

    .sub-home .typewriter {
        font-size: 25px !important;
    }

    .sub-home h1 {
        font-size: 30px !important;
    }

    .nav-item::after {
        display: none;
    }

}

@media screen and (min-width:320px) and (max-width:425px) {
    .page4 .row {
        margin: 0 5% !important;
        flex-direction: column;
    }
}

@media screen and (min-width:320px) and (max-width:768px) {
    .varun_img {
        margin-left: 0% !important;
    }

    .flex-item {
        margin-left: 15% !important;
        text-align: center;
    }

    .card {
        margin-left: 5% !important;
    }

    .sub-contact {
        margin-left: 0 !important;
    }

    .home-media {
        margin-left: 0 !important;
    }

    form .btn {
        margin-left: 25% !important;
    }

    .contact-form {
        width: 90% !important;
        margin: auto !important;
    }

    .sub-contact {
        margin: auto !important;
        margin-left: 2% !important;
    }

    .about-sub {
        margin-top: 10%;
    }

    .page4 .row .col {
        padding: 15px 0 !important;
    }

    .page4 h2,
    .page3 h2,
    .page2 h2,
    .page5 h2 {
        font-size: 40px !important;
    }

    .card {
        margin-right: 5% !important;
    }

    .page4 {
        margin-top: 0 !important;
    }

    .card a {
        margin: 0 !important;
    }

    .skill-card {
        margin: auto !important;
        margin-bottom: 20px !important;
        width: 90% !important;
    }
}



/* ========== PRELOADER ========== */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #111;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    flex-direction: column;
}

.loader-text {
    font-size: 3rem;
    font-weight: bold;
    color: #ff4d4d;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.2;
        transform: scale(0.9);
    }

    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

/* ========== HERO SECTION ========== */

.hero-text {
    font-size: 3.5rem;
    animation: slideDown 2.0s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

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


/* ========== SKILL BARS ========== */
.skill-bar {
    background: #ddd;
    border-radius: 30px;
    overflow: hidden;
    margin-bottom: 15px;
}

.skill-fill {
    height: 20px;
    width: 0;
    background: linear-gradient(90deg, #ff4d4d, #ff9900);
    border-radius: 30px;
    transition: width 2s ease;
}

/* ========== PROJECT CARDS ========== */
.project-card {
    perspective: 1000px;
}

.project-card .card {
    transition: transform 0.5s;
    transform-style: preserve-3d;
}

.project-card:hover .card {
    transform: rotateY(10deg) rotateX(10deg) scale(1.05);
}

/* ========== SCROLL TO TOP ========== */
#scrollTopBtn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    background: #ff4d4d;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 22px;
    display: none;
    cursor: pointer;
    transition: transform 0.3s;
}

#scrollTopBtn:hover {
    transform: scale(1.1);
    background: #e63939;
}

/* Fancy button hover */
.btn {
    transition: all 0.3s ease;

}

.btn:hover {
    background: linear-gradient(270deg, #ff4d4d, #ff9900);
    color: #fff;
    border: none;
    transform: scale(1.05);
}

.skill-card {
    border-radius: 15px;
    transition: all 0.3s ease-in-out;
    background: #1a1a1a;
}

.skill-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.skill-card h3 {
    font-size: 20px;
    font-weight: 600;
}

.skill-card ul li {
    margin-bottom: 10px;
    font-size: 15px;
}