/**
 * Ubaid Portfolio 3D - Theme CSS v8.0
 * SPEED OPTIMIZED: No backdrop-filter on mobile, reduced glass on desktop
 */

/* === NAVIGATION === */
.ubaid-nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    padding: 0; transition: all 0.3s ease;
    transform: translateY(0);
    height: 52px;
    display: flex; align-items: center;
    background: rgba(3,0,20,0.5);
}
.ubaid-nav.scrolled {
    background: rgba(3,0,20,0.85);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.ubaid-nav-inner {
    max-width: 1200px; margin: 0 auto; padding: 0 20px;
    width: 100%; display: flex; justify-content: space-between; align-items: center;
}
.ubaid-logo { font-size: 1.1rem; font-weight: 800; color: #f0f0ff; text-decoration: none; }
.ubaid-logo span { background: linear-gradient(90deg, #00e5ff, #ff2d78); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.ubaid-nav-links { display: flex; align-items: center; gap: 22px; list-style: none; }
.ubaid-nav-links a { color: #989cc0; font-size: 0.82rem; font-weight: 500; transition: color 0.3s; text-decoration: none; }
.ubaid-nav-links a:hover { color: #00e5ff; }
.nav-cta { padding: 7px 18px !important; font-size: 0.78rem !important; }

/* === HERO === */
.parallax-hero {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding-top: 52px;
}
.hero-content { max-width: 560px; padding: 0 20px; position: relative; z-index: 2; }
.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 5px 14px; border: 1px solid rgba(0,229,255,0.3);
    border-radius: var(--radius-xl); font-size: 0.65rem; font-weight: 700;
    letter-spacing: 2px; color: #00e5ff; margin-bottom: 20px;
    background: rgba(0,229,255,0.05);
}
.hero-badge-dot { width: 5px; height: 5px; border-radius: 50%; background: #00e5ff; animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.4;transform:scale(1.5)} }

.hero-heading {
    font-size: clamp(2.2rem, 5.5vw, 3.8rem); font-weight: 900;
    line-height: 1.08; margin-bottom: 16px; color: #f0f0ff; letter-spacing: -0.03em;
}
.hero-heading-gradient { background: linear-gradient(90deg, #00e5ff, #a855f7, #ff2d78); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-subheading { font-size: clamp(0.85rem, 1.3vw, 0.95rem); color: #989cc0; line-height: 1.8; margin-bottom: 24px; max-width: 480px; }
.hero-subheading strong { color: #00e5ff; }
.hero-buttons { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 30px; }

.hero-stats { display: flex; align-items: center; gap: 18px; }
.hero-stat { text-align: center; }
.hero-stat-number { display: block; font-size: 1.2rem; font-weight: 800; color: #00e5ff; font-family: var(--font-mono); }
.hero-stat-label { font-size: 0.65rem; color: #5c6080; text-transform: uppercase; letter-spacing: 1.5px; }
.hero-stat-divider { width: 1px; height: 28px; background: rgba(0,229,255,0.1); }

/* Scroll indicator */
.scroll-indicator {
    position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; gap: 5px;
    color: #5c6080; font-size: 0.6rem; letter-spacing: 2px; text-transform: uppercase;
    animation: scrollBounce 2.5s ease-in-out infinite; z-index: 2;
}
.scroll-indicator .mouse { width: 18px; height: 28px; border: 1.5px solid #5c6080; border-radius: 9px; position: relative; }
.scroll-indicator .mouse::after { content:''; position:absolute; top:5px; left:50%; transform:translateX(-50%); width:2px; height:5px; background:#00e5ff; border-radius:2px; animation:scrollWheel 2s ease-in-out infinite; }
@keyframes scrollBounce { 0%,100%{transform:translateX(-50%) translateY(0)} 50%{transform:translateX(-50%) translateY(8px)} }
@keyframes scrollWheel { 0%{opacity:1;top:5px} 100%{opacity:0;top:16px} }

/* === SECTIONS - Desktop: thin glass overlay / Mobile: solid dark bg === */
.ubaid-section {
    padding: var(--section-padding);
    position: relative;
    overflow: hidden;
}
/* Desktop glass overlay */
@media (min-width: 769px) {
    .ubaid-section::before {
        content: '';
        position: absolute; inset: 0;
        background: rgba(3, 0, 20, 0.4);
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
        z-index: 0; pointer-events: none;
    }
    .section-dark::before { background: rgba(3, 0, 20, 0.5); }
}
/* Mobile: solid background - NO backdrop-filter */
@media (max-width: 768px) {
    .ubaid-section::before {
        content: '';
        position: absolute; inset: 0;
        background: rgba(5, 0, 24, 0.88);
        z-index: 0; pointer-events: none;
    }
    .section-dark::before { background: rgba(3, 0, 16, 0.92); }
}

/* === ABOUT === */
.about-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 36px; align-items: start; }
.about-grid .section-heading { text-align: left; }
.about-text { color: #b0b4d8; line-height: 1.8; margin-bottom: 14px; }
.about-text a { color: #00e5ff; }
.about-links { margin-top: 18px; }
.about-card { padding: 24px; }
.about-card-icon { font-size: 1.6rem; margin-bottom: 8px; }
.about-card-title { font-size: 1.1rem; color: #00e5ff; margin-bottom: 16px; }
.about-card-list { list-style: none; padding: 0; }
.about-card-list li { color: #b0b4d8; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.04); line-height: 1.6; font-size: 0.85rem; }
.about-card-list li:last-child { border-bottom: none; }
.about-card-list li strong { color: #eef0ff; }

/* === SERVICES === */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.service-card { padding: 24px; text-align: center; position: relative; overflow: hidden; }
.service-card:hover { border-color: rgba(0,229,255,0.25); }
.service-icon { font-size: 2rem; margin-bottom: 12px; transition: transform 0.3s; }
.service-card:hover .service-icon { transform: scale(1.1) rotate(3deg); }
.service-title { font-size: 1rem; font-weight: 700; margin-bottom: 8px; color: #f0f0ff; }
.service-desc { color: #b0b4d8; font-size: 0.85rem; line-height: 1.7; }
.service-card::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, #00e5ff, #a855f7, #ff2d78); transform: scaleX(0); transform-origin: left; transition: transform 0.4s; }
.service-card:hover::after { transform: scaleX(1); }

/* === SKILLS === */
.skills-grid { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 36px; margin-top: 32px; align-items: start; }
.skills-bars-col { padding: 12px 0; }
.skill-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.skill-name { color: #eef0ff; font-weight: 600; font-size: 0.88rem; }
.skill-percent { color: #00e5ff; font-family: var(--font-mono); font-weight: 700; font-size: 0.82rem; }
.skill-bar-bg { height: 5px; background: rgba(0,229,255,0.06); border-radius: 3px; overflow: hidden; }
.skill-bar-fill { height: 100%; width: 0; background: linear-gradient(90deg, #00e5ff, #a855f7); border-radius: 3px; transition: width 1.5s cubic-bezier(0.4,0,0.2,1); }
.skills-desc-col .glass-card { padding: 22px; }
.skills-desc-col h3 { font-size: 1.05rem; color: #00e5ff; margin-bottom: 12px; }
.skills-desc-col p { color: #b0b4d8; line-height: 1.75; font-size: 0.85rem; }

/* === RESULTS === */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 40px 0; }
.stat-card { padding: 22px 14px; text-align: center; }
.stat-number { display: block; font-size: clamp(1.5rem, 2.5vw, 2rem); font-weight: 900; color: #00e5ff; font-family: var(--font-mono); margin-bottom: 4px; }
.stat-label { display: block; font-size: 0.82rem; font-weight: 600; color: #eef0ff; margin-bottom: 2px; }
.stat-desc { font-size: 0.7rem; color: #5c6080; }
.roi-feature { margin-top: 24px; }
.roi-feature .glass-card { padding: 28px; display: flex; align-items: center; gap: 32px; flex-wrap: wrap; }
.roi-feature p { color: #b0b4d8; line-height: 1.75; font-size: 0.9rem; }
.roi-circle {
    width: 150px; height: 150px; border-radius: 50%;
    background: rgba(0,229,255,0.04); border: 1.5px solid rgba(0,229,255,0.15);
    display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0;
    animation: breatheGlow 3s ease-in-out infinite;
}
@keyframes breatheGlow { 0%,100%{box-shadow:0 0 8px rgba(0,229,255,0.08)} 50%{box-shadow:0 0 24px rgba(0,229,255,0.15),0 0 40px rgba(168,85,247,0.08)} }
.roi-circle-number { font-size: 1.6rem; font-weight: 900; color: #00e5ff; font-family: var(--font-mono); }
.roi-circle-label { font-size: 0.6rem; color: #5c6080; text-transform: uppercase; letter-spacing: 2px; margin-top: 2px; }

/* === PROJECTS === */
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.project-card { padding: 24px; }
.project-card-cat { font-size: 0.65rem; font-weight: 700; color: #a855f7; text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 8px; }
.project-card-title { font-size: 1.05rem; font-weight: 700; color: #f0f0ff; margin-bottom: 8px; }
.project-card-desc { color: #b0b4d8; font-size: 0.85rem; line-height: 1.7; margin-bottom: 16px; }
.project-stat-number {
    display: inline-block; padding: 4px 12px;
    background: rgba(0,229,255,0.06); border: 1px solid rgba(0,229,255,0.15);
    border-radius: var(--radius-xl); font-size: 0.78rem; font-weight: 700; color: #00e5ff;
}

/* === NDA BANNER === */
.nda-banner {
    background: rgba(251,191,36,0.04); border: 1px solid rgba(251,191,36,0.12);
    border-radius: var(--radius-md); padding: 12px 18px;
    display: flex; align-items: center; gap: 10px;
    color: #fbbf24; font-size: 0.82rem;
}

/* === CONTACT === */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: start; }
.contact-grid .section-heading { text-align: left; }
.contact-text { color: #b0b4d8; line-height: 1.8; margin-bottom: 20px; }
.contact-info { display: flex; flex-direction: column; gap: 10px; }
.contact-info-item {
    padding: 12px 16px;
    background: rgba(0,229,255,0.03); border: 1px solid rgba(0,229,255,0.06);
    border-radius: var(--radius-md);
}
.contact-info-label { display: block; font-size: 0.65rem; color: #5c6080; text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 2px; }
.contact-info-value { color: #00e5ff; font-weight: 600; font-size: 0.88rem; text-decoration: none; }
.contact-info-value:hover { color: #ff2d78; }
.contact-form-card { padding: 24px; }
.contact-form-card h3 { color: #f0f0ff; font-size: 1.15rem; margin-bottom: 18px; }
.form-group { margin-bottom: 12px; }
.form-group label { display: block; color: #b0b4d8; font-size: 0.8rem; font-weight: 500; margin-bottom: 4px; }
.form-group input, .form-group textarea {
    width: 100%; padding: 10px 12px;
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius-md); color: #f0f0ff;
    font-family: var(--font-body); font-size: 0.85rem;
    transition: border-color 0.3s; outline: none;
}
.form-group input:focus, .form-group textarea:focus { border-color: #00e5ff; box-shadow: 0 0 0 2px rgba(0,229,255,0.06); }
.form-group textarea { min-height: 90px; resize: vertical; }
.ubaid-contact-form .btn-primary { width: 100%; justify-content: center; }

/* === FOOTER === */
.ubaid-footer {
    border-top: 1px solid rgba(255,255,255,0.04);
    padding: 24px 0;
    background: rgba(3, 0, 20, 0.7);
}
.ubaid-footer-inner {
    max-width: 1200px; margin: 0 auto; padding: 0 20px;
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
}
.ubaid-footer p { color: #5c6080; font-size: 0.75rem; }
.ubaid-footer-links { display: flex; gap: 16px; }
.ubaid-footer-links a { color: #5c6080; font-size: 0.75rem; text-decoration: none; transition: color 0.3s; }
.ubaid-footer-links a:hover { color: #00e5ff; }

/* === CURSOR GLOW === */
.cursor-glow {
    position: fixed; width: 250px; height: 250px; border-radius: 50%;
    background: radial-gradient(circle, rgba(0,229,255,0.04) 0%, transparent 70%);
    pointer-events: none; z-index: 9998; transform: translate(-50%, -50%);
}

/* === TABLET === */
@media (max-width: 1024px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .projects-grid { grid-template-columns: repeat(2, 1fr); }
    #geometry-hero-canvas { max-width: 300px; right: 2%; opacity: 0.6; }
}

/* === MOBILE - SPEED OPTIMIZED === */
@media (max-width: 768px) {
    :root { --section-padding: 60px 0; }
    body { font-size: 15px; }

    .ubaid-nav { height: 44px; background: rgba(3,0,20,0.9); }
    .ubaid-nav.scrolled { background: rgba(3,0,20,0.95); backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
    .ubaid-nav-inner { padding: 0 14px; }
    .ubaid-logo { font-size: 0.95rem; }
    .ubaid-nav-links a:not(.nav-cta) { display: none; }
    .nav-cta { padding: 5px 14px !important; font-size: 0.72rem !important; }

    .parallax-hero { padding-top: 44px; }
    .hero-content { text-align: center; max-width: 100%; padding: 0 16px; }
    .hero-subheading { margin-left: auto; margin-right: auto; max-width: 100%; }
    .hero-heading { font-size: clamp(1.7rem, 7vw, 2.6rem) !important; }
    .hero-buttons { justify-content: center; flex-direction: column; align-items: center; gap: 8px; }
    .hero-buttons a { width: 100%; max-width: 260px; justify-content: center; padding: 11px 22px; font-size: 0.85rem; }
    .hero-stats { justify-content: center; flex-wrap: wrap; gap: 12px; }
    .hero-stat-number { font-size: 1rem; }

    #geometry-hero-canvas { max-width: 200px; right: 2%; opacity: 0.6; }
    .geometry-float { display: none !important; }
    .scroll-indicator { display: none; }
    .cursor-glow { display: none; }

    .about-grid, .skills-grid, .contact-grid { grid-template-columns: 1fr; }
    .about-grid .section-heading, .contact-grid .section-heading { text-align: center; }
    .services-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .projects-grid { grid-template-columns: 1fr; }

    /* NO transforms on mobile glass cards - saves GPU */
    .glass-card { padding: 18px; transition: border-color 0.3s !important; transform: none !important; }
    .glass-card:hover { transform: none !important; }

    .roi-feature .glass-card { flex-direction: column; text-align: center; }
    .roi-circle { width: 120px; height: 120px; }
    .roi-circle-number { font-size: 1.4rem; }

    .whatsapp-float { width: 48px; height: 48px; bottom: 16px; right: 16px; }
    .whatsapp-float svg { width: 24px; height: 24px; }

    .ubaid-footer-inner { flex-direction: column; text-align: center; }
    .hero-badge { font-size: 0.58rem; padding: 4px 10px; letter-spacing: 1.5px; }
}

@media (max-width: 480px) {
    :root { --section-padding: 45px 0; }
    .hero-heading { font-size: clamp(1.5rem, 8vw, 2.2rem) !important; }
    .btn-primary, .btn-secondary { padding: 11px 22px; font-size: 0.82rem; }
    .nda-banner { flex-direction: column; text-align: center; padding: 10px 14px; }
    .ubaid-nav { height: 40px; }
    .ubaid-logo { font-size: 0.88rem; }
    .section-heading { font-size: clamp(1.3rem, 5vw, 1.8rem) !important; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

@media print {
    .whatsapp-float, .cursor-glow, .scroll-indicator, #page-loader, #cosmos-canvas, #geometry-hero-canvas, .geometry-float { display: none !important; }
    body { background: #fff; color: #000; }
}
