:root {
    --bg-color: #050510;
    --card-bg: #0f0f1f;
    --primary-color: #00d4ff;
    /* Cyan Neon */
    --accent-color: #7000ff;
    /* Purple Neon */
    --text-color: #e0e0e0;
    --text-muted: #a0a0b0;
    --white: #ffffff;
    --transition: all 0.3s ease;
    --font-head: 'Orbitron', 'Space Grotesk', sans-serif;
    --font-body: 'Outfit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography & Utils */
h1,
h2,
h3,
h4 {
    font-family: var(--font-head);
    color: var(--white);
    font-weight: 700;
}

.text-center {
    text-align: center;
}

.section {
    padding: 100px 0;
    position: relative;
}

.section-badge {
    color: var(--primary-color);
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 600;
    display: block;
    margin-bottom: 10px;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.section-desc {
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 50px;
}

.text-gradient {
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    border: 2px solid transparent;
}

.btn-primary {
    background: linear-gradient(90deg, var(--accent-color), var(--primary-color));
    color: var(--white);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.4);
}

.btn-primary:hover {
    box-shadow: 0 0 25px rgba(0, 212, 255, 0.6);
    transform: translateY(-2px);
}

.btn-outline {
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: inset 0 0 0 0 var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--bg-color);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.4);
}

.btn-block {
    display: block;
    width: 100%;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    background: rgba(5, 5, 16, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.header.scrolled {
    padding: 15px 0;
    background: rgba(5, 5, 16, 0.95);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-head);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--white);
}

.logo .dot {
    color: var(--primary-color);
}

.nav-list {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-link {
    font-size: 1rem;
    font-weight: 500;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link.btn-cta {
    padding: 8px 20px;
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    color: var(--primary-color);
}

.nav-link.btn-cta:hover {
    background: var(--primary-color);
    color: var(--bg-color);
}

.hamburger {
    display: none;
    cursor: pointer;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: #02020a;
    /* Fallback */
    margin-top: -80px;
    overflow: hidden;
}

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, rgba(5, 5, 16, 1) 90%);
    z-index: 1;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero-title {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 20px;
    position: relative;
}

.glitch {
    position: relative;
    color: var(--white);
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    left: 2px;
    text-shadow: -1px 0 #ff00c1;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -1px 0 #00fff9;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 2 -5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% {
        clip: rect(3px, 9999px, 83px, 0);
        transform: skew(0.75deg);
    }

    5% {
        clip: rect(65px, 9999px, 86px, 0);
        transform: skew(0.55deg);
    }

    10% {
        clip: rect(81px, 9999px, 17px, 0);
        transform: skew(0.7deg);
    }

    15% {
        clip: rect(93px, 9999px, 16px, 0);
        transform: skew(0.1deg);
    }

    20% {
        clip: rect(6px, 9999px, 85px, 0);
        transform: skew(0.57deg);
    }

    25% {
        clip: rect(74px, 9999px, 45px, 0);
        transform: skew(0.74deg);
    }

    30% {
        clip: rect(47px, 9999px, 63px, 0);
        transform: skew(0.06deg);
    }

    35% {
        clip: rect(25px, 9999px, 91px, 0);
        transform: skew(0.25deg);
    }

    40% {
        clip: rect(62px, 9999px, 75px, 0);
        transform: skew(0.19deg);
    }

    45% {
        clip: rect(80px, 9999px, 90px, 0);
        transform: skew(0.13deg);
    }

    50% {
        clip: rect(10px, 9999px, 89px, 0);
        transform: skew(0.51deg);
    }

    55% {
        clip: rect(27px, 9999px, 4px, 0);
        transform: skew(0.56deg);
    }

    60% {
        clip: rect(33px, 9999px, 63px, 0);
        transform: skew(0.48deg);
    }

    65% {
        clip: rect(8px, 9999px, 77px, 0);
        transform: skew(0.06deg);
    }

    70% {
        clip: rect(22px, 9999px, 54px, 0);
        transform: skew(0.66deg);
    }

    75% {
        clip: rect(14px, 9999px, 69px, 0);
        transform: skew(0.44deg);
    }

    80% {
        clip: rect(71px, 9999px, 70px, 0);
        transform: skew(0.76deg);
    }

    85% {
        clip: rect(65px, 9999px, 45px, 0);
        transform: skew(0.22deg);
    }

    90% {
        clip: rect(90px, 9999px, 20px, 0);
        transform: skew(0.98deg);
    }

    95% {
        clip: rect(54px, 9999px, 16px, 0);
        transform: skew(0.11deg);
    }

    100% {
        clip: rect(50px, 9999px, 46px, 0);
        transform: skew(0.79deg);
    }
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: 40px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.mouse {
    width: 30px;
    height: 50px;
    border: 2px solid var(--text-muted);
    border-radius: 15px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 2px;
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 1.5s infinite;
}

@keyframes scroll {
    0% {
        top: 10px;
        opacity: 1;
    }

    100% {
        top: 30px;
        opacity: 0;
    }
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    perspective: 1000px;
}

.service-card {
    background: rgba(15, 15, 31, 0.6);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.1s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform-style: preserve-3d;
}

.service-card.show {
    opacity: 1;
    transform: translateY(0);
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.service-card h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Projects */
.projects {
    background: linear-gradient(180deg, var(--bg-color) 0%, #08081a 100%);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-image {
    height: 250px;
    overflow: hidden;
    position: relative;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: var(--transition);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.btn-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
}

.project-info {
    padding: 25px;
}

.project-info h3 {
    margin-bottom: 10px;
}

.project-info p {
    color: var(--text-muted);
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.tags span {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--primary-color);
    margin-right: 5px;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-list {
    margin: 30px 0;
}

.about-list li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.05rem;
}

.about-list i {
    color: var(--accent-color);
}

.stats {
    display: flex;
    gap: 40px;
}

.stat-item .stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: var(--font-head);
}

.stat-item p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.code-block {
    background: #1e1e2e;
    padding: 25px;
    border-radius: 10px;
    border: 1px solid #33334d;
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.keyword {
    color: #ff79c6;
}

.class-name {
    color: #8be9fd;
}

.string {
    color: #f1fa8c;
}

.function {
    color: #50fa7b;
}

.boolean {
    color: #bd93f9;
}

.this {
    color: #ffb86c;
}

/* Clients CTA */
.clients-cta {
    padding: 50px 0;
    background-color: rgba(255, 255, 255, 0.02);
}

.logos-slider {
    display: flex;
    justify-content: center;
    gap: 50px;
    flex-wrap: wrap;
    margin-top: 30px;
    opacity: 0.5;
}

.logo-item {
    font-size: 2.5rem;
    color: var(--white);
    transition: var(--transition);
}

.logo-item:hover {
    color: var(--primary-color);
    opacity: 1;
}

/* Contact */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
}

.contact-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.contact-item i {
    width: 40px;
    height: 40px;
    background: rgba(112, 0, 255, 0.1);
    color: var(--accent-color);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    font-size: 1.2rem;
}

.contact-form {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    color: var(--white);
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.05);
}

/* Footer */
.footer {
    background: #02020a;
    padding: 80px 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 30px;
    margin-bottom: 50px;
}

.footer-col h4 {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: var(--text-muted);
}

.footer-col ul li a:hover {
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    color: var(--white);
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    background: #000;
    padding: 20px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 991px) {
    .hero-title {
        font-size: 3rem;
    }

    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: var(--card-bg);
        flex-direction: column;
        justify-content: center;
        transition: 0.4s ease;
        padding: 50px;
    }

    .nav.active {
        right: 0;
    }

    .nav-list {
        flex-direction: column;
    }

    .hamburger {
        display: block;
        z-index: 1001;
    }

    .hamburger .bar {
        display: block;
        width: 25px;
        height: 3px;
        margin: 5px auto;
        background-color: var(--white);
        transition: 0.3s;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}/* Scroll Animation Classes */
.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    will-change: opacity, transform;
}

.animate-on-scroll.show {
    opacity: 1;
    transform: translate(0, 0) scale(1);
}

/* Animation Variants */
.fade-in {
    /* Base fade is handled by opacity 0 -> 1 */
}

.slide-up {
    transform: translateY(30px);
}

.slide-left {
    transform: translateX(-30px);
}

.slide-right {
    transform: translateX(30px);
}

.zoom-in {
    transform: scale(0.95);
}

/* Staggered delays for child elements (optional utility) */
.delay-100 {
    transition-delay: 100ms;
}

.delay-200 {
    transition-delay: 200ms;
}

.delay-300 {
    transition-delay: 300ms;
}

.delay-400 {
    transition-delay: 400ms;
}

.delay-500 {
    transition-delay: 500ms;
}