@charset "UTF-8";
/**
 * Premium 3D Developer Portfolio Stylesheet
 * Cyberpunk, Glassmorphism, Rise Animations & Ambient Audio Player
 */

@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600&family=Space+Grotesk:wght@300;400;500;600;700&family=Syne:wght@700;800&display=swap');

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

html {
    scroll-behavior: smooth;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-main, 'Space Grotesk', sans-serif);
    background-color: var(--bg-color, #080c14);
    color: var(--text-color, #f1f5f9);
    overflow-x: hidden;
    position: relative;
    line-height: 1.6;
}

::selection {
    background: var(--color-primary, #6366f1);
    color: #ffffff;
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-color, #080c14);
}
::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.4);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary, #6366f1);
}

/* --- Custom Cursor --- */
.custom-cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--color-accent, #06b6d4);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 99999;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
    box-shadow: 0 0 12px var(--color-accent, #06b6d4);
}

.custom-cursor-outline {
    width: 40px;
    height: 40px;
    border: 1.5px solid rgba(99, 102, 241, 0.5);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 99998;
    transform: translate(-50%, -50%);
    transition: transform 0.15s ease-out, width 0.2s, height 0.2s, border-color 0.2s;
}

.cursor-hover .custom-cursor-dot {
    width: 14px;
    height: 14px;
    background-color: var(--color-primary, #6366f1);
    box-shadow: 0 0 20px var(--color-primary, #6366f1);
}

.cursor-hover .custom-cursor-outline {
    width: 56px;
    height: 56px;
    border-color: var(--color-accent, #06b6d4);
    background-color: rgba(6, 182, 212, 0.08);
}

@media (max-width: 1024px) {
    .custom-cursor-dot, .custom-cursor-outline {
        display: none !important;
    }
}

/* --- Futuristic Animated Live Gear & Code Preloader --- */
#system-loader {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: #04070d;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.65s cubic-bezier(0.85, 0, 0.15, 1), visibility 0.65s;
}

#system-loader.loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-glow {
    position: absolute;
    width: 360px;
    height: 360px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.25) 0%, rgba(99, 102, 241, 0.15) 45%, transparent 70%);
    filter: blur(45px);
    animation: pulseLoaderGlow 2.8s infinite alternate ease-in-out;
}

@keyframes pulseLoaderGlow {
    0% { transform: scale(0.85); opacity: 0.45; }
    100% { transform: scale(1.2); opacity: 1; }
}

.loader-ring-outer {
    animation: spinClockwise 7s linear infinite;
    transform-origin: center center;
}

.loader-ring-inner {
    animation: spinCounterClockwise 5s linear infinite;
    transform-origin: center center;
}

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

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

.loader-orbit-dot {
    position: absolute;
    width: 7px;
    height: 7px;
    background: #06b6d4;
    border-radius: 50%;
    box-shadow: 0 0 10px #06b6d4, 0 0 20px #06b6d4;
    top: 50%;
    left: 50%;
    margin-top: -3.5px;
    margin-left: -3.5px;
    animation: orbitParticle 3s linear infinite;
}

@keyframes orbitParticle {
    0% { transform: rotate(0deg) translateX(54px) rotate(0deg); }
    100% { transform: rotate(360deg) translateX(54px) rotate(-360deg); }
}

/* --- Three.js Background & Hero Viewport --- */
#three-canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
}

.hero-3d-wrapper {
    position: relative;
    width: 100%;
    height: 520px;
    z-index: 10;
}

#hero-interactive-canvas {
    width: 100%;
    height: 100%;
    outline: none;
}

/* --- Glassmorphism & Cyber Card Effects --- */
.glass-panel {
    background: var(--card-bg, rgba(13, 20, 36, 0.75));
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border, rgba(255, 255, 255, 0.08));
    border-radius: var(--border-radius, 1rem);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.glass-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.04), transparent);
    transition: left 0.6s ease;
    pointer-events: none;
}

.glass-panel:hover::before {
    left: 100%;
}

.glass-panel:hover {
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 14px 40px var(--card-glow, rgba(99, 102, 241, 0.2));
    transform: translateY(-4px);
}

/* --- Rise Up with Cyber-Glitch & Shimmer Scroll Entrance Animation --- */
@keyframes cyberGlitchRise {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
        filter: blur(5px);
    }
    55% {
        opacity: 0.95;
        transform: translateY(-4px) scale(1.015);
        filter: blur(0px) drop-shadow(0 0 14px rgba(6, 182, 212, 0.45));
    }
    75% {
        opacity: 1;
        transform: translateY(2px) scale(0.995);
        filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.35));
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0) drop-shadow(0 0 0 transparent);
    }
}

@keyframes cyberScanShimmer {
    0% {
        transform: translateX(-120%) skewX(-20deg);
        opacity: 0;
    }
    35% {
        opacity: 0.9;
    }
    100% {
        transform: translateX(150%) skewX(-20deg);
        opacity: 0;
    }
}

.rise-popup-target {
    opacity: 0;
    transform: translateY(50px) scale(0.95);
    filter: blur(5px);
    will-change: transform, opacity, filter;
    transition: opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.55s cubic-bezier(0.16, 1, 0.3, 1),
                filter 0.55s ease-out;
    position: relative;
    overflow: hidden;
}

.rise-popup-target.rise-visible {
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
    filter: blur(0) !important;
    animation: cyberGlitchRise 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.rise-popup-target.rise-visible::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 15%, rgba(6, 182, 212, 0.22) 50%, rgba(168, 85, 247, 0.22) 55%, transparent 85%);
    transform: translateX(-120%) skewX(-20deg);
    animation: cyberScanShimmer 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.1s;
    pointer-events: none;
    z-index: 5;
}

/* --- Glowing Buttons & Accents --- */
.btn-cyber-primary {
    background: linear-gradient(135deg, var(--color-primary, #6366f1) 0%, #4f46e5 100%);
    color: #ffffff;
    padding: 0.85rem 1.75rem;
    font-weight: 600;
    border-radius: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.btn-cyber-primary:hover {
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.6);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.35);
}

.btn-cyber-outline {
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(10px);
    color: var(--text-color, #f1f5f9);
    padding: 0.85rem 1.75rem;
    font-weight: 600;
    border-radius: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-cyber-outline:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--color-primary, #6366f1);
    color: #ffffff;
    transform: translateY(-2px);
}

/* --- Section Tags & Badges --- */
.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 1rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-family: 'Fira Code', monospace;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(99, 102, 241, 0.1);
    color: var(--color-accent, #06b6d4);
    border: 1px solid rgba(6, 182, 212, 0.25);
    margin-bottom: 1rem;
}

.tech-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    border-radius: 0.5rem;
    font-size: 0.7rem;
    font-family: 'Fira Code', monospace;
    background: rgba(255, 255, 255, 0.04);
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.07);
    transition: all 0.2s;
}

.tech-tag:hover {
    border-color: var(--color-accent, #06b6d4);
    color: #ffffff;
    background: rgba(6, 182, 212, 0.1);
}

/* --- Gradient Text --- */
.gradient-text {
    background: linear-gradient(135deg, #ffffff 20%, var(--color-primary, #6366f1) 70%, var(--color-accent, #06b6d4) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gradient-text-cyan {
    background: linear-gradient(135deg, var(--color-accent, #06b6d4) 0%, var(--color-primary, #6366f1) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- Code Snippet Box --- */
.code-window {
    background: #070a12;
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    font-family: 'Fira Code', monospace;
}

.code-window-header {
    background: #0d1220;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.window-dots {
    display: flex;
    gap: 6px;
}

.window-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot-red { background: #ef4444; }
.dot-yellow { background: #eab308; }
.dot-green { background: #22c55e; }

/* --- 3D Tilt Card --- */
.tilt-card {
    transform-style: preserve-3d;
    perspective: 1000px;
}

/* --- Modal Popup Animation --- */
.modal-popup-rise {
    transform: scale(0.9) translateY(20px);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
}

.modal-popup-rise.modal-active {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* --- Ambient Audio Widget --- */
#ambient-audio-widget {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 40;
    background: rgba(10, 15, 28, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 1.25rem;
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.5), 0 0 20px rgba(99, 102, 241, 0.15);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#ambient-audio-widget:hover {
    border-color: var(--color-accent, #06b6d4);
    box-shadow: 0 12px 40px rgba(6, 182, 212, 0.25);
}

.equalizer-bars {
    display: flex;
    align-items: flex-end;
    gap: 2.5px;
    height: 16px;
    width: 14px;
}

.sound-bar {
    width: 2.5px;
    background: var(--color-accent, #06b6d4);
    border-radius: 1px;
    height: 4px;
    transition: height 0.2s ease;
}

.animate-equalizer .sound-bar:nth-child(1) { animation: soundWave 1.1s infinite ease-in-out; }
.animate-equalizer .sound-bar:nth-child(2) { animation: soundWave 0.8s infinite ease-in-out 0.2s; }
.animate-equalizer .sound-bar:nth-child(3) { animation: soundWave 1.3s infinite ease-in-out 0.4s; }

@keyframes soundWave {
    0%, 100% { height: 3px; }
    50% { height: 15px; }
}

@media (max-width: 640px) {
    #ambient-audio-widget {
        bottom: 16px;
        left: 16px;
        padding: 0.5rem 0.8rem;
    }
}

/* --- Cyber Grid Background --- */
.cyber-grid-bg {
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
}
