/* ===============================================
   PIXELFORGE AGENCY - MODERN THEME 2.0
   Cool, Vibrant, and Interactive Design
   =============================================== */

/* Custom CSS Variables for the New Theme */
:root {
    /* Primary Color Palette */
    --primary-purple: #6366f1;
    --primary-cyan: #06b6d4;
    --primary-pink: #ec4899;
    --primary-orange: #f97316;
    
    /* Gradient Combinations */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    --gradient-secondary: linear-gradient(135deg, #06b6d4 0%, #3b82f6 50%, #6366f1 100%);
    --gradient-accent: linear-gradient(135deg, #f97316 0%, #ec4899 50%, #8b5cf6 100%);
    --gradient-cool: linear-gradient(135deg, #10b981 0%, #06b6d4 50%, #3b82f6 100%);
    
    /* Background Colors */
    --bg-primary: #0f0f23;
    --bg-secondary: #1a1a2e;
    --bg-tertiary: #16213e;
    --bg-card: rgba(26, 26, 46, 0.8);
    --bg-glass: rgba(255, 255, 255, 0.05);
    
    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-accent: #06b6d4;
    --text-muted: #64748b;
    
    /* Glass Effects */
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: rgba(0, 0, 0, 0.3);
    
    /* Animation Timings */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Poppins', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gradient-accent);
}

/* ===============================================
   MODERN LOGO DESIGN
   =============================================== */
.logo {
    font-size: 32px;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    font-family: 'Space Grotesk', 'Poppins', sans-serif;
    position: relative;
    transition: var(--transition-medium);
    letter-spacing: -0.5px;
}

.logo::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -10px;
    right: -10px;
    bottom: -5px;
    background: var(--gradient-primary);
    border-radius: 12px;
    opacity: 0;
    filter: blur(15px);
    transition: var(--transition-medium);
    z-index: -1;
}

.logo:hover::before {
    opacity: 0.3;
}

.logo span {
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 400;
}

/* ===============================================
   MODERN NAVIGATION
   =============================================== */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 20px 0;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(15, 15, 35, 0.85);
    border-bottom: 1px solid var(--glass-border);
    transition: var(--transition-medium);
}

nav.scrolled {
    padding: 15px 0;
    background: rgba(15, 15, 35, 0.95);
    box-shadow: 0 10px 30px var(--glass-shadow);
}

.nav-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    position: relative;
    padding: 10px 16px;
    border-radius: 12px;
    transition: var(--transition-medium);
    background: transparent;
    backdrop-filter: blur(10px);
}

.nav-links a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    border-radius: 12px;
    opacity: 0;
    transition: var(--transition-medium);
    z-index: -1;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition-medium);
    transform: translateX(-50%);
}

.nav-links a:hover {
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.nav-links a:hover::before {
    opacity: 0.1;
}

.nav-links a:hover::after {
    width: 80%;
}

/* Mobile Menu Button */
.menu-button {
    display: none;
    background: var(--bg-glass);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    font-size: 24px;
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: var(--transition-medium);
}

.menu-button:hover {
    background: var(--gradient-primary);
    transform: scale(1.05);
}

/* ===============================================
   ENHANCED HERO SECTION
   =============================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 0 20px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(236, 72, 153, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(6, 182, 212, 0.3) 0%, transparent 50%);
    animation: backgroundShift 20s ease-in-out infinite;
}

@keyframes backgroundShift {
    0%, 100% { transform: scale(1) rotate(0deg); }
    33% { transform: scale(1.1) rotate(1deg); }
    66% { transform: scale(0.9) rotate(-1deg); }
}

.hero-content {
    text-align: center;
    max-width: 900px;
    position: relative;
    z-index: 2;
    animation: heroFloat 6s ease-in-out infinite;
}

@keyframes heroFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.agency-name {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 900;
    margin-bottom: 1rem;
    position: relative;
}

.agency-name {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 50px rgba(99, 102, 241, 0.5);
    animation: textGlow 3s ease-in-out infinite alternate;
}

@keyframes textGlow {
    from { filter: brightness(1); }
    to { filter: brightness(1.2); }
}

.agency-name span {
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 300;
    position: relative;
}

/* Typing Effect Styles */
.typing-container {
    margin: 2rem 0;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.typed-text {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 600;
    background: var(--gradient-cool);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cursor {
    display: inline-block;
    width: 3px;
    height: 2.5rem;
    background: var(--primary-cyan);
    margin-left: 5px;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    color: var(--text-secondary);
    margin-bottom: 3rem;
    line-height: 1.8;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.highlight {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

/* ===============================================
   MODERN CTA BUTTONS
   =============================================== */
.cta-button {
    display: inline-block;
    padding: 16px 32px;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 16px;
    position: relative;
    margin: 10px;
    transition: var(--transition-medium);
    backdrop-filter: blur(10px);
    border: 2px solid transparent;
    background: var(--bg-glass);
    color: var(--text-primary);
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition-medium);
    z-index: -1;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.4);
    border-color: rgba(99, 102, 241, 0.5);
}

.cta-button:hover::before {
    opacity: 1;
}

.cta-button.special {
    background: var(--gradient-primary);
    color: var(--text-primary);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.cta-button.special::before {
    background: var(--gradient-accent);
}

.cta-button.special:hover {
    box-shadow: 0 20px 50px rgba(236, 72, 153, 0.4);
}

/* ===============================================
   TECH STACK SECTION
   =============================================== */
.tech-stack {
    padding: 100px 0;
    position: relative;
    background: linear-gradient(135deg, rgba(15, 15, 35, 0.9) 0%, rgba(26, 26, 46, 0.9) 100%);
}

.tech-slider {
    overflow: hidden;
    position: relative;
    margin: 50px 0;
}

.tech-track {
    display: flex;
    animation: scroll 30s linear infinite;
    gap: 30px;
}

.tech-item {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 20px 30px;
    white-space: nowrap;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    overflow: hidden;
    transition: var(--transition-medium);
    min-width: 200px;
}

.tech-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0.1;
    transition: var(--transition-medium);
}

.tech-item:hover {
    transform: translateY(-5px);
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 15px 30px rgba(99, 102, 241, 0.2);
}

.tech-item:hover::before {
    left: 0;
}

.tech-item i {
    font-size: 24px;
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ===============================================
   SECTION TITLES
   =============================================== */
.section-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    text-align: center;
    margin-bottom: 20px;
    position: relative;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    width: 100px;
    height: 4px;
    background: var(--gradient-primary);
    transform: translateX(-50%);
    border-radius: 2px;
}

/* ===============================================
   CONTAINER AND LAYOUT
   =============================================== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

/* ===============================================
   PARTICLES AND BACKGROUND EFFECTS
   =============================================== */
#particles-js {
    position: absolute;
    width: 100%;
    height: 100vh;
    top: 0;
    left: 0;
    z-index: 1;
}

.background-svg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.3;
}

.svg-blob {
    position: absolute;
    width: 400px;
    height: 400px;
    animation: blobFloat 20s ease-in-out infinite;
}

.svg-blob:nth-child(1) {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.svg-blob:nth-child(2) {
    bottom: 10%;
    right: 10%;
    animation-delay: 10s;
}

@keyframes blobFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(120deg); }
    66% { transform: translate(-20px, 20px) rotate(240deg); }
}

/* ===============================================
   MODERN GLASS MORPHISM CARDS
   =============================================== */
.glass-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* ===============================================
   ANIMATED GRADIENT BORDERS
   =============================================== */
.gradient-border {
    position: relative;
    background: var(--bg-card);
    border-radius: 16px;
}

.gradient-border::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--gradient-primary);
    border-radius: 16px;
    z-index: -1;
    opacity: 0.6;
    animation: gradientRotate 4s linear infinite;
}

@keyframes gradientRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===============================================
   RESPONSIVE DESIGN
   =============================================== */
@media (max-width: 1024px) {
    .nav-content {
        padding: 0 20px;
    }
    
    .container {
        padding: 0 20px;
    }
    
    .project-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .menu-button {
        display: block;
    }
    
    .nav-links {
        position: fixed;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(15, 15, 35, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 30px;
        gap: 20px;
        border-top: 1px solid var(--glass-border);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition-medium);
    }
    
    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-links a {
        width: 100%;
        text-align: center;
        padding: 15px;
    }
    
    .hero-content {
        padding: 0 20px;
    }
    
    .cta-button {
        display: block;
        margin: 10px auto;
        text-align: center;
        max-width: 300px;
    }
    
    .project-grid {
        grid-template-columns: 1fr;
    }
    
    .tech-stack {
        padding: 50px 0;
    }
    
    .featured-projects {
        padding: 50px 0;
    }
}

@media (max-width: 480px) {
    .nav-content {
        padding: 0 15px;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .logo {
        font-size: 24px;
    }
    
    .agency-name {
        font-size: 2.5rem;
    }
    
    .typed-text {
        font-size: 1.5rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .cta-button {
        padding: 14px 24px;
        font-size: 16px;
    }
}

/* ===============================================
   UTILITY CLASSES
   =============================================== */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: var(--transition-slow);
}

.reveal-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glow-effect {
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.3);
}

/* ===============================================
   LOADING ANIMATIONS
   =============================================== */
.loading-shimmer {
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(255, 255, 255, 0.2) 50%, 
        rgba(255, 255, 255, 0.1) 100%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ===============================================
   PERFORMANCE OPTIMIZATIONS
   =============================================== */
.gpu-accelerated {
    transform: translateZ(0);
    will-change: transform;
}

.no-select {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}