/* ============================================================
   SOTOR CODE - Premium Design System v2.0
   Innovative Cyberpunk / Glassmorphism / Neon Tech
   ============================================================ */

/* ========== Custom Fonts ========== */
@font-face {
    font-family: 'DINNext';
    src: url('../fonts/DINNext.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Tajawal:wght@300;400;500;700;800;900&family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

/* ========== CSS Custom Properties ========== */
:root {
    /* Primary Palette - Cyan to Violet */
    --cyan-400: #22d3ee;
    --cyan-500: #06b6d4;
    --cyan-600: #0891b2;
    --violet-400: #a78bfa;
    --violet-500: #8b5cf6;
    --violet-600: #7c3aed;
    --fuchsia-400: #e879f9;
    --fuchsia-500: #d946ef;
    --fuchsia-600: #c026d3;

    /* Accent Colors */
    --amber-400: #fbbf24;
    --amber-500: #f59e0b;
    --emerald-400: #34d399;
    --emerald-500: #10b981;
    --rose-400: #fb7185;
    --rose-500: #f43f5e;

    /* Neutral Palette */
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    --slate-950: #020617;

    /* Theme-specific variables (Dark by default) */
    --bg-primary: #030014;
    --bg-secondary: #0a0520;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);

    /* Text */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.65);

    /* Glass */
    --glass-bg: rgba(255, 255, 255, 0.04);
    --glass-bg-strong: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-border-hover: rgba(255, 255, 255, 0.15);
    --glass-blur: 20px;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--cyan-500), var(--violet-500));
    --gradient-secondary: linear-gradient(135deg, var(--violet-500), var(--fuchsia-500));
    --gradient-accent: linear-gradient(135deg, var(--fuchsia-500), var(--amber-400));
    --gradient-glow: linear-gradient(135deg, var(--cyan-400), var(--violet-400), var(--fuchsia-400));
    --gradient-hero: linear-gradient(135deg, #06b6d4, #8b5cf6, #d946ef, #f59e0b);

    /* Neon Glow */
    --glow-cyan: 0 0 20px rgba(6, 182, 212, 0.3), 0 0 40px rgba(6, 182, 212, 0.1);
    --glow-violet: 0 0 20px rgba(139, 92, 246, 0.3), 0 0 40px rgba(139, 92, 246, 0.1);
    --glow-fuchsia: 0 0 20px rgba(217, 70, 239, 0.3), 0 0 40px rgba(217, 70, 239, 0.1);

    /* Typography */
    --font-ar: 'DINNext', 'Tajawal', sans-serif;
    --font-en: 'DINNext', 'Space Grotesk', 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Spacing */
    --section-padding: clamp(4rem, 8vw, 8rem);
    --container-max: 1280px;
    --container-padding: clamp(1rem, 4vw, 2rem);

    /* Transitions */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);

    /* Border Radius */
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-2xl: 2rem;
    --radius-full: 9999px;
}

/* ========== Light Theme Overrides ========== */
[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #f1f5f9;
    --bg-card: rgba(15, 23, 42, 0.02);
    --bg-card-hover: rgba(15, 23, 42, 0.04);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --glass-bg: rgba(15, 23, 42, 0.03);
    --glass-bg-strong: rgba(15, 23, 42, 0.06);
    --glass-border: rgba(15, 23, 42, 0.08);
    --glass-border-hover: rgba(15, 23, 42, 0.12);
    --slate-400: #475569; /* Dynamic description color override */
    --slate-500: #64748b;
    --slate-600: #94a3b8;
}

/* ========== Reset & Base ========== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-ar);
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.4s ease, color 0.4s ease;
}

[dir="ltr"] body,
[dir="ltr"] * {
    font-family: var(--font-en) !important;
}

[dir="ltr"] .code-block,
[dir="ltr"] .code-block * {
    font-family: var(--font-mono) !important;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    color: inherit;
}

input, textarea, select {
    font-family: inherit;
    outline: none;
}

ul, ol {
    list-style: none;
}

/* ========== Scroll Progress Bar ========== */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--gradient-hero);
    z-index: 10000;
    transition: width 0.1s linear;
}

/* ========== Loading Screen ========== */
#loading-screen {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s var(--ease-out-expo), visibility 0.8s;
}

#loading-screen.loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-logo {
    width: 80px;
    height: 80px;
    animation: loaderPulse 1.5s ease-in-out infinite;
    filter: drop-shadow(0 0 30px rgba(139, 92, 246, 0.5));
}

.loader-bar {
    width: 200px;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    margin-top: 2rem;
    overflow: hidden;
    position: relative;
}

.loader-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    border-radius: inherit;
    animation: loaderSlide 1.2s ease-in-out infinite;
}

.loader-text {
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: var(--slate-400);
    letter-spacing: 3px;
    text-transform: uppercase;
    animation: loaderFade 1.5s ease-in-out infinite;
}

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

@keyframes loaderSlide {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes loaderFade {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* ========== Particle Canvas ========== */
#particle-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.6;
}

/* ========== Container ========== */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* ========== Glass Effect ========== */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
}

.glass-strong {
    background: var(--glass-bg-strong);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border-hover);
}

/* ========== Navbar ========== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0;
    transition: all 0.4s var(--ease-out-expo);
}

.navbar.scrolled {
    background: var(--bg-primary);
    opacity: 0.98;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 5rem;
}

.navbar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.navbar-logo img {
    width: 2.75rem;
    height: 2.75rem;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.3));
    transition: filter 0.3s ease;
}

.navbar-logo:hover img {
    filter: drop-shadow(0 0 20px rgba(139, 92, 246, 0.6));
}

.navbar-logo span {
    font-size: 1.25rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Desktop Nav Links */
.nav-links {
    display: none;
    align-items: center;
    gap: 0.25rem;
}

@media (min-width: 1024px) {
    .nav-links {
        display: flex;
    }
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.85rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-card-hover);
}

.nav-link.active {
    color: var(--cyan-500);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
}

.nav-link svg {
    width: 1.1rem;
    height: 1.1rem;
    opacity: 0.7;
}

/* Dropdown */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.85rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.nav-dropdown-btn:hover {
    color: var(--text-primary);
    background: var(--bg-card-hover);
}

.nav-dropdown-btn svg {
    width: 1.1rem;
    height: 1.1rem;
    opacity: 0.7;
}

.nav-dropdown-btn .chevron {
    width: 0.85rem;
    height: 0.85rem;
    transition: transform 0.3s ease;
}

.nav-dropdown:hover .chevron {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    inset-inline-start: 0;
    padding-top: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.3s var(--ease-out-expo);
    z-index: 100;
}

.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-content {
    background: var(--bg-secondary);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 0.5rem;
    min-width: 220px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 30px rgba(139, 92, 246, 0.1);
}

[data-theme="light"] .nav-dropdown-content {
    background: #ffffff;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.1), 0 0 30px rgba(139, 92, 246, 0.05);
}

.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.85rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    color: var(--text-secondary);
    transition: all 0.25s ease;
}

.nav-dropdown-item:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    transform: translateX(-4px);
}

[dir="ltr"] .nav-dropdown-item:hover {
    transform: translateX(4px);
}

.nav-dropdown-item svg {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

/* Nav Right Section */
.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Language Switcher */
.lang-switch {
    display: flex;
    align-items: center;
    gap: 2px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    padding: 3px;
}

/* Form Select Background overrides */
[data-theme="light"] .lang-switch {
    background: rgba(15, 23, 42, 0.04);
}

.lang-btn {
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.3s var(--ease-spring);
}

.lang-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.08);
}

.lang-btn.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

/* CTA Button */
.nav-cta {
    display: none;
    padding: 0.6rem 1.5rem;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    font-weight: 700;
    font-size: 0.875rem;
    color: white;
    transition: all 0.3s var(--ease-out-expo);
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
    position: relative;
    overflow: hidden;
}

@media (min-width: 640px) {
    .nav-cta {
        display: inline-flex;
    }
}

.nav-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.5);
}

.nav-cta:hover::before {
    opacity: 1;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s ease;
}

.mobile-menu-btn:hover {
    color: white;
}

.mobile-menu-btn svg {
    width: 1.5rem;
    height: 1.5rem;
}

@media (min-width: 1024px) {
    .mobile-menu-btn {
        display: none;
    }
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(3, 0, 20, 0.95);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
}

.mobile-menu.open {
    display: block;
    animation: mobileMenuOpen 0.3s var(--ease-out-expo);
}

@keyframes mobileMenuOpen {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.mobile-menu-links {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.mobile-menu-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-lg);
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.25s ease;
}

.mobile-menu-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: white;
}

/* ========== Hero Section ========== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 5rem;
    overflow: hidden;
}

/* Animated Gradient Blobs */
.hero-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.25;
    pointer-events: none;
    animation: blobFloat 20s ease-in-out infinite;
}

.hero-blob-1 {
    width: 600px;
    height: 600px;
    background: var(--violet-500);
    top: -200px;
    inset-inline-start: -200px;
    animation-delay: 0s;
}

.hero-blob-2 {
    width: 500px;
    height: 500px;
    background: var(--cyan-500);
    bottom: -150px;
    inset-inline-end: -150px;
    animation-delay: -7s;
}

.hero-blob-3 {
    width: 400px;
    height: 400px;
    background: var(--fuchsia-500);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
}

@keyframes blobFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -40px) scale(1.1); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(40px, 30px) scale(1.05); }
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 2;
    padding: 3rem 0;
}

@media (min-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
        padding: 5rem 0;
    }
}

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

@media (min-width: 1024px) {
    .hero-content {
        text-align: start;
    }
}

/* Badge */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    border-radius: var(--radius-full);
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    color: var(--violet-400);
}

.hero-badge .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--emerald-400);
    animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.5); }
}

/* Hero Title */
.hero-title {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 1.5rem;
}

.hero-title-line {
    display: block;
}

/* Gradient Text */
.gradient-text {
    background: var(--gradient-hero);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Glitch Effect */
.glitch-text {
    position: relative;
    display: inline-block;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    background: var(--bg-primary);
    -webkit-background-clip: text;
    background-clip: text;
    overflow: hidden;
}

.glitch-text::before {
    left: 2px;
    text-shadow: -2px 0 var(--cyan-400);
    clip-path: inset(0 100% 0 0);
    animation: glitch1 4s infinite linear alternate-reverse;
}

.glitch-text::after {
    left: -2px;
    text-shadow: 2px 0 var(--fuchsia-400);
    clip-path: inset(0 0 0 100%);
    animation: glitch2 4s infinite linear alternate-reverse;
}

@keyframes glitch1 {
    0% { clip-path: inset(0 100% 0 0); }
    4% { clip-path: inset(20% 0 60% 0); }
    8% { clip-path: inset(0 100% 0 0); }
    12% { clip-path: inset(70% 0 10% 0); }
    16% { clip-path: inset(0 100% 0 0); }
    100% { clip-path: inset(0 100% 0 0); }
}

@keyframes glitch2 {
    0% { clip-path: inset(0 0 0 100%); }
    6% { clip-path: inset(40% 0 30% 0); }
    10% { clip-path: inset(0 0 0 100%); }
    14% { clip-path: inset(60% 0 20% 0); }
    18% { clip-path: inset(0 0 0 100%); }
    100% { clip-path: inset(0 0 0 100%); }
}

.hero-description {
    font-size: 1.1rem;
    color: var(--slate-400);
    line-height: 1.8;
    max-width: 540px;
    margin-bottom: 2rem;
}

@media (max-width: 1023px) {
    .hero-description {
        margin: 0 auto 2rem;
    }
}

/* Hero Buttons */
.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
}

@media (min-width: 640px) {
    .hero-buttons {
        flex-direction: row;
    }
}

@media (min-width: 1024px) {
    .hero-buttons {
        justify-content: flex-start;
    }
}

/* ========== Buttons ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.9rem 2rem;
    border-radius: var(--radius-xl);
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.4s var(--ease-out-expo);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.3);
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(139, 92, 246, 0.5);
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn svg {
    width: 1.25rem;
    height: 1.25rem;
}

[dir="rtl"] .btn svg.arrow-icon {
    transform: rotate(180deg);
}

/* ========== Code Block (Hero) ========== */
.hero-visual {
    position: relative;
}

.code-card {
    position: relative;
    z-index: 2;
    border-radius: var(--radius-2xl);
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    animation: codeFloat 8s ease-in-out infinite;
}

@keyframes codeFloat {
    0%, 100% { transform: translateY(0) rotateX(0); }
    50% { transform: translateY(-15px) rotateX(2deg); }
}

.code-block {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(3, 0, 20, 0.9));
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.8;
    overflow-x: auto;
}

.code-dots {
    display: flex;
    gap: 6px;
    margin-bottom: 1rem;
}

.code-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.code-dots span:nth-child(1) { background: #ef4444; }
.code-dots span:nth-child(2) { background: #eab308; }
.code-dots span:nth-child(3) { background: #22c55e; }

.code-block .keyword { color: var(--violet-400); }
.code-block .variable { color: var(--cyan-400); }
.code-block .string { color: var(--amber-400); }
.code-block .property { color: var(--emerald-400); }
.code-block .value { color: var(--fuchsia-400); }
.code-block .comment { color: var(--slate-500); }

.hero-visual-glow {
    position: absolute;
    inset: -20%;
    background: radial-gradient(ellipse at center, rgba(139, 92, 246, 0.15), transparent 70%);
    z-index: 0;
    pointer-events: none;
}

/* ========== Tech Marquee ========== */
.tech-marquee {
    padding: 2rem 0;
    overflow: hidden;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    position: relative;
    z-index: 2;
}

.marquee-track {
    display: flex;
    gap: 3rem;
    animation: marqueeScroll 40s linear infinite;
    width: max-content;
}

@keyframes marqueeScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

[dir="rtl"] .marquee-track {
    animation: marqueeScrollRTL 40s linear infinite;
}

@keyframes marqueeScrollRTL {
    0% { transform: translateX(0); }
    100% { transform: translateX(50%); }
}

.marquee-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--slate-500);
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    transition: color 0.3s ease;
}

.marquee-item:hover {
    color: var(--cyan-400);
}

.marquee-item svg,
.marquee-item img {
    width: 1.25rem;
    height: 1.25rem;
    opacity: 0.75;
    filter: brightness(0) invert(1);
}

[data-theme="light"] .marquee-item svg,
[data-theme="light"] .marquee-item img {
    filter: none;
}

.marquee-item:hover img {
    opacity: 1;
}

.marquee-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--violet-500);
    opacity: 0.5;
}

/* ========== Section Common ========== */
.section {
    padding: var(--section-padding) 0;
    position: relative;
    z-index: 2;
}

.section-border {
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-title {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    font-weight: 900;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--slate-400);
}

.section-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    box-shadow: var(--glow-violet);
}

.section-icon svg {
    width: 1.5rem;
    height: 1.5rem;
    color: white;
}

/* ========== Services Grid ========== */
.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

@media (min-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ========== Service Card ========== */
.service-card {
    position: relative;
    display: block;
    padding: 2rem;
    border-radius: var(--radius-2xl);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    transition: all 0.5s var(--ease-out-expo);
    overflow: hidden;
    cursor: pointer;
}

.service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: var(--gradient-primary);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.5s ease;
}

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

.service-card:hover::before {
    opacity: 1;
}

.service-card-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    transition: transform 0.4s var(--ease-spring);
    position: relative;
}

.service-card:hover .service-card-icon {
    transform: scale(1.1) rotate(-5deg);
}

.service-card-icon svg {
    width: 1.75rem;
    height: 1.75rem;
    color: white;
}

.service-card-icon.cyan { background: linear-gradient(135deg, var(--cyan-600), var(--cyan-400)); box-shadow: 0 8px 25px rgba(6, 182, 212, 0.3); }
.service-card-icon.violet { background: linear-gradient(135deg, var(--violet-600), var(--violet-400)); box-shadow: 0 8px 25px rgba(139, 92, 246, 0.3); }
.service-card-icon.fuchsia { background: linear-gradient(135deg, var(--fuchsia-600), var(--fuchsia-400)); box-shadow: 0 8px 25px rgba(217, 70, 239, 0.3); }
.service-card-icon.amber { background: linear-gradient(135deg, var(--amber-500), var(--amber-400)); box-shadow: 0 8px 25px rgba(245, 158, 11, 0.3); }
.service-card-icon.emerald { background: linear-gradient(135deg, var(--emerald-500), var(--emerald-400)); box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3); }
.service-card-icon.rose { background: linear-gradient(135deg, var(--rose-500), var(--rose-400)); box-shadow: 0 8px 25px rgba(244, 63, 94, 0.3); }

.service-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.65rem;
}

.service-card p {
    color: var(--slate-400);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.service-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.875rem;
    font-weight: 600;
    transition: gap 0.3s ease;
}

.service-card:hover .service-card-link {
    gap: 0.7rem;
}

.service-card-link svg {
    width: 1rem;
    height: 1rem;
}

.link-cyan { color: var(--cyan-400); }
.link-violet { color: var(--violet-400); }
.link-fuchsia { color: var(--fuchsia-400); }
.link-amber { color: var(--amber-400); }
.link-emerald { color: var(--emerald-400); }
.link-rose { color: var(--rose-400); }

/* ========== Programs & Systems ========== */
.programs-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .programs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.program-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: var(--radius-xl);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    transition: all 0.4s var(--ease-out-expo);
}

.program-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--glass-border-hover);
    transform: translateY(-4px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.program-icon {
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    transition: transform 0.3s var(--ease-spring);
}

.program-card:hover .program-icon {
    transform: scale(1.1);
}

.program-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.program-info {
    flex: 1;
}

.program-badge {
    display: inline-flex;
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-full);
    margin-bottom: 0.35rem;
}

.program-info h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.program-info p {
    font-size: 0.8rem;
    color: var(--slate-400);
    line-height: 1.6;
}

/* Sub-section Title */
.subsection-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--violet-400);
}

.subsection-title svg {
    width: 1.75rem;
    height: 1.75rem;
}

/* ========== Systems Grid ========== */
.systems-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 640px) {
    .systems-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .systems-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.system-card {
    display: block;
    padding: 1.25rem;
    border-radius: var(--radius-xl);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    text-align: center;
    transition: all 0.4s var(--ease-out-expo);
}

.system-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--glass-border-hover);
    transform: translateY(-4px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.system-card-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    overflow: hidden;
    transition: transform 0.3s var(--ease-spring);
}

.system-card:hover .system-card-icon {
    transform: scale(1.1);
}

.system-card-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.system-badge {
    display: inline-flex;
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-full);
    margin-bottom: 0.35rem;
}

.system-card h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.system-card p {
    font-size: 0.8rem;
    color: var(--slate-400);
    line-height: 1.6;
}

/* ========== Apps Gallery ========== */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 640px) {
    .apps-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .apps-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.app-card {
    display: block;
    padding: 1.25rem;
    border-radius: var(--radius-xl);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    text-align: center;
    transition: all 0.4s var(--ease-out-expo);
}

.app-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--glass-border-hover);
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
}

.app-card-icon {
    width: 4rem;
    height: 4rem;
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    overflow: hidden;
    transition: transform 0.4s var(--ease-spring);
}

.app-card:hover .app-card-icon {
    transform: scale(1.15) rotate(-3deg);
}

.app-card-icon img {
    width: 2.5rem;
    height: 2.5rem;
    object-fit: contain;
}

.app-card-icon svg {
    width: 2rem;
    height: 2rem;
    color: white;
}

.app-badge {
    display: inline-flex;
    font-size: 0.65rem;
    padding: 0.12rem 0.45rem;
    border-radius: var(--radius-full);
    margin-bottom: 0.35rem;
}

.app-card h4 {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.app-card p {
    font-size: 0.75rem;
    color: var(--slate-400);
    line-height: 1.5;
}

/* ========== Portfolio ========== */
.portfolio-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

@media (min-width: 768px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .portfolio-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.portfolio-card {
    border-radius: var(--radius-2xl);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    overflow: hidden;
    transition: all 0.5s var(--ease-out-expo);
}

.portfolio-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border-color: var(--glass-border-hover);
}

.portfolio-card-visual {
    aspect-ratio: 16 / 9;
    position: relative;
    overflow: hidden;
    background: var(--bg-secondary);
}

.portfolio-preview-img {
    width: 100%;
    height: auto;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    transform: translateY(0);
    transition: transform 1s ease-in-out;
}

.portfolio-card-visual::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--bg-primary), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.portfolio-card:hover .portfolio-card-visual::after {
    opacity: 0.5;
}

.portfolio-card-visual svg {
    width: 3rem;
    height: 3rem;
    transition: transform 0.4s var(--ease-spring);
}

.portfolio-card:hover .portfolio-card-visual svg {
    transform: scale(1.2);
}

.portfolio-card-body {
    padding: 1.5rem;
}

.portfolio-card-body h4 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.portfolio-card-body p {
    font-size: 0.85rem;
    color: var(--slate-400);
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.portfolio-tag {
    display: inline-flex;
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
}

/* ========== Stats Section ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
    border-radius: var(--radius-xl);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    transition: all 0.4s var(--ease-out-expo);
}

.stat-item:hover {
    background: var(--bg-card-hover);
    transform: translateY(-4px);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 0.35rem;
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--slate-400);
}

/* ========== CTA Section ========== */
.cta-section {
    position: relative;
    overflow: hidden;
}

.cta-card {
    position: relative;
    text-align: center;
    padding: 3.5rem 2rem;
    border-radius: var(--radius-2xl);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    overflow: hidden;
}

.cta-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(139, 92, 246, 0.08), transparent 70%);
    pointer-events: none;
}

.cta-aurora {
    position: absolute;
    inset: -50%;
    background: conic-gradient(from 0deg, transparent, var(--cyan-500), transparent, var(--violet-500), transparent, var(--fuchsia-500), transparent);
    animation: auroraRotate 15s linear infinite;
    opacity: 0.04;
    pointer-events: none;
}

@keyframes auroraRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.cta-title {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 900;
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 2;
}

.cta-description {
    font-size: 1.1rem;
    color: var(--slate-400);
    margin-bottom: 2rem;
    position: relative;
    z-index: 2;
}

/* ========== Footer ========== */
.footer {
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding: 3rem 0;
    position: relative;
    z-index: 2;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .footer-inner {
        flex-direction: row;
        justify-content: space-between;
    }
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-logo img {
    width: 2rem;
    height: 2rem;
    object-fit: contain;
}

.footer-logo span {
    font-weight: 700;
    font-size: 0.95rem;
}

.footer-copy {
    font-size: 0.85rem;
    color: var(--slate-500);
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-link {
    font-size: 0.85rem;
    color: var(--slate-500);
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--cyan-400);
}

.footer-socials {
    display: flex;
    gap: 0.75rem;
}

.footer-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--slate-400);
    transition: all 0.3s ease;
}

.footer-social-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.15);
}

.footer-social-link svg {
    width: 1.1rem;
    height: 1.1rem;
}

/* ========== Scroll Reveal Animations ========== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s var(--ease-out-expo);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: all 0.8s var(--ease-out-expo);
}

.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: all 0.8s var(--ease-out-expo);
}

.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.8s var(--ease-out-expo);
}

.reveal-scale.visible {
    opacity: 1;
    transform: scale(1);
}

/* Stagger children */
.stagger-children > * {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s var(--ease-out-expo);
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.08s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.16s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.24s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.32s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.4s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(7) { transition-delay: 0.48s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(8) { transition-delay: 0.56s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(9) { transition-delay: 0.64s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(10) { transition-delay: 0.72s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(11) { transition-delay: 0.8s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(12) { transition-delay: 0.88s; opacity: 1; transform: translateY(0); }

/* ========== Badge Colors ========== */
.badge-cyan { color: var(--cyan-400); background: rgba(6, 182, 212, 0.1); }
.badge-violet { color: var(--violet-400); background: rgba(139, 92, 246, 0.1); }
.badge-fuchsia { color: var(--fuchsia-400); background: rgba(217, 70, 239, 0.1); }
.badge-amber { color: var(--amber-400); background: rgba(245, 158, 11, 0.1); }
.badge-emerald { color: var(--emerald-400); background: rgba(16, 185, 129, 0.1); }
.badge-rose { color: var(--rose-400); background: rgba(244, 63, 94, 0.1); }
.badge-blue { color: #60a5fa; background: rgba(96, 165, 250, 0.1); }
.badge-teal { color: #2dd4bf; background: rgba(45, 212, 191, 0.1); }
.badge-indigo { color: #818cf8; background: rgba(129, 140, 248, 0.1); }
.badge-orange { color: #fb923c; background: rgba(251, 146, 60, 0.1); }
.badge-sky { color: #38bdf8; background: rgba(56, 189, 248, 0.1); }

/* Gradient backgrounds for icons */
.bg-gradient-cyan { background: linear-gradient(135deg, var(--cyan-600), var(--cyan-400)); }
.bg-gradient-violet { background: linear-gradient(135deg, var(--violet-600), var(--violet-400)); }
.bg-gradient-fuchsia { background: linear-gradient(135deg, var(--fuchsia-600), var(--fuchsia-400)); }
.bg-gradient-amber { background: linear-gradient(135deg, var(--amber-500), var(--amber-400)); }
.bg-gradient-emerald { background: linear-gradient(135deg, var(--emerald-500), var(--emerald-400)); }
.bg-gradient-rose { background: linear-gradient(135deg, var(--rose-500), var(--rose-400)); }
.bg-gradient-blue { background: linear-gradient(135deg, #3b82f6, #60a5fa); }
.bg-gradient-teal { background: linear-gradient(135deg, #14b8a6, #2dd4bf); }
.bg-gradient-indigo { background: linear-gradient(135deg, #6366f1, #818cf8); }
.bg-gradient-orange { background: linear-gradient(135deg, #f97316, #fb923c); }
.bg-gradient-sky { background: linear-gradient(135deg, #0284c7, #38bdf8); }

/* Background tint for program icons */
.bg-tint-cyan { background: rgba(6, 182, 212, 0.15); }
.bg-tint-violet { background: rgba(139, 92, 246, 0.15); }
.bg-tint-fuchsia { background: rgba(217, 70, 239, 0.15); }
.bg-tint-amber { background: rgba(245, 158, 11, 0.15); }
.bg-tint-emerald { background: rgba(16, 185, 129, 0.15); }
.bg-tint-rose { background: rgba(244, 63, 94, 0.15); }
.bg-tint-blue { background: rgba(96, 165, 250, 0.15); }
.bg-tint-teal { background: rgba(45, 212, 191, 0.15); }
.bg-tint-indigo { background: rgba(129, 140, 248, 0.15); }

/* ========== Chat Response Styling ========== */
.chat-response { line-height: 1.6; }
.chat-response p { margin-bottom: 0.5rem; }
.chat-response p:last-child { margin-bottom: 0; }
.chat-response strong { color: var(--violet-400); font-weight: 600; }
.chat-response em { font-style: italic; color: var(--slate-400); }
.chat-response li { margin-inline-start: 1rem; list-style-type: disc; margin-bottom: 0.25rem; }

/* ========== Contact Page ========== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

@media (min-width: 1024px) {
    .contact-grid {
        grid-template-columns: 1fr 1fr;
    }
}

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

.contact-info-icon {
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.contact-info-icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

.contact-info-label {
    font-size: 0.8rem;
    color: var(--slate-500);
    margin-bottom: 0.15rem;
}

.contact-info-value {
    font-weight: 600;
    font-size: 0.95rem;
}

.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 2rem;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, #16a34a, #22c55e);
    color: white;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s var(--ease-out-expo);
    box-shadow: 0 8px 30px rgba(22, 163, 74, 0.3);
}

.btn-whatsapp:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(22, 163, 74, 0.5);
}

.btn-whatsapp svg {
    width: 1.5rem;
    height: 1.5rem;
}

.contact-form {
    padding: 2rem;
    border-radius: var(--radius-2xl);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
}

.contact-form h2 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    color: var(--slate-400);
    margin-bottom: 0.4rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    color: white;
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--slate-600);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--violet-500);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.form-select {
    appearance: none;
    cursor: pointer;
}

.form-select option {
    background: var(--bg-primary);
}

.form-textarea {
    resize: none;
    min-height: 120px;
}

.btn-submit {
    width: 100%;
    padding: 0.9rem;
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-lg);
    color: white;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s var(--ease-out-expo);
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.2);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(139, 92, 246, 0.4);
}

/* ========== Utility Classes ========== */
.text-center { text-align: center; }
.hidden { display: none !important; }
.relative { position: relative; }
.z-10 { z-index: 10; }
.mb-4 { margin-bottom: 1rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-16 { margin-top: 4rem; }

/* ========== Responsive ========== */
@media (max-width: 640px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .stats-grid {
        gap: 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}

/* ========== Cursor Trail ========== */
.cursor-trail {
    position: fixed;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--violet-500);
    pointer-events: none;
    z-index: 99998;
    opacity: 0;
    transition: opacity 0.3s ease;
    mix-blend-mode: screen;
    filter: blur(1px);
}

@media (pointer: coarse) {
    .cursor-trail {
        display: none;
    }
}

/* ========== Print Styles ========== */
@media print {
    .navbar, #particle-canvas, .cursor-trail, #scroll-progress, #loading-screen {
        display: none !important;
    }
}

/* ========== Theme Toggle Switcher ========== */
.theme-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-full);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    transition: all 0.3s var(--ease-spring);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.theme-toggle-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--glass-border-hover);
    transform: scale(1.05);
}

.theme-toggle-btn svg {
    width: 1.25rem;
    height: 1.25rem;
    transition: transform 0.5s var(--ease-spring), opacity 0.3s ease;
    flex-shrink: 0;
}

/* Icon transitions */
.theme-toggle-btn .sun-icon {
    position: absolute;
    transform: translateY(30px) rotate(120deg);
    opacity: 0;
}
.theme-toggle-btn .moon-icon {
    transform: translateY(0) rotate(0);
    opacity: 1;
}

[data-theme="light"] .theme-toggle-btn .sun-icon {
    transform: translateY(0) rotate(0);
    opacity: 1;
}
[data-theme="light"] .theme-toggle-btn .moon-icon {
    transform: translateY(-30px) rotate(-120deg);
    opacity: 0;
}

/* ========== Product Showcase Tabs ========== */
.tabs-container {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 0.6rem 1.5rem;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-secondary);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    transition: all 0.3s var(--ease-spring);
    cursor: pointer;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: var(--bg-card-hover);
    border-color: var(--glass-border-hover);
    transform: translateY(-2px);
}

.tab-btn.active {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

/* Tab filter animation */
.tab-content-item {
    transition: opacity 0.4s ease, transform 0.4s ease;
}
.tab-content-item.hidden-tab {
    display: none !important;
    opacity: 0;
    transform: translateY(10px);
}

/* ========== Bento Grid Portfolio Layout ========== */
@media (min-width: 1024px) {
    .portfolio-grid.bento {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        grid-auto-rows: 240px;
        gap: 1.5rem;
    }
    
    .portfolio-grid.bento .portfolio-card {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        height: 100%;
    }
    
    .portfolio-grid.bento .portfolio-card-visual {
        flex: 1;
        height: 100%;
        min-height: 120px;
    }

    .portfolio-grid.bento .portfolio-card-body {
        padding: 1.25rem;
        flex-shrink: 0;
    }

    .portfolio-grid.bento .portfolio-card:nth-child(1) {
        grid-column: span 2;
        grid-row: span 2;
    }
    
    .portfolio-grid.bento .portfolio-card:nth-child(2) {
        grid-column: span 1;
        grid-row: span 1;
    }
    
    .portfolio-grid.bento .portfolio-card:nth-child(3) {
        grid-column: span 1;
        grid-row: span 2;
    }
    
    .portfolio-grid.bento .portfolio-card:nth-child(4) {
        grid-column: span 2;
        grid-row: span 1;
    }
    
    .portfolio-grid.bento .portfolio-card:nth-child(5) {
        grid-column: span 1;
        grid-row: span 1;
    }
    
    .portfolio-grid.bento .portfolio-card:nth-child(6) {
        grid-column: span 2;
        grid-row: span 1;
    }
}

/* ========== Form Light Mode Overrides ========== */
[data-theme="light"] .form-input,
[data-theme="light"] .form-select,
[data-theme="light"] .form-textarea {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.12);
    color: #0f172a;
}
[data-theme="light"] .form-input::placeholder,
[data-theme="light"] .form-textarea::placeholder {
    color: #94a3b8;
}
[data-theme="light"] .form-select option {
    background: #ffffff;
    color: #0f172a;
}

[data-theme="light"] .contact-info-icon {
    background: rgba(15, 23, 42, 0.03);
    border-color: rgba(15, 23, 42, 0.08);
}