/* ==========================================================================
   1. CORE DESIGN SYSTEM & VARIABLES
   ========================================================================== */
:root {
    --bg-dark: #060609;
    --panel-bg: rgba(13, 13, 22, 0.65);
    --glass-border: rgba(255, 255, 255, 0.04);
    
    /* Premium Studio Accent Palette */
    --neon-cyan: #06b6d4;
    --neon-magenta: #d946ef;
    --neon-orange: #ff5722;
    
    --text-main: #f8fafc;
    --text-dim: #94a3b8;
    --panel-radius: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
    overflow-x: hidden;
    line-height: 1.5;
}

/* Background Atmosphere Grid */
body::before {
    content: "";
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: 
        linear-gradient(rgba(6, 182, 212, 0.02) 1px, transparent 1px) 0 0 / 50px 50px,
        linear-gradient(90deg, rgba(6, 182, 212, 0.02) 1px, transparent 1px) 0 0 / 50px 50px;
    z-index: -2;
    pointer-events: none;
}

/* ==========================================================================
   2. HERO ATMOSPHERE BANNER
   ========================================================================== */
.space-banner {
    width: 100%;
    height: 380px;
    position: relative;
    overflow: hidden;
    background: #000;
}

.space-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
    transform: scale(1.02);
}

.banner-mask {
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(to bottom, transparent 30%, var(--bg-dark) 100%);
}

/* ==========================================================================
   3. PREMIUM HEADER PROFILE PANEL
   ========================================================================== */
.premium-profile-panel {
    max-width: 1300px;
    margin: -120px auto 40px auto;
    padding: 40px;
    background: var(--panel-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: var(--panel-radius);
    display: flex;
    gap: 40px;
    align-items: center;
    position: relative;
    z-index: 10;
    box-shadow: 0 30px 60px rgba(0,0,0,0.4);
}

.profile-glow-shell {
    position: relative;
    flex-shrink: 0;
}

.profile-glow-shell::before {
    content: "";
    position: absolute;
    top: -4px; left: -4px; right: -4px; bottom: -4px;
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-magenta));
    border-radius: 50%;
    z-index: -1;
    opacity: 0.7;
}

.premium-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: 4px solid #0d0d16;
}

.profile-narrative h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(90deg, #ffffff, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 6px;
}

.premium-badge-role {
    display: inline-block;
    padding: 4px 14px;
    background: rgba(6, 182, 212, 0.08);
    border: 1px solid rgba(6, 182, 212, 0.2);
    color: var(--neon-cyan);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    border-radius: 20px;
    font-weight: 600;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.premium-about-text {
    color: var(--text-dim);
    font-size: 1.05rem;
    max-width: 800px;
    line-height: 1.6;
}

/* Profile Actions Buttons */
.btn-premium-action {
    background: linear-gradient(90deg, var(--neon-orange), #ff7043);
    border: 1px solid transparent;
    color: #fff;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 14px 28px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(255, 87, 34, 0.15);
}

.btn-premium-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 87, 34, 0.3);
    filter: brightness(1.1);
}

/* ==========================================================================
   4. SHOWROOM THEATRE LAYOUT (MAIN GALLERY)
   ========================================================================== */
.showroom-theatre {
    max-width: 1300px;
    margin: 0 auto 100px auto;
    padding: 0 20px;
}

/* Workspace Navigation Toggles */
.discipline-glow-bar {
    display: flex;
    gap: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.mode-toggle-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.04);
    color: var(--text-dim);
    padding: 12px 24px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mode-toggle-btn:hover {
    color: #fff;
    background: rgba(255,255,255,0.02);
}

.mode-toggle-btn.active {
    background: rgba(255,255,255,0.03);
    border-color: rgba(255,255,255,0.1);
    color: #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Project Sub-Tabs List Container */
.behance-nav-deck {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 40px;
    background: rgba(255,255,255,0.01);
    padding: 8px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.02);
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-dim);
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.tab-btn:hover {
    color: #fff;
    background: rgba(255,255,255,0.02);
}

.tab-btn.active {
    background: #fff;
    color: #000;
    font-weight: 600;
}

/* Active Theater Stage Viewport */
.theatre-stage {
    background: rgba(10, 10, 18, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: var(--panel-radius);
    padding: 40px;
    min-height: 400px;
}

.stage-title-block h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 30px;
    letter-spacing: -0.5px;
    border-left: 4px solid var(--neon-magenta);
    padding-left: 15px;
}

/* ==========================================================================
   5. PORTFOLIO SHOWCASE DISPLAY COMPONENTS
   ========================================================================== */

/* Visualisations Grid Matrix System */
.premium-renders-matrix {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 25px;
}

.render-card {
    background: #0d0d16;
    border: 1px solid rgba(255,255,255,0.03);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.render-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.render-card:hover {
    transform: translateY(-4px);
    border-color: rgba(6, 182, 212, 0.2);
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
}

.render-card:hover img {
    transform: scale(1.03);
}

.angle-label {
    padding: 14px 18px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dim);
    background: #0d0d16;
    font-family: 'Space Grotesk', sans-serif;
    border-top: 1px solid rgba(255,255,255,0.02);
}

/* Animations Layout & Controls */
.video-card {
    background: #0d0d16;
    border: 1px solid rgba(255,255,255,0.03);
    border-radius: 14px;
    padding: 20px;
}

.play-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background: rgba(217, 70, 239, 0.05);
    border: 1px solid rgba(217, 70, 239, 0.2);
    border-radius: 6px;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    font-family: 'Space Grotesk', sans-serif;
    transition: all 0.2s;
}

.play-link-btn:hover {
    background: rgba(217, 70, 239, 0.12);
    border-color: var(--neon-magenta);
}

/* ==========================================================================
   6. EXTRA INTERACTIVE FEATURES (RESUME MODAL & LIGHTBOX)
   ========================================================================== */

/* Lightbox Nav Interactive System */
#lightbox-prev:hover, #lightbox-next:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: var(--neon-magenta) !important;
}

/* Modal Window Layout System */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(4, 4, 6, 0.95);
    z-index: 50000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-card {
    background: #0f0f16;
    border: 1px solid var(--glass-border);
    border-radius: var(--panel-radius);
    width: 100%;
    max-width: 960px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 40px;
    position: relative;
    box-shadow: 0 50px 100px rgba(0,0,0,0.8);
}

.modal-close {
    position: absolute;
    top: 20px; right: 25px;
    color: var(--text-dim);
    font-size: 30px;
    cursor: pointer;
    transition: color 0.2s;
    user-select: none;
}
.modal-close:hover { color: #fff; }

.modal-split-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 40px;
}

.modal-section-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    color: var(--neon-orange);
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(255,87,34,0.15);
    padding-bottom: 10px;
}

/* Software Proficiency Systems */
.software-row-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255,255,255,0.02);
    padding: 14px 20px;
    border-radius: 8px;
    margin-bottom: 12px;
    border-left: 3px solid var(--neon-cyan);
}

.soft-name {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.soft-bar-dots .dot {
    font-size: 1.2rem;
    margin-left: 4px;
    letter-spacing: 2px;
}
.soft-bar-dots .dot.filled { color: var(--neon-cyan); }
.soft-bar-dots .dot.hollow { color: rgba(255,255,255,0.15); }

/* Career Experience Timelines */
.exp-accordion-card {
    background: rgba(255,255,255,0.01);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 10px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.exp-header {
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background: rgba(255,255,255,0.02);
}

.exp-header h4 {
    font-family: 'Space Grotesk', sans-serif;
    color: #fff;
    font-size: 1rem;
}

.exp-date {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-dim);
}

.exp-body {
    max-height: 0;
    overflow: hidden;
    padding: 0 20px;
    transition: all 0.3s cubic-bezier(0, 1, 0, 1);
}

.exp-role-title {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-dim);
    font-family: 'Plus Jakarta Sans', sans-serif;
    white-space: pre-line;
}

/* Accordion Active Interactive State Transitions */
.exp-accordion-card.open {
    border-color: rgba(219,70,239,0.3);
    background: rgba(219,70,239,0.02);
}

.exp-accordion-card.open .exp-body {
    max-height: 1000px;
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.03);
}

/* Profile Contact Secondary Metadata Rows */
.profile-contact-info {
    display: flex;
    gap: 25px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-top: 8px;
    margin-bottom: 15px;
}

.profile-contact-info span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ==========================================================================
   7. ENHANCED SOFTWARE MODAL FIXES & PREMIUM UI IMPROVEMENTS
   ========================================================================== */

/* Software modal specific enhancements */
#modal-software-target {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Ensure software rows have proper hover states */
.software-row-item {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
}

.software-row-item:hover {
    background: rgba(6, 182, 212, 0.05);
    border-left-color: var(--neon-magenta);
    transform: translateX(4px);
}

/* Animated dot fill effect */
.software-row-item .dot.filled {
    animation: dotPulse 2s ease-in-out infinite;
    text-shadow: 0 0 8px rgba(6, 182, 212, 0.5);
}

@keyframes dotPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Software proficiency bar visual enhancement */
.soft-bar-dots {
    display: flex;
    align-items: center;
    gap: 2px;
    letter-spacing: 1px;
}

/* Modal entrance animation */
.modal-overlay {
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; backdrop-filter: blur(0px); }
    to { opacity: 1; backdrop-filter: blur(24px); }
}

.modal-card {
    animation: modalSlideUp 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideUp {
    from { transform: translateY(30px) scale(0.96); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

/* Experience accordion enhanced transitions */
.exp-accordion-card {
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.exp-accordion-card .exp-header {
    transition: background 0.2s ease;
}

.exp-accordion-card .exp-header:hover {
    background: rgba(255,255,255,0.04);
}

.exp-accordion-card.open .exp-header h4 {
    color: var(--neon-magenta);
    transition: color 0.3s ease;
}

/* Tab button micro-interactions */
.tab-btn {
    position: relative;
    overflow: hidden;
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--neon-cyan);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.tab-btn:hover::after {
    width: 60%;
}

.tab-btn.active::after {
    width: 80%;
    background: var(--neon-magenta);
}

/* Render card enhanced hover */
.render-card {
    cursor: zoom-in;
}

.render-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(6,182,212,0.1), rgba(217,70,239,0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.render-card:hover::before {
    opacity: 1;
}

/* Profile action button glow effects */
.btn-premium-action {
    position: relative;
    overflow: hidden;
}

.btn-premium-action::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-premium-action:hover::before {
    opacity: 1;
}

/* Download button specific pulse */
#download-portfolio-btn {
    animation: btnGlow 3s ease-in-out infinite;
}

@keyframes btnGlow {
    0%, 100% { box-shadow: 0 4px 20px rgba(255, 87, 34, 0.15); }
    50% { box-shadow: 0 4px 30px rgba(255, 87, 34, 0.3); }
}

/* Lightbox enhanced navigation */
#lightbox-prev, #lightbox-next {
    transition: all 0.3s ease !important;
}

#lightbox-prev:hover, #lightbox-next:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: var(--neon-magenta) !important;
    transform: translateY(-50%) scale(1.1) !important;
}

/* Video card play button pulse */
.video-card [style*="border-radius:50%"] {
    animation: playPulse 2s ease-in-out infinite;
}

@keyframes playPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 6px 25px rgba(0,0,0,0.5); }
    50% { transform: scale(1.05); box-shadow: 0 8px 35px rgba(217,70,239,0.3); }
}

/* Scrollbar styling for modals */
.modal-card::-webkit-scrollbar {
    width: 6px;
}

.modal-card::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.02);
    border-radius: 3px;
}

.modal-card::-webkit-scrollbar-thumb {
    background: rgba(6, 182, 212, 0.3);
    border-radius: 3px;
}

.modal-card::-webkit-scrollbar-thumb:hover {
    background: rgba(6, 182, 212, 0.5);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .premium-profile-panel {
        flex-direction: column;
        text-align: center;
        margin-top: -60px;
        padding: 25px;
    }

    .profile-narrative h1 {
        font-size: 1.6rem;
    }

    .premium-renders-matrix {
        grid-template-columns: 1fr;
    }

    .modal-split-grid {
        grid-template-columns: 1fr;
    }

    .modal-card {
        padding: 25px;
        max-height: 90vh;
    }
}

/* Empty state styling */
#stage-renders-view:empty::before,
#stage-animations-view:empty::before {
    content: 'Select a project to view content';
    display: block;
    text-align: center;
    color: var(--text-dim);
    padding: 60px 20px;
    font-size: 1rem;
    font-family: 'Space Grotesk', sans-serif;
}