@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500;700&family=Inter:wght@300;400;500;600;700;800;900&display=swap');

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --accent: #6366f1;
    --accent-light: #818cf8;
    --accent-glow: rgba(99, 102, 241, 0.3);
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: rgba(255, 255, 255, 0.03);
    --text-primary: #e4e4e7;
    --text-secondary: #71717a;
    --border: rgba(255, 255, 255, 0.06);
    --green: #22c55e;
    --cyan: #06b6d4;
    --amber: #f59e0b;
    --rose: #f43f5e;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    cursor: none;
}

/* Custom cursor */
.cursor {
    width: 20px;
    height: 20px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    transition: transform 0.15s ease, background 0.15s ease;
    mix-blend-mode: difference;
}

.cursor-dot {
    width: 6px;
    height: 6px;
    background: var(--accent-light);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 10001;
}

.cursor.hover {
    transform: scale(2.5);
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--accent-light);
}

/* Grain overlay */
.grain {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9999;
    animation: grain 0.5s steps(1) infinite;
}

@keyframes grain {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-2%, -2%); }
    30% { transform: translate(2%, -1%); }
    50% { transform: translate(-1%, 2%); }
    70% { transform: translate(3%, 1%); }
    90% { transform: translate(-2%, 1%); }
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.5rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(20px);
    background: rgba(10, 10, 15, 0.7);
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
}

nav.scrolled {
    padding: 1rem 3rem;
}

.logo {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-bracket {
    color: var(--accent);
    font-weight: 300;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--green);
}

.status-dot {
    width: 6px;
    height: 6px;
    background: var(--green);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
    50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
}

/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 6rem 3rem 3rem;
}

/* Grid background */
.grid-bg {
    position: absolute;
    inset: 0;
    background-image:
            linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
            linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 20%, transparent 70%);
}

/* Gradient orbs */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 15s ease-in-out infinite;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.3), transparent);
    top: 10%;
    left: 20%;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.2), transparent);
    bottom: 20%;
    right: 15%;
    animation-delay: -5s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(244, 63, 94, 0.15), transparent);
    top: 40%;
    right: 30%;
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -40px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(40px, 30px) scale(1.02); }
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 2;
    max-width: 900px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
}

.hero-badge .dot {
    width: 5px;
    height: 5px;
    background: var(--accent);
    border-radius: 50%;
}

.hero h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.04em;
    margin-bottom: 1.5rem;
}

.hero h1 .line {
    display: block;
    overflow: hidden;
}

.hero h1 .line span {
    display: inline-block;
    transform: translateY(110%);
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero h1 .line:nth-child(2) span {
    animation-delay: 0.1s;
}

.hero h1 .line:nth-child(3) span {
    animation-delay: 0.2s;
}

@keyframes slideUp {
    to { transform: translateY(0); }
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent-light), var(--cyan), var(--accent));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 4s linear infinite;
}

@keyframes shimmer {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

.hero-sub {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 550px;
    margin: 0 auto 3rem;
    opacity: 0;
    animation: fadeIn 0.8s ease 0.5s forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    opacity: 0;
    animation: fadeIn 0.8s ease 0.7s forwards;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 2rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: none;
}

.btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 0 30px var(--accent-glow);
}

.btn-primary:hover {
    background: var(--accent-light);
    box-shadow: 0 0 50px var(--accent-glow);
    transform: translateY(-2px);
}

.btn-ghost {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    border-color: var(--accent);
    background: rgba(99, 102, 241, 0.05);
    transform: translateY(-2px);
}

/* Terminal */
.terminal-wrapper {
    margin-top: 4rem;
    width: 100%;
    max-width: 700px;
    opacity: 0;
    animation: fadeIn 0.8s ease 0.9s forwards;
}

.terminal {
    background: rgba(18, 18, 26, 0.8);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    backdrop-filter: blur(20px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
}

.terminal-header {
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.terminal-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.terminal-dot:nth-child(1) { background: #ff5f57; }
.terminal-dot:nth-child(2) { background: #febc2e; }
.terminal-dot:nth-child(3) { background: #28c840; }

.terminal-title {
    flex: 1;
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.terminal-body {
    padding: 1.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    line-height: 1.8;
    min-height: 200px;
}

.terminal-line {
    opacity: 0;
    transform: translateY(5px);
}

.terminal-line.visible {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.4s ease;
}

.terminal-prompt {
    color: var(--green);
}

.terminal-command {
    color: var(--text-primary);
}

.terminal-output {
    color: var(--text-secondary);
    padding-left: 0;
}

.terminal-accent {
    color: var(--accent-light);
}

.terminal-warn {
    color: var(--amber);
}

.terminal-cursor {
    display: inline-block;
    width: 8px;
    height: 15px;
    background: var(--accent);
    animation: blink 1s steps(1) infinite;
    vertical-align: middle;
    margin-left: 2px;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Sections */
section {
    padding: 8rem 3rem;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 5rem;
}

.section-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1rem;
    display: block;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 500px;
    margin: 1.5rem auto 0;
    line-height: 1.7;
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2.5rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
}

.service-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.service-card:hover {
    border-color: rgba(99, 102, 241, 0.2);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-5px);
}

.service-card:hover::before {
    opacity: 1;
}

.service-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.service-icon::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 14px;
    opacity: 0.15;
}

.icon-blue { background: rgba(99, 102, 241, 0.1); }
.icon-blue::after { background: var(--accent); }
.icon-cyan { background: rgba(6, 182, 212, 0.1); }
.icon-cyan::after { background: var(--cyan); }
.icon-amber { background: rgba(245, 158, 11, 0.1); }
.icon-amber::after { background: var(--amber); }
.icon-rose { background: rgba(244, 63, 94, 0.1); }
.icon-rose::after { background: var(--rose); }
.icon-green { background: rgba(34, 197, 94, 0.1); }
.icon-green::after { background: var(--green); }
.icon-purple { background: rgba(168, 85, 247, 0.1); }
.icon-purple::after { background: #a855f7; }

.service-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
}

.service-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

.service-tag {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    margin-top: 1rem;
    border: 1px solid;
}

.tag-blue { color: var(--accent-light); border-color: rgba(99, 102, 241, 0.2); }
.tag-cyan { color: var(--cyan); border-color: rgba(6, 182, 212, 0.2); }
.tag-amber { color: var(--amber); border-color: rgba(245, 158, 11, 0.2); }
.tag-rose { color: var(--rose); border-color: rgba(244, 63, 94, 0.2); }
.tag-green { color: var(--green); border-color: rgba(34, 197, 94, 0.2); }
.tag-purple { color: #a855f7; border-color: rgba(168, 85, 247, 0.2); }

/* Process / How we work */
.process-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
}

.process-grid::before {
    content: '';
    position: absolute;
    top: 40px;
    left: 15%;
    right: 15%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), var(--border), transparent);
}

.process-step {
    text-align: center;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
}

.process-step.visible {
    opacity: 1;
    transform: translateY(0);
}

.process-num {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent-light);
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.process-step:hover .process-num {
    border-color: var(--accent);
    box-shadow: 0 0 30px var(--accent-glow);
}

.process-step h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.process-step p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Stats */
.stats-section {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.stat-item {
    opacity: 0;
    transform: translateY(20px);
}

.stat-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.stat-num {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--text-primary), var(--accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* Tech stack marquee */
.marquee-section {
    padding: 3rem 0;
    overflow: hidden;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.marquee-track {
    display: flex;
    gap: 3rem;
    animation: marquee 30s linear infinite;
    width: max-content;
}

.marquee-track:hover {
    animation-play-state: paused;
}

@keyframes marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.marquee-item {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.marquee-item:hover {
    color: var(--accent-light);
}

.marquee-sep {
    color: var(--border);
}

/* Contact / CTA */
.cta-section {
    text-align: center;
}

.cta-box {
    max-width: 700px;
    margin: 0 auto;
    padding: 4rem;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.cta-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(99, 102, 241, 0.05), transparent 50%);
    pointer-events: none;
}

.cta-box h2 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
    position: relative;
}

.cta-box p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1rem;
    line-height: 1.7;
    position: relative;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    position: relative;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    font-family: 'JetBrains Mono', monospace;
}

.contact-link:hover {
    border-color: var(--accent);
    color: var(--text-primary);
    background: rgba(99, 102, 241, 0.05);
}

/* Footer */
footer {
    padding: 3rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--text-primary);
}

/* Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Floating particles canvas */
#particles {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

/* Responsive */
@media (max-width: 768px) {
    nav {
        padding: 1rem 1.5rem;
    }

    .nav-links {
        display: none;
    }

    section {
        padding: 5rem 1.5rem;
    }

    .hero {
        padding: 5rem 1.5rem 3rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .process-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .process-grid::before {
        display: none;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cta-box {
        padding: 2.5rem 1.5rem;
    }

    footer {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .cursor, .cursor-dot {
        display: none;
    }

    body {
        cursor: auto;
    }
}

/* SVG icons inline */
.icon-svg {
    width: 24px;
    height: 24px;
}
