/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* CSS Variables for consistent theming */
:root {
    --primary-purple: #8B5FBF;
    --dark-purple: #6A4C93;
    --light-purple: #A878D8;
    --accent-purple: #B794F6;
    --bg-dark: #1A1B23;
    --bg-light: #F8FAFC;
    --text-dark: #2D3748;
    --text-light: #E2E8F0;
    --text-muted: #718096;
    --gradient-primary: linear-gradient(135deg, #8B5FBF 0%, #6A4C93 100%);
    --gradient-secondary: linear-gradient(135deg, #A878D8 0%, #B794F6 100%);
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-medium: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-large: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* General Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-light);
    overflow-x: hidden;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#loading-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loader {
    text-align: center;
    color: white;
}

.loader h3 {
    margin-top: 2rem;
    font-weight: 300;
}

.loader-brain {
    width: 80px;
    height: 80px;
    margin: 0 auto 2rem;
    position: relative;
}

.neural-network {
    width: 100%;
    height: 100%;
    position: relative;
}

.node {
    width: 12px;
    height: 12px;
    background: var(--primary-purple);
    border-radius: 50%;
    position: absolute;
    animation: pulse 2s ease-in-out infinite;
}

.node:nth-child(1) { top: 10px; left: 10px; animation-delay: 0s; }
.node:nth-child(2) { top: 10px; right: 10px; animation-delay: 0.5s; }
.node:nth-child(3) { bottom: 10px; left: 50%; transform: translateX(-50%); animation-delay: 1s; }

.connection {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-purple), transparent);
    animation: connectionPulse 2s ease-in-out infinite;
}

.connection:nth-child(4) {
    top: 16px;
    left: 22px;
    width: 36px;
    animation-delay: 0.25s;
}

.connection:nth-child(5) {
    top: 40px;
    left: 16px;
    width: 30px;
    transform: rotate(45deg);
    animation-delay: 0.75s;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.2); opacity: 1; }
}

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

/* Custom Cursor */
#custom-cursor {
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    mix-blend-mode: difference;
}

.cursor-dot {
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    position: fixed;
    transform: translate(-50%, -50%);
    transition: none;
    pointer-events: none;
    z-index: 9999;
}

.cursor-ring {
    width: 30px;
    height: 30px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    position: fixed;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 9998;
}

.cursor-ring.active {
    transform: scale(1.5);
    border-color: var(--primary-purple);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(26, 27, 35, 0.95);
    backdrop-filter: blur(20px);
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
    transform: translateY(-100%);
}

.navbar.show {
    transform: translateY(0);
}

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

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.brand-icon {
    font-size: 2rem;
}

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

.nav-menu a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-purple);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-purple);
    transition: width 0.3s ease;
}

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

/* Global transitions for smooth interactions */
h1, h2, h3, .hero-subtitle {
    transition: opacity 0.3s ease;
}

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

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: white;
    transition: all 0.3s ease;
}

/* Hero Section */
#hero {
    background: var(--gradient-primary);
    color: white;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%23ffffff" fill-opacity="0.1"><circle cx="30" cy="30" r="1"/></g></svg>') repeat;
    animation: float 20s ease-in-out infinite;
}

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

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
}

.floating-shapes {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: floatShape 20s ease-in-out infinite;
}

.shape-1 {
    width: 200px;
    height: 200px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 150px;
    height: 150px;
    top: 60%;
    right: 15%;
    animation-delay: 5s;
}

.shape-3 {
    width: 100px;
    height: 100px;
    bottom: 20%;
    left: 70%;
    animation-delay: 10s;
}

@keyframes floatShape {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(120deg); }
    66% { transform: translate(-20px, 20px) rotate(240deg); }
}

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

.hero-badge {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    margin-bottom: 2rem;
    display: inline-block;
    animation: fadeInUp 1s ease-out 0.3s backwards;
}

#hero h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.5s forwards;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

#hero p,
.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeInUp 1s ease-out 1s forwards;
    max-width: 600px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin: 3rem 0;
    opacity: 0;
    animation: fadeInUp 1s ease-out 1.2s forwards;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-purple);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.cta-button {
    position: relative;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cta-button.primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-medium);
}

.cta-button.secondary {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
}

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

.button-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    animation: fadeInUp 1s ease-out 2s forwards;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    width: 200px;
    margin-left: -100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.scroll-indicator span {
    display: block;
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.7);
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
    animation: bounce 2s infinite;
    margin: 0 auto;
}

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

/* Statistics Section */
.stats-section {
    background: var(--bg-dark);
    padding: 80px 0;
    margin-top: -50px;
    position: relative;
    z-index: 2;
}

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

.stat-card {
    text-align: center;
    color: white;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.1);
}

.stat-card .stat-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.stat-card h3 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-purple);
    margin-bottom: 0.5rem;
}

.stat-card p {
    font-size: 1rem;
    opacity: 0.8;
}

/* Section Styles */
section {
    padding: 80px 20px;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

section.animate {
    opacity: 1;
    transform: translateY(0);
}

section h2 {
    font-size: 3rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 3rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* About Section */
#about {
    background: white;
    border-radius: 20px;
    margin: 50px auto;
    box-shadow: var(--shadow-soft);
    padding: 80px 40px;
    text-align: center;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: left;
}

.about-text p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.about-intro .lead {
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--primary-purple);
    margin-bottom: 1.5rem;
}

.credentials {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--primary-purple);
}

.credentials h4 {
    color: var(--primary-purple);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.cert-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.cert-badge {
    background: var(--gradient-secondary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.skill-item {
    text-align: center;
    padding: 2rem;
    background: var(--gradient-secondary);
    border-radius: 20px;
    color: white;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-soft);
}

.skill-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.skill-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.skill-item h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.skill-item p {
    font-size: 0.95rem;
    opacity: 0.9;
    margin-bottom: 1rem;
}

.skill-progress {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    margin-top: 1rem;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-purple), var(--accent-purple));
    border-radius: 3px;
    width: 0;
    transition: width 2s ease;
}

.skill-item.animate .progress-bar {
    width: var(--skill-width);
}

/* Services Section */
#services {
    background: var(--bg-dark);
    color: var(--text-light);
    border-radius: 20px;
    margin: 50px auto;
    padding: 80px 40px;
}

#services h2 {
    background: linear-gradient(135deg, #A878D8, #B794F6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.service-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    text-align: left;
    position: relative;
}

.service-card.featured {
    border: 2px solid var(--primary-purple);
    box-shadow: 0 0 30px rgba(139, 95, 191, 0.3);
}

.service-badge {
    position: absolute;
    top: -10px;
    right: 20px;
    background: var(--gradient-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: var(--shadow-soft);
}

.service-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
    box-shadow: var(--shadow-large);
}

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

.service-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    display: block;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: white;
    font-weight: 600;
}

.service-card p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
}

.service-card ul {
    list-style: none;
    padding: 0;
    margin-bottom: 2rem;
}

.service-card li {
    padding: 0.5rem 0;
    color: rgba(255, 255, 255, 0.8);
    position: relative;
    padding-left: 1.5rem;
}

.service-card li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent-purple);
    font-weight: bold;
}

.service-pricing {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-purple);
}

.service-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.service-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Process Section */
#process {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    overflow: hidden;
    padding: 80px 40px;
}

.process-timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

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

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

.process-step:nth-child(even) {
    flex-direction: row-reverse;
}

.process-step:nth-child(even) .step-content {
    text-align: right;
}

.step-number {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    position: relative;
    z-index: 2;
    margin: 0 2rem;
    box-shadow: var(--shadow-medium);
}

.step-content {
    flex: 1;
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
}

.step-content:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.step-content h3 {
    color: var(--primary-purple);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.step-features {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.step-features span {
    background: var(--gradient-secondary);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
}

/* Portfolio Section */
#portfolio {
    text-align: center;
    padding: 80px 40px;
}

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

.filter-btn {
    background: transparent;
    border: 2px solid var(--primary-purple);
    color: var(--primary-purple);
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

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

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

.project-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
    border: 1px solid rgba(139, 95, 191, 0.1);
    text-align: left;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-large);
    border-color: var(--primary-purple);
}

.project-card h3 {
    color: var(--primary-purple);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.project-card p {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.tech-tag {
    background: var(--gradient-secondary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.project-impact {
    background: rgba(139, 95, 191, 0.1);
    padding: 1rem;
    border-radius: 10px;
    margin: 1rem 0;
    border-left: 4px solid var(--primary-purple);
}

.project-link {
    display: inline-block;
    margin-top: 1rem;
    color: var(--primary-purple);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.project-link:hover {
    transform: translateX(5px);
}

/* Testimonials Section */
#testimonials {
    background: var(--bg-dark);
    color: white;
    overflow: hidden;
    padding: 80px 40px;
}

#testimonials h2 {
    color: white;
    background: none;
    -webkit-text-fill-color: white;
}

.testimonials-slider {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    height: 400px;
}

.testimonial-card {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.5s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.testimonial-card.active {
    opacity: 1;
    transform: translateX(0);
}

.stars {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.testimonial-content p {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.author-info h4 {
    margin-bottom: 0.25rem;
    color: var(--accent-purple);
}

.author-info span {
    opacity: 0.8;
    font-size: 0.9rem;
}

.testimonial-navigation {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.nav-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-dot.active {
    background: var(--primary-purple);
    transform: scale(1.2);
}

/* Blog Section */
#blog {
    background: var(--gradient-secondary);
    color: white;
    border-radius: 20px;
    margin: 50px auto;
    text-align: center;
    padding: 80px 40px;
}

#blog h2 {
    color: white;
    background: none;
    -webkit-text-fill-color: white;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.blog-post {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    text-align: left;
}

.blog-post:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
}

.blog-category {
    background: var(--primary-purple);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 1rem;
}

.blog-post h4 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: white;
    font-weight: 600;
}

.blog-post p {
    line-height: 1.6;
    margin-bottom: 1rem;
}

.blog-meta {
    display: flex;
    justify-content: space-between;
    opacity: 0.8;
    margin-top: 1rem;
}

.blog-post small {
    opacity: 0.8;
    font-style: italic;
}

.blog-cta {
    text-align: center;
    margin-top: 3rem;
}

.secondary-button {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.secondary-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* FAQ Section */
#faq {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 80px 40px;
}

.faq-grid {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    border-radius: 15px;
    margin-bottom: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
}

.faq-item:hover {
    box-shadow: var(--shadow-medium);
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    padding: 1.5rem 2rem;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    transition: all 0.3s ease;
}

.faq-question:hover {
    background: rgba(139, 95, 191, 0.05);
}

.faq-icon {
    font-size: 1.5rem;
    color: var(--primary-purple);
    transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

/* Ensure FAQ answers are hidden by default */
.faq-answer {
    max-height: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
    transition: all 0.3s ease;
    background: rgba(139, 95, 191, 0.05);
    padding: 0 2rem !important;
}

/* Only show FAQ answers when active */
.faq-item.active .faq-answer {
    max-height: 200px !important;
    opacity: 1 !important;
    padding: 0 2rem 1.5rem !important;
}

.faq-answer p {
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
    padding-top: 1rem;
}

/* Contact Section */
#contact {
    background: white;
    border-radius: 20px;
    margin: 50px auto;
    box-shadow: var(--shadow-soft);
    text-align: center;
    padding: 80px 40px;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    text-align: left;
}

.contact-info h3 {
    font-size: 1.8rem;
    color: var(--primary-purple);
    margin-bottom: 1rem;
    font-weight: 600;
}

.contact-info p {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

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

.contact-icon {
    font-size: 1.5rem;
    width: 40px;
    text-align: center;
}

.contact-item strong {
    color: var(--primary-purple);
    display: block;
    margin-bottom: 0.25rem;
}

.contact-item a {
    color: var(--primary-purple);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: var(--dark-purple);
}

.contact-cta {
    text-align: center;
}

.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
}

.contact-form h4 {
    color: var(--primary-purple);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 1rem;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background: white;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 3px rgba(139, 95, 191, 0.1);
}

.primary-button {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 18px 40px;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-soft);
    margin-bottom: 1rem;
}

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

.contact-note {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
}

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

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-brand h3 {
    color: var(--primary-purple);
    margin-bottom: 1rem;
}

.footer-links h4 {
    margin-bottom: 1rem;
    color: white;
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

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

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.footer-contact h4 {
    margin-bottom: 1rem;
    color: white;
}

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

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Typing animation */
.typing-text {
    border-right: 3px solid white;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { border-color: white; }
    51%, 100% { border-color: transparent; }
}

/* Mobile-specific touch styles */
.mobile-device .cta-button.touch-active,
.mobile-device .service-card.touch-active,
.mobile-device .project-card.touch-active,
.mobile-device .filter-btn.touch-active {
    transform: scale(0.98);
    opacity: 0.9;
}

/* Improve touch targets */
.mobile-device .nav-menu a,
.mobile-device .cta-button,
.mobile-device .filter-btn,
.mobile-device .faq-question,
.mobile-device .nav-dot {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Custom viewport height for mobile browsers */
#hero {
    min-height: calc(var(--vh, 1vh) * 100);
}

/* Smooth scrolling optimization for mobile */
html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Prevent horizontal scrolling */
body {
    overflow-x: hidden;
    width: 100%;
}

/* Better mobile form styling */
.mobile-device input,
.mobile-device select,
.mobile-device textarea {
    -webkit-appearance: none;
    appearance: none;
    border-radius: 10px;
    font-size: 16px; /* Prevents zoom on iOS */
}

/* Mobile testimonial slider improvements */
.mobile-device .testimonials-slider {
    touch-action: pan-x;
}

.mobile-device .testimonial-card {
    user-select: none;
}

/* Reduce motion for better mobile performance */
@media (max-width: 768px) {
    .floating-shapes,
    .shape {
        animation-duration: 30s;
    }
    
    .loader-brain .node,
    .loader-brain .connection {
        animation-duration: 3s;
    }
}

/* Enhanced Responsive Design */

/* Large tablets and small desktops */
@media (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }
    
    .nav-container {
        padding: 0 30px;
    }
    
    #hero h1 {
        font-size: 3.5rem;
    }
    
    .hero-stats {
        gap: 2rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablets */
@media (max-width: 768px) {
    /* Hide custom cursor on touch devices */
    #custom-cursor {
        display: none;
    }
    
    /* Container adjustments */
    .container {
        padding: 0 20px;
    }
    
    .nav-container {
        padding: 0 20px;
    }
    
    /* Navigation */
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: rgba(26, 27, 35, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: start;
        align-items: center;
        padding-top: 2rem;
        gap: 2rem;
        transition: left 0.3s ease;
        z-index: 999;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-toggle {
        display: flex;
        z-index: 1001;
    }
    
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    /* Hero Section */
    #hero {
        padding: 120px 20px 80px;
        text-align: center;
    }
    
    #hero h1 {
        font-size: 2.8rem;
        line-height: 1.2;
        margin-bottom: 1.5rem;
    }
    
    #hero p,
    .hero-subtitle {
        font-size: 1.2rem;
        margin-bottom: 2rem;
        padding: 0 10px;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
        margin: 2rem 0;
    }
    
    .stat-item {
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .cta-button {
        width: 100%;
        max-width: 280px;
        padding: 15px 30px;
        font-size: 1rem;
        text-align: center;
    }
    
    /* Floating shapes - reduce size on mobile */
    .shape-1 {
        width: 120px;
        height: 120px;
        top: 15%;
        left: 5%;
    }
    
    .shape-2 {
        width: 100px;
        height: 100px;
        top: 70%;
        right: 10%;
    }
    
    .shape-3 {
        width: 80px;
        height: 80px;
        bottom: 15%;
        left: 75%;
    }
    
    /* Sections */
    section {
        padding: 50px 20px;
    }
    
    section h2 {
        font-size: 2.2rem;
        margin-bottom: 2rem;
        line-height: 1.2;
    }
    
    .section-subtitle {
        font-size: 1.1rem;
        margin-bottom: 2rem;
        padding: 0 10px;
    }
    
    /* Stats Section */
    .stats-section {
        padding: 60px 20px;
        margin-top: -30px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .stat-card {
        padding: 1.5rem;
    }
    
    .stat-card .stat-icon {
        font-size: 2.5rem;
    }
    
    .stat-card h3 {
        font-size: 2rem;
    }
    
    /* Grid adjustments */
    .skills-grid,
    .services-grid,
    .projects-grid,
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Service cards */
    .service-card {
        padding: 2rem;
        margin-bottom: 1rem;
    }
    
    .service-pricing {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    /* Process timeline */
    .process-timeline::before {
        left: 30px;
    }
    
    .process-step,
    .process-step:nth-child(even) {
        flex-direction: row;
        margin-bottom: 3rem;
    }
    
    .process-step:nth-child(even) .step-content {
        text-align: left;
    }
    
    .step-number {
        margin: 0 1rem 0 0;
        width: 60px;
        height: 60px;
        font-size: 1.2rem;
        flex-shrink: 0;
    }
    
    .step-content {
        padding: 1.5rem;
    }
    
    .step-features {
        justify-content: flex-start;
    }
    
    /* Testimonials */
    .testimonials-slider {
        height: auto;
        min-height: 350px;
    }
    
    .testimonial-card {
        padding: 2rem 1.5rem;
        position: relative;
        transform: none;
    }
    
    .testimonial-content p {
        font-size: 1.1rem;
    }
    
    .testimonial-author {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    /* Portfolio filters */
    .portfolio-filters {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    /* Contact section */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .contact-details {
        align-items: center;
    }
    
    .contact-item {
        justify-content: center;
        text-align: center;
    }
    
    /* FAQ */
    .faq-question {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
    
    .faq-answer {
        padding: 0 1.5rem !important;
    }
    
    .faq-item.active .faq-answer {
        padding: 0 1.5rem 1rem !important;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }
    
    /* Section margins */
    #about,
    #services,
    #blog,
    #contact,
    #process,
    #faq {
        margin: 20px 10px;
        border-radius: 15px;
    }
    
    /* Remove margin for dark sections on mobile */
    .stats-section,
    #testimonials {
        margin: 0;
        border-radius: 0;
    }
}

/* Small phones */
@media (max-width: 480px) {
    /* Navigation brand */
    .nav-brand {
        font-size: 1.3rem;
    }
    
    .brand-icon {
        font-size: 1.5rem;
    }
    
    /* Hero adjustments */
    #hero {
        padding: 100px 15px 60px;
    }
    
    #hero h1 {
        font-size: 2.2rem;
        line-height: 1.1;
    }
    
    #hero p,
    .hero-subtitle {
        font-size: 1.1rem;
        padding: 0 5px;
    }
    
    .hero-badge {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    /* Buttons */
    .cta-button {
        max-width: 250px;
        padding: 12px 25px;
        font-size: 0.95rem;
    }
    
    /* Sections */
    section {
        padding: 40px 15px;
    }
    
    section h2 {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
        padding: 0 5px;
    }
    
    /* Container */
    .container {
        padding: 0 15px;
    }
    
    .nav-container {
        padding: 0 15px;
    }
    
    /* Stats grid for very small screens */
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        padding: 1.2rem;
    }
    
    /* Cards */
    .service-card,
    .project-card,
    .blog-post {
        padding: 1.5rem;
    }
    
    /* Process steps */
    .step-number {
        width: 50px;
        height: 50px;
        font-size: 1rem;
        margin: 0 0.8rem 0 0;
    }
    
    .step-content {
        padding: 1.2rem;
    }
    
    .step-content h3 {
        font-size: 1.3rem;
    }
    
    /* Testimonials */
    .testimonial-card {
        padding: 1.5rem 1rem;
    }
    
    .testimonial-content p {
        font-size: 1rem;
    }
    
    /* Contact form */
    .contact-form {
        padding: 1.5rem;
    }
    
    .contact-form input,
    .contact-form select,
    .contact-form textarea {
        padding: 0.8rem;
        font-size: 0.95rem;
    }
    
    .primary-button {
        padding: 15px 30px;
        font-size: 1.1rem;
    }
    
    /* FAQ */
    .faq-question {
        padding: 1rem;
        font-size: 0.95rem;
    }
    
    .faq-answer {
        padding: 0 1rem !important;
    }
    
    .faq-item.active .faq-answer {
        padding: 0 1rem 1rem !important;
    }
    
    /* Portfolio filters */
    .filter-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
    
    /* Remove margins for small screens */
    #about,
    #services,
    #blog,
    #contact,
    #process,
    #faq {
        margin: 15px 5px;
        border-radius: 10px;
    }
    
    /* Tech tags */
    .tech-tag {
        font-size: 0.75rem;
        padding: 0.2rem 0.6rem;
    }
    
    .step-features span {
        font-size: 0.75rem;
        padding: 0.25rem 0.6rem;
    }
}

/* Extra small devices */
@media (max-width: 360px) {
    #hero h1 {
        font-size: 1.9rem;
    }
    
    #hero p,
    .hero-subtitle {
        font-size: 1rem;
    }
    
    section h2 {
        font-size: 1.6rem;
    }
    
    .cta-button {
        max-width: 220px;
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .service-card,
    .project-card,
    .blog-post {
        padding: 1.2rem;
    }
    
    .step-number {
        width: 45px;
        height: 45px;
        font-size: 0.9rem;
    }
}

/* Landscape orientation on mobile */
@media (max-height: 500px) and (orientation: landscape) {
    #hero {
        min-height: 100vh;
        padding: 80px 20px 40px;
    }
    
    #hero h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    #hero p,
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-stats {
        flex-direction: row;
        gap: 1rem;
        margin: 1.5rem 0;
    }
    
    .hero-buttons {
        flex-direction: row;
        gap: 1rem;
        justify-content: center;
    }
    
    .cta-button {
        width: auto;
        max-width: none;
        padding: 10px 25px;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .loader-brain,
    .service-icon,
    .skill-icon {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .scroll-indicator,
    .floating-shapes,
    .shape {
        animation: none !important;
    }
}
