:root {
    /* Colors */
    --primary: #0066ff;
    --primary-light: #337dff;
    --secondary: #00d4aa;
    --secondary-dark: #00b896;
    --accent: #ff6b6b;
    --neutral-900: #0a0a0a;
    --neutral-800: #1a1a1a;
    --neutral-700: #2a2a2a;
    --neutral-600: #404040;
    --neutral-500: #666666;
    --neutral-400: #999999;
    --neutral-300: #cccccc;
    --neutral-200: #e6e6e6;
    --neutral-100: #f5f5f5;
    --neutral-50: #fafafa;
    --white: #ffffff;

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Spacing */
    --section-padding: 120px;
    --section-padding-mobile: 80px;

    /* Effects */
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --border-radius: 12px;
    --border-radius-lg: 20px;
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 70px;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--neutral-800);
    background-color: var(--white);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--neutral-100);
}

::-webkit-scrollbar-thumb {
    background: var(--neutral-400);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--neutral-500);
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s ease;
}

.logo:hover {
    color: var(--white);
    transform: translateY(-1px);
}

.logo-text {
    font-family: var(--font-mono);
    font-weight: 600;
    letter-spacing: -0.5px;
}

.logo-highlight {
    color: var(--secondary);
}

/* Navbar */
.navbar {
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
    padding: 1rem 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.navbar.scrolled {
    background: rgba(10, 10, 10, 0.98);
    box-shadow: var(--shadow-lg);
    padding: 0.75rem 0;
}

.nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
    margin: 0 0.75rem;
    padding: 0.5rem 0;
    text-decoration: none !important;
    background-color: transparent !important;
}

.nav-link:hover,
.nav-link.active {
    color: var(--secondary) !important;
    background-color: transparent !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background: var(--secondary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 1px;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Hero */
.hero {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--neutral-900) 0%, var(--neutral-800) 100%);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(0, 102, 255, 0.15) 0%, transparent 60%),
        radial-gradient(circle at 80% 20%, rgba(0, 212, 170, 0.12) 0%, transparent 60%),
        radial-gradient(circle at 40% 40%, rgba(255, 107, 107, 0.08) 0%, transparent 60%);
    pointer-events: none;
}

.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(0, 212, 170, 0.8);
    border-radius: 50%;
    animation: floatUp linear infinite;
    box-shadow: 0 0 6px rgba(0, 212, 170, 0.4);
}

.particle:nth-child(2n) {
    background: rgba(0, 102, 255, 0.7);
    width: 5px;
    height: 5px;
    animation-duration: 12s;
    animation-delay: -3s;
    box-shadow: 0 0 8px rgba(0, 102, 255, 0.3);
}

.particle:nth-child(3n) {
    background: rgba(255, 107, 107, 0.6);
    width: 3px;
    height: 3px;
    animation-duration: 18s;
    animation-delay: -8s;
    box-shadow: 0 0 5px rgba(255, 107, 107, 0.3);
}

@keyframes floatUp {
    0% {
        opacity: 0;
        transform: translateY(100vh) translateX(0) rotate(0deg) scale(0.5);
    }
    10% {
        opacity: 1;
        transform: translateY(90vh) translateX(10px) rotate(36deg) scale(1);
    }
    50% {
        opacity: 1;
        transform: translateY(50vh) translateX(50px) rotate(180deg) scale(1.2);
    }
    90% {
        opacity: 0.8;
        transform: translateY(10vh) translateX(80px) rotate(324deg) scale(0.8);
    }
    100% {
        opacity: 0;
        transform: translateY(-10vh) translateX(100px) rotate(360deg) scale(0.3);
    }
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--white) 0%, var(--neutral-300) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.hero h1 span {
    -webkit-text-fill-color: var(--secondary);
    background: none;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--neutral-400);
    margin-bottom: 2.5rem;
    font-weight: 400;
    max-width: 600px;
    line-height: 1.6;
}

.hero-visual {
    position: relative;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.code-window {
    background: var(--neutral-800);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--neutral-700);
    max-width: 400px;
    width: 100%;
    font-family: var(--font-mono);
    animation: float 6s ease-in-out infinite;
}

.code-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--neutral-700);
}

.code-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.code-dot:nth-child(1) { background: #ff5f56; }
.code-dot:nth-child(2) { background: #ffbd2e; }
.code-dot:nth-child(3) { background: #27ca3f; }

.code-line {
    color: var(--neutral-400);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    opacity: 0;
    transform: translateX(-10px);
    animation: typewriter 0.5s ease forwards;
}

.code-line.line-1 { animation-delay: 1s; }
.code-line.line-2 { animation-delay: 1.5s; }
.code-line.line-3 { animation-delay: 2s; }

.code-keyword { color: var(--primary-light); }
.code-string { color: var(--secondary); }
.code-comment { color: var(--neutral-500); }

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes typewriter {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

/* CTA Button */
.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--secondary);
    color: var(--white);
    padding: 16px 32px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
    border: none;
}

.cta-button:hover {
    background: var(--secondary-dark);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

/* Sections */
section {
    padding: var(--section-padding) 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    font-weight: 700;
    color: var(--neutral-900);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--neutral-600);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Service Card */
.service-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 2.5rem;
    border: 1px solid var(--neutral-200);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary), var(--secondary-dark));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
    border-color: var(--neutral-300);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 1.5rem;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--white);
    position: relative;
    background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
}

.service-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--neutral-900);
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--neutral-600);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.service-features {
    list-style: none;
    padding: 0;
}

.service-features li {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.5rem;
    color: var(--neutral-700);
    font-size: 0.9rem;
}

.service-features i {
    color: var(--secondary);
    font-size: 0.75rem;
}

/* Services Carousel */
.services-carousel {
    position: relative;
    margin-top: 3rem;
    padding: 1rem 0;
    overflow: hidden;
}

.services-track {
    display: flex;
    transition: transform 0.5s ease;
    gap: 2rem;
}

.services-carousel .service-card {
    flex: 0 0 320px;
    max-width: 320px;
}

.carousel-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
}

.carousel-btn {
    background: var(--secondary);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    color: var(--white);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.carousel-btn:hover {
    background: var(--secondary-dark);
    transform: scale(1.1);
}

.carousel-btn:disabled {
    background: var(--neutral-400);
    cursor: not-allowed;
    transform: scale(1);
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--neutral-300);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: var(--secondary);
    transform: scale(1.2);
}

/* About */
.about-section {
    background: var(--neutral-50);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h2 {
    font-size: clamp(2rem, 3vw, 2.5rem);
    font-weight: 700;
    color: var(--neutral-900);
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.about-text p {
    color: var(--neutral-600);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background: var(--white);
    border-radius: var(--border-radius);
    border: 1px solid var(--neutral-200);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary);
    display: block;
}

.stat-label {
    color: var(--neutral-600);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    opacity: 0.8;
}

.tech-item {
    background: var(--white);
    padding: 1.5rem 1rem;
    border-radius: var(--border-radius);
    text-align: center;
    color: var(--neutral-700);
    font-size: 0.875rem;
    font-weight: 600;
    border: 1px solid var(--neutral-200);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    flex: 0 0 calc(33.333% - 0.667rem);
    min-width: 120px;
}

.tech-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.tech-item i {
    display: block;
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

/* Contact */
.contact-section {
    background: var(--neutral-900);
    color: var(--white);
}

.contact-section .section-title {
    color: var(--white);
}

.contact-section .section-subtitle {
    color: var(--neutral-400);
}

.contact-form {
    background: var(--neutral-800);
    padding: 3rem;
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--neutral-700);
    box-shadow: var(--shadow-xl);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--neutral-300);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--neutral-700);
    border: 1px solid var(--neutral-600);
    border-radius: var(--border-radius);
    color: var(--white);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.1);
}

.form-control::placeholder {
    color: var(--neutral-500);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* Footer */
.footer {
    background: var(--neutral-800);
    color: var(--neutral-400);
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--neutral-700);
}

/* ================================
   Media Queries
   ================================ */

@media (min-width: 992px) {
    .navbar .container {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
    }

    .navbar-collapse {
        display: flex !important;
        visibility: visible !important;
        flex-grow: 0 !important;
        flex-basis: auto !important;
        width: auto !important;
    }

    .navbar-nav {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 2rem;
        margin: 0 !important;
        padding: 0 !important;
        list-style: none !important;
    }

    .nav-item {
        margin: 0 !important;
    }

    .navbar-toggler {
        display: none !important;
    }
}

@media (min-width: 768px) {
    .services-carousel .service-card {
        flex: 0 0 calc(50% - 1rem);
        max-width: calc(50% - 1rem);
    }
}

@media (min-width: 1024px) {
    .services-carousel .service-card {
        flex: 0 0 calc(33.333% - 1.333rem);
        max-width: calc(33.333% - 1.333rem);
    }
}

@media (min-width: 1200px) {
    .services-carousel .service-card {
        flex: 0 0 calc(25% - 1.5rem);
        max-width: calc(25% - 1.5rem);
    }
}

@media (min-width: 1400px) {
    .carousel-controls,
    .carousel-indicators {
        display: none;
    }
}

@media (max-width: 1400px) {
    .hero h1 {
        font-size: clamp(2.5rem, 5vw, 4rem);
        line-height: 1.2;
    }

    .hero-content {
        padding-right: 1rem;
    }
}

@media (max-width: 992px) {
    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .tech-item {
        flex: 0 0 calc(50% - 0.5rem);
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: var(--section-padding-mobile);
    }

    .services-carousel .service-card {
        flex: 0 0 280px;
    }

    .contact-form {
        padding: 2rem;
    }

    .hero-visual {
        margin-top: 3rem;
        height: 300px;
    }

    .code-window {
        max-width: 300px;
    }

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

    .hero-content {
        padding-top: 2rem;
    }
}
