/* Enhanced Interactive Styles */

/* Loading Animation */
.loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    transition: opacity 0.5s, visibility 0.5s;
}

.loader {
    width: 100px;
    height: 100px;
    position: relative;
}

.loader-circle {
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-top-color: var(--accent-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: absolute;
}

.loader-circle:nth-child(2) {
    width: 80%;
    height: 80%;
    top: 10%;
    left: 10%;
    border-top-color: var(--accent-pink);
    animation-direction: reverse;
    animation-duration: 0.8s;
}

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

/* Particle Background */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    opacity: 0.5;
}

/* Animated Gradient Background */
.animated-bg {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -2;
    background: linear-gradient(-45deg, #0a0a0f, #1a1a2e, #0f3460, #16213e);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

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

/* Cursor Effects - Removed */

/* Text Reveal Animation */
.reveal-text {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-text.active {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger Animation */
.stagger-animation {
    opacity: 0;
    transform: translateY(50px) scale(0.9);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.stagger-animation.active {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* 3D Card Effect */
.card-3d {
    transform-style: preserve-3d;
    transition: transform 0.6s;
    position: relative;
}

.card-3d:hover {
    transform: rotateY(10deg) rotateX(-10deg) translateZ(50px);
}

.card-3d::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(255, 0, 110, 0.1));
    opacity: 0;
    transition: opacity 0.3s;
    border-radius: inherit;
}

.card-3d:hover::before {
    opacity: 1;
}

/* Glowing Buttons */
.btn-glow {
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}

.btn-glow::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-glow:hover::before {
    width: 300px;
    height: 300px;
}

.btn-glow:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 212, 255, 0.4);
}

/* Animated Skills Bars */
.skill-progress {
    position: relative;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 10px;
}

.skill-progress-bar {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 10px;
    width: 0;
    transition: width 2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.skill-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.skill-progress-bar.active {
    width: var(--skill-level);
}

/* Floating Animation */
.float-animation {
    animation: float 3s ease-in-out infinite;
}

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

/* Pulse Animation */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Glitch Effect for Title */
.glitch {
    position: relative;
    color: var(--text-primary);
    font-weight: 700;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    animation: glitch-1 0.5s infinite;
    color: var(--accent-cyan);
    z-index: -1;
}

.glitch::after {
    animation: glitch-2 0.5s infinite;
    color: var(--accent-pink);
    z-index: -2;
}

@keyframes glitch-1 {
    0%, 100% { clip: rect(0, 900px, 0, 0); }
    25% { clip: rect(random(100)px, 9999px, random(100)px, 0); }
    50% { clip: rect(random(100)px, 9999px, random(100)px, 0); }
    75% { clip: rect(random(100)px, 9999px, random(100)px, 0); }
}

@keyframes glitch-2 {
    0%, 100% { clip: rect(0, 900px, 0, 0); }
    25% { clip: rect(random(100)px, 9999px, random(100)px, 0); }
    50% { clip: rect(random(100)px, 9999px, random(100)px, 0); }
    75% { clip: rect(random(100)px, 9999px, random(100)px, 0); }
}

/* Morphing Shapes Background */
.morph-shape {
    position: fixed;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.3;
    animation: morph 20s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

.morph-shape:nth-child(1) {
    width: 500px;
    height: 500px;
    background: var(--accent-cyan);
    top: -250px;
    left: -250px;
    animation-delay: 0s;
}

.morph-shape:nth-child(2) {
    width: 400px;
    height: 400px;
    background: var(--accent-pink);
    bottom: -200px;
    right: -200px;
    animation-delay: 5s;
}

@keyframes morph {
    0%, 100% { border-radius: 50%; transform: rotate(0deg) scale(1); }
    33% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; transform: rotate(80deg) scale(1.1); }
    66% { border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%; transform: rotate(-80deg) scale(0.9); }
}

/* Enhanced Timeline Experience Cards */
.experience-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    transition: all 0.4s ease;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    margin-bottom: 2rem;
    contain: layout style paint;
    isolation: isolate;
    /* Prevent overflow during hover animations */
    transform: translateZ(0);
    will-change: transform;
}

.experience-card:hover {
    transform: translateY(-3px) translateZ(0);
    border-color: var(--accent-cyan);
    box-shadow: 0 8px 20px rgba(0, 212, 255, 0.3);
    z-index: 20;
}

/* Hover state shows content */
.experience-card:hover .experience-details {
    max-height: 2000px;
    padding: 0 2rem 2rem;
    opacity: 1;
    visibility: visible;
    /* Ensure smooth transitions */
    transition-delay: 0.1s;
}

/* Click state keeps content open permanently */
.experience-card.clicked .experience-details {
    max-height: 2000px;
    padding: 0 2rem 2rem;
    opacity: 1;
    visibility: visible;
    /* Ensure clicked state is stable */
    transition-delay: 0s;
}

.experience-card.clicked {
    border-color: var(--accent-cyan);
    box-shadow: 0 10px 25px rgba(0, 212, 255, 0.2);
}

.experience-card.collapsed .experience-details {
    max-height: 0;
    padding: 0 2rem;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
}

.experience-card.expanded .experience-details {
    max-height: 2000px;
    padding: 0 2rem 2rem;
    opacity: 1;
    visibility: visible;
    /* Ensure expanded state is consistent */
    transition-delay: 0s;
}

.experience-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2rem;
    border-bottom: 1px solid var(--card-border);
    position: relative;
    transition: all 0.3s ease;
    min-height: 120px;
    flex-shrink: 0;
    overflow: hidden;
    z-index: 1;
    contain: layout;
}

.experience-details {
    transition: all 0.4s ease;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    position: relative;
    contain: layout style;
    /* Ensure consistent min-height to prevent layout jumps */
    min-height: 0;
}

.job-info {
    flex: 1;
}

.job-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.company-name {
    font-size: 1.2rem;
    color: var(--accent-cyan);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.job-duration {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
}

.company-logo-container {
    flex-shrink: 0;
    padding: 0.75rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 90px;
}

.company-logo-new {
    max-width: 110px;
    max-height: 75px;
    width: 110px;
    height: 75px;
    object-fit: contain;
    object-position: center;
    opacity: 0.9;
    transition: all 0.3s ease;
    filter: brightness(1.2) contrast(1.15) saturate(1.1);
    border-radius: 6px;
}

.experience-card:hover .company-logo-new {
    opacity: 1;
    transform: scale(1.08);
    filter: brightness(1.3) contrast(1.25) saturate(1.2);
}

/* BCG Multi-project Layout */
.projects-container {
    margin-top: 0;
    /* Ensure consistent padding across all project containers */
    padding: 0;
}

.project-item {
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    /* Ensure consistent appearance */
    background: rgba(0, 0, 0, 0.02);
}

.project-item:hover {
    border-color: rgba(0, 212, 255, 0.3);
}

.project-header {
    padding: 1rem 1.5rem;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: block;
}

.project-header:hover {
    background: rgba(0, 212, 255, 0.05);
}

.project-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    display: block;
}

.project-toggle {
    color: var(--accent-cyan);
    font-size: 1rem;
    font-weight: bold;
    transition: transform 0.3s ease;
    margin-left: 0.5rem;
    display: inline;
}

.project-toggle.active {
    transform: rotate(45deg);
}

.project-details {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s ease;
    background: rgba(0, 0, 0, 0.05);
}

.project-details.active {
    max-height: 500px;
    padding: 1.5rem;
}

.project-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
    font-style: italic;
}

.achievements-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.achievement-item {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    position: relative;
    transition: all 0.3s ease;
}

.achievement-item::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent-cyan);
    font-weight: bold;
}

.achievement-item:hover {
    transform: translateX(5px);
}

.achievement-text {
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.impact-highlight {
    color: var(--accent-cyan);
    font-weight: 600;
}

/* Single Project Experience */
.single-project {
    /* Ensure single projects have consistent spacing */
    padding: 0;
    margin: 0;
}

.single-project .project-description {
    margin-bottom: 1rem;
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    padding: 0 0 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Ensure single project achievement lists match multi-project spacing */
.single-project .achievements-list {
    margin-top: 1rem;
    padding-top: 0.5rem;
}

/* Timeline adjustments */
.timeline-content {
    background: transparent;
    border: none;
    backdrop-filter: none;
    padding: 0;
    position: relative;
    z-index: 2;
    overflow: hidden;
    border-radius: 15px;
}

.timeline-item {
    position: relative;
    margin-bottom: 4rem;
    z-index: 1;
    overflow: visible;
    /* Add consistent padding to prevent overflow */
    padding: 10px;
    margin: -10px;
    margin-bottom: 4rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-item:hover {
    z-index: 10;
}

.timeline-marker {
    position: absolute;
    left: -62px;
    top: 30px;
    width: 12px;
    height: 12px;
    background: #00D4FF;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 15px #00D4FF;
    z-index: 100;
}

/* Simple connecting line */
.timeline-marker::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 100%;
    width: 40px;
    height: 2px;
    background: #00D4FF;
    transform: translateY(-50%);
    opacity: 0.7;
}

/* Hide timeline dots and connecting lines on mobile */
@media (max-width: 768px) {
    .timeline-marker {
        display: none;
    }
}

.timeline {
    position: relative;
    max-width: 900px;
    margin: 3rem auto;
    padding: 2rem 20px 2rem 80px;
    overflow: visible;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--accent-cyan) 0%, var(--accent-pink) 100%);
    border-radius: 2px;
    box-shadow: 
        0 0 10px rgba(0, 212, 255, 0.6),
        0 0 20px rgba(0, 212, 255, 0.4),
        0 0 30px rgba(0, 212, 255, 0.2);
    animation: timelineGlow 3s ease-in-out infinite alternate;
    z-index: 1;
}

/* Hide timeline line on mobile */
@media (max-width: 768px) {
    .timeline::before {
        display: none;
    }
}

/* Side Navigation on Scroll - Non-intrusive floating design */
.side-navbar {
    position: fixed;
    top: 50%;
    left: -45px; /* Hidden on the left side */
    transform: translateY(-50%);
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 0 15px 15px 0; /* Rounded only on right side */
    backdrop-filter: blur(15px);
    padding: 0.5rem 0.25rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
    width: 45px;
    overflow: hidden;
    box-shadow: 5px 0 20px rgba(0, 0, 0, 0.1);
}

.side-navbar.visible {
    left: 0; /* Slide in from left */
}

.side-navbar.expanded {
    width: 180px;
    padding: 1rem 0.75rem;
    left: 0;
    border-radius: 0 15px 15px 0;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.2);
}

/* Toggle Button */
.side-nav-toggle {
    display: none;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    font-size: 12px;
    z-index: 10;
    opacity: 0.8;
}

.side-nav-toggle:hover {
    background: var(--accent-pink);
    opacity: 1;
    transform: scale(1.05);
}

.side-nav-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
    padding: 0.25rem;
    border-bottom: 1px solid var(--card-border);
    opacity: 1;
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 30px;
    width: 100%;
}

.side-navbar.expanded .side-nav-logo {
    opacity: 1;
}

.side-nav-logo-text {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-cyan);
    opacity: 0;
    max-width: 0;
    overflow: hidden;
    transition: all 0.3s ease 0.1s;
    white-space: nowrap;
}

.side-navbar.expanded .side-nav-logo-text {
    opacity: 1;
    max-width: 150px;
}

.side-nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
    margin-top: 0.5rem;
}

.side-nav-item {
    position: relative;
}

.side-nav-link {
    display: flex;
    align-items: center;
    padding: 0.6rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 0.8rem;
    font-weight: 500;
    position: relative;
    overflow: hidden;
    justify-content: center;
    min-height: 36px;
}

.side-navbar.expanded .side-nav-link {
    justify-content: flex-start;
    padding: 0.75rem;
}

.side-nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent-cyan);
    transform: scaleY(0);
    transition: transform 0.3s ease;
    opacity: 0;
}

.side-navbar.expanded .side-nav-link::before {
    opacity: 1;
}

.side-nav-link:hover::before,
.side-nav-link.active::before {
    transform: scaleY(1);
}

.side-nav-link:hover,
.side-nav-link.active {
    background: rgba(0, 212, 255, 0.15);
    color: var(--accent-cyan);
}

.side-nav-icon {
    width: 18px;
    height: 18px;
    margin-right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
}

.side-navbar.expanded .side-nav-icon {
    margin-right: 0.75rem;
}

.side-nav-text {
    white-space: nowrap;
    font-size: 0.8rem;
    opacity: 0;
    transition: opacity 0.3s ease 0.1s;
    overflow: hidden;
    max-width: 0;
}

.side-navbar.expanded .side-nav-text {
    opacity: 1;
    max-width: 120px;
}

/* Hide top navbar when side nav is active */
.navbar.top-nav.hidden {
    transform: translateY(-100%);
    opacity: 0;
}

/* Progress indicator for side nav */
.side-nav-progress {
    position: absolute;
    right: -1px;
    top: 1.5rem;
    bottom: 1.5rem;
    width: 2px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 1px;
}

.side-nav-progress-bar {
    width: 100%;
    background: var(--primary-gradient);
    border-radius: 1px;
    transition: height 0.3s ease;
    height: 0%;
}

/* Neon Glow Effect */
.neon-text {
    text-shadow: 
        0 0 10px var(--accent-cyan),
        0 0 20px var(--accent-cyan),
        0 0 30px var(--accent-cyan),
        0 0 40px var(--accent-cyan);
    animation: neon-flicker 2s infinite alternate;
}

@keyframes neon-flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* Timeline animations */
@keyframes timelineGlow {
    0% { 
        box-shadow: 
            0 0 10px rgba(0, 212, 255, 0.6),
            0 0 20px rgba(0, 212, 255, 0.4),
            0 0 30px rgba(0, 212, 255, 0.2);
    }
    100% { 
        box-shadow: 
            0 0 15px rgba(0, 212, 255, 0.8),
            0 0 30px rgba(0, 212, 255, 0.6),
            0 0 45px rgba(0, 212, 255, 0.4);
    }
}

@keyframes dotPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 
            0 0 20px rgba(0, 212, 255, 0.8),
            0 0 40px rgba(0, 212, 255, 0.6),
            0 0 60px rgba(0, 212, 255, 0.4),
            inset 0 0 10px rgba(255, 255, 255, 0.2);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 
            0 0 25px rgba(0, 212, 255, 1),
            0 0 50px rgba(0, 212, 255, 0.8),
            0 0 75px rgba(0, 212, 255, 0.6),
            inset 0 0 15px rgba(255, 255, 255, 0.3);
    }
}

@keyframes dotPulseHover {
    0%, 100% {
        transform: scale(1.2);
    }
    50% {
        transform: scale(1.4);
    }
}

@keyframes connectionGlow {
    0% {
        opacity: 0.6;
    }
    100% {
        opacity: 1;
    }
}

/* Theme Toggle Removed - Dark theme only */

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--primary-gradient);
    z-index: 9999;
    transition: width 0.3s;
}

/* Tilt Effect */
.tilt {
    transform-style: preserve-3d;
    transform: perspective(1000px);
    transition: transform 0.3s;
}

/* Magnetic Buttons */
.magnetic {
    transition: transform 0.3s;
}

/* Ripple Effect */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: ripple-animation 0.6s;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Desktop specific improvements */
@media (min-width: 769px) {
    .side-navbar.expanded {
        width: 180px;
    }

    /* Add subtle backdrop when expanded */
    .side-navbar.expanded::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.03);
        z-index: -1;
        backdrop-filter: blur(1px);
    }
}

/* Enhanced Mobile responsive adjustments */
@media (max-width: 768px) {
    /* Experience Cards */
    .experience-card {
        min-height: 120px;
        margin-bottom: 1.5rem;
        border-radius: 12px;
        /* Reduce hover transform on mobile to prevent overflow */
        transform: translateZ(0);
    }
    
    .experience-card:hover {
        transform: translateY(-2px) translateZ(0);
    }

    .experience-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        min-height: 140px;
        padding: 1.5rem;
        border-bottom: 1px solid var(--card-border);
    }

    .job-info {
        width: 100%;
        text-align: left;
    }

    .job-title {
        font-size: 1.3rem;
        margin-bottom: 0.5rem;
    }

    .company-name {
        font-size: 1.1rem;
        margin-bottom: 0.3rem;
    }

    .job-duration {
        font-size: 0.9rem;
    }

    .company-logo-container {
        width: 80px;
        height: 60px;
        padding: 0.3rem;
        align-self: flex-end;
        margin-top: -60px;
    }

    .company-logo-new {
        max-width: 70px;
        max-height: 50px;
        width: 70px;
        height: 50px;
    }

    /* Experience Details */
    .experience-details {
        padding: 0 1.5rem 1.5rem;
    }

    .experience-details.active {
        padding: 1rem 1.5rem 1.5rem;
    }

    /* Projects */
    .project-item {
        margin-bottom: 1rem;
        border-radius: 8px;
    }
    
    /* Fix mobile BCG card issues */
    .projects-container {
        padding: 0;
    }
    
    .experience-card.collapsed .projects-container {
        max-height: 0;
        opacity: 0;
        overflow: hidden;
    }

    .project-header {
        padding: 1rem;
    }
    
    /* Mobile specific overflow fixes for experience cards */
    .experience-card:hover .experience-details,
    .experience-card.clicked .experience-details,
    .experience-card.expanded .experience-details {
        padding: 0 1rem 1.5rem !important;
        max-width: 100%;
        overflow: hidden;
        box-sizing: border-box;
    }
    
    .experience-header {
        overflow: hidden;
        word-wrap: break-word;
    }
    
    .job-info {
        overflow: hidden;
        word-wrap: break-word;
        max-width: 100%;
    }
    
    .company-logo-container {
        flex-shrink: 0;
        overflow: hidden;
    }

    .project-title {
        font-size: 1rem;
        line-height: 1.3;
    }

    .project-details {
        padding: 0 1rem;
    }

    .project-details.active {
        padding: 1rem;
    }

    .achievement-item {
        padding: 0.4rem 0;
        padding-left: 1rem;
        margin-bottom: 0.4rem;
    }

    .achievement-text {
        font-size: 0.9rem;
        line-height: 1.4;
    }

    /* Timeline adjustments - No timeline line on mobile */
    .timeline {
        padding: 1rem 15px;
        margin: 2rem auto;
    }

    .timeline-item {
        margin-bottom: 3rem;
        padding: 8px;
        margin: -8px;
        margin-bottom: 3rem;
    }

    .timeline-item:last-child {
        margin-bottom: 0;
    }
}

/* Small Mobile Adjustments */
@media (max-width: 480px) {
    .experience-card {
        margin-bottom: 1.2rem;
        border-radius: 10px;
    }
    
    .experience-card:hover {
        transform: translateY(-1px) translateZ(0);
    }

    .experience-header {
        padding: 1rem;
        min-height: 120px;
        gap: 0.8rem;
    }

    .job-title {
        font-size: 1.2rem;
    }

    .company-name {
        font-size: 1rem;
    }

    .job-duration {
        font-size: 0.85rem;
    }

    .company-logo-container {
        width: 70px;
        height: 50px;
        margin-top: -50px;
    }

    .company-logo-new {
        max-width: 60px;
        max-height: 40px;
        width: 60px;
        height: 40px;
    }

    .experience-details {
        padding: 0 1rem 1rem;
    }

    .project-title {
        font-size: 0.95rem;
    }

    .achievement-text {
        font-size: 0.85rem;
    }

    .timeline {
        padding: 1rem 10px;
    }

    .timeline-item {
        margin-bottom: 2.5rem;
        padding: 6px;
        margin: -6px;
        margin-bottom: 2.5rem;
    }

    .timeline-item:last-child {
        margin-bottom: 0;
    }
}

/* Fix BCG card uniformity issues */
.experience-card .projects-container {
    /* Ensure projects container doesn't affect card height when collapsed */
    overflow: hidden;
}

.experience-card.collapsed .projects-container {
    /* Hide projects completely when card is collapsed */
    max-height: 0;
    opacity: 0;
}

.experience-card.expanded .projects-container,
.experience-card.clicked .projects-container,
.experience-card:hover .projects-container {
    /* Show projects when card is open */
    max-height: 5000px;
    opacity: 1;
}

/* Ensure all experience cards have consistent minimum appearance */
.experience-header {
    /* Force consistent header height across all cards */
    box-sizing: border-box;
}

/* Prevent content jumping during transitions */
.experience-card .achievement-item,
.experience-card .project-item {
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Clickable skill cards */
.skill-card.clickable {
    cursor: pointer;
    transition: all 0.3s ease;
}

.skill-card.clickable:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 212, 255, 0.4);
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.15), rgba(255, 0, 110, 0.15));
}

.skill-card.clickable:active {
    transform: translateY(-2px) scale(0.98);
}

/* Very Small Mobile */
@media (max-width: 360px) {
    .experience-header {
        padding: 0.8rem;
        min-height: 100px;
    }

    .job-title {
        font-size: 1.1rem;
    }

    .company-name {
        font-size: 0.95rem;
    }

    .company-logo-container {
        width: 60px;
        height: 45px;
        margin-top: -45px;
    }

    .company-logo-new {
        max-width: 50px;
        max-height: 35px;
        width: 50px;
        height: 35px;
    }

    .timeline {
        padding: 1rem 5px;
    }

    .timeline-item {
        margin-bottom: 2rem;
        padding: 5px;
        margin: -5px;
        margin-bottom: 2rem;
    }

    .timeline-item:last-child {
        margin-bottom: 0;
    }
}

/* Desktop navbar behavior - left side */
@media (min-width: 769px) {
    .side-navbar {
        position: fixed;
        top: 50%;
        left: -60px;
        transform: translateY(-50%);
        width: 50px;
        height: auto;
        border-radius: 0 15px 15px 0;
        padding: 0.75rem 0.5rem;
        flex-direction: column;
    }
    
    .side-navbar.visible {
        left: 0;
        transform: translateY(-50%);
    }
    
    .side-navbar.expanded {
        width: 180px;
        padding: 1rem 0.75rem;
        left: 0;
    }
    
    .side-nav-menu {
        flex-direction: column;
        gap: 0.5rem;
        justify-content: flex-start;
        align-items: stretch;
    }
    
    .side-nav-link {
        flex-direction: row;
        justify-content: flex-start;
        padding: 0.6rem;
        text-align: left;
    }
    
    .side-nav-text {
        font-size: 0.8rem;
        opacity: 0;
        max-width: 0;
        transition: opacity 0.3s ease 0.1s;
    }
    
    .side-navbar.expanded .side-nav-text {
        opacity: 1;
        max-width: 120px;
    }
    
    .side-nav-icon {
        font-size: 14px;
        width: 18px;
        height: 18px;
        margin-right: 0;
    }
    
    .side-navbar.expanded .side-nav-icon {
        margin-right: 0.75rem;
    }
    
    .side-nav-toggle {
        display: block;
    }
    
    .side-nav-logo {
        display: block;
    }
    
    .side-nav-progress {
        display: block;
    }
}

/* Mobile-specific side navigation - Bottom webapp style */
@media (max-width: 768px) {
    /* Add bottom padding to body when side nav is visible */
    body.side-nav-active {
        padding-bottom: 90px;
    }
    
    .side-navbar {
        /* Position at bottom for mobile webapp feel */
        top: auto;
        bottom: -90px; /* Hidden below screen */
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: none !important;
        min-width: 100%;
        height: 80px;
        padding: 0.5rem 0;
        margin: 0;
        border-radius: 0;
        transform: translateY(0) translateX(0);
        backdrop-filter: blur(20px);
        background: rgba(10, 10, 15, 0.98);
        border-top: 1px solid var(--card-border);
        border-left: none;
        border-right: none;
        border-bottom: none;
        box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.3);
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        z-index: 1001;
        box-sizing: border-box;
    }

    .side-navbar.visible {
        bottom: 0 !important; /* Slide up from bottom */
        transform: translateY(0) translateX(0) !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
    }

    .side-navbar.expanded {
        height: 80px;
        bottom: 0 !important;
        padding: 0.5rem 0;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        transform: translateY(0) translateX(0) !important;
    }

    .side-nav-toggle {
        display: none; /* Hide toggle button on mobile bottom nav */
    }

    .side-nav-icon {
        font-size: 18px;
        width: 22px;
        height: 22px;
        margin-bottom: 0.2rem;
        flex-shrink: 0;
        display: block;
    }

    .side-nav-link {
        padding: 0.3rem 0.2rem;
        min-height: 60px;
        flex-direction: column;
        text-align: center;
        justify-content: center;
        align-items: center;
        font-size: 0.7rem;
        flex: 1;
        display: flex;
        max-width: none;
        width: auto;
        min-width: 0;
    }

    .side-navbar.expanded .side-nav-link {
        padding: 0.3rem 0.2rem;
        flex-direction: column;
        flex: 1;
    }

    .side-nav-menu {
        gap: 0;
        margin: 0;
        flex-direction: row;
        justify-content: space-around;
        width: 100%;
        height: 100%;
        align-items: center;
        display: flex;
        padding: 0 1rem;
        box-sizing: border-box;
    }

    .side-nav-logo {
        display: none; /* Hide logo on mobile bottom nav */
    }

    .side-nav-text {
        opacity: 1;
        max-width: none;
        font-size: 0.65rem;
        margin-top: 0;
        line-height: 1.1;
        white-space: nowrap;
        overflow: visible;
        text-overflow: clip;
        font-weight: 500;
        display: block;
    }
    
    .side-navbar.expanded .side-nav-text {
        opacity: 1;
        max-width: none;
    }

    /* Remove backdrop for bottom nav */
    .side-navbar.expanded::after {
        display: none;
    }
    
    /* Hide progress bar on mobile */
    .side-nav-progress {
        display: none;
    }
    
    /* Adjust icons alignment */
    .side-navbar.expanded .side-nav-icon {
        margin-right: 0;
        margin-bottom: 0.2rem;
    }
    
    /* Ensure navbar items are properly distributed */
    .side-nav-item {
        flex: 1;
        display: flex;
        justify-content: center;
        align-items: center;
        min-width: 0;
    }
    
    /* Override any conflicting styles */
    .side-navbar .side-nav-link::before {
        display: none;
    }
    
    /* Fix text cutoff issues */
    .side-nav-text {
        font-size: 0.7rem !important;
        color: var(--text-secondary);
        text-align: center;
    }
    
    .side-nav-link.active .side-nav-text {
        color: var(--accent-cyan);
    }
}