/* ==========================================================================
   CSS VARIABLES & RESET
   ========================================================================== */
:root {
    /* Dark Theme (Default) */
    --bg-main: #0a0a0c;
    --bg-secondary: #121216;
    --text-primary: #ffffff;
    --text-secondary: #a0a0ab;
    --accent-1: #6366f1;
    --accent-2: #a855f7;
    --accent-gradient: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    
    --nav-bg: rgba(10, 10, 12, 0.7);
    --card-hover: rgba(255, 255, 255, 0.06);
    
    --font-main: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] {
    --bg-main: #f8fafc;
    --bg-secondary: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    
    --nav-bg: rgba(248, 250, 252, 0.8);
    --card-hover: rgba(0, 0, 0, 0.03);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-family: var(--font-main);
    color: var(--text-primary);
    background-color: var(--bg-main);
}

body {
    overflow-x: hidden;
    line-height: 1.6;
    cursor: none; /* Custom cursor */
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: inherit; cursor: none; }
input, textarea { font-family: inherit; }

/* ==========================================================================
   CUSTOM CURSOR
   ========================================================================== */
.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent-1);
}
.cursor-outline {
    width: 40px;
    height: 40px;
    border: 1px solid var(--accent-2);
}
.cursor-dot, .cursor-outline {
    position: fixed;
    top: 0; left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}
.cursor-hover {
    transform: translate(-50%, -50%) scale(1.5);
    background-color: rgba(99, 102, 241, 0.2);
    border-color: transparent;
}

/* ==========================================================================
   GLOBAL STYLES & GLASSMORPHISM
   ========================================================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 100px 0;
    position: relative;
    z-index: 10;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}
.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.section-header p { color: var(--text-secondary); font-size: 1.1rem; }

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 20px;
}
.card { padding: 2rem; transition: var(--transition-smooth); }
.card:hover { background: var(--card-hover); transform: translateY(-5px); }

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: 30px;
    font-weight: 600;
    transition: var(--transition-smooth);
    border: none;
    outline: none;
}
.btn-primary { background: var(--accent-gradient); color: #fff; }
.btn-primary:hover { box-shadow: 0 0 20px rgba(99, 102, 241, 0.5); }
.btn-secondary { background: var(--glass-bg); border: 1px solid var(--glass-border); color: var(--text-primary); }
.btn-secondary:hover { background: var(--card-hover); }
.btn-outline { background: transparent; border: 1px solid var(--accent-1); color: var(--accent-1); }
.btn-outline:hover { background: var(--accent-1); color: #fff; }
.btn-text { background: none; border: none; color: var(--accent-1); font-weight: 600; text-transform: uppercase; font-size: 0.8rem; letter-spacing: 1px; margin-top: 5px;}
.mt-1 { margin-top: 1.5rem; }
.w-100 { width: 100%; }

/* Background Orbs */
.bg-orbs { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; overflow: hidden; z-index: 1; pointer-events: none;}
.orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.4; animation: float 10s infinite alternate ease-in-out; }
.orb-1 { top: -10%; left: -10%; width: 500px; height: 500px; background: var(--accent-1); }
.orb-2 { bottom: -10%; right: -10%; width: 400px; height: 400px; background: var(--accent-2); animation-delay: -5s; }

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

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

/* ==========================================================================
   NAVIGATION
   ========================================================================== */
nav {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
    transition: var(--transition-smooth); padding: 1.5rem 0;
}
nav.scrolled {
    padding: 1rem 0;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
}
.nav-container { display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.logo { font-size: 1.5rem; font-weight: 800; letter-spacing: -1px; }
.logo span { color: var(--accent-1); }
.nav-links { display: flex; gap: 2rem; }
.nav-link { position: relative; font-weight: 500; color: var(--text-secondary); transition: var(--transition-smooth); }
.nav-link:hover, .nav-link.active { color: var(--text-primary); }
.nav-link::after {
    content: ''; position: absolute; bottom: -5px; left: 0;
    width: 0; height: 2px; background: var(--accent-gradient);
    transition: width 0.3s ease;
}
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

.nav-actions { display: flex; align-items: center; gap: 1rem; }
#theme-toggle { background: none; border: none; color: var(--text-primary); width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--glass-bg); border: 1px solid var(--glass-border); }
[data-theme="dark"] .sun-icon { display: block; }
[data-theme="dark"] .moon-icon { display: none; }
[data-theme="light"] .sun-icon { display: none; }
[data-theme="light"] .moon-icon { display: block; }

.hamburger { display: none; flex-direction: column; gap: 5px; cursor: none; }
.hamburger span { width: 25px; height: 2px; background: var(--text-primary); transition: 0.3s; }

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero { min-height: 100vh; display: flex; align-items: center; justify-content: space-between; padding: 0 10%; position: relative; z-index: 10;}
.hero-content { flex: 1; padding-right: 2rem; }
.badge { display: inline-block; padding: 0.4rem 1rem; border-radius: 20px; font-size: 0.8rem; font-weight: 600; background: rgba(99, 102, 241, 0.1); color: var(--accent-1); border: 1px solid rgba(99, 102, 241, 0.2); margin-bottom: 1.5rem; }
.hero-title { font-size: 4.5rem; line-height: 1.1; font-weight: 800; margin-bottom: 1rem; letter-spacing: -2px; }
.gradient-text { background: var(--accent-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-subtitle { font-size: 1.5rem; color: var(--text-secondary); margin-bottom: 1.5rem; font-weight: 400;}
.cursor { animation: blink 1s infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.hero-desc { color: var(--text-secondary); max-width: 500px; margin-bottom: 2.5rem; font-size: 1.1rem; }
.hero-buttons { display: flex; gap: 1rem; }

.hero-image { flex: 1; display: flex; justify-content: flex-end; }
.image-wrapper { width: 400px; height: 400px; border-radius: 30%; overflow: hidden; display: flex; align-items: center; justify-content: center; position: relative; padding: 1rem; animation: morph 8s ease-in-out infinite; }
.image-wrapper img { width: 100%; height: 100%; object-fit: cover; border-radius: 30%; }
@keyframes morph {
    0% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    50% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
    100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
}

.scroll-indicator { position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%); }
.mouse { width: 26px; height: 40px; border: 2px solid var(--text-secondary); border-radius: 20px; position: relative; }
.mouse::before { content: ''; position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 4px; height: 4px; background: var(--text-secondary); border-radius: 50%; animation: scroll 2s infinite; }
@keyframes scroll { 0% { transform: translate(-50%, 0); opacity: 1; } 100% { transform: translate(-50%, 15px); opacity: 0; } }

/* ==========================================================================
   ABOUT SECTION
   ========================================================================== */
.about-grid { display: grid; grid-template-columns: 3fr 2fr; gap: 2rem; }
.about-stats { display: flex; flex-direction: column; gap: 1.5rem; justify-content: center;}
.stat-item { text-align: center; padding: 1.5rem; background: rgba(255,255,255,0.02); border-radius: 15px; border: 1px solid var(--glass-border); }
.stat-item h4 { font-size: 2.5rem; color: var(--accent-1); margin-bottom: 0.5rem; }
.stat-item p { color: var(--text-secondary); font-size: 0.9rem; font-weight: 500; text-transform: uppercase; letter-spacing: 1px;}

/* ==========================================================================
   SKILLS SECTION
   ========================================================================== */
.skills-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.skill-card h4 { margin-bottom: 1.5rem; font-size: 1.2rem; }
.skill-bar { margin-bottom: 1.5rem; position: relative; }
.skill-name { display: block; margin-bottom: 0.5rem; font-size: 0.9rem; font-weight: 500; }
.skill-pct { position: absolute; right: 0; top: 0; font-size: 0.8rem; color: var(--accent-1); font-weight: 600;}
.skill-progress { height: 8px; background: var(--accent-gradient); border-radius: 4px; width: 0; transition: width 1.5s ease; position: absolute; bottom: -8px; left: 0;}
.skill-bar::after { content: ''; display: block; width: 100%; height: 8px; background: var(--glass-border); border-radius: 4px; position: absolute; bottom: -8px; left: 0; z-index: -1;}

/* ==========================================================================
   PORTFOLIO SECTION
   ========================================================================== */
.filter-container { display: flex; justify-content: center; gap: 1rem; margin-bottom: 3rem; }
.filter-btn { background: var(--glass-bg); border: 1px solid var(--glass-border); color: var(--text-primary); padding: 0.5rem 1.5rem; border-radius: 20px; transition: var(--transition-smooth); }
.filter-btn.active, .filter-btn:hover { background: var(--accent-1); color: #fff; border-color: var(--accent-1); }

.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.portfolio-card { display: flex; flex-direction: column; overflow: hidden; padding: 0; border-radius: 15px;}
.card-img-placeholder { height: 200px; background: linear-gradient(45deg, var(--bg-secondary), rgba(99, 102, 241, 0.2)); display: flex; align-items: center; justify-content: center; color: var(--text-secondary); font-weight: 500;}
.portfolio-content { padding: 1.5rem; }
.tags { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.tag { font-size: 0.7rem; padding: 0.2rem 0.8rem; background: rgba(99, 102, 241, 0.1); color: var(--accent-1); border-radius: 12px; }
.portfolio-content h3 { margin-bottom: 0.5rem; font-size: 1.2rem; }
.portfolio-content p { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 1.5rem; }
.portfolio-links { display: flex; gap: 1rem; margin-top: auto; }
.link { font-size: 0.9rem; font-weight: 600; color: var(--text-primary); transition: color 0.3s; }
.link:hover { color: var(--accent-1); }
.mix { display: flex; }

/* ==========================================================================
   EXPERIENCE TIMELINE
   ========================================================================== */
.timeline { position: relative; max-width: 800px; margin: 0 auto; }
.timeline::before { content: ''; position: absolute; top: 0; left: 20px; height: 100%; width: 2px; background: var(--glass-border); }
.timeline-item { position: relative; margin-bottom: 2rem; margin-left: 50px; padding: 2rem; border-radius: 15px; }
.timeline-dot { position: absolute; top: 2rem; left: -34px; width: 10px; height: 10px; background: var(--accent-1); border-radius: 50%; box-shadow: 0 0 10px var(--accent-1); }
.timeline-date { color: var(--accent-1); font-size: 0.9rem; font-weight: 600; margin-bottom: 0.5rem; }
.timeline-item h3 { font-size: 1.3rem; margin-bottom: 0.2rem; }
.timeline-item h4 { font-size: 1rem; color: var(--text-secondary); font-weight: 400; margin-bottom: 1rem; }

/* ==========================================================================
   CONTACT SECTION
   ========================================================================== */
.contact-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 3rem; }
.info-item { display: flex; gap: 1rem; margin-top: 1.5rem; align-items: flex-start; }
.info-item .icon { font-size: 1.5rem; color: var(--accent-1); background: rgba(99, 102, 241, 0.1); width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.info-item h4 { margin-bottom: 0.2rem; }
.info-item p { color: var(--text-secondary); font-size: 0.95rem; }

.form-group { position: relative; margin-bottom: 1.5rem; }
.form-group input, .form-group textarea { width: 100%; padding: 1rem; background: rgba(0,0,0,0.2); border: 1px solid var(--glass-border); border-radius: 10px; color: var(--text-primary); transition: var(--transition-smooth); outline: none; }
.form-group label { position: absolute; top: 1rem; left: 1rem; color: var(--text-secondary); transition: var(--transition-smooth); pointer-events: none; }
.form-group input:focus, .form-group textarea:focus { border-color: var(--accent-1); background: rgba(255,255,255,0.05); }
.form-group input:focus ~ label, .form-group input:not(:placeholder-shown) ~ label,
.form-group textarea:focus ~ label, .form-group textarea:not(:placeholder-shown) ~ label {
    top: -0.5rem; left: 0.8rem; font-size: 0.8rem; background: var(--bg-secondary); padding: 0 0.5rem; color: var(--accent-1); border-radius: 4px;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer { padding: 4rem 0 2rem; border-top: 1px solid var(--glass-border); position: relative; z-index: 10;}
.footer-content { display: flex; justify-content: space-between; align-items: center; margin-bottom: 3rem; flex-wrap: wrap; gap: 2rem;}
.footer-logo h2 { font-size: 1.8rem; margin-bottom: 0.5rem; }
.footer-logo h2 span { color: var(--accent-1); }
.footer-logo p { color: var(--text-secondary); font-size: 0.9rem; }
.footer-links { display: flex; gap: 2rem; }
.footer-links a { color: var(--text-secondary); transition: var(--transition-smooth); font-weight: 500;}
.footer-links a:hover { color: var(--accent-1); }
.footer-bottom { border-top: 1px solid var(--glass-border); padding-top: 2rem; display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: 0 auto; padding-left: 2rem; padding-right: 2rem;}
.footer-bottom p { color: var(--text-secondary); font-size: 0.9rem; }
.back-to-top { width: 40px; height: 40px; background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--text-primary); transition: var(--transition-smooth); }
.back-to-top:hover { background: var(--accent-1); border-color: var(--accent-1); color: #fff;}

/* ==========================================================================
   TOAST NOTIFICATION
   ========================================================================== */
.toast { position: fixed; bottom: -100px; left: 50%; transform: translateX(-50%); background: var(--glass-bg); backdrop-filter: blur(10px); border: 1px solid var(--glass-border); color: var(--text-primary); padding: 1rem 2rem; border-radius: 30px; transition: 0.4s ease; z-index: 10000; box-shadow: var(--glass-shadow); font-weight: 500;}
.toast.show { bottom: 40px; }

/* ==========================================================================
   ANIMATIONS & REVEALS
   ========================================================================== */
.reveal { opacity: 0; transform: translateY(30px); transition: 0.8s cubic-bezier(0.5, 0, 0, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }

/* Hover Tilt */
.tilt { transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94); transform-style: preserve-3d; }

/* ==========================================================================
   MEDIA QUERIES (RESPONSIVE)
   ========================================================================== */
@media (max-width: 992px) {
    .hero { flex-direction: column; justify-content: center; text-align: center; padding-top: 100px; gap: 3rem;}
    .hero-content { padding-right: 0; display: flex; flex-direction: column; align-items: center;}
    .hero-buttons { justify-content: center; }
    .about-grid, .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .nav-links { position: fixed; top: 0; right: -100%; width: 70%; height: 100vh; background: var(--bg-main); flex-direction: column; align-items: center; justify-content: center; transition: 0.4s ease; border-left: 1px solid var(--glass-border); }
    .nav-links.nav-active { right: 0; }
    .hamburger { display: flex; z-index: 1001; }
    .hamburger.toggle span:nth-child(1) { transform: rotate(-45deg) translate(-5px, 6px); }
    .hamburger.toggle span:nth-child(2) { opacity: 0; }
    .hamburger.toggle span:nth-child(3) { transform: rotate(45deg) translate(-5px, -6px); }
    
    .hero-title { font-size: 3rem; }
    .skills-grid { grid-template-columns: 1fr; }
    
    /* Disable custom cursor on mobile */
    .cursor-dot, .cursor-outline { display: none; }
    body, button, a { cursor: auto; }
}
