:root {
    --bg-dark: #03000a;
    --bg-panel: rgba(255, 255, 255, 0.03);
    --primary: #7b2cbf;
    --secondary: #3a0ca3;
    --accent: #4cc9f0;
    --neon-pink: #f72585;
    --text-main: #ffffff;
    --text-muted: #a2a8d3;
    --glass-border: rgba(255, 255, 255, 0.08);
    --font-head: 'Space Grotesk', sans-serif;
    --font-body: 'Outfit', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    overflow-x: hidden;
    line-height: 1.6;
}

/* --- 3D Background & Overlay --- */
#canvas-container {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100vh;
    z-index: -2;
    background: radial-gradient(circle at center, #10002b 0%, #000000 100%);
}

.overlay-gradient {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100vh;
    z-index: -1;
    background: radial-gradient(circle at 80% 20%, rgba(76, 201, 240, 0.05), transparent 40%),
                radial-gradient(circle at 20% 80%, rgba(247, 37, 133, 0.05), transparent 40%);
    pointer-events: none;
}

/* --- Layout Utilities --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section-padding { padding: 100px 0; }
.text-center { text-align: center; }
.mt-4 { margin-top: 2rem; }

/* --- Typography & Gradients --- */
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; }

.gradient-text {
    background: linear-gradient(90deg, var(--accent), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gradient-text-anim {
    background: linear-gradient(90deg, var(--accent), var(--neon-pink), var(--primary), var(--accent));
    background-size: 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: flowGradient 6s ease infinite;
}

@keyframes flowGradient { 0% { background-position: 0% 50%; } 100% { background-position: 100% 50%; } }

/* --- Glassmorphism --- */
.glass-card {
    background: var(--bg-panel);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

/* --- Buttons --- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    padding: 14px 32px; border-radius: 50px; font-weight: 600; text-decoration: none;
    transition: 0.3s; cursor: pointer; border: none; font-family: var(--font-body);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 4px 15px rgba(123, 44, 191, 0.4);
    position: relative; overflow: hidden;
}

.btn-primary:hover {
    box-shadow: 0 6px 25px rgba(76, 201, 240, 0.5);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent; border: 2px solid rgba(255,255,255,0.2); color: white;
}

.btn-outline:hover {
    border-color: var(--accent); color: var(--accent);
    box-shadow: 0 0 15px rgba(76, 201, 240, 0.3);
}

.btn-sm { padding: 8px 24px; font-size: 0.9rem; }
.btn-block { width: 100%; }

/* --- Navbar --- */
.navbar {
    position: fixed; top: 0; width: 100%; z-index: 100; padding: 20px 0; transition: 0.4s;
}

.navbar.scrolled {
    background: rgba(3, 0, 10, 0.8); backdrop-filter: blur(12px); padding: 15px 0; border-bottom: 1px solid var(--glass-border);
}

.nav-content { display: flex; justify-content: space-between; align-items: center; width: 100%; }

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-icon {
    width: 75px;       /* Bigger size */
    height: 75px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(76,201,240,0.15), transparent);
    box-shadow: 0 0 25px rgba(76, 201, 240, 0.6);
    transition: 0.3s ease;
}

.logo-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 0 40px rgba(76, 201, 240, 0.9);
}

.logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;   /* VERY IMPORTANT for clear logo */
}

.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a:not(.btn) { color: var(--text-muted); text-decoration: none; font-weight: 500; transition: 0.3s; }
.nav-links a:not(.btn):hover { color: white; }

.hamburger { display: none; color: white; font-size: 1.5rem; cursor: pointer; }

/* --- Hero Section --- */
.hero {
    min-height: 100vh; display: flex; align-items: center; padding-top: 80px; position: relative;
}

.hero-content { position: relative; z-index: 2; max-width: 800px; }

.badge-pill {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 16px; border-radius: 30px;
    background: rgba(123, 44, 191, 0.1); border: 1px solid rgba(123, 44, 191, 0.3);
    color: var(--accent); font-size: 0.85rem; font-weight: 600; margin-bottom: 25px;
}

.pulse-dot { width: 8px; height: 8px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 10px var(--accent); animation: pulse 2s infinite; }

@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.5; } 100% { opacity: 1; } }

.hero-title { font-size: clamp(3rem, 5vw, 4.5rem); line-height: 1.1; margin-bottom: 20px; }
.hero-sub { font-size: 1.2rem; color: var(--text-muted); margin-bottom: 40px; max-width: 600px; }

/* Hero Input CTA */
.hero-input-group {
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
    background: rgba(255,255,255,0.05); backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border); padding: 8px; border-radius: 12px;
    width: fit-content; margin-bottom: 40px;
}

.input-label { padding-left: 15px; color: var(--text-muted); white-space: nowrap; }

.input-wrapper input {
    background: transparent; border: none; border-bottom: 1px solid var(--primary);
    color: white; font-family: var(--font-body); font-size: 1rem; padding: 5px 10px; width: 180px; outline: none;
}

.hero-buttons { display: flex; gap: 20px; margin-bottom: 40px; }

.tech-tags { display: flex; flex-wrap: wrap; gap: 15px; }
.tech-tags span {
    padding: 8px 16px; background: rgba(255,255,255,0.03); border: 1px solid var(--glass-border);
    border-radius: 20px; color: var(--text-muted); font-size: 0.9rem; display: flex; align-items: center; gap: 8px;
}
.tech-tags span i { color: var(--primary); }

/* --- Trust Section --- */
.trust-section {
    padding: 30px 0; border-top: 1px solid var(--glass-border); border-bottom: 1px solid var(--glass-border);
    background: rgba(0,0,0,0.3); text-align: center;
}
.trust-label { color: var(--text-muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 20px; }
.logos-grid { display: flex; justify-content: center; gap: 50px; flex-wrap: wrap; color: rgba(255,255,255,0.2); font-size: 2rem; }

/* --- Stats --- */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-top: -50px; position: relative; z-index: 10; }
.stat-item { padding: 30px; text-align: center; }
.stat-number { font-size: 2.5rem; font-weight: 700; color: white; margin-bottom: 5px; font-family: var(--font-head); }
.stat-label { color: var(--accent); font-size: 0.9rem; }

/* --- About Section --- */
.split-layout { display: flex; align-items: center; gap: 60px; }
.section-tag { color: var(--primary); text-transform: uppercase; letter-spacing: 2px; font-size: 0.85rem; margin-bottom: 10px; }
.section-title { font-size: 2.5rem; margin-bottom: 20px; }
.about-content p { color: var(--text-muted); margin-bottom: 30px; }

.feature-row { display: flex; gap: 20px; margin-bottom: 25px; }
.feature-icon {
    width: 50px; height: 50px; background: rgba(123, 44, 191, 0.1); border-radius: 12px;
    display: flex; align-items: center; justify-content: center; color: var(--accent); font-size: 1.2rem; flex-shrink: 0;
}
.feature-row h3 { font-size: 1.1rem; margin-bottom: 5px; }

/* Code Window Visual */
.about-visual { flex: 1; }
.code-window { padding: 0; overflow: hidden; position: relative; }
.window-header {
    background: rgba(255,255,255,0.05); padding: 10px 20px; display: flex; align-items: center; gap: 15px; border-bottom: 1px solid var(--glass-border);
}
.dots { display: flex; gap: 6px; }
.dots span { width: 10px; height: 10px; border-radius: 50%; background: #ffffff33; }
.dots span:nth-child(1) { background: #ff5f56; }
.dots span:nth-child(2) { background: #ffbd2e; }
.dots span:nth-child(3) { background: #27c93f; }
.filename { font-size: 0.8rem; color: var(--text-muted); font-family: monospace; }
.code-body { padding: 25px; font-family: 'Courier New', monospace; font-size: 0.9rem; color: #d4d4d4; line-height: 1.6; }

.k { color: #c586c0; } .f { color: #dcdcaa; } .s { color: #ce9178; } .b { color: #569cd6; } .c { color: #4ec9b0; }

.glowing-orb-small {
    position: absolute; bottom: -50px; right: -50px; width: 150px; height: 150px;
    background: var(--primary); filter: blur(60px); opacity: 0.4; border-radius: 50%;
}

/* --- Services --- */

.services-grid {
    display: grid;
    gap: 25px;
    margin-top: 50px;
}

/* Desktop / Laptop → 4 per row */
@media (min-width: 992px) {
    .services-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Tablet → 2 per row */
@media (min-width: 768px) and (max-width: 991px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile → 1 per row */
@media (max-width: 767px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
}

/* Service Card */

.service-card {
    padding: 40px 30px;
    position: relative;
    overflow: hidden;
    transition: 0.4s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
}

/* Icon */

.service-icon {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 20px;
    transition: 0.3s;
}

.service-card:hover .service-icon {
    color: var(--neon-pink);
    transform: scale(1.1);
}

/* Glow Effect */

.card-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(123, 44, 191, 0.1), transparent 50%);
    opacity: 0;
    transition: 0.3s;
}

.service-card:hover .card-glow {
    opacity: 1;
}


/* --- Projects --- */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; margin-top: 50px; }
.project-card { position: relative; height: 320px; border-radius: 16px; overflow: hidden; cursor: pointer; }
.project-card img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.project-card:hover img { transform: scale(1.1); }
.project-overlay {
    position: absolute; bottom: 0; left: 0; width: 100%; padding: 30px;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent); transform: translateY(20px); opacity: 0; transition: 0.3s;
}
.project-card:hover .project-overlay { transform: translateY(0); opacity: 1; }
.project-cat { font-size: 0.8rem; color: var(--accent); text-transform: uppercase; }
.btn-link { background: none; border: none; color: white; margin-top: 10px; cursor: pointer; display: flex; align-items: center; gap: 5px; }

/* --- Testimonials --- */
.testimonial-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-top: 40px; }
.testimonial-card { padding: 40px; }
.stars { color: #ffd700; margin-bottom: 15px; font-size: 0.9rem; }
.client-info { display: flex; align-items: center; gap: 15px; margin-top: 20px; }
.client-avatar { width: 45px; height: 45px; background: var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; }

/* --- CTA Section --- */
.cta-section { position: relative; padding: 120px 0; overflow: hidden; }
.cta-title { font-size: 3rem; margin-bottom: 15px; position: relative; z-index: 2; }
.cta-sub { color: var(--text-muted); position: relative; z-index: 2; }
.cta-glow {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 600px; height: 600px; background: radial-gradient(circle, rgba(123, 44, 191, 0.2), transparent 70%); pointer-events: none;
}

/* --- Contact & Form --- */
.contact-wrapper { display: flex; flex-wrap: wrap; }
.contact-text { flex: 1; padding: 50px; background: rgba(255,255,255,0.02); }
.contact-detail { display: flex; align-items: center; gap: 15px; margin-top: 20px; color: var(--text-muted); }
.contact-form { flex: 1.5; padding: 50px; }
.form-group { position: relative; margin-bottom: 30px; }
.form-group input, .form-group textarea {
    width: 100%; background: transparent; border: none; border-bottom: 1px solid rgba(255,255,255,0.2);
    padding: 10px 0; color: white; font-family: inherit; font-size: 1rem; outline: none; transition: 0.3s;
}
.form-group label {
    position: absolute; top: 10px; left: 0; color: rgba(255,255,255,0.5); pointer-events: none; transition: 0.3s;
}
.form-group input:focus ~ label, .form-group input:valid ~ label, 
.form-group textarea:focus ~ label, .form-group textarea:valid ~ label {
    top: -20px; font-size: 0.8rem; color: var(--accent);
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--accent); }

/* --- Footer --- */

footer {
    background: #010101;
    padding: 70px 0 20px;
    border-top: 1px solid var(--glass-border);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

/* Logo */

.footer-logo {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 15px;
    background: radial-gradient(circle, rgba(76,201,240,0.2), transparent);
    box-shadow: 0 0 20px rgba(76, 201, 240, 0.6);
}

.footer-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Brand */

.footer-brand h3 {
    font-family: var(--font-head);
    margin-bottom: 15px;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Links */

.footer-links h4 {
    margin-bottom: 15px;
    font-family: var(--font-head);
    font-size: 1rem;
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links ul li {
    margin-bottom: 10px;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.footer-links ul li a {
    text-decoration: none;
    color: var(--text-muted);
    transition: 0.3s;
}

.footer-links ul li a:hover {
    color: var(--accent);
}

/* Social Icons */

.footer-social a {
    color: var(--text-muted);
    margin-right: 15px;
    font-size: 1.2rem;
    transition: 0.3s;
}

.footer-social a:hover {
    color: var(--accent);
    transform: translateY(-3px);
}

/* Copyright */

.copyright {
    text-align: center;
    color: #444;
    font-size: 0.9rem;
    border-top: 1px solid var(--glass-border);
    padding-top: 15px;
}

/* --- Animations --- */
.fade-up { opacity: 0; transform: translateY(30px); animation: fadeUp 0.8s forwards; }
.delay-1 { animation-delay: 0.2s; } .delay-2 { animation-delay: 0.4s; } 
.delay-3 { animation-delay: 0.6s; } .delay-4 { animation-delay: 0.8s; }

@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }

.fade-scroll { opacity: 0; transform: translateY(40px); transition: 0.8s ease-out; }
.fade-scroll.visible { opacity: 1; transform: translateY(0); }

/* --- Mobile Responsiveness --- */
@media (max-width: 900px) {
    .split-layout, .contact-wrapper, .footer-content { flex-direction: column; }
    .hero-input-group { width: 100%; }
    .hero-title { font-size: 2.8rem; }
    
    /* Navbar Mobile Fixes */
    .nav-content {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }
    
    .logo-icon {
        width: 55px; /* Scaled down slightly for mobile to prevent bloat */
        height: 55px;
    }
    
    .nav-links { display: none; }
    .hamburger { display: block; font-size: 1.6rem; }
    
    /* Prevent Hero Text Overlap */
    .hero { padding-top: 140px; }
}