/* --- 1. Variables & Reset --- */
:root {
    --bg-color: #050505;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-main: #ffffff;
    --text-muted: #a1a1aa;
    --accent-1: #4338ca;
    --accent-2: #d946ef;
    --accent-3: #2dd4bf;
}

* { margin: 0; padding: 0; box-sizing: border-box; cursor: none; }
section { scroll-margin-top: 100px; } 

html, body {
    width: 100%;
    overflow-x: hidden;
    /* BACKGROUND GRADIENT */
    background: radial-gradient(circle at top center, #1a1a2e 0%, #050505 100%);
    font-family: 'Space Grotesk', sans-serif;
    color: var(--text-main);
    scroll-behavior: smooth;
}

@media (max-width: 768px) { * { cursor: auto !important; } .cursor-dot, .cursor-outline { display: none !important; } }

/* --- 2. 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: transform 1s cubic-bezier(0.76, 0, 0.24, 1); }
.preloader.finish { transform: translateY(-100%); }
.loader-content { text-align: center; color: white; }
.count-wrap { font-family: 'Outfit', sans-serif; font-size: 5rem; font-weight: 700; opacity: 1; transition: transform 0.5s, opacity 0.5s; }
.preloader.zooming .count-wrap { transform: scale(2); opacity: 0; }
.loader-text { margin-top: 1rem; font-size: 0.8rem; letter-spacing: 2px; text-transform: uppercase; color: var(--text-muted); }

/* --- 3. Background Layers --- */
.background-container { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -3; overflow: hidden; filter: blur(80px); }
.orb { position: absolute; border-radius: 50%; animation: float 10s infinite ease-in-out; opacity: 0.7; }
.orb-1 { width: 60vh; height: 60vh; background: var(--accent-1); top: -10%; left: -10%; }
.orb-2 { width: 50vh; height: 50vh; background: var(--accent-2); bottom: -5%; right: -10%; animation-delay: -2s; }
.orb-3 { width: 40vh; height: 40vh; background: var(--accent-3); top: 40%; left: 40%; animation-delay: -4s; }

.noise-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: url('https://grainy-gradients.vercel.app/noise.svg'); opacity: 0.05; z-index: -2; pointer-events: none; }

/* Hero Specific Grid */
.hero-grid-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: -1;
    background-image: linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(circle at center, black 40%, transparent 90%);
}

.hero-floating-icons { position: absolute; width: 100%; height: 100%; top: 0; left: 0; z-index: -1; pointer-events: none; }
.float-icon { position: absolute; font-size: 2rem; color: rgba(255,255,255,0.2); filter: blur(2px); animation: floatIcon 6s infinite ease-in-out; }
.i-1 { top: 20%; left: 15%; font-size: 3rem; animation-delay: 0s; }
.i-2 { top: 60%; right: 15%; font-size: 2.5rem; animation-delay: 2s; }
.i-3 { top: 30%; right: 25%; animation-delay: 4s; }
.i-4 { bottom: 20%; left: 20%; animation-delay: 1s; }
@keyframes floatIcon { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-20px); } }
@keyframes float { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(30px, 50px); } }

/* --- 4. Cursor --- */
.cursor-dot, .cursor-outline { position: fixed; top: 0; left: 0; transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none; z-index: 9999; }
.cursor-dot { width: 8px; height: 8px; background: white; }
.cursor-outline { width: 40px; height: 40px; border: 1px solid rgba(255, 255, 255, 0.5); transition: width 0.2s, height 0.2s; }
body.hovering .cursor-outline { width: 60px; height: 60px; background: rgba(255, 255, 255, 0.1); border-color: transparent; backdrop-filter: blur(2px); }

/* --- 5. Nav --- */
.glass-nav { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); display: flex; justify-content: space-between; align-items: center; width: 90%; max-width: 1000px; padding: 1rem 2rem; z-index: 999; background: var(--glass-bg); backdrop-filter: blur(12px); border: 1px solid var(--glass-border); border-radius: 50px; }
.logo { font-weight: 700; font-size: 1.5rem; letter-spacing: -1px; z-index: 1001; }
.nav-links { list-style: none; display: flex; gap: 2rem; }
.nav-links a { text-decoration: none; color: var(--text-muted); font-size: 0.9rem; transition: color 0.3s; }
.nav-links a:hover { color: var(--text-main); }
.mobile-menu-icon { display: none; font-size: 1.5rem; cursor: pointer; z-index: 1001; }
.mobile-close-btn { display: none; }

/* --- 6. Typography & General --- */
h1 { font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 3.5rem; line-height: 1.1; margin-bottom: 1.5rem; }
h2 { font-family: 'Outfit', sans-serif; font-size: 3rem; margin-bottom: 0.5rem; }
p { color: var(--text-muted); line-height: 1.6; }
.gradient-text { background: linear-gradient(to right, var(--accent-3), var(--accent-1)); -webkit-background-clip: text; color: transparent; }
.section-padding { padding: 8rem 2rem; }
.container { max-width: 1200px; margin: 0 auto; width: 100%; }
.section-header { margin-bottom: 4rem; }
.glass-panel { background: rgba(255, 255, 255, 0.03); backdrop-filter: blur(12px); border: 1px solid var(--glass-border); padding: 2.5rem; border-radius: 24px; transition: 0.3s; }

/* --- 7. Hero --- */
.hero { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 140px 2rem 8rem 2rem; position: relative; overflow: hidden; }
.glass-card { background: rgba(20, 20, 20, 0.4); backdrop-filter: blur(20px); border: 1px solid rgba(255, 255, 255, 0.1); border-top: 1px solid rgba(255, 255, 255, 0.2); box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5); padding: 4rem; border-radius: 30px; text-align: center; max-width: 800px; width: 100%; transform-style: preserve-3d; transition: transform 0.1s ease; z-index: 1; }
.status-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px; border-radius: 20px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); font-size: 0.85rem; margin-bottom: 1.5rem; color: var(--text-muted); }
.status-dot { width: 8px; height: 8px; background: #22c55e; border-radius: 50%; box-shadow: 0 0 10px #22c55e; }
.hero-stats { display: flex; justify-content: center; align-items: center; gap: 2rem; margin: 2.5rem 0; padding: 1.5rem 0; border-top: 1px solid rgba(255,255,255,0.05); border-bottom: 1px solid rgba(255,255,255,0.05); }
.h-stat { display: flex; flex-direction: column; }
.h-stat .num { font-size: 1.5rem; font-weight: 700; color: white; }
.h-stat .label { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; }
.divider { width: 1px; height: 30px; background: rgba(255,255,255,0.1); }
.button-group { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
button { padding: 1rem 2rem; border-radius: 12px; border: none; font-weight: 600; cursor: pointer; transition: 0.3s; }
button:hover { transform: translateY(-3px); }
.primary-btn { background: white; color: black; }
.secondary-btn { background: rgba(255, 255, 255, 0.05); color: white; border: 1px solid rgba(255, 255, 255, 0.1); }
.scroll-indicator { position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 0.8rem; color: var(--text-muted); animation: bounce 2s infinite; z-index: 10; }
@keyframes bounce { 0%, 20%, 50%, 80%, 100% {transform: translate(-50%, 0);} 40% {transform: translate(-50%, -10px);} 60% {transform: translate(-50%, -5px);} }

/* --- 8. Marquee --- */
.marquee-section { width: 100%; padding: 2rem 0; overflow: hidden; position: relative; background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.02), transparent); }
.marquee-track { display: flex; gap: 2rem; width: max-content; animation: scroll 30s linear infinite; pointer-events: none; }
.marquee-item { width: 300px; height: 200px; border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,0.1); flex-shrink: 0; }
.marquee-item img { width: 100%; height: 100%; object-fit: cover; opacity: 0.6; filter: grayscale(50%); }
.marquee-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; background: linear-gradient(to right, var(--bg-color), transparent 20%, transparent 80%, var(--bg-color)); }
@keyframes scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* --- 9. Services --- */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.glass-panel:hover { transform: translateY(-10px); background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.2); }
.icon-box { width: 50px; height: 50px; background: rgba(255,255,255,0.05); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: var(--accent-3); margin-bottom: 1.5rem; }

/* --- 10. Mobile Apps --- */
.app-row { display: flex; align-items: center; justify-content: space-between; gap: 4rem; margin-bottom: 6rem; }
.app-row.reverse { flex-direction: row-reverse; }
.app-info { flex: 1; align-items: flex-start; display: flex; flex-direction: column; justify-content: center; }
.app-visual { flex: 1; display: flex; justify-content: center; }

/* Premium Phone Frame (iPhone 15 Pro Style) */
.phone-frame {
    width: 280px; height: 580px;
    background: #000;
    border-radius: 45px;
    position: relative;
    border: 8px solid #2a2a2a;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.8), 0 0 0 2px #444, 0 20px 50px rgba(0,0,0,0.6);
    overflow: hidden;
    flex-shrink: 0;
}
.dynamic-island { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); width: 80px; height: 24px; background: #000; border-radius: 20px; z-index: 10; }
.phone-frame img { width: 100%; height: 100%; object-fit: cover; border-radius: 35px; opacity: 0.9; }

.ui-overlay { position: absolute; bottom: 30px; left: 20px; right: 20px; display: flex; flex-direction: column; gap: 10px; }
.ui-card { background: rgba(255,255,255,0.15); backdrop-filter: blur(15px); padding: 12px 15px; border-radius: 15px; border: 1px solid rgba(255,255,255,0.2); text-align: left; }
.ui-card h5 { font-size: 1rem; margin-top: 2px; }

.app-features { list-style: none; margin-top: 1.5rem; }
.app-features div { display: flex; align-items: center; gap: 10px; margin-bottom: 0.8rem; color: var(--text-muted); font-size: 0.95rem; }
.app-features i { color: var(--accent-3); }

/* Updated Glass Tag for Apps */
.app-info .glass-tag { width: fit-content; margin-bottom: 1.5rem; display: inline-block; padding: 6px 16px; }
.app-info h3 { margin-bottom: 1rem; }
.app-info p { margin-bottom: 1.5rem; }

/* --- 11. Bento Grid --- */
.bento-grid { display: grid; grid-template-columns: repeat(12, 1fr); grid-template-rows: repeat(2, 400px); gap: 1.5rem; }
.project-card { position: relative; border-radius: 24px; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.1); background: rgba(25, 25, 25, 0.4); transition: transform 0.4s, border-color 0.3s; }
.span-8 { grid-column: span 8; }
.span-4 { grid-column: span 4; }
.project-card:hover { border-color: rgba(255, 255, 255, 0.4); transform: translateY(-5px); }
.card-image { width: 100%; height: 100%; position: absolute; }
.card-image img { width: 100%; height: 100%; object-fit: cover; opacity: 0.7; transition: transform 0.7s ease; }
.project-card:hover .card-image img { transform: scale(1.1); opacity: 0.3; }
.card-content { position: absolute; bottom: 0; left: 0; width: 100%; padding: 2rem; background: linear-gradient(to top, rgba(0,0,0,0.9), transparent); transform: translateY(10px); transition: transform 0.4s ease; }
.project-card:hover .card-content { transform: translateY(0); }
.card-meta { display: flex; justify-content: space-between; margin-bottom: 0.5rem; }
.glass-tag { background: rgba(255,255,255,0.1); backdrop-filter: blur(4px); padding: 4px 12px; border-radius: 20px; font-size: 0.75rem; border: 1px solid rgba(255,255,255,0.1); }
.overlay-btn-container { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.3s ease; z-index: 10; }
.project-card:hover .overlay-btn-container { opacity: 1; }
.live-btn { background: white; color: black; padding: 12px 24px; border-radius: 30px; text-decoration: none; font-weight: 600; display: flex; align-items: center; gap: 8px; transform: translateY(20px); transition: transform 0.3s ease; }
.project-card:hover .live-btn { transform: translateY(0); }

/* --- 12. Process & FAQ & Contact & Footer --- */
.timeline-wrapper { position: relative; max-width: 800px; margin: 0 auto; }
.timeline-line { position: absolute; left: 24px; top: 0; bottom: 0; width: 2px; background: linear-gradient(to bottom, var(--accent-1), var(--accent-3)); z-index: 0; }
.timeline-step { display: flex; gap: 2rem; margin-bottom: 3rem; position: relative; z-index: 1; }
.step-marker { width: 50px; height: 50px; background: #050505; border: 2px solid var(--accent-3); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; color: white; flex-shrink: 0; }
.step-card { flex: 1; position: relative; }
.step-icon { font-size: 1.5rem; color: var(--accent-3); margin-bottom: 1rem; }

.faq-container { padding: 0 2rem; max-width: 800px; margin: 0 auto; text-align: left; }
.faq-item { border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.faq-trigger { width: 100%; padding: 1.5rem 0; background: none; border: none; color: white; font-size: 1.1rem; font-family: 'Outfit', sans-serif; font-weight: 500; display: flex; justify-content: space-between; align-items: center; cursor: pointer; text-align: left; }
.faq-trigger i { transition: transform 0.3s ease; color: var(--accent-3); margin-left: 1rem; }
.faq-trigger.active i { transform: rotate(180deg); }
.faq-content { max-height: 0; overflow: hidden; transition: max-height 0.3s ease-out; padding-right: 2rem; color: var(--text-muted); line-height: 1.6; }
.faq-content p { padding-bottom: 1.5rem; margin: 0; }

.split-layout { display: flex; align-items: flex-start; gap: 4rem; }
.about-text { flex: 1; padding-top: 1rem; }
.about-skills { flex: 1; padding: 3rem; }
.tech-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-top: 2rem; }
.tech-item { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); padding: 12px 16px; border-radius: 12px; transition: 0.3s; }
.tech-item:hover { background: rgba(255,255,255,0.1); transform: translateY(-3px); border-color: var(--accent-3); }

.testimonials-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.testimonial-card { padding: 3rem; display: flex; flex-direction: column; justify-content: space-between; }
.stars { color: #FFD700; letter-spacing: 2px; margin-bottom: 1.5rem; font-size: 0.9rem; }
.author { display: flex; align-items: center; gap: 1rem; }
.avatar-placeholder { width: 50px; height: 50px; background: linear-gradient(135deg, #333, #111); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; color: white; border: 1px solid rgba(255,255,255,0.2); }

.glass-form-container { display: flex; justify-content: space-between; gap: 4rem; background: linear-gradient(145deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01)); backdrop-filter: blur(20px); border: 1px solid rgba(255,255,255,0.1); border-radius: 30px; padding: 4rem; }
.glass-form { flex: 1; max-width: 500px; }
.input-group { margin-bottom: 2rem; }
.input-group label { display: block; font-size: 0.9rem; color: var(--text-muted); margin-bottom: 0.5rem; }
input, textarea { width: 100%; background: transparent; border: none; border-bottom: 1px solid rgba(255,255,255,0.2); color: white; font-size: 1.2rem; padding: 0.5rem 0; outline: none; transition: 0.3s; font-family: inherit; }
input:focus, textarea:focus { border-bottom: 1px solid var(--accent-3); }
.social-row { display: flex; gap: 1rem; margin-top: 1.5rem; }
.social-link { width: 45px; height: 45px; border-radius: 50%; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; color: white; text-decoration: none; font-size: 1.2rem; transition: 0.3s; }
.social-link:hover { background: var(--accent-1); border-color: var(--accent-1); transform: translateY(-3px); }
.email-link { color: var(--text-main); font-size: 1.5rem; text-decoration: none; border-bottom: 1px solid var(--accent-3); padding-bottom: 2px; }

.main-footer { border-top: 1px solid rgba(255,255,255,0.05); padding: 5rem 0 2rem 0; margin-top: 4rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; margin-bottom: 4rem; }
.footer-col h4 { font-size: 1rem; margin-bottom: 1.5rem; color: white; }
.footer-col ul { list-style: none; padding: 0; margin: 0; text-align: left; }
.footer-col a { color: var(--text-muted); text-decoration: none; transition: color 0.3s; }
.footer-col a:hover { color: var(--accent-3); }
.footer-bottom { text-align: center; border-top: 1px solid rgba(255,255,255,0.05); padding-top: 2rem; color: #555; font-size: 0.8rem; }
.footer-socials { display: flex; flex-direction: column; gap: 10px; }
.fade-in { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* --- 17. MOBILE RESPONSIVENESS --- */
@media (max-width: 1024px) {
    .bento-grid { grid-template-rows: repeat(3, 350px); }
    .span-8, .span-4 { grid-column: span 6; }
    .span-8 { grid-column: span 12; }
    .services-grid { grid-template-columns: 1fr 1fr; }
    .app-row, .app-row.reverse { flex-direction: column; gap: 3rem; text-align: center; }
    .app-info { align-items: center; }
}

@media (max-width: 768px) {
    h1 { font-size: 2.2rem; } h2 { font-size: 2rem; }
    
    .hero { padding-top: 140px; padding-bottom: 4rem; height: auto; min-height: 100dvh; justify-content: flex-start; } 
    .glass-card { padding: 2rem 1.5rem; }
    .hero-stats { gap: 1rem; }
    .h-stat .num { font-size: 1.2rem; }
    .h-stat .label { font-size: 0.6rem; }
    
    /* Mobile Menu Overlay */
    .mobile-menu-icon { display: block; }
    .glass-nav { padding: 0.8rem 1.5rem; width: 90%; }
    .nav-links {
        position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
        background: #050505; flex-direction: column; align-items: center; justify-content: center;
        gap: 2rem; z-index: 998; transform: translateX(100%); transition: transform 0.3s ease;
    }
    .nav-links.active { transform: translateX(0); }
    .nav-links a { font-size: 1.5rem; }
    .mobile-close-btn { display: block; position: absolute; top: 2rem; right: 2rem; font-size: 2rem; cursor: pointer; color: white; }
    
    .split-layout, .glass-form-container { flex-direction: column; padding: 2rem; }
    .bento-grid { display: flex; flex-direction: column; gap: 1.5rem; }
    .project-card { height: 300px; width: 100%; }
    
    .services-grid { grid-template-columns: 1fr; }
    
    /* Tech Grid Overflow Fix */
    .about-skills { padding: 1.5rem; }
    .tech-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .tech-item { font-size: 0.75rem; padding: 8px 4px; justify-content: center; width: 100%; white-space: nowrap; }
    .tech-item i { font-size: 1.1rem; }
    
    /* Footer Alignment Fix */
    .footer-grid { grid-template-columns: 1fr; gap: 2.5rem; text-align: center; }
    .footer-col ul { text-align: center; }
    .footer-socials { align-items: center; }
    .email-link { font-size: 1.2rem; word-break: break-all; }
    
    /* Process Spacing Fix */
    .timeline-line { left: 24px; }
    .timeline-step { flex-direction: column; gap: 1.5rem; padding-left: 3.5rem; margin-bottom: 4rem; }
    .step-marker { position: absolute; left: 0; top: 0; }
    
    .app-row { margin-bottom: 4rem; }
    .phone-frame { width: 100%; max-width: 300px; height: auto; aspect-ratio: 9/19; margin: 0 auto; }
    
    /* Client Stories Mobile Fix */
    .testimonials-grid { grid-template-columns: 1fr; gap: 2rem; }
}
