/* =========================================================
   KARAN BHATIA — PORTFOLIO
   Modern Electric Cyan + Tech Blue Theme
   ========================================================= */

/* =========================
   ROOT / VARIABLES
   ========================= */

:root {
    --bg: #05070d;
    --bg-soft: #080b13;
    --card: rgba(255, 255, 255, 0.045);

    --primary: #00e5ff;
    --primary-dark: #00a8c7;
    --secondary: #0066ff;

    --primary-glow: rgba(0, 229, 255, 0.25);
    --secondary-glow: rgba(0, 102, 255, 0.20);

    --text: #ffffff;
    --text-soft: #b8c1cc;
    --text-muted: #7f8996;

    --border: rgba(255, 255, 255, 0.09);

    --radius: 18px;

    --transition: 0.35s ease;
}


/* =========================
   RESET
   ========================= */

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

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(
            circle at 15% 20%,
            rgba(0, 229, 255, 0.10),
            transparent 28%
        ),
        radial-gradient(
            circle at 85% 30%,
            rgba(0, 102, 255, 0.10),
            transparent 30%
        ),
        radial-gradient(
            circle at 50% 90%,
            rgba(0, 229, 255, 0.07),
            transparent 30%
        ),
        var(--bg);

    color: var(--text);
    overflow-x: hidden;

    animation: backgroundMove 18s ease-in-out infinite;
}

a {
    color: inherit;
}

button,
input,
textarea {
    font-family: inherit;
}


/* =========================
   BACKGROUND ANIMATION
   ========================= */

.bg-animation {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -2;
    pointer-events: none;
}

.bg-animation span {
    position: absolute;
    display: block;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.16;
}

.bg-animation span:nth-child(1) {
    width: 350px;
    height: 350px;
    top: 5%;
    left: 5%;
    background: var(--primary);
    animation: floatOne 12s ease-in-out infinite;
}

.bg-animation span:nth-child(2) {
    width: 450px;
    height: 450px;
    top: 45%;
    right: 5%;
    background: var(--secondary);
    animation: floatTwo 15s ease-in-out infinite;
}

.bg-animation span:nth-child(3) {
    width: 300px;
    height: 300px;
    bottom: 5%;
    left: 40%;
    background: var(--primary);
    animation: floatThree 10s ease-in-out infinite;
}

.bg-animation span:nth-child(4) {
    width: 180px;
    height: 180px;
    top: 30%;
    left: 45%;
    background: var(--secondary);
    opacity: 0.10;
    animation: floatFour 14s ease-in-out infinite;
}

.bg-animation span:nth-child(5) {
    width: 220px;
    height: 220px;
    bottom: 20%;
    right: 25%;
    background: var(--primary);
    opacity: 0.08;
    animation: floatFive 16s ease-in-out infinite;
}


/* =========================
   PARTICLES
   ========================= */

body::before {
    content: "";
    position: fixed;
    inset: 0;

    background: url("particles.png");

    opacity: 0.08;

    animation: moveParticles 40s linear infinite;

    pointer-events: none;
    z-index: -1;
}


/* =========================
   MOUSE GLOW
   ========================= */

.cursor-glow {
    position: fixed;

    width: 300px;
    height: 300px;

    background: radial-gradient(
        circle,
        rgba(0, 229, 255, 0.13),
        transparent 70%
    );

    pointer-events: none;

    transform: translate(-50%, -50%);

    z-index: -1;
}


/* =========================
   NAVBAR
   ========================= */

nav {
    position: sticky;
    top: 0;

    z-index: 1000;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 22px 8%;

    background: rgba(5, 7, 13, 0.72);

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}


/* LOGO */

.logo {
    font-size: 24px;
    font-weight: 700;

    color: var(--primary);

    text-shadow:
        0 0 10px rgba(0, 229, 255, 0.35);

    transition: var(--transition);
}

.logo:hover {
    text-shadow:
        0 0 10px rgba(0, 229, 255, 0.5),
        0 0 25px rgba(0, 229, 255, 0.25);
}


/* NAV LINKS */

nav ul {
    display: flex;

    gap: 28px;

    list-style: none;
}

nav a {
    position: relative;

    text-decoration: none;

    color: #ffffff;

    transition: var(--transition);
}

nav a::after {
    content: "";

    position: absolute;

    left: 0;
    bottom: -7px;

    width: 0;
    height: 2px;

    background: linear-gradient(
        90deg,
        var(--primary),
        var(--secondary)
    );

    transition: var(--transition);
}

nav a:hover {
    color: var(--primary);
}

nav a:hover::after {
    width: 100%;
}


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

.hero {
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: space-around;

    gap: 60px;

    padding: 60px 8%;
}

.hero-content {
    max-width: 650px;
}


/* HERO TITLE */

.hero h1 {
    font-size: clamp(45px, 7vw, 78px);

    line-height: 1.05;

    color: var(--primary);

    text-shadow:
        0 0 10px rgba(0, 229, 255, 0.35),
        0 0 30px rgba(0, 229, 255, 0.18);

    letter-spacing: -2px;
}


/* HERO SUBTITLE */

.hero h2 {
    font-size: clamp(25px, 3vw, 36px);

    margin: 20px 0;

    min-height: 80px;

    line-height: 1.3;
}

#typing {
    color: #ffffff;

    font-weight: 600;

    text-shadow:
        0 0 15px rgba(255, 255, 255, 0.08);
}


/* HERO DESCRIPTION */

.hero p {
    color: var(--text-soft);

    opacity: 0.9;

    line-height: 1.8;

    max-width: 600px;
}


/* =========================
   PROFILE IMAGE
   ========================= */

.hero-image {
    position: relative;
}

.hero-image::before {
    content: "";

    position: absolute;

    inset: -30px;

    border-radius: 50%;

    background: radial-gradient(
        circle,
        rgba(0, 229, 255, 0.18),
        transparent 65%
    );

    filter: blur(15px);

    z-index: -1;
}

.hero-image img {
    width: 350px;
    height: 350px;

    object-fit: cover;

    border-radius: 50%;

    border: 4px solid var(--primary);

    animation: floatingImage 4s ease-in-out infinite;

    box-shadow:
        0 0 20px rgba(0, 229, 255, 0.35),
        0 0 50px rgba(0, 229, 255, 0.18);

    transition: var(--transition);
}

.hero-image img:hover {
    transform: scale(1.03);

    box-shadow:
        0 0 25px rgba(0, 229, 255, 0.5),
        0 0 70px rgba(0, 229, 255, 0.25);
}


/* =========================
   BUTTONS
   ========================= */

.buttons {
    display: flex;

    flex-wrap: wrap;

    gap: 15px;

    margin-top: 30px;
}

.btn,
.btn2 {
    display: inline-block;

    padding: 13px 26px;

    border-radius: 10px;

    text-decoration: none;

    transition: var(--transition);

    cursor: pointer;
}


/* PRIMARY BUTTON */

.btn {
    background: linear-gradient(
        135deg,
        var(--primary),
        var(--secondary)
    );

    color: #001018;

    font-weight: 700;

    border: none;

    box-shadow:
        0 0 20px rgba(0, 229, 255, 0.15);
}

.btn:hover {
    transform: translateY(-5px);

    box-shadow:
        0 0 25px rgba(0, 229, 255, 0.4),
        0 0 50px rgba(0, 102, 255, 0.2);
}


/* SECONDARY BUTTON */

.btn2 {
    border: 1px solid var(--primary);

    color: var(--primary);

    background: rgba(0, 229, 255, 0.03);
}

.btn2:hover {
    background: var(--primary);

    color: #001018;

    transform: translateY(-5px);

    box-shadow:
        0 0 25px rgba(0, 229, 255, 0.3);
}


/* =========================
   STATS
   ========================= */

.stats {
    display: flex;

    gap: 45px;

    margin-top: 45px;

    flex-wrap: wrap;
}

.stats h3 {
    font-size: 30px;

    color: var(--primary);

    text-shadow:
        0 0 12px rgba(0, 229, 255, 0.25);
}

.stats p {
    font-size: 14px;

    color: var(--text-muted);
}


/* =========================
   SECTIONS
   ========================= */

section {
    padding: 100px 10%;
}

.section-title {
    text-align: center;

    font-size: clamp(32px, 4vw, 44px);

    margin-bottom: 55px;

    color: var(--primary);

    text-shadow:
        0 0 15px rgba(0, 229, 255, 0.18);
}


/* =========================
   GLASS CARDS
   ========================= */

.card {
    background: var(--card);

    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);

    padding: 30px;

    border-radius: var(--radius);

    line-height: 1.8;

    border: 1px solid var(--border);

    transition: var(--transition);
}

.card:hover {
    transform: translateY(-7px);

    border-color: rgba(0, 229, 255, 0.3);

    box-shadow:
        0 15px 40px rgba(0, 0, 0, 0.35),
        0 0 25px rgba(0, 229, 255, 0.08);
}


/* =========================
   SKILLS
   ========================= */

.skills-grid {
    display: grid;

    grid-template-columns:
        repeat(auto-fit, minmax(200px, 1fr));

    gap: 20px;
}

.skill-card {
    background: var(--card);

    backdrop-filter: blur(12px);

    padding: 30px;

    border-radius: var(--radius);

    text-align: center;

    border: 1px solid var(--border);

    transition: var(--transition);
}

.skill-card:hover {
    transform: translateY(-10px) scale(1.03);

    border-color: var(--primary);

    box-shadow:
        0 0 25px rgba(0, 229, 255, 0.15);
}

.skill-card i,
.skill-card svg {
    color: var(--primary);
}


/* =========================
   PROJECTS
   ========================= */

.project {
    display: flex;

    align-items: center;

    gap: 30px;

    padding: 25px;

    margin-bottom: 30px;

    background: var(--card);

    backdrop-filter: blur(12px);

    border-radius: var(--radius);

    border: 1px solid var(--border);

    transition: var(--transition);

    cursor: pointer;
}

.project:hover {
    transform: translateY(-10px);

    border-color: rgba(0, 229, 255, 0.3);

    box-shadow:
        0 0 30px rgba(0, 229, 255, 0.12);
}


/* PROJECT IMAGE */

.project a {
    display: block;

    width: 450px;
    height: 300px;

    flex-shrink: 0;

    border-radius: 15px;

    overflow: hidden;
}


.project img {
    width: 450px;
    height: 300px;

    object-fit: contain;

    display: block;

    background: #080d18;

    padding: 0;

    border-radius: 15px;

    transition: 0.4s ease;
}


.project img:hover {
    transform: scale(1.04);
}


.project h3 {
    margin-bottom: 10px;

    color: var(--primary);

    text-shadow:
        0 0 10px rgba(0, 229, 255, 0.15);
}


/* =========================
   WORK SECTION
   ========================= */

.work-grid {
    display: grid;

    grid-template-columns:
        repeat(auto-fit, minmax(250px, 1fr));

    gap: 20px;

    margin-top: 40px;
}

.work-card {
    position: relative;

    overflow: hidden;

    border-radius: 15px;

    cursor: pointer;

    border: 1px solid rgba(255, 255, 255, 0.08);

    transition: 0.4s ease;

    background: transparent;
}

.work-card img {
    width: 100%;

    height: auto;

    display: block;

    object-fit: contain;

    border-radius: 15px;

    transition: 0.5s ease;
}


/* IMAGE ZOOM */

.work-card:hover img {
    transform: scale(1.08);
}


/* WORK CARD HOVER */

.work-card:hover {
    transform: translateY(-8px);

    border-color: var(--primary);

    box-shadow:
        0 0 25px rgba(0, 229, 255, 0.18);
}


/* DARK OVERLAY */

.work-card::after {
    content: "";

    position: absolute;

    inset: 0;

    background: rgba(0, 0, 0, 0.18);

    opacity: 0;

    transition: 0.3s;

    pointer-events: none;
}

.work-card:hover::after {
    opacity: 1;
}


/* =========================
   SINGLE WORK
   ========================= */

.work-single {
    max-width: 800px;

    margin: auto;

    text-align: center;

    background: var(--card);

    padding: 25px;

    border-radius: 15px;

    border: 1px solid var(--border);

    transition: var(--transition);
}

.work-single img {
    width: 100%;

    border-radius: 12px;

    margin-bottom: 15px;
}

.work-single:hover {
    transform: translateY(-8px);

    border-color: rgba(0, 229, 255, 0.3);

    box-shadow:
        0 0 25px rgba(0, 229, 255, 0.12);
}


/* =========================
   CONTACT GRID
   ========================= */

.contact-grid {
    display: grid;

    grid-template-columns:
        repeat(auto-fit, minmax(250px, 1fr));

    gap: 25px;

    margin-top: 40px;
}

.contact-card {
    position: relative;

    overflow: hidden;

    text-decoration: none;

    color: white;

    background: rgba(255, 255, 255, 0.045);

    backdrop-filter: blur(15px);

    border: 1px solid rgba(255, 255, 255, 0.1);

    padding: 35px 25px;

    border-radius: 20px;

    text-align: center;

    cursor: pointer;

    transition: 0.4s ease;
}


/* CONTACT SHINE */

.contact-card::before {
    content: "";

    position: absolute;

    top: 0;
    left: -100%;

    width: 100%;
    height: 100%;

    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 229, 255, 0.08),
        transparent
    );

    transition: 0.7s;
}

.contact-card:hover::before {
    left: 100%;
}


/* CONTACT HOVER */

.contact-card:hover {
    transform: translateY(-12px) scale(1.03);

    border-color: var(--primary);

    box-shadow:
        0 0 20px rgba(0, 229, 255, 0.18),
        0 0 45px rgba(0, 102, 255, 0.08);
}

.contact-card h3 {
    font-size: 24px;

    margin-bottom: 12px;

    color: var(--primary);
}

.contact-card p {
    color: var(--text-muted);

    font-size: 15px;

    line-height: 1.6;
}


/* =========================
   HIRE ME SECTION
   ========================= */

#hire-me {
    padding: 80px 20px;

    text-align: center;

    position: relative;
}

#hire-me h2 {
    font-size: 40px;

    color: var(--primary);

    margin-bottom: 10px;

    letter-spacing: 1px;

    text-shadow:
        0 0 15px rgba(0, 229, 255, 0.2);
}

#hire-me p {
    color: var(--text-muted);

    margin-bottom: 30px;
}


/* =========================
   CONTACT FORM
   ========================= */

.contact-form {
    width: 100%;

    max-width: 520px;

    margin: auto;

    padding: 30px;

    background: rgba(255, 255, 255, 0.045);

    backdrop-filter: blur(15px);

    border: 1px solid rgba(255, 255, 255, 0.1);

    border-radius: 18px;

    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.45);

    display: flex;

    flex-direction: column;

    gap: 15px;

    transition: 0.3s ease;
}

.contact-form:hover {
    transform: translateY(-5px);

    border-color: rgba(0, 229, 255, 0.18);

    box-shadow:
        0 15px 50px rgba(0, 0, 0, 0.55);
}


/* FORM INPUTS */

.contact-form input,
.contact-form textarea {
    width: 100%;

    padding: 14px;

    border: 1px solid rgba(255, 255, 255, 0.08);

    border-radius: 10px;

    outline: none;

    background: rgba(255, 255, 255, 0.07);

    color: white;

    font-size: 15px;

    transition: 0.3s ease;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: #7f8996;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--primary);

    transform: scale(1.01);

    box-shadow:
        0 0 15px rgba(0, 229, 255, 0.15);
}


/* FORM BUTTON */

.contact-form button {
    padding: 14px;

    border: none;

    border-radius: 10px;

    background: linear-gradient(
        135deg,
        var(--primary),
        var(--secondary)
    );

    color: #001018;

    font-weight: 700;

    cursor: pointer;

    transition: 0.3s ease;
}

.contact-form button:hover {
    transform: scale(1.03);

    box-shadow:
        0 0 25px rgba(0, 229, 255, 0.35);
}


/* =========================
   FLOATING HIRE BUTTON
   ========================= */

.hire-btn {
    position: fixed;

    right: 20px;

    top: 50%;

    transform: translateY(-50%);

    background: linear-gradient(
        135deg,
        var(--primary),
        var(--secondary)
    );

    color: #001018;

    padding: 12px 18px;

    border: none;

    border-radius: 30px;

    cursor: pointer;

    font-weight: bold;

    box-shadow:
        0 0 20px rgba(0, 229, 255, 0.25);

    z-index: 900;

    transition: 0.3s ease;
}

.hire-btn:hover {
    transform: translateY(-50%) scale(1.06);

    box-shadow:
        0 0 30px rgba(0, 229, 255, 0.4);
}


/* =========================
   OVERLAY
   ========================= */

.overlay {
    display: none;

    position: fixed;

    inset: 0;

    width: 100%;
    height: 100%;

    background: rgba(0, 0, 0, 0.82);

    justify-content: center;

    align-items: center;

    z-index: 2000;

    backdrop-filter: blur(5px);
}


/* =========================
   FORM BOX / MODAL
   ========================= */

.form-box {
    background: #080b13;

    padding: 30px;

    border-radius: 15px;

    width: 350px;

    max-width: 90%;

    border: 1px solid rgba(0, 229, 255, 0.4);

    position: relative;

    box-shadow:
        0 0 40px rgba(0, 229, 255, 0.12);
}

.form-box h2 {
    color: var(--primary);

    text-align: center;

    margin-bottom: 20px;
}

.form-box input,
.form-box textarea {
    width: 100%;

    margin: 10px 0;

    padding: 10px;

    background: #111722;

    border: 1px solid #293241;

    color: white;

    border-radius: 8px;

    outline: none;
}

.form-box input:focus,
.form-box textarea:focus {
    border-color: var(--primary);

    box-shadow:
        0 0 12px rgba(0, 229, 255, 0.12);
}


/* SEND BUTTON */

.send-btn {
    width: 100%;

    padding: 11px;

    background: linear-gradient(
        135deg,
        var(--primary),
        var(--secondary)
    );

    border: none;

    font-weight: bold;

    color: #001018;

    cursor: pointer;

    border-radius: 8px;

    transition: 0.3s ease;
}

.send-btn:hover {
    transform: scale(1.03);

    box-shadow:
        0 0 20px rgba(0, 229, 255, 0.3);
}


/* CLOSE BUTTON */

.close {
    position: absolute;

    top: 10px;

    right: 15px;

    cursor: pointer;

    color: white;

    font-size: 22px;

    transition: 0.3s ease;
}

.close:hover {
    color: var(--primary);
}


/* =========================
   FOOTER
   ========================= */

footer {
    margin-top: 100px;

    padding: 50px 10%;

    text-align: center;

    background: rgba(255, 255, 255, 0.025);

    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

footer h3 {
    color: var(--primary);

    font-size: 28px;

    margin-bottom: 10px;

    text-shadow:
        0 0 12px rgba(0, 229, 255, 0.15);
}

.footer-links {
    margin: 20px 0;

    display: flex;

    justify-content: center;

    gap: 25px;

    flex-wrap: wrap;
}

.footer-links a {
    color: white;

    text-decoration: none;

    transition: 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary);

    text-shadow:
        0 0 10px rgba(0, 229, 255, 0.25);
}

.copyright {
    color: #6f7885;

    font-size: 14px;

    margin-top: 20px;
}


/* =========================
   CONTACT SCROLL
   ========================= */

#contact {
    scroll-margin-top: 120px;
}


/* =========================
   ANIMATIONS
   ========================= */

@keyframes floatingImage {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-18px);
    }

    100% {
        transform: translateY(0);
    }
}


@keyframes floatOne {
    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(80px, 60px);
    }
}


@keyframes floatTwo {
    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(-100px, -70px);
    }
}


@keyframes floatThree {
    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(60px, -90px);
    }
}


@keyframes floatFour {
    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(-50px, 70px);
    }
}


@keyframes floatFive {
    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(70px, -50px);
    }
}


@keyframes moveParticles {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-500px);
    }
}


@keyframes backgroundMove {
    0% {
        background-position:
            0 0,
            0 0,
            0 0;
    }

    50% {
        background-position:
            100px 50px,
            -80px 100px,
            50px -100px;
    }

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


/* =========================
   MOBILE
   ========================= */

@media (max-width: 768px) {

    nav {
        padding: 20px 6%;
    }

    nav ul {
        display: none;
    }


    .hero {
        flex-direction: column-reverse;

        text-align: center;

        padding: 100px 20px 60px;

        gap: 40px;
    }


    .hero-content {
        max-width: 100%;
    }


    .hero h1 {
        font-size: 45px;

        letter-spacing: -1px;
    }


    .hero h2 {
        font-size: 26px;

        min-height: 60px;
    }


    .hero p {
        font-size: 14px;
    }


    .hero-image img {
        width: 250px;
        height: 250px;
    }


    .buttons {
        justify-content: center;
    }


    .stats {
        justify-content: center;

        gap: 30px;
    }


    section {
        padding: 75px 6%;
    }


    .section-title {
        font-size: 32px;

        margin-bottom: 40px;
    }


    .project {
        flex-direction: column;

        text-align: center;
    }


    /* MOBILE PROJECT IMAGE */

    .project a {
        width: 100%;
        height: auto;

        display: block;
    }


    .project img {
        width: 100%;
        height: auto;

        max-height: none;

        object-fit: contain;

        display: block;

        background: #080d18;

        padding: 0;

        border-radius: 15px;
    }


    .contact-grid {
        grid-template-columns: 1fr;
    }


    .hire-btn {
        right: 12px;

        padding: 10px 14px;

        font-size: 13px;
    }


    .form-box {
        width: 92%;
    }
}


/* =========================
   SMALL MOBILE
   ========================= */

@media (max-width: 480px) {

    .logo {
        font-size: 20px;
    }


    .hero {
        padding-top: 80px;
    }


    .hero h1 {
        font-size: 38px;
    }


    .hero h2 {
        font-size: 22px;
    }


    .hero-image img {
        width: 210px;
        height: 210px;
    }


    .stats {
        gap: 20px;
    }


    .stats h3 {
        font-size: 25px;
    }


    .btn,
    .btn2 {
        padding: 11px 20px;
    }


    .contact-form {
        padding: 20px;
    }
}


/* =========================
   REDUCED MOTION
   ========================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}