/* ==========================================================================
   Base Styles & Variables
   ========================================================================== */
:root {
    --bg-color: #050816;
    --primary: #4F46E5;
    --secondary: #06B6D4;
    --accent: #8B5CF6;
    --text-main: #FFFFFF;
    --text-muted: #A0AEC0;
    --card-bg: rgba(255, 255, 255, 0.08);
    --card-border: rgba(255, 255, 255, 0.1);
    
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
}

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

ul {
    list-style: none;
}

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

.section-padding {
    padding: 100px 0;
}

.section-title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 3rem;
    background: linear-gradient(to right, var(--primary), var(--secondary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(79, 70, 229, 0.3);
}

/* Glassmorphism */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 2rem;
    transition: var(--transition);
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(79, 70, 229, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 2rem;
    border-radius: 8px;
    font-family: var(--font-heading);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary), var(--accent));
    color: white;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.6);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--secondary);
    color: var(--text-main);
}

.btn-outline:hover {
    background: rgba(6, 182, 212, 0.1);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.4);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(255,255,255,0.1);
}

.btn-small:hover {
    background: rgba(255,255,255,0.2);
}

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(to right, var(--primary), var(--secondary), var(--accent));
    width: 0%;
    z-index: 1000;
    transition: width 0.1s ease;
}

/* Canvas Background */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 999;
    transition: var(--transition);
    padding: 1.5rem 0;
}

.navbar.scrolled {
    padding: 1rem 0;
    background: rgba(5, 8, 22, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    font-family: var(--font-heading);
    letter-spacing: 1px;
}

.logo span {
    color: var(--secondary);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    font-weight: 500;
    font-size: 1rem;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-cta {
    background: rgba(79, 70, 229, 0.2);
    border: 1px solid var(--primary);
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
}
.nav-cta::after { display: none; }
.nav-cta:hover {
    background: var(--primary);
}

.hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

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

.hero .hero-content {
    flex: 1;
    padding-left: 10%;
    z-index: 2;
}

.greeting {
    font-size: 1.5rem;
    color: var(--secondary);
    margin-bottom: 1rem;
}

.name {
    font-size: 5rem;
    line-height: 1.1;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #ffffff, #a5b4fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.roles {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.static-role {
    background: rgba(255,255,255,0.05);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-muted);
}

.typing-container {
    font-size: 2rem;
    font-family: var(--font-heading);
    margin-bottom: 3rem;
    height: 3rem;
}

.typing-text {
    color: var(--accent);
    font-weight: 600;
}

.cursor {
    display: inline-block;
    width: 3px;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    min-height: 400px;
}

.glow-circle {
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
    opacity: 0.4;
    filter: blur(50px);
    animation: pulse 4s infinite alternate;
}

@keyframes pulse {
    0% { transform: scale(0.8); opacity: 0.3; }
    100% { transform: scale(1.2); opacity: 0.6; }
}

.ai-sphere {
    position: relative;
    width: 200px;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid transparent;
}

.ring-1 {
    width: 100%;
    height: 100%;
    border-top-color: var(--primary);
    border-bottom-color: var(--accent);
    animation: spin 8s linear infinite;
}

.ring-2 {
    width: 140%;
    height: 140%;
    border-left-color: var(--secondary);
    border-right-color: var(--primary);
    animation: spin-reverse 12s linear infinite;
}

.ring-3 {
    width: 180%;
    height: 180%;
    border-top-color: var(--accent);
    border-bottom-color: var(--secondary);
    animation: spin 15s linear infinite;
}

.ai-icon {
    font-size: 4rem;
    color: white;
    text-shadow: 0 0 20px var(--primary);
    animation: float 3s ease-in-out infinite;
}

@keyframes spin { 100% { transform: rotate(360deg); } }
@keyframes spin-reverse { 100% { transform: rotate(-360deg); } }
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ==========================================================================
   About Section
   ========================================================================== */
.about-text {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.about-text p {
    margin-bottom: 1.5rem;
}

.about-text .highlight {
    color: var(--secondary);
    font-weight: 600;
}

/* ==========================================================================
   Stats Section
   ========================================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    font-family: var(--font-heading);
    color: var(--primary);
    margin-bottom: 0.5rem;
    text-shadow: 0 0 15px rgba(79, 70, 229, 0.4);
}

.stat-label {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ==========================================================================
   Skills Section
   ========================================================================== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.skill-category h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--secondary);
}

.skill-list li {
    margin-bottom: 1.2rem;
}

.skill-list li span {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.bar-bg {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 3px;
    width: 0; /* Animated in JS */
    transition: width 1.5s ease-in-out;
}

/* ==========================================================================
   Tech Stack Icons
   ========================================================================== */
.tech-icons-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}

.tech-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-size: 3rem;
    color: var(--text-muted);
    transition: var(--transition);
    cursor: pointer;
}

.tech-icon img {
    width: 48px;
    height: 48px;
    filter: grayscale(100%) opacity(0.7);
    transition: var(--transition);
}

.tech-icon:hover {
    color: var(--accent);
    transform: translateY(-5px) scale(1.1);
}

.tech-icon:hover img {
    filter: grayscale(0%) opacity(1);
}

.tech-icon span {
    font-size: 0.9rem;
    opacity: 0;
    transition: var(--transition);
}

.tech-icon:hover span {
    opacity: 1;
}

/* ==========================================================================
   Projects Section
   ========================================================================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.project-card {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.project-img-wrapper {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.project-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    color: rgba(255,255,255,0.3);
    background: linear-gradient(45deg, #1a1a2e, #16213e);
    transition: transform 0.5s ease;
}

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

.ai-placeholder { background: linear-gradient(45deg, #0f2027, #203a43, #2c5364); }
.ml-placeholder { background: linear-gradient(45deg, #141e30, #243b55); }
.img-placeholder { background: linear-gradient(45deg, #2b5876, #4e4376); }
.web-placeholder { background: linear-gradient(45deg, #1d2b64, #f8cdda); color: #fff;}
.auto-placeholder { background: linear-gradient(45deg, #000000, #434343); }
.flappy-placeholder { background: linear-gradient(45deg, #70c5ce, #4caf50); color: #0f1225; }

.project-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.project-info h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: white;
}

.project-info p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    flex: 1;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.project-tags span {
    font-size: 0.8rem;
    background: rgba(79, 70, 229, 0.1);
    color: var(--secondary);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
}

.project-links {
    display: flex;
    gap: 1rem;
}

/* ==========================================================================
   Experience Timeline
   ========================================================================== */
.experience-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 3rem;
    font-weight: 500;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    height: 100%;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary), var(--accent));
}

.timeline-item {
    position: relative;
    margin-bottom: 2.5rem;
    padding-left: 60px;
}

.timeline-dot {
    position: absolute;
    left: 11px;
    top: 20px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--bg-color);
    border: 4px solid var(--secondary);
    box-shadow: 0 0 10px var(--secondary);
}

.timeline-content {
    padding: 1.5rem;
}

.timeline-content h4 {
    font-size: 1.3rem;
    color: white;
}

.timeline-date {
    color: var(--secondary);
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

/* ==========================================================================
   Testimonials
   ========================================================================== */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    text-align: center;
}

.stars {
    color: #FBBF24;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.testimonial-card p {
    font-style: italic;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ==========================================================================
   Contact Section
   ========================================================================== */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.contact-info p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.contact-item i {
    color: var(--secondary);
    font-size: 1.5rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

.contact-form input,
.contact-form textarea {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 0.8rem 1rem;
    color: white;
    font-family: var(--font-body);
    transition: var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(79, 70, 229, 0.3);
    background: rgba(255,255,255,0.08);
}

.submit-btn {
    margin-top: 1rem;
    width: 100%;
}

.form-status {
    margin-top: 1rem;
    text-align: center;
    font-weight: 500;
}

.form-status.success { color: #10B981; }
.form-status.error { color: #EF4444; }

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
    border-top: 1px solid rgba(255,255,255,0.05);
    padding: 2rem 0;
    text-align: center;
    color: var(--text-muted);
    position: relative;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

.back-to-top {
    position: absolute;
    right: 2rem;
    top: -20px;
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(79, 70, 229, 0.5);
    transition: var(--transition);
}

.back-to-top:hover {
    transform: translateY(-5px);
    background: var(--accent);
}

/* ==========================================================================
   Animations & Reveals
   ========================================================================== */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUpAnim 0.8s forwards;
}
.fade-in {
    opacity: 0;
    animation: fadeInAnim 1s forwards;
}

@keyframes fadeUpAnim {
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInAnim {
    to { opacity: 1; }
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }
.delay-4 { animation-delay: 0.8s; }
.delay-5 { animation-delay: 1s; }

/* Scroll Reveal Classes (Handled by JS) */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Media Queries (Responsive)
   ========================================================================== */
@media (max-width: 992px) {
    .contact-container {
        grid-template-columns: 1fr;
    }
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 120px;
    }
    .hero .hero-content {
        padding-left: 0;
    }
    .roles {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        flex-direction: column;
        background: rgba(5, 8, 22, 0.95);
        backdrop-filter: blur(10px);
        width: 100%;
        height: calc(100vh - 70px);
        justify-content: center;
        transition: 0.4s ease;
    }
    .nav-links.active {
        left: 0;
    }
    .hamburger {
        display: block;
    }
    
    .name {
        font-size: 3.5rem;
    }
    
    .typing-container {
        font-size: 1.5rem;
    }
    
    .timeline::before {
        left: 0;
    }
    .timeline-item {
        padding-left: 30px;
    }
    .timeline-dot {
        left: -9px;
    }
}
