/* Import Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;600&display=swap');

/* CSS Variables */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #0f0f17;
    --bg-card: rgba(25, 25, 40, 0.6);
    --text-primary: #f0f0f5;
    --text-secondary: #a8a8b8;
    --accent-primary: #8b5cf6;
    --accent-secondary: #06b6d4;
    --accent-tertiary: #ec4899;
    --gradient-1: linear-gradient(135deg, #8b5cf6, #06b6d4);
    --gradient-2: linear-gradient(135deg, #ec4899, #8b5cf6);
    --gradient-3: linear-gradient(135deg, #06b6d4, #10b981);
    --gradient-neon: linear-gradient(90deg, #8b5cf6, #06b6d4, #ec4899);
    --border-glass: rgba(255, 255, 255, 0.08);
    --shadow-glow: 0 0 50px rgba(139, 92, 246, 0.5);
    --shadow-glow-cyan: 0 0 50px rgba(6, 182, 212, 0.5);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
    font-feature-settings: 'liga', 'kern';
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Loading Screen */
.loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.5s, visibility 0.5s;
}

.loader-wrapper.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loader {
    position: relative;
    width: 120px;
    height: 120px;
}

.loader-circle {
    width: 120px;
    height: 120px;
    border: 4px solid rgba(139, 92, 246, 0.1);
    border-top: 4px solid var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loader-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: var(--gradient-1);
    width: 0%;
    z-index: 9999;
    transition: width 0.2s;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.6);
}

/* Particles Background */
#neural-canvas {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
    pointer-events: none;
    background: var(--bg-primary);
}

/* Cursor Waving Text */
.cursor-wave-text {
    position: fixed;
    pointer-events: none;
    z-index: 0;
    display: flex;
    gap: 0.3rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4rem;
    opacity: 0;
    transition: opacity 0.5s ease-out;
    transform: translate(-50%, -50%);
    white-space: nowrap;
    mix-blend-mode: screen;
}

.cursor-wave-text.active {
    opacity: 0.7;
}

.cursor-wave-text span {
    display: inline-block;
    background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 50%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 20px rgba(6, 182, 212, 0.6),
                 0 0 40px rgba(59, 130, 246, 0.4);
    filter: drop-shadow(0 0 8px rgba(6, 182, 212, 0.4));
    animation: wave 3s ease-in-out infinite;
    transform-origin: center;
    will-change: transform;
}

.cursor-wave-text span:nth-child(1) { animation-delay: 0s; }
.cursor-wave-text span:nth-child(2) { animation-delay: 0.08s; }
.cursor-wave-text span:nth-child(3) { animation-delay: 0.16s; }
.cursor-wave-text span:nth-child(4) { animation-delay: 0.24s; }
.cursor-wave-text span:nth-child(5) { animation-delay: 0.32s; }
.cursor-wave-text span:nth-child(6) { animation-delay: 0.4s; }
.cursor-wave-text span:nth-child(7) { animation-delay: 0.48s; }
.cursor-wave-text span:nth-child(8) { animation-delay: 0.56s; }
.cursor-wave-text span:nth-child(9) { animation-delay: 0.64s; }
.cursor-wave-text span:nth-child(10) { animation-delay: 0.72s; }
.cursor-wave-text span:nth-child(11) { animation-delay: 0.8s; }
.cursor-wave-text span:nth-child(12) { animation-delay: 0.88s; }
.cursor-wave-text span:nth-child(13) { animation-delay: 0.96s; }
.cursor-wave-text span:nth-child(14) { animation-delay: 1.04s; }
.cursor-wave-text span:nth-child(15) { animation-delay: 1.12s; }

@keyframes wave {
    0%, 100% {
        transform: translateY(0px) scale(1);
    }
    25% {
        transform: translateY(-6px) scale(1.03);
    }
    50% {
        transform: translateY(0px) scale(1);
    }
    75% {
        transform: translateY(-6px) scale(1.03);
    }
}

/* Container */
.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 3rem;
    position: relative;
    z-index: 1;
}

/* Gradient Text */
.gradient-text {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 3s ease infinite;
    background-size: 200% 200%;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(10, 10, 15, 0.7);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(139, 92, 246, 0.1);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.navbar.scrolled {
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(30px) saturate(180%);
    border-bottom: 1px solid rgba(139, 92, 246, 0.2);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4),
                0 0 20px rgba(139, 92, 246, 0.1);
    padding: 0.8rem 0;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: var(--gradient-1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.logo-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.nav-logo:hover .logo-icon::before {
    left: 100%;
}

.logo-initial {
    font-size: 1.1rem;
    font-weight: 900;
    color: white;
    letter-spacing: -1px;
}

.logo-text {
    font-size: 1.3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--text-primary), var(--accent-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-logo:hover .logo-icon {
    transform: translateY(-3px) rotate(5deg);
    box-shadow: 0 6px 25px rgba(139, 92, 246, 0.6);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 3rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.6rem 0;
    letter-spacing: 0.3px;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--gradient-1);
    border-radius: 3px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: rgba(139, 92, 246, 0.3);
    border-radius: 3px;
    filter: blur(5px);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    transform: translateY(-2px);
}

.nav-link:hover::before,
.nav-link.active::before {
    width: 100%;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1001;
}

.hamburger span {
    width: 28px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 10px;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: 8rem 0 4rem;
    overflow: hidden;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-greeting {
    font-size: 1.1rem;
    color: var(--accent-primary);
    margin-bottom: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.hero-greeting::before {
    content: '';
    width: 40px;
    height: 2px;
    background: var(--gradient-1);
    border-radius: 2px;
}

.hero-name {
    font-size: 5rem;
    font-weight: 900;
    margin-bottom: 1rem;
    line-height: 1.1;
    letter-spacing: -0.03em;
    text-shadow: 0 0 60px rgba(139, 92, 246, 0.3);
}

.hero-title {
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 2rem;
    font-weight: 700;
    position: relative;
    display: inline-block;
}

.hero-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--gradient-1);
    border-radius: 2px;
}

#typing-text {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.typing-cursor {
    display: inline-block;
    margin-left: 3px;
    color: var(--accent-primary);
    animation: blink 1s infinite;
    font-weight: 700;
}

@keyframes blink {
    0%, 49% {
        opacity: 1;
    }
    50%, 100% {
        opacity: 0;
    }
}

.hero-tagline {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 650px;
    line-height: 1.9;
    font-weight: 400;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.btn {
    padding: 1.1rem 2.8rem;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.05rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
    position: relative;
    overflow: hidden;
    border: none;
    cursor: pointer;
    letter-spacing: 0.3px;
    text-transform: none;
}

.btn-primary {
    background: var(--gradient-1);
    color: white;
    box-shadow: 0 6px 30px rgba(139, 92, 246, 0.5),
                0 2px 10px rgba(139, 92, 246, 0.3);
}

.btn-primary::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.6s ease, height 0.6s ease;
}

.btn-primary:active::after {
    width: 300px;
    height: 300px;
}

.btn-secondary {
    background: rgba(25, 25, 40, 0.5);
    color: var(--text-primary);
    border: 2px solid rgba(139, 92, 246, 0.3);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.glow-btn {
    position: relative;
}

.glow-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
    padding: 2px;
    background: var(--gradient-1);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: var(--transition);
}

.glow-btn:hover::before {
    opacity: 1;
}

.btn-primary:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 40px rgba(139, 92, 246, 0.7),
                0 0 30px rgba(139, 92, 246, 0.4);
}

.btn-primary i {
    transition: transform 0.3s ease;
}

.btn-primary:hover i {
    transform: translateX(5px);
}

.btn-secondary:hover {
    background: rgba(139, 92, 246, 0.15);
    border-color: var(--accent-primary);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 40px rgba(139, 92, 246, 0.4),
                0 0 30px rgba(139, 92, 246, 0.2);
}

.btn-secondary i {
    transition: transform 0.3s ease;
}

.btn-secondary:hover i {
    transform: translateX(5px);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-icon {
    width: 52px;
    height: 52px;
    background: rgba(25, 25, 40, 0.6);
    backdrop-filter: blur(20px);
    border: 2px solid var(--border-glass);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.3rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.social-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-1);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.social-icon:hover {
    transform: translateY(-6px) scale(1.1) rotate(5deg);
    border-color: var(--accent-primary);
    box-shadow: 0 10px 35px rgba(139, 92, 246, 0.6),
                0 0 25px rgba(139, 92, 246, 0.4);
}

.social-icon:hover::before {
    opacity: 0.15;
}

/* Hero Floating Icons */
.hero-decoration {
    position: relative;
    height: 500px;
}

.floating-icon {
    position: absolute;
    width: 80px;
    height: 80px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    animation: float 6s ease-in-out infinite;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.floating-icon i {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.icon-1 { top: 0; left: 20%; animation-delay: 0s; }
.icon-2 { top: 15%; right: 10%; animation-delay: -1s; }
.icon-3 { top: 45%; left: 5%; animation-delay: -2s; }
.icon-4 { top: 40%; right: 20%; animation-delay: -3s; }
.icon-5 { bottom: 15%; left: 25%; animation-delay: -4s; }
.icon-6 { bottom: 5%; right: 5%; animation-delay: -5s; }

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-20px) rotate(5deg); }
    50% { transform: translateY(-10px) rotate(-5deg); }
    75% { transform: translateY(-25px) rotate(3deg); }
}

/* Animated Code Window */
.code-window {
    position: absolute;
    bottom: 50px;
    right: 0;
    width: 450px;
    background: rgba(13, 17, 23, 0.95);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
                0 0 40px rgba(139, 92, 246, 0.2);
    border: 1px solid rgba(139, 92, 246, 0.2);
    backdrop-filter: blur(20px);
    z-index: 10;
}

.code-window-header {
    background: rgba(30, 30, 40, 0.9);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(139, 92, 246, 0.1);
}

.window-dots {
    display: flex;
    gap: 8px;
}

.window-dots .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot-red {
    background: #ff5f56;
    box-shadow: 0 0 10px rgba(255, 95, 86, 0.6);
}

.dot-yellow {
    background: #ffbd2e;
    box-shadow: 0 0 10px rgba(255, 189, 46, 0.6);
}

.dot-green {
    background: #27c93f;
    box-shadow: 0 0 10px rgba(39, 201, 63, 0.6);
}

.window-title {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    font-family: 'JetBrains Mono', monospace;
}

.code-window-body {
    padding: 20px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.8;
    color: #e6edf3;
    position: relative;
    min-height: 200px;
}

.code-line {
    opacity: 0;
    animation: typeLine 0.5s ease-out forwards;
    white-space: pre;
}

.code-line:nth-child(1) { animation-delay: 0.5s; }
.code-line:nth-child(2) { animation-delay: 1s; }
.code-line:nth-child(3) { animation-delay: 1.5s; }
.code-line:nth-child(4) { animation-delay: 2s; }
.code-line:nth-child(5) { animation-delay: 2.5s; }
.code-line:nth-child(6) { animation-delay: 3s; }

@keyframes typeLine {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.code-cursor {
    position: absolute;
    width: 2px;
    height: 18px;
    background: #8b5cf6;
    animation: blinkCursor 1s infinite;
    bottom: 20px;
    left: 32px;
}

@keyframes blinkCursor {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.code-keyword {
    color: #ff7b72;
}

.code-variable {
    color: #79c0ff;
}

.code-operator {
    color: #ff7b72;
}

.code-bracket {
    color: #ffa657;
}

.code-property {
    color: #7ee787;
}

.code-string {
    color: #a5d6ff;
}

.code-punctuation {
    color: #c9d1d9;
}

/* Section Styles */
section {
    padding: 8rem 0;
    position: relative;
    z-index: 1;
}

section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1400px;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(139, 92, 246, 0.3) 50%, 
        transparent
    );
}

.section-title {
    font-size: 3.5rem;
    font-weight: 900;
    text-align: center;
    margin-bottom: 5rem;
    letter-spacing: -0.03em;
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 5px;
    background: var(--gradient-1);
    border-radius: 3px;
}

/* About Section */
.about {
    background: var(--bg-secondary);
}

.about-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 3rem;
    align-items: start;
}

.about-text p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 1.8rem;
    line-height: 1.7;
    font-weight: 400;
}

.skills-summary {
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
    margin-top: 1.8rem;
}

.skill-category h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 700;
}

.skill-category h3 i {
    color: var(--accent-primary);
    font-size: 1.3rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.skill-tag {
    background: rgba(139, 92, 246, 0.15);
    color: var(--accent-secondary);
    padding: 0.6rem 1.2rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    border: 1px solid rgba(139, 92, 246, 0.3);
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background: rgba(139, 92, 246, 0.25);
    border-color: var(--accent-primary);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.focus-areas {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.focus-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    transition: var(--transition);
}

.focus-item i {
    font-size: 1.5rem;
    color: var(--accent-primary);
}

.focus-item:hover {
    transform: translateX(10px);
    border-color: var(--accent-primary);
}

.about-stats {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-1);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.stat-card:hover::before {
    opacity: 0.05;
}

.stat-card:hover {
    transform: translateX(12px) scale(1.02);
    border-color: var(--accent-primary);
    box-shadow: 0 10px 40px rgba(139, 92, 246, 0.5),
                0 0 25px rgba(139, 92, 246, 0.3);
}

.stat-card i {
    font-size: 3rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.2rem;
    position: relative;
    z-index: 1;
}

.stat-card h3 {
    font-size: 2.8rem;
    margin-bottom: 0.5rem;
    font-weight: 900;
    position: relative;
    z-index: 1;
}

.stat-card p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

/* Skills Section */
.tech-category {
    margin-bottom: 5rem;
}

.category-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 2.5rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 1rem;
    letter-spacing: -0.02em;
}

.category-title i {
    color: var(--accent-primary);
    font-size: 1.8rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.skill-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, var(--accent-primary), transparent 30%);
    animation: rotate 4s linear infinite;
    opacity: 0;
    transition: var(--transition);
}

.skill-card:hover::before {
    opacity: 0.1;
}

@keyframes rotate {
    to { transform: rotate(360deg); }
}

.skill-card:hover {
    transform: translateY(-12px) scale(1.03);
    border-color: var(--accent-primary);
    box-shadow: 0 20px 50px rgba(139, 92, 246, 0.6),
                0 0 40px rgba(139, 92, 246, 0.4),
                inset 0 0 30px rgba(139, 92, 246, 0.1);
}

.skill-card i {
    font-size: 3.8rem;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.skill-card i:not(.colored) {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.skill-card:hover i {
    transform: scale(1.15) rotate(5deg);
    filter: drop-shadow(0 0 20px currentColor);
}

.skill-card h4 {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
    font-weight: 700;
    letter-spacing: 0.3px;
}

/* Skill Progress Bars */
.skill-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.skill-progress {
    height: 100%;
    background: var(--gradient-1);
    width: 0%;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.6);
}

/* Projects Section */
.projects {
    background: var(--bg-secondary);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.project-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    padding: 2.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(139, 92, 246, 0.15), transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.project-card:hover::before {
    opacity: 1;
}

.project-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--accent-primary);
    box-shadow: 0 25px 70px rgba(139, 92, 246, 0.5),
                0 0 40px rgba(139, 92, 246, 0.35);
}

.project-icon {
    width: 70px;
    height: 70px;
    background: var(--gradient-1);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
    position: relative;
    z-index: 1;
}

.project-icon-2 {
    background: var(--gradient-2);
}

.project-icon-3 {
    background: var(--gradient-3);
}

.project-card:hover .project-icon {
    transform: rotate(10deg) scale(1.15);
    box-shadow: 0 15px 40px rgba(139, 92, 246, 0.7);
}

.project-icon i {
    font-size: 2rem;
    color: white;
}

.project-card h3 {
    font-size: 1.7rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 800;
    letter-spacing: -0.02em;
    position: relative;
    z-index: 1;
}

.project-card > p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
    font-size: 1rem;
    flex-grow: 1;
    position: relative;
    z-index: 1;
}

.project-tech-icons {
    display: flex;
    gap: 1.2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.project-tech-icons i {
    font-size: 2.2rem;
    transition: all 0.3s ease;
    opacity: 0.9;
}

.project-tech-icons i:hover {
    transform: scale(1.25) translateY(-3px);
    opacity: 1;
    filter: drop-shadow(0 6px 15px currentColor);
}

.btn-view-project {
    width: 100%;
    background: var(--gradient-1);
    color: white;
    padding: 1rem 1.8rem;
    border: none;
    border-radius: 14px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: auto;
    position: relative;
    z-index: 1;
    letter-spacing: 0.3px;
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.btn-view-project:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 35px rgba(139, 92, 246, 0.7),
                0 0 25px rgba(139, 92, 246, 0.5);
}

.btn-view-project i {
    transition: transform 0.3s ease;
}

.btn-view-project:hover i {
    transform: translateX(5px);
}

/* Project Flip Cards */
.project-flip-card {
    background: transparent;
    width: 100%;
    height: 420px;
    perspective: 1000px;
}

.project-flip-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.project-flip-card:hover .project-flip-inner {
    transform: rotateY(180deg);
}

.project-flip-front,
.project-flip-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 24px;
    padding: 2.5rem;
    border: 1px solid var(--border-glass);
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.project-flip-front {
    background: linear-gradient(135deg, 
        rgba(139, 92, 246, 0.05) 0%, 
        rgba(6, 182, 212, 0.05) 100%
    );
}

.project-flip-front::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(139, 92, 246, 0.15), transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.project-flip-card:hover .project-flip-front::before {
    opacity: 1;
}

.project-flip-back {
    background: linear-gradient(135deg, 
        rgba(139, 92, 246, 0.1) 0%, 
        rgba(6, 182, 212, 0.08) 100%
    );
    transform: rotateY(180deg);
    border: 1px solid rgba(139, 92, 246, 0.3);
    box-shadow: 0 25px 70px rgba(139, 92, 246, 0.4),
                0 0 40px rgba(139, 92, 246, 0.25);
}

.project-flip-front .project-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-1);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.5);
}

.project-flip-front .project-icon-2 {
    background: var(--gradient-2);
}

.project-flip-front .project-icon-3 {
    background: var(--gradient-3);
}

.project-flip-front .project-icon i {
    font-size: 2.5rem;
    color: white;
}

.project-flip-front h3,
.project-flip-back h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.project-flip-front p {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1rem;
    padding: 0 1rem;
}

.flip-tech-stack {
    margin-bottom: 2rem;
}

.flip-tech-stack h4 {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
}

.flip-tech-icons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.flip-tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.flip-tech-item:hover {
    transform: translateY(-5px);
}

.flip-tech-icons i {
    font-size: 3rem;
    transition: all 0.3s ease;
    filter: drop-shadow(0 4px 12px currentColor);
}

.flip-tech-item:hover i {
    transform: scale(1.15);
}

.flip-tech-item span {
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-align: center;
}

.flip-buttons {
    display: flex;
    gap: 1rem;
    margin-top: auto;
    width: 100%;
}

.flip-btn {
    flex: 1;
    padding: 0.9rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

.flip-btn-primary {
    background: var(--gradient-1);
    color: white;
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.flip-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(139, 92, 246, 0.7);
}

.flip-btn-secondary {
    background: rgba(139, 92, 246, 0.15);
    color: var(--accent-primary);
    border: 1px solid var(--accent-primary);
}

.flip-btn-secondary:hover {
    background: rgba(139, 92, 246, 0.25);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}


/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    padding: 3rem;
    max-width: 800px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 2.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    line-height: 1;
}

.modal-close:hover {
    color: var(--accent-primary);
    transform: rotate(90deg);
}

.modal-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-content h3 {
    color: var(--accent-secondary);
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.modal-content ul {
    list-style: none;
    padding-left: 0;
}

.modal-content li {
    color: var(--text-secondary);
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.modal-content li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--accent-primary);
    font-weight: 700;
}

/* Education Section */
.education-timeline {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.education-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    padding: 2.5rem;
    display: flex;
    gap: 2rem;
    align-items: center;
    transition: var(--transition);
}

.education-card:hover {
    transform: translateX(15px);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-glow);
}

.education-icon {
    width: 90px;
    height: 90px;
    background: var(--gradient-1);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.education-icon i {
    font-size: 3rem;
    color: white;
}

.education-content h3 {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.education-content h4 {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 0.7rem;
    font-weight: 500;
}

.education-status {
    color: var(--accent-secondary);
    font-weight: 700;
    font-size: 1rem;
}

/* Contact Section */
.contact {
    background: var(--bg-secondary);
}

.contact-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin-bottom: 3.5rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto 4rem;
}

.contact-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    padding: 3rem 2rem;
    text-align: center;
    transition: var(--transition);
}

.contact-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-glow);
}

.contact-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    transition: var(--transition);
}

.contact-card:hover .contact-icon {
    transform: rotate(360deg) scale(1.1);
}

.contact-icon i {
    font-size: 2.2rem;
    color: white;
}

.contact-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.contact-card a {
    color: var(--accent-secondary);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 600;
}

.contact-card a:hover {
    color: var(--accent-primary);
}

.contact-card p {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.contact-social {
    text-align: center;
    margin-top: 4rem;
}

.contact-social h3 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.social-links-large {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.social-link-large {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 1.5rem 3rem;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition);
}

.social-link-large i {
    font-size: 2rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.social-link-large:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-glow);
}

/* Footer */
.footer {
    background: var(--bg-primary);
    padding: 3rem 0;
    border-top: 1px solid var(--border-glass);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-logo {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 1rem;
}

.footer-logo .dot {
    color: var(--accent-primary);
}

.footer-left p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
    justify-content: flex-end;
    align-items: center;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 600;
}

.footer-links a:hover {
    color: var(--accent-primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-glass);
}

.footer-bottom p {
    color: var(--text-secondary);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Revealed state for optimized animations */
.revealed {
    animation: none !important;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-decoration {
        display: none;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .nav-container {
        padding: 0 2rem;
    }
    
    .nav-menu {
        gap: 2rem;
    }
    
    .logo-text {
        font-size: 1.1rem;
    }
    
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0 1.5rem;
    }

    .logo-text {
        display: none;
    }
    
    .logo-icon {
        width: 42px;
        height: 42px;
    }
    
    .logo-initial {
        font-size: 1rem;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 80px;
        flex-direction: column;
        background: rgba(10, 10, 15, 0.98);
        backdrop-filter: blur(30px);
        width: 100%;
        padding: 2rem 0;
        border-bottom: 1px solid var(--border-glass);
        transition: var(--transition);
        gap: 1rem;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(9px, 9px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(9px, -9px);
    }
    
    .hero-name {
        font-size: 3rem;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .code-window {
        display: none;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .education-card {
        flex-direction: column;
        text-align: center;
    }
    
    .modal-content {
        padding: 2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .hero-name {
        font-size: 2.2rem;
    }
    
    .hero-title {
        font-size: 1.4rem;
    }
    
    .hero-tagline {
        font-size: 1rem;
    }
    
    .btn {
        padding: 0.8rem 1.8rem;
        font-size: 0.95rem;
    }
    
    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .social-links-large {
        flex-direction: column;
    }
    
    .social-link-large {
        width: 100%;
        justify-content: center;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-secondary);
}
