/* Navigation - Liquid Glass Effect with Gradient Border */
nav {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    padding: 0; /* Remove padding here to make link fill the container */
    /* Cool Gradient Blue Border */
    background: linear-gradient(to bottom right, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.6)) padding-box,
                linear-gradient(145deg, rgba(59, 130, 246, 0.5), rgba(59, 130, 246, 0.3), rgba(29, 78, 216, 0.2), rgba(255, 255, 255, 0.0)) border-box;
    border: 1px solid transparent;

    border-radius: 25px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.1),
        0 2px 16px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(24px) saturate(180%);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

nav:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.back-btn {
    color: var(--blue-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px; /* Move padding here */
    border-radius: inherit; /* Ensure link area matches nav shape */
    transition: color 0.3s ease;
}

.back-btn:hover {
    color: var(--blue-secondary);
}

.project-selector {
    position: fixed;
    top: 20px;
    right: 20px;
    /* Cool Gradient Blue Border */
    background: linear-gradient(to bottom right, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.6)) padding-box,
                linear-gradient(145deg, rgba(59, 130, 246, 0.5), rgba(59, 130, 246, 0.3), rgba(29, 78, 216, 0.2), rgba(255, 255, 255, 0.0)) border-box;
    border: 1px solid transparent;

    border-radius: 99px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.1),
        0 2px 16px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        inset 0 -1px 0 rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(24px) saturate(180%);
    z-index: 2000;
    cursor: pointer;
    overflow: hidden;
    transition: width 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                max-height 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                border-radius 0.4s ease;
    transform-origin: top right;
}

.project-selector.collapsed {
    width: 44px;
    height: 44px; /* Fixed height for perfect circle */
    max-height: 44px; 
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.project-selector.expanded {
    width: 220px;
    max-height: 600px; /* Allow expansion */
    padding: 8px;
    border-radius: 28px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.project-menu-icon {
    width: 24px;
    height: 24px;
    color: var(--blue-primary);
    stroke-width: 2.5;
    cursor: pointer;
    display: block;
    margin: auto;
}

.project-menu-items {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.project-menu-item {
    padding: 10px 16px;
    border-radius: 20px; /* Concentric Inner (28 - 8) */
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.95rem;
    color: var(--text-primary);
    text-align: center; /* Centered Text */
    cursor: pointer;
    transition: background 0.2s ease;
}

.project-menu-item:hover {
    background: rgba(59, 130, 246, 0.08);
}

.project-menu-item.active {
    font-weight: 700;
    color: var(--blue-primary);
    background: rgba(59, 130, 246, 0.1);
}

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

.project-selector.expanded .project-menu-item {
    animation: menuFadeIn 0.3s ease backwards;
}

.project-selector.expanded .project-menu-item:nth-child(1) { animation-delay: 0.05s; }
.project-selector.expanded .project-menu-item:nth-child(2) { animation-delay: 0.08s; }
.project-selector.expanded .project-menu-item:nth-child(3) { animation-delay: 0.11s; }
.project-selector.expanded .project-menu-item:nth-child(4) { animation-delay: 0.14s; }
.project-selector.expanded .project-menu-item:nth-child(5) { animation-delay: 0.17s; }
.project-selector.expanded .project-menu-item:nth-child(6) { animation-delay: 0.20s; }
