/*
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 featuring Three.js scroll-driven icosahedron with particle system, animated universe background (stars, galaxies, nebulae, planets), glassmorphism UI, GSAP ScrollTrigger animations, and responsive mobile-first design.
Version: 16.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 - COSMIC GLASS THEME === */
:root {
    --primary-cyan: #00e5ff;
    --primary-magenta: #ff2d78;
    --primary-purple: #a855f7;
    --accent-gold: #fbbf24;
    --accent-blue: #3b82f6;
    --star-white: #e8eaff;

    --bg-cosmos: #030014;
    --bg-glass: rgba(255, 255, 255, 0.035);
    --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);
    --glass-blur: 20px;

    --text-primary: #eef0ff;
    --text-secondary: #b8bce0;
    --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 20px rgba(0,229,255,0.25);
    --glow-purple: 0 0 20px rgba(168,85,247,0.25);
    --glow-magenta: 0 0 20px rgba(255,45,120,0.25);

    --section-padding: 100px 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-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-glass: 0.35s ease;
}

/* === RESET === */
*, *::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 (full page background - MUST BE VISIBLE) === */
#cosmos-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: 0;
    pointer-events: none;
}

/* === GLASS WRAPPER === */
.glass-wrap {
    position: relative;
    z-index: 1;
}

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

/* === TYPOGRAPHY === */
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(2.2rem, 5.5vw, 4.5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }
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); }

/* === GLASSMORPHISM CARD === */
.glass-card {
    background: var(--bg-glass);
    border: 1px solid var(--bg-glass-border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(var(--glass-blur)) saturate(150%);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(150%);
    padding: 28px;
    transition: background var(--transition-glass), border-color var(--transition-glass), box-shadow var(--transition-glass), transform 0.4s ease;
}
.glass-card:hover {
    background: var(--bg-glass-hover);
    border-color: var(--bg-glass-border-hover);
    box-shadow: var(--glow-cyan);
    transform: translateY(-4px);
}

/* === BUTTONS === */
.btn-primary {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 14px 32px;
    background: var(--gradient-btn-primary);
    color: #fff; font-weight: 600; font-size: 0.95rem;
    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;
    backdrop-filter: blur(10px);
}
.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: 14px 32px;
    background: transparent;
    color: var(--primary-cyan); font-weight: 600; font-size: 0.95rem;
    border: 1.5px solid rgba(0,229,255,0.4);
    border-radius: var(--radius-xl);
    cursor: pointer; text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}
.btn-secondary:hover { background: rgba(0,229,255,0.08); color: #fff; border-color: var(--primary-cyan); box-shadow: var(--glow-cyan); }

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

.section-heading {
    font-size: clamp(1.7rem, 3.5vw, 2.6rem);
    font-weight: 800; line-height: 1.15; margin-bottom: 14px;
    color: #f0f0ff; text-align: center;
}
.section-subheading {
    color: var(--text-secondary); font-size: 0.95rem;
    text-align: center; max-width: 560px; margin: 0 auto 45px; line-height: 1.7;
}

.gradient-text {
    background: var(--gradient-text);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: rgba(3,0,20,0.5); }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #00e5ff, #a855f7); border-radius: 3px; }
::selection { background: rgba(0,229,255,0.2); color: #fff; }

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

/* === RIPPLE === */
@keyframes ripple { to { transform: scale(4); opacity: 0; } }

/* === THREE.JS SCENE CONTAINER === */
#three-scene-container {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: 1;
    pointer-events: none;
}

/* === WHATSAPP === */
.whatsapp-float {
    position: fixed; bottom: 25px; right: 25px; z-index: 9999;
    width: 56px; height: 56px; 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: transform 0.3s; text-decoration: none;
    backdrop-filter: blur(8px);
}
.whatsapp-float:hover { transform: scale(1.1); }
.whatsapp-float svg { width: 28px; height: 28px; fill: #fff; }

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