/* Additional utility styles and helper classes */

/* ===== UTILITY ANIMATIONS ===== */
@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes bounceIn {
    0%, 20%, 40%, 60%, 80% {
        animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
    }
    0% {
        opacity: 0;
        transform: scale3d(0.3, 0.3, 0.3);
    }
    20% {
        transform: scale3d(1.1, 1.1, 1.1);
    }
    40% {
        transform: scale3d(0.9, 0.9, 0.9);
    }
    60% {
        opacity: 1;
        transform: scale3d(1.03, 1.03, 1.03);
    }
    80% {
        transform: scale3d(0.97, 0.97, 0.97);
    }
    to {
        opacity: 1;
        transform: scale3d(1, 1, 1);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale3d(0.3, 0.3, 0.3);
    }
    50% {
        opacity: 1;
    }
}

@keyframes flipInY {
    from {
        transform: perspective(400px) rotate3d(0, 1, 0, 90deg);
        animation-timing-function: ease-in;
        opacity: 0;
    }
    40% {
        transform: perspective(400px) rotate3d(0, 1, 0, -20deg);
        animation-timing-function: ease-in;
    }
    60% {
        transform: perspective(400px) rotate3d(0, 1, 0, 10deg);
        opacity: 1;
    }
    80% {
        transform: perspective(400px) rotate3d(0, 1, 0, -5deg);
    }
    to {
        transform: perspective(400px);
    }
}

/* ===== HELPER CLASSES ===== */
.slide-in-left {
    animation: slideInLeft 0.6s ease-out forwards;
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out forwards;
}

.bounce-in {
    animation: bounceIn 0.8s ease-out forwards;
}

.zoom-in {
    animation: zoomIn 0.6s ease-out forwards;
}

.flip-in-y {
    animation: flipInY 0.8s ease-out forwards;
}

/* ===== LOADING STATES ===== */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.1), 
        transparent
    );
    animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* ===== GLASS MORPHISM EFFECTS ===== */
.glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
}

.glass-dark {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
}

/* ===== GRADIENT TEXT EFFECTS ===== */
.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-border {
    position: relative;
    border: 2px solid transparent;
    background: linear-gradient(var(--bg-secondary), var(--bg-secondary)) padding-box,
                var(--accent-gradient) border-box;
    border-radius: var(--border-radius);
}

/* ===== CUSTOM SCROLLBAR FOR MODAL ===== */
.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 3px;
}

/* ===== CONTACT MODAL STYLES ===== */
.contact-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: var(--border-radius);
    color: var(--accent-primary);
    text-decoration: none;
    transition: all var(--transition-normal);
    font-weight: 500;
}

.contact-link:hover {
    background: var(--accent-primary);
    color: var(--bg-primary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.3);
}

.contact-link i {
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}

/* ===== SKILL CATEGORY ICONS ===== */
.skill-category h4 i {
    margin-right: 0.5rem;
    font-size: 1.1rem;
    color: var(--accent-primary);
    transition: all var(--transition-normal);
}

.skill-category:hover h4 i {
    transform: rotateY(360deg);
    color: var(--accent-secondary);
}

/* ===== PROJECT OVERLAY ENHANCEMENTS ===== */
.project-overlay {
    backdrop-filter: blur(5px);
}

.project-btn {
    position: relative;
    overflow: hidden;
}

.project-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

.project-btn:hover::before {
    width: 100px;
    height: 100px;
}

/* ===== ENHANCED BUTTON EFFECTS ===== */
.btn {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: left 0.5s ease;
    z-index: -1;
}

.btn:hover::before {
    left: 0;
}

/* ===== TIMELINE ENHANCEMENTS ===== */
.timeline-item::before {
    content: '';
    position: absolute;
    left: -1rem;
    top: 2rem;
    width: 2rem;
    height: 2rem;
    background: var(--accent-gradient);
    border-radius: 50%;
    border: 3px solid var(--bg-primary);
    box-shadow: 0 0 0 3px var(--accent-primary);
}

/* ===== ENHANCED HOVER STATES ===== */
.nav-link {
    position: relative;
    overflow: hidden;
}

.nav-link::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--accent-gradient);
    opacity: 0.1;
    transition: left 0.3s ease;
    z-index: -1;
}

.nav-link:hover::after {
    left: 0;
}

/* ===== ACCESSIBILITY ENHANCEMENTS ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --text-primary: #ffffff;
        --text-secondary: #cccccc;
        --bg-primary: #000000;
        --bg-secondary: #111111;
        --accent-primary: #00ff00;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .navbar,
    .back-to-top,
    .floating-elements,
    .particle-canvas,
    .cursor,
    .cursor-follower,
    .loader {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .section {
        page-break-inside: avoid;
    }
}

/* ===== FOCUS STYLES ===== */
.btn:focus,
.nav-link:focus,
.project-btn:focus,
.filter-btn:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* ===== ERROR HANDLING ===== */
.error-message {
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.3);
    color: var(--error);
    padding: 1rem;
    border-radius: var(--border-radius);
    margin: 1rem 0;
}

.success-message {
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.3);
    color: var(--success);
    padding: 1rem;
    border-radius: var(--border-radius);
    margin: 1rem 0;
}