/*
Theme Name: Ubaid Portfolio 3D
Theme URI: https://thestar10.com
Author: Ubaid ur Rehman
Author URI: https://thestar10.com
Description: Premium Elementor portfolio with animated universe background, glassmorphism UI, 3D scroll animations, GSAP, mobile-first SPEED OPTIMIZED.
Version: 9.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
*/

:root {
    --primary-cyan: #00e5ff;
    --primary-magenta: #ff2d78;
    --primary-purple: #a855f7;
    --accent-gold: #fbbf24;
    --star-white: #e8eaff;
    --bg-cosmos: #050018;
    --bg-glass: rgba(255, 255, 255, 0.04);
    --bg-glass-hover: rgba(255, 255, 255, 0.07);
    --bg-glass-border: rgba(255, 255, 255, 0.08);
    --bg-glass-border-hover: rgba(255, 255, 255, 0.2);
    --text-primary: #eef0ff;
    --text-secondary: #b0b4d8;
    --text-muted: #5c6080;
    --gradient-text: linear-gradient(135deg, #00e5ff, #a855f7, #ff2d78);
    --gradient-btn-primary: linear-gradient(135deg, #00e5ff, #a855f7);
    --gradient-btn-secondary: linear-gradient(135deg, #ff2d78, #a855f7);
    --glow-cyan: 0 0 15px rgba(0,229,255,0.2);
    --section-padding: 90px 0;
    --container-width: 1200px;
    --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', monospace;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 50px;
    --transition-fast: 0.2s ease;
    --transition-glass: 0.3s ease;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

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

/* COSMOS CANVAS - fixed behind everything */
#cosmos-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: 0;
    pointer-events: none;
    will-change: transform;
}

.container { max-width: var(--container-width); margin: 0 auto; padding: 0 20px; position: relative; z-index: 1; }

h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; }
h1 { font-size: clamp(2rem, 5vw, 4rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.8rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.7rem); }
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); }

/* ===== GLASS CARD — Glassmorphism on ALL devices ===== */
.glass-card {
    background: var(--bg-glass);
    border: 1px solid var(--bg-glass-border);
    border-radius: var(--radius-lg);
    padding: 28px;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    transition: background var(--transition-glass), border-color var(--transition-glass), box-shadow var(--transition-glass), transform 0.3s ease;
    backdrop-filter: blur(10px) saturate(120%);
    -webkit-backdrop-filter: blur(10px) saturate(120%);
}

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

/* Lighter blur on mobile for performance */
@media (max-width: 768px) {
    .glass-card {
        backdrop-filter: blur(6px) saturate(110%);
        -webkit-backdrop-filter: blur(6px) saturate(110%);
    }
}

/* ===== BUTTONS ===== */
.btn-primary {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 13px 28px;
    background: var(--gradient-btn-primary);
    color: #fff; font-weight: 600; font-size: 0.92rem;
    border: none; border-radius: var(--radius-xl);
    cursor: pointer; text-decoration: none;
    position: relative; overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    will-change: transform;
}
.btn-primary::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, #ff2d78, #00e5ff); opacity: 0; transition: opacity 0.4s; }
.btn-primary:hover { color: #fff; box-shadow: var(--glow-cyan); transform: translateY(-2px); }
.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: 13px 28px;
    background: transparent;
    color: var(--primary-cyan); font-weight: 600; font-size: 0.92rem;
    border: 1.5px solid rgba(0,229,255,0.35);
    border-radius: var(--radius-xl);
    cursor: pointer; text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.btn-secondary:hover { background: rgba(0,229,255,0.06); color: #fff; border-color: var(--primary-cyan); box-shadow: var(--glow-cyan); }

.section-heading {
    font-size: clamp(1.6rem, 3.2vw, 2.4rem);
    font-weight: 800; line-height: 1.15; margin-bottom: 12px;
    color: #f0f0ff; text-align: center;
}
.section-subheading {
    color: var(--text-secondary); font-size: 0.92rem;
    text-align: center; max-width: 540px; margin: 0 auto 40px; line-height: 1.7;
}
.gradient-text {
    background: var(--gradient-text);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: rgba(3,0,20,0.5); }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #00e5ff, #a855f7); border-radius: 2px; }
::selection { background: rgba(0,229,255,0.15); color: #fff; }

/* ===== PRELOADER ===== */
#page-loader {
    position: fixed; inset: 0; background: var(--bg-cosmos);
    z-index: 99999; display: flex; align-items: center; justify-content: center;
    transition: opacity 0.3s, visibility 0.3s;
}
#page-loader.loaded { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-spinner { width: 30px; height: 30px; border: 2px solid rgba(0,229,255,0.12); border-top-color: #00e5ff; border-radius: 50%; animation: spin 0.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== 3D GEOMETRY CANVAS ===== */
#geometry-hero-canvas {
    position: absolute; top: 50%; right: 5%;
    transform: translateY(-50%); pointer-events: none; z-index: 2;
    max-width: 420px; width: 100%; height: auto;
    will-change: transform, opacity;
}
.geometry-float { position: fixed; pointer-events: none; z-index: 2; opacity: 0; transition: opacity 1s ease; }

/* ===== WHATSAPP FLOAT ===== */
.whatsapp-float {
    position: fixed; bottom: 22px; right: 22px; z-index: 9999;
    width: 52px; height: 52px; background: #25D366;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 16px rgba(37,211,102,0.35);
    transition: transform 0.3s; text-decoration: none;
    will-change: transform;
}
.whatsapp-float:hover { transform: scale(1.08); }
.whatsapp-float svg { width: 26px; height: 26px; fill: #fff; }

.elementor-section-wrap > .elementor-element { position: relative; }
.ubaid-section .elementor-container { max-width: var(--container-width); }
