:root {
    --color-bg: #030504;
    --color-primary: #00ff41; /* Neon Green */
    --color-secondary: #00ffff; /* Aqua Blue */
    --color-surface: rgba(10, 15, 12, 0.4);
    --color-border: rgba(255, 255, 255, 0.08);
    
    --font-main: 'Outfit', sans-serif;
    --font-mono: 'Fira Code', monospace;
}

body {
    font-family: var(--font-main);
    background-color: var(--color-bg);
    color: #f0f0f0;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.font-mono {
    font-family: var(--font-mono);
}

/* 3D Canvas Background */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -3;
}

/* Animated Glowing Ambient Orbs */
.ambient-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -2;
    opacity: 0.4;
    animation: float 20s infinite ease-in-out;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: var(--color-primary);
    top: -10%;
    left: -10%;
    animation-delay: 0s;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: var(--color-secondary);
    bottom: -20%;
    right: -10%;
    animation-delay: -5s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
}

/* Hyper Glassmorphism Panels */
.hyper-glass {
    background: var(--color-surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.hyper-glass::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0) 100%);
    z-index: 1;
    pointer-events: none;
}

.hyper-glass:hover {
    border-color: rgba(0, 243, 255, 0.3);
    transform: translateY(-5px);
    box-shadow: 0 15px 40px -10px rgba(0, 243, 255, 0.2);
}

/* Gradient Text Utility */
.text-gradient {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Modern Typewriter Cursor */
.cursor {
    display: inline-block;
    width: 8px;
    height: 1.2em;
    background: linear-gradient(to bottom, var(--color-primary), var(--color-secondary));
    vertical-align: middle;
    animation: blink 1s step-end infinite;
    border-radius: 4px;
    margin-left: 4px;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Custom Modern Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--color-bg);
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, var(--color-primary), var(--color-secondary));
    border-radius: 10px;
}

/* Smooth Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}
.reveal.from-left {
    transform: translateX(-80px) scale(0.95);
}
.reveal.from-right {
    transform: translateX(80px) scale(0.95);
}
.reveal.from-bottom {
    transform: translateY(80px) scale(0.95);
}

.reveal.active {
    opacity: 1;
    transform: translate(0, 0) scale(1);
}

/* Modern Floating Nav */
.nav-pill {
    position: relative;
    color: #a0a0a0;
    transition: color 0.3s ease;
}

.nav-pill:hover, .nav-pill.active {
    color: #fff;
}

/* Grid Pattern Overlay */
.grid-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    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: 50px 50px;
    z-index: -2;
    pointer-events: none;
    mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
    -webkit-mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
}

/* Button Styles */
.btn-primary {
    position: relative;
    background: rgba(0, 243, 255, 0.1);
    border: 1px solid rgba(0, 243, 255, 0.5);
    color: var(--color-primary);
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.1);
}

.btn-primary:hover {
    background: rgba(0, 243, 255, 0.2);
    box-shadow: 0 0 25px rgba(0, 243, 255, 0.4);
    transform: translateY(-2px);
    color: #fff;
    border-color: var(--color-primary);
}

/* Profile Picture frame styles */
.cyber-profile-frame {
    position: relative;
    width: 384px; /* w-96 is 384px */
    height: 384px;
    border-radius: 36px;
    background: var(--color-surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--color-border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    transition: all 0.4s ease;
}

/* Brackets for the outer frame */
.cyber-profile-frame::before,
.cyber-profile-frame::after,
.cyber-profile-brackets::before,
.cyber-profile-brackets::after {
    content: "";
    position: absolute;
    width: 24px;
    height: 24px;
    border: 2px solid var(--color-primary);
    pointer-events: none;
    z-index: 10;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Top-left corner bracket */
.cyber-profile-frame::before {
    top: -2px;
    left: -2px;
    border-right: none;
    border-bottom: none;
    border-top-left-radius: 18px;
}

/* Top-right corner bracket */
.cyber-profile-frame::after {
    top: -2px;
    right: -2px;
    border-left: none;
    border-bottom: none;
    border-top-right-radius: 18px;
}

/* Bottom-left corner bracket */
.cyber-profile-brackets::before {
    bottom: -2px;
    left: -2px;
    border-right: none;
    border-top: none;
    border-bottom-left-radius: 18px;
}

/* Bottom-right corner bracket */
.cyber-profile-brackets::after {
    bottom: -2px;
    right: -2px;
    border-left: none;
    border-top: none;
    border-bottom-right-radius: 18px;
}

/* Active Hover Transitions */
.cyber-profile-frame:hover {
    border-color: var(--color-secondary);
    box-shadow: 0 15px 40px -10px rgba(0, 243, 255, 0.25);
}

.cyber-profile-frame:hover::before {
    top: -6px;
    left: -6px;
    border-color: var(--color-secondary);
}

.cyber-profile-frame:hover::after {
    top: -6px;
    right: -6px;
    border-color: var(--color-secondary);
}

.cyber-profile-frame:hover .cyber-profile-brackets::before {
    bottom: -6px;
    left: -6px;
    border-color: var(--color-secondary);
}

.cyber-profile-frame:hover .cyber-profile-brackets::after {
    bottom: -6px;
    right: -6px;
    border-color: var(--color-secondary);
}

/* Decorative corner squares */
.cyber-corner-square {
    position: absolute;
    width: 12px;
    height: 12px;
    background-color: var(--color-primary);
    z-index: 20;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 0 8px var(--color-primary);
}

.sq-top-left {
    top: -14px;
    left: -14px;
}

.sq-bottom-right {
    bottom: -14px;
    right: -14px;
}

/* Hover transitions for corner squares */
.cyber-profile-frame:hover .sq-top-left {
    top: -20px;
    left: -20px;
    background-color: var(--color-secondary);
    box-shadow: 0 0 12px var(--color-secondary);
}

.cyber-profile-frame:hover .sq-bottom-right {
    bottom: -20px;
    right: -20px;
    background-color: var(--color-secondary);
    box-shadow: 0 0 12px var(--color-secondary);
}

/* Timeline Components */
.timeline-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 20px;
    width: 2px;
    background: linear-gradient(to bottom, var(--color-primary) 0%, var(--color-secondary) 100%);
    opacity: 0.2;
}

.timeline-node {
    position: absolute;
    left: 14px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--color-primary);
    box-shadow: 0 0 10px var(--color-primary);
    border: 2px solid var(--color-bg);
    transition: all 0.3s ease;
}

/* Tilt effects */
.tilt-card {
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}

/* Profile Slideshow styles */
.profile-slide {
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    transform: scale(1);
    z-index: 1;
}

.profile-slide.active {
    opacity: 1;
    z-index: 2;
    animation: kenBurns 15s infinite alternate ease-in-out;
}

@keyframes kenBurns {
    0% { transform: scale(1); }
    100% { transform: scale(1.08); }
}

/* Scrolled Navigation Logic */
#main-nav {
    max-width: 1200px;
    max-height: 80px;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1); /* Smooth elegant transition */
}

#main-nav .nav-content, #main-nav .logo-text {
    max-width: 800px;
    opacity: 1;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

#main-nav.nav-scrolled {
    width: 60px !important;
    height: 60px !important;
    min-width: 60px !important;
    min-height: 60px !important;
    max-width: 60px !important;
    max-height: 60px !important;
    padding: 0 !important;
    gap: 0 !important;
    border-radius: 50% !important;
    justify-content: center !important;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

#main-nav.nav-scrolled .nav-content, #main-nav.nav-scrolled .logo-text {
    opacity: 0 !important;
    max-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    pointer-events: none;
    border: none !important;
    overflow: hidden !important;
}

#main-nav.nav-scrolled #nav-logo {
    gap: 0 !important;
    margin: 0 !important;
    min-width: unset !important;
}

#main-nav.nav-scrolled:hover {
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.4);
    transform: scale(1.1);
}

/* 3D Tools Globe Styling */
.perspective-1000 {
    perspective: 1200px;
}

.transform-style-3d {
    transform-style: preserve-3d;
}

.tool-node {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 60px;
    margin-left: -30px;
    margin-top: -30px;
    background: rgba(10, 15, 12, 0.6);
    border: 1px solid rgba(0, 255, 65, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--color-primary);
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.2), inset 0 0 10px rgba(0, 255, 65, 0.1);
    backdrop-filter: blur(8px);
    transition: transform 0.1s linear, background-color 0.3s, border-color 0.3s;
    /* Remove backface-visibility so we see them from behind too */
    backface-visibility: visible;
}

.tool-node:nth-child(even) {
    color: var(--color-secondary);
    border-color: rgba(0, 255, 255, 0.3);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.2), inset 0 0 10px rgba(0, 255, 255, 0.1);
}

.tool-node:hover {
    background: rgba(0, 255, 65, 0.2);
    border-color: var(--color-primary);
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.5);
    color: #fff;
    cursor: pointer;
}

.tool-node:nth-child(even):hover {
    background: rgba(0, 255, 255, 0.2);
    border-color: var(--color-secondary);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.5);
}
/* Splash Screen Nodes */
.splash-node {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80px;
    height: 80px;
    margin-left: -40px;
    margin-top: -40px;
    background: rgba(10, 15, 12, 0.8);
    border: 1px solid rgba(0, 255, 65, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--color-primary);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.3), inset 0 0 15px rgba(0, 255, 65, 0.2);
    backdrop-filter: blur(10px);
    transition: transform 1.5s cubic-bezier(0.19, 1, 0.22, 1), opacity 1.5s ease-out;
    backface-visibility: visible;
}

.splash-node:nth-child(even) {
    color: var(--color-secondary);
    border-color: rgba(0, 255, 255, 0.5);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3), inset 0 0 15px rgba(0, 255, 255, 0.2);
}

.splash-screen-hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(1.1);
}

@keyframes scan {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

.mask-image-bottom {
    mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
}


/* Professional Loading Screen & Entrances */
body.site-loaded .hero-entrance-left {
    animation: slideInLeft 1s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    animation-delay: 0.2s;
}
body.site-loaded .hero-entrance-right {
    animation: slideInRight 1s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    animation-delay: 0.4s;
}
@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(50px); }
}
/* Splash Screen Nodes */
.splash-node {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80px;
    height: 80px;
    margin-left: -40px;
    margin-top: -40px;
    background: rgba(10, 15, 12, 0.8);
    border: 1px solid rgba(0, 255, 65, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--color-primary);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.3), inset 0 0 15px rgba(0, 255, 65, 0.2);
    backdrop-filter: blur(10px);
    transition: transform 1.5s cubic-bezier(0.19, 1, 0.22, 1), opacity 1.5s ease-out;
    backface-visibility: visible;
}

.splash-node:nth-child(even) {
    color: var(--color-secondary);
    border-color: rgba(0, 255, 255, 0.5);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3), inset 0 0 15px rgba(0, 255, 255, 0.2);
}

.splash-screen-hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(1.1);
}

@keyframes scan {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

.mask-image-bottom {
    mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
}


/* Professional Loading Screen & Entrances */
body.site-loaded .hero-entrance-left {
    animation: slideInLeft 1s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    animation-delay: 0.2s;
}
body.site-loaded .hero-entrance-right {
    animation: slideInRight 1s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    animation-delay: 0.4s;
}
@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

.hero-entrance-left, .hero-entrance-right { opacity: 0; }


/* Scroll Reveal Animations */
.reveal {
    opacity: 0;
    transition: all 1s ease;
}
.reveal.from-bottom {
    transform: translateY(50px);
}
.reveal.from-left {
    transform: translateX(-50px);
}
.reveal.from-right {
    transform: translateX(50px);
}
.reveal.active {
    opacity: 1;
    transform: translateY(0) translateX(0);
}
.reveal.delay-100 { transition-delay: 100ms; }
.reveal.delay-200 { transition-delay: 200ms; }
.reveal.delay-300 { transition-delay: 300ms; }

/* Hide content before load */
body:has(#splash-screen):not(.site-loaded) nav,
body:has(#splash-screen):not(.site-loaded) main {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}
