/* Gelişmiş görsel efektler ve animasyonlar */

/* Enhanced Floating Particles with Multiple Types */
.floating-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.6;
    animation: float-particle 25s infinite linear;
}

.particle:nth-child(4n+1) {
    width: 6px;
    height: 6px;
    background: linear-gradient(45deg, #6366f1, #8b5cf6);
    animation-duration: 20s;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

.particle:nth-child(4n+2) {
    width: 4px;
    height: 4px;
    background: linear-gradient(45deg, #ec4899, #f59e0b);
    animation-duration: 30s;
    box-shadow: 0 0 8px rgba(236, 72, 153, 0.5);
}

.particle:nth-child(4n+3) {
    width: 8px;
    height: 8px;
    background: linear-gradient(45deg, #06b6d4, #3b82f6);
    animation-duration: 35s;
    box-shadow: 0 0 12px rgba(6, 182, 212, 0.5);
}

.particle:nth-child(4n) {
    width: 5px;
    height: 5px;
    background: linear-gradient(45deg, #10b981, #22c55e);
    animation-duration: 40s;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

@keyframes float-particle {
    from {
        transform: translateY(100vh) translateX(-50px) rotate(0deg) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
        transform: translateY(90vh) translateX(0px) rotate(36deg) scale(1);
    }
    50% {
        transform: translateY(50vh) translateX(50px) rotate(180deg) scale(1.2);
        opacity: 1;
    }
    90% {
        opacity: 0.6;
        transform: translateY(10vh) translateX(100px) rotate(324deg) scale(0.8);
    }
    to {
        transform: translateY(-100px) translateX(150px) rotate(360deg) scale(0);
        opacity: 0;
    }
}

/* Page Loading Animation */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(99, 102, 241, 0.1);
    border-top: 3px solid #6366f1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

.loader-text {
    color: var(--text-secondary);
    font-size: 1rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Enhanced Scroll Progress */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 1001;
}

.scroll-progress-bar {
    height: 100%;
    background: var(--gradient-1);
    width: 0%;
    transition: width 0.1s ease;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

/* Morphing Background Shapes */
.bg-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -2;
    pointer-events: none;
}

.bg-shape {
    position: absolute;
    background: var(--gradient-1);
    opacity: 0.03;
    filter: blur(40px);
    animation: morphShape 20s ease-in-out infinite;
}

.bg-shape:nth-child(1) {
    width: 300px;
    height: 300px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.bg-shape:nth-child(2) {
    width: 500px;
    height: 500px;
    top: 60%;
    right: 10%;
    animation-delay: 7s;
}

.bg-shape:nth-child(3) {
    width: 400px;
    height: 400px;
    bottom: 10%;
    left: 30%;
    animation-delay: 14s;
}

@keyframes morphShape {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
    25% {
        transform: scale(1.2) rotate(90deg);
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }
    50% {
        transform: scale(0.8) rotate(180deg);
        border-radius: 50% 60% 30% 60% / 60% 40% 30% 70%;
    }
    75% {
        transform: scale(1.1) rotate(270deg);
        border-radius: 40% 30% 60% 70% / 30% 70% 60% 40%;
    }
}
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2, #f093fb);
}

/* Interactive Grid Background */
.grid-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { background-position: 0 0; }
    100% { background-position: 50px 50px; }
}

/* Loading Animation for Images */
.profile-image {
    position: relative;
}

.profile-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: imageShimmer 2s infinite;
    border-radius: 50%;
}

@keyframes imageShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Custom Cursor */
.custom-cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    background: rgba(102, 126, 234, 0.5);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.cursor-inner {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: #667eea;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.custom-cursor.cursor-hover {
    transform: scale(1.5);
    background: rgba(240, 147, 251, 0.7);
}

.custom-cursor.cursor-hover .cursor-inner {
    background: #f093fb;
}

/* Enhanced Card Hover Effects */
.project-card {
    position: relative;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s;
    z-index: 1;
}

.project-card:hover::before {
    transform: translateX(100%);
}

.project-card:hover {
    transform: translateY(-10px) rotateX(5deg);
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.2);
}

/* Glowing Text Effect */
.hero-name {
    background: linear-gradient(45deg, #667eea, #764ba2, #f093fb);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textGlow 4s ease-in-out infinite;
}

@keyframes textGlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Loading Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease-out forwards;
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-30px);
    animation: fadeInLeft 0.8s ease-out forwards;
}

.fade-in-right {
    opacity: 0;
    transform: translateX(30px);
    animation: fadeInRight 0.8s ease-out forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
.project-card {
    position: relative;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
}

.project-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--accent), var(--primary), var(--secondary));
    border-radius: 1rem;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover::before {
    opacity: 0.7;
}

/* Enhanced loading animation */
.loading-dots {
    display: inline-flex;
    gap: 4px;
    align-items: center;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    animation: loading-bounce 1.4s ease-in-out infinite both;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes loading-bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/* Enhanced button ripple effect */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.btn-ripple:active::after {
    width: 300px;
    height: 300px;
}

/* Improved search suggestions */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    margin-top: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.search-suggestion {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid var(--border);
}

.search-suggestion:last-child {
    border-bottom: none;
}

.search-suggestion:hover {
    background: var(--bg-secondary);
}

.suggestion-text {
    color: var(--text-primary);
    font-size: 0.9rem;
}

.suggestion-type {
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

/* Enhanced project grid animations */
.project-grid-enter {
    animation: projectEnter 0.6s ease-out;
}

@keyframes projectEnter {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Improved scroll progress indicator */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--primary));
    z-index: 1001;
    transition: width 0.2s ease;
}

/* Enhanced theme transition */
body {
    transition: background-color 0.3s ease, color 0.3s ease;
}

* {
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

/* Improved accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus indicators */
.filter-btn:focus,
.project-link:focus,
.btn-primary:focus,
.btn-secondary:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Enhanced mobile responsiveness */
@media (max-width: 640px) {
    .project-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .filters {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        scrollbar-width: thin;
        scrollbar-color: var(--accent) transparent;
    }
    
    .filters::-webkit-scrollbar {
        height: 4px;
    }
    
    .filters::-webkit-scrollbar-track {
        background: transparent;
    }
    
    .filters::-webkit-scrollbar-thumb {
        background: var(--accent);
        border-radius: 2px;
    }
    
    .filter-btn {
        flex-shrink: 0;
        white-space: nowrap;
    }
}

/* High performance mode for low-end devices */
@media (max-width: 480px) {
    .project-card {
        transition: none;
    }
    
    .project-card:hover {
        transform: none;
    }
    
    .floating-particles {
        display: none;
    }
    
    .particle {
        animation: none;
    }
}

/* Dark mode specific enhancements */
[data-theme='dark'] .project-card {
    background: rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(10px);
}

[data-theme='dark'] .search-suggestions {
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
}

/* Light mode specific enhancements */
[data-theme='light'] .project-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

[data-theme='light'] .search-suggestions {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

/* Print styles */
@media print {
    .navbar,
    .filters,
    .search-container,
    #back-to-top,
    .floating-particles {
        display: none !important;
    }
    
    .project-card {
        break-inside: avoid;
        border: 1px solid #ccc;
        margin-bottom: 1rem;
    }
    
    .project-overlay,
    .project-links {
        display: none !important;
    }
}

/* Enhanced contrast for accessibility */
@media (prefers-contrast: high) {
    .project-card {
        border-width: 2px;
    }
    
    .filter-btn {
        border-width: 2px;
    }
    
    .btn-primary,
    .btn-secondary {
        border-width: 2px;
    }
}

/* Custom Cursor */
.custom-cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    background: rgba(99, 102, 241, 0.8);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.cursor-inner {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.custom-cursor.cursor-hover {
    width: 40px;
    height: 40px;
    background: rgba(99, 102, 241, 0.2);
    border: 2px solid rgba(99, 102, 241, 0.8);
}

.custom-cursor.cursor-hover .cursor-inner {
    width: 8px;
    height: 8px;
    background: rgba(99, 102, 241, 1);
}

/* Enhanced Ripple Effect */
.btn-primary, .btn-secondary {
    position: relative;
    overflow: hidden;
}

.btn-primary::before, .btn-secondary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: all 0.6s ease;
}

.btn-primary:active::before, .btn-secondary:active::before {
    width: 300px;
    height: 300px;
}

/* Glitch Effect for Hero Text */
.glitch {
    position: relative;
    color: var(--primary);
    font-size: 3rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    animation: glitchTop 1s linear infinite;
    color: #ff0040;
    z-index: -1;
}

.glitch::after {
    animation: glitchBottom 1.5s linear infinite;
    color: #00ffff;
    z-index: -2;
}

@keyframes glitchTop {
    2%, 64% { transform: translate(2px, -2px); }
    4%, 60% { transform: translate(-2px, 2px); }
    62% { transform: translate(13px, -1px) skew(-13deg); }
}

@keyframes glitchBottom {
    2%, 64% { transform: translate(-2px, 0); }
    4%, 60% { transform: translate(-2px, 0); }
    62% { transform: translate(-22px, 5px) skew(21deg); }
}

/* Breathing Animation */
.breathing {
    animation: breathe 4s ease-in-out infinite;
}

@keyframes breathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Floating Elements */
.floating {
    animation: float 3s ease-in-out infinite;
}

.floating:nth-child(2n) {
    animation-delay: 1.5s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Text Reveal Animation */
.text-reveal {
    position: relative;
    overflow: hidden;
}

.text-reveal::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary);
    transform: translateX(-100%);
    animation: reveal 2s ease-in-out;
}

@keyframes reveal {
    0% { transform: translateX(-100%); }
    50% { transform: translateX(0%); }
    100% { transform: translateX(100%); }
}

/* Neon Glow Effects */
.neon {
    color: var(--primary);
    text-shadow: 
        0 0 5px var(--primary),
        0 0 10px var(--primary),
        0 0 15px var(--primary),
        0 0 20px var(--primary);
    animation: neonFlicker 2s ease-in-out infinite alternate;
}

@keyframes neonFlicker {
    0%, 18%, 22%, 25%, 53%, 57%, 100% {
        opacity: 1;
        text-shadow: 
            0 0 5px var(--primary),
            0 0 10px var(--primary),
            0 0 15px var(--primary),
            0 0 20px var(--primary);
    }
    20%, 24%, 55% {
        opacity: 0.8;
        text-shadow: none;
    }
}

/* Advanced Particle Effects */
.particle-trail {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(99, 102, 241, 0.8);
    border-radius: 50%;
    animation: trail 2s ease-out forwards;
}

@keyframes trail {
    0% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(0.5); }
}

/* Holographic Effects */
.holographic {
    background: linear-gradient(
        45deg,
        #ff0080,
        #ff8c00,
        #40e0d0,
        #9370db,
        #ff1493
    );
    background-size: 300% 300%;
    animation: hologram 3s ease-in-out infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes hologram {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Matrix Rain Effect */
.matrix {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    background: transparent;
}

.matrix::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(0deg, transparent 24%, rgba(99, 102, 241, 0.05) 25%, rgba(99, 102, 241, 0.05) 26%, transparent 27%, transparent 74%, rgba(99, 102, 241, 0.05) 75%, rgba(99, 102, 241, 0.05) 76%, transparent 77%, transparent),
        linear-gradient(90deg, transparent 24%, rgba(99, 102, 241, 0.05) 25%, rgba(99, 102, 241, 0.05) 26%, transparent 27%, transparent 74%, rgba(99, 102, 241, 0.05) 75%, rgba(99, 102, 241, 0.05) 76%, transparent 77%, transparent);
    background-size: 30px 30px;
    animation: matrix-move 20s linear infinite;
}

@keyframes matrix-move {
    0% { transform: translate(0, 0); }
    100% { transform: translate(30px, 30px); }
}
