* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Roboto Flex", sans-serif;
}

html,
body {
    height: 100%;
    width: 100%;
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
    background-color: var(--primary-color);
}

body>* {
    max-width: 1700px;
    overflow: hidden;
    margin-inline: auto;
}

:root {
    --primary-color: #011627;
    --secondary-color: white;
    --standard-fontsize: 1.1rem;
    --heading-fontsize: 2.5rem;
    --secondary-heading-fontsize: 1.9rem;
    --primary-color-2: black;
    --glassmorphism-color: rgba(0, 0, 0, 0.7);
}

*::selection {
    background-color: rgb(102, 150, 29);
    color: var(--primary-color);
}

/* Utility Classes */

/* Loader */

#loader-container {
    position: fixed;
    height: 100vh;
    width: 100vw;
    background-color: black;
    top: 0px;
    left: 0px;
    z-index: 990;
    max-width: 100vw;
    backdrop-filter: blur(20px);
}

#loader {
    height: 100px;
    width: 100px;
    background-color: transparent;
    position: absolute;
    top: calc(50% - 50px);
    left: calc(50% - 50px);
    z-index: 999;
    border-radius: 50%;
    border-block: 10px solid white;
    animation-name: loader;
    animation-duration: 2s;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
}

@keyframes loader {
    from {
        transform: rotateZ(0deg);
    }

    to {
        transform: rotateZ(360deg);
    }
}

/* button */

.btn {
    margin: 10px;
    /* padding: 15px 40px; */
    border: none;
    outline: none;
    color: var(--secondary-color);
    cursor: pointer;
    position: relative;
    z-index: 0;
    border-radius: 12px;
    font-size: var(--standard-fontsize);
    height: 50px;
    min-width: 140px;

}

.btn::after {
    content: "";
    z-index: -1;
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: var(--primary-color-2);
    left: 0;
    top: 0;
    border-radius: 10px;
    pointer-events: none;
}

/* glow */
.btn::before {
    content: "";
    background: linear-gradient(45deg,
            #FF0000, #FF7300, #FFFB00, #48FF00,
            #00FFD5, #002BFF, #FF00C8, #FF0000);
    position: absolute;
    top: -2px;
    left: -2px;
    background-size: 600%;
    z-index: -1;
    width: calc(100% + 4px);
    height: calc(100% + 4px);
    filter: blur(8px);
    animation: glowing 20s linear infinite;
    transition: opacity .3s ease-in-out;
    border-radius: 10px;
    opacity: 1;
    pointer-events: none;
}

@keyframes glowing {
    0% {
        background-position: 0 0;
    }

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

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

.btn:hover:after {
    background: transparent;
}

.btn:hover {
    color: #000;
    font-weight: bold;
}


.btn>a {
    color: inherit;
    text-decoration: none;
    display: block;
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    text-wrap: nowrap;
}

/* navbar */

nav {
    display: flex;
    justify-content: space-between;
    height: 70px;
    width: 100%;
    background-color: var(--primary-color-2);
    color: var(--secondary-color);
    align-items: center;
    padding: 10px;
    position: fixed;
    top: 0px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 840;
    box-shadow: 0 4px 100px 10px var(--secondary-color);
    transition: all 0.4s;
}

#nav-child {
    display: flex;
    justify-content: space-around;
    list-style: none;
    width: 800px;
    font-size: 1rem;
    align-items: center;
}

#logo>h1 {
    text-wrap: nowrap;
}

#logo {
    margin-right: 100px;
    margin-left: 10px;
}

#nav-child li {
    cursor: pointer;
}

#nav-child li>a {
    color: var(--secondary-color);
    text-decoration: none;
}

#mobile-menu {
    display: none;
    overflow: hidden;
}

.fa-solid {
    font-size: 2rem;
}

.fa-sun {
    width: 50px;
}

.fa-moon {
    display: none;
    width: 50px;
}

/* #profile-img img:hover {
    transform: rotateX(180deg) rotateY(180deg) rotate(180deg);

} */

/* hero section */

#hero {
    display: flex;
    justify-content: space-around;
    min-height: 740px;
    align-items: center;
    background-color: var(--primary-color);
    color: white;
    flex-wrap: wrap-reverse;
}

#profile-img>img {
    max-width: 400px;
    border-radius: 50%;
    border: 5px solid red;
    transition: all 1s;
    perspective: 800px;
    animation: image-rotation 1.5s ease-in;
    width: 100%;
    user-select: none;
}

#profile-img img:hover {
    scale: 1.1;
    box-shadow: 0px 0px 100px yellow;
}

#profile-img {
    padding: 20px;
}

@keyframes image-rotation {
    from {
        transform: rotateX(90deg) rotateY(90deg);
    }

    to {
        transform: rotateX(0deg) rotateY(0deg);
    }
}

@keyframes height-ani {
    from {
        height: 0px;
    }

    to {
        height: 400px;
    }
}


#intro {
    max-width: 500px;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: flex-start;
    color: var(--secondary-color);
    animation-name: height-ani;
    animation-duration: 1.5s;
    animation-timing-function: ease-in;
    overflow: hidden;
    padding: 10px;
    width: 100%;
    gap: 10px;
}

#intro>h1 {
    font-size: var(--heading-fontsize);
    font-style: italic;
}

#intro>p {
    font-size: var(--standard-fontsize);
}


/* skills that i have */

#skills {
    min-height: 400px;
    background-color: var(--primary-color);
    color: var(--secondary-color);
    display: flex;
    flex-direction: column;
    justify-content: space-around;
}

#skills>h1 {
    text-align: center;
    font-size: var(--heading-fontsize);
}

.skills-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
}

.skill-card>img {
    height: 200px;
    width: 200px;
    object-fit: contain;
    padding: 10px;
}

.skill-card {
    transition: all 1s;
    cursor: grab;
}

.skill-card:hover {
    scale: 1.2;
}

.skill-card>h2 {
    text-align: center;
    margin-block: 20px;
}

/* Projects Section */

#project-card-container {
    padding: 10px;
    min-height: 300px;
    position: relative;
    display: flex;
    gap: 10px;
    justify-content: space-around;
    flex-wrap: wrap;
}

#projectloader {
    height: 100px;
    width: 100px;
    border-block: 10px solid var(--secondary-color);
    position: absolute;
    top: calc(50% - 50px);
    left: calc(50% - 50px);
    border-radius: 50%;
    animation-name: loader;
    animation-duration: 2s;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
}

#projects-section-heading {
    font-size: var(--heading-fontsize);
    color: white;
    text-align: center;
    padding: 10px;
}

.project-title {
    font-size: var(--secondary-heading-fontsize);
    height: 80px;
    align-content: center;
}

.project-image>img {
    width: 100%;
}

.project-image {
    width: 100%;
}

.project-card {
    max-width: 500px;
    margin: 10px;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    padding-bottom: 90px;
    border: 2px solid var(--secondary-color);
    width: 100%;

}

.project-card:hover>.project-content {
    top: 0px;
    justify-content: space-around;
    background-color: var(--glassmorphism-color);
    backdrop-filter: blur(20px);
}

.project-content {
    position: absolute;
    background-color: var(--primary-color-2);
    top: calc(100% - 100px);
    left: 0;
    height: 100%;
    width: 100%;
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: start;
    gap: 10px;
    color: var(--secondary-color);
    transition: all 0.3s;
    border-radius: 10px;

}

.project-btn-container {
    display: flex;
    gap: 20px;
    align-items: center;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
}

.project-btn {
    margin-inline: 0px;
    flex: 1;
}

/* My services */

#Services {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    min-height: 1290px;
}

#services-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    perspective: 1200px;
}

.services-card {
    width: 40%;
    min-width: 500px;
    padding: 15px;
    margin: 25px;
    background-color: var(--primary-color-2);
    color: var(--secondary-color);
    border-radius: 15px;
    border: 7px solid rgb(102, 150, 29);
    position: relative;
    cursor: grab;

    /* Smooth interaction */
    transition: transform 0.5s ease, box-shadow 0.5s ease;
    overflow: hidden; /* for shine effect */
}

/* Hover animation */
.services-card:hover {
    transform: rotate3d(1, 1, 0, 4deg);
    box-shadow: 0 15px 35px rgba(102, 150, 29, 0.4), 
                0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Shine sweep effect */
.services-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        120deg, 
        transparent, 
        rgba(255, 255, 255, 0.4), 
        transparent
    );
    transform: skewX(-25deg);
}

/* Shine animation only on hover */
.services-card:hover::before {
    animation: shine 1s forwards;
}

@keyframes shine {
    0%   { left: -75%; }
    100% { left: 125%; }
}


.services-card>h3 {
    font-size: var(--secondary-heading-fontsize);
}

.service-description>* {
    margin-block: 15px;
}

.service-description>h5 {
    font-size: 1.5rem;
}

#Services>h1 {
    font-size: var(--heading-fontsize);
    text-align: center;
    padding: 15px;
    color: var(--secondary-color);
}

.what-you-get {
    padding-left: 18px;
}

#custom-services {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--standard-fontsize);
    background-color: var(--primary-color-2);
    color: var(--secondary-color);
    padding: 15px;
    border-block: 2px solid var(--secondary-color);
    overflow: hidden;
    min-height: 100px;
    width: 100%;
}

/* Contact me */

#Contact-me {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    min-height: 670px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#Contact-me>h1 {
    font-size: var(--heading-fontsize);
    text-align: center;
    padding: 20px;
}

#Contact-me>form {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

form>* {
    font-size: var(--standard-fontsize);
    padding: 7px 15px;
    width: 80%;
    background-color: var(--primary-color-2);
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
}

textarea {
    flex: 1;
    background-color: var(--primary-color-2);
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);

}

.email {
    font-size: var(--standard-fontsize);
    text-align: center;
    padding: 20px;
}

.email>a {
    color: var(--secondary-color);
}

#popup {
    height: 250px;
    width: 400px;
    background-color: var(--primary-color-2);
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 17px;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
    border: var(--secondary-color);
    color: var(--secondary-color);
    text-align: center;
    border-radius: 17px;
    animation: popup 1s;
    font-size: var(--standard-fontsize);
    z-index: 900;
    box-shadow: 0px 0px 40px 10px var(--secondary-color);
}

#popup a {
    color: var(--secondary-color);
}

@keyframes popup {
    from {
        opacity: 0;
        scale: 0;
    }

    to {
        opacity: 1;
        scale: 1;
    }
}

/* footer */

footer {
    background-color: rgb(102, 150, 29);
    color: var(--primary-color);
    font-size: var(--standard-fontsize);
    display: flex;
    justify-content: space-between;
    padding: 15px 30px;
    align-items: center;
    width: 100%;
    flex-wrap: wrap;
    gap: 10px;
}


footer a {
    text-decoration: none;
    color: var(--primary-color);
    margin-inline: 15px;
    margin-inline: 0px;
}

footer>ul>li:first-child {
    font-style: italic;
    font-weight: 900;
}

footer>ul>li {
    list-style: none;
    margin-block: 7px;
}

/* animations and cursor */

.cursor-partner {
    position: fixed;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 900;
    pointer-events: none;
    transition: all 0.3s;
}

.default {
    height: 200px;
    width: 200px;
    background-color: rgb(255, 127, 80, 0.2);
}

.remove {
    height: 0px;
    width: 0px;
}

.focus {
    height: 50px;
    width: 50px;
    border: 2px solid var(--secondary-color);
}

@media (max-width : 1100px) {

    #services-container {
        flex-direction: column;
        width: 100%;
        align-items: center;
    }

    .services-card {
        width: 100%;
        min-width: calc(100% - 30px);
        position: relative;
        left: -10px;
    }

}

@media (max-width : 900px) {

    #profile-img>img {
        margin-top: 100px;
    }

}

@media (max-width: 800px) {

    nav {
        height: 80px;
        flex-direction: column;
        padding-block: 20px;
        align-items: start;
        overflow: hidden;

    }

    #nav-child {
        flex-direction: column;
        gap: 10px;
        align-items: start;
        width: fit-content;
    }

    #themeChanger {
        position: absolute;
        right: 40px;
        top: 20px;
        margin: 10px;
    }

    #nav-child>li {
        margin: 10px;
    }

    #logo>h1 {
        margin: 10px;
        margin-left: 0px;
    }

    #nav-child>li>a:hover {
        text-decoration: underline;
        color: red;
    }

    #mobile-menu {
        display: block;
        position: absolute;
        margin: 10px;
        top: 20px;
        right: 10px;
    }

    #profile-img>img {
        margin-top: 100px;
    }
}

@media (hover: none) and (pointer: coarse),
(max-width: 535px) {

    .project-title {
        height: fit-content;
    }

    .project-content {
        position: relative;
        top: auto;
        left: auto;
        gap: 20px;
        height: fit-content;
    }

    .project-card {
        padding-bottom: 10px;
    }



}

@media (max-width: 535px) {

    .project-title {
        height: fit-content;
        font-size: 1.7rem;
    }
}

@media (max-width: 450px) {

    #popup {
        width: calc(100% - 30px);
    }

}

@media (pointer: coarse) {
    .cursor-partner {
        display: none;
    }
}