.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-secondary);
    padding: var(--spacing-xl) var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    border-radius: var(--radius-md);
    margin: var(--spacing-md);
    height: calc(100vh - 2 * var(--spacing-md));
    box-shadow: 
        0 -6px 12px -6px rgba(0,0,0,0.8),
        6px -4px 12px -6px rgba(0,0,0,0.8),
        -6px -4px 12px -6px rgba(0,0,0,0.8),
        0 -8px 16px -8px rgba(0,0,0,0.8),
        0 6px 16px -4px rgba(0,0,0,0.8),
        inset 0 1px 0 rgba(232, 227, 220, 0.1)
}

.profile-image {
    width: 140px;
    height: 140px;
    border-radius: var(--radius-full);
    background: linear-gradient(
        45deg,
        #6d5a3e,
        #8b6f47,
        #a6876b,
        #c4a57b,
        #a6876b,
        #8b6f47,
        #6d5a3e
    );
    background-size: 300% 300%;
    margin: 0 auto var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 0 0 2px var(--bg-secondary),
        0 0 0 3px var(--accent-primary),
        0 4px 12px rgba(0, 0, 0, 0.3);
    animation: gradientShift 8s ease-in-out infinite;
    cursor: pointer;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.profile-image.flipping {
    animation: coinFlip 1.1s cubic-bezier(0.25, 0.46, 0.45, 0.94), gradientShift 12s ease-in-out infinite;
}

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

.profile-image::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.4)"/><circle cx="50" cy="30" r="1.5" fill="rgba(255,255,255,0.3)"/><circle cx="80" cy="25" r="2" fill="rgba(255,255,255,0.4)"/><circle cx="30" cy="60" r="1.5" fill="rgba(255,255,255,0.3)"/><circle cx="70" cy="70" r="2" fill="rgba(255,255,255,0.4)"/><circle cx="15" cy="45" r="1.8" fill="rgba(255,255,255,0.35)"/><circle cx="60" cy="50" r="1.2" fill="rgba(255,255,255,0.25)"/><circle cx="40" cy="15" r="1.6" fill="rgba(255,255,255,0.3)"/><circle cx="85" cy="60" r="1.4" fill="rgba(255,255,255,0.35)"/></svg>');
    background-size: 100px 100px;
    opacity: 0.6;
    z-index: 0;
    animation: moveDots 15s linear infinite;
}

@keyframes moveDots {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(-50px, -50px);
    }
}

.profile-image::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(139, 111, 71, 0.35);
    border-radius: var(--radius-full);
    z-index: 2;
    pointer-events: none;
}

.profile-image.flipping::after {
    animation: overlay-transition 1.1s ease-in-out;
}

@keyframes overlay-transition {
    0% {
        background: rgba(139, 111, 71, 0.35);
    }
    15% {
        background: rgba(122, 158, 126, 0.4);
    }
    30% {
        background: rgba(122, 158, 126, 0.55);
    }
    50% {
        background: rgba(122, 158, 126, 0.6);
    }
    70% {
        background: rgba(122, 158, 126, 0.5);
    }
    85% {
        background: rgba(122, 158, 126, 0.35);
    }
    100% {
        background: rgba(139, 111, 71, 0.35);
    }
}

@keyframes coinFlip {
    0% {
        transform: rotateY(0deg);
        animation-timing-function: cubic-bezier(0.34, 0.01, 0.68, 0.33);
        filter: blur(0px) brightness(1);
        box-shadow: 
            0 0 0 2px var(--bg-secondary),
            0 0 0 3px var(--accent-primary),
            0 4px 12px rgba(0, 0, 0, 0.3);
    }
    15% {
        filter: blur(2px) brightness(1.1);
        box-shadow: 
            0 0 0 2px var(--bg-secondary),
            0 0 0 3px var(--accent-bright),
            0 0 20px rgba(122, 158, 126, 0.4),
            0 0 40px rgba(122, 158, 126, 0.2);
    }
    30% {
        transform: rotateY(360deg);
        animation-timing-function: linear;
        filter: blur(3px) brightness(1.15);
        box-shadow: 
            0 0 0 2px var(--bg-secondary),
            0 0 0 3px var(--accent-bright),
            0 0 30px rgba(122, 158, 126, 0.6),
            0 0 60px rgba(122, 158, 126, 0.3),
            0 0 90px rgba(122, 158, 126, 0.15);
    }
    50% {
        filter: blur(3px) brightness(1.15);
        box-shadow: 
            0 0 0 2px var(--bg-secondary),
            0 0 0 3px var(--accent-bright),
            0 0 30px rgba(122, 158, 126, 0.6),
            0 0 60px rgba(122, 158, 126, 0.3),
            0 0 90px rgba(122, 158, 126, 0.15);
    }
    70% {
        transform: rotateY(900deg);
        animation-timing-function: cubic-bezier(0.32, 0.67, 0.66, 0.99);
        filter: blur(2px) brightness(1.1);
        box-shadow: 
            0 0 0 2px var(--bg-secondary),
            0 0 0 3px var(--accent-bright),
            0 0 20px rgba(122, 158, 126, 0.4),
            0 0 40px rgba(122, 158, 126, 0.2);
    }
    85% {
        filter: blur(1px) brightness(1.05);
        box-shadow: 
            0 0 0 2px var(--bg-secondary),
            0 0 0 3px var(--accent-bright),
            0 0 15px rgba(122, 158, 126, 0.3);
    }
    100% {
        transform: rotateY(1080deg);
        filter: blur(0px) brightness(1);
        box-shadow: 
            0 0 0 2px var(--bg-secondary),
            0 0 0 3px var(--accent-primary),
            0 4px 12px rgba(0, 0, 0, 0.3);
    }
}

.profile-img {
    width: 92%;
    height: 92%;
    object-fit: cover;
    position: relative;
    z-index: 1;
    transform: translateX(-6px) translateY(6px);
}

#profileCanvas.profile-img {
    width: auto;
    height: auto;
    max-width: none;
    max-height: none;
    transform: translateX(-6px) translateY(6px);
    object-fit: none;
}

.profile-name {
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.profile-title {
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: var(--spacing-md);
    line-height: 1.6;
}

.contact-info {
    margin-bottom: var(--spacing-md);
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.contact-icon {
    width: 20px;
    height: 20px;
    color: var(--text-subtle);
    flex-shrink: 0;
    margin-top: 2px;
}

.contact-details {
    flex: 1;
}

.contact-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}
.contact-label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-subtle);
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.contact-value {
    font-size: 14px;
    color: var(--text-primary);
}

.contact-value-link {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.contact-value-link:hover {
    color: var(--accent-bright);
}

.contact-value-compact {
    line-height: 1.4;
}

.sidebar-bottom {
    margin-top: auto;
    padding-top: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
}

.social-links {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.social-link {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--accent-primary);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    transition: all var(--transition-fast);
    text-decoration: none;
    cursor: pointer;
}

.social-link:hover {
    border-color: rgba(166, 135, 107, 0.5);
    background: rgba(166, 135, 107, 0.06);
}

.resume-button {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    background-color: var(--accent-primary);
    color: var(--bg-primary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    transition: all var(--transition-fast);
    justify-content: center;
    margin-top: 10px;
    width: 100%;
    border: 1px solid rgba(166, 135, 107, 0.25);
}

.resume-button:hover {
    background-color: var(--accent-secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(166, 135, 107, 0.25);
}

.resume-icon {
    width: 20px;
    height: 20px;
}

.sidebar-footer {
    font-size: 11px;
    color: var(--text-subtle);
    text-align: center;
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--overlay-light);
}

@media (max-width: 1024px) {
    .sidebar {
        width: var(--sidebar-width-tablet);
    }
}

@media (max-width: 768px) {
    .sidebar {
        position: relative;
        width: calc(100% - 2 * var(--spacing-md));
        height: auto;
        padding: var(--spacing-lg) var(--spacing-md);
        padding-bottom: var(--spacing-sm);
    }
    
    .profile-image {
        margin-bottom: var(--spacing-sm);
    }
    
    .profile-title {
        margin-bottom: var(--spacing-sm);
    }
    
    .contact-info {
        margin-bottom: var(--spacing-sm);
    }
    
    .sidebar-bottom {
        padding-top: var(--spacing-md);
        padding-bottom: var(--spacing-sm);
    }
    
    .resume-button {
        margin-top: var(--spacing-sm);
    }
    
    .sidebar-footer {
        margin-top: var(--spacing-sm);
        padding-top: var(--spacing-sm);
    }
}

