/*
Theme Name: Ubaid Portfolio 3D
Theme URI: https://thestar10.com
Author: Ubaid ur Rehman
Author URI: https://thestar10.com
Description: A premium Elementor-compatible portfolio theme with 3D avatar, multi-layer parallax scrolling, GSAP scroll animations, and vibrant cyberpunk aesthetics. Built for creators who demand full visual editing control.
Version: 2.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ubaid-portfolio-3d
Tags: elementor, custom-background, custom-logo, custom-menu, featured-images, full-width-template, theme-options, translation-ready, portfolio
Elementor Compatible: yes
Elementor Pro Compatible: yes
*/

/* === CSS CUSTOM PROPERTIES (BRIGHT VIBRANT THEME) === */
:root {
    /* Primary Palette - Vibrant Cyberpunk */
    --primary-cyan: #00f0ff;
    --primary-magenta: #ff006e;
    --primary-purple: #8b5cf6;
    --accent-gold: #fbbf24;
    --accent-lime: #84ff00;

    /* Backgrounds - Deep but NOT flat black */
    --bg-deep: #070b1a;
    --bg-navy: #0a0e27;
    --bg-card: rgba(15, 20, 50, 0.7);
    --bg-glass: rgba(139, 92, 246, 0.08);
    --bg-glass-border: rgba(139, 92, 246, 0.15);

    /* Text */
    --text-primary: #f0f0ff;
    --text-secondary: #a0a0cc;
    --text-muted: #606090;

    /* Gradients */
    --gradient-hero: linear-gradient(135deg, #0a0e27 0%, #1a0a3e 30%, #0a1628 60%, #0d0a2e 100%);
    --gradient-aurora: linear-gradient(180deg, rgba(0,240,255,0.15) 0%, rgba(139,92,246,0.1) 40%, rgba(255,0,110,0.08) 70%, transparent 100%);
    --gradient-btn-primary: linear-gradient(135deg, var(--primary-cyan), var(--primary-purple));
    --gradient-btn-secondary: linear-gradient(135deg, var(--primary-magenta), var(--primary-purple));
    --gradient-text: linear-gradient(90deg, var(--primary-cyan), var(--primary-magenta), var(--primary-purple));
    --gradient-card-hover: linear-gradient(135deg, rgba(0,240,255,0.1), rgba(139,92,246,0.1));

    /* Glow Effects */
    --glow-cyan: 0 0 20px rgba(0,240,255,0.3), 0 0 60px rgba(0,240,255,0.1);
    --glow-magenta: 0 0 20px rgba(255,0,110,0.3), 0 0 60px rgba(255,0,110,0.1);
    --glow-purple: 0 0 20px rgba(139,92,246,0.3), 0 0 60px rgba(139,92,246,0.1);
    --glow-gold: 0 0 20px rgba(251,191,36,0.3), 0 0 60px rgba(251,191,36,0.1);

    /* Spacing */
    --section-padding: 120px 0;
    --container-width: 1280px;

    /* Typography */
    --font-heading: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-body: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 30px;

    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--bg-deep);
    overflow-x: hidden;
}

/* === ANIMATED BACKGROUND === */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-aurora);
    pointer-events: none;
    z-index: 0;
    animation: auroraPulse 8s ease-in-out infinite alternate;
}

@keyframes auroraPulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}

/* === LAYOUT === */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 6vw, 5rem); }
h2 { font-size: clamp(2rem, 4vw, 3.5rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }

p {
    color: var(--text-secondary);
    max-width: 65ch;
}

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

a:hover {
    color: var(--primary-magenta);
    text-shadow: var(--glow-cyan);
}

/* === UTILITY CLASSES === */
.gradient-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glow-cyan { text-shadow: var(--glow-cyan); }
.glow-magenta { text-shadow: var(--glow-magenta); }

.glass-card {
    background: var(--bg-glass);
    border: 1px solid var(--bg-glass-border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 32px;
    transition: var(--transition-smooth);
}

.glass-card:hover {
    background: var(--gradient-card-hover);
    border-color: var(--primary-cyan);
    box-shadow: var(--glow-cyan);
    transform: translateY(-4px);
}

/* === BUTTONS === */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 36px;
    background: var(--gradient-btn-primary);
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: var(--transition-smooth);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary-magenta), var(--primary-cyan));
    opacity: 0;
    transition: var(--transition-smooth);
}

.btn-primary:hover {
    color: #fff;
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--glow-cyan);
}

.btn-primary:hover::before { opacity: 1; }
.btn-primary span { position: relative; z-index: 1; }

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 36px;
    background: transparent;
    color: var(--primary-cyan);
    font-weight: 600;
    font-size: 1rem;
    border: 2px solid var(--primary-cyan);
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: var(--transition-smooth);
    text-decoration: none;
}

.btn-secondary:hover {
    background: rgba(0,240,255,0.1);
    color: #fff;
    box-shadow: var(--glow-cyan);
    transform: translateY(-2px);
}

/* === SECTIONS === */
.ubaid-section {
    padding: var(--section-padding);
    position: relative;
    overflow: hidden;
}

/* === FLOATING SHAPES (AMBIENT) === */
.floating-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
}

.floating-shape-1 {
    width: 400px;
    height: 400px;
    background: rgba(0,240,255,0.08);
    top: 10%;
    right: -10%;
    animation: float1 12s ease-in-out infinite;
}

.floating-shape-2 {
    width: 350px;
    height: 350px;
    background: rgba(139,92,246,0.08);
    bottom: 10%;
    left: -10%;
    animation: float2 15s ease-in-out infinite;
}

.floating-shape-3 {
    width: 300px;
    height: 300px;
    background: rgba(255,0,110,0.06);
    top: 40%;
    left: 30%;
    animation: float3 18s ease-in-out infinite;
}

@keyframes float1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-30px, 50px) scale(1.1); }
    66% { transform: translate(20px, -30px) scale(0.9); }
}

@keyframes float2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(40px, -40px) scale(1.15); }
    66% { transform: translate(-20px, 30px) scale(0.95); }
}

@keyframes float3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-50px, 40px) scale(1.1); }
}

/* === MAGNETIC CURSOR === */
.cursor-glow {
    position: fixed;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0,240,255,0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

/* === SCROLL INDICATOR === */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: scrollBounce 2s ease-in-out infinite;
}

.scroll-indicator .mouse {
    width: 24px;
    height: 40px;
    border: 2px solid var(--text-muted);
    border-radius: 12px;
    position: relative;
}

.scroll-indicator .mouse::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: var(--primary-cyan);
    border-radius: 2px;
    animation: scrollWheel 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}

@keyframes scrollWheel {
    0% { opacity: 1; top: 8px; }
    100% { opacity: 0; top: 24px; }
}

/* === ELEMENTOR SPECIFIC OVERRIDES === */
.elementor-section-wrap > .elementor-element {
    position: relative;
}

/* Make sure Elementor editor has proper contrast */
.elementor-editor-active .elementor-element {
    outline: 1px solid rgba(0,240,255,0.1);
}

/* Fix Elementor section spacing */
.ubaid-section .elementor-container {
    max-width: var(--container-width);
}

/* === WHATSAPP FLOAT === */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37,211,102,0.4);
    transition: var(--transition-smooth);
    cursor: pointer;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(37,211,102,0.6);
}

.whatsapp-float svg {
    width: 30px;
    height: 30px;
    fill: #fff;
}

/* === LOADING SCREEN === */
#page-loader {
    position: fixed;
    inset: 0;
    background: var(--bg-deep);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 20px;
    transition: opacity 0.6s, visibility 0.6s;
}

#page-loader.loaded {
    opacity: 0;
    visibility: hidden;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--bg-glass-border);
    border-top-color: var(--primary-cyan);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* === 3D AVATAR CANVAS === */
#avatar-canvas {
    position: absolute;
    pointer-events: none;
    z-index: 2;
}

/* === PARALLAX HERO === */
.parallax-hero {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.parallax-layer {
    position: absolute;
    inset: 0;
    will-change: transform;
    backface-visibility: hidden;
}

.parallax-layer-bg {
    z-index: 1;
}

.parallax-layer-mid {
    z-index: 2;
}

.parallax-layer-fg {
    z-index: 3;
    display: flex;
    align-items: center;
    position: relative;
}

/* === NDA BANNER === */
.nda-banner {
    background: linear-gradient(90deg, rgba(251,191,36,0.1), rgba(251,191,36,0.05));
    border: 1px solid rgba(251,191,36,0.2);
    border-radius: var(--radius-md);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--accent-gold);
    font-size: 0.9rem;
}

.nda-banner svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    fill: var(--accent-gold);
}
