/* ============================================
   VERTICAL SIDE NAVIGATION
   ============================================ */

.side-nav {
    position: fixed;
    left: 2rem;
    top: 2rem;  /* Aligned to top instead of centered */
    z-index: 1000;

    /* Fixed height: 85% of viewport */
    height: 85vh;
    min-height: 400px;  /* Minimum height for usability */
    max-height: 800px;  /* Maximum height to avoid too tall on large screens */

    display: flex;
    flex-direction: column;
    justify-content: flex-start;  /* Align items to top instead of center */
    gap: 0.5rem;

    /* Glassmorphism effect */
    background: rgba(15, 15, 15, 0.6);
    backdrop-filter: blur(10px);
    padding: 1.5rem 0.75rem;
    border-radius: 2rem;

    /* Subtle border and shadow */
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.8),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 1rem;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 1.5rem;

    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);

    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.nav-item:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    transform: scale(1.15);
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Active state - glowing effect */
.nav-item.active {
    color: #fff;
    background: var(--nav-color, #00aaff);
    border-color: var(--nav-color, #00aaff);
    box-shadow:
        0 0 30px var(--nav-color, #00aaff),
        0 4px 16px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 1.2rem;
    background: var(--nav-color, #00aaff);
    opacity: 0.3;
    filter: blur(8px);
    z-index: -1;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.5; }
}

/* Icon styling */
.nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.nav-item:hover .nav-icon {
    transform: scale(1.1);
}

/* Label that appears on hover */
.nav-label {
    position: absolute;
    left: 100%;
    margin-left: 1rem;

    /* Styling */
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(10px);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    white-space: nowrap;

    /* Border and shadow */
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);

    /* Hidden by default */
    opacity: 0;
    pointer-events: none;
    transform: translateX(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Arrow pointing left */
.nav-label::before {
    content: '';
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);

    border: 6px solid transparent;
    border-right-color: rgba(20, 20, 20, 0.95);
}

.nav-item:hover .nav-label {
    opacity: 1;
    transform: translateX(0);
}

/* Active item label */
.nav-item.active .nav-label {
    background: var(--nav-color, #00aaff);
    border-color: var(--nav-color, #00aaff);
}

.nav-item.active .nav-label::before {
    border-right-color: var(--nav-color, #00aaff);
}

/* Color schemes per section */
.nav-item[data-section="home"] {
    --nav-color: #ffffff;
}

.nav-item[data-section="software"] {
    --nav-color: #00aaff;
}

.nav-item[data-section="diving"] {
    --nav-color: #00ffcc;
}

.nav-item[data-section="flying"] {
    --nav-color: #ffaa00;
}

.nav-item[data-section="mathematics"] {
    --nav-color: #aa00ff;
}

.nav-item[data-section="travel"] {
    --nav-color: #ff6b35;
}

.nav-item[data-section="larp"] {
    --nav-color: #8b4513;
}

.nav-item[data-section="paragliding"] {
    --nav-color: #00bfff;
}

.nav-item[data-section="playground"] {
    --nav-color: #ff00ff;
}

.nav-item[data-section="contact"] {
    --nav-color: #ffffff;
}

/* Contact icon styling - slightly smaller and more subtle */
.nav-item-contact {
    margin-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 0.5rem;
}

/* Responsive: Hide on tablets and mobile */
@media (max-width: 1024px) {
    .side-nav {
        left: 1rem;
    }

    .nav-item {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.25rem;
    }

    .side-nav {
        padding: 0.75rem 0.5rem;
    }
}

@media (max-width: 768px) {
    .side-nav {
        display: none;
    }
}

/* Subtle animation on load */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.side-nav {
    animation: slideInLeft 0.5s ease-out 0.3s both;
}

/* Stagger animation for items */
.nav-item:nth-child(1) { animation: fadeIn 0.3s ease-out 0.4s both; }
.nav-item:nth-child(2) { animation: fadeIn 0.3s ease-out 0.5s both; }
.nav-item:nth-child(3) { animation: fadeIn 0.3s ease-out 0.6s both; }
.nav-item:nth-child(4) { animation: fadeIn 0.3s ease-out 0.7s both; }
.nav-item:nth-child(5) { animation: fadeIn 0.3s ease-out 0.8s both; }
.nav-item:nth-child(6) { animation: fadeIn 0.3s ease-out 0.9s both; }
.nav-item:nth-child(7) { animation: fadeIn 0.3s ease-out 1.0s both; }

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
