@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* =========================================
   1. THEME VARIABLES (COLORS)
========================================= */
:root, [data-theme="navy"] {
    --bg-main: #0a192f; --bg-secondary: rgba(17, 34, 64, 0.8); 
    --accent: #64ffda; --accent-glow: rgba(100, 255, 218, 0.2);
    --text-primary: #ccd6f6; --text-secondary: #8892b0;
    --nav-bg: rgba(10, 25, 47, 0.9);
    --orb-1: #64ffda; --orb-2: #112240; --orb-3: #0a192f;
}
[data-theme="black"] {
    --bg-main: #0a0a0a; --bg-secondary: rgba(20, 20, 20, 0.8);
    --accent: #7c3aed; --accent-glow: rgba(124, 58, 237, 0.2);
    --text-primary: #ffffff; --text-secondary: #a0a0a0;
    --nav-bg: rgba(10, 10, 10, 0.9);
    --orb-1: #7c3aed; --orb-2: #4f46e5; --orb-3: #000000;
}
[data-theme="light"] {
    --bg-main: #f8fafc; --bg-secondary: rgba(255, 255, 255, 0.9);
    --accent: #2563eb; --accent-glow: rgba(37, 99, 235, 0.2);
    --text-primary: #0f172a; --text-secondary: #475569;
    --nav-bg: rgba(248, 250, 252, 0.9);
    --orb-1: #bfdbfe; --orb-2: #dbeafe; --orb-3: #f1f5f9;
}
[data-theme="orange"] {
    --bg-main: #1c1917; --bg-secondary: rgba(41, 37, 36, 0.8);
    --accent: #f97316; --accent-glow: rgba(249, 115, 22, 0.2);
    --text-primary: #ffedd5; --text-secondary: #fdba74;
    --nav-bg: rgba(28, 25, 23, 0.9);
    --orb-1: #f97316; --orb-2: #7c2d12; --orb-3: #431407;
}
[data-theme="skyblue"] {
    --bg-main: #e0f2fe; --bg-secondary: rgba(255, 255, 255, 0.6);
    --accent: #0284c7; --accent-glow: rgba(2, 132, 199, 0.2);
    --text-primary: #0f172a; --text-secondary: #334155;
    --nav-bg: rgba(224, 242, 254, 0.9);
    --orb-1: #bae6fd; --orb-2: #7dd3fc; --orb-3: #38bdf8;
}
[data-theme="purple"] {
    --bg-main: #1e1b4b; --bg-secondary: rgba(49, 46, 129, 0.8);
    --accent: #c084fc; --accent-glow: rgba(192, 132, 252, 0.2);
    --text-primary: #faf5ff; --text-secondary: #d8b4fe;
    --nav-bg: rgba(30, 27, 75, 0.9);
    --orb-1: #c084fc; --orb-2: #4c1d95; --orb-3: #2e1065;
}

/* =========================================
   2. GENERAL STYLES & BACKGROUND
========================================= */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; scroll-behavior: smooth; transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease; }
body { background-color: var(--bg-main); color: var(--text-primary); position: relative; overflow-x: hidden; }

.bg-animation { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: -1; overflow: hidden; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.3; animation: float 10s infinite alternate ease-in-out; }
.orb-1 { width: 400px; height: 400px; background: var(--orb-1); top: -10%; left: -10%; }
.orb-2 { width: 500px; height: 500px; background: var(--orb-2); bottom: -20%; right: -10%; animation-delay: -5s; }
.orb-3 { width: 300px; height: 300px; background: var(--orb-3); top: 40%; left: 60%; animation-duration: 15s; }
@keyframes float { 0% { transform: translate(0, 0) scale(1); } 100% { transform: translate(60px, 60px) scale(1.1); } }

/* =========================================
   3. NAVIGATION BAR
========================================= */
.navbar { display: flex; justify-content: space-between; align-items: center; padding: 1.5rem 5%; background-color: var(--nav-bg); backdrop-filter: blur(10px); position: fixed; width: 100%; top: 0; z-index: 1000; }
.logo { font-size: 1.5rem; font-weight: 700; } 
.logo span { color: var(--accent); }
.nav-links { display: flex; list-style: none; gap: 2rem; }
.nav-links a { color: var(--text-primary); text-decoration: none; font-weight: 500; }
.nav-links a:hover { color: var(--accent); }

.theme-dropdown-container { position: relative; display: inline-block; }
#theme-menu-btn { background: transparent; border: 2px solid var(--accent); color: var(--accent); padding: 8px 12px; border-radius: 8px; cursor: pointer; font-size: 1.2rem; transition: 0.3s ease; }
#theme-menu-btn:hover { background: var(--accent-glow); box-shadow: 0 0 10px var(--accent-glow); }
.theme-dropdown { display: none; position: absolute; top: 130%; right: 0; background: var(--bg-secondary); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 8px; padding: 12px; box-shadow: 0 8px 16px rgba(0,0,0,0.4); grid-template-columns: repeat(3, 1fr); gap: 10px; z-index: 200; backdrop-filter: blur(10px); }
.theme-dropdown.show { display: grid; }
.theme-btn { width: 25px; height: 25px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; transition: 0.2s ease; }
.theme-btn:hover, .theme-btn.active { transform: scale(1.2); border-color: var(--text-primary); }

/* =========================================
   4. HERO SECTION
========================================= */
.hero-main { display: flex; align-items: center; justify-content: center; flex-direction: column; height: 100vh; text-align: center; position: relative; padding: 0 5%; }
.hero-content-center { max-width: 800px; z-index: 10; margin-top: 50px; }
.hero-title { font-size: 4rem; font-weight: 700; margin-bottom: 15px; letter-spacing: -1px; }

/* Gradient text */
.gradient-text { background: linear-gradient(to right, #7c3aed, #4f46e5); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

.typing-text { font-size: 1.8rem; color: var(--text-secondary); font-weight: 400; margin-bottom: 40px; min-height: 40px; }
.cursor { display: inline-block; width: 3px; background-color: var(--text-primary); animation: blink 0.8s infinite; margin-left: 5px; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.hero-buttons { display: flex; gap: 20px; justify-content: center; margin-bottom: 40px; }
.btn-primary, .btn-secondary { padding: 12px 30px; border-radius: 8px; text-decoration: none; font-weight: 500; font-size: 1rem; transition: 0.3s ease; display: flex; align-items: center; gap: 10px; }
.btn-primary { background: linear-gradient(to right, #7c3aed, #4f46e5); color: white; border: none; }
.btn-primary:hover { box-shadow: 0 0 20px rgba(124, 58, 237, 0.4); transform: translateY(-3px); }

.social-icons { display: flex; gap: 20px; justify-content: center; }
.social-icons a { color: var(--text-secondary); font-size: 1.5rem; width: 50px; height: 50px; display: flex; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.1); transition: 0.3s; text-decoration: none;}
.social-icons a:hover { color: white; background: linear-gradient(to right, #7c3aed, #4f46e5); border-color: transparent; transform: translateY(-5px); }

/* Mouse Scroll Indicator */
.mouse-scroll { position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%); opacity: 0.6; transition: 0.3s; }
.mouse-scroll:hover { opacity: 1; }
.mouse { width: 25px; height: 40px; border: 2px solid var(--text-secondary); border-radius: 15px; position: relative; }
.wheel { width: 4px; height: 8px; background: var(--text-secondary); border-radius: 2px; position: absolute; top: 6px; left: 50%; transform: translateX(-50%); animation: scroll 1.5s infinite; }
@keyframes scroll { 0% { top: 6px; opacity: 1; } 100% { top: 20px; opacity: 0; } }

/* =========================================
   5. COMMON SECTION STYLES
========================================= */
section { padding: 6rem 5% 4rem; min-height: 100vh; }
.section-title { text-align: center; font-size: 2.5rem; margin-bottom: 3rem; }
.section-title span { color: var(--accent); }

/* =========================================
   6. ABOUT SECTION & STATS
========================================= */
.about-hero-container { display: flex; align-items: center; justify-content: space-between; gap: 3rem; margin-bottom: 4rem; text-align: left; background: var(--bg-secondary); padding: 2.5rem; border-radius: 12px; backdrop-filter: blur(5px); border: 1px solid rgba(255,255,255,0.05); max-width: 1000px; margin: 0 auto 4rem auto;}
.about-text { flex: 1.5; }
.about-text h3 { color: var(--accent); margin-bottom: 1rem; font-size: 1.8rem; }
.about-text p { color: var(--text-secondary); margin-bottom: 1rem; line-height: 1.7; font-size: 1.05rem; }
.about-image { flex: 1; display: flex; justify-content: center; }
.about-image img { width: 250px; height: 250px; border-radius: 50%; object-fit: cover; border: 4px solid var(--accent); box-shadow: 0 0 25px var(--accent-glow); }

.stats-container { display: flex; justify-content: center; gap: 2rem; flex-wrap: wrap; }
.stat-box { background: var(--bg-secondary); padding: 2rem; border-radius: 12px; min-width: 200px; backdrop-filter: blur(5px); border: 1px solid rgba(255,255,255,0.05); transition: 0.3s; text-align: center; }
.stat-box:hover { border-color: var(--accent); transform: translateY(-5px); }
.stat-box h2 { color: var(--accent); font-size: 2.5rem; margin-bottom: 10px; }

/* =========================================
   7. SKILLS SECTION
========================================= */
.skills-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 3rem; max-width: 1000px; margin: 0 auto; }
.skill-category { background: var(--bg-secondary); padding: 2rem; border-radius: 12px; backdrop-filter: blur(5px); border: 1px solid rgba(255,255,255,0.05); }
.skill-category h3 { margin-bottom: 1.5rem; color: var(--accent); text-align: center;}
.skill-bar { margin-bottom: 1.5rem; }
.skill-name { display: block; margin-bottom: 0.5rem; font-size: 0.9rem; }
.progress { background: rgba(136, 146, 176, 0.2); height: 8px; border-radius: 4px; overflow: hidden; }
.progress-fill { background: var(--accent); height: 100%; border-radius: 4px;}

/* =========================================
   8. PROJECTS SECTION
========================================= */
.project-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; max-width: 1200px; margin: 0 auto; }

.project-card { 
    background: var(--bg-secondary); 
    border-radius: 12px; 
    position: relative; 
    backdrop-filter: blur(5px); 
    border: 1px solid rgba(255,255,255,0.05); 
    transition: 0.3s; 
    overflow: hidden; 
    display: flex;
    flex-direction: column;
    text-decoration: none; 
    color: inherit; 
    cursor: pointer; 
}

.project-card:hover { 
    border-color: var(--accent); 
    box-shadow: 0 5px 20px var(--accent-glow); 
    transform: translateY(-5px); 
}

.project-img-container {
    width: 100%;
    height: 200px; 
    overflow: hidden;
    border-bottom: 1px solid rgba(255,255,255,0.05); 
}

.project-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    transition: 0.5s;
}

.project-card:hover .project-img-container img {
    transform: scale(1.05); 
}

.project-content {
    padding: 2rem;
    position: relative; 
}

.project-info { padding: 0; }
.project-info h3 { margin-bottom: 0.5rem; font-size: 1.4rem; color: var(--text-primary);}
.project-info p { color: var(--text-secondary); margin-bottom: 1rem; font-size: 0.9rem; line-height: 1.6; }

.project-number { 
    position: absolute; 
    top: 1rem; 
    right: 1.5rem; 
    font-size: 2rem; 
    font-weight: 700; 
    color: rgba(136, 146, 176, 0.1); 
    z-index: 10; 
}

.tech-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.tech-tags span { background: var(--accent-glow); color: var(--accent); padding: 0.3rem 0.8rem; border-radius: 20px; font-size: 0.8rem; }

/* =========================================
   9. CONTACT SECTION
========================================= */
.contact-container { display: grid; grid-template-columns: 1fr 2fr; gap: 3rem; max-width: 900px; margin: 0 auto; }

/* Update for multiple cards alignment */
.contact-info { display: flex; flex-direction: column; gap: 1.5rem; justify-content: space-between; }

.contact-card { background: var(--bg-secondary); padding: 1.5rem; border-radius: 12px; text-align: center; backdrop-filter: blur(5px); border: 1px solid rgba(255,255,255,0.05); transition: 0.3s;}
.contact-card:hover { border-color: var(--accent); transform: translateY(-5px); }
.contact-card i { font-size: 1.8rem; color: var(--accent); margin-bottom: 0.5rem; }
.contact-card h3 { font-size: 1.2rem; margin-bottom: 0.3rem; color: var(--text-primary); }
.contact-card p { color: var(--text-secondary); font-size: 0.95rem; }

.contact-form { display: flex; flex-direction: column; justify-content: space-between; gap: 1.5rem; }
.contact-form input, .contact-form textarea { width: 100%; padding: 1rem; background: var(--bg-secondary); border: 1px solid rgba(136, 146, 176, 0.2); border-radius: 8px; color: var(--text-primary); outline: none; backdrop-filter: blur(5px); transition: 0.3s;}
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--accent); box-shadow: 0 0 10px var(--accent-glow); }
.contact-form textarea { flex-grow: 1; } /* Makes textarea stretch to align with left cards */

.submit-btn { background: linear-gradient(to right, #7c3aed, #4f46e5); color: white; border: none; padding: 1rem; border-radius: 8px; font-size: 1rem; font-weight: 600; cursor: pointer; transition: 0.3s;}
.submit-btn:hover { box-shadow: 0 0 15px rgba(124, 58, 237, 0.5); transform: translateY(-2px); }

/* =========================================
   10. GREETING POPUPS
========================================= */
/* Side Greeting Popup */
.greeting-popup { position: fixed; bottom: 30px; right: -400px; background: var(--bg-secondary); color: var(--text-primary); padding: 15px 25px; border-left: 5px solid var(--accent); border-radius: 8px; box-shadow: 0 5px 15px rgba(0,0,0,0.5); z-index: 1000; transition: right 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55); backdrop-filter: blur(10px); font-weight: 500; font-size: 1.05rem; }
.greeting-popup.show { right: 30px; }
.greeting-content { display: flex; align-items: center; gap: 10px; }
#greeting-icon { font-size: 1.2rem; }

/* Center Welcome Popup */
.welcome-popup {
    position: fixed;
    top: 0; 
    left: 0; 
    width: 100vw; 
    height: 100vh;
    background: rgba(10, 25, 47, 0.85); 
    backdrop-filter: blur(10px);
    display: flex; 
    align-items: center; 
    justify-content: center;
    z-index: 9999; 
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}
.welcome-popup.show { opacity: 1; visibility: visible; }
.welcome-content {
    text-align: center;
    background: var(--bg-secondary);
    padding: 40px 60px;
    border-radius: 20px;
    border: 1px solid var(--accent);
    box-shadow: 0 0 30px var(--accent-glow);
    transform: translateY(20px) scale(0.9);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
}
.welcome-popup.show .welcome-content { transform: translateY(0) scale(1); }
#welcome-icon { font-size: 4.5rem; margin-bottom: 15px; display: block; }
#welcome-text { color: var(--accent); font-size: 2.5rem; margin-bottom: 10px; }
.welcome-content p { color: var(--text-primary); font-size: 1.2rem; }

/* =========================================
   11. FORM SUCCESS POPUP
========================================= */
.success-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7); 
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.success-popup.show { opacity: 1; visibility: visible; }
.success-content {
    background: var(--bg-secondary);
    border: 1px solid var(--accent);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    transform: scale(0.7);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}
.success-popup.show .success-content { transform: scale(1); }


/* =========================================
   12. RESPONSIVE DESIGN
========================================= */
@media (max-width: 768px) {
    .about-hero-container { flex-direction: column; text-align: center; }
    .contact-container { grid-template-columns: 1fr; }
    .nav-links { display: none; }
    .hero-title { font-size: 2.5rem; }
    .typing-text { font-size: 1.2rem; }
    .hero-buttons { flex-direction: column; }
}