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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Theme Variables */
[data-theme="light"] {
    --bg-primary: #FFFFFF;
    --bg-secondary: #F8F9FA;
    --bg-tertiary: #E9ECEF;
    --text-primary: #1A1A1A;
    --text-secondary: #4A4A4A;
    --text-muted: #6C757D;
    --border-subtle: rgba(0, 0, 0, 0.08);
    --border-medium: rgba(0, 0, 0, 0.15);
    --brand-primary: #2563EB;
    --brand-secondary: #3B82F6;
    --brand-hover: rgba(37, 99, 235, 0.1);
    --brand-active: #1D4ED8;
    --accent-1: #F59E0B;
    --accent-2: #10B981;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.12);
}

[data-theme="dark"] {
    --bg-primary: #0A0A0A;
    --bg-secondary: #151515;
    --bg-tertiary: #202020;
    --text-primary: #FFFFFF;
    --text-secondary: rgba(255, 255, 255, 0.85);
    --text-muted: #9CA3AF;
    --border-subtle: rgba(255, 255, 255, 0.1);
    --border-medium: rgba(255, 255, 255, 0.2);
    --brand-primary: #3B82F6;
    --brand-secondary: #60A5FA;
    --brand-hover: rgba(59, 130, 246, 0.15);
    --brand-active: #2563EB;
    --accent-1: #FBBF24;
    --accent-2: #34D399;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.5);
}

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: background 0.3s ease, color 0.3s ease;
}

/* Header Styles */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-subtle);
    z-index: 1000;
    transition: all 0.3s ease;
}

[data-theme="dark"] .header {
    background: rgba(10, 10, 10, 0.95);
}

.header.scrolled {
    box-shadow: var(--shadow-md);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    cursor: pointer;
}

.logo-text {
    font-size: 26px;
    font-weight: 700;
    color: var(--brand-primary);
    letter-spacing: -0.5px;
}

.nav-desktop {
    display: flex;
    align-items: center;
    gap: 36px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

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

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

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

.theme-toggle {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 10px;
    cursor: pointer;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background: var(--brand-hover);
    border-color: var(--brand-primary);
    transform: scale(1.05);
}

.mobile-controls {
    display: none;
    gap: 12px;
    align-items: center;
}

.mobile-menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.hamburger {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    position: relative;
    transition: all 0.3s ease;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s ease;
}

.hamburger::before { top: -8px; }
.hamburger::after { top: 8px; }

.nav-mobile {
    display: none;
    flex-direction: column;
    padding: 20px 40px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-subtle);
}

.nav-mobile.active {
    display: flex;
}

.nav-link-mobile {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    padding: 12px 0;
    transition: color 0.3s ease;
}

.nav-link-mobile:hover {
    color: var(--brand-primary);
}

/* Floating Shapes */
.floating-shape {
    position: absolute;
    opacity: 0.08;
    pointer-events: none;
}

.shape-1 {
    width: 350px;
    height: 350px;
    background: linear-gradient(135deg, var(--brand-primary), var(--accent-1));
    border-radius: 50%;
    top: 15%;
    right: -8%;
    filter: blur(70px);
    animation: float 25s ease-in-out infinite;
}

.shape-2 {
    width: 280px;
    height: 280px;
    background: linear-gradient(225deg, var(--accent-2), var(--brand-secondary));
    border-radius: 40% 60% 60% 40%;
    bottom: 25%;
    left: -5%;
    filter: blur(60px);
    animation: float 20s ease-in-out infinite reverse;
}

.shape-3 {
    width: 200px;
    height: 200px;
    background: linear-gradient(45deg, var(--brand-primary), var(--accent-2));
    border-radius: 30% 70% 70% 30%;
    top: 50%;
    right: 15%;
    filter: blur(50px);
    animation: float 30s ease-in-out infinite;
}

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

/* Button Styles */
.btn-primary {
    background: var(--brand-primary);
    color: #FFFFFF;
    border: none;
    border-radius: 12px;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    background: var(--brand-active);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 40px 80px;
    overflow: hidden;
}

.hero-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    width: 100%;
}

.hero-content {
    z-index: 1;
}

.hero-title {
    font-size: 58px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -2px;
    margin-bottom: 24px;
    background: linear-gradient(135deg, var(--text-primary), var(--brand-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 19px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 560px;
}

/* Architecture Diagram */
.hero-visual {
    position: relative;
    height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.architecture-diagram {
    position: relative;
    width: 600px;
    height: 600px;
}

/* Connection Lines */
.connection-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.conn-line {
    stroke: var(--brand-primary);
    stroke-width: 2;
    opacity: 0.15;
    transition: all 0.4s ease;
}

/* Architecture Nodes */
.arch-node {
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 16px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: var(--shadow-sm);
    z-index: 10;
}

.arch-node:hover {
    transform: scale(1.15);
    background: var(--brand-primary);
    border-color: var(--brand-primary);
    box-shadow: 0 8px 30px rgba(37, 99, 235, 0.4);
}

.arch-node:hover .node-inner svg {
    stroke: #FFFFFF;
}

.arch-node:hover .node-label {
    color: #FFFFFF;
    opacity: 1;
}

.node-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
}

.node-inner svg {
    stroke: var(--brand-primary);
    transition: stroke 0.3s ease;
}

.arch-node:hover .node-inner svg {
    stroke: #FFFFFF;
}

.node-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    opacity: 0.7;
    transition: all 0.3s ease;
    text-align: center;
}

/* Node Positions */
.center-node {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    border-color: var(--brand-primary);
    box-shadow: 0 8px 30px rgba(37, 99, 235, 0.3);
}

.center-node .node-inner svg {
    stroke: #FFFFFF;
}

.center-node .node-label {
    color: #FFFFFF;
    opacity: 1;
}

.node-1 { top: 50px; left: 50%; transform: translateX(-50%); }
.node-2 { top: 125px; right: 50px; }
.node-3 { top: 50%; right: 25px; transform: translateY(-50%); }
.node-4 { bottom: 125px; right: 50px; }
.node-5 { bottom: 50px; left: 50%; transform: translateX(-50%); }
.node-6 { bottom: 125px; left: 50px; }
.node-7 { top: 50%; left: 25px; transform: translateY(-50%); }
.node-8 { top: 125px; left: 50px; }

/* Hover Effects for Connections */
.arch-node[data-layer="frontend"]:hover ~ .connection-lines .line-1,
.arch-node[data-layer="backend"]:hover ~ .connection-lines .line-2,
.arch-node[data-layer="database"]:hover ~ .connection-lines .line-3,
.arch-node[data-layer="cloud"]:hover ~ .connection-lines .line-4,
.arch-node[data-layer="api"]:hover ~ .connection-lines .line-5,
.arch-node[data-layer="security"]:hover ~ .connection-lines .line-6,
.arch-node[data-layer="analytics"]:hover ~ .connection-lines .line-7,
.arch-node[data-layer="mobile"]:hover ~ .connection-lines .line-8 {
    opacity: 1;
    stroke-width: 3;
    stroke: var(--accent-1);
}

/* Data Flow Particles */
.data-particle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--accent-1);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-1);
    opacity: 0;
    animation: particleFlow 4s linear infinite;
}

.particle-1 {
    top: 50%;
    left: 50%;
    animation-delay: 0s;
}

.particle-2 {
    top: 50%;
    left: 50%;
    animation-delay: 0.8s;
}

.particle-3 {
    top: 50%;
    left: 50%;
    animation-delay: 1.6s;
}

.particle-4 {
    top: 50%;
    left: 50%;
    animation-delay: 2.4s;
}

.particle-5 {
    top: 50%;
    left: 50%;
    animation-delay: 3.2s;
}

@keyframes particleFlow {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%);
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translate(calc(-50% + 200px), calc(-50% - 200px));
    }
}

/* Pulse Animation for Center Node */
@keyframes pulse {
    0%, 100% {
        box-shadow: 0 8px 30px rgba(37, 99, 235, 0.3);
    }
    50% {
        box-shadow: 0 8px 40px rgba(37, 99, 235, 0.5);
    }
}

.center-node {
    animation: pulse 3s ease-in-out infinite;
}

/* Section Styles */
.section-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 100px 40px;
}

.section-header {
    text-align: center;
    margin-bottom: 70px;
}

.section-title {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -1.5px;
}

.title-underline {
    width: 70px;
    height: 5px;
    background: linear-gradient(90deg, var(--brand-primary), var(--accent-1));
    margin: 0 auto;
    border-radius: 10px;
}

/* Geometric Accents */
.geometric-accent {
    position: absolute;
    opacity: 0.06;
    pointer-events: none;
}

.accent-1 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, var(--brand-primary), var(--accent-2));
    border-radius: 50%;
    top: 10%;
    left: -5%;
    filter: blur(60px);
}

.accent-2 {
    width: 250px;
    height: 250px;
    background: linear-gradient(225deg, var(--accent-1), var(--brand-secondary));
    border-radius: 40% 60%;
    bottom: 5%;
    right: -3%;
    filter: blur(50px);
}

.accent-3 {
    width: 280px;
    height: 280px;
    background: linear-gradient(180deg, var(--accent-2), var(--brand-primary));
    border-radius: 30% 70% 70% 30%;
    top: 20%;
    right: -5%;
    filter: blur(55px);
}

/* About Section */
.about-section {
    position: relative;
    background: var(--bg-secondary);
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
}

.about-text {
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 24px;
    text-align: center;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 60px;
}

.stat-item {
    text-align: center;
    padding: 40px 30px;
    background: var(--bg-primary);
    border-radius: 16px;
    border: 1px solid var(--border-subtle);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.stat-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
    border-color: var(--brand-primary);
}

.stat-number {
    font-size: 52px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--brand-primary), var(--accent-1));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 15px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Services Section */
.services-section {
    position: relative;
}

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

.service-card {
    background: var(--bg-secondary);
    padding: 40px;
    border-radius: 16px;
    border: 1px solid var(--border-subtle);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.service-card:hover {
    transform: translateY(-8px);
    border-color: var(--brand-primary);
    box-shadow: var(--shadow-lg);
}

.service-icon {
    width: 70px;
    height: 70px;
    background: var(--brand-hover);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    color: var(--brand-primary);
}

.service-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
}

.service-description {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* Why Us Section */
.why-us-section {
    position: relative;
    background: var(--bg-secondary);
}

.why-us-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
}

.why-us-card {
    text-align: center;
    padding: 40px;
    background: var(--bg-primary);
    border-radius: 16px;
    border: 1px solid var(--border-subtle);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.why-us-card:hover {
    transform: translateY(-6px);
    border-color: var(--brand-primary);
    box-shadow: var(--shadow-md);
}

.why-us-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 14px;
    color: var(--brand-primary);
}

.why-us-description {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* Contact Section */
.contact-section {
    position: relative;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 60px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.info-item h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--brand-primary);
}

.info-item p {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-secondary);
}

.info-item a {
    color: var(--brand-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.info-item a:hover {
    color: var(--brand-active);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea {
    padding: 14px 18px;
    font-size: 15px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    color: var(--text-primary);
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px var(--brand-hover);
}

.form-message {
    padding: 14px;
    border-radius: 10px;
    font-size: 14px;
    display: none;
}

.form-message.success {
    display: block;
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-2);
    border: 1px solid var(--accent-2);
}

.form-message.error {
    display: block;
    background: rgba(239, 68, 68, 0.1);
    color: #EF4444;
    border: 1px solid #EF4444;
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-subtle);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 70px 40px 40px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 50px;
}

.footer-section h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
}

.footer-section p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 15px;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: var(--brand-primary);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 16px;
}

.social-links a {
    width: 44px;
    height: 44px;
    background: var(--bg-tertiary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--brand-primary);
    color: #FFFFFF;
    transform: translateY(-4px);
}

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding: 28px 40px;
    text-align: center;
    border-top: 1px solid var(--border-subtle);
}

.footer-bottom p {
    font-size: 14px;
    color: var(--text-muted);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 60px;
    }
    
    .hero-title {
        font-size: 46px;
    }
    
    .hero-visual {
        height: 500px;
    }
    
    .architecture-diagram {
        width: 500px;
        height: 500px;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-desktop {
        display: none;
    }
    
    .mobile-controls {
        display: flex;
    }
    
    .header-content {
        padding: 18px 24px;
    }
    
    .hero-section {
        padding: 100px 24px 60px;
    }
    
    .hero-title {
        font-size: 38px;
    }
    
    .hero-subtitle {
        font-size: 17px;
    }
    
    .section-container {
        padding: 70px 24px;
    }
    
    .section-title {
        font-size: 36px;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .why-us-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-visual {
        height: 400px;
    }
    
    .architecture-diagram {
        width: 100%;
        max-width: 400px;
        height: 400px;
    }
    
    .arch-node {
        width: 60px;
        height: 60px;
    }
    
    .center-node {
        width: 80px;
        height: 80px;
    }
    
    .node-label {
        font-size: 9px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        padding: 50px 24px 30px;
    }
}

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

.fade-in-up {
    animation: fadeInUp 0.7s ease-out forwards;
}