/* Custom Cursor Styles */
.cursor-outer,
.cursor-inner {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 9999;
    transition: transform 0.1s ease, width 0.2s ease, height 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.cursor-outer {
    width: 40px;
    height: 40px;
    border: 2px solid var(--color-text);
    background-color: transparent;
    mix-blend-mode: difference;
}

.cursor-inner {
    width: 8px;
    height: 8px;
    background-color: var(--color-text);
    mix-blend-mode: difference;
}

/* Cursor hover states */
.cursor-projects .cursor-outer {
    border-color: var(--color-projects);
    background-color: rgba(0, 0, 255, 0.1);
}

.cursor-skills .cursor-outer {
    border-color: var(--color-skills);
    background-color: rgba(255, 165, 0, 0.1);
}

.cursor-experience .cursor-outer {
    border-color: var(--color-experience);
    background-color: rgba(128, 0, 128, 0.1);
}

.cursor-services .cursor-outer {
    border-color: var(--color-services);
    background-color: rgba(0, 128, 128, 0.1);
}

.cursor-contact .cursor-outer {
    border-color: var(--color-contact);
    background-color: rgba(255, 0, 255, 0.1);
}

.cursor-link .cursor-outer {
    transform: translate(-50%, -50%) scale(1.5);
    background-color: rgba(255, 255, 255, 0.1);
    border-width: 1px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Apply animations to elements */
.fade-in {
    opacity: 0;
    animation: fadeIn 0.8s ease forwards;
}

.slide-in-left {
    opacity: 0;
    animation: slideInLeft 0.8s ease forwards;
}

.slide-in-right {
    opacity: 0;
    animation: slideInRight 0.8s ease forwards;
}

.pulse {
    animation: pulse 2s infinite;
}

.rotate {
    animation: rotate 10s linear infinite;
}

/* Animation delays */
.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

.delay-400 {
    animation-delay: 0.4s;
}

.delay-500 {
    animation-delay: 0.5s;
}

/* Hover animations */
.hover-lift {
    transition: transform 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
}

.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* Section animations */
.section-header {
    position: relative;
    overflow: hidden;
}

.section-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--border-width);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 1s ease;
}

.section-header.animate::after {
    transform: scaleX(1);
}

.section-header.projects-border::after {
    background-color: var(--color-projects);
}

.section-header.skills-border::after {
    background-color: var(--color-skills);
}

.section-header.experience-border::after {
    background-color: var(--color-experience);
}

.section-header.services-border::after {
    background-color: var(--color-services);
}

.section-header.contact-border::after {
    background-color: var(--color-contact);
}

/* Typing animation */
.typing-effect {
    position: relative;
    display: inline-block;
}

.typing-effect::after {
    content: '|';
    position: absolute;
    right: -8px;
    animation: blink 0.7s infinite;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

/* Page transitions */
.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-background);
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.6s cubic-bezier(0.76, 0, 0.24, 1);
}

.page-transition.active {
    transform: translateY(0);
}

.page-transition.exit {
    transform: translateY(-100%);
}

/* Loading animation */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-background);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--color-text);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Scroll indicator */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background-color: var(--color-projects);
    z-index: 9999;
    width: 0;
    transition: width 0.1s ease;
}

/* 3D card effect */
.card-3d {
    transform-style: preserve-3d;
    perspective: 1000px;
}

.card-3d-inner {
    transition: transform 0.5s ease;
    transform: rotateY(0) rotateX(0);
}

/* Parallax effect */
.parallax {
    transition: transform 0.1s ease;
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(90deg, var(--color-projects), var(--color-contact));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Glow effect */
.glow {
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    transition: box-shadow 0.3s ease;
}

.glow:hover {
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--color-background);
}

::-webkit-scrollbar-thumb {
    background: var(--color-text-light);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-text);
}
