@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&family=Space+Grotesk:wght@300;500;700&family=Syncopate:wght@400;700&display=swap');

:root {
    --bg-color: #080808;
    --second-bg-color: #131313;
    --text-color: #ededed;
    --main-color: #00eeff;
    /* Cyan Neon */
    --accent-color: #7d2ae8;
    /* Purple Neon */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --border: 1px solid rgba(255, 255, 255, 0.1);
    --font-primary: 'Outfit', sans-serif;
    --font-heading: 'Space Grotesk', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    scroll-behavior: smooth;
    font-family: var(--font-primary);
}

html {
    font-size: 62.5%;
    overflow-x: hidden;
}

body {
    background: var(--bg-color);
    color: var(--text-color);
    cursor: none;
    /* Custom cursor */
}

/* Custom Cursor */
.cursor-dot,
.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
}

.cursor-dot {
    width: 5px;
    height: 5px;
    background-color: var(--main-color);
}

.cursor-outline {
    width: 30px;
    height: 30px;
    border: 2px solid var(--main-color);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 9%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo {
    font-size: 2.5rem;
    color: var(--text-color);
    font-weight: 700;
    font-family: var(--font-heading);
    letter-spacing: 2px;
}

.logo span {
    color: var(--main-color);
}

.navbar a {
    font-size: 1.7rem;
    color: var(--text-color);
    margin-left: 4rem;
    transition: .3s;
    font-weight: 500;
}

.navbar a:hover,
.navbar a.active {
    color: var(--main-color);
    text-shadow: 0 0 10px var(--main-color);
}

.menu-btn {
    font-size: 3.6rem;
    color: var(--text-color);
    display: none;
    cursor: pointer;
}

/* Home Section */
section {
    min-height: 100vh;
    padding: 10rem 9% 2rem;
}

.home {
    display: flex;
    justify-content: center;
    align-items: center;
}

.home-content {
    flex: 1;
}

.home-content h3 {
    font-size: 3.2rem;
    font-weight: 700;
    opacity: 0;
    animation: slideBottom 1s ease forwards;
    animation-delay: .7s;
}

.home-content h1 {
    font-size: 5.6rem;
    font-weight: 700;
    margin: -3px 0;
    font-family: 'Syncopate', sans-serif;
    letter-spacing: -2px;
    color: transparent;
    -webkit-text-stroke: 1px var(--text-color);
    position: relative;
    opacity: 0;
    animation: slideRight 1s ease forwards;
    animation-delay: 1s;
}

/* Glitch Effect */
.home-content h1::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    color: var(--main-color);
    -webkit-text-stroke: 0px transparent;
    border-right: 2px solid var(--main-color);
    overflow: hidden;
    animation: type 4s steps(10) infinite alternate;
}

.home-content p {
    font-size: 1.6rem;
    margin: 2rem 0 4rem;
    opacity: 0;
    animation: slideLeft 1s ease forwards;
    animation-delay: 1s;
}

.animated-roles {
    margin: 10px 0;
    height: 4rem;
    overflow: hidden;
}

.animated-roles .role {
    display: block;
    font-size: 3rem;
    color: var(--main-color);
    font-weight: 700;
    animation: scrollText 6s infinite;
}

@keyframes scrollText {

    0%,
    20% {
        transform: translateY(0);
    }

    25%,
    45% {
        transform: translateY(-4rem);
    }

    50%,
    70% {
        transform: translateY(-8rem);
    }

    75%,
    100% {
        transform: translateY(0);
    }

    /* Loop back */
}

.btn-box {
    display: flex;
    gap: 1.5rem;
}

.btn {
    display: inline-block;
    padding: 1rem 2.8rem;
    background: var(--main-color);
    border-radius: 4rem;
    box-shadow: 0 0 1rem var(--main-color);
    font-size: 1.6rem;
    color: var(--bg-color);
    letter-spacing: .1rem;
    font-weight: 600;
    transition: .5s ease;
    opacity: 0;
    animation: slideTop 1s ease forwards;
    animation-delay: 2s;
}

.btn:hover {
    box-shadow: none;
    background: transparent;
    color: var(--main-color);
    border: 2px solid var(--main-color);
}

.btn.secondary {
    background: transparent;
    color: var(--main-color);
    border: 2px solid var(--main-color);
    box-shadow: none;
}

.btn.secondary:hover {
    background: var(--main-color);
    color: var(--bg-color);
    box-shadow: 0 0 1rem var(--main-color);
}

.home-img {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    opacity: 0;
    animation: zoomIn 1s ease forwards;
    animation-delay: 2s;
}

.img-box {
    position: relative;
    width: 32vw;
    height: 32vw;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.img-box img {
    width: 90%;
    height: 90%;
    border-radius: 50%;
    border: .2rem solid var(--main-color);
    object-fit: cover;
}

.circle-spin {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(0);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border-top: .2rem solid var(--second-bg-color);
    border-bottom: .2rem solid var(--second-bg-color);
    border-left: .2rem solid var(--main-color);
    border-right: .2rem solid var(--main-color);
    animation: aboutSpinner 8s linear infinite;
}

.scroll-down {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    align-items: center;
}

.scroll-down i {
    font-size: 2rem;
    color: var(--main-color);
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

/* About Section */
.about {
    background: var(--second-bg-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

.heading {
    text-align: center;
    font-size: 4.5rem;
    font-family: var(--font-heading);
}

.heading span {
    color: var(--main-color);
}

.about-content {
    display: flex;
    align-items: center;
    gap: 4rem;
    width: 100%;
}

.about-img {
    flex: 1;
    position: relative;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-img .sml-circle,
.about-img .big-circle {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--main-color), transparent);
    opacity: 0.2;
    animation: float 6s ease-in-out infinite;
}

.sml-circle {
    width: 150px;
    height: 150px;
    top: 10%;
    left: 20%;
}

.big-circle {
    width: 300px;
    height: 300px;
    bottom: 10%;
    right: 10%;
    animation-delay: 2s;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

.glass-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    top: 20%;
    left: 10%;
    z-index: 10;
    animation: float 4s ease-in-out infinite;
}

.glass-card i {
    font-size: 3rem;
    color: var(--main-color);
}

.glass-card h4 {
    font-size: 1.5rem;
}

.glass-card.right {
    top: 60%;
    left: 60%;
    animation-delay: 1s;
}


.about-text {
    flex: 1;
}

.about-text h3 {
    font-size: 2.6rem;
}

.about-text p {
    font-size: 1.6rem;
    margin: 2rem 0 3rem;
}

.personal-info {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: 1rem;
    border: var(--border);
}

.info-item .icon i {
    font-size: 2.5rem;
    color: var(--main-color);
}

.info-item h4 {
    font-size: 1.2rem;
    color: #aaa;
}

.info-item p {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
}

/* Services */
.services-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 4rem;
}

.service-box {
    flex: 1 1 30rem;
    background: var(--second-bg-color);
    padding: 3rem 2rem 4rem;
    border-radius: 2rem;
    text-align: center;
    border: .2rem solid var(--bg-color);
    transition: .5s ease;
    cursor: pointer;
}

.service-box:hover {
    border-color: var(--main-color);
    transform: scale(1.02);
    box-shadow: 0 0 1.5rem rgba(0, 238, 255, 0.2);
}

.service-box i {
    font-size: 7rem;
    color: var(--main-color);
}

.service-box h3 {
    font-size: 2.6rem;
    margin: 1rem 0;
}

.service-box p {
    font-size: 1.6rem;
    margin: 1rem 0 3rem;
}

.btn-sm {
    padding: 1rem 2rem;
    background: var(--main-color);
    color: var(--bg-color);
    border-radius: 2rem;
    font-weight: 600;
    transition: .3s;
}

.btn-sm:hover {
    box-shadow: 0 0 1rem var(--main-color);
}

/* Portfolio */
.portfolio {
    background: var(--second-bg-color);
}

.portfolio-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: center;
    gap: 2.5rem;
    margin-top: 4rem;
}

.portfolio-box {
    position: relative;
    border-radius: 2rem;
    box-shadow: 0 0 1rem var(--bg-color);
    overflow: hidden;
    display: flex;
    height: 300px;
}

.portfolio-box img {
    width: 100%;
    height: 100%;
    object-fit: cover !important;
    /* Ensure it fills the box */
    object-position: center;
    transition: .5s ease;
    display: block;
    /* Remove inline-block spacing */
}

.portfolio-box:hover img {
    transform: scale(1.1);
}

.portfolio-layer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, .1), var(--main-color));
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    padding: 0 4rem;
    transform: translateY(100%);
    transition: .5s ease;
}

.portfolio-box:hover .portfolio-layer {
    transform: translateY(0);
}

.portfolio-layer h4 {
    font-size: 3rem;
    color: var(--bg-color);
    font-family: var(--font-heading);
}

.portfolio-layer p {
    font-size: 1.6rem;
    margin: .3rem 0 1rem;
    color: var(--bg-color);
}

.portfolio-layer a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 5rem;
    height: 5rem;
    background: var(--text-color);
    border-radius: 50%;
}

.portfolio-layer a i {
    font-size: 2rem;
    color: var(--second-bg-color);
}

/* Contact */
.contact-form {
    max-width: 70rem;
    margin: 1rem auto;
    text-align: center;
    margin-bottom: 3rem;
}

.contact-form .input-box {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.contact-form .input-box input,
.contact-form textarea {
    width: 100%;
    padding: 1.5rem;
    font-size: 1.6rem;
    color: var(--text-color);
    background: var(--second-bg-color);
    border-radius: .8rem;
    margin: .7rem 0;
}

.contact-form .input-box input {
    width: 49%;
}

.contact-form textarea {
    resize: none;
}

.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 2rem 9%;
    background: var(--second-bg-color);
}

.footer-text p {
    font-size: 1.6rem;
}

.footer-iconTop a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: .8rem;
    background: var(--main-color);
    border-radius: .8rem;
    transition: .5s ease;
}

.footer-iconTop a:hover {
    box-shadow: 0 0 1rem var(--main-color);
}

.footer-iconTop a i {
    font-size: 2.4rem;
    color: var(--second-bg-color);
}


/* Animations */
@keyframes aboutSpinner {
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes slideRight {
    0% {
        transform: translateX(-100px);
        opacity: 0;
    }

    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideLeft {
    0% {
        transform: translateX(100px);
        opacity: 0;
    }

    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideTop {
    0% {
        transform: translateY(100px);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideBottom {
    0% {
        transform: translateY(-100px);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes zoomIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes type {

    0%,
    10%,
    100% {
        width: 0;
    }

    50%,
    70% {
        width: 100%;
    }
}

/* Tablet / Mobile Queries */
@media (max-width: 1200px) {
    html {
        font-size: 55%;
    }
}

@media (max-width: 991px) {
    .header {
        padding: 2rem 3%;
    }

    section {
        padding: 10rem 3% 2rem;
    }

    .services {
        padding-bottom: 7rem;
    }

    .portfolio {
        padding-bottom: 7rem;
    }

    .contact {
        min-height: auto;
    }

    .footer {
        padding: 2rem 3%;
    }
}

@media (max-width: 768px) {
    .menu-btn {
        display: block;
    }

    .navbar {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        padding: 1rem 3%;
        background: var(--bg-color);
        border-top: .1rem solid rgba(0, 0, 0, .2);
        box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .2);
        display: none;
    }

    .navbar.active {
        display: block;
    }

    .navbar a {
        display: block;
        font-size: 2rem;
        margin: 3rem 0;
    }

    .home {
        flex-direction: column;
    }

    .home-content h3 {
        font-size: 2.6rem;
    }

    .home-content h1 {
        font-size: 5rem;
    }

    .home-img {
        width: 70vw;
        margin-top: 4rem;
    }

    .about {
        flex-direction: column-reverse;
    }

    .about img {
        width: 70vw;
        margin-top: 4rem;
    }

    .services h2 {
        margin-bottom: 3rem;
    }

    .portfolio h2 {
        margin-bottom: 3rem;
    }

    .portfolio-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 617px) {
    .portfolio-container {
        grid-template-columns: 1fr;
    }

    .img-box {
        width: 50vw;
        height: 50vw;
    }
}

@media (max-width: 450px) {
    html {
        font-size: 50%;
    }

    .contact-form .input-box input {
        width: 100%;
    }
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.loader-text {
    font-family: 'Syncopate', sans-serif;
    font-size: 4rem;
    font-weight: 700;
    color: var(--main-color);
    letter-spacing: 5px;
    animation: blink 1s infinite alternate;
}

@keyframes blink {
    0% {
        opacity: 0.3;
    }

    100% {
        opacity: 1;
        text-shadow: 0 0 20px var(--main-color);
    }
}

body.loaded #preloader {
    opacity: 0;
    visibility: hidden;
}

/* --- Next Level Scroll Animations --- */
/* Target specific sections below the fold for scroll reveals */
.about-content,
.about-img,
.contact-form,
.service-box,
.portfolio-box {
    opacity: 0;
    transform: translateY(50px) scale(0.95);
    filter: blur(4px);
    transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
    will-change: transform, opacity, filter;
}

/* The active class added by JS */
.show-animate {
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
    filter: blur(0) !important;
}

/* Hover effects for premium feel */
.service-box:hover,
.portfolio-box:hover {
    transform: translateY(-10px) scale(1.02) !important;
    box-shadow: 0 10px 30px rgba(0, 238, 255, 0.2);
    border-color: var(--main-color);
}

/* Staggered Delays for Grid Items */
.service-box:nth-child(2),
.portfolio-box:nth-child(2) {
    transition-delay: 0.1s;
}

.service-box:nth-child(3),
.portfolio-box:nth-child(3) {
    transition-delay: 0.2s;
}

/* Section Headings Animation */
.heading {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
    filter: blur(2px);
    transition: 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    /* Bouncy effect */
}

.heading.show-animate {
    opacity: 1 !important;
    transform: scale(1) translateY(0) !important;
    filter: blur(0) !important;
}