/* ===== CSS RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Palette */
    --primary-color: #0066FF;
    --secondary-color: #00D4FF;
    --accent-color: #8B5CF6;
    --accent-gradient: linear-gradient(135deg, #8B5CF6, #A855F7);
    --text-primary: #2D3748;
    --text-secondary: #4A5568;
    --text-light: #718096;
    --bg-primary: #FFFFFF;
    --bg-secondary: #F7FAFC;
    --bg-dark: #1A202C;
    --bg-darker: #171923;
    
    /* Futuristic Colors */
    --cyber-blue: #00BFFF;
    --neon-cyan: #00FFFF;
    --electric-blue: #0080FF;
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    /* Spacing */
    --container-max-width: 1200px;
    --section-padding: 50px 0;
    --element-spacing: 2rem;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

/* Dark Theme Variables */
[data-theme="dark"] {
    --text-primary: #F7FAFC;
    --text-secondary: #E2E8F0;
    --text-light: #A0AEC0;
    --bg-primary: #1A202C;
    --bg-secondary: #2D3748;
    --bg-dark: #171923;
    --bg-darker: #0F1419;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    overflow-x: hidden;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* ===== CUSTOM CURSOR ===== */
.cursor {
    display: none;
}

.cursor-follower {
    display: none;
}

/* ===== GLOBAL PARTICLES ===== */
.global-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* ===== SCROLL PROGRESS ===== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--accent-gradient);
    z-index: 1000;
    transition: width 0.1s ease;
}

/* ===== NAVIGATION ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 1000;
    transition: all var(--transition-normal);
}

[data-theme="dark"] .navbar {
    background: rgba(26, 32, 44, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .nav-logo .logo-text {
    color: #FFFFFF;
}

[data-theme="dark"] .nav-link {
    color: #E2E8F0;
}

[data-theme="dark"] .nav-link:hover,
[data-theme="dark"] .nav-link.active {
    color: #5875f7;
}

[data-theme="dark"] .bar {
    background: #FFFFFF;
}

.nav-container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.nav-logo .logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
}

.logo-accent {
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color var(--transition-fast);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width var(--transition-fast);
}

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

.cta-button {
    background: var(--accent-gradient);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-lg);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    transition: all var(--transition-fast);
    border-radius: 2px;
}

/* ===== HERO SECTION ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    z-index: 0;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

[data-theme="dark"] .hero-background {
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-darker) 100%);
}

.particles-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
}

.gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(0, 102, 255, 0.1) 0%, transparent 50%);
}

.hero-content {
    max-width: var(--container-max-width);
    margin: 80px auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--text-primary), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.typewriter {
    display: inline-block;
    border-right: 3px solid var(--primary-color);
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { border-color: var(--primary-color); }
    51%, 100% { border-color: transparent; }
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
    padding: 16px 32px;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.4);
}

.btn-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover .btn-glow {
    left: 100%;
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

/* ===== FUTURISTIC EFFECTS ===== */
.matrix-rain {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    opacity: 0.1;
    pointer-events: none;
}

.holographic-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(0, 245, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 245, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* ===== GLITCH EFFECTS ===== */
.glitch {
    position: relative;
    color: var(--text-primary);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    text-transform: uppercase;
    animation: glitch 2s infinite;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    animation: glitch-1 0.5s infinite;
    color: #ff0040;
    z-index: -1;
}

.glitch::after {
    animation: glitch-2 0.5s infinite;
    color: #00ffff;
    z-index: -2;
}

@keyframes glitch {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
}

@keyframes glitch-1 {
    0%, 100% { transform: translate(0); }
    10% { transform: translate(-2px, -2px); }
    20% { transform: translate(2px, 2px); }
    30% { transform: translate(-2px, 2px); }
    40% { transform: translate(2px, -2px); }
    50% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    70% { transform: translate(-2px, 2px); }
    80% { transform: translate(2px, -2px); }
    90% { transform: translate(-2px, -2px); }
}

@keyframes glitch-2 {
    0%, 100% { transform: translate(0); }
    10% { transform: translate(2px, 2px); }
    20% { transform: translate(-2px, -2px); }
    30% { transform: translate(2px, -2px); }
    40% { transform: translate(-2px, 2px); }
    50% { transform: translate(2px, 2px); }
    60% { transform: translate(-2px, -2px); }
    70% { transform: translate(2px, -2px); }
    80% { transform: translate(-2px, 2px); }
    90% { transform: translate(2px, 2px); }
}

/* ===== CYBER TEXT EFFECTS ===== */
.cyber-text {
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.highlight-text {
    color: var(--cyber-blue);
    text-shadow: 0 0 10px var(--cyber-blue);
    font-weight: 700;
}

.ai-highlight {
    background: linear-gradient(45deg, #ff0040, #00ffff, #ff0040);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: aiGlow 3s ease-in-out infinite;
    font-weight: 800;
}

@keyframes aiGlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ===== HERO STATS ===== */
.hero-stats {
    display: flex;
    gap: 2rem;
    margin: 2rem 0;
    justify-content: center;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: rgba(0, 245, 255, 0.1);
    border: 1px solid rgba(0, 245, 255, 0.3);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 247, 255, 0.266), transparent);
    animation: statScan 3s infinite;
}

@keyframes statScan {
    0% { left: -100%; }
    100% { left: 100%; }
}

.stat-number {
    font-size: 2rem;
    font-weight: 900;
    color: var(--cyber-blue);
    font-family: var(--font-mono);
    text-shadow: 0 0 20px var(--cyber-blue);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.5rem;
}

/* ===== CYBER BUTTONS ===== */
.cyber-btn {
    position: relative;
    background: linear-gradient(45deg, #ff0040, #ff4060);
    border: none;
    color: white;
    padding: 16px 32px;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    border-radius: 0;
    clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 100%, 20px 100%);
    transition: all 0.3s ease;
    overflow: hidden;
}

.cyber-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 0, 64, 0.5);
}

.btn-particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
}

.holo-btn {
    position: relative;
    background: transparent;
    border: 2px solid var(--cyber-blue);
    color: var(--cyber-blue);
    padding: 16px 32px;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    border-radius: 0;
    clip-path: polygon(20px 0, 100% 0, calc(100% - 20px) 100%, 0 100%);
    transition: all 0.3s ease;
    overflow: hidden;
}

.holo-btn:hover {
    background: var(--cyber-blue);
    color: var(--bg-dark);
    box-shadow: 0 0 30px var(--cyber-blue);
}

.holo-border {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 1px solid var(--cyber-blue);
    animation: holoBorder 2s infinite;
}

@keyframes holoBorder {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ===== AI BRAIN VISUAL ENHANCED ===== */
.ai-brain-container {
    position: relative;
    width: 400px;
    height: 400px;
    margin: 0 auto;
}

.ai-brain {
    position: relative;
    width: 100%;
    height: 100%;
}

.brain-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    background: var(--accent-gradient);
    border-radius: 50%;
    animation: corePulse 3s infinite;
    box-shadow: 
        0 0 30px rgba(139, 92, 246, 0.5),
        0 0 60px rgba(139, 92, 246, 0.3),
        0 0 90px rgba(139, 92, 246, 0.1);
}

.core-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border: 2px solid var(--secondary-color);
    border-radius: 50%;
    animation: coreRipple 2s infinite;
}

@keyframes corePulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.1); }
}

@keyframes coreRipple {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(2); opacity: 0; }
}

.core-rings {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
}

.ring {
    position: absolute;
    border: 1px solid var(--secondary-color);
    border-radius: 50%;
    animation: ringRotate 10s linear infinite;
}

.ring-1 {
    width: 100%;
    height: 100%;
    animation-duration: 8s;
}

.ring-2 {
    width: 80%;
    height: 80%;
    top: 10%;
    left: 10%;
    animation-duration: 12s;
    animation-direction: reverse;
}

.ring-3 {
    width: 60%;
    height: 60%;
    top: 20%;
    left: 20%;
    animation-duration: 15s;
}

@keyframes ringRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.neural-network {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.node {
    position: absolute;
    width: 25px;
    height: 25px;
    background: var(--secondary-color);
    border-radius: 50%;
    animation: nodeFloat 4s infinite ease-in-out;
    box-shadow: 0 0 15px var(--secondary-color);
}

.node-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border: 2px solid var(--secondary-color);
    border-radius: 50%;
    animation: nodePulse 2s infinite;
}

@keyframes nodePulse {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(2); opacity: 0; }
}

.node-1 { top: 15%; left: 25%; animation-delay: 0s; }
.node-2 { top: 15%; right: 25%; animation-delay: 0.5s; }
.node-3 { bottom: 25%; left: 15%; animation-delay: 1s; }
.node-4 { bottom: 25%; right: 15%; animation-delay: 1.5s; }
.node-5 { top: 45%; left: 5%; animation-delay: 2s; }
.node-6 { top: 45%; right: 5%; animation-delay: 2.5s; }

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

.connection {
    position: absolute;
    height: 3px;
    background: linear-gradient(90deg, var(--secondary-color), transparent);
    animation: dataFlow 3s infinite;
    border-radius: 2px;
}

.data-flow {
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--secondary-color), transparent);
    animation: flowMove 2s infinite;
}

@keyframes flowMove {
    0% { left: -20px; }
    100% { left: 100%; }
}

.con-1 {
    top: 25%;
    left: 30%;
    width: 40%;
    transform: rotate(15deg);
    animation-delay: 0s;
}

.con-2 {
    top: 55%;
    left: 25%;
    width: 50%;
    transform: rotate(-20deg);
    animation-delay: 0.5s;
}

.con-3 {
    top: 40%;
    left: 20%;
    width: 35%;
    transform: rotate(45deg);
    animation-delay: 1s;
}

.con-4 {
    top: 65%;
    left: 35%;
    width: 40%;
    transform: rotate(-10deg);
    animation-delay: 1.5s;
}

.con-5 {
    top: 35%;
    right: 20%;
    width: 30%;
    transform: rotate(-45deg);
    animation-delay: 2s;
}

@keyframes dataFlow {
    0% { opacity: 0.3; }
    50% { opacity: 1; }
    100% { opacity: 0.3; }
}

/* ===== AI ORBITS ===== */
.ai-orbits {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 350px;
    height: 350px;
}

.orbit {
    position: absolute;
    border: 1px solid rgba(0, 245, 255, 0.3);
    border-radius: 50%;
    animation: orbitRotate 20s linear infinite;
}

.orbit-1 {
    width: 100%;
    height: 100%;
    animation-duration: 15s;
}

.orbit-2 {
    width: 80%;
    height: 80%;
    top: 10%;
    left: 10%;
    animation-duration: 25s;
    animation-direction: reverse;
}

.orbit-3 {
    width: 60%;
    height: 60%;
    top: 20%;
    left: 20%;
    animation-duration: 35s;
}

.orbit-dot {
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    background: var(--secondary-color);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--secondary-color);
}

@keyframes orbitRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== HOLOGRAM EFFECTS ===== */
.hologram-effect {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--secondary-color), transparent);
    animation: scanMove 3s infinite;
}

@keyframes scanMove {
    0% { top: 0; opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

.interference {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 245, 255, 0.03) 2px,
        rgba(0, 245, 255, 0.03) 4px
    );
    animation: interference 0.1s infinite;
}

@keyframes interference {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* ===== CYBER SCROLL INDICATOR ===== */
.cyber-scroll {
    position: relative;
    padding: 1rem;
    background: rgba(0, 245, 255, 0.1);
    border: 1px solid rgba(0, 245, 255, 0.3);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
}

.scroll-text {
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    color: var(--cyber-blue);
}

.scroll-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 1px solid var(--secondary-color);
    border-radius: var(--radius-lg);
    animation: scrollGlow 2s infinite;
}

@keyframes scrollGlow {
    0%, 100% { opacity: 0.5; box-shadow: 0 0 10px var(--secondary-color); }
    50% { opacity: 1; box-shadow: 0 0 20px var(--secondary-color); }
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    font-size: 0.875rem;
    animation: bounce 2s infinite;
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid var(--text-light);
    border-bottom: 2px solid var(--text-light);
    transform: rotate(45deg);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* ===== CONTAINER & SECTIONS ===== */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: var(--section-padding);
    position: relative;
    z-index: 2;
}

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

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text-primary), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== SERVICES SECTION ===== */
.services {
    background: var(--bg-secondary);
}

[data-theme="dark"] .services {
    background: var(--bg-secondary);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.service-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 2.5rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .service-card {
    background: rgba(26, 32, 44, 0.9);
}

.service-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #a9c9fa, #9be0ee, #e2daf7);
    z-index: -1;
    border-radius: calc(var(--radius-xl) + 5px);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

[data-theme="dark"] .service-card::before {
    background: linear-gradient(45deg, #410928, #0e285c, #8a37ce);
}

.service-card:hover::before {
    opacity: 1;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.service-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 1.5rem;
    position: relative;
}

.icon-web,
.icon-mobile,
.icon-ai {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    position: relative;
    overflow: hidden;
}

.icon-web {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.icon-web::before {
    content: '🌐';
}

.icon-mobile {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.icon-mobile::before {
    content: '📱';
}

.icon-ai {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.icon-ai::before {
    content: '🤖';
}

.service-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

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

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

.service-features li {
    color: var(--text-light);
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.5rem;
}

.service-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* ===== TECHNOLOGIES SECTION ===== */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.tech-category h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--text-primary);
}

.tech-logos {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.tech-logo {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    text-align: center;
    transition: all var(--transition-normal);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .tech-logo {
    background: rgba(26, 32, 44, 0.9);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.5);
}

.tech-logo:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: var(--shadow-lg);
}

[data-theme="dark"] .tech-logo {
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.5);
}

[data-theme="dark"] .tech-logo:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 14px 30px rgba(255, 255, 255, 0.9);
}

.tech-logo span {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.tech-logo p {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* ===== PORTFOLIO SECTION ===== */
.portfolio {
    background: var(--bg-secondary);
}

.portfolio-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 2px solid var(--text-light);
    color: var(--text-light);
    padding: 8px 20px;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-weight: 500;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.portfolio-item {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
}

[data-theme="dark"] .portfolio-item {
    background: rgba(26, 32, 44, 0.9);
}

.portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.portfolio-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.project-preview {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform var(--transition-slow);
}

.web-preview {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
}

.web-preview::before {
    content: '💻';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
}

.mobile-preview {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    position: relative;
}

.mobile-preview::before {
    content: '📱';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
}

.dashboard-preview {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    position: relative;
}

.dashboard-preview::before {
    content: '📊';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
}

.portfolio-item:hover .project-preview {
    transform: scale(1.1);
}

.portfolio-content {
    padding: 2rem;
}

.portfolio-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.portfolio-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.portfolio-tech {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.portfolio-tech span {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
}

/* ===== PORTFOLIO VIDEO STYLES ===== */
.portfolio-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform var(--transition-slow);
    border-radius: 0;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

.mobile-preview {
    position: relative;
    overflow: hidden;
}

.mobile-preview::before {
    display: none;
}

.portfolio-item:hover .portfolio-video {
    transform: scale(1.05);
}

/* ===== PORTFOLIO ACTIONS ===== */
.portfolio-actions {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
}

.btn-demo {
    background: var(--accent-gradient);
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    border: none;
    cursor: pointer;
    min-width: 160px;
}

.btn-demo:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.4);
    color: white;
    text-decoration: none;
}

.btn-demo .btn-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn-demo:hover .btn-glow {
    left: 100%;
}

.btn-demo span {
    position: relative;
    z-index: 2;
    font-weight: 600;
}

/* ===== PROCESS SECTION ===== */
.process-timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.process-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary-color);
    transform: translateX(-50%);
}

.timeline-item {
    display: flex;
    align-items: center;
    margin-bottom: 4rem;
    position: relative;
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-icon {
    width: 60px;
    height: 60px;
    background: var(--accent-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.25rem;
    position: relative;
    z-index: 2;
    margin: 0 2rem;
}

.timeline-content {
    flex: 1;
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    max-width: 300px;
}

.timeline-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.timeline-content p {
    color: var(--text-secondary);
    line-height: 1.6;
}

[data-theme="dark"] .timeline-content {
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
    animation: timelineGlow 3s ease-in-out infinite;
}

[data-theme="dark"] .timeline-icon {
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
    animation: timelineGlow 3s ease-in-out infinite reverse;
}

@keyframes timelineGlow {
    0%, 100% { 
        box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
    }
    50% { 
        box-shadow: 0 8px 25px rgba(255, 255, 255, 0.3);
    }
}

/* ===== CONTACT SECTION ===== */
.contact {
    background: var(--bg-secondary);
}

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

.contact-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.contact-info > p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-icon {
    font-size: 1.5rem;
    width: 50px;
    height: 50px;
    background: var(--accent-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-item h4 {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.contact-item p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* ===== WHATSAPP LINK ===== */
.whatsapp-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-normal);
    border-radius: var(--radius-md);
    padding: 0.5rem;
    margin: -0.5rem;
}

.whatsapp-link:hover {
    background: rgba(37, 211, 102, 0.1);
    transform: translateY(-2px);
}

.whatsapp-icon {
    background: linear-gradient(135deg, #25D366, #128C7E) !important;
    color: white !important;
    transition: all var(--transition-normal);
}

.whatsapp-link:hover .whatsapp-icon {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
}

.whatsapp-link h4 {
    color: #25D366;
}

.whatsapp-link:hover h4 {
    color: #128C7E;
}

/* ===== EMAIL LINK ===== */
.email-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-normal);
    border-radius: var(--radius-md);
    padding: 0.5rem;
    margin: -0.5rem;
}

.email-link:hover {
    background: rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}

.email-icon {
    background: linear-gradient(135deg, #3B82F6, #1E40AF) !important;
    color: white !important;
    transition: all var(--transition-normal);
}

.email-link:hover .email-icon {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.email-link h4 {
    color: #3B82F6;
}

.email-link:hover h4 {
    color: #1E40AF;
}

/* ===== PHONE LINK ===== */
.phone-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-normal);
    border-radius: var(--radius-md);
    padding: 0.5rem;
    margin: -0.5rem;
}

.phone-link:hover {
    background: rgba(34, 197, 94, 0.1);
    transform: translateY(-2px);
}

.phone-icon {
    background: linear-gradient(135deg, #22C55E, #16A34A) !important;
    color: white !important;
    transition: all var(--transition-normal);
}

.phone-link:hover .phone-icon {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4);
}

.phone-link h4 {
    color: #22C55E;
}

.phone-link:hover h4 {
    color: #16A34A;
}

/* ===== LOCATION ITEM ===== */
.location-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all var(--transition-normal);
    border-radius: var(--radius-md);
    padding: 0.5rem;
    margin: -0.5rem;
}

.location-item:hover {
    background: rgba(168, 85, 247, 0.1);
    transform: translateY(-2px);
}

.location-icon {
    background: linear-gradient(135deg, #A855F7, #7C3AED) !important;
    color: white !important;
    transition: all var(--transition-normal);
}

.location-item:hover .location-icon {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.4);
}

.location-item h4 {
    color: #A855F7;
}

.location-item:hover h4 {
    color: #7C3AED;
}

.contact-form {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 2.5rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

[data-theme="dark"] .contact-form {
    background: rgba(26, 32, 44, 0.9);
}

.form-group {
    position: relative;
    margin-bottom: 2rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 16px;
    border: 2px solid var(--bg-secondary);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all var(--transition-fast);
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

.form-group label {
    position: absolute;
    top: 16px;
    left: 16px;
    color: #1E40AF;
    transition: all var(--transition-fast);
    pointer-events: none;
    background: var(--bg-primary);
    padding: 0 4px;
}

[data-theme="dark"] .form-group label {
    color: #60A5FA;
}

.form-group input:focus + label,
.form-group select:focus + label,
.form-group textarea:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group select:not([value=""]) + label,
.form-group textarea:not(:placeholder-shown) + label {
    top: -8px;
    left: 12px;
    font-size: 0.75rem;
    color: #1E40AF;
}

[data-theme="dark"] .form-group input:focus + label,
[data-theme="dark"] .form-group select:focus + label,
[data-theme="dark"] .form-group textarea:focus + label,
[data-theme="dark"] .form-group input:not(:placeholder-shown) + label,
[data-theme="dark"] .form-group select:not([value=""]) + label,
[data-theme="dark"] .form-group textarea:not(:placeholder-shown) + label {
    color: #60A5FA;
}

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

/* ===== FOOTER ===== */
.footer {
    background: var(--bg-dark);
    color: var(--text-light);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-brand .logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 1rem;
    display: block;
}

.footer-brand p {
    line-height: 1.6;
    margin-bottom: 1rem;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.footer-column h4 {
    color: white;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 0.5rem;
}

.footer-column a {
    color: var(--text-light);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-column a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
}

/* ===== CHATBOT ===== */
.chatbot {
    position: fixed;
    bottom: 16px;
    right: 16px;
    z-index: 998; /* Lower than language selector */
}

.chatbot-toggle {
    width: 60px;
    height: 60px;
    background: var(--accent-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-normal);
}

.chatbot-toggle:hover {
    transform: scale(1.1);
}

.chatbot-icon {
    font-size: 1.5rem;
}

.chatbot-window {
    position: absolute;
    bottom: 64px;
    right: 0;
    width: 400px;
    height: 564px;
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.chatbot-window.active {
    display: flex;
}

.chatbot-header {
    background: var(--accent-gradient);
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-header h4 {
    margin: 0;
    font-weight: 600;
}

.chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--transition-fast);
}

.chatbot-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.chatbot-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-lg);
    max-width: 90%;
    word-wrap: break-word;
}

.bot-message {
    background: var(--bg-secondary);
    color: var(--text-primary);
    align-self: flex-start;
    font-size: 13px;
}

.user-message {
    background: var(--primary-color);
    color: white;
    align-self: flex-end;
    font-size: 13px;
}

.chatbot-input {
    padding: 1rem;
    border-top: 1px solid var(--bg-secondary);
    display: flex;
    gap: 0.5rem;
}

.chatbot-input input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--bg-secondary);
    border-radius: var(--radius-md);
    outline: none;
    font-size: 0.875rem;
}

.chatbot-input input:focus {
    border-color: var(--primary-color);
}

.chatbot-input button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.875rem;
    transition: background-color var(--transition-fast);
}

.chatbot-input button:hover {
    background: var(--accent-color);
}

/* ===== CHATBOT TYPING INDICATOR ===== */
.typing-indicator {
    opacity: 0.7;
    font-style: italic;
    animation: typingPulse 1.5s infinite;
}

@keyframes typingPulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* ===== LANGUAGE SELECTOR ===== */
.language-selector {
    position: fixed;
    bottom: 16px;
    left: 80px;
    z-index: 1002; /* Higher than other floating elements */
    animation: slideInFromLeft 0.3s ease-out;
    display: block !important; /* Force visibility */
    visibility: visible !important; /* Force visibility */
}

.current-language {
    background: var(--bg-primary);
    border: 2px solid var(--bg-secondary);
    border-radius: 25px;
    padding: 8px 16px;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 80px;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.current-language:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    border-color: var(--primary-color);
}

.language-dropdown {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border: 2px solid var(--bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-normal);
    margin-bottom: 8px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.language-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-option {
    padding: 12px 16px;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid var(--bg-secondary);
    min-height: 44px; /* Touch-friendly size */
}

.language-option:last-child {
    border-bottom: none;
}

.language-option:hover {
    background: var(--bg-secondary);
    color: var(--primary-color);
    transform: translateX(4px);
}

[data-theme="dark"] .language-selector .current-language {
    background: rgba(26, 32, 44, 0.9);
    border-color: var(--bg-dark);
    color: var(--text-primary);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .language-dropdown {
    background: rgba(26, 32, 44, 0.9);
    border-color: var(--bg-dark);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .language-option {
    color: var(--text-secondary);
    border-color: var(--bg-dark);
}

[data-theme="dark"] .language-option:hover {
    background: var(--bg-dark);
    color: var(--primary-color);
}

/* Slide in animation */
@keyframes slideInFromLeft {
    0% {
        opacity: 0;
        transform: translateX(-20px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== THEME TOGGLE ===== */
.theme-toggle {
    position: fixed;
    bottom: 16px;
    left: 16px;
    width: 50px;
    height: 50px;
    background: var(--bg-primary);
    border: 2px solid var(--bg-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    z-index: 999; /* Lower than language selector */
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-lg);
}

.theme-icon {
    font-size: 1.25rem;
    transition: transform var(--transition-normal);
}

[data-theme="dark"] .theme-icon {
    transform: rotate(180deg);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .ai-brain {
        width: 250px;
        height: 250px;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .timeline-item {
        flex-direction: column !important;
        text-align: center;
    }
    
    .timeline-content {
        max-width: 100%;
        margin-top: 1rem;
    }
    
    .process-timeline::before {
        display: none;
    }
}

/* ===== CRITICAL FIX FOR HORIZONTAL SCROLL ===== */
@media (max-width: 770px) {
    /* Prevent horizontal overflow */
    html, body {
        overflow-x: hidden;
        max-width: 100vw;
    }
    
    /* Ensure all containers respect viewport width */
    * {
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Fix navigation container */
    .nav-container {
        width: 100%;
        max-width: 100vw;
        padding: 0 1rem;
        box-sizing: border-box;
    }
    
    /* Ensure hamburger is always visible */
    .hamburger {
        display: flex;
        position: relative;
        z-index: 1001;
        margin-left: auto;
    }
    
    /* Hide CTA button on smaller screens */
    .nav-cta {
        display: none;
    }
    
    /* Fix hero content overflow */
    .hero-content {
        width: 100%;
        max-width: 100vw;
        padding: 0 1rem;
        box-sizing: border-box;
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    /* Constrain AI brain visual */
    .hero-visual {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
        display: flex;
        justify-content: center;
    }
    
    .ai-brain-container {
        max-width: calc(100vw - 2rem);
        width: 300px;
        height: 300px;
    }
    
    /* Fix service cards overflow */
    .services-grid {
        grid-template-columns: 1fr;
        width: 100%;
        max-width: 100%;
    }
    
    .service-card {
        width: 100%;
        max-width: 100%;
        margin: 0;
        box-sizing: border-box;
    }
    
    /* Fix tech grid overflow */
    .tech-grid {
        grid-template-columns: 1fr;
        width: 100%;
        max-width: 100%;
    }
    
    .tech-logos {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        width: 100%;
        max-width: 100%;
    }
    
    /* Fix portfolio overflow */
    .portfolio-grid {
        grid-template-columns: 1fr;
        width: 100%;
        max-width: 100%;
    }
    
    .portfolio-item {
        width: 100%;
        max-width: 100%;
        margin: 0;
        box-sizing: border-box;
    }
    
    /* Fix contact form overflow */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        width: 100%;
        max-width: 100%;
    }
    
    .contact-form {
        width: 100%;
        max-width: 100%;
        margin: 0;
        box-sizing: border-box;
    }
    
    /* Fix footer overflow */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        width: 100%;
        max-width: 100%;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
        width: 100%;
        max-width: 100%;
    }
    
    /* Ensure particles don't cause overflow */
    .global-particles {
        width: 100vw;
        max-width: 100vw;
        overflow: hidden;
    }
    
    /* Fix matrix rain overflow */
    .matrix-rain {
        width: 100%;
        max-width: 100vw;
        overflow: hidden;
    }
    
    /* Fix holographic grid overflow */
    .holographic-grid {
        width: 100%;
        max-width: 100vw;
        overflow: hidden;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 80px;
        flex-direction: column;
        background: var(--bg-primary);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-lg);
        padding: 2rem 0;
        z-index: 1000;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
    
    .nav-cta {
        display: none;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        max-width: 300px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .tech-grid {
        grid-template-columns: 1fr;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
    }
    
    .theme-toggle {
        left: 1rem;
    }
}

@media (max-width: 700px) {
    .chatbot-window {
        width: calc(100vw - 2rem);
        max-width: 350px;
        right: 1rem;
        left: auto;
        bottom: 80px;
    }
    
    .chatbot {
        right: 1rem;
    }
}

@media (max-width: 480px) {
    /* ===== GLOBAL ADJUSTMENTS ===== */
    html {
        font-size: 14px;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    section {
        padding: 60px 0;
    }
    
    /* ===== NAVIGATION ===== */
    .nav-container {
        padding: 0 1rem;
        height: 70px;
    }
    
    .nav-logo .logo-text {
        font-size: 1.25rem;
    }
    
    .nav-menu {
        top: 70px;
        padding: 1.5rem 0;
    }
    
    .nav-menu .nav-link {
        font-size: 1.1rem;
        padding: 0.75rem 0;
    }
    
    .hamburger {
        width: 22px;
    }
    
    .bar {
        width: 22px;
        height: 2px;
    }
    
    /* ===== HERO SECTION ===== */
    .hero {
        min-height: 90vh;
        padding-top: 70px;
    }
    
    .hero-content {
        gap: 2rem;
        padding: 0 1rem;
    }
    
    .hero-title {
        font-size: 1.75rem;
        line-height: 1.2;
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
        line-height: 1.5;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
        margin: 1.5rem 0;
    }
    
    .stat-item {
        padding: 0.75rem;
        min-width: 120px;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    .hero-buttons {
        gap: 0.75rem;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 14px 24px;
        font-size: 0.9rem;
        width: 100%;
        max-width: 280px;
    }
    
    /* ===== AI BRAIN VISUAL ===== */
    .ai-brain-container {
        width: 280px;
        height: 280px;
    }
    
    .ai-brain {
        width: 100%;
        height: 100%;
    }
    
    .brain-core {
        width: 70px;
        height: 70px;
    }
    
    .core-rings {
        width: 160px;
        height: 160px;
    }
    
    .node {
        width: 18px;
        height: 18px;
    }
    
    .ai-orbits {
        width: 250px;
        height: 250px;
    }
    
    /* ===== SCROLL INDICATOR ===== */
    .scroll-indicator {
        bottom: 1rem;
        font-size: 0.75rem;
    }
    
    .scroll-arrow {
        width: 16px;
        height: 16px;
    }
    
    /* ===== SECTION HEADERS ===== */
    .section-header {
        margin-bottom: 2.5rem;
    }
    
    .section-title {
        font-size: 1.75rem;
        margin-bottom: 0.75rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
        line-height: 1.5;
    }
    
    /* ===== SERVICES SECTION ===== */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .service-card {
        padding: 1.5rem;
        margin: 0 0.5rem;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 1rem;
    }
    
    .icon-web,
    .icon-mobile,
    .icon-ai {
        font-size: 1.5rem;
    }
    
    .service-card h3 {
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
    }
    
    .service-card p {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
    
    .service-features li {
        font-size: 0.85rem;
        margin-bottom: 0.4rem;
    }
    
    /* ===== TECHNOLOGIES SECTION ===== */
    .tech-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .tech-category h3 {
        font-size: 1.25rem;
        margin-bottom: 1.5rem;
    }
    
    .tech-logos {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .tech-logo {
        padding: 1rem;
    }
    
    .tech-logo span {
        font-size: 1.5rem;
        margin-bottom: 0.4rem;
    }
    
    .tech-logo p {
        font-size: 0.8rem;
    }
    
    /* ===== PORTFOLIO SECTION ===== */
    .portfolio-filters {
        gap: 0.5rem;
        margin-bottom: 2rem;
        justify-content: center;
    }
    
    .filter-btn {
        padding: 6px 16px;
        font-size: 0.85rem;
        border-radius: 20px;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .portfolio-item {
        margin: 0 0.5rem;
    }
    
    .portfolio-image {
        height: 160px;
    }
    
    .portfolio-content {
        padding: 1.5rem;
    }
    
    .portfolio-content h3 {
        font-size: 1.1rem;
        margin-bottom: 0.4rem;
    }
    
    .portfolio-content p {
        font-size: 0.85rem;
        margin-bottom: 0.75rem;
    }
    
    .portfolio-tech {
        gap: 0.4rem;
    }
    
    .portfolio-tech span {
        padding: 3px 8px;
        font-size: 0.7rem;
    }
    
    /* ===== PROCESS SECTION ===== */
    .process-timeline {
        max-width: 100%;
    }
    
    .timeline-item {
        flex-direction: column !important;
        text-align: center;
        margin-bottom: 2.5rem;
    }
    
    .timeline-icon {
        width: 50px;
        height: 50px;
        font-size: 1.1rem;
        margin: 0 0 1rem 0;
    }
    
    .timeline-content {
        max-width: 100%;
        margin: 0;
        padding: 1.5rem;
    }
    
    .timeline-content h3 {
        font-size: 1.1rem;
        margin-bottom: 0.4rem;
    }
    
    .timeline-content p {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    /* ===== CONTACT SECTION ===== */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-info h3 {
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
    }
    
    .contact-info > p {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }
    
    .contact-item {
        margin-bottom: 1rem;
    }
    
    .contact-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .contact-item h4 {
        font-size: 0.95rem;
    }
    
    .contact-item p {
        font-size: 0.8rem;
    }
    
    .contact-form {
        padding: 1.5rem;
        margin: 0 0.5rem;
    }
    
    .form-group {
        margin-bottom: 1.5rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 14px;
        font-size: 0.9rem;
    }
    
    .form-group label {
        font-size: 0.85rem;
        top: 14px;
        left: 14px;
    }
    
    .form-group input:focus + label,
    .form-group select:focus + label,
    .form-group textarea:focus + label,
    .form-group input:not(:placeholder-shown) + label,
    .form-group select:not([value=""]) + label,
    .form-group textarea:not(:placeholder-shown) + label {
        font-size: 0.7rem;
        top: -6px;
        left: 10px;
    }
    
    .form-group textarea {
        min-height: 100px;
    }
    
    .contact-form .btn-primary {
        width: 100%;
        padding: 16px;
        font-size: 1rem;
    }
    
    /* ===== FOOTER ===== */
    .footer {
        padding: 2rem 0 1rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .footer-brand .logo-text {
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
    }
    
    .footer-brand p {
        font-size: 0.9rem;
        margin-bottom: 0.75rem;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .footer-column h4 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }
    
    .footer-column li {
        margin-bottom: 0.4rem;
    }
    
    .footer-column a {
        font-size: 0.85rem;
    }
    
    .footer-bottom {
        padding-top: 1.5rem;
        font-size: 0.8rem;
    }
    
    /* ===== CHATBOT ===== */
    .chatbot {
        bottom: 1rem;
        right: 1rem;
    }
    
    .chatbot-toggle {
        width: 50px;
        height: 50px;
    }
    
    .chatbot-icon {
        font-size: 1.25rem;
    }
    
    .chatbot-window {
        width: calc(100vw - 2rem);
        max-width: 320px;
        height: 400px;
        bottom: 60px;
        right: 0;
    }
    
    .chatbot-header {
        padding: 0.75rem;
    }
    
    .chatbot-header h4 {
        font-size: 0.9rem;
    }
    
    .chatbot-close {
        width: 25px;
        height: 25px;
        font-size: 1.25rem;
    }
    
    .chatbot-messages {
        padding: 0.75rem;
        gap: 0.75rem;
    }
    
    .message {
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
        max-width: 95%;
    }
    
    .chatbot-input {
        padding: 0.75rem;
        gap: 0.4rem;
    }
    
    .chatbot-input input {
        padding: 0.6rem;
        font-size: 0.8rem;
    }
    
    .chatbot-input button {
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
    }
    
    /* ===== LANGUAGE SELECTOR ===== */
    .language-selector {
        bottom: 1rem;
        left: 4rem;
    }
    
    .current-language {
        padding: 6px 12px;
        font-size: 0.8rem;
        min-width: 70px;
    }
    
    .language-dropdown {
        margin-bottom: 0.25rem;
    }
    
    .language-option {
        padding: 10px 12px;
        font-size: 0.8rem;
    }
    
    /* ===== THEME TOGGLE ===== */
    .theme-toggle {
        bottom: 1rem;
        left: 1rem;
        width: 45px;
        height: 45px;
    }
    
    .theme-icon {
        font-size: 1.1rem;
    }
    
    /* ===== CYBER EFFECTS ADJUSTMENTS ===== */
    .cyber-text {
        letter-spacing: 1px;
    }
    
    .glitch {
        font-size: 1.75rem;
    }
    
    .cyber-btn,
    .holo-btn {
        padding: 14px 24px;
        font-size: 0.85rem;
        letter-spacing: 1px;
    }
    
    /* ===== UTILITY CLASSES FOR MOBILE ===== */
    .mobile-hidden {
        display: none !important;
    }
    
    .mobile-center {
        text-align: center !important;
    }
    
    .mobile-full-width {
        width: 100% !important;
    }
    
    /* ===== TOUCH IMPROVEMENTS ===== */
    .nav-link,
    .filter-btn,
    .btn-primary,
    .btn-secondary,
    .contact-icon {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* ===== OVERFLOW FIXES ===== */
    .hero-visual {
        overflow: hidden;
        display: flex;
        justify-content: center;
    }
    
    .services-grid,
    .portfolio-grid {
        overflow: hidden;
    }
    
    /* ===== SPACING ADJUSTMENTS ===== */
    .hero-stats .stat-item:not(:last-child) {
        margin-bottom: 0.5rem;
    }
    
    .service-features li:last-child {
        margin-bottom: 0;
    }
    
    .portfolio-tech span:last-child {
        margin-right: 0;
    }
}

/* ===== MOBILE DEVICE SPECIFIC MEDIA QUERIES ===== */

/* iPhone SE and similar small devices */
@media (max-width: 375px) and (max-height: 667px) {
    .language-selector {
        bottom: max(16px, env(safe-area-inset-bottom));
        left: 64px;
    }
    
    .theme-toggle {
        bottom: max(16px, env(safe-area-inset-bottom));
        left: 12px;
    }
    
    .chatbot {
        bottom: max(16px, env(safe-area-inset-bottom));
        right: 12px;
    }
}

/* iPhone 12/13/14 and similar devices with notch */
@media (max-width: 390px) and (max-height: 844px) {
    .language-selector {
        bottom: max(16px, env(safe-area-inset-bottom));
        left: 68px;
    }
    
    .theme-toggle {
        bottom: max(16px, env(safe-area-inset-bottom));
        left: 12px;
    }
    
    .chatbot {
        bottom: max(16px, env(safe-area-inset-bottom));
        right: 12px;
    }
}

/* iPhone 12/13/14 Pro Max and similar large devices */
@media (max-width: 428px) and (max-height: 926px) {
    .language-selector {
        bottom: max(16px, env(safe-area-inset-bottom));
        left: 72px;
    }
    
    .theme-toggle {
        bottom: max(16px, env(safe-area-inset-bottom));
        left: 12px;
    }
    
    .chatbot {
        bottom: max(16px, env(safe-area-inset-bottom));
        right: 12px;
    }
}

/* Landscape orientation for mobile devices */
@media (max-height: 500px) and (orientation: landscape) {
    .language-selector {
        bottom: 8px;
        left: 60px;
        z-index: 1002; /* Even higher in landscape */
    }
    
    .theme-toggle {
        bottom: 8px;
        left: 8px;
    }
    
    .chatbot {
        bottom: 8px;
        right: 8px;
    }
    
    .current-language {
        padding: 4px 8px;
        font-size: 0.75rem;
        min-width: 60px;
    }
    
    .theme-toggle {
        width: 40px;
        height: 40px;
    }
    
    .chatbot-toggle {
        width: 40px;
        height: 40px;
    }
}

/* Android devices with software navigation */
@media (max-width: 412px) and (max-height: 915px) {
    .language-selector {
        bottom: 20px; /* Extra space for Android nav */
        left: 70px;
    }
    
    .theme-toggle {
        bottom: 20px;
        left: 12px;
    }
    
    .chatbot {
        bottom: 20px;
        right: 12px;
    }
}

/* Very small devices (older Android phones) */
@media (max-width: 320px) {
    .language-selector {
        bottom: 12px;
        left: 52px;
    }
    
    .current-language {
        padding: 4px 8px;
        font-size: 0.7rem;
        min-width: 50px;
    }
    
    .theme-toggle {
        bottom: 12px;
        left: 8px;
        width: 40px;
        height: 40px;
    }
    
    .chatbot {
        bottom: 12px;
        right: 8px;
    }
    
    .chatbot-toggle {
        width: 40px;
        height: 40px;
    }
}

/* ===== EXTRA SMALL SCREENS (< 360px) ===== */
@media (max-width: 360px) {
    html {
        font-size: 13px;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .ai-brain-container {
        width: 240px;
        height: 240px;
    }
    
    .brain-core {
        width: 60px;
        height: 60px;
    }
    
    .service-card,
    .contact-form {
        margin: 0;
        padding: 1.25rem;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 12px 20px;
        font-size: 0.85rem;
    }
    
    .chatbot-window {
        width: calc(100vw - 1rem);
        right: 0.5rem;
    }
    
    /* Ensure language selector is visible on very small screens */
    .language-selector {
        bottom: 12px;
        left: 48px;
    }
    
    .current-language {
        padding: 4px 8px;
        font-size: 0.7rem;
        min-width: 45px;
    }
}

/* ===== FALLBACK FOR DEVICES WITHOUT SAFE-AREA SUPPORT ===== */
@supports not (padding: max(0px)) {
    @media (max-width: 768px) {
        .language-selector {
            bottom: 20px; /* Extra padding for devices without safe-area */
        }
        
        .theme-toggle {
            bottom: 20px;
        }
        
        .chatbot {
            bottom: 20px;
        }
    }
}

/* ===== HIGH DPI DISPLAYS ===== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .language-selector .current-language {
        border-width: 0.5px; /* Thinner borders on high DPI */
    }
    
    .theme-toggle {
        border-width: 0.5px;
    }
}

/* ===== TOUCH DEVICE OPTIMIZATIONS ===== */
@media (pointer: coarse) {
    .language-selector .current-language {
        min-height: 44px; /* Apple's recommended touch target size */
        min-width: 44px;
    }
    
    .language-option {
        min-height: 48px; /* Slightly larger for dropdown */
        padding: 12px 16px;
    }
    
    .theme-toggle {
        min-height: 44px;
        min-width: 44px;
    }
    
    .chatbot-toggle {
        min-height: 44px;
        min-width: 44px;
    }
}

/* ===== ANIMATIONS & UTILITIES ===== */
.fade-in {
    opacity: 0;
    animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.slide-up {
    transform: translateY(30px);
    opacity: 0;
    animation: slideUp 0.6s ease forwards;
}

@keyframes slideUp {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.scale-in {
    transform: scale(0.8);
    opacity: 0;
    animation: scaleIn 0.6s ease forwards;
}

@keyframes scaleIn {
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===== PRINT STYLES ===== */
@media print {
    .navbar,
    .chatbot,
    .theme-toggle,
    .scroll-progress {
        display: none !important;
    }
    
    .hero {
        min-height: auto;
        padding: 2rem 0;
    }
    
    .hero-background {
        display: none;
    }
    
    * {
        color: black !important;
        background: white !important;
    }
}
