/* ============================================
   SHIHAB UDDIN - Premium Portfolio Styles
   Eye-catching, Professional, Modern
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

/* ==========================================
   CSS Custom Properties - Design System
   ========================================== */
:root {
    --bg-primary: #050816;
    --bg-secondary: #0a0f29;
    --bg-tertiary: #111633;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-accent: #64748b;
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-tertiary: #06b6d4;
    --accent-pink: #ec4899;
    --accent-emerald: #10b981;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;

    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-aurora: linear-gradient(135deg, #667eea 0%, #764ba2 30%, #f093fb 60%, #4facfe 100%);
    --gradient-neon: linear-gradient(135deg, #00ff87 0%, #60efff 50%, #ff00ea 100%);

    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;
    --spacing-4xl: 6rem;

    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-3xl: 2rem;
    --radius-full: 9999px;

    --shadow-glow-indigo: 0 0 30px rgba(99, 102, 241, 0.4);
    --shadow-glow-purple: 0 0 30px rgba(139, 92, 246, 0.4);
    --shadow-glow-cyan: 0 0 30px rgba(6, 182, 212, 0.4);
    --shadow-glow-pink: 0 0 30px rgba(236, 72, 153, 0.4);

    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    /* Height used to offset content from the fixed navigation */
    --nav-height: 72px;
}

/* ==========================================
   Base Styles
   ========================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

::selection {
    background: rgba(99, 102, 241, 0.4);
    color: #fff;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 400;
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--bg-primary);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================
   Noise Texture Overlay
   ========================================== */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
    opacity: 0.018;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ==========================================
   Custom Cursor (Desktop Only)
   ========================================== */
.cursor-glow {
    position: fixed;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9997;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.07) 0%, rgba(139, 92, 246, 0.03) 30%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
    mix-blend-mode: screen;
}

.cursor-dot {
    position: fixed;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    background: var(--accent-primary);
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s, background 0.2s;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.6);
}

.cursor-dot.hovering {
    width: 36px;
    height: 36px;
    background: rgba(99, 102, 241, 0.12);
    border: 2px solid var(--accent-primary);
}

/* ==========================================
   Aurora / Animated Backgrounds
   ========================================== */
.aurora-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
}

.aurora-bg::before,
.aurora-bg::after {
    content: '';
    position: absolute;
    width: 150%;
    height: 150%;
    border-radius: 50%;
    animation: auroraMove 15s ease-in-out infinite alternate;
}

.aurora-bg::before {
    top: -50%;
    left: -25%;
    background: radial-gradient(ellipse at center,
        rgba(99, 102, 241, 0.15) 0%,
        rgba(139, 92, 246, 0.06) 30%,
        transparent 70%);
    animation-duration: 20s;
}

.aurora-bg::after {
    bottom: -50%;
    right: -25%;
    background: radial-gradient(ellipse at center,
        rgba(236, 72, 153, 0.1) 0%,
        rgba(6, 182, 212, 0.05) 30%,
        transparent 70%);
    animation-duration: 25s;
    animation-direction: alternate-reverse;
}

@keyframes auroraMove {
    0% { transform: translate(0, 0) rotate(0deg) scale(1); }
    33% { transform: translate(5%, -5%) rotate(3deg) scale(1.05); }
    66% { transform: translate(-3%, 3%) rotate(-2deg) scale(0.98); }
    100% { transform: translate(2%, -2%) rotate(1deg) scale(1.02); }
}

/* Floating Orbs */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    animation: orbFloat 20s ease-in-out infinite;
    pointer-events: none;
}

.orb-1 {
    width: 400px;
    height: 400px;
    top: 10%;
    left: 10%;
    background: rgba(99, 102, 241, 0.15);
    animation-duration: 20s;
}

.orb-2 {
    width: 350px;
    height: 350px;
    top: 60%;
    right: 10%;
    background: rgba(236, 72, 153, 0.1);
    animation-delay: -5s;
    animation-duration: 25s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    bottom: 10%;
    left: 30%;
    background: rgba(6, 182, 212, 0.1);
    animation-delay: -10s;
    animation-duration: 22s;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(60px, -40px) scale(1.1); }
    50% { transform: translate(-30px, 60px) scale(0.95); }
    75% { transform: translate(40px, 30px) scale(1.05); }
}

/* Grid Pattern Overlay */
.grid-pattern {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

/* Star particles for hero */
.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    animation: particleTwinkle var(--duration, 3s) ease-in-out var(--delay, 0s) infinite;
}

@keyframes particleTwinkle {
    0%, 100% { opacity: 0; transform: scale(0); }
    50% { opacity: 0.7; transform: scale(1); }
}

/* ==========================================
   Glassmorphism
   ========================================== */
.glass {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.glass-dark {
    background: rgba(5, 8, 22, 0.8);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.glass-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* ==========================================
   Loading Animation
   ========================================== */
#loader {
    background: var(--bg-primary);
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loader-circle {
    width: 64px;
    height: 64px;
    border: 3px solid rgba(99, 102, 241, 0.1);
    border-top: 3px solid var(--accent-primary);
    border-right: 3px solid var(--accent-secondary);
    border-radius: 50%;
    animation: loaderSpin 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
    position: relative;
}

.loader-circle::before {
    content: '';
    position: absolute;
    top: 6px; left: 6px; right: 6px; bottom: 6px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top: 2px solid var(--accent-pink);
    border-left: 2px solid var(--accent-tertiary);
    animation: loaderSpin 1.5s linear infinite reverse;
}

.loader-circle::after {
    content: '';
    position: absolute;
    top: 14px; left: 14px; right: 14px; bottom: 14px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-bottom: 2px solid var(--accent-emerald);
    animation: loaderSpin 2s linear infinite;
}

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

/* ==========================================
   Scroll Progress Bar
   ========================================== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: transparent;
    z-index: 10000;
}

.scroll-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary), var(--accent-pink), var(--accent-tertiary));
    background-size: 300% 100%;
    animation: gradientShift 3s ease infinite;
    width: 0%;
    transition: width 0.1s ease;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5), 0 0 30px rgba(99, 102, 241, 0.2);
}

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

/* ==========================================
   Navigation
   ========================================== */
nav.glass-dark {
    transition: all 0.4s ease;
}

nav.glass-dark.scrolled {
    background: rgba(5, 8, 22, 0.95);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* ==========================================
   Fixed Nav Offset Helpers
   Ensure the fixed navigation does not cover page content
   ========================================== */
body {
    padding-top: var(--nav-height);
    scroll-padding-top: var(--nav-height);
}

/* Give in-page anchors and sections a comfortable top offset when scrolled-to */
section {
    scroll-margin-top: calc(var(--nav-height) + 12px);
}

@media (max-width: 768px) {
    /* mobile: allow extra space for taller mobile nav / expanded menu */
    body {
        padding-top: calc(var(--nav-height) + 24px);
        scroll-padding-top: calc(var(--nav-height) + 24px);
    }
    section {
        scroll-margin-top: calc(var(--nav-height) + 36px);
    }
}

.nav-link {
    position: relative;
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    transition: all var(--transition-normal);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
    text-decoration: none;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    transition: all var(--transition-normal);
    transform: translateX(-50%);
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
    opacity: 0;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(99, 102, 241, 0.08);
}

.nav-link:hover::after {
    width: 80%;
    opacity: 1;
}

/* ==========================================
   Animation System
   ========================================== */
.fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-80px);
    transition: all 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(80px);
    transition: all 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.scale-in {
    opacity: 0;
    transform: scale(0.85);
    transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

.bounce-in {
    opacity: 0;
    transform: scale(0.8);
    animation: premiumBounceIn 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

@keyframes premiumBounceIn {
    0% { opacity: 0; transform: scale(0.8) translateY(20px); }
    50% { opacity: 0.8; transform: scale(1.05) translateY(-5px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* Staggered Children */
.stagger-children > * {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0.05s; }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.1s; }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.15s; }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.2s; }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.25s; }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.3s; }
.stagger-children.visible > *:nth-child(7) { transition-delay: 0.35s; }
.stagger-children.visible > *:nth-child(8) { transition-delay: 0.4s; }
.stagger-children.visible > *:nth-child(9) { transition-delay: 0.45s; }
.stagger-children.visible > *:nth-child(10) { transition-delay: 0.5s; }

.stagger-children.visible > * {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================
   Hover Effects
   ========================================== */
.hover-scale {
    transition: all var(--transition-normal) cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.hover-scale:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), var(--shadow-glow-indigo);
}

.hover-rotate {
    transition: transform var(--transition-normal) cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-rotate:hover {
    transform: rotate(3deg) scale(1.03);
}

/* ==========================================
   Typography
   ========================================== */
.hero-title {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: clamp(2.8rem, 6vw, 5rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

.hero-title .gradient-text {
    background: linear-gradient(135deg, #818cf8 0%, #a78bfa 25%, #c084fc 50%, #e879f9 75%, #818cf8 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textGradientShift 4s ease infinite;
}

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

.hero-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-2xl);
    letter-spacing: 0.01em;
}

.section-title {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: clamp(2.2rem, 4vw, 3.2rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--spacing-3xl);
    position: relative;
    letter-spacing: -0.02em;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary), var(--accent-pink));
    border-radius: var(--radius-full);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}

.text-gradient {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary), var(--accent-pink));
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textGradientShift 4s ease infinite;
}

.code-accent {
    font-family: 'JetBrains Mono', monospace;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-sm);
    padding: 0.1em 0.4em;
    font-size: 0.9em;
    color: var(--accent-primary);
}

/* ==========================================
   Buttons
   ========================================== */
.modern-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 2rem;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: all var(--transition-normal);
    overflow: hidden;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    letter-spacing: 0.02em;
    z-index: 1;
}

.modern-btn::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.6s ease;
    z-index: -1;
}

.modern-btn::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary), var(--accent-pink));
    z-index: -2;
    opacity: 0;
    transition: opacity var(--transition-normal);
    filter: blur(12px);
}

.modern-btn:hover::before {
    left: 100%;
}

.modern-btn:hover::after {
    opacity: 1;
}

.modern-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.4);
}

.modern-btn:active {
    transform: translateY(-1px);
}

/* ==========================================
   Social Icons
   ========================================== */
.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    font-size: 1.2rem;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.social-icon::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-normal);
    border-radius: inherit;
}

.social-icon:hover {
    border-color: transparent;
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow-indigo);
    color: white;
}

.social-icon:hover::before {
    opacity: 1;
}

.social-icon i {
    position: relative;
    z-index: 1;
}

/* ==========================================
   Profile Image Rotating Border
   ========================================== */
.profile-image-container {
    position: relative;
    display: inline-block;
    border-radius: 50%;
    padding: 4px;
}

.profile-image-container > div {
    border-radius: 50%;
    overflow: hidden;
}

.profile-image-container::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: conic-gradient(from 0deg,
        var(--accent-primary),
        var(--accent-secondary),
        var(--accent-pink),
        var(--accent-tertiary),
        var(--accent-primary));
    animation: profileBorderRotate 4s linear infinite;
    z-index: -1;
}

.profile-image-container::after {
    content: '';
    position: absolute;
    inset: -12px;
    border-radius: 50%;
    background: conic-gradient(from 0deg,
        transparent 0%, rgba(99, 102, 241, 0.15) 20%,
        transparent 40%, rgba(236, 72, 153, 0.15) 60%,
        transparent 80%);
    animation: profileBorderRotate 8s linear infinite reverse;
    z-index: -2;
    filter: blur(8px);
}

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

/* ==========================================
   Stat Cards
   ========================================== */
.stat-card {
    position: relative;
    text-align: center;
    padding: 1.5rem;
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px);
    transition: all var(--transition-normal);
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.5s ease;
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(99, 102, 241, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2), 0 0 20px rgba(99, 102, 241, 0.1);
}

.stat-number {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
}

/* ==========================================
   Project Cards
   ========================================== */
.project-card {
    position: relative;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
    border-radius: var(--radius-2xl);
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(255, 255, 255, 0.06);
    height: 100%;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary), var(--accent-pink));
    transform: scaleX(0);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: left;
    z-index: 2;
}

.project-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(99, 102, 241, 0.03) 100%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.project-card:hover {
    transform: translateY(-12px);
    border-color: rgba(99, 102, 241, 0.2);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3), 0 0 50px rgba(99, 102, 241, 0.1);
}

.project-card:hover::before {
    transform: scaleX(1);
}

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

.project-card .project-image {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ==========================================
   Skill Cards
   ========================================== */
.skill-card {
    position: relative;
    padding: 0.6rem 1.2rem;
    font-weight: 500;
    font-size: 0.85rem;
    text-align: center;
    color: var(--text-secondary);
    transition: all var(--transition-normal);
    border-radius: var(--radius-lg);
    background: rgba(99, 102, 241, 0.06);
    border: 1px solid rgba(99, 102, 241, 0.1);
    overflow: hidden;
}

.skill-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-normal);
    border-radius: inherit;
}

.skill-card:hover {
    color: white;
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-glow-indigo);
    border-color: transparent;
}

.skill-card:hover::before {
    opacity: 1;
}

.skill-card span {
    position: relative;
    z-index: 1;
}

/* Skill Category */
.skill-category {
    position: relative;
    border-radius: var(--radius-2xl);
    padding: 2rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.skill-category::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(99, 102, 241, 0.06), transparent);
    animation: skillCategoryRotate 6s linear infinite;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.skill-category:hover::before {
    opacity: 1;
}

.skill-category:hover {
    transform: translateY(-6px);
    border-color: rgba(99, 102, 241, 0.15);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

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

.skill-category-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin: 0 auto 1rem;
    position: relative;
    z-index: 1;
}

/* ==========================================
   Contact Cards
   ========================================== */
.contact-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all var(--transition-normal);
    overflow: hidden;
}

.contact-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--gradient-primary);
    transform: scaleY(0);
    transition: transform var(--transition-normal);
    border-radius: 0 2px 2px 0;
}

.contact-card:hover {
    background: rgba(99, 102, 241, 0.05);
    border-color: rgba(99, 102, 241, 0.15);
    transform: translateX(8px);
}

.contact-card:hover::before {
    transform: scaleY(1);
}

.contact-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* ==========================================
   Form Styling
   ========================================== */
.modern-input {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    padding: 0.85rem 1.25rem;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all var(--transition-normal);
    backdrop-filter: blur(10px);
    width: 100%;
}

.modern-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1), 0 0 20px rgba(99, 102, 241, 0.1);
    background: rgba(255, 255, 255, 0.05);
}

.modern-input::placeholder {
    color: var(--text-accent);
}

/* ==========================================
   Filter Buttons
   ========================================== */
.filter-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.7rem 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.filter-btn:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.3);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

/* ==========================================
   Timeline / Experience
   ========================================== */
.timeline-item {
    position: relative;
    padding-left: 3rem;
    padding-bottom: 2.5rem;
    border-left: 2px solid rgba(255, 255, 255, 0.06);
    margin-left: 1rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
    border-left-color: transparent;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent-primary), transparent);
    opacity: 0.3;
}

.timeline-item:last-child::before {
    display: none;
}

.timeline-dot {
    position: absolute;
    left: -1.25rem;
    top: 0.5rem;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3), 0 0 40px rgba(99, 102, 241, 0.1);
    z-index: 2;
    border: 3px solid var(--bg-primary);
}

.timeline-dot::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    background: inherit;
    opacity: 0.15;
    filter: blur(6px);
    z-index: -1;
}

.timeline-item .gradient-border {
    margin-left: 0.5rem;
}

.timeline-item:hover .timeline-dot {
    transform: scale(1.15);
    transition: transform 0.3s ease;
}

.timeline-item .gradient-border .glass-card {
    transition: all 0.3s ease;
}

.timeline-item:hover .gradient-border .glass-card {
    border-color: rgba(99, 102, 241, 0.15);
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.08);
}

/* ==========================================
   Animated Gradient Border
   ========================================== */
.gradient-border {
    position: relative;
    border-radius: var(--radius-2xl);
    overflow: hidden;
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 1.5px;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary), var(--accent-pink), var(--accent-tertiary));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    background-size: 300% 300%;
    animation: borderGradientShift 4s ease infinite;
    pointer-events: none;
}

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

/* ==========================================
   Marquee / Ticker
   ========================================== */
.marquee-container {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-track {
    display: inline-flex;
    animation: marqueeScroll 30s linear infinite;
    gap: 1.5rem;
}

.marquee-track:hover {
    animation-play-state: paused;
}

@keyframes marqueeScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.marquee-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    transition: all var(--transition-normal);
}

.marquee-item:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.2);
    color: var(--text-primary);
}

/* ==========================================
   Floating Shapes
   ========================================== */
.floating-shape {
    position: absolute;
    pointer-events: none;
    opacity: 0.04;
}

.floating-shape.shape-1 {
    width: 300px; height: 300px;
    border: 2px solid var(--accent-primary);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation: floatShape1 20s ease-in-out infinite;
}

.floating-shape.shape-2 {
    width: 200px; height: 200px;
    border: 2px solid var(--accent-secondary);
    border-radius: 50%;
    animation: floatShape2 25s ease-in-out infinite;
}

.floating-shape.shape-3 {
    width: 150px; height: 150px;
    border: 2px solid var(--accent-pink);
    transform: rotate(45deg);
    animation: floatShape3 18s ease-in-out infinite;
}

@keyframes floatShape1 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(30px, -50px) rotate(90deg); }
    50% { transform: translate(-20px, 30px) rotate(180deg); }
    75% { transform: translate(50px, 20px) rotate(270deg); }
}

@keyframes floatShape2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-40px, -30px) scale(1.1); }
    66% { transform: translate(30px, 40px) scale(0.9); }
}

@keyframes floatShape3 {
    0%, 100% { transform: rotate(45deg) translate(0, 0); }
    33% { transform: rotate(45deg) translate(50px, -30px); }
    66% { transform: rotate(45deg) translate(-30px, 50px); }
}

/* ==========================================
   Typewriter Cursor
   ========================================== */
.typewriter-text::after {
    content: '|';
    color: var(--accent-primary);
    animation: cursorBlink 1s ease infinite;
    margin-left: 2px;
    font-weight: 300;
}

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

/* ==========================================
   Glow / Pulse Effects
   ========================================== */
.glow-pulse {
    animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 5px rgba(99, 102, 241, 0.3); }
    50% { box-shadow: 0 0 25px rgba(99, 102, 241, 0.6), 0 0 50px rgba(99, 102, 241, 0.2); }
}

/* ==========================================
   Badge
   ========================================== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.badge-available {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--accent-emerald);
}

/* ==========================================
   Tech Badge for project cards
   ========================================== */
.tech-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: all var(--transition-fast);
    border: 1px solid;
}

.tech-badge:hover {
    transform: translateY(-1px);
}

/* ==========================================
   Counter
   ========================================== */
.counter {
    display: inline-block;
    font-variant-numeric: tabular-nums;
}

/* ==========================================
   Footer
   ========================================== */
.footer-section {
    position: relative;
}

.footer-section::before {
    content: '';
    position: absolute;
    top: -80px;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.5));
    pointer-events: none;
}

/* Enhanced Footer Layout */
.footer-grid {
    align-items: start;
}

.footer-brand .newsletter-input {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    color: var(--text-primary);
    padding: 0.6rem 0.9rem;
    border-radius: 0.6rem;
    min-width: 0;
    flex: 1 1 auto;
}

.newsletter-btn {
    padding: 0.55rem 0.9rem;
    border-radius: 0.6rem;
    font-size: 0.9rem;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    border: none;
    box-shadow: 0 6px 20px rgba(99,102,241,0.18);
}

.footer-links a {
    display: inline-block;
}

.footer-contact .social-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
}

.footer-bottom {
    gap: 0.75rem;
}

.footer-brand img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* subtle top-divider decorative line */
.footer-section::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 0;
    width: 80%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.03), transparent);
    pointer-events: none;
}

/* ==========================================
   Responsive
   ========================================== */
@media (max-width: 768px) {
    :root {
        --spacing-xl: 1.5rem;
        --spacing-2xl: 2rem;
        --spacing-3xl: 2.5rem;
        --spacing-4xl: 3rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .cursor-glow, .cursor-dot {
        display: none !important;
    }

    .stat-number {
        font-size: 2rem;
    }

    .floating-shape {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
}

/* ==========================================
   Scrollbar
   ========================================== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--accent-secondary), var(--accent-pink));
}

/* ==========================================
   Loading State
   ========================================== */
body.loading * {
    animation-play-state: paused;
}
