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

/* CSS Variables */
:root {
    /* Cyber-Premium Dark Theme (Default) */
    --bg-main: #0a0a0f;
    --bg-alt: #12121a;
    --text-main: #ffffff;
    --text-muted: #a0a0b0;
    --accent-primary: #00f0ff;
    --accent-secondary: #7000ff;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.05);
    --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition: all 0.3s ease-in-out;
}

[data-theme="light"] {
    --bg-main: #ffffff;
    --bg-alt: #f5f5f7;
    --text-main: #1a1a24;
    --text-muted: #555566;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.1);
    --shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none; /* Custom cursor */
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--transition), color var(--transition);
}

/* Typography */
h1, h2, h3, h4, .logo {
    font-family: var(--font-heading);
}

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

/* 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: 8px; height: 8px;
    background-color: var(--accent-primary);
}
.cursor-outline {
    width: 40px; height: 40px;
    border: 2px solid var(--accent-secondary);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}
.cursor-hover {
    width: 60px; height: 60px;
    background-color: rgba(0, 240, 255, 0.1);
}

/* Scroll Progress */
.scroll-progress {
    position: fixed;
    top: 0; left: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    width: 0%;
    z-index: 10000;
}

/* Loader */
#loader {
    position: fixed;
    inset: 0;
    background: var(--bg-main);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    transition: opacity 0.5s;
}
.spinner {
    width: 50px; height: 50px;
    border: 3px solid var(--glass-border);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Glassmorphism Utilities */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--shadow);
}
.glass-input {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 12px 20px;
    border-radius: 10px;
    outline: none;
    backdrop-filter: blur(5px);
}

/* Layout Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.section { padding: 100px 0; }
.bg-alt { background-color: var(--bg-alt); }
.auto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

/* Navbar */
.glass-nav {
    position: fixed;
    top: 0; width: 100%;
    z-index: 1000;
    padding: 20px 0;
    background: transparent;
    transition: var(--transition);
}
.glass-nav.sticky {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 15px 0;
}
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo { font-size: 24px; font-weight: 800; }
.logo .accent { color: var(--accent-primary); }
.nav-links {
    display: flex; gap: 30px; list-style: none;
}
.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}
.nav-links a:hover { color: var(--accent-primary); }
.nav-actions button {
    background: none; border: none;
    color: var(--text-main);
    font-size: 20px; margin-left: 15px;
}
.mobile-menu-btn { display: none; }

/* Buttons */
.btn {
    padding: 12px 28px;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    transition: var(--transition);
    display: inline-block;
}
.btn-primary {
    background: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary));
    color: #fff;
}
.btn-primary:hover { box-shadow: 0 0 20px rgba(0, 240, 255, 0.4); transform: translateY(-2px); }
.btn-outline {
    background: transparent;
    border: 1px solid var(--text-main);
    color: var(--text-main);
}
.btn-text { background: none; color: var(--accent-primary); font-weight: 600; border: none; padding: 0; margin-top: 15px; }

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.gradient-mesh {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 30%, rgba(0, 240, 255, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 80% 70%, rgba(112, 0, 255, 0.15) 0%, transparent 50%);
    animation: meshPulse 10s ease-in-out infinite alternate;
    z-index: 1;
}
@keyframes meshPulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}
.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 60px;
    max-width: 800px;
}
.hero-title { font-size: 3.5rem; margin-bottom: 20px; line-height: 1.2; }
.hero-subtitle { font-size: 1.2rem; color: var(--text-muted); margin-bottom: 40px; }
.hero-cta { display: flex; gap: 20px; justify-content: center; }

/* About Stats */
.founder-image-placeholder {
    height: 400px;
    display: flex; align-items: center; justify-content: center;
    color: var(--accent-primary);
}
.stats-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 30px;
}
.stat-box { padding: 20px; text-align: center; }
.stat-box h3 { font-size: 2.5rem; color: var(--accent-primary); }

/* Services */
.service-card {
    padding: 30px;
    transition: var(--transition);
}
.service-card i { font-size: 2rem; color: var(--accent-primary); margin-bottom: 20px; }
.service-card:hover { transform: translateY(-10px); }

/* Tech Showcase (3D Tilt) */
.tech-showcase { display: flex; gap: 30px; flex-wrap: wrap; justify-content: center; }
.tech-card {
    padding: 40px;
    width: 350px;
    transform-style: preserve-3d;
    perspective: 1000px;
}

/* Skills Progress */
.skills-container { padding: 40px; }
.skill-bar { margin-bottom: 20px; }
.progress-wrapper {
    height: 8px; background: var(--glass-border); border-radius: 4px; overflow: hidden; margin-top: 8px;
}
.progress {
    height: 100%; background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    width: 0; transition: width 1.5s ease;
}

/* Portfolio */
.portfolio-controls { display: flex; justify-content: space-between; margin-bottom: 30px; flex-wrap: wrap; gap: 20px; }
.filter-btn {
    background: transparent; border: 1px solid var(--glass-border); color: var(--text-main);
    padding: 8px 20px; border-radius: 20px; transition: var(--transition);
}
.filter-btn.active, .filter-btn:hover { background: var(--accent-primary); color: #000; border-color: var(--accent-primary); }
.portfolio-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.portfolio-item { padding: 30px; text-align: center; transition: var(--transition); }
.portfolio-img { height: 150px; display: flex; align-items: center; justify-content: center; color: var(--text-muted); }

/* AI Chat */
.ai-chat { height: 400px; display: flex; flex-direction: column; overflow: hidden; }
.chat-header { padding: 15px; border-bottom: 1px solid var(--glass-border); font-weight: bold; }
.chat-messages { flex: 1; padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 15px; }
.msg { padding: 10px 15px; border-radius: 15px; max-width: 80%; }
.msg.bot { background: rgba(0, 240, 255, 0.1); align-self: flex-start; }
.msg.user { background: rgba(112, 0, 255, 0.2); align-self: flex-end; }
.chat-input { display: flex; padding: 15px; border-top: 1px solid var(--glass-border); }
.chat-input input { flex: 1; background: transparent; border: none; color: var(--text-main); outline: none; }
.chat-input button { background: none; border: none; color: var(--accent-primary); }

/* Footer & Watermark */
.footer { border-top: 1px solid var(--glass-border); padding-top: 60px; }
.footer-grid { margin-bottom: 40px; }
.footer ul { list-style: none; }
.footer ul li a { color: var(--text-muted); text-decoration: none; }
.footer-bottom {
    text-align: center; padding: 20px; border-top: 1px solid var(--glass-border); color: var(--text-muted);
}
.watermark { font-weight: bold; color: var(--accent-primary); margin-top: 10px; letter-spacing: 1px; }

/* Utilities & Animations */
.section-reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.8s, transform 0.8s; }
.section-reveal.visible { opacity: 1; transform: translateY(0); }

#back-to-top, #fab {
    position: fixed; right: 30px; width: 50px; height: 50px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    border: none; color: var(--text-main); opacity: 0; pointer-events: none; transition: var(--transition); z-index: 999;
}
#back-to-top { bottom: 30px; background: var(--glass-bg); backdrop-filter: blur(10px); border: 1px solid var(--glass-border); }
#back-to-top.visible { opacity: 1; pointer-events: auto; }
#fab { bottom: 90px; background: var(--accent-primary); color: #000; opacity: 1; pointer-events: auto; }

.notification {
    position: fixed; top: 20px; right: 20px; background: var(--glass-bg); backdrop-filter: blur(15px);
    padding: 15px 25px; border-radius: 10px; border-left: 4px solid var(--accent-primary);
    color: var(--text-main); z-index: 10000; animation: slideIn 0.3s forwards;
}
@keyframes slideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none; position: absolute; top: 100%; left: 0; width: 100%;
        background: var(--bg-main); flex-direction: column; padding: 20px; text-align: center;
    }
    .nav-links.active { display: flex; }
    .mobile-menu-btn { display: block; }
    .hero-title { font-size: 2.5rem; }
    .cursor-dot, .cursor-outline { display: none; }
    * { cursor: auto; }
}