:root {
    --bg-main: #050507;
    --bg-surface: rgba(255, 255, 255, 0.03);
    --bg-surface-hover: rgba(255, 255, 255, 0.06);
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --accent-1: #6366f1;
    --accent-2: #a855f7;
    --accent-3: #ec4899;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.2);
    --font-main: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-main);
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    cursor: none; /* Custom cursor */
}

::selection { background: var(--accent-1); color: #fff; }

/* Custom Cursor */
.cursor-dot, .cursor-outline {
    position: fixed;
    top: 0; left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
}
.cursor-dot { width: 6px; height: 6px; background: var(--text-primary); }
.cursor-outline {
    width: 30px; height: 30px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}
.cursor-hover .cursor-outline {
    width: 50px; height: 50px;
    background-color: rgba(255, 255, 255, 0.05);
    border-color: transparent;
}

/* Loader */
#loader {
    position: fixed; inset: 0;
    background: var(--bg-main);
    z-index: 10000;
    display: flex; justify-content: center; align-items: center;
    transition: opacity 0.8s ease;
}
.loader-ring {
    width: 40px; height: 40px;
    border: 2px solid var(--border-color);
    border-top-color: var(--accent-1);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Background Effects */
.bg-orbs {
    position: fixed; inset: 0; z-index: -1; overflow: hidden;
}
.orb {
    position: absolute; border-radius: 50%; filter: blur(120px); opacity: 0.4;
    animation: float 20s infinite ease-in-out alternate;
}
.orb-1 { top: -10%; left: -10%; width: 40vw; height: 40vw; background: var(--accent-1); }
.orb-2 { bottom: -10%; right: -10%; width: 50vw; height: 50vw; background: var(--accent-2); animation-delay: -5s; }
.orb-3 { top: 40%; left: 60%; width: 30vw; height: 30vw; background: var(--accent-3); animation-delay: -10s; }

/* Layout & Utilities */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
section { padding: 120px 0; position: relative; }
.section-title {
    font-size: 2.5rem; font-weight: 700; margin-bottom: 1rem;
    background: linear-gradient(to right, #fff, var(--text-secondary));
    -webkit-background-clip: text; color: transparent;
}
.section-subtitle {
    color: var(--accent-1); font-size: 0.9rem; text-transform: uppercase;
    letter-spacing: 2px; font-weight: 600; margin-bottom: 0.5rem; display: block;
}

/* Reveal Animations */
.reveal { opacity: 0; transform: translateY(30px); transition: var(--transition-slow); will-change: opacity, transform; }
.reveal.active { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.1s; } .delay-2 { transition-delay: 0.2s; } .delay-3 { transition-delay: 0.3s; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 14px 28px; border-radius: 8px; font-weight: 500; font-size: 1rem;
    text-decoration: none; transition: var(--transition-fast); cursor: pointer; border: none;
    position: relative; overflow: hidden;
}
.btn-primary {
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    color: #fff; box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}
.btn-primary:hover { box-shadow: 0 8px 30px rgba(99, 102, 241, 0.5); transform: translateY(-2px); }
.btn-outline {
    background: var(--bg-surface); color: var(--text-primary);
    border: 1px solid var(--border-color); backdrop-filter: blur(10px);
}
.btn-outline:hover { background: var(--bg-surface-hover); border-color: var(--border-hover); transform: translateY(-2px); }

/* Glass Card */
.glass-card {
    background: var(--bg-surface); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color); border-radius: 16px; padding: 32px;
    transition: var(--transition-fast);
}
.glass-card:hover { background: var(--bg-surface-hover); border-color: var(--border-hover); transform: translateY(-5px); }

/* Navbar */
nav {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 100;
    padding: 20px 0; transition: var(--transition-fast);
}
nav.scrolled { background: rgba(5, 5, 7, 0.8); backdrop-filter: blur(12px); padding: 15px 0; border-bottom: 1px solid var(--border-color); }
.nav-content { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.5rem; font-weight: 800; color: #fff; text-decoration: none; letter-spacing: -0.5px; }
.logo span { color: var(--accent-1); }
.nav-links { display: flex; gap: 32px; }
.nav-links a { color: var(--text-secondary); text-decoration: none; font-size: 0.95rem; transition: color 0.2s; }
.nav-links a:hover { color: #fff; }

/* Hero Section */
.hero { min-height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; padding-top: 80px; }
.hero-badge {
    display: inline-block; padding: 6px 16px; border-radius: 100px;
    background: rgba(99, 102, 241, 0.1); border: 1px solid rgba(99, 102, 241, 0.2);
    color: var(--accent-1); font-size: 0.85rem; font-weight: 600; margin-bottom: 24px;
}
.hero h1 { font-size: clamp(3rem, 8vw, 5.5rem); font-weight: 800; line-height: 1.1; letter-spacing: -1px; margin-bottom: 24px; }
.text-gradient { background: linear-gradient(to right, #fff, #a1a1aa); -webkit-background-clip: text; color: transparent; }
.text-glow { background: linear-gradient(to right, var(--accent-1), var(--accent-2)); -webkit-background-clip: text; color: transparent; }
.hero p { font-size: clamp(1.1rem, 2vw, 1.25rem); color: var(--text-secondary); max-width: 600px; margin: 0 auto 40px; }
.hero-ctas { display: flex; justify-content: center; gap: 16px; }

/* About Section */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.about-text p { color: var(--text-secondary); font-size: 1.1rem; margin-bottom: 1.5rem; }
.about-visual { position: relative; border-radius: 24px; overflow: hidden; aspect-ratio: 4/5; background: var(--bg-surface); border: 1px solid var(--border-color); display: flex; align-items: center; justify-content: center; }
.code-snippet {
    font-family: monospace; color: var(--accent-1); font-size: 0.85rem; line-height: 1.8; opacity: 0.8;
}

/* Services Section */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; margin-top: 48px; }
.service-icon { width: 48px; height: 48px; border-radius: 12px; background: rgba(255,255,255,0.05); display: flex; align-items: center; justify-content: center; margin-bottom: 20px; font-size: 24px; }
.service-card h3 { font-size: 1.25rem; margin-bottom: 12px; }
.service-card p { color: var(--text-secondary); font-size: 0.95rem; }

/* Projects Section */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 32px; margin-top: 48px; }
.project-card { padding: 0; overflow: hidden; }
.project-img { height: 200px; background: linear-gradient(45deg, #18181b, #27272a); border-bottom: 1px solid var(--border-color); display: flex; align-items: center; justify-content: center; font-weight: bold; color: rgba(255,255,255,0.3); letter-spacing: 2px; }
.p-1 { background: linear-gradient(135deg, rgba(99,102,241,0.2), rgba(168,85,247,0.2)); }
.p-2 { background: linear-gradient(135deg, rgba(236,72,153,0.2), rgba(244,63,94,0.2)); }
.p-3 { background: linear-gradient(135deg, rgba(16,185,129,0.2), rgba(59,130,246,0.2)); }
.project-content { padding: 24px; }
.project-content h3 { margin-bottom: 8px; }
.project-content p { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 20px; }
.project-tags { display: flex; gap: 8px; margin-bottom: 20px; }
.tag { font-size: 0.75rem; padding: 4px 10px; border-radius: 100px; background: rgba(255,255,255,0.05); color: var(--text-secondary); border: 1px solid var(--border-color); }

/* Skills Section */
.skills-container { max-width: 800px; margin: 48px auto 0; }
.skill-item { margin-bottom: 24px; }
.skill-info { display: flex; justify-content: space-between; margin-bottom: 8px; font-weight: 500; font-size: 0.95rem; }
.skill-bar-bg { width: 100%; height: 6px; background: rgba(255,255,255,0.05); border-radius: 10px; overflow: hidden; }
.skill-bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent-1), var(--accent-2)); border-radius: 10px; width: 0; transition: width 1.5s cubic-bezier(0.22, 1, 0.36, 1); }

/* Contact Section */
.contact-wrapper { max-width: 600px; margin: 48px auto 0; }
.form-group { margin-bottom: 24px; position: relative; }
.form-control { width: 100%; padding: 16px; background: rgba(255,255,255,0.03); border: 1px solid var(--border-color); border-radius: 8px; color: #fff; font-family: inherit; font-size: 1rem; transition: var(--transition-fast); outline: none; }
.form-control:focus { border-color: var(--accent-1); background: rgba(255,255,255,0.05); }
textarea.form-control { resize: vertical; min-height: 120px; }
.contact-info { display: flex; justify-content: center; gap: 24px; margin-top: 48px; }
.contact-link { color: var(--text-secondary); text-decoration: none; font-size: 0.95rem; transition: color 0.2s; display: flex; align-items: center; gap: 8px; }
.contact-link:hover { color: #fff; }

#form-status { margin-top: 16px; font-size: 0.9rem; display: none; padding: 12px; border-radius: 8px; text-align: center; }
.status-success { background: rgba(16, 185, 129, 0.1); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.2); }
.status-error { background: rgba(239, 68, 68, 0.1); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.2); }

/* Footer */
footer { padding: 40px 0; border-top: 1px solid var(--border-color); text-align: center; color: var(--text-secondary); font-size: 0.9rem; margin-top: 80px; }

/* Animations */
@keyframes spin { 100% { transform: rotate(360deg); } }
@keyframes float { 0% { transform: translate(0, 0); } 100% { transform: translate(5%, 5%); } }

/* Responsive */
@media (max-width: 768px) {
    .about-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 2.5rem; }
    .hero-ctas { flex-direction: column; }
    .nav-links { display: none; }
    .cursor-dot, .cursor-outline { display: none; }
    body { cursor: auto; }
}