/* =========================================
   AHMED RABI | AI-FIRST DESIGN SYSTEM
   Version: 1.0.0
   Theme: Void / Electric / Cyber
   ========================================= */

/* -----------------------------------------
   1. CORE VARIABLES (THE SOURCE OF TRUTH)
   ----------------------------------------- */
:root {
    /* 🎨 COLOR PALETTE */
    --color-void: #030304;       /* Deepest Black */
    --color-panel: #0a0a0c;      /* Surface Black */
    --color-text-main: #e5e7eb;  /* Off-White */
    --color-text-muted: #9ca3af; /* Cool Gray */
    
    /* 🔥 ACCENTS (The "AI" Feel) */
    --color-primary: #3b82f6;    /* Electric Blue */
    --color-accent: #8b5cf6;     /* Cyber Purple */
    --color-success: #10b981;    /* Signal Green */
    --color-terminal: #22c55e;   /* Matrix Green */
    --color-error: #ef4444;      /* System Red */

    /* ✨ GRADIENTS & GLOWS */
    --gradient-hero: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    --gradient-void: linear-gradient(to bottom, var(--color-void), var(--color-panel));
    --glow-primary: 0 0 20px rgba(59, 130, 246, 0.5);
    --glow-accent: 0 0 20px rgba(139, 92, 246, 0.5);

    /* 📐 SPACING & LAYOUT */
    --container-max: 1280px;
    --header-height: 80px;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;

    /* 🅰️ TYPOGRAPHY */
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* ⚙️ TRANSITIONS */
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --duration-fast: 200ms;
    --duration-norm: 400ms;
    --duration-slow: 800ms;
}

/* -----------------------------------------
   2. RESET & BASE STYLES
   ----------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--color-void);
    color: var(--color-text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Scrollbar Styling */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--color-void); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-primary); }

/* Selection Styling */
::selection {
    background: var(--color-primary);
    color: #fff;
}

/* -----------------------------------------
   3. TYPOGRAPHY SYSTEM
   ----------------------------------------- */
h1, h2, h3, h4, h5, h6 {
    color: #fff;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    text-transform: uppercase;
}

h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.5rem; }

p {
    margin-bottom: 1.5rem;
    color: var(--color-text-muted);
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--duration-fast) var(--ease-smooth);
}

.font-mono { font-family: var(--font-mono); }
.text-gradient {
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* -----------------------------------------
   4. LAYOUT UTILITIES
   ----------------------------------------- */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 6rem 0;
    position: relative;
}

.grid-2 { display: grid; grid-template-columns: 1fr; gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: 2rem; }

@media (min-width: 768px) {
    .grid-2 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

/* -----------------------------------------
   5. UI COMPONENTS
   ----------------------------------------- */

/* --- BUTTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: var(--radius-sm);
    transition: all var(--duration-fast) var(--ease-smooth);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: #fff;
    color: #000;
    border: 1px solid #fff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

.btn-secondary {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

/* --- CARDS & PANELS --- */
.card, .glass-panel {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: 2rem;
    transition: transform var(--duration-norm) var(--ease-smooth),
                border-color var(--duration-norm) var(--ease-smooth),
                box-shadow var(--duration-norm) var(--ease-smooth);
}

.card:hover {
    transform: translateY(-5px);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
}

/* --- FORMS --- */
.input-group {
    margin-bottom: 1.5rem;
}

.input-field {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 1rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    transition: all var(--duration-fast) ease;
}

.input-field:focus {
    outline: none;
    border-color: var(--color-primary);
    background: rgba(59, 130, 246, 0.05);
    box-shadow: 0 0 0 1px var(--color-primary);
}

label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

/* -----------------------------------------
   6. SPECIAL EFFECTS & ANIMATIONS
   ----------------------------------------- */

/* Cyber Grid Background */
.bg-grid {
    background-size: 50px 50px;
    background-image: linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
                      linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
    position: absolute;
    inset: 0;
    z-index: -1;
}

/* Reveal Animation (Used with JS Observer) */
.reveal-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity var(--duration-slow) var(--ease-smooth),
                transform var(--duration-slow) var(--ease-smooth);
}

.reveal-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Keyframes */
@keyframes pulse-glow {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes scanline {
    0% { top: -100px; }
    100% { top: 100%; }
}

/* Scanline Overlay (For Lab/Stunt Feel) */
.scanline-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100vh;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0) 50%, rgba(0,0,0,0.1) 50%, rgba(0,0,0,0.1));
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 999;
    opacity: 0.15;
}

/* -----------------------------------------
   7. UTILITY CLASSES
   ----------------------------------------- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.uppercase { text-transform: uppercase; }
.tracking-wide { letter-spacing: 0.1em; }

.text-primary { color: var(--color-primary); }
.text-accent { color: var(--color-accent); }
.text-success { color: var(--color-success); }
.text-terminal { color: var(--color-terminal); }

/* Sticky Nav Glass */
.nav-glass {
    background: rgba(3, 3, 4, 0.8);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* -----------------------------------------
   8. MEDIA QUERIES (Mobile Adjustments)
   ----------------------------------------- */
@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    
    .section { padding: 4rem 0; }
    
    .btn {
        width: 100%;
        margin-bottom: 1rem;
    }
}