/* ==========================================================================
   JOSUÉ PALMA - PORTFOLIO DESIGN SYSTEM (MERCER-STYLE)
   Theme: Pure Void Black (#000000), Ember Glow (#f97316 to #dc2626),
   Crisp White (#ffffff), Champagne Ash (#e4e4e7), Glowing Ring, Zero-G Float
   STRICTLY NO BRIGHT YELLOW / ONLY HOT COAL GRADIENTS
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@500;700&display=swap');

:root {
    --bg-void: #080808;
    --bg-card: rgba(18, 18, 22, 0.75);
    --bg-card-hover: rgba(28, 28, 34, 0.92);
    
    --border-glass: rgba(250, 249, 241, 0.08);
    --border-ember-glow: rgba(254, 162, 2, 0.38);
    
    --ember-orange: #FEA202; /* Ámbar Ejecutivo / Llama Cálida */
    --ember-deep-orange: #d97706;
    --crimson-red: #B91C1C; /* Ascua Profunda / Mahogany */
    --ember-deep: #B91C1C;
    --ember-flame: #FEA202;
    
    --text-pure: #FAF9F1; /* Crema Perla / Parchment */
    --text-muted: #d6d3d1;
    --text-dim: #78716C; /* Gris Pizarra Cálido / El Humo */
    
    --font-display: 'Outfit', sans-serif;
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;
    
    --shadow-ember-glow: 0 0 50px rgba(254, 162, 2, 0.22), 0 0 80px rgba(185, 28, 28, 0.15);
    --shadow-card: 0 30px 60px -15px rgba(0, 0, 0, 0.95);
}

/* ==========================================================================
   B2B PALETTE SYSTEM (SWITCHABLE CORPORATE THEMES)
   ========================================================================== */

/* 1. Azul Pizarra (Confianza & Estabilidad B2B) */
[data-theme="slate"] {
    --bg-void: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.75);
    --bg-card-hover: rgba(51, 65, 85, 0.9);
    --border-ember-glow: rgba(6, 182, 212, 0.4);
    
    --ember-orange: #06b6d4;
    --ember-deep-orange: #2563eb;
    --crimson-red: #3b82f6;
    
    --text-pure: #f8fafc;
    --text-muted: #cbd5e1;
    --text-dim: #94a3b8;
    
    --shadow-ember-glow: 0 0 50px rgba(6, 182, 212, 0.2);
}

/* 2. Grafito & Esmeralda (Eficiencia, Automatización & ROI) */
[data-theme="emerald"] {
    --bg-void: #18181b;
    --bg-card: rgba(24, 24, 27, 0.85);
    --bg-card-hover: rgba(39, 39, 42, 0.95);
    --border-ember-glow: rgba(16, 185, 129, 0.4);
    
    --ember-orange: #10b981;
    --ember-deep-orange: #059669;
    --crimson-red: #34d399;
    
    --text-pure: #f3f4f6;
    --text-muted: #e5e7eb;
    --text-dim: #9ca3af;
    
    --shadow-ember-glow: 0 0 50px rgba(16, 185, 129, 0.2);
}

/* 3. Índigo & Neón Suave (Premium & IA Avanzada) */
[data-theme="indigo"] {
    --bg-void: #0b0f19;
    --bg-card: rgba(30, 27, 75, 0.55);
    --bg-card-hover: rgba(49, 46, 129, 0.8);
    --border-ember-glow: rgba(56, 189, 248, 0.4);
    
    --ember-orange: #38bdf8;
    --ember-deep-orange: #8b5cf6;
    --crimson-red: #a855f7;
    
    --text-pure: #ffffff;
    --text-muted: #e2e8f0;
    --text-dim: #94a3b8;
    
    --shadow-ember-glow: 0 0 50px rgba(56, 189, 248, 0.2);
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    background-color: var(--bg-void);
}

body {
    background-color: var(--bg-void);
    color: var(--text-pure);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Mouse cursor glow (Brillo reactivo al cursor - El Espectro del Ascua) */
.mouse-cursor-glow {
    position: fixed;
    top: -250px;
    left: -250px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(254, 162, 2, 0.15) 0%, rgba(185, 28, 28, 0.07) 45%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: screen;
    will-change: transform, opacity;
    transition: opacity 0.3s ease;
}

@media (pointer: coarse), (max-width: 768px) {
    .mouse-cursor-glow {
        display: none !important;
    }
}

/* Sistema de Iluminación "Brasas que Respiran" (Ember Breathe) */
@keyframes emberBreathe {
    0%, 100% {
        opacity: 0.32;
        transform: scale(0.96) translate3d(0, 0, 0);
        filter: drop-shadow(0 0 30px rgba(185, 28, 28, 0.35));
    }
    50% {
        opacity: 0.78;
        transform: scale(1.08) translate3d(0, -6px, 0);
        filter: drop-shadow(0 0 55px rgba(254, 162, 2, 0.55));
    }
}

@keyframes emberPulseBorder {
    0% {
        box-shadow: 0 0 0 0 rgba(254, 162, 2, 0.7), 0 0 20px rgba(185, 28, 28, 0.4);
        border-color: rgba(254, 162, 2, 0.9);
    }
    50% {
        box-shadow: 0 0 35px 8px rgba(254, 162, 2, 0.55), 0 0 60px 15px rgba(185, 28, 28, 0.35);
        border-color: #FEA202;
    }
    100% {
        box-shadow: 0 0 15px 0 rgba(254, 162, 2, 0.2), 0 0 30px 5px rgba(185, 28, 28, 0.1);
        border-color: rgba(254, 162, 2, 0.38);
    }
}

.ember-breathe-bg {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(254, 162, 2, 0.24) 0%, rgba(185, 28, 28, 0.14) 50%, transparent 75%);
    pointer-events: none;
    z-index: 0;
    animation: emberBreathe 7.5s ease-in-out infinite;
    will-change: opacity, transform;
    filter: blur(45px);
}

.ember-terminal-pulse {
    animation: emberPulseBorder 1.8s cubic-bezier(0.16, 1, 0.3, 1) 2 !important;
}

/* Offscreen rendering optimization */
.section:not(#scrollyHero) {
    content-visibility: auto;
    contain-intrinsic-size: 1px 600px;
}

/* Zero-G Float animation */
@keyframes zeroGFloat1 {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(0.3deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

@keyframes zeroGFloat2 {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(8px) rotate(-0.4deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

.float-1 { animation: zeroGFloat1 9s ease-in-out infinite; }
.float-2 { animation: zeroGFloat2 11s ease-in-out infinite; }

/* Grid & Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.gradient-text {
    background: linear-gradient(135deg, #FAF9F1 20%, #FEA202 65%, #B91C1C 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gradient-ember {
    background: linear-gradient(135deg, var(--ember-orange) 0%, var(--crimson-red) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
}

/* Navbar */
/* Dynamic Top Navbar (Collapses during Scrollytelling, Expands on Final Frame) */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.25rem 0;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s ease, padding 0.3s ease;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border-glass);
}

.navbar.navbar-compact {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

.navbar.navbar-expanded {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo-badge {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--ember-orange), var(--crimson-red));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.2rem;
    color: #ffffff;
    box-shadow: 0 0 20px rgba(249, 115, 22, 0.4);
}

.brand-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.brand-subtitle {
    font-size: 0.7rem;
    color: var(--ember-orange);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
}

.nav-item {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition-fast);
}

.nav-item:hover {
    color: var(--text-pure);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.6rem;
    border-radius: var(--radius-full);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
}

.btn-solid {
    background: linear-gradient(135deg, var(--ember-orange), var(--ember-deep-orange));
    color: #ffffff;
    box-shadow: 0 0 30px rgba(249, 115, 22, 0.3);
}

.btn-solid:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 45px rgba(249, 115, 22, 0.5);
}

.btn-outline {
    background: transparent;
    border-color: var(--border-glass);
    color: var(--text-pure);
}

.btn-outline:hover {
    border-color: var(--ember-orange);
    color: var(--ember-orange);
    transform: translateY(-2px);
}

/* Hero Section - 3 Column Layout with Centered Portrait */
.hero {
    min-height: 100vh;
    padding-top: 8.5rem;
    padding-bottom: 4rem;
    display: flex;
    align-items: center;
}

.hero-grid-3col {
    display: grid;
    grid-template-columns: 1.05fr 1.15fr 0.95fr;
    gap: 2.5rem;
    align-items: center;
    width: 100%;
    max-width: 1350px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.hero-col-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.prefix-tag {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--ember-orange);
    margin-bottom: 0.6rem;
    text-transform: lowercase;
}

.hero-headline {
    font-size: 3.4rem;
    font-weight: 900;
    line-height: 1.05;
    margin-bottom: 0.8rem;
    letter-spacing: -0.04em;
}

.hero-role-badge {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--ember-orange);
    letter-spacing: 0.04em;
    margin-bottom: 1.25rem;
    background: rgba(249, 115, 22, 0.1);
    border: 1px solid rgba(249, 115, 22, 0.28);
    padding: 0.35rem 0.9rem;
    border-radius: var(--radius-full);
    box-shadow: 0 0 15px rgba(249, 115, 22, 0.15);
}

.hero-subhead {
    font-size: 1.02rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-cta-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2.2rem;
}

.social-strip {
    display: flex;
    gap: 1.2rem;
    align-items: center;
}

.social-link {
    color: var(--text-dim);
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-link:hover {
    color: var(--ember-orange);
    transform: scale(1.18);
}

/* Center Column: Portrait Container */
.hero-col-center {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    position: relative;
    min-height: 380px;
    padding-bottom: 1.5rem;
}

.status-pill-floating {
    position: relative;
    z-index: 5;
    background: rgba(10, 10, 15, 0.88);
    border: 1px solid rgba(34, 197, 94, 0.4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.9), 0 0 20px rgba(34, 197, 94, 0.25);
    padding: 0.5rem 1.2rem;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-pure);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    backdrop-filter: blur(12px);
}

.status-dot-pulse {
    width: 8px;
    height: 8px;
    background-color: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 10px #22c55e;
    animation: statusPulse 2s infinite ease-in-out;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.3); }
}

/* Right Column Elements */
.hero-col-right {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.hero-code-box {
    background: rgba(10, 10, 14, 0.92);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 1.1rem 1.3rem;
    font-family: var(--font-heading);
    font-size: 0.78rem;
    color: var(--text-muted);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(16px);
    transition: var(--transition-smooth);
}

.hero-code-box:hover {
    border-color: var(--border-ember-glow);
    box-shadow: var(--shadow-ember-glow);
}

.code-box-header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding-bottom: 0.6rem;
    margin-bottom: 0.6rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.code-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
}
.code-dot.red { background-color: #ef4444; }
.code-dot.yellow { background-color: #eab308; }
.code-dot.green { background-color: #22c55e; }

.code-title {
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-left: 0.3rem;
}

.code-keyword { color: #f97316; }
.code-property { color: #ffffff; }
.code-value { color: #e4e4e7; opacity: 0.85; }

.hero-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 1.2rem 1.4rem;
    backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    gap: 1.2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transition: var(--transition-smooth);
}

.hero-stat-card:hover {
    border-color: var(--border-ember-glow);
    transform: translateY(-3px);
}

.stat-card-val {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 900;
    line-height: 1;
}

.stat-card-lbl {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero-tech-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.tech-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    padding: 0.45rem 0.9rem;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.tech-chip:hover {
    background: rgba(249, 115, 22, 0.12);
    border-color: rgba(249, 115, 22, 0.35);
    color: var(--ember-orange);
    transform: translateY(-2px);
}

@media (max-width: 1024px) {
    .hero-grid-3col {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    .hero-col-left {
        align-items: center;
        text-align: center;
    }
    .hero-headline {
        font-size: 2.8rem;
    }
    .hero-cta-group {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }
    .hero-cta-group .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Stats grid on hero bottom */
.hero-stats-row {
    display: flex;
    gap: 3.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-glass);
    margin-top: 1rem;
}

/* ==========================================================================
   STAGE SPOTLIGHT & ORBITING FLOATING UI CARDS SYSTEM
   ========================================================================== */

.stage-hero-section {
    position: relative;
    padding: 5rem 0 6rem 0 !important;
    overflow: hidden;
    background: transparent;
    perspective: 1200px;
}

.stage-spotlight-beam {
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 880px;
    height: 1080px;
    background: conic-gradient(from 162deg at 50% 0%, transparent 0deg, rgba(254, 162, 2, 0.18) 16deg, rgba(254, 162, 2, 0.38) 30deg, rgba(185, 28, 28, 0.22) 44deg, transparent 60deg);
    pointer-events: none;
    z-index: 1;
    filter: blur(22px);
    opacity: 0.88;
    animation: spotlightPulse 7s ease-in-out infinite alternate;
}

@keyframes spotlightPulse {
    0% { opacity: 0.72; filter: blur(24px); }
    100% { opacity: 0.95; filter: blur(18px); }
}

.spotlight-floor-glow {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 720px;
    height: 210px;
    background: radial-gradient(ellipse at center, rgba(254, 162, 2, 0.48) 0%, rgba(185, 28, 28, 0.26) 45%, transparent 75%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    filter: blur(28px);
}

.stage-hero-container {
    position: relative;
    min-height: 840px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.stage-header-wrapper {
    position: relative;
    z-index: 4;
    text-align: center;
    width: 100%;
    max-width: 850px;
    margin: 0 auto 1rem auto;
}

.stage-kinetic-title {
    position: relative;
    height: 85px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.kinetic-word {
    position: absolute;
    font-size: 3.8rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.04em;
    white-space: nowrap;
    will-change: transform, opacity;
    transform: translate3d(-150vw, 0, 0);
    opacity: 0;
}

.stage-portrait-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw;
    height: 100vh;
    z-index: 10;
    pointer-events: none;
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: none;
}

.stage-portrait-img {
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center;
    pointer-events: none;
    filter: drop-shadow(0 0 20px rgba(0, 0, 0, 0.4));
    transition: transform 0.4s ease;
}

/* Orbiting Glass Cards Container & Cards */
.orbiting-cards-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.orbiting-card {
    position: absolute;
    pointer-events: auto;
    cursor: pointer;
    background: rgba(16, 16, 22, 0.88);
    border: 1px solid var(--border-ember-glow);
    border-radius: var(--radius-md);
    padding: 1.1rem 1.35rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.85), 0 0 25px rgba(254, 162, 2, 0.14);
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    width: 250px;
    user-select: none;
    will-change: transform, opacity;
}

.orbiting-card:hover {
    border-color: #FEA202;
    background: rgba(26, 26, 36, 0.95);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.95), 0 0 45px rgba(254, 162, 2, 0.45);
}

.orbit-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.6rem;
}

.orbit-icon {
    font-size: 1.25rem;
    display: inline-flex;
    align-items: center;
}

.orbit-tag {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.orbit-card-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-pure);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.orbit-metric-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 0.5rem;
}

.orbit-val {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-pure);
}

.orbit-badge {
    font-size: 0.7rem;
    font-weight: 700;
}

.orbit-click-hint {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--ember-orange);
    display: flex;
    align-items: center;
    gap: 0.35rem;
    transition: transform 0.2s ease;
}

.orbiting-card:hover .orbit-click-hint {
    transform: translateX(4px);
    color: #ffffff;
}

/* About Me section */
.section {
    padding: 3.5rem 0;
    border-top: 1px solid var(--border-glass);
}

.section-label {
    display: none !important;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 1.25rem;
    letter-spacing: -0.03em;
}

.about-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 3.5rem;
    align-items: center;
}

.about-image-col {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    width: 100%;
    position: relative;
}

.portrait-container {
    width: 100%;
    max-width: 500px;
    position: relative;
    text-align: center;
    display: flex;
    justify-content: center;
}

.portrait-container::before {
    content: '';
    position: absolute;
    inset: -10px;
    background: radial-gradient(circle at 50% 60%, rgba(254, 162, 2, 0.2) 0%, rgba(185, 28, 28, 0.12) 45%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    animation: emberBreathe 8s ease-in-out infinite;
    filter: blur(35px);
}

.portrait-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -5%;
    right: -5%;
    height: 140px;
    background: linear-gradient(to bottom, transparent 0%, rgba(8, 8, 8, 0.6) 40%, #080808 100%);
    pointer-events: none;
    z-index: 2;
}

.portrait-img {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 25px 50px rgba(0, 0, 0, 0.95));
    transition: transform 0.4s ease, filter 0.4s ease;
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 55%, rgba(0,0,0,0) 98%), linear-gradient(to right, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 12%, rgba(0,0,0,1) 88%, rgba(0,0,0,0) 100%);
    mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 55%, rgba(0,0,0,0) 98%), linear-gradient(to right, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 12%, rgba(0,0,0,1) 88%, rgba(0,0,0,0) 100%);
    -webkit-mask-composite: source-in;
    mask-composite: intersect;
}

.portrait-img:hover {
    transform: scale(1.025);
    filter: drop-shadow(0 25px 60px rgba(254, 162, 2, 0.25));
}

.about-left-desc {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.about-2x2-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.about-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 1.75rem;
    transition: var(--transition-smooth);
    backdrop-filter: blur(16px);
}

.about-card:hover {
    border-color: var(--border-ember-glow);
    transform: translateY(-4px);
    box-shadow: var(--shadow-ember-glow);
}

.about-card-icon {
    font-size: 1.6rem;
    color: var(--ember-orange);
    margin-bottom: 1rem;
    display: inline-block;
}

.about-card-title {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.about-card-desc {
    font-size: 0.85rem;
    color: var(--text-dim);
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.75rem;
    margin-top: 2rem;
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 2.2rem 1.8rem;
    transition: var(--transition-smooth);
    backdrop-filter: blur(16px);
}

.service-card:hover {
    border-color: var(--border-ember-glow);
    transform: translateY(-6px);
    box-shadow: var(--shadow-ember-glow);
}

.service-icon {
    font-size: 2.2rem;
    color: var(--ember-orange);
    margin-bottom: 1.5rem;
}

.service-card-title {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 0.8rem;
}

.service-card-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.55;
}

.service-link {
    color: var(--ember-orange);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: var(--transition-fast);
}

.service-link:hover {
    color: var(--text-pure);
    transform: translateX(4px);
}

/* Tech Stack horizontal list */
.tech-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.2rem;
    margin-top: 1.8rem;
}

.tech-badge {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.tech-badge:hover {
    border-color: var(--border-ember-glow);
    color: var(--text-pure);
    transform: translateY(-3px);
}

.tech-badge i {
    color: var(--ember-orange);
    font-size: 1.1rem;
}

/* ==========================================================================
   AI LIVE ASSISTANT (CHAT INTERFACE)
   ========================================================================== */
.ai-chat-window {
    max-width: 850px;
    margin: 3rem auto 0;
    background: rgba(15, 15, 20, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    overflow: hidden;
    backdrop-filter: blur(30px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(249, 115, 22, 0.05);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

.ai-chat-window:hover {
    border-color: rgba(249, 115, 22, 0.3);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.9), 0 0 50px rgba(249, 115, 22, 0.1);
}

.ai-chat-header {
    background: rgba(0, 0, 0, 0.6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1.2rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.ai-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.15), rgba(249, 115, 22, 0.05));
    border: 1px solid rgba(249, 115, 22, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ember-orange);
    position: relative;
    box-shadow: inset 0 0 15px rgba(249, 115, 22, 0.2);
}

.ai-avatar::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    background: #22c55e;
    border-radius: 50%;
    border: 2px solid #0f0f14;
}

.ai-header-info {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.ai-name {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-pure);
}

.ai-status {
    font-size: 0.8rem;
    color: #22c55e;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.ai-status::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.ai-chat-area {
    padding: 2.5rem 2rem;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
}

.ai-message {
    display: flex;
    gap: 1.2rem;
    align-items: flex-start;
    opacity: 0;
    animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.ai-message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(249, 115, 22, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ember-orange);
    flex-shrink: 0;
}

.ai-message-bubble {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1.5rem 1.8rem;
    border-radius: 4px 18px 18px 18px;
    max-width: 90%;
    text-align: left;
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-main);
}

.ai-message-bubble h4 {
    color: var(--text-pure);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ai-message-bubble ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ai-message-bubble li {
    margin-bottom: 0.8rem;
    padding-left: 1.8rem;
    position: relative;
}

.ai-message-bubble li:last-child {
    margin-bottom: 0;
}

.ai-message-bubble li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--ember-orange);
    font-weight: 700;
}

.ai-suggestions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 0 2rem 2.5rem 2rem;
}

.ai-suggestion-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 1.2rem;
    border-radius: 12px;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ai-suggestion-card:hover, .ai-suggestion-card.active {
    background: rgba(249, 115, 22, 0.05);
    border-color: rgba(249, 115, 22, 0.3);
    transform: translateY(-2px);
}

.ai-suggestion-card.active {
    box-shadow: 0 0 20px rgba(249, 115, 22, 0.1);
}

.ai-suggestion-icon {
    font-size: 1.4rem;
    margin-bottom: 0.2rem;
}

.ai-suggestion-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-pure);
}

.ai-suggestion-desc {
    font-size: 0.82rem;
    color: var(--text-dim);
}

.typing-indicator {
    display: flex;
    gap: 5px;
    padding: 0.8rem 1rem;
    align-items: center;
}

.typing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ember-orange);
    animation: typingPulse 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typingPulse {
    0%, 80%, 100% { transform: scale(0); opacity: 0.3; }
    40% { transform: scale(1); opacity: 1; }
}

@media (max-width: 768px) {
    .ai-suggestions-grid {
        grid-template-columns: 1fr;
    }
}

/* Portfolio grid cards */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2.2rem;
    margin-top: 2rem;
}

.portfolio-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition-smooth);
    backdrop-filter: blur(20px);
}

.portfolio-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% -10%, rgba(254, 162, 2, 0.28) 0%, rgba(185, 28, 28, 0.18) 55%, transparent 85%);
    opacity: 0.12;
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    z-index: 0;
    will-change: opacity;
}

.portfolio-card:hover::before {
    opacity: 0.85;
}

.portfolio-card:hover {
    border-color: var(--border-ember-glow);
    transform: translateY(-6px);
    box-shadow: 0 20px 50px -10px rgba(254, 162, 2, 0.28), 0 0 35px rgba(185, 28, 28, 0.2);
}

.portfolio-screen {
    height: 220px;
    background: linear-gradient(135deg, #050507 0%, #111116 100%);
    border-bottom: 1px solid var(--border-glass);
    position: relative;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.portfolio-badge {
    padding: 0.25rem 0.75rem;
    background: rgba(249, 115, 22, 0.1);
    border: 1px solid rgba(249, 115, 22, 0.25);
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--ember-orange);
    align-self: flex-start;
}

.portfolio-mock-app {
    background: rgba(0, 0, 0, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    padding: 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.portfolio-info {
    padding: 2rem;
}

.portfolio-title {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 0.6rem;
}

.portfolio-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.55;
}

/* Testimonial Cards */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 3.5rem;
}

.testimonial-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    transition: var(--transition-smooth);
    backdrop-filter: blur(16px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.testimonial-card:hover {
    border-color: var(--border-ember-glow);
    transform: translateY(-4px);
    box-shadow: var(--shadow-ember-glow);
}

.quote-icon {
    font-size: 2.2rem;
    color: var(--ember-orange);
    line-height: 1;
    margin-bottom: 1rem;
    font-family: Georgia, serif;
}

.testimonial-text {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.stars-row {
    color: var(--ember-orange);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

.client-profile {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.client-avatar {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #1f1f2e, #111116);
    border: 1px solid var(--border-glass);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--ember-orange);
}

.client-name {
    font-size: 0.95rem;
    font-weight: 700;
}

.client-role {
    font-size: 0.78rem;
    color: var(--text-dim);
}

/* Contact Grid */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4.5rem;
    margin-top: 3rem;
}

.contact-info-list {
    list-style: none;
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.contact-info-icon {
    width: 44px;
    height: 44px;
    background: rgba(249, 115, 22, 0.1);
    border: 1px solid rgba(249, 115, 22, 0.25);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ember-orange);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.contact-info-content h4 {
    font-size: 0.85rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.contact-info-content p {
    font-size: 1rem;
    color: var(--text-pure);
    margin-top: 0.2rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

/* ==========================================================================
   CONTACT FORM & INPUTS (UNIFIED DARK LUXURY AESTHETIC)
   ========================================================================== */

.contact-card-container {
    max-width: 680px;
    margin: 0 auto;
}

.contact-form-card {
    background: rgba(15, 15, 20, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 3rem 2.8rem;
    backdrop-filter: blur(24px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.9), 0 0 30px rgba(249, 115, 22, 0.05);
    transition: var(--transition-smooth);
}

.contact-form-card:hover {
    border-color: rgba(249, 115, 22, 0.3);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.95), 0 0 40px rgba(249, 115, 22, 0.1);
}

.form-group-custom {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-label-custom {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-pure);
    letter-spacing: -0.01em;
}

.input-custom {
    width: 100%;
    background: rgba(0, 0, 0, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 14px !important;
    padding: 0.95rem 1.25rem !important;
    font-family: var(--font-body) !important;
    font-size: 0.95rem !important;
    color: #ffffff !important;
    transition: all 0.25s ease !important;
    box-sizing: border-box !important;
    appearance: none;
    -webkit-appearance: none;
}

.input-custom::placeholder {
    color: rgba(255, 255, 255, 0.35) !important;
}

.input-custom:focus {
    outline: none !important;
    border-color: var(--ember-orange) !important;
    background: rgba(0, 0, 0, 0.85) !important;
    box-shadow: 0 0 20px rgba(249, 115, 22, 0.25) !important;
}

/* Custom styled dropdown arrow for <select> */
select.input-custom {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23f97316' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 1.2rem center !important;
    background-size: 16px !important;
    padding-right: 2.8rem !important;
}

select.input-custom option {
    background: #0f0f14 !important;
    color: #ffffff !important;
    padding: 0.8rem !important;
}

/* ==========================================================================
   1. INTERACTIVE BI ANIMATED DASHBOARD
   ========================================================================== */
.bi-dashboard-card {
    background: rgba(15, 15, 20, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 2.5rem;
    backdrop-filter: blur(30px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.9), 0 0 30px rgba(249, 115, 22, 0.08);
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.kpi-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 18px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.kpi-card:hover {
    border-color: rgba(249, 115, 22, 0.4);
    transform: translateY(-3px);
}

.kpi-icon {
    font-size: 1.3rem;
    color: var(--ember-orange);
    margin-bottom: 0.75rem;
}

.kpi-lbl {
    font-size: 0.78rem;
    color: var(--text-dim);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.3rem;
}

.kpi-val {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.kpi-badge {
    font-size: 0.75rem;
    font-weight: 700;
}

.font-positive { color: #22c55e; }
.font-ember { color: var(--ember-orange); }
.font-blue { color: #60a5fa; }

.bi-chart-container {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 18px;
    padding: 1.5rem;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.svg-wrapper {
    width: 100%;
    overflow: hidden;
}

.bi-svg-chart {
    width: 100%;
    height: auto;
}

.chart-node {
    cursor: pointer;
    transition: transform 0.2s ease, r 0.2s ease;
}

.chart-node:hover {
    r: 9;
    fill: #ffffff;
}

.chart-x-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    font-size: 0.78rem;
    color: var(--text-dim);
    font-weight: 600;
}

/* ==========================================================================
   2. 3D ISOMETRIC SAAS ARCHITECTURE STACK
   ========================================================================== */
.iso-wrapper {
    perspective: 1000px;
    display: flex;
    justify-content: center;
    padding: 4rem 1rem;
}

.iso-stack-container {
    transform-style: preserve-3d;
    transform: rotateX(55deg) rotateZ(-35deg);
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
    width: 100%;
    max-width: 540px;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
}

.iso-wrapper:hover .iso-stack-container {
    transform: rotateX(45deg) rotateZ(-25deg);
}

.iso-layer {
    background: rgba(15, 15, 22, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 1.8rem 2.2rem;
    box-shadow: -20px 20px 40px rgba(0, 0, 0, 0.9), 0 0 20px rgba(255, 255, 255, 0.05);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s ease;
    transform-style: preserve-3d;
    will-change: transform;
}

.iso-wrapper:hover .iso-layer-top {
    transform: translateZ(60px);
    border-color: rgba(249, 115, 22, 0.6);
    box-shadow: -25px 25px 50px rgba(0, 0, 0, 0.95), 0 0 30px rgba(249, 115, 22, 0.3);
}

.iso-wrapper:hover .iso-layer-mid {
    transform: translateZ(20px);
    border-color: rgba(96, 165, 250, 0.6);
    box-shadow: -20px 20px 40px rgba(0, 0, 0, 0.9), 0 0 30px rgba(96, 165, 250, 0.3);
}

.iso-wrapper:hover .iso-layer-bot {
    transform: translateZ(-20px);
    border-color: rgba(34, 197, 94, 0.6);
    box-shadow: -15px 15px 30px rgba(0, 0, 0, 0.9), 0 0 30px rgba(34, 197, 94, 0.3);
}

.iso-layer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.iso-badge {
    font-size: 0.72rem;
    font-weight: 800;
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-full);
    letter-spacing: 0.05em;
}

.iso-badge.ember { background: rgba(249, 115, 22, 0.15); color: var(--ember-orange); border: 1px solid rgba(249, 115, 22, 0.3); }
.iso-badge.blue { background: rgba(96, 165, 250, 0.15); color: #60a5fa; border: 1px solid rgba(96, 165, 250, 0.3); }
.iso-badge.green { background: rgba(34, 197, 94, 0.15); color: #22c55e; border: 1px solid rgba(34, 197, 94, 0.3); }

.iso-tech {
    font-size: 0.78rem;
    color: var(--text-dim);
    font-weight: 600;
}

.iso-layer-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 0.3rem;
}

.iso-layer-desc {
    font-size: 0.84rem;
    color: var(--text-muted);
}

/* ==========================================================================
   3. UI ↔ CODE INTERACTIVE TOGGLE CARD
   ========================================================================== */
.code-toggle-box {
    background: rgba(15, 15, 20, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    overflow: hidden;
    backdrop-filter: blur(30px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.9);
}

.code-toggle-header {
    background: rgba(0, 0, 0, 0.6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    padding: 1rem 1.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.toggle-switch-group {
    display: flex;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 0.25rem;
    gap: 0.25rem;
}

.toggle-mode-btn {
    background: transparent;
    border: none;
    color: var(--text-dim);
    padding: 0.45rem 0.9rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.25s ease;
}

.toggle-mode-btn.active {
    background: var(--ember-orange);
    color: #ffffff;
    box-shadow: 0 0 15px rgba(249, 115, 22, 0.4);
}

.code-toggle-content {
    padding: 2rem;
    position: relative;
    min-height: 280px;
}

.toggle-view-panel {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.toggle-view-panel.active {
    display: block;
    opacity: 1;
}

/* Demo Table Styling */
.demo-table-wrapper {
    overflow-x: auto;
}

.demo-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.88rem;
}

.demo-table th {
    padding: 0.9rem 1.2rem;
    color: var(--text-dim);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.demo-table td {
    padding: 1.1rem 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
}

.table-badge {
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
}

.table-badge.active { background: rgba(34, 197, 94, 0.1); color: #22c55e; border: 1px solid rgba(34, 197, 94, 0.25); }
.table-badge.idle { background: rgba(234, 179, 8, 0.1); color: #eab308; border: 1px solid rgba(234, 179, 8, 0.25); }

.table-action {
    color: var(--ember-orange);
    font-weight: 700;
    cursor: pointer;
}

/* Syntax Highlighting */
.code-highlight-box {
    margin: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.88rem;
    line-height: 1.65;
    overflow-x: auto;
}

.code-keyword { color: #c678dd; font-weight: 700; }
.code-string { color: #98c379; }
.code-function { color: #61afef; }
.code-tag { color: #e06c75; }

/* Professional Footer System */
.footer {
    padding: 5rem 0 2.5rem 0;
    border-top: 1px solid var(--border-glass);
    background: #080808;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1.2fr 0.8fr;
    gap: 3.5rem;
    margin-bottom: 4rem;
}

.footer-col-title {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--ember-orange);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 1.5rem;
}

.footer-info-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.footer-info-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
}

.footer-info-list i {
    color: var(--ember-orange);
    font-size: 1.1rem;
    margin-top: 0.2rem;
}

.footer-info-lbl {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-dim);
    letter-spacing: 0.08em;
}

.footer-info-val {
    font-size: 0.92rem;
    color: var(--text-pure);
    font-weight: 600;
    text-decoration: none;
}

.footer-info-val:hover {
    color: var(--ember-orange);
}

.footer-social-btns {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    align-items: flex-start;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding-top: 2.2rem;
    border-top: 1px solid var(--border-glass);
}

.copyright {
    font-size: 0.82rem;
    color: var(--text-dim);
}

.scroll-top-btn {
    width: 40px;
    height: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 50%;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition-fast);
}

.scroll-top-btn:hover {
    border-color: var(--ember-orange);
    color: var(--ember-orange);
    transform: translateY(-3px);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.93);
    backdrop-filter: blur(24px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: #0c0c0e;
    border: 1px solid var(--border-ember-glow);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 600px;
    padding: 3rem 2.5rem;
    position: relative;
    box-shadow: var(--shadow-ember-glow), var(--shadow-card);
}

.modal-close-btn {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: 50%;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.modal-close-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
}

/* Responsive */
@media (max-width: 992px) {
    .hero-grid, .about-grid, .contact-grid {
        grid-template-columns: 1fr;
        gap: 3.5rem;
    }
    
    .hero-headline {
        font-size: 2.8rem;
    }
    
    .nav-menu {
        display: none;
    }
    
    .glowing-ring {
        width: 280px;
        height: 280px;
    }
    
    .portrait-img {
        width: 290px;
    }
}

/* ==========================================================================
   SCROLLYTELLING HERO SYSTEM (5 PHASES)
   ========================================================================== */

.hero-scrolly-wrapper {
    position: relative;
    height: 1200vh; /* 5 Phases space */
    background: #080808;
}

.scrolly-sticky-viewport {
    position: sticky;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000000;
}

#scrollyCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    display: block;
}

.scrolly-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease-out;
}

.scrolly-video-overlay video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.65) contrast(1.1);
}

.scrolly-vignette {
    position: absolute;
    inset: 0;
    z-index: 3;
    background: radial-gradient(circle at center, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.85) 90%);
    pointer-events: none;
}

.scrolly-intro-text {
    position: absolute;
    top: 15%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2.8rem;
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    z-index: 10;
    opacity: 1;
    transition: opacity 0.5s ease, transform 0.5s ease;
    text-shadow: 0 4px 30px rgba(255,255,255,0.3);
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
    width: 90%;
    pointer-events: none;
}

@media (max-width: 768px) {
    .scrolly-intro-text {
        font-size: 1.8rem;
        top: 20%;
    }
}

.scrolly-caption-container {
    position: absolute;
    z-index: 10;
    text-align: left;
    max-width: 440px;
    width: calc(100% - 3rem);
    padding: 1.25rem 1.65rem;
    background: rgba(8, 8, 14, 0.58);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 3px solid var(--ember-orange);
    border-radius: var(--radius-md);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.75), 0 0 30px rgba(249, 115, 22, 0.15);
    transition: top 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
                left 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
                right 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
                opacity 0.6s ease;
    pointer-events: none;
}

/* Posicionamiento Lateral por Fases (Fluir de lado a lado) */
.scrolly-caption-container.pos-phase-1 {
    top: 22%;
    left: 6%;
    right: auto;
    transform: translateY(0);
}

.scrolly-caption-container.pos-phase-2 {
    top: 45%;
    left: auto;
    right: 6%;
    transform: translateY(-50%);
}

.scrolly-caption-container.pos-phase-3 {
    top: 65%;
    left: 6%;
    right: auto;
    transform: translateY(-100%);
}

.scrolly-caption-container.pos-phase-4 {
    top: 25%;
    left: auto;
    right: 6%;
    transform: translateY(0);
}

.scrolly-phase-badge {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ember-orange);
    background: rgba(249, 115, 22, 0.12);
    padding: 0.28rem 0.85rem;
    border-radius: var(--radius-full);
    border: 1px solid rgba(249, 115, 22, 0.32);
    margin-bottom: 0.75rem;
    box-shadow: 0 0 15px rgba(249, 115, 22, 0.12);
}

.scrolly-caption-text {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.35;
    color: #ffffff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9);
}

.scrolly-progress-bar-container {
    position: absolute;
    bottom: 2.2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 260px;
    height: 4px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    z-index: 10;
    overflow: hidden;
}

.scrolly-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--ember-orange), var(--crimson-red));
    box-shadow: 0 0 15px var(--ember-orange);
    transition: width 0.1s ease-out;
}

.scrolly-scroll-hint {
    position: absolute;
    bottom: 2rem;
    right: 2.5rem;
    z-index: 10;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.6);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-glass);
    animation: bounceHint 2s infinite ease-in-out;
}

@keyframes bounceHint {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}

.scrolly-final-hero-content {
    position: absolute;
    inset: 0;
    z-index: 20;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0.8s ease, transform 0.8s ease;
    transform: translateY(30px);
    display: flex;
    align-items: center;
    pointer-events: none;
    background: transparent;
}

.scrolly-final-hero-content.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

@media (max-width: 768px) {
    .scrolly-caption-container,
    .scrolly-caption-container.pos-phase-1,
    .scrolly-caption-container.pos-phase-2,
    .scrolly-caption-container.pos-phase-3,
    .scrolly-caption-container.pos-phase-4 {
        top: auto !important;
        bottom: 15% !important;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        max-width: 90% !important;
        padding: 1rem 1.2rem;
    }
    
    .scrolly-caption-text {
        font-size: 1.15rem;
    }
    
    .scrolly-scroll-hint {
        bottom: 2rem;
    }
}

/* ==========================================================================
   HEADER & FLOATING THEME SWITCHER WIDGETS
   ========================================================================== */
.nav-theme-select {
    background: rgba(15, 15, 22, 0.95);
    border: 1px solid var(--border-ember-glow);
    border-radius: var(--radius-full);
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.45rem 1rem;
    cursor: pointer;
    outline: none;
    transition: all 0.25s ease;
}

.nav-theme-select:hover {
    border-color: var(--ember-orange);
    box-shadow: 0 0 15px rgba(249, 115, 22, 0.3);
}

.theme-switcher-widget {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    z-index: 999999 !important;
    display: flex;
    background: #0f172a !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    border-radius: 9999px;
    padding: 0.35rem 0.5rem;
    gap: 0.35rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.95), 0 0 20px rgba(249, 115, 22, 0.2);
    transition: all 0.3s ease;
}

.theme-switcher-widget:hover {
    border-color: var(--ember-orange) !important;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.98), 0 0 30px rgba(249, 115, 22, 0.3);
}

.theme-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    padding: 0.45rem 0.9rem;
    border-radius: 9999px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    transition: all 0.25s ease;
}

.theme-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
}

.theme-btn.active {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.15);
}

.dot-color {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

@media (max-width: 768px) {
    .theme-switcher-widget {
        bottom: 1rem;
        left: 50%;
        transform: translateX(-50%);
        flex-wrap: wrap;
        justify-content: center;
        max-width: 92%;
    }
}


#sobre-mi.active {
    opacity: 1 !important;
    pointer-events: auto !important;
    z-index: 50 !important;
}


#vision.active {
    opacity: 1 !important;
    pointer-events: auto !important;
    z-index: 50 !important;
}

/* BI Dashboard Animation */
#chartLinePath {
    stroke-dasharray: 2500;
    stroke-dashoffset: 2500;
}
#dashboard-bi.is-visible #chartLinePath {
    animation: drawPath 2.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes drawPath {
    to { stroke-dashoffset: 0; }
}

/* ==========================================================================
   MOBILE RESPONSIVENESS (SMARTPHONES)
   ========================================================================== */
@media (max-width: 768px) {
    /* Global Adjustments */
    .section {
        padding: 3rem 0;
    }
    .container {
        padding: 0 1.2rem;
    }
    
    /* Typography */
    .hero-headline {
        font-size: 2.3rem;
    }
    .section-title {
        font-size: 1.8rem;
    }
    .kinetic-word {
        font-size: 2.2rem;
    }
    
    /* Navigation */
    .nav-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    .nav-container > div:last-child {
        width: 100%;
        justify-content: space-between;
    }
    
    /* Grids to Single Column */
    .services-grid, 
    .portfolio-grid, 
    .testimonials-grid, 
    .kpi-grid, 
    .footer-grid, 
    .about-2x2-grid, 
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 1.8rem;
    }
    
    /* Scrollytelling Hero Cards */
    .scrolly-caption-container {
        width: 90% !important;
        max-width: none !important;
        left: 5% !important;
        right: 5% !important;
        top: auto !important;
        bottom: 10% !important;
        transform: translateY(0) !important;
    }
    
    /* Orbiting Cards (Stage Section) Stacked */
    .orbiting-cards-container {
        position: relative;
        display: flex;
        flex-direction: column;
        gap: 1rem;
        padding-top: 2rem;
    }
    .orbiting-card {
        position: relative !important;
        transform: none !important;
        width: 100% !important;
        left: 0 !important;
        top: 0 !important;
    }
    .stage-header-wrapper h2 {
        font-size: 1.8rem !important;
    }
    .stage-header-wrapper {
        transform: translateY(0) !important;
        margin-top: 2rem;
    }
    
    /* Hide some elements on mobile for simplicity */
    .contact-portrait, .stage-portrait-wrapper {
        display: none !important;
    }
    
    /* Hero Final Section Layout Fixes */
    .scrolly-final-hero-content {
        align-items: flex-start !important;
        padding-top: 12vh !important;
    }
    .hero-grid-3col {
        gap: 1.5rem !important;
    }
    .hero-col-center {
        display: none !important;
        min-height: 0 !important;
    }
    
    /* Fix overlapping CTA buttons */
    .hero-cta-group {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }
    .hero-cta-group .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Stats Row */
    .hero-stats-row {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    /* Footer */
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    /* Form Padding */
    .contact-form-card {
        padding: 2rem 1.5rem;
    }
    
    .bi-dashboard-card {
        padding: 1.5rem;
    }
    .dashboard-controls {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .hero-headline {
        font-size: 1.9rem;
    }
    .section-title {
        font-size: 1.6rem;
    }
    .stat-card-val {
        font-size: 1.6rem;
    }
    .iso-layer {
        padding: 1.2rem 1rem;
    }
    .nav-container > div:last-child {
        flex-direction: column;
        align-items: stretch;
    }
}
