/* --- VisionOS / Deep Glass Aesthetic --- */

/* Premium Apple-tier Nav buttons */
.nav-actions .icon-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    color: rgba(255, 255, 255, 0.85);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05), 0 4px 12px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}
.nav-actions .icon-btn::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at center, rgba(163, 207, 43, 0.2) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
}
.nav-actions .icon-btn:hover {
    background: rgba(163, 207, 43, 0.15);
    border-color: rgba(163, 207, 43, 0.4);
    color: #a3cf2b;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 24px rgba(163, 207, 43, 0.2);
}
.nav-actions .icon-btn:hover::before {
    opacity: 1;
}
.nav-actions .icon-btn i {
    font-size: 1.15rem;
    z-index: 1;
}
/* Specific Sound Toggle FX */
#soundToggle.playing {
    background: rgba(163, 207, 43, 0.2);
    border-color: #a3cf2b;
    color: #a3cf2b;
    animation: soundPulse 2s infinite;
}
@keyframes soundPulse {
    0% { box-shadow: 0 0 0 0 rgba(163,207,43,0.4); }
    70% { box-shadow: 0 0 0 10px rgba(163,207,43,0); }
    100% { box-shadow: 0 0 0 0 rgba(163,207,43,0); }
}

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;700;900&family=Outfit:wght@400;700;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;800&display=swap');

:root {
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.15);
    --glass-highlight: rgba(255, 255, 255, 0.2);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --blur-strength: 40px;
    --radius-lg: 32px;
    --radius-md: 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #000;
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
    overflow-x: hidden;
    overflow-y: auto !important;
    min-height: 100vh;
    perspective: 1000px;
}

/* 1. Spatial Background (Alive) */
.spatial-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: #050505;
    overflow: hidden;
}

/* ════ Elite Sound Button ════ */
.sound-btn-elite {
    position: relative;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--lime) !important;
    overflow: hidden;
}

.sound-btn-elite:hover {
    background: rgba(163, 207, 43, 0.1) !important;
    border-color: rgba(163, 207, 43, 0.3) !important;
    transform: translateY(-2px);
}

.sound-waves {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 10px;
}

.sound-waves span {
    width: 2px;
    background: var(--lime);
    border-radius: 1px;
    transition: height 0.3s ease;
    height: 2px;
}

.sound-btn-elite.active .sound-waves span {
    animation: wavePulse 0.6s ease-in-out infinite;
}

.sound-btn-elite.active .sound-waves span:nth-child(2) { animation-delay: 0.1s; }
.sound-btn-elite.active .sound-waves span:nth-child(3) { animation-delay: 0.2s; }

@keyframes wavePulse {
    0%, 100% { height: 3px; }
    50% { height: 10px; }
}

.sound-btn-elite i {
    font-size: 1.1rem;
    z-index: 2;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.6;
    animation: floatOrb 20s infinite ease-in-out alternate;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #0055ff, #000);
    top: -100px;
    left: -100px;
}

.orb-2 {
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, #8000ff, #000);
    bottom: -200px;
    right: -200px;
    animation-delay: -5s;
}

.grid-overlay {
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 80px 80px;
    transform: perspective(500px) rotateX(60deg);
    opacity: 0.3;
    pointer-events: none;
}

@keyframes floatOrb {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(100px, 50px) scale(1.1);
    }
}

/* 2. Glass Navigation Capsule */
.glass-nav {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border-radius: 100px;
    z-index: 100;
}

.nav-content {
    background: rgba(20, 20, 20, 0.6);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    padding: 12px 30px;
    border-radius: 100px;
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav-logo {
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s;
    padding: 8px 16px;
    border-radius: 20px;
}

.nav-links a.active,
.nav-links a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-cta {
    color: white;
    font-size: 1.1rem;
    transition: transform 0.3s;
}

.nav-cta:hover {
    transform: scale(1.1);
    color: #25D366;
}

/* 3. Spatial Viewport (Layout) */
.spatial-viewport {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 60px;
    padding-top: 150px;
    padding-bottom: 100px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Glass Panel Utility */
.glass-panel {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
    backdrop-filter: blur(var(--blur-strength));
    -webkit-backdrop-filter: blur(var(--blur-strength));
    border: 1px solid var(--glass-border);
    border-top: 1px solid var(--glass-highlight);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.glass-panel:hover {
    transform: translateY(-5px) scale(1.005);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Main HUD (Hero) */
.main-hud {
    width: 90%;
    max-width: 900px;
    padding: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hud-profile {
    display: flex;
    align-items: center;
    gap: 30px;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 30px rgba(41, 151, 255, 0.3);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(41, 151, 255, 0.2);
    color: #2997ff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.profile-info h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 5px;
    letter-spacing: -1px;
}

.role-text {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.hud-stats {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    min-width: 160px;
}

.stat-item i {
    color: #2997ff;
}

/* Wide Panel (Awalim) */
.wide-panel {
    width: 90%;
    max-width: 1000px;
    padding: 50px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.company-brand {
    display: flex;
    gap: 20px;
    align-items: center;
}

.logo-box {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #fff, #aaa);
    color: black;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    border-radius: 12px;
    font-size: 1.2rem;
}

.sub-text {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 5px;
}

.license-pill {
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6px 12px;
    border-radius: 6px;
}

.bento-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 20px;
}

/* Glass Card Component */
.glass-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: 24px;
    transition: background 0.3s;
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.07);
}

.bento-large {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.bento-large h3 {
    margin-bottom: 10px;
}

.bento-small {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    text-align: center;
}

.bento-small i {
    font-size: 1.8rem;
    color: #fff;
    opacity: 0.8;
}

/* Floating Row (Vision) */
.floating-row {
    display: flex;
    gap: 30px;
    width: 90%;
    justify-content: center;
    flex-wrap: wrap;
}

.service-island {
    width: 250px;
    height: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-radius: 50%;
    /* Circles looks cool in spatial */
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, rgba(0, 0, 0, 0) 70%);
}

.icon-glow {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.service-island h3 {
    margin-bottom: 8px;
    font-weight: 500;
}

.service-island p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* AI Orb */
.orb-container {
    position: fixed;
    bottom: 40px;
    right: 40px;
    z-index: 1000;
}

.ai-orb {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #fff, #007aff);
    box-shadow: 0 0 30px #007aff;
    cursor: pointer;
    position: relative;
    z-index: 2;
    animation: breathe 4s infinite ease-in-out;
}

.orb-ripple {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px solid #007aff;
    opacity: 0;
    z-index: 1;
    animation: ripple 2s infinite;
}

@keyframes breathe {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 30px #007aff;
    }

    50% {
        transform: scale(1.1);
        box-shadow: 0 0 50px #00aaff;
    }
}

@keyframes ripple {
    0% {
        width: 100%;
        height: 100%;
        opacity: 0.8;
    }

    100% {
        width: 300%;
        height: 300%;
        opacity: 0;
    }
}

/* Grid System for Content */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    width: 100%;
}

.content-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    font-size: 1.1rem;
}

.content-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.icon-btn.active, .icon-btn:active {
    background: rgba(163, 207, 43, 0.25);
    color: var(--lime);
    border-color: rgba(163, 207, 43, 0.4);
    transform: scale(0.95);
}

.icon-btn.playing {
    animation: soundPulse 2s infinite;
    color: var(--lime);
    background: rgba(163, 207, 43, 0.15);
}

@keyframes soundPulse {
    0% { box-shadow: 0 0 0 0 rgba(163, 207, 43, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(163, 207, 43, 0); }
    100% { box-shadow: 0 0 0 0 rgba(163, 207, 43, 0); }
}

.content-img {
    height: 180px;
    width: 100%;
    object-fit: cover;
    filter: brightness(0.8);
    transition: filter 0.3s;
}

.content-card:hover .content-img {
    filter: brightness(1);
}

.content-body {
    padding: 20px;
}

.content-body h4 {
    margin-bottom: 8px;
    font-size: 1.1rem;
    font-weight: 600;
}

.content-body p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Glass Footer */
.glass-footer {
    width: 90%;
    max-width: 900px;
    padding: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.5), transparent);
}

.social-row {
    display: flex;
    gap: 20px;
}

.social-row a {
    color: white;
    font-size: 1.4rem;
    transition: transform 0.3s;
}

.social-row a:hover {
    transform: scale(1.2);
    color: #2997ff;
}

@media (max-width: 768px) {
    .main-hud {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }

    .hud-profile {
        flex-direction: column;
    }

    .bento-grid {
        grid-template-columns: 1fr;
    }

    .nav-links {
        display: none;
    }

    .glass-footer {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .grid-3 {
        grid-template-columns: 1fr;
    }
}
/* ════════════════════════════════════════════════════════════════
   LIGHT MODE — body.light-mode overrides
   Triggered by Theme.setLight() in portfolio-v2.js
════════════════════════════════════════════════════════════════ */
body.light-mode {
    background: #f0f4f8;
    color: #0a1628;
}

body.light-mode :root,
body.light-mode {
    --text-primary:    #0a1628;
    --text-secondary:  rgba(10, 22, 40, 0.65);
    --glass-bg:        rgba(255, 255, 255, 0.72);
    --glass-border:    rgba(10, 22, 40, 0.1);
    --glass-highlight: rgba(255, 255, 255, 0.9);
    --glass-depth-1:   rgba(240, 244, 248, 0.75);
    --glass-depth-2:   rgba(235, 240, 246, 0.85);
    --glass-depth-3:   rgba(225, 232, 242, 0.92);
}

/* Nav */
body.light-mode .nav {
    background: rgba(240, 244, 248, 0.88) !important;
    border-bottom-color: rgba(10, 22, 40, 0.08) !important;
    box-shadow: 0 1px 0 rgba(163,207,43,0.1), 0 4px 24px rgba(0,0,0,0.06) !important;
}
body.light-mode .nav-link,
body.light-mode .nav-logo { color: #0a1628 !important; }
body.light-mode .nav-actions .icon-btn {
    background: rgba(10,22,40,0.06) !important;
    border-color: rgba(10,22,40,0.1) !important;
    color: #0a1628 !important;
}

/* Background */
body.light-mode .spatial-background { background: #eef2f7; }
body.light-mode .grain-overlay { opacity: 0.015; }

/* Cards & Glass */
body.light-mode .glass-card,
body.light-mode .service-card,
body.light-mode .bento-card,
body.light-mode .course-card,
body.light-mode .skill-card,
body.light-mode .terminal-window,
body.light-mode [data-glass] {
    background: rgba(255, 255, 255, 0.75) !important;
    border-color: rgba(10,22,40,0.1) !important;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,0.9) !important;
}

/* Text */
body.light-mode h1,
body.light-mode h2,
body.light-mode h3,
body.light-mode p,
body.light-mode span,
body.light-mode li,
body.light-mode label { color: #0a1628; }
body.light-mode .section-tag { color: #5a7a2e; }

/* Buttons */
body.light-mode .btn-outline {
    background: rgba(10,22,40,0.05) !important;
    border-color: rgba(10,22,40,0.2) !important;
    color: #0a1628 !important;
}
body.light-mode .btn-outline:hover {
    background: rgba(163,207,43,0.12) !important;
    border-color: rgba(163,207,43,0.5) !important;
}

/* Footer */
body.light-mode footer,
body.light-mode .footer { background: #e4ecf5 !important; color: #0a1628; }

/* Loader */
body.light-mode .loader { background: #f0f4f8 !important; }

/* Modals */
body.light-mode .sp-box,
body.light-mode .modal-content {
    background: rgba(240,244,248,0.95) !important;
    border-color: rgba(10,22,40,0.12) !important;
    color: #0a1628 !important;
}

/* Input fields */
body.light-mode input,
body.light-mode textarea,
body.light-mode select {
    background: rgba(255,255,255,0.9) !important;
    border-color: rgba(10,22,40,0.15) !important;
    color: #0a1628 !important;
}
body.light-mode input::placeholder,
body.light-mode textarea::placeholder { color: rgba(10,22,40,0.4) !important; }

/* CyberGuard chat */
body.light-mode #cgWindow {
    background: rgba(240,244,248,0.96) !important;
    border-color: rgba(10,22,40,0.12) !important;
}
body.light-mode .cg-msg.bot { background: rgba(163,207,43,0.12) !important; color: #0a1628 !important; }
body.light-mode .cg-msg.user { background: rgba(10,22,40,0.08) !important; color: #0a1628 !important; }

/* Smooth transition on toggle */
body,
body.light-mode {
    transition:
        background-color 0.4s ease,
        color            0.3s ease;
}
