/* ==================== 
   CSS Variables & Root 
==================== */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #8b5cf6;
    --accent: #ec4899;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    --dark-bg: #0f172a;
    --dark-surface: #1e293b;
    --dark-border: #334155;
    
    --light-bg: #f8fafc;
    --light-surface: #ffffff;
    --light-border: #e2e8f0;
    
    --text-dark: #1e293b;
    --text-light: #f8fafc;
    --text-muted: #64748b;
    
    --gradient: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
    
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
    --shadow-xl: 0 25px 50px -12px rgba(0,0,0,0.25);
    
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    
    --transition: all 0.3s ease;
}

[data-theme="dark"] {
    --bg: var(--dark-bg);
    --surface: var(--dark-surface);
    --border: var(--dark-border);
    --text: var(--text-light);
    --text-secondary: #94a3b8;
}

[data-theme="light"] {
    --bg: var(--light-bg);
    --surface: var(--light-surface);
    --border: var(--light-border);
    --text: var(--text-dark);
    --text-secondary: var(--text-muted);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    transition: var(--transition);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
}

/* ==================== 
   Text Gradient 
==================== */
.text-gradient {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==================== 
   Navbar 
==================== */
.navbar {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    z-index: 1000;
}

[data-theme="dark"] .navbar {
    background: rgba(15, 23, 42, 0.9);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 800;
}

.brand-text {
    color: var(--text);
}

.nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius);
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary) !important;
    background: rgba(99, 102, 241, 0.1);
}

.btn-theme {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.btn-theme:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ==================== 
   Hero Section 
==================== */
.hero-section {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    padding-top: 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: blobMove 20s infinite;
}

.blob-1 {
    width: 600px;
    height: 600px;
    background: var(--primary);
    top: -200px;
    right: -200px;
}

.blob-2 {
    width: 400px;
    height: 400px;
    background: var(--secondary);
    bottom: -100px;
    left: -100px;
    animation-delay: -5s;
}

.blob-3 {
    width: 300px;
    height: 300px;
    background: var(--accent);
    top: 50%;
    left: 50%;
    animation-delay: -10s;
}

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

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

#typed-text {
    color: var(--primary);
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.hero-stats {
    display: flex;
    gap: 3rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
}

.stat-label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.hero-image {
    position: relative;
    height: 400px;
}

.floating-icons {
    position: relative;
    width: 100%;
    height: 100%;
}

.float-icon {
    position: absolute;
    width: 60px;
    height: 60px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
    box-shadow: var(--shadow-lg);
    animation: float 6s ease-in-out infinite;
}

.float-icon:nth-child(1) { top: 10%; left: 20%; animation-delay: 0s; }
.float-icon:nth-child(2) { top: 30%; right: 10%; animation-delay: -1s; }
.float-icon:nth-child(3) { top: 60%; left: 10%; animation-delay: -2s; }
.float-icon:nth-child(4) { bottom: 20%; right: 20%; animation-delay: -3s; }
.float-icon:nth-child(5) { top: 50%; left: 50%; animation-delay: -4s; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
    animation: bounce 2s infinite;
}

.scroll-indicator i {
    display: block;
    margin-top: 0.5rem;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}

/* ==================== 
   Sections 
==================== */
.section {
    padding: 5rem 0;
}

.section-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.section-desc {
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto 3rem;
}

/* ==================== 
   Project Cards 
==================== */
.project-card {
    background: var(--surface);
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.project-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.project-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    opacity: 0;
    transition: var(--transition);
}

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

.project-content {
    padding: 1.5rem;
}

.project-category {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.project-title {
    font-weight: 700;
    margin: 0.5rem 0;
}

.project-tech {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ==================== 
   Skill Cards 
==================== */
.skill-card {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    text-align: center;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.skill-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.skill-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.skill-bar {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    margin-top: 0.75rem;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: var(--gradient);
    border-radius: 3px;
    transition: width 1s ease;
}

/* ==================== 
   CTA Section 
==================== */
.cta-section {
    padding: 3rem 0;
}

.cta-card {
    background: var(--gradient);
    padding: 3rem;
    border-radius: var(--radius-xl);
    color: white;
}

.cta-card h3 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.cta-card p {
    opacity: 0.9;
    margin: 0;
}

/* ==================== 
   Buttons 
==================== */
.btn-primary {
    background: var(--gradient);
    border: none;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: var(--radius);
    transition: var(--transition);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

.btn-outline-light {
    border: 2px solid var(--border);
    color: var(--text);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: var(--radius);
}

.btn-outline-light:hover {
    background: var(--surface);
    border-color: var(--primary);
    color: var(--primary);
}

/* ==================== 
   Footer 
==================== */
.footer {
    background: var(--dark-bg);
    color: var(--text-light);
    padding: 4rem 0 2rem;
}

.footer-brand {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.footer-desc {
    color: #94a3b8;
    max-width: 300px;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-link {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white !important;
    font-size: 1.1rem;
    transition: var(--transition);
}

.social-link i {
    color: white !important;
    font-size: 1.1rem;
    line-height: 1;
}

.social-link:hover {
    background: var(--secondary);
    transform: translateY(-3px);
    color: white !important;
}

.footer-title {
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: #94a3b8;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-contact {
    list-style: none;
}

.footer-contact li {
    color: #94a3b8;
    margin-bottom: 0.75rem;
}

.footer-contact i {
    color: var(--primary);
    margin-right: 0.75rem;
    width: 20px;
}

.footer-divider {
    border-color: rgba(255, 255, 255, 0.1);
    margin: 2rem 0;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom p {
    color: #94a3b8;
    margin: 0;
}

.footer-bottom-links {
    display: flex;
    gap: 1.5rem;
}

.footer-bottom-links a {
    color: #94a3b8;
    font-size: 0.875rem;
}

.footer-bottom-links a:hover {
    color: var(--primary);
}

/* ==================== 
   Responsive 
==================== */
@media (max-width: 768px) {
    .hero-stats {
        gap: 1.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .hero-buttons .btn {
        width: 100%;
        text-align: center;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .cta-card {
        padding: 2rem;
        text-align: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}