/* --- Custom Properties --- */
:root {
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.7);
    --bg-card-hover: rgba(30, 41, 59, 0.9);
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --gradient-primary: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    
    --border-color: rgba(255, 255, 255, 0.08);
    --shadow-soft: 0 10px 40px -10px rgba(0,0,0,0.5);
    
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* --- Base --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Typography --- */
h1, h2, h3 {
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(2.2rem, 4vw, 3.8rem);
    font-weight: 800;
    letter-spacing: -1px;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
}

p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    cursor: pointer;
    gap: 8px;
    border: none;
    outline: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.05);
    border-color: var(--text-muted);
}

.btn-primary-small {
    background: var(--gradient-primary);
    color: white;
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 500;
    transition: var(--transition);
}

.btn-primary-small:hover {
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
    transform: translateY(-2px);
}

/* --- Background Effects --- */
.bg-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(150px);
    z-index: -1;
    opacity: 0.15;
    pointer-events: none;
}

.bg-glow-1 {
    background: var(--accent-blue);
    top: -100px;
    left: -200px;
}

.bg-glow-2 {
    background: var(--accent-purple);
    bottom: -100px;
    right: -200px;
}

/* --- Navbar --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 0;
    z-index: 1000;
    transition: var(--transition);
    border-bottom: 1px solid transparent;
}

.navbar.scrolled,
.navbar.menu-open {
    padding: 12px 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo img {
    height: 32px;
    width: auto;
    border-radius: 6px;
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links a:not(.btn-primary-small) {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: var(--transition);
    position: relative;
}

.nav-links a:not(.btn-primary-small):hover {
    color: var(--text-main);
}

.nav-links a:not(.btn-primary-small)::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background: var(--gradient-primary);
    transition: var(--transition);
}

.nav-links a:not(.btn-primary-small):hover::after {
    width: 100%;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
}

/* --- Hero Section --- */
.hero {
    padding: 180px 0 100px;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 0.9rem;
    color: var(--accent-blue);
    margin-bottom: 24px;
    font-weight: 500;
    backdrop-filter: blur(4px);
}

.hero-content p {
    font-size: 1.2rem;
    max-width: 90%;
    margin-bottom: 40px;
}

.hero-actions {
    display: flex;
    gap: 16px;
}

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

.visual-circle {
    width: 350px;
    height: 350px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(139, 92, 246, 0.15));
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 60px rgba(139, 92, 246, 0.2), inset 0 0 60px rgba(59, 130, 246, 0.2);
    animation: pulse-glow 4s ease-in-out infinite alternate;
}

.circle-inner {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    border: 1px dashed rgba(255, 255, 255, 0.15);
    animation: spin-center 30s linear infinite;
}

.orbit {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.03);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.orbit-1 {
    width: 480px;
    height: 480px;
    border-top: 1px solid rgba(59, 130, 246, 0.4);
    animation: spin 20s linear infinite reverse;
}

.orbit-2 {
    width: 580px;
    height: 580px;
    border-bottom: 1px solid rgba(139, 92, 246, 0.4);
    animation: spin 25s linear infinite;
}

.floating-element {
    position: absolute;
    width: 75px;
    height: 75px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    backdrop-filter: blur(15px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.4), inset 0 0 0 1px rgba(255,255,255,0.05);
    z-index: 10;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.floating-element:hover {
    transform: scale(1.15) !important;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5), 0 0 25px currentColor;
    z-index: 20;
}

.float-1 { top: 15%; left: 5%; color: #3b82f6; animation: float-orbit 8s ease-in-out infinite; }
.float-2 { bottom: 12%; right: 10%; color: #8b5cf6; animation: float-orbit 7s ease-in-out infinite 1s; }
.float-3 { top: 5%; right: 15%; color: #10b981; animation: float-orbit 9s ease-in-out infinite 2s; }
.float-4 { bottom: 20%; left: 10%; color: #06b6d4; animation: float-orbit 8.5s ease-in-out infinite 1.5s; }
.float-5 { top: 45%; right: -5%; color: #f59e0b; animation: float-orbit 7.5s ease-in-out infinite 0.5s; }

@keyframes float-orbit {
    0% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-15px) translateX(10px) rotate(5deg); }
    66% { transform: translateY(10px) translateX(-10px) rotate(-5deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

@keyframes pulse-glow {
    0% { transform: scale(1); box-shadow: 0 0 60px rgba(139, 92, 246, 0.1), inset 0 0 60px rgba(59, 130, 246, 0.1); }
    100% { transform: scale(1.02); box-shadow: 0 0 80px rgba(139, 92, 246, 0.3), inset 0 0 80px rgba(59, 130, 246, 0.3); }
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes spin-center {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


/* --- Services Section --- */
.services {
    padding: 100px 0;
    position: relative;
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 60px;
}

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

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 40px 30px;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.service-card:hover {
    transform: translateY(-10px);
    background: var(--bg-card-hover);
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.service-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--accent-blue);
    margin-bottom: 24px;
    transition: var(--transition);
}

.service-card:hover .service-icon {
    background: var(--gradient-primary);
    color: white;
    transform: scale(1.1);
}

.service-card h3 {
    font-size: 1.4rem;
    margin-bottom: 16px;
}

.service-card p {
    font-size: 1rem;
    margin-bottom: 0;
}


/* --- About Section --- */
.about {
    padding: 100px 0;
    position: relative;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0) 0%, rgba(15, 23, 42, 0.5) 100%);
}

.about-container {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 80px;
    align-items: center;
}

.about-content h2 {
    margin-bottom: 30px;
}

.about-content p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #cbd5e1;
}

.about-content strong {
    color: var(--text-main);
    font-weight: 600;
}

.about-stats {
    display: flex;
    gap: 30px;
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--accent-blue);
    transition: var(--transition);
}

.stat-item:hover .stat-icon {
    background: var(--gradient-primary);
    color: white;
    transform: translateY(-5px);
}

.stat-item h4 {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-main);
}

.about-visual {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-card-stack {
    position: relative;
    width: 100%;
    max-width: 400px;
    height: 450px;
    perspective: 1000px;
}

.about-card {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 30px;
    transition: all 0.5s ease;
}

.card-back {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(139, 92, 246, 0.15));
    border: 1px solid rgba(139, 92, 246, 0.3);
    transform: translate(20px, 20px) rotate(5deg);
    z-index: 1;
}

.card-front {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(20px);
    z-index: 2;
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    transform: translate(0, 0) rotate(0deg);
}

.about-card-stack:hover .card-back {
    transform: translate(30px, 30px) rotate(8deg);
}

.about-card-stack:hover .card-front {
    transform: translateY(-10px);
}

.card-front i {
    font-size: 80px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 30px;
}

.card-front h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.card-front p {
    font-size: 1.05rem;
    color: var(--text-muted);
}

.glow-line {
    position: absolute;
    bottom: 0;
    left: 10%;
    width: 80%;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 10px 10px 0 0;
    opacity: 0.5;
    filter: blur(2px);
}


/* --- CTA Section --- */
.cta {
    padding: 80px 0;
}

.cta-container {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 30px;
    padding: 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(139,92,246,0.1) 0%, transparent 50%);
    animation: rotate 20s linear infinite;
    pointer-events: none;
}

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

.cta-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
}

.contact-info {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-weight: 500;
    transition: var(--transition);
}

.contact-link:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-2px);
    border-color: var(--accent-blue);
}

/* --- Footer --- */
footer {
    border-top: 1px solid var(--border-color);
    padding: 60px 0 30px;
    background: rgba(0,0,0,0.2);
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-brand h3 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 8px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    border: 1px solid transparent;
}

.footer-social a:hover {
    background: var(--accent-purple);
    color: white;
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.05);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* --- Responsive --- */
@media (max-width: 992px) {
    .navbar {
        background: rgba(15, 23, 42, 0.98);
        backdrop-filter: blur(12px);
        border-bottom: 1px solid var(--border-color);
        padding: 15px 0;
    }

    .hero {
        padding: 130px 0 60px;
        min-height: auto;
        align-items: flex-start;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-content p {
        margin: 0 auto 40px;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .hero-visual {
        height: 400px;
    }
    
    .about-container {
        grid-template-columns: 1fr;
        gap: 50px;
        text-align: center;
    }
    
    .about-stats {
        justify-content: center;
        flex-wrap: wrap;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(15, 23, 42, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 20px 0;
        border-bottom: 1px solid var(--border-color);
        box-shadow: var(--shadow-soft);
        z-index: 1001;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .mobile-toggle {
        display: block;
        padding: 5px;
    }
    
    .cta-container {
        padding: 40px 20px;
    }
}

/* --- Animations --- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Theme Toggle & Light Mode --- */
.theme-toggle {
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="light"] {
    --bg-dark: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.7);
    --bg-card-hover: rgba(255, 255, 255, 0.9);
    
    --text-main: #0f172a;
    --text-muted: #475569;
    
    --border-color: rgba(0, 0, 0, 0.08);
    --shadow-soft: 0 10px 40px -10px rgba(0,0,0,0.05);
}

[data-theme="light"] .theme-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .navbar.scrolled,
[data-theme="light"] .navbar.menu-open {
    background: rgba(248, 250, 252, 0.95);
}

[data-theme="light"] .badge {
    background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .floating-element {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 15px 35px rgba(0,0,0,0.05), inset 0 0 0 1px rgba(0,0,0,0.02);
}

[data-theme="light"] .service-icon {
    background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .about {
    background: linear-gradient(to bottom, rgba(248, 250, 252, 0) 0%, rgba(248, 250, 252, 0.8) 100%);
}

[data-theme="light"] .about-content p {
    color: #475569;
}

[data-theme="light"] .stat-icon {
    background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .card-front {
    box-shadow: 0 20px 50px rgba(0,0,0,0.05);
}

[data-theme="light"] .contact-link {
    background: rgba(0,0,0,0.03);
}

[data-theme="light"] .contact-link:hover {
    background: rgba(0,0,0,0.08);
}

[data-theme="light"] footer {
    background: rgba(0,0,0,0.02);
}

[data-theme="light"] .footer-social a {
    background: rgba(0,0,0,0.05);
}

@media (max-width: 992px) {
    [data-theme="light"] .navbar {
        background: rgba(248, 250, 252, 0.98);
    }
    [data-theme="light"] .nav-links {
        background: rgba(248, 250, 252, 0.98);
    }
}
