/* =========================================
   VARIABLES & DESIGN TOKENS
   ========================================= */
:root {
    /* Colors */
    --clr-bg-main: #060913;
    --clr-bg-card: rgba(255, 255, 255, 0.03);
    --clr-primary: #3b82f6; /* Modern Blue */
    --clr-primary-glow: rgba(59, 130, 246, 0.5);
    --clr-secondary: #8b5cf6; /* Modern Purple */
    --clr-text-title: #ffffff;
    --clr-text-body: #9ca3af;
    --clr-border: rgba(255, 255, 255, 0.08);

    /* Gradients */
    --grad-primary: linear-gradient(135deg, var(--clr-primary), var(--clr-secondary));
    --grad-text: linear-gradient(to right, #60a5fa, #c084fc);

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing & Transitions */
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
}

body.light-mode {
    --clr-bg-main: #f8fafc;
    --clr-bg-card: rgba(0, 0, 0, 0.03);
    --clr-primary: #2563eb; 
    --clr-primary-glow: rgba(37, 99, 235, 0.2);
    --clr-secondary: #7c3aed;
    --clr-text-title: #0f172a;
    --clr-text-body: #475569;
    --clr-border: rgba(0, 0, 0, 0.1);
    --grad-text: linear-gradient(to right, #2563eb, #7c3aed);
}

body.light-mode::before,
body.light-mode::after {
    opacity: 0.4;
}

body.light-mode .glass-btn {
    color: #fff; /* keep btn text visible */
    background: var(--clr-primary);
}

body.light-mode .glass-panel {
    background: rgba(255, 255, 255, 0.8);
}
body.light-mode .glass-card {
    background: rgba(255, 255, 255, 0.5);
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

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

/* Background Atmosphere */
body::before {
    content: '';
    position: absolute;
    top: -20%;
    left: -10%;
    width: 60vw;
    height: 60vh;
    background: radial-gradient(circle, var(--clr-primary-glow) 0%, transparent 60%);
    opacity: 0.15;
    z-index: -1;
    filter: blur(100px);
}
body::after {
    content: '';
    position: absolute;
    bottom: -20%;
    right: -10%;
    width: 60vw;
    height: 60vh;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.4) 0%, transparent 60%);
    opacity: 0.15;
    z-index: -1;
    filter: blur(100px);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--clr-text-title);
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 5%;
}

.section-padding {
    padding: 100px 0;
}

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

.text-primary { color: var(--clr-primary); }
.text-secondary { color: var(--clr-secondary); }

/* =========================================
   TYPOGRAPHY
   ========================================= */
.section-header {
    margin-bottom: 60px;
}
.section-header h2 {
    font-size: 3rem;
    margin-bottom: 16px;
}
.section-header p {
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
}

/* =========================================
   BUTTONS
   ========================================= */
.btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-family: var(--font-body);
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
    text-align: center;
}

.btn i {
    margin-left: 8px;
    transition: transform var(--transition-fast);
}

.btn:hover i {
    transform: translateX(4px);
}

.btn-primary {
    background: var(--grad-primary);
    color: white;
    box-shadow: 0 4px 15px var(--clr-primary-glow);
}
.btn-primary:hover {
    box-shadow: 0 6px 20px var(--clr-primary-glow);
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.btn-outline {
    border: 1px solid var(--clr-border);
    color: var(--clr-text-title);
    background: transparent;
}
.btn-outline:hover {
    border-color: var(--clr-primary);
    background: rgba(59, 130, 246, 0.1);
}

.glass-btn {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
}
.glass-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.btn-large {
    padding: 18px 40px;
    font-size: 1.1rem;
}

.btn-text {
    color: var(--clr-primary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    margin-top: auto;
}
.btn-text i {
    margin-left: 8px;
    font-size: 0.9em;
    transition: transform var(--transition-fast);
}
.btn-text:hover {
    color: #60a5fa;
}
.btn-text:hover i {
    transform: translateX(5px);
}

/* =========================================
   NAVIGATION
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 0;
    z-index: 100;
    transition: var(--transition-smooth);
}
.navbar.scrolled {
    background: rgba(6, 9, 19, 0.85);
    backdrop-filter: blur(12px);
    padding: 15px 0;
    border-bottom: 1px solid var(--clr-border);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
}

.logo-img {
    height: 60px;
    width: auto;
    object-fit: contain;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0;
    color: var(--clr-text-title);
    letter-spacing: -0.5px;
    font-family: var(--font-heading);
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--grad-primary);
    border-radius: 8px;
    font-size: 1rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a:not(.btn) {
    font-weight: 500;
    font-size: 0.95rem;
}
.nav-links li {
    display: flex;
    align-items: center;
}
.nav-links a:not(.btn) {
    font-weight: 500;
}
.nav-links a:not(.btn):hover {
    color: var(--clr-text-title);
}

#theme-toggle {
    padding: 10px 14px;
    border-radius: 50%;
    margin-left: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
#theme-toggle:hover {
    background: rgba(59, 130, 246, 0.1);
}

.mobile-menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--clr-text-title);
}

/* =========================================
   HERO SECTION
   ========================================= */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

.hero-container.text-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 10;
}

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: auto; /* Allow interaction with particles */
}

.hero-content {
    max-width: 800px;
    z-index: 10;
}

.justify-center {
    justify-content: center;
}

.badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 24px;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 24px;
    letter-spacing: -1px;
}
.hero h1 span {
    background: var(--grad-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero h2 {
    font-size: 1.25rem;
    font-weight: 500;
    color: #e5e7eb;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.125rem;
    margin-bottom: 40px;
}

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



/* =========================================
   ABOUT SECTION
   ========================================= */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text h3 {
    font-size: 2.25rem;
    margin-bottom: 24px;
}
.about-text p {
    font-size: 1.125rem;
}

.about-expertise {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.expertise-item {
    background: var(--clr-bg-card);
    border: 1px solid var(--clr-border);
    padding: 24px;
    border-radius: var(--radius-md);
    transition: var(--transition-smooth);
}
.expertise-item:hover {
    transform: translateY(-5px);
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.15);
}

.icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--clr-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 16px;
}

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

.glass-card {
    background: var(--clr-bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-lg);
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top left, rgba(255,255,255,0.05) 0%, transparent 50%);
    pointer-events: none;
}

.glass-card:hover {
    transform: translateY(-10px);
    border-color: rgba(255,255,255,0.15);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.card-icon {
    font-size: 2.5rem;
    color: var(--clr-secondary);
    margin-bottom: 24px;
    background: -webkit-linear-gradient(var(--clr-primary), var(--clr-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.glass-card h3 {
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.glass-card p {
    margin-bottom: 24px;
    flex-grow: 1;
}

/* =========================================
   FEATURES SECTION
   ========================================= */
.glass-panel {
    background: linear-gradient(135deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-lg);
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
}

.features-content {
    padding: 60px;
}
.features-content h2 {
    font-size: 2.5rem;
    margin-bottom: 16px;
}
.features-content p {
    margin-bottom: 40px;
}

.features-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}
.features-list li {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}
.features-list i {
    font-size: 1.5rem;
    background: rgba(255,255,255,0.05);
    padding: 16px;
    border-radius: 12px;
}
.features-list h5 {
    font-size: 1.125rem;
    margin-bottom: 4px;
}

.features-image {
    position: relative;
    background: rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.dashboard-mockup {
    width: 120%;
    height: auto;
    border-radius: 12px;
    transform: perspective(1000px) rotateY(-15deg) rotateX(5deg) scale(1.1);
    box-shadow: -20px 20px 40px rgba(0,0,0,0.5);
    transition: var(--transition-smooth);
    opacity: 0.8;
}
.glass-panel:hover .dashboard-mockup {
    transform: perspective(1000px) rotateY(-5deg) rotateX(2deg) scale(1.15);
    opacity: 1;
}

.glow-circle {
    position: absolute;
    width: 300px;
    height: 300px;
    background: var(--clr-primary);
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    z-index: 0;
}

/* =========================================
   CTA SECTION
   ========================================= */
.cta-box {
    background: var(--grad-primary);
    border-radius: var(--radius-lg);
    padding: 80px 40px;
    position: relative;
    overflow: hidden;
}
.cta-box::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><rect width="100" height="100" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5" stroke-dasharray="2 2" /></svg>');
    background-size: 20px 20px;
    opacity: 0.5;
    pointer-events: none;
}
.cta-box h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}
.cta-box p {
    font-size: 1.25rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 40px;
    position: relative;
    z-index: 2;
}
.cta-box .btn {
    background: white;
    color: var(--clr-primary);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    position: relative;
    z-index: 2;
}
.cta-box .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}

/* =========================================
   FOOTER
   ========================================= */
.footer {
    background: #02040a;
    padding-top: 80px;
    border-top: 1px solid var(--clr-border);
}

.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-brand p {
    margin-top: 16px;
    max-width: 300px;
}

.footer h4 {
    font-size: 1.25rem;
    margin-bottom: 24px;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.footer-links a:hover {
    color: var(--clr-primary);
    padding-left: 5px;
}

.footer-contact p {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.social-icons {
    display: flex;
    gap: 16px;
    margin-top: 24px;
}
.social-icons a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--clr-bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--clr-border);
}
.social-icons a:hover {
    background: var(--clr-primary);
    border-color: var(--clr-primary);
    color: white;
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding: 24px 0;
    border-top: 1px solid var(--clr-border);
    font-size: 0.875rem;
}

/* =========================================
   ANIMATIONS
   ========================================= */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.fade-in-left {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.fade-in-right {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.is-visible {
    opacity: 1;
    transform: translate(0);
}

/* =========================================
   RESPONSIVE DESIGN
   ========================================= */
@media (max-width: 1024px) {
    .hero h1 { font-size: 3rem; }
    .hero-container, .about-grid, .glass-panel {
        grid-template-columns: 1fr;
    }
    .features-image { min-height: 300px; }
}

@media (max-width: 768px) {
    .nav-links {
        display: none; /* simple mobile menu fallback */
    }
    .mobile-menu-toggle {
        display: block;
    }
    
    .section-header h2 { font-size: 2.25rem; }
    
    .hero { text-align: center; padding-top: 120px; }
    .hero-content { margin: 0 auto; }
    .hero-btns { justify-content: center; flex-direction: column; }
    
    .footer-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}
