/* ============================================================
   MODERN 3D & NEURAL OBSIDIAN THEME
   Inspired by Stitch MCP "Neural Architect" Design System
   ============================================================ */

:root {
    /* Neural Obsidian Palette (Dark) */
    --color-bg-obsidian: #0e0e13;
    --color-neon-teal: #00ffd0;
    --color-neural-purple: #7000ff;
    
    /* Surface Hierarchy (Dark) */
    --surface-1: #131318;      /* Base */
    --surface-2: #1b1b20;      /* Low */
    --surface-3: #2a292f;      /* High */
    --surface-4: #35343a;      /* Highest */
    
    /* Effects (Dark) */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --neon-teal-glow: 0 0 15px rgba(0, 255, 208, 0.3);
    --neural-purple-glow: 0 0 20px rgba(112, 0, 255, 0.2);
    
    /* 3D Constants */
    --perspective: 1200px;
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
    /* Neural Alabaster Palette (Light) */
    --color-bg-obsidian: #f8fafc;
    --color-neon-teal: #0ea5e9;  /* Azure Blue for Light Mode */
    --color-neural-purple: #6366f1;
    
    /* Surface Hierarchy (Light) */
    --surface-1: #ffffff;
    --surface-2: #f1f5f9;
    --surface-3: #e2e8f0;
    --surface-4: #cbd5e1;
    
    /* Effects (Light) */
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(0, 0, 0, 0.05);
    --neon-teal-glow: 0 0 10px rgba(14, 165, 233, 0.1);
    --neural-purple-glow: 0 0 15px rgba(99, 102, 241, 0.1);
}

/* ============================================================
   3D CORE - Perspective & Transformation
   ============================================================ */

.hero-modern-3d {
    perspective: var(--perspective);
    background-color: var(--color-bg-obsidian);
    overflow: hidden;
    position: relative;
    padding: 100px 0;
}

.hero-grid-3d {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: var(--space-8);
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
}

/* 3D Floating Profile Card */
.profile-card-3d {
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s var(--ease-smooth);
    cursor: pointer;
}

.profile-card-3d:hover {
    transform: rotateY(-10deg) rotateX(5deg) scale(1.02);
}

.card-content-3d {
    position: relative;
    background: var(--surface-2);
    border-radius: var(--radius-2xl);
    padding: 20px;
    transform: translateZ(20px);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    box-shadow: var(--neural-purple-glow);
}

/* Scanner Line Animation */
.scanner-line-3d {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-neon-teal), transparent);
    z-index: 10;
    animation: scan 4s linear infinite;
    opacity: 0.7;
    filter: drop-shadow(0 0 5px var(--color-neon-teal));
}

@keyframes scan {
    0% { top: 0; }
    50% { top: 100%; }
    100% { top: 0; }
}

/* ============================================================
   MODERN GLASSMORPHISM
   ============================================================ */

.glass-proposition-3d {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1.5px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 30px;
    margin-top: 30px;
    transform: translateZ(30px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.glass-proposition-3d h3 {
    color: var(--color-neon-teal);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.15rem;
    margin: 0;
}

.proposition-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.prop-icon {
    font-size: 1.2rem;
    filter: drop-shadow(0 0 5px var(--color-neon-teal));
}

.hero-mission-text {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.8;
    font-size: 1.05rem;
}

[data-theme="light"] .hero-mission-text {
    color: #334155;
}

.text-highlight-teal {
    color: var(--color-neon-teal);
    font-weight: 700;
}

.text-highlight-purple {
    color: var(--color-neural-purple);
    font-weight: 700;
}

/* ============================================================
   HOLOGRAPHIC BUTTONS
   ============================================================ */

.btn-modern-3d {
    padding: 14px 28px;
    border-radius: var(--radius-lg);
    font-weight: 600;
    letter-spacing: 0.1em;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-neon-primary {
    background: transparent;
    color: var(--color-neon-teal);
    border: 2px solid var(--color-neon-teal);
    box-shadow: var(--neon-teal-glow);
}

.btn-neon-primary:hover {
    background: var(--color-neon-teal);
    color: var(--color-bg-obsidian);
    box-shadow: 0 0 30px var(--color-neon-teal);
    transform: translateY(-3px);
}

.btn-glass-secondary {
    background: var(--glass-bg);
    color: var(--color-text);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(5px);
}

[data-theme="dark"] .btn-glass-secondary {
    color: white;
}

.btn-glass-secondary:hover {
    background: var(--glass-border);
    transform: translateY(-3px);
}

/* ============================================================
   HUD OVERLAYS & STATUS
   ============================================================ */

.hud-badge-3d {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 255, 208, 0.1);
    color: var(--color-neon-teal);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    border: 1px solid rgba(0, 255, 208, 0.2);
    margin-bottom: 20px;
}

.pulse-dot-3d {
    width: 6px;
    height: 6px;
    background: var(--color-neon-teal);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--color-neon-teal);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.5; }
    100% { transform: scale(1); opacity: 1; }
}

/* Profile Card HUD overlays */
.profile-hud-data {
    position: absolute;
    bottom: -15px;
    right: -25px;
    background: var(--surface-4);
    padding: 16px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-neural-purple);
    font-family: var(--font-mono);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    z-index: 20;
    transform: translateZ(60px);
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 180px;
}

.hud-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.72rem;
    letter-spacing: 0.5px;
}

.hud-label {
    color: rgba(255,255,255,0.5);
    font-weight: 600;
}

.hud-value {
    color: white;
    font-weight: 700;
    text-transform: uppercase;
}

.hud-value.success {
    color: var(--color-neon-teal);
}

[data-theme="light"] .hud-label {
    color: #64748b;
}

[data-theme="light"] .hud-value {
    color: #1e293b;
}

/* ============================================================
   GLOBAL UTILITIES & SECTION WRAPPERS
   ============================================================ */

.section-title-3d {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 30px;
    background: linear-gradient(135deg, #fff 0%, var(--color-neon-teal) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
}

.glass-card-3d {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 25px;
    transition: all 0.4s var(--ease-smooth);
    position: relative;
    overflow: hidden;
}

.glass-card-3d:hover {
    border-color: var(--color-neon-teal);
    box-shadow: 0 10px 40px rgba(0, 255, 208, 0.1);
    transform: translateY(-5px);
}

.glass-card-3d::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 255, 208, 0.05),
        transparent
    );
    transition: 0.6s;
}

.glass-card-3d:hover::before {
    left: 150%;
}

/* ============================================================
   TERMINAL MODERNIZATION
   ============================================================ */

.terminal-section {
    background: var(--color-bg-obsidian);
    padding: 100px 0;
    position: relative;
}

.terminal-window.hologram {
    border: 1px solid rgba(72, 242, 208, 0.18);
    box-shadow: 0 16px 44px rgba(2, 6, 23, 0.34);
    background: rgba(14, 14, 19, 0.8) !important;
    backdrop-filter: blur(20px);
}

.terminal-header {
    background: rgba(0, 255, 208, 0.08) !important;
    border-bottom: 1px solid rgba(0, 255, 208, 0.14);
}

.terminal-prompt {
    color: var(--color-neon-teal) !important;
}

[data-theme="light"] .terminal-window.hologram {
    border-color: rgba(14, 165, 233, 0.16);
    box-shadow: 0 18px 44px rgba(148, 163, 184, 0.18);
    background: rgba(255, 255, 255, 0.9) !important;
}

[data-theme="light"] .terminal-header {
    background: rgba(14, 165, 233, 0.08) !important;
    border-bottom-color: rgba(14, 165, 233, 0.16);
}

/* ============================================================
   SKILLS & EXPERIENCE NEON TAGS
   ============================================================ */

.tech-tag-neon {
    background: rgba(112, 0, 255, 0.1);
    color: var(--color-neural-purple);
    border: 1px solid rgba(112, 0, 255, 0.2);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    transition: 0.3s;
}

.tech-tag-neon:hover {
    background: var(--color-neural-purple);
    color: white;
    box-shadow: var(--neural-purple-glow);
}

/* ============================================================
   MOBILE RESPONSIVENESS (CONTINUED)
   ============================================================ */
@media (max-width: 768px) {
    .section-title-3d {
        font-size: 2.5rem;
    }
    
    .glass-card-3d {
        padding: 20px;
    }
}

/* ============================================================
   CLEANUP & OVERRIDES
   ============================================================ */

/* Hide redundant elements if they clash */
.hero-modern-3d .orbital-ring { 
    opacity: 0.3;
}

/* Mobile Responsiveness */
@media (max-width: 992px) {
    .hero-grid-3d {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: 50px;
    }
    
    .hero-text-3d {
        order: 2;
    }
    
    .hero-profile-3d {
        order: 1;
        margin-bottom: 50px;
    }
    
    .btn-modern-3d {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================================
   PWA INSTALL BUTTON (NEURAL OBSIDIAN STYLE)
   ============================================================ */
.pwa-install {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 10px 20px;
    background: rgba(0, 255, 208, 0.1) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 255, 208, 0.3) !important;
    border-radius: var(--radius-full);
    color: var(--color-neon-teal) !important;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.pwa-install:hover {
    background: rgba(0, 255, 208, 0.2) !important;
    border-color: var(--color-neon-teal) !important;
    box-shadow: 0 0 20px rgba(0, 255, 208, 0.4);
    transform: translateY(-5px);
}

.pwa-install svg {
    color: var(--color-neon-teal);
}

.pwa-install.hidden {
    display: none !important;
}

/* ============================================================
   LIGHT MODE THEME OVERRIDES (NEURAL ALABASTER)
   ============================================================ */
[data-theme="light"] .logo-text {
    color: #1e293b !important;
}

[data-theme="light"] .logo-subtitle {
    color: #64748b !important;
}

[data-theme="light"] .loading {
    background: #ffffff !important;
}

[data-theme="light"] .loading-text {
    color: #1e293b !important;
}

/* ============================================================
   NEURAL NODES DECORATIONS
   ============================================================ */
.neural-nodes-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.node {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--color-neon-teal);
    border-radius: 50%;
    filter: blur(1px);
    box-shadow: 0 0 15px var(--color-neon-teal);
    opacity: 0.3;
}

.node-1 { top: 20%; left: 10%; animation: float 8s infinite alternate; }
.node-2 { top: 60%; left: 15%; animation: float 12s infinite alternate-reverse; }
.node-3 { top: 30%; right: 10%; animation: float 10s infinite alternate; }
.node-4 { top: 70%; right: 20%; animation: float 15s infinite alternate-reverse; }

@keyframes float {
    0% { transform: translateY(0) translateX(0); opacity: 0.2; }
    100% { transform: translateY(-40px) translateX(20px); opacity: 0.5; }
}

/* ============================================================
   HERO TEXT REFINEMENTS
   ============================================================ */
.hero-title-name {
    display: block;
    font-size: 1.2rem;
    letter-spacing: 0.5rem;
    color: var(--color-neural-purple);
    margin-top: 10px;
    font-weight: 700;
}

.hero-role {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.7);
    margin: 20px 0;
}

[data-theme="light"] .hero-role {
    color: #475569;
}

.hero-cta {
    margin-top: 40px;
    display: flex;
    gap: 20px;
}

.profile-image-3d {
    width: 100%;
    border-radius: var(--radius-xl);
    display: block;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.card-shadow-3d {
    position: absolute;
    bottom: -30px;
    left: 10%;
    width: 80%;
    height: 20px;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0.4) 0%, transparent 70%);
    filter: blur(10px);
}

/* ============================================================
   HERO UI REFRESH
   Cleaner editorial layout with softer glass treatment
   ============================================================ */

.hero-modern-3d {
    min-height: min(100vh, 980px);
    padding: clamp(120px, 14vh, 160px) 0 96px;
    background:
        radial-gradient(circle at 12% 18%, rgba(0, 255, 208, 0.1) 0%, transparent 30%),
        radial-gradient(circle at 84% 16%, rgba(112, 0, 255, 0.12) 0%, transparent 26%),
        linear-gradient(180deg, #090b12 0%, #0d1018 46%, #10131b 100%);
    isolation: isolate;
}

[data-theme="light"] .hero-modern-3d {
    background:
        radial-gradient(circle at 12% 18%, rgba(14, 165, 233, 0.1) 0%, transparent 30%),
        radial-gradient(circle at 84% 16%, rgba(99, 102, 241, 0.12) 0%, transparent 26%),
        linear-gradient(180deg, #f8fbff 0%, #f1f5f9 55%, #eef2ff 100%);
}

.hero-modern-3d::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(120deg, rgba(255, 255, 255, 0.04), transparent 24%),
        linear-gradient(180deg, transparent 62%, rgba(255, 255, 255, 0.02) 100%);
    pointer-events: none;
}

.hero-modern-3d .neural-nodes-container {
    opacity: 0.7;
    z-index: 0;
}

.hero-modern-3d .node {
    width: 7px;
    height: 7px;
    opacity: 0.26;
    filter: blur(0.6px);
    box-shadow: 0 0 14px rgba(0, 255, 208, 0.4);
}

.hero-grid-3d {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
    gap: clamp(40px, 7vw, 96px);
    padding: 0 5.5%;
    align-items: center;
}

.hero-text-3d {
    max-width: 680px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.hud-badge-3d {
    width: fit-content;
    padding: 10px 18px;
    margin-bottom: 0;
    border: 1px solid rgba(0, 255, 208, 0.22);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    color: rgba(240, 253, 250, 0.94);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    box-shadow: 0 20px 50px rgba(7, 10, 18, 0.32);
}

[data-theme="light"] .hud-badge-3d {
    background: rgba(255, 255, 255, 0.82);
    border-color: rgba(14, 165, 233, 0.18);
    color: #0f172a;
    box-shadow: 0 16px 38px rgba(148, 163, 184, 0.16);
}

.hero-badge-text {
    white-space: nowrap;
}

.pulse-dot-3d {
    width: 9px;
    height: 9px;
    box-shadow: 0 0 0 0 rgba(0, 255, 208, 0.4);
}

.hero-title-block {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.hero-modern-3d .hero-title {
    margin: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.hero-modern-3d .hero-title-gradient {
    font-size: clamp(3.6rem, 8vw, 6.3rem) !important;
    line-height: 0.92 !important;
    letter-spacing: -0.065em !important;
    font-weight: 800 !important;
    margin-bottom: 0 !important;
    text-shadow: none !important;
    background: linear-gradient(145deg, #ffffff 0%, #d7fbf2 30%, #79d8ff 72%, #b4a4ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="light"] .hero-modern-3d .hero-title-gradient {
    background: linear-gradient(145deg, #0f172a 0%, #0f766e 45%, #2563eb 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-modern-3d .hero-title-name {
    margin-top: 0;
    padding-left: 4px;
    font-size: 0.94rem !important;
    line-height: 1.2 !important;
    letter-spacing: 0.34em !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    color: rgba(226, 232, 240, 0.72) !important;
}

[data-theme="light"] .hero-modern-3d .hero-title-name {
    color: rgba(15, 23, 42, 0.68) !important;
}

.hero-modern-3d .hero-role {
    max-width: 34rem;
    margin: 0 !important;
    color: rgba(226, 232, 240, 0.78) !important;
    font-size: clamp(1.04rem, 1.8vw, 1.24rem) !important;
    line-height: 1.72 !important;
    font-weight: 500 !important;
    letter-spacing: 0.01em;
}

[data-theme="light"] .hero-modern-3d .hero-role {
    color: #334155 !important;
}

.glass-proposition-3d {
    margin-top: 0;
    padding: 28px 30px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 28px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.075) 0%, rgba(255, 255, 255, 0.035) 100%);
    box-shadow: 0 28px 60px rgba(3, 7, 18, 0.28);
}

[data-theme="light"] .glass-proposition-3d {
    border-color: rgba(148, 163, 184, 0.18);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.86) 100%);
    box-shadow: 0 20px 44px rgba(148, 163, 184, 0.18);
}

.proposition-header {
    gap: 10px;
    margin-bottom: 14px;
}

.prop-icon {
    width: 11px;
    height: 11px;
    display: inline-block;
    flex: 0 0 11px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--color-neon-teal) 0%, #7c8cff 100%);
    box-shadow: 0 0 20px rgba(0, 255, 208, 0.3);
}

.glass-proposition-3d h3 {
    color: rgba(193, 255, 243, 0.94);
    font-size: 0.8rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

[data-theme="light"] .glass-proposition-3d h3 {
    color: #0f766e;
}

.hero-mission-text {
    max-width: 39rem;
    margin: 0;
    color: rgba(240, 246, 255, 0.84);
    font-size: 1rem !important;
    line-height: 1.88 !important;
}

[data-theme="light"] .hero-mission-text {
    color: #334155;
}

.hero-cta {
    margin-top: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.btn-modern-3d {
    min-height: 54px;
    padding: 15px 24px;
    border-radius: 999px;
    font-size: 0.78rem;
    letter-spacing: 0.16em;
    font-weight: 700;
}

.btn-neon-primary {
    border: 1px solid rgba(0, 255, 208, 0.18);
    background: linear-gradient(135deg, rgba(90, 246, 216, 0.96) 0%, rgba(103, 181, 255, 0.92) 100%);
    color: #071019;
    box-shadow: 0 16px 36px rgba(72, 242, 208, 0.2);
}

.btn-neon-primary:hover {
    background: linear-gradient(135deg, rgba(113, 249, 221, 1) 0%, rgba(122, 189, 255, 0.96) 100%);
    color: #031316;
    box-shadow: 0 22px 42px rgba(72, 242, 208, 0.26);
    transform: translateY(-2px);
}

.btn-glass-secondary {
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(240, 246, 255, 0.92);
    box-shadow: none;
}

[data-theme="light"] .btn-glass-secondary {
    border-color: rgba(148, 163, 184, 0.22);
    background: rgba(255, 255, 255, 0.8);
    color: #0f172a;
}

.btn-glass-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.16);
    transform: translateY(-2px);
}

[data-theme="light"] .btn-glass-secondary:hover {
    background: rgba(255, 255, 255, 0.96);
}

.hero-profile-3d {
    display: flex;
    justify-content: flex-end;
}

.profile-card-3d {
    width: min(100%, 480px);
    cursor: default;
}

.profile-card-3d:hover {
    transform: translateY(-4px) scale(1.008);
}

.card-content-3d {
    padding: 18px;
    border-radius: 36px;
    transform: none;
    display: flex;
    flex-direction: column;
    gap: 18px;
    background: linear-gradient(180deg, rgba(20, 24, 34, 0.96) 0%, rgba(14, 18, 28, 0.9) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 28px 60px rgba(4, 8, 18, 0.3);
}

[data-theme="light"] .card-content-3d {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(241, 245, 249, 0.92) 100%);
    border-color: rgba(148, 163, 184, 0.18);
    box-shadow: 0 22px 46px rgba(148, 163, 184, 0.2);
}

.profile-image-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
}

[data-theme="light"] .profile-image-shell {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(226, 232, 240, 0.55) 100%);
}

.scanner-line-3d {
    height: 1px;
    opacity: 0.28;
    animation-duration: 8s;
}

.profile-image-3d {
    aspect-ratio: 0.88;
    object-fit: cover;
    box-shadow: none;
}

.profile-hud-data {
    position: relative;
    right: auto;
    bottom: auto;
    transform: none;
    min-width: 0;
    width: 100%;
    padding: 0;
    border: none;
    border-radius: 28px;
    background: transparent;
    box-shadow: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 12px;
}

.hud-item {
    min-height: 96px;
    padding: 14px 16px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

[data-theme="light"] .hud-item {
    background: rgba(255, 255, 255, 0.84);
    border-color: rgba(148, 163, 184, 0.2);
}

.hud-label {
    color: rgba(226, 232, 240, 0.52);
    font-size: 0.66rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.hud-value {
    color: #f8fafc;
    font-size: 0.92rem;
    line-height: 1.32;
    text-transform: uppercase;
}

.hud-value.success {
    color: var(--color-neon-teal);
}

[data-theme="light"] .hud-label {
    color: #64748b;
}

[data-theme="light"] .hud-value {
    color: #0f172a;
}

.card-shadow-3d {
    display: none;
}

.scroll-hint {
    right: 5.5%;
    bottom: 24px;
    opacity: 0.52;
    gap: 0.7rem;
}

.scroll-hint-text {
    color: rgba(226, 232, 240, 0.5);
    letter-spacing: 0.26em;
}

[data-theme="light"] .scroll-hint-text {
    color: rgba(15, 23, 42, 0.52);
}

.scroll-indicator {
    height: 44px;
    background: linear-gradient(to bottom, rgba(72, 242, 208, 0.8), transparent);
}

@media (max-width: 1180px) {
    .hero-grid-3d {
        gap: 48px;
    }

    .hero-modern-3d .hero-title-gradient {
        font-size: clamp(3.2rem, 7.2vw, 5.4rem) !important;
    }
}

@media (max-width: 992px) {
    .hero-modern-3d {
        padding: 118px 0 80px;
    }

    .hero-grid-3d {
        grid-template-columns: 1fr;
        text-align: left;
        padding-top: 0;
    }

    .hero-text-3d {
        order: 1;
        max-width: 100%;
    }

    .hero-profile-3d {
        order: 2;
        justify-content: center;
        margin-bottom: 0;
    }

    .profile-card-3d {
        width: min(100%, 560px);
    }
}

@media (max-width: 768px) {
    .hero-modern-3d {
        padding: 108px 0 70px;
    }

    .hero-grid-3d {
        padding: 0 20px;
    }

    .hero-badge-text {
        white-space: normal;
    }

    .glass-proposition-3d {
        padding: 24px 22px;
    }

    .hero-cta {
        flex-direction: column;
    }

    .btn-modern-3d {
        width: 100%;
        justify-content: center;
    }

    .profile-hud-data {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .hud-item {
        min-height: 88px;
    }

    .scroll-hint {
        display: none;
    }
}

@media (max-width: 640px) {
    .hero-modern-3d .hero-title-gradient {
        font-size: clamp(3rem, 14vw, 4.2rem) !important;
    }

    .hero-modern-3d .hero-title-name {
        font-size: 0.82rem !important;
        letter-spacing: 0.24em !important;
    }

    .card-content-3d {
        padding: 14px;
        border-radius: 28px;
    }

    .profile-image-shell {
        border-radius: 22px;
    }

    .profile-hud-data {
        grid-template-columns: 1fr;
    }

    .hud-item {
        min-height: 0;
    }
}

/* ============================================================
   HERO PORTRAIT 3D UPGRADE
   ============================================================ */

[data-theme="light"] .section-title-3d {
    background: linear-gradient(145deg, #0f172a 0%, #0f766e 42%, #2563eb 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 16px 28px rgba(148, 163, 184, 0.18);
}

.profile-card-3d.portrait-stage-card {
    --portrait-rotate-x: 3deg;
    --portrait-rotate-y: -7deg;
    --portrait-shift-x: 0px;
    --portrait-shift-y: 0px;
    --portrait-lift: -4px;
    --portrait-scale: 1;
    --portrait-glint-x: 78%;
    --portrait-glint-y: 22%;
    position: relative;
    width: min(100%, 500px);
    perspective: 2000px;
    transform-style: preserve-3d;
    isolation: isolate;
    will-change: transform;
    transition: transform 0.45s var(--ease-smooth);
    transform: perspective(2000px) translateY(var(--portrait-lift)) rotateX(var(--portrait-rotate-x)) rotateY(var(--portrait-rotate-y)) scale(var(--portrait-scale));
}

.profile-card-3d.portrait-stage-card:hover {
    --portrait-lift: -10px;
    --portrait-scale: 1.012;
}

.profile-card-3d.portrait-stage-card .card-content-3d {
    position: relative;
    padding: 24px;
    border-radius: 40px;
    overflow: visible;
    background:
        linear-gradient(180deg, rgba(14, 19, 30, 0.96) 0%, rgba(10, 14, 24, 0.88) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 34px 76px rgba(2, 6, 23, 0.44),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .profile-card-3d.portrait-stage-card .card-content-3d {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(239, 244, 251, 0.9) 100%);
    border-color: rgba(148, 163, 184, 0.18);
    box-shadow:
        0 28px 60px rgba(148, 163, 184, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.portrait-stage-3d {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    transform-style: preserve-3d;
    isolation: isolate;
}

.portrait-back-glow,
.portrait-depth-plate,
.portrait-image-echo,
.portrait-rim-frame,
.portrait-specular,
.portrait-shadow-sweep,
.portrait-edge-light,
.portrait-ground-shadow {
    pointer-events: none;
}

.portrait-back-glow {
    position: absolute;
    inset: 4% 6% 24% 6%;
    border-radius: 34px;
    background:
        radial-gradient(circle at 28% 24%, rgba(72, 242, 208, 0.42), transparent 38%),
        radial-gradient(circle at 78% 20%, rgba(120, 216, 255, 0.36), transparent 42%),
        linear-gradient(155deg, rgba(122, 92, 255, 0.18), rgba(72, 242, 208, 0.04));
    filter: blur(34px);
    opacity: 0.82;
    transform: translate3d(var(--portrait-shift-x), var(--portrait-shift-y), -90px) scale(1.02);
    transition: transform 0.45s var(--ease-smooth), opacity 0.45s var(--ease-smooth);
    z-index: 0;
}

[data-theme="light"] .portrait-back-glow {
    background:
        radial-gradient(circle at 28% 22%, rgba(14, 165, 233, 0.2), transparent 38%),
        radial-gradient(circle at 74% 18%, rgba(37, 99, 235, 0.18), transparent 40%),
        linear-gradient(155deg, rgba(15, 118, 110, 0.12), rgba(255, 255, 255, 0));
    opacity: 0.7;
}

.portrait-depth-plate {
    position: absolute;
    inset: 2.5% 3.5% 19% 3.5%;
    border-radius: 34px;
    background: linear-gradient(160deg, rgba(18, 23, 36, 0.96), rgba(8, 12, 21, 0.74));
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        inset 0 -28px 46px rgba(4, 8, 18, 0.56),
        0 30px 60px rgba(2, 6, 23, 0.34);
    transform: translateZ(-36px);
    z-index: 1;
}

[data-theme="light"] .portrait-depth-plate {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.96), rgba(225, 232, 241, 0.74));
    border-color: rgba(148, 163, 184, 0.18);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 -20px 38px rgba(203, 213, 225, 0.34),
        0 24px 52px rgba(148, 163, 184, 0.2);
}

.profile-card-3d.portrait-stage-card .profile-image-shell {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    padding: 14px;
    border-radius: 34px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.03) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -22px 42px rgba(0, 0, 0, 0.24),
        0 28px 64px rgba(2, 6, 23, 0.34);
    transform: translate3d(var(--portrait-shift-x), var(--portrait-shift-y), 70px);
    transition: transform 0.45s var(--ease-smooth), box-shadow 0.45s var(--ease-smooth);
    z-index: 2;
}

[data-theme="light"] .profile-card-3d.portrait-stage-card .profile-image-shell {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(226, 232, 240, 0.72) 100%);
    border-color: rgba(148, 163, 184, 0.18);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        inset 0 -18px 30px rgba(226, 232, 240, 0.42),
        0 24px 54px rgba(148, 163, 184, 0.22);
}

.portrait-image-echo {
    position: absolute;
    inset: 5% 5% 10% 5%;
    border-radius: 28px;
    background-image: url("../assets/images/profile_image1.png");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center 18%;
    filter: blur(22px) saturate(1.14);
    opacity: 0.34;
    transform: scale(1.06) translate3d(var(--portrait-shift-x), var(--portrait-shift-y), -14px);
    transition: transform 0.45s var(--ease-smooth), opacity 0.45s var(--ease-smooth);
    z-index: 0;
}

[data-theme="light"] .portrait-image-echo {
    opacity: 0.18;
}

.profile-card-3d.portrait-stage-card .profile-image-3d {
    position: relative;
    z-index: 2;
    display: block;
    width: 100%;
    aspect-ratio: 0.88;
    object-fit: cover;
    object-position: center 18%;
    border-radius: 26px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow:
        0 28px 48px rgba(1, 4, 14, 0.38),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    filter: saturate(1.04) contrast(1.03);
    transform: translateZ(90px);
}

[data-theme="light"] .profile-card-3d.portrait-stage-card .profile-image-3d {
    border-color: rgba(148, 163, 184, 0.18);
    box-shadow:
        0 24px 42px rgba(148, 163, 184, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

.portrait-rim-frame,
.portrait-specular,
.portrait-shadow-sweep {
    position: absolute;
    inset: 14px;
    border-radius: 28px;
}

.portrait-rim-frame {
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.16),
        inset 0 -1px 0 rgba(148, 163, 184, 0.08),
        0 0 0 1px rgba(15, 23, 42, 0.12);
    z-index: 3;
}

[data-theme="light"] .portrait-rim-frame {
    border-color: rgba(148, 163, 184, 0.22);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        inset 0 -1px 0 rgba(148, 163, 184, 0.1),
        0 0 0 1px rgba(226, 232, 240, 0.7);
}

.portrait-specular {
    background:
        radial-gradient(circle at var(--portrait-glint-x) var(--portrait-glint-y), rgba(255, 255, 255, 0.38), transparent 24%),
        radial-gradient(circle at 24% 14%, rgba(255, 255, 255, 0.14), transparent 28%);
    mix-blend-mode: screen;
    opacity: 0.88;
    z-index: 4;
}

[data-theme="light"] .portrait-specular {
    background:
        radial-gradient(circle at var(--portrait-glint-x) var(--portrait-glint-y), rgba(255, 255, 255, 0.48), transparent 26%),
        radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.22), transparent 28%);
    mix-blend-mode: normal;
    opacity: 0.76;
}

.portrait-shadow-sweep {
    background:
        linear-gradient(180deg, rgba(2, 6, 23, 0.04) 0%, transparent 30%, rgba(2, 6, 23, 0.08) 70%, rgba(2, 6, 23, 0.32) 100%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.14) 0%, transparent 16%, transparent 84%, rgba(2, 6, 23, 0.18) 100%);
    z-index: 4;
}

[data-theme="light"] .portrait-shadow-sweep {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, transparent 40%, rgba(15, 23, 42, 0.04) 84%, rgba(15, 23, 42, 0.08) 100%),
        linear-gradient(90deg, rgba(15, 23, 42, 0.03) 0%, transparent 15%, transparent 85%, rgba(15, 23, 42, 0.04) 100%);
}

.portrait-edge-light {
    position: absolute;
    top: 12%;
    bottom: 18%;
    width: 22%;
    border-radius: 999px;
    filter: blur(10px);
    opacity: 0.52;
    z-index: 4;
}

.portrait-edge-light-a {
    left: -2%;
    background: linear-gradient(180deg, rgba(72, 242, 208, 0.22), rgba(255, 255, 255, 0.02), rgba(72, 242, 208, 0.3));
}

.portrait-edge-light-b {
    right: -2%;
    background: linear-gradient(180deg, rgba(124, 58, 237, 0.14), rgba(255, 255, 255, 0.03), rgba(120, 216, 255, 0.24));
}

[data-theme="light"] .portrait-edge-light-a {
    background: linear-gradient(180deg, rgba(14, 165, 233, 0.14), rgba(255, 255, 255, 0.02), rgba(20, 184, 166, 0.16));
}

[data-theme="light"] .portrait-edge-light-b {
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.08), rgba(255, 255, 255, 0.02), rgba(15, 118, 110, 0.14));
}

.portrait-ground-shadow {
    position: relative;
    z-index: 1;
    width: 72%;
    height: 36px;
    margin: -10px auto 0;
    border-radius: 999px;
    background: radial-gradient(ellipse at center, rgba(3, 7, 18, 0.42) 0%, rgba(3, 7, 18, 0.08) 58%, transparent 74%);
    filter: blur(14px);
    transform: translateZ(12px);
}

[data-theme="light"] .portrait-ground-shadow {
    background: radial-gradient(ellipse at center, rgba(148, 163, 184, 0.32) 0%, rgba(148, 163, 184, 0.08) 56%, transparent 74%);
}

.profile-card-3d.portrait-stage-card .profile-hud-data {
    position: relative;
    z-index: 5;
    width: min(100%, calc(100% - 42px));
    margin: -34px auto 0;
    padding: 0;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 14px;
}

.profile-card-3d.portrait-stage-card .hud-item {
    min-height: 102px;
    padding: 16px 18px;
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(13, 18, 29, 0.92) 0%, rgba(11, 15, 24, 0.8) 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow:
        0 18px 34px rgba(3, 7, 18, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transform: translateZ(110px);
}

[data-theme="light"] .profile-card-3d.portrait-stage-card .hud-item {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(241, 245, 249, 0.88) 100%);
    border-color: rgba(148, 163, 184, 0.18);
    box-shadow:
        0 16px 30px rgba(148, 163, 184, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.98);
}

.profile-card-3d.portrait-stage-card .hud-label {
    color: rgba(226, 232, 240, 0.56);
}

.profile-card-3d.portrait-stage-card .hud-value {
    font-size: 0.96rem;
    letter-spacing: 0.06em;
}

#portfolio-view-count {
    font-variant-numeric: tabular-nums;
}

[data-theme="light"] .profile-card-3d.portrait-stage-card .hud-label {
    color: #64748b;
}

[data-theme="light"] .profile-card-3d.portrait-stage-card .hud-value {
    color: #0f172a;
}

[data-theme="light"] .hero-modern-3d .hero-title-name {
    color: rgba(15, 23, 42, 0.7) !important;
}

[data-theme="light"] .hero-modern-3d .hero-role,
[data-theme="light"] .hero-modern-3d .hero-mission-text {
    color: #334155;
}

@media (max-width: 1180px) {
    .profile-card-3d.portrait-stage-card {
        width: min(100%, 480px);
    }

    .profile-card-3d.portrait-stage-card .profile-hud-data {
        width: min(100%, calc(100% - 28px));
    }
}

@media (max-width: 992px) {
    .profile-card-3d.portrait-stage-card {
        --portrait-rotate-x: 2deg;
        --portrait-rotate-y: -3deg;
        --portrait-lift: -2px;
        width: min(100%, 560px);
    }

    .profile-card-3d.portrait-stage-card .card-content-3d {
        padding: 20px;
    }

    .profile-card-3d.portrait-stage-card .profile-hud-data {
        margin-top: -28px;
    }
}

@media (max-width: 768px) {
    .profile-card-3d.portrait-stage-card .card-content-3d {
        padding: 18px;
        border-radius: 34px;
    }

    .profile-card-3d.portrait-stage-card .profile-image-shell {
        padding: 12px;
        border-radius: 30px;
    }

    .portrait-rim-frame,
    .portrait-specular,
    .portrait-shadow-sweep {
        inset: 12px;
        border-radius: 24px;
    }

    .profile-card-3d.portrait-stage-card .profile-hud-data {
        width: 100%;
        margin-top: -24px;
    }
}

@media (max-width: 640px) {
    .profile-card-3d.portrait-stage-card {
        --portrait-rotate-x: 1.5deg;
        --portrait-rotate-y: -2deg;
        --portrait-lift: -1px;
        width: 100%;
    }

    .profile-card-3d.portrait-stage-card .card-content-3d {
        padding: 14px;
        border-radius: 28px;
    }

    .profile-card-3d.portrait-stage-card .profile-image-shell {
        padding: 10px;
        border-radius: 24px;
    }

    .portrait-rim-frame,
    .portrait-specular,
    .portrait-shadow-sweep {
        inset: 10px;
        border-radius: 20px;
    }

    .profile-card-3d.portrait-stage-card .profile-hud-data {
        margin-top: -18px;
    }

    .profile-card-3d.portrait-stage-card .hud-item {
        min-height: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .profile-card-3d.portrait-stage-card,
    .profile-card-3d.portrait-stage-card .profile-image-shell,
    .portrait-back-glow,
    .portrait-image-echo {
        transition: none !important;
    }

    .profile-card-3d.portrait-stage-card {
        --portrait-rotate-x: 1.5deg;
        --portrait-rotate-y: -2deg;
        --portrait-lift: -2px;
        --portrait-scale: 1;
    }
}
