/*
Theme Name: Prem Portfolio
Theme URI: https://mepremjagtap.com
Author: Prem Jagtap
Author URI: https://mepremjagtap.com
Description: A bio-digital authority interface designed for high-performance lead generation. Features a custom 'Kinetic Physics' engine (Lenis + GSAP), a reactive neural-network background, and holographic glass aesthetics built on a Deep Crimson (#640101) foundation. This is not a theme; it is a conversion system.
Version: 9.5
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: portfolio, gsap, custom
Text Domain: prem-portfolio
*/

/* --- 1. CORE VARIABLES --- */
:root {
    --bg-dark: #640101; 
    --accent: #D4AF37;
    --glass: rgba(12, 12, 12, 0.6);
    --border: rgba(255, 255, 255, 0.1);
    --font-main: 'Inter', sans-serif;
    --font-head: 'Poppins', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* LENIS SMOOTH SCROLL */
html.lenis { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

body {
    background-color: var(--bg-dark);
    color: #F6F5F3; 
    font-family: var(--font-main);
    overflow-x: hidden;
    line-height: 1.6;
}

/* --- 2. LAYERS --- */
#bg-void { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: var(--bg-dark); z-index: -10; }
#blueprint-canvas { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -5; opacity: 0.5; pointer-events: none; }
#scanline-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: repeating-linear-gradient(0deg, rgba(0,0,0,0.1), rgba(0,0,0,0.1) 1px, transparent 1px, transparent 2px); z-index: -4; pointer-events: none; }

/* --- 3. CHARACTER ENGINE --- */
#character-stage { 
    position: fixed; bottom: 0; right: 5%; width: 450px; height: 85vh; 
    pointer-events: none; z-index: 0; 
}

.prem-pose { 
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; 
    opacity: 0; visibility: hidden; 
    transition: opacity 0.5s ease-out, visibility 0.5s; 
    object-fit: contain; object-position: bottom; 
    filter: drop-shadow(0 0 40px rgba(0,0,0,0.8)); 
}

.prem-pose.active-pose { opacity: 1 !important; visibility: visible !important; }

/* --- 4. LAYOUT --- */
.panel { padding: 100px 5%; display: flex; align-items: center; position: relative; z-index: 10; }
#sec-hero { min-height: 90vh; }
#sec-contact { min-height: 80vh; }
.content-wrap { max-width: 650px; margin-left: 5%; width: 100%; position: relative; z-index: 20; }

/* --- 5. COMPONENTS --- */
.headline { font-size: clamp(2.2rem, 5vw, 4.5rem); margin-bottom: 25px; line-height: 1.15; font-weight: 700; color: #fff; font-family: var(--font-head); }
.subhead { color: #9CA3AF; font-size: 1.25rem; margin-bottom: 30px; }
.section-label { color: var(--accent); font-family: monospace; letter-spacing: 2px; display: block; margin-bottom: 15px; text-transform: uppercase; font-size: 0.9rem; }

/* Pulse Animation */
@keyframes pulseGold { 0% { border-color: rgba(255, 255, 255, 0.1); box-shadow: 0 0 0 rgba(212, 175, 55, 0); } 50% { border-color: rgba(212, 175, 55, 0.5); box-shadow: 0 0 15px rgba(212, 175, 55, 0.1); } 100% { border-color: rgba(255, 255, 255, 0.1); box-shadow: 0 0 0 rgba(212, 175, 55, 0); } }

.glass-card { background: var(--glass); border: 1px solid var(--border); backdrop-filter: blur(12px); padding: 30px; border-radius: 6px; animation: pulseGold 4s infinite ease-in-out; transform-style: preserve-3d; transform: perspective(1000px); }
.glass-card h4 { margin-bottom: 10px; font-size: 1.15rem; color: #fff; font-weight: 600; transform: translateZ(20px); }
.glass-card p, .glass-card ul { font-size: 0.95rem; color: #ccc; margin-bottom: 10px; transform: translateZ(10px); }

/* Stats Grid */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.stat-num { font-size: 2.5rem; color: var(--accent); margin-bottom: 5px; line-height: 1; font-weight: 700; font-family: var(--font-head); }
.stat-label { font-size: 0.8rem; color: #888; text-transform: uppercase; letter-spacing: 1px; }

/* System Protocols */
.system-protocols { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 25px; }
.protocol-tag { font-family: monospace; font-size: 0.8rem; background: rgba(212, 175, 55, 0.08); color: var(--accent); padding: 6px 14px; border: 1px solid rgba(212, 175, 55, 0.2); border-radius: 4px; }

/* Buttons & Grids */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-top: 30px; }
.grid-2.tight { gap: 20px; }
.cta-group { display: flex; gap: 15px; margin-top: 30px; flex-wrap: wrap; }
.btn-magnetic { display: inline-block; transition: transform 0.2s ease-out; position: relative; }
.btn-primary { background: var(--accent); color: #000; padding: 14px 32px; font-weight: 700; text-transform: uppercase; font-size: 0.9rem; text-decoration: none; border-radius: 4px; }
.btn-secondary { border: 1px solid rgba(255,255,255,0.3); color: #fff; padding: 14px 32px; font-weight: 600; text-transform: uppercase; font-size: 0.9rem; text-decoration: none; border-radius: 4px; }
.cursor { display: inline-block; width: 3px; background-color: var(--accent); animation: blink 1s infinite; margin-left: 5px; }
@keyframes blink { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }

/* --- 6. DESKTOP UTILITIES --- */
#return-to-base {
    position: fixed; bottom: 30px; right: 30px;
    width: 50px; height: 50px;
    background: rgba(10, 10, 10, 0.8);
    border: 1px solid #D4AF37;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #D4AF37;
    z-index: 90;
    opacity: 0; visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(5px);
}
#return-to-base.visible { opacity: 1; visibility: visible; transform: translateY(0); }
#return-to-base:hover { box-shadow: 0 0 20px rgba(212, 175, 55, 0.4); background: #D4AF37; color: #000; }

.mobile-hud { display: none; } /* Hide HUD on Desktop by default */

/* --- 7. MOBILE OPTIMIZATION (HUD ACTIVE) --- */
@media (max-width: 900px) {
    #character-stage { 
        top: 0; left: 0; width: 100%; height: 100%; right: auto; bottom: auto; 
        z-index: -1; opacity: 0.3; mix-blend-mode: luminosity;
        -webkit-mask-image: linear-gradient(to bottom, rgba(100, 1, 1, 1) 0%, rgba(100, 1, 1, 0.3) 100%);
        mask-image: linear-gradient(to bottom, rgba(100, 1, 1, 1) 0%, rgba(100, 1, 1, 0.3) 100%);
    }
    .prem-pose { object-fit: cover; object-position: center 20%; } 
    .panel { padding: 70px 20px; display: block; }
    #sec-hero { padding-top: 120px; min-height: 85vh; }
    .content-wrap { margin-left: 0; }
    .grid-2 { grid-template-columns: 1fr; gap: 20px; }
    .stat-grid { grid-template-columns: 1fr 1fr; gap: 30px; } 
    .glass-card { backdrop-filter: none; background: rgba(15, 15, 15, 0.9); animation: none; }
    
    /* Hide Return Button on Mobile (HUD replaces it) */
    #return-to-base { display: none !important; }

    /* MOBILE HUD STYLES */
    .mobile-hud {
        display: flex; /* Show on mobile */
        position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
        width: 90%; max-width: 400px;
        background: rgba(15, 15, 15, 0.85);
        backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
        border: 1px solid rgba(212, 175, 55, 0.3);
        border-radius: 20px;
        padding: 12px 20px;
        justify-content: space-between; align-items: center;
        z-index: 9999;
        box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    }
    .hud-item {
        display: flex; flex-direction: column; align-items: center;
        text-decoration: none; color: #999; font-size: 0.7rem; font-family: monospace;
        transition: 0.3s;
    }
    .hud-item svg {
        width: 24px; height: 24px; margin-bottom: 4px;
        stroke: currentColor; stroke-width: 2; fill: none; transition: 0.3s;
    }
    .hud-item:hover, .hud-item.active { color: #D4AF37; }
    .hud-item:hover svg, .hud-item.active svg {
        stroke: #D4AF37;
        filter: drop-shadow(0 0 5px rgba(212, 175, 55, 0.5));
        transform: translateY(-2px);
    }
}