/* ==========================================================================
   OMAR ASHRAF PORTFOLIO - INSANE CYBER / COSMIC STYLES & DYNAMICS
   ========================================================================== */

:root {
    --cyan: #00D4FF;
    --cyan-glow: rgba(0, 212, 255, 0.5);
    --cyan-subtle: rgba(0, 212, 255, 0.12);
    --purple: #a78bfa;
    --purple-glow: rgba(167, 139, 250, 0.5);
    --violet: #818cf8;
    --neon-pink: #f43f5e;
    --bg-dark: #070c1a;
    --bg-card: rgba(15, 23, 42, 0.65);
    --bg-card-hover: rgba(22, 34, 61, 0.85);
    --border-glass: rgba(148, 163, 184, 0.15);
    --border-glow: rgba(0, 212, 255, 0.4);
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Space Grotesk', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-dark);
    color: #e2e8f0;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Selection Color */
::selection {
    background: rgba(0, 212, 255, 0.3);
    color: #ffffff;
}

/* Custom Cyber Scrollbar */
::-webkit-scrollbar {
    width: 9px;
}
::-webkit-scrollbar-track {
    background: #070c1a;
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #00D4FF, #a78bfa);
    border-radius: 9999px;
    border: 2px solid #070c1a;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #38bdf8, #c084fc);
    box-shadow: 0 0 12px var(--cyan);
}

/* Top Reading Scroll Progress Bar */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, #00D4FF, #a78bfa, #ec4899);
    z-index: 9999;
    box-shadow: 0 0 10px #00D4FF, 0 0 20px #a78bfa;
    transition: width 0.1s ease-out;
}

/* Canvas Background */
#cyber-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    opacity: 0.65;
}

/* Ambient Floating Background Orbs */
.ambient-glow-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}
.ambient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.18;
    pointer-events: none;
    animation: floatGlow 22s infinite alternate ease-in-out;
}
.ambient-orb-1 {
    width: 550px;
    height: 550px;
    background: radial-gradient(circle, #00D4FF 0%, transparent 70%);
    top: -100px;
    left: -100px;
}
.ambient-orb-2 {
    width: 650px;
    height: 650px;
    background: radial-gradient(circle, #a78bfa 0%, transparent 70%);
    top: 40%;
    right: -150px;
    animation-delay: -7s;
}
.ambient-orb-3 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #38bdf8 0%, transparent 70%);
    bottom: -100px;
    left: 20%;
    animation-delay: -14s;
}

@keyframes floatGlow {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(80px, 60px) scale(1.15); }
    100% { transform: translate(-60px, -40px) scale(0.9); }
}

/* Cyber Grid Background Accent */
.cyber-grid {
    background-image: 
        linear-gradient(to right, rgba(0, 212, 255, 0.04) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 212, 255, 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 80%);
    -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 80%);
}

/* Gradients & Text */
.hero-gradient {
    background: radial-gradient(ellipse at 50% 20%, rgba(0, 212, 255, 0.12) 0%, rgba(167, 139, 250, 0.06) 45%, transparent 75%);
    position: relative;
}

.gradient-text {
    background: linear-gradient(135deg, #00D4FF 0%, #38bdf8 25%, #c084fc 70%, #f43f5e 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmerText 8s ease infinite;
}

@keyframes shimmerText {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    background: linear-gradient(135deg, #00D4FF 0%, #a78bfa 60%, #ffffff 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 3.5rem;
    position: relative;
    letter-spacing: -0.02em;
    animation: shimmerText 10s ease infinite;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    border-radius: 9999px;
    background: linear-gradient(90deg, transparent, #00D4FF, #a78bfa, transparent);
    box-shadow: 0 0 12px var(--cyan);
}

/* Glass Panels with Specular Highlights */
.glass-panel {
    background: linear-gradient(135deg, rgba(20, 30, 55, 0.55) 0%, rgba(11, 19, 38, 0.7) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(148, 163, 184, 0.15);
    box-shadow: 
        0 15px 35px -5px rgba(0, 0, 0, 0.5),
        inset 0 1px 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-panel:hover {
    border-color: rgba(0, 212, 255, 0.35);
    box-shadow: 
        0 20px 45px -10px rgba(0, 0, 0, 0.6),
        0 0 25px rgba(0, 212, 255, 0.15),
        inset 0 1px 1px 0 rgba(255, 255, 255, 0.2);
}

/* 3D Card Hover & Dynamic Tilt Mechanics */
.card-hover {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease, border-color 0.4s ease;
    transform-style: preserve-3d;
    will-change: transform;
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 30px rgba(0, 212, 255, 0.22);
    border-color: rgba(0, 212, 255, 0.45);
}

/* Specular Glare Overlay for Cards */
.card-glare {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle 300px at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 255, 255, 0.08), transparent 80%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}
.card-hover:hover .card-glare {
    opacity: 1;
}

/* Hero Avatar Holographic Ring */
.hero-avatar-wrapper {
    position: relative;
    display: inline-block;
}

.hero-avatar-wrapper::before {
    content: '';
    position: absolute;
    inset: -14px;
    border-radius: 2rem;
    background: conic-gradient(from 0deg, #00D4FF, #a78bfa, #ec4899, #00D4FF);
    animation: rotateConic 8s linear infinite;
    filter: blur(12px);
    opacity: 0.65;
    z-index: -1;
}

.hero-avatar-wrapper::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 1.85rem;
    background: conic-gradient(from 180deg, #00D4FF, #a78bfa, #00D4FF);
    animation: rotateConic 12s linear infinite reverse;
    opacity: 0.4;
    z-index: 0;
}

@keyframes rotateConic {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hero-avatar-img {
    position: relative;
    z-index: 1;
    border-radius: 1.5rem;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.hero-avatar-wrapper:hover .hero-avatar-img {
    transform: scale(1.03);
}

/* Hero Badge with Live Pulse */
.hero-badge {
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.8s ease-out forwards;
    border: 1px solid rgba(0, 212, 255, 0.3);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.15);
}

.hero-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.3), transparent);
    animation: badgeSweep 3s infinite;
}

@keyframes badgeSweep {
    0% { left: -100%; }
    50%, 100% { left: 100%; }
}

/* Intro Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.hero-title {
    animation: fadeInUp 0.8s ease-out 0.15s forwards;
    opacity: 0;
}

.hero-description {
    animation: fadeInUp 0.8s ease-out 0.3s forwards;
    opacity: 0;
}

.hero-tags {
    animation: fadeInUp 0.8s ease-out 0.45s forwards;
    opacity: 0;
}

.hero-image {
    animation: slideInRight 1s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
    opacity: 0;
}

/* Hero Tags with Cyber Border & Glow */
.hero-tag {
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.hero-tag:hover {
    background: rgba(0, 212, 255, 0.15);
    border-color: rgba(0, 212, 255, 0.6);
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 10px 25px rgba(0, 212, 255, 0.25);
    color: #ffffff;
}

.hero-tag:hover i {
    transform: scale(1.2) rotate(10deg);
}
.hero-tag i {
    transition: transform 0.3s ease;
}

/* Nav Link Hover & Glow Indicator */
.nav-link {
    position: relative;
    padding-bottom: 4px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #00D4FF, #a78bfa);
    box-shadow: 0 0 8px #00D4FF;
    transition: width 0.3s ease, left 0.3s ease;
    border-radius: 9999px;
}

.nav-link:hover::after,
.nav-link.active-link::after {
    width: 100%;
    left: 0;
}

.nav-link.active-link {
    color: #00D4FF !important;
}

/* Mobile Nav Drawer */
.nav-mobile {
    display: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav-mobile.active {
    display: flex;
    animation: slideDownMobile 0.3s ease forwards;
}

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

/* Buttons with Cyber Glow & Dynamic Reflection */
a.inline-flex, button.inline-flex, button[type="submit"] {
    position: relative;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.2);
}

a.inline-flex:hover, button.inline-flex:hover, button[type="submit"]:hover {
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.4), 0 0 15px rgba(0, 212, 255, 0.3);
    transform: translateY(-2px);
}

a.inline-flex::after, button.inline-flex::after, button[type="submit"]::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 20%;
    height: 200%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    transform: rotate(30deg);
    transition: left 0.75s ease;
    pointer-events: none;
}

a.inline-flex:hover::after, button.inline-flex:hover::after, button[type="submit"]:hover::after {
    left: 140%;
}

/* Social Media Icons with Unique Brand Neon Glows */
a[title="GitHub"]:hover {
    border-color: #ffffff;
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.4), inset 0 0 10px rgba(255, 255, 255, 0.2);
    color: #ffffff !important;
}
a[title="LinkedIn"]:hover {
    border-color: #0077b5;
    box-shadow: 0 0 25px rgba(0, 119, 181, 0.5), inset 0 0 10px rgba(0, 119, 181, 0.2);
    color: #0077b5 !important;
}
a[title="Email"]:hover {
    border-color: #ea4335;
    box-shadow: 0 0 25px rgba(234, 67, 53, 0.5), inset 0 0 10px rgba(234, 67, 53, 0.2);
    color: #ea4335 !important;
}
a[title="Facebook"]:hover {
    border-color: #1877f2;
    box-shadow: 0 0 25px rgba(24, 119, 242, 0.5), inset 0 0 10px rgba(24, 119, 242, 0.2);
    color: #1877f2 !important;
}
a[title="WhatsApp"]:hover {
    border-color: #25d366;
    box-shadow: 0 0 25px rgba(37, 211, 102, 0.5), inset 0 0 10px rgba(37, 211, 102, 0.2);
    color: #25d366 !important;
}
a[title="Fiverr"]:hover {
    border-color: #1dbf73;
    box-shadow: 0 0 25px rgba(29, 191, 115, 0.5), inset 0 0 10px rgba(29, 191, 115, 0.2);
    color: #1dbf73 !important;
}

/* Form Inputs with Cyber Focus Aura */
input, textarea {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
input:focus, textarea:focus {
    border-color: #00D4FF !important;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.35), inset 0 0 10px rgba(0, 212, 255, 0.1) !important;
    background-color: rgba(15, 23, 42, 0.8) !important;
    transform: translateY(-1px);
}

/* Scroll Reveal Classes */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(35px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}
.reveal-on-scroll.is-revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delay helpers */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }

/* Back to Top Floating Button */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 212, 255, 0.4);
    color: #00D4FF;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 212, 255, 0.2);
    cursor: pointer;
    z-index: 99;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px) scale(0.8);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

#back-to-top:hover {
    background: #00D4FF;
    color: #070c1a;
    box-shadow: 0 15px 35px rgba(0, 212, 255, 0.5), 0 0 25px #00D4FF;
    transform: translateY(-4px) scale(1.1);
}

/* Floating Status Indicator */
.live-dot {
    width: 8px;
    height: 8px;
    background-color: #00D4FF;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px #00D4FF;
    animation: livePulse 2s infinite;
}

@keyframes livePulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
        box-shadow: 0 0 8px #00D4FF;
    }
    50% {
        transform: scale(1.3);
        opacity: 0.6;
        box-shadow: 0 0 16px #00D4FF;
    }
}

/* ==========================================================================
   INSANE CYBER HUD & BENTO GRID LAYOUT ENGINE (MAIN PAGE)
   ========================================================================== */

/* Holographic Rotating Rings */
.holo-ring-container {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.holo-ring-outer {
    position: absolute;
    inset: -22px;
    border-radius: 50%;
    border: 2px dashed rgba(0, 212, 255, 0.45);
    animation: rotateHolo 24s linear infinite;
    pointer-events: none;
}

.holo-ring-inner {
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    border: 1px solid rgba(167, 139, 250, 0.4);
    box-shadow: 0 0 25px rgba(0, 212, 255, 0.2);
    animation: rotateHoloRev 18s linear infinite;
    pointer-events: none;
}

@keyframes rotateHolo {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes rotateHoloRev {
    from { transform: rotate(360deg); }
    to { transform: rotate(0deg); }
}

/* Floating Cyber Micro-Badges */
.floating-chip {
    animation: chipFloat 4s ease-in-out infinite;
}
.floating-chip-delayed {
    animation: chipFloat 4s ease-in-out infinite 2s;
}

@keyframes chipFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-7px); }
}

/* Cyber HUD Cards & Corners */
.hud-card {
    position: relative;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.75) 0%, rgba(10, 16, 32, 0.88) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(0, 212, 255, 0.2);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(0, 212, 255, 0.03);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 1.25rem;
    overflow: hidden;
}

.hud-card:hover {
    border-color: rgba(0, 212, 255, 0.45);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.6), 0 0 25px rgba(0, 212, 255, 0.15), inset 0 0 25px rgba(0, 212, 255, 0.06);
}

/* Cyber Bracket Accents */
.hud-card::before,
.hud-card::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 10;
}

.hud-card::before {
    top: -1px;
    left: -1px;
    border-top: 2px solid #00D4FF;
    border-left: 2px solid #00D4FF;
}

.hud-card::after {
    bottom: -1px;
    right: -1px;
    border-bottom: 2px solid #00D4FF;
    border-right: 2px solid #00D4FF;
}

/* Terminal Title Bar */
.terminal-bar {
    background: rgba(7, 12, 26, 0.75);
    border-bottom: 1px solid rgba(0, 212, 255, 0.15);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: 'Space Grotesk', monospace;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    color: #94a3b8;
}

.terminal-dots {
    display: flex;
    align-items: center;
    gap: 6px;
}
.terminal-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
}
.dot-red { background: #ef4444; }
.dot-yellow { background: #eab308; }
.dot-green { background: #22c55e; }

/* Telemetry Stats Ribbon */
.telemetry-strip {
    background: linear-gradient(90deg, rgba(7, 12, 26, 0.95), rgba(15, 23, 42, 0.85), rgba(7, 12, 26, 0.95));
    border-top: 1px solid rgba(0, 212, 255, 0.2);
    border-bottom: 1px solid rgba(0, 212, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), inset 0 0 30px rgba(0, 212, 255, 0.04);
}

/* Social Cyber Tile */
.social-cyber-tile {
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 16px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.social-cyber-tile:hover {
    border-color: #00D4FF;
    background: rgba(15, 23, 42, 0.9);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 212, 255, 0.2);
}

/* Cyber Form Inputs */
.cyber-input {
    background: rgba(10, 16, 32, 0.75);
    border: 1px solid rgba(0, 212, 255, 0.25);
    color: #f8fafc;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.cyber-input:focus {
    background: rgba(15, 23, 42, 0.95);
    border-color: #00D4FF;
    box-shadow: 0 0 18px rgba(0, 212, 255, 0.35), inset 0 0 10px rgba(0, 212, 255, 0.05);
    outline: none;
}

/* Laser Section Header Indicator */
.cyber-section-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Space Grotesk', monospace;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #00D4FF;
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.3);
    padding: 6px 14px;
    border-radius: 9999px;
    margin-bottom: 12px;
}