/* Custom CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --secondary-color: #f1f5f9;
    --accent-color: #8b5cf6;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --nav-glass: rgba(15, 23, 42, 0.8);
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    overflow-x: hidden;
}

.playfair {
    font-family: 'Playfair Display', serif;
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
}

/* Enhanced Futuristic Navigation */
.nav-futuristic {
    background: var(--nav-glass);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(59, 130, 246, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.nav-logo {
    position: relative;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 2px;
}

.nav-logo::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #3b82f6, #8b5cf6, #06b6d4);
    border-radius: 8px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-logo:hover::before {
    opacity: 0.2;
}

.nav-link {
    position: relative;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(139, 92, 246, 0.3));
    border-radius: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.nav-link:hover {
    color: white;
    transform: translateY(-1px);
}

.nav-link:hover::before {
    opacity: 1;
}

.nav-link.active {
    color: white;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.4), rgba(139, 92, 246, 0.4));
}

.nav-link.active::before {
    opacity: 1;
}

.nav-toggle {
    color: rgba(255, 255, 255, 0.8);
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    padding: 8px 12px;
    transition: all 0.3s ease;
}

.nav-toggle:hover {
    background: rgba(59, 130, 246, 0.2);
    color: white;
}

.mobile-menu {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(59, 130, 246, 0.3);
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.animated-underline {
    position: relative;
    overflow: hidden;
}

.animated-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    transition: left 0.3s ease;
}

.animated-underline:hover::after {
    left: 0;
}

.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-animation {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

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

.skill-badge {
    position: relative;
    overflow: hidden;
}

.skill-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.skill-badge:hover::before {
    left: 100%;
}

.floating {
    animation: floating 3s ease-in-out infinite;
}

@keyframes floating {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
}

.social-icon {
    transition: all 0.3s ease;
}

.social-icon:hover {
    transform: translateY(-3px) scale(1.1);
}

/* Enhanced Hero Animations */
.particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: particle-float 6s ease-in-out infinite;
}

@keyframes particle-float {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.7;
    }

    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 1;
    }
}

.hero-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-size: 400% 400%;
    animation: gradient-shift 8s ease-in-out infinite;
}

@keyframes gradient-shift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.typing-cursor {
    display: inline-block;
    width: 3px;
    height: 1.2em;
    background: currentColor;
    animation: blink 1s step-end infinite;
    margin-left: 2px;
}

@keyframes blink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

.code-rain {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.code-char {
    position: absolute;
    color: rgba(255, 255, 255, 0.1);
    font-family: 'Courier New', monospace;
    font-size: 14px;
    animation: rain 3s linear infinite;
}

@keyframes rain {
    0% {
        transform: translateY(-100vh);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

/* Enhanced Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: fade-in-up 1s ease-out 0.5s both;
}

.scroll-wheel {
    width: 24px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    position: relative;
    margin: 0 auto 8px;
}

.scroll-wheel::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 6px;
    background: white;
    border-radius: 2px;
    animation: scroll-wheel 1.5s infinite;
}

@keyframes scroll-wheel {
    0% {
        top: 6px;
        opacity: 1;
    }

    50% {
        top: 50%;
        opacity: 0.5;
    }

    100% {
        top: calc(100% - 12px);
        opacity: 0;
    }
}

.scroll-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
}

@keyframes fade-in-up {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* About Section Improvements */
.about-section {
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 50%, #f8fafc 100%);
    position: relative;
}

.about-section::before {
    content: '';
    position: absolute;
    top: -50px;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    clip-path: polygon(0 50px, 100% 0, 100% 100%, 0 100%);
}

.about-section::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    clip-path: polygon(0 0, 100% 50px, 100% 100%, 0 100%);
}

.skill-progress {
    position: relative;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    height: 8px;
}

.skill-progress-bar {
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 10px;
    width: 0%;
    transition: width 2s ease-in-out;
}

.glitch {
    position: relative;
    animation: glitch 2s infinite;
}

@keyframes glitch {

    0%,
    100% {
        transform: translate(0);
        filter: hue-rotate(0deg);
    }

    20% {
        transform: translate(-2px, 2px);
        filter: hue-rotate(90deg);
    }

    40% {
        transform: translate(-2px, -2px);
        filter: hue-rotate(180deg);
    }

    60% {
        transform: translate(2px, 2px);
        filter: hue-rotate(270deg);
    }

    80% {
        transform: translate(2px, -2px);
        filter: hue-rotate(360deg);
    }
}

/* Project Image Styles */
.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-card:hover .project-image {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.8), rgba(139, 92, 246, 0.8));
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-card .line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Perfect circle image styling for About section */
.about-section .rounded-full img {
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: center;
    border-radius: 50%;
    display: block;
    width: 100% !important;
    height: 100% !important;
}

/* Ensure the container is perfectly circular */
.about-section .inset-8 {
    border-radius: 50%;
    background: linear-gradient(135deg, #60a5fa, #a855f7);
    padding: 4px;
}

/* Image container should be circular */
.about-section .inset-8 img {
    border-radius: 50%;
    width: calc(100% - 8px);
    height: calc(100% - 8px);
    margin: 4px;
}