/* ===== ENHANCED STYLES ===== */

/* Glitch Effect for Intro Name */
.intro-name-wrapper {
    position: relative;
    display: inline-block;
}

.glitch {
    position: relative;
    font-size: 10rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    background: linear-gradient(135deg, #00ff88 0%, #02e1ff 30%, #646cff 60%, #ff00ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: glitchAnim 3s infinite, gradientShift 4s ease infinite;
    filter: drop-shadow(0 0 30px rgba(2, 225, 255, 0.6)) drop-shadow(0 0 60px rgba(255, 0, 255, 0.4));
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #00ff88 0%, #02e1ff 30%, #646cff 60%, #ff00ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
}

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 #ff00ff;
    clip: rect(24px, 550px, 90px, 0);
    animation: glitchBefore 3s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 #02e1ff, 2px 2px #00ff88;
    animation: glitchAfter 2s infinite linear alternate-reverse;
}

@keyframes glitchAnim {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
}

@keyframes glitchBefore {
    0% { clip: rect(65px, 9999px, 119px, 0); }
    5% { clip: rect(44px, 9999px, 120px, 0); }
    10% { clip: rect(76px, 9999px, 107px, 0); }
    15% { clip: rect(34px, 9999px, 133px, 0); }
    20% { clip: rect(100px, 9999px, 62px, 0); }
    25% { clip: rect(19px, 9999px, 144px, 0); }
    30% { clip: rect(82px, 9999px, 88px, 0); }
    35% { clip: rect(50px, 9999px, 110px, 0); }
    100% { clip: rect(65px, 9999px, 119px, 0); }
}

@keyframes glitchAfter {
    0% { clip: rect(30px, 9999px, 99px, 0); }
    5% { clip: rect(120px, 9999px, 140px, 0); }
    10% { clip: rect(60px, 9999px, 80px, 0); }
    15% { clip: rect(90px, 9999px, 115px, 0); }
    20% { clip: rect(45px, 9999px, 130px, 0); }
    25% { clip: rect(105px, 9999px, 125px, 0); }
    30% { clip: rect(25px, 9999px, 95px, 0); }
    100% { clip: rect(30px, 9999px, 99px, 0); }
}

/* Typing Effect */
.intro-subtitle {
    font-size: 1.8rem;
    color: #02e1ff;
    margin-top: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.5rem;
}

.typing-text {
    font-weight: 600;
    letter-spacing: 0.2em;
}

.typing-cursor {
    animation: blink 1s infinite;
    color: #02e1ff;
    font-weight: 300;
}

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

/* Particles Animation */
.intro-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    overflow: hidden;
}

.intro-particles::before,
.intro-particles::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    filter: blur(80px);
    animation: float 8s infinite ease-in-out;
}

.intro-particles::before {
    background: rgba(2, 225, 255, 0.15);
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.intro-particles::after {
    background: rgba(100, 108, 255, 0.15);
    bottom: 20%;
    right: 10%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -30px) scale(1.1); }
    50% { transform: translate(-20px, 20px) scale(0.9); }
    75% { transform: translate(20px, 30px) scale(1.05); }
}

/* Enhanced Flutter Developer Gradient */
.flutter-gradient {
    background: linear-gradient(135deg, #00ff88 0%, #02e1ff 30%, #646cff 60%, #ff00ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

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

/* Top Right Showcase - REMOVED */
.top-right-showcase,
.showcase-item,
.live-status,
.project-counter {
    display: none !important;
}

/* Enhanced Logo Animation */
.logo-icon {
    animation: logoRotate 20s linear infinite;
    filter: drop-shadow(0 0 20px rgba(2, 225, 255, 0.8));
    transition: all 0.3s;
}

.nav-logo:hover .logo-icon {
    animation-play-state: paused;
    filter: drop-shadow(0 0 35px rgba(2, 225, 255, 1));
    transform: scale(1.15);
}

@keyframes logoRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Enhanced Navigation Name Group */
.nav-name-group {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.nav-main-name {
    font-size: 1.3rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    background: linear-gradient(135deg, #00ff88 0%, #02e1ff 30%, #646cff 60%, #ff00ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
    text-shadow: 0 0 20px rgba(2, 225, 255, 0.5);
    filter: drop-shadow(0 0 10px rgba(2, 225, 255, 0.4));
}

.nav-title {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: #02e1ff;
    text-transform: uppercase;
    opacity: 0.8;
}

.nav-logo:hover .nav-main-name {
    filter: drop-shadow(0 0 20px rgba(2, 225, 255, 0.8));
    transform: scale(1.02);
}

/* Performance Optimizations - Remove lag */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.cursor,
.cursor-follower {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.intro-screen,
.preloader {
    will-change: opacity;
    transform: translateZ(0);
}

.stack-item,
.service-card,
.certificate-card,
.project-card {
    will-change: transform;
    transform: translateZ(0);
}

/* Smooth scroll performance */
html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Enhanced Modal Styles */
.modal-project-details {
    margin-bottom: 2rem;
    padding: 2rem;
    background: rgba(2, 225, 255, 0.05);
    border: 1px solid rgba(2, 225, 255, 0.2);
    border-radius: 12px;
}

.modal-meta {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.modal-year,
.modal-role,
.modal-duration {
    font-size: 0.875rem;
    color: #02e1ff;
    font-weight: 600;
}

.modal-desc {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.modal-tags .tag {
    padding: 0.5rem 1rem;
    background: rgba(2, 225, 255, 0.1);
    border: 1px solid rgba(2, 225, 255, 0.3);
    font-size: 0.75rem;
    font-weight: 600;
}

/* Responsive Enhancements */
@media (max-width: 1200px) {
    .glitch {
        font-size: 8rem;
    }
}

@media (max-width: 968px) {
    .glitch {
        font-size: 5rem;
    }
    
    .intro-subtitle {
        font-size: 1.2rem;
    }
    
    .nav-content {
        flex-wrap: wrap;
        justify-content: space-between;
    }
}

@media (max-width: 640px) {
    .glitch {
        font-size: 3.5rem;
        letter-spacing: 0.05em;
    }
    
    .intro-subtitle {
        font-size: 1rem;
    }
}

/* Hardware Acceleration for Smooth Performance */
.intro-name,
.glitch::before,
.glitch::after,
.intro-particles::before,
.intro-particles::after,
.logo-icon {
    transform: translate3d(0, 0, 0);
    will-change: transform;
}

/* Reduce Motion for Better Performance */
@media (prefers-reduced-motion: reduce) {
    .glitch,
    .glitch::before,
    .glitch::after,
    .intro-particles::before,
    .intro-particles::after,
    .logo-icon,
    .flutter-gradient {
        animation: none !important;
    }
}

/* Enhanced Tab Logo Glow */
link[rel="icon"] {
    filter: drop-shadow(0 0 10px rgba(2, 225, 255, 0.8));
}

/* Optimized Animations - 60fps */
@keyframes optimizedFloat {
    0%, 100% { transform: translate3d(0, 0, 0); }
    25% { transform: translate3d(30px, -30px, 0); }
    50% { transform: translate3d(-20px, 20px, 0); }
    75% { transform: translate3d(20px, 30px, 0); }
}

/* Enhanced Hover Effects */
.stack-item:hover,
.service-card:hover,
.certificate-card:hover,
.project-card:hover {
    transform: translateY(-8px) translateZ(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Smooth Fade-in for All Sections */
.section {
    animation: sectionFadeIn 0.8s ease-out;
}

@keyframes sectionFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced Button Interactions */
.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

/* Loading Optimization */
img, video {
    content-visibility: auto;
}

/* Lazy Load Optimization */
.project-image img,
.project-image video {
    loading: lazy;
}
