/* 
===============================================
PARTICLE BACKGROUND STYLING
Animated canvas element covering entire viewport
Fixed positioning with -1 z-index to appear behind all content
Background color matches dark theme (gray-950)
===============================================
*/
canvas#bgCanvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: #0f172a; /* Tailwind's gray-950 */
}

/* ============ LIGHT MODE SUPPORT ============ */
body.light-mode {
    background-color: #ffffff !important;
    color: #1f2937 !important;
}

body.light-mode canvas#bgCanvas {
    background: #f3f4f6 !important;
}

body.light-mode nav {
    background-color: rgba(255, 255, 255, 0.95) !important;
    border-bottom: 1px solid #e5e7eb;
}

body.light-mode nav .text-cyan-400,
body.light-mode nav .text-cyan-300 {
    color: #0891b2 !important;
}

body.light-mode nav .text-white {
    color: #1f2937 !important;
}

body.light-mode nav a:hover {
    color: #0891b2 !important;
}

body.light-mode section {
    background-color: #ffffff !important;
}

body.light-mode .bg-gradient-to-b {
    background-image: linear-gradient(to bottom, rgba(15, 164, 206, 0.03), rgba(59, 130, 246, 0.03)) !important;
}

body.light-mode .bg-gray-900,
body.light-mode .bg-gray-950 {
    background-color: #f9fafb !important;
}

body.light-mode .text-white {
    color: #1f2937 !important;
}

body.light-mode .text-gray-200 {
    color: #374151 !important;
}

body.light-mode .text-gray-300 {
    color: #6b7280 !important;
}

body.light-mode .text-gray-400 {
    color: #9ca3af !important;
}

body.light-mode .text-gray-500 {
    color: #6b7280 !important;
}

body.light-mode .text-cyan-300,
body.light-mode .text-cyan-400 {
    color: #0891b2 !important;
}

body.light-mode .text-blue-300,
body.light-mode .text-blue-400 {
    color: #0284c7 !important;
}

body.light-mode .text-blue-500 {
    color: #3b82f6 !important;
}

body.light-mode .border-cyan-400 {
    border-color: #06b6d4 !important;
}

body.light-mode .border-cyan-500 {
    border-color: #06b6d4 !important;
}

body.light-mode .border-gray-700,
body.light-mode .border-gray-700\/50 {
    border-color: #e5e7eb !important;
}

body.light-mode .border-cyan-400\/20 {
    border-color: rgba(6, 182, 212, 0.2) !important;
}

body.light-mode .glass-effect {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(6, 182, 212, 0.2) !important;
}

body.light-mode .glass-effect:hover {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: rgba(6, 182, 212, 0.4) !important;
}

body.light-mode .bg-gray-800,
body.light-mode .bg-gray-700 {
    background-color: #f3f4f6 !important;
    border: 1px solid #e5e7eb !important;
}

body.light-mode .bg-gray-800:hover {
    background-color: #e5e7eb !important;
}

body.light-mode .skill-card {
    background: rgba(243, 244, 246, 0.8) !important;
    border: 1px solid rgba(6, 182, 212, 0.2) !important;
}

body.light-mode .skill-card:hover {
    background: rgba(243, 244, 246, 1) !important;
    border-color: rgba(6, 182, 212, 0.6) !important;
}

body.light-mode .skill-card span {
    color: #0891b2 !important;
}

body.light-mode .bg-gradient-to-r {
    background-image: linear-gradient(to right, #0891b2, #0284c7) !important;
}

body.light-mode .from-cyan-400,
body.light-mode .from-cyan-500 {
    --tw-gradient-from: #06b6d4 !important;
}

body.light-mode .to-blue-400,
body.light-mode .to-blue-500 {
    --tw-gradient-to: #0284c7 !important;
}

body.light-mode button#themeToggle {
    background-color: #f3f4f6 !important;
    border: 1px solid #e5e7eb !important;
    color: #1f2937 !important;
}

body.light-mode button#themeToggle:hover {
    background-color: #e5e7eb !important;
}

body.light-mode footer {
    background-color: #ffffff !important;
    border-top-color: rgba(6, 182, 212, 0.2) !important;
}

body.light-mode footer h3,
body.light-mode footer h4 {
    color: #0891b2 !important;
}

body.light-mode footer p,
body.light-mode footer a {
    color: #6b7280 !important;
}

body.light-mode footer a:hover {
    color: #0891b2 !important;
}

/* ============ LIGHT MODE GRADIENT TEXT FIX ============ */
body.light-mode .bg-gradient-to-r.from-cyan-400.to-blue-400.bg-clip-text {
    background-image: linear-gradient(to right, #0c4a6e, #1e40af) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

body.light-mode .bg-gradient-to-r.from-cyan-400.via-blue-400.to-cyan-300.bg-clip-text {
    background-image: linear-gradient(to right, #0c4a6e, #1e40af, #0c4a6e) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

/* 
===============================================
BLOB ANIMATIONS
Animated blob shapes that shift and scale
Creates organic, flowing motion effect
7-second infinite loop with staggered delays
===============================================
*/
@keyframes blob {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
}

.animate-blob {
    animation: blob 7s infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

/* 
===============================================
GLASSMORPHISM EFFECT
Semi-transparent background with backdrop blur
Creates frosted glass appearance on cards
Border color adjusts on hover for emphasis
===============================================
*/
.glass-effect {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(34, 211, 238, 0.2);
}

.glass-effect:hover {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(34, 211, 238, 0.4);
}

/* 
===============================================
CORE ANIMATIONS
Fade in, fade up, and other transition effects
Used across all sections for smooth appearance
Timing: 0.6-0.8s with easing functions
===============================================
*/
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(34, 211, 238, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(34, 211, 238, 0.6);
    }
}

/* Animation Classes */
.animate-fade-in {
    animation: fadeIn 0.8s ease-in-out;
}

.animate-fade-in-delay {
    animation: fadeIn 0.8s ease-in-out 0.2s both;
}

.animate-fade-in-delay-2 {
    animation: fadeIn 0.8s ease-in-out 0.4s both;
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

.animate-fade-in-up-delay {
    animation: fadeInUp 0.8s ease-out 0.15s forwards;
    opacity: 0;
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

/* 
===============================================
SCROLL REVEAL ANIMATIONS
Elements fade in when scrolled into view
Available directions: up (default), left, right
Smooth transitions with translateX/translateY
===============================================
*/
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.scroll-reveal.reveal {
    opacity: 1;
    transform: translateY(0);
}

.scroll-reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s ease-out;
}

.scroll-reveal-left.reveal {
    opacity: 1;
    transform: translateX(0);
}

.scroll-reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s ease-out;
}

.scroll-reveal-right.reveal {
    opacity: 1;
    transform: translateX(0);
}

/* Stagger effect for multiple elements */
.scroll-reveal:nth-child(1) { transition-delay: 0s; }
.scroll-reveal:nth-child(2) { transition-delay: 0.1s; }
.scroll-reveal:nth-child(3) { transition-delay: 0.2s; }
.scroll-reveal:nth-child(4) { transition-delay: 0.3s; }
.scroll-reveal:nth-child(5) { transition-delay: 0.4s; }
.scroll-reveal:nth-child(6) { transition-delay: 0.5s; }

/* ============ ACTIVE NAV INDICATOR ============ */
nav .nav-link {
    position: relative;
}

nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, #06b6d4, #3b82f6);
    transition: width 0.3s ease;
}

nav .nav-link:hover::after,
nav .nav-link.active::after {
    width: 100%;
}

/* 
===============================================
SKILL CARDS STYLING
120x120px grid cards with tech stack icons
Default: semi-transparent dark background
Hover: brightens, scales up, shows cyan glow shadow
On hover of one card: other cards scale to 0.85x and fade to 0.6 opacity
Tooltip: appears to the right showing years + description
===============================================
*/
/* Skill Card Styling */
.skill-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(34, 211, 238, 0.3);
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    opacity: 0;
    position: relative;
    width: 120px;
    height: 120px;
    justify-content: center;
    --skill-years: "";
    --skill-description: "";
    z-index: 1;
}

.skill-card:hover {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(34, 211, 238, 0.6);
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 20px rgba(34, 211, 238, 0.3);
    z-index: 50;
}

.skill-card.other-cards {
    transform: scale(0.85);
    opacity: 0.6;
}

.skill-card span {
    font-size: 1rem;
    font-weight: 600;
    color: #22d3ee;
    margin-top: 0.5rem;
    text-align: center;
    transition: all 0.3s ease;
    opacity: 1;
}

.skill-card:hover span {
    opacity: 1;
}

.skill-card::after {
    content: var(--skill-years) ' • ' var(--skill-description);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 1rem;
    width: 180px;
    opacity: 0;
    transition: all 0.3s ease;
    text-align: left;
    font-size: 0.8rem;
    color: #22d3ee;
    line-height: 1.4;
    pointer-events: none;
    white-space: normal;
    word-wrap: break-word;
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid rgba(34, 211, 238, 0.4);
    border-radius: 0.5rem;
    padding: 0.75rem;
    backdrop-filter: blur(10px);
    transform: translateY(-50%) translateX(-10px);
    z-index: 100;
}

.skill-card:hover::after {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

/* 
===============================================
CAROUSEL STYLING  
Smooth transitions for carousel item positioning
Active item: 100% opacity, full scale
Background items: 40% opacity, 0.75x scale, blur effect
Dots show active slide with rounded borders
===============================================
*/
/* ============ SCROLL ANIMATIONS ============ */
.animate-scroll-x {
    display: flex;
    gap: 2rem;
    animation: scroll-x 40s linear infinite;
}

@keyframes scroll-x {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.bg-gray-900.rounded-lg.shadow-lg.p-6 {
    width: 20rem; /* Match your projects.html card width */
    min-width: 20rem;
}

.project-scroll-card {
    background: #1e293b;
    border: 4px solid #22d3ee;
    border-radius: 1rem;
    box-shadow: 0 4px 24px rgba(0,255,255,0.15);
    padding: 1.5rem;
    min-width: 22rem;
    width: 22rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: box-shadow 0.3s;
}

.project-scroll-card:hover {
    box-shadow: 0 8px 32px #22d3ee80;
}

.project-scroll-card img {
    width: 12rem;
    height: 12rem;
    object-fit: cover;
    border-radius: 0.75rem;
    border: 3px solid #38bdf8;
    margin-bottom: 1rem;
}

.project-scroll-card span {
    font-size: 1.5rem;
    font-weight: 600;
    color: #22d3ee;
    margin-bottom: 0.5rem;
}

#projectsScroller {
    overflow: hidden !important;
}

#techInfo {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

#techInfo:hover,
#techInfo:focus-within {
    opacity: 1;
    pointer-events: auto;
}

#techInfo-trigger {
    position: absolute;
    left: 8px;
    top: 80px;
    z-index: 20;
    color: #22d3ee;
    background: transparent;
    border: none;
    font-weight: bold;
    cursor: pointer;
}

/* 
===============================================
EDUCATION POPUP NOTIFICATION
Fixed position notification in bottom-right
Slides in from right with bounce effect (cubic-bezier)
Auto-slides out after 5 seconds via JavaScript
Used to highlight education section when scrolled into view
===============================================
*/
/* Education Hover Popup */
.education-popup {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(90deg, #06b6d4, #3b82f6);
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(34, 211, 238, 0.6);
    z-index: 100;
    animation: slideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    pointer-events: auto;
}

.education-popup.hide {
    animation: slideOut 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes slideIn {
    from {
        transform: translateX(400px) translateY(0);
        opacity: 0;
    }
    to {
        transform: translateX(0) translateY(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0) translateY(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px) translateY(0);
        opacity: 0;
    }
}

/* Education Logo Hover Animation - 3D Flip */
.education-logo-flip {
    perspective: 1000px;
    transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.education-logo-flip:hover {
    transform: rotateY(15deg) rotateX(-5deg) scale(1.05);
}

.education-logo-container-flip:hover {
    box-shadow: 0 0 30px rgba(34, 211, 238, 0.9), 0 25px 50px rgba(34, 211, 238, 0.5) !important;
}

/* 
===============================================
EDUCATION LOGO - 3D INTERACTIVE STYLING
Cursor-tracking 3D tilt effect on logo
Perspective: 1200px for realistic 3D effect
Smooth transitions (0.3s) for rotation changes
Cyan glow shadow on hover
===============================================
*/
/* Education Logo - Interactive 3D Cursor Follow */
.education-logo-interactive {
    perspective: 1200px;
    position: relative;
}

.education-logo-interactive .bg-white {
    transition: all 0.3s ease-out;
    transform-style: preserve-3d;
}

.education-logo-interactive:hover .bg-white {
    background-color: #e5e7eb;
}

/* 
===============================================
SCROLLBAR CUSTOMIZATION
Hide scrollbar for custom scroll experiences
Maintains scrolling functionality
Applied to elements with .scrollbar-hide class
===============================================
*/
/* Hide scrollbar but allow scrolling */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* 
===============================================
CAROUSEL STYLING
Track: 0.6s smooth transitions with cubic-bezier easing
Items: 0.3s individual transitions for opacity/scale
Dots: 8px default, expand to 24px when active
Active dot: full opacity (100%), inactive: 50% opacity
===============================================
*/
/* Carousel smooth transitions */
#carouselTrack {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

#carouselTrack > div > div {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Carousel dots */
.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(34, 211, 238, 0.5);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background-color: rgba(34, 211, 238, 1);
    width: 24px;
    border-radius: 4px;
}

.carousel-dot:hover {
    background-color: rgba(34, 211, 238, 0.8);
}

/* 
===============================================
PROJECTS CAROUSEL STYLING
Featured projects carousel with single-card focus
Container prevents overflow and manages layout
Track smooth transitions and infinite loop behavior
Items: Full viewport width to show one card centered at a time
Background items appear dimmed and scaled behind active card
===============================================
*/
/* Projects Carousel Container */
#projectsCarouselTrack {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Each carousel item takes full container width */
.carousel-item {
    flex-shrink: 0;
    width: 100%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 100%;
}

/* Opacity and scale transitions for background cards */
.carousel-item.opacity-40 {
    opacity: 0.4;
}

.carousel-item.scale-75 {
    transform: scale(0.75);
}

.carousel-item.opacity-100 {
    opacity: 1;
}

.carousel-item.scale-100 {
    transform: scale(1);
}

.carousel-item.blur-sm div {
    filter: blur(4px);
}

/* Projects Carousel Dots */
.carousel-dot-projects {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(34, 211, 238, 0.5);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot-projects.active {
    background-color: rgba(34, 211, 238, 1);
    width: 24px;
    border-radius: 4px;
}

.carousel-dot-projects:hover {
    background-color: rgba(34, 211, 238, 0.8);
}

/* 
===============================================
LEGO BUILDING ANIMATION FOR HERO SECTION
Progressive build-up effect resembling LEGO bricks
Each element appears with a sliding, stacking animation
Staggered delays create sequential building effect
===============================================
*/
@keyframes legoSlideUp {
    0% {
        opacity: 0;
        transform: translateY(100px) scale(0.8);
    }
    50% {
        opacity: 0.7;
        transform: translateY(-10px) scale(1.05);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes legoBrick {
    0% {
        clip-path: polygon(0 100%, 100% 100%, 100% 100%, 0 100%);
    }
    100% {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
}

@keyframes legoPopIn {
    0% {
        opacity: 0;
        transform: scale(0) rotate(-5deg);
    }
    70% {
        transform: scale(1.1) rotate(2deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0);
    }
}

.lego-build-animation {
    animation: legoSlideUp 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
    opacity: 0;
}

.lego-brick-animation {
    animation: legoBrick 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

.lego-pop-animation {
    animation: legoPopIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
    opacity: 0;
}

/* Stagger delays for sequential building */
.lego-delay-1 { animation-delay: 0.2s; }
.lego-delay-2 { animation-delay: 0.4s; }
.lego-delay-3 { animation-delay: 0.6s; }
.lego-delay-4 { animation-delay: 0.8s; }

/* 
===============================================
LOADING SCREEN ANIMATIONS
Custom loader with spinning rings
===============================================
*/
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes spin-slow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(-360deg); }
}

.animate-spin-slow {
    animation: spin-slow 2s linear infinite;
}

/* 
===============================================
LIKE BUTTON ANIMATIONS
Floating hearts and wiggle effects
===============================================
*/
@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

@keyframes floatHeart {
    0% {
        opacity: 1;
        transform: translateY(0) translateX(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-100px) translateX(var(--randomX)) scale(0.5);
    }
}

.animate-wiggle {
    animation: wiggle 0.5s ease-in-out;
}

#likeIcon.liked {
    animation: heartBeat 0.5s ease-in-out;
    color: #ef4444;
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.3); }
    50% { transform: scale(1.1); }
    75% { transform: scale(1.2); }
}

/* 
===============================================
PARALLAX EFFECTS
Smooth depth-based scrolling for layered elements
===============================================
*/
.parallax-section {
    position: relative;
    will-change: transform;
}

.parallax-element,
.parallax-bg {
    will-change: transform;
    transition: transform 0.1s ease-out;
}

/* 
===============================================
TERMINAL-STYLE ABOUT SECTION
Classic terminal interface with typing animation
===============================================
*/
.terminal-container {
    box-shadow: 0 10px 50px rgba(6, 182, 212, 0.2);
}

.terminal-body {
    background: #1a1a1a;
    min-height: 400px;
    color: #00ff00;
}

.terminal-line {
    margin-bottom: 0.5rem;
}

.terminal-cursor {
    animation: blink 1s infinite;
    color: #00ff00;
}

@keyframes blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

.terminal-text {
    color: #e5e7eb;
    line-height: 1.6;
}

.terminal-command {
    color: #22d3ee;
}

.terminal-output {
    color: #a3e635;
}