/* --- FINAL UNIFIED THEME (Mobile About Page Corrected) --- */

:root {
    --bg-color: #0d0d2b;
    --primary-glow: rgba(131, 56, 236, 0.5);
    --secondary-glow: rgba(58, 134, 255, 0.5);
    --accent-color: #5BFFD3;
    --text-light: #e0e6f7;
    --text-dark: #8892b0;
    --font-sans: 'Inter', 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'Fira Code', 'Roboto Mono', monospace;
    --card-bg: rgba(17, 24, 45, 0.6);
    --border-color: rgba(131, 56, 236, 0.2);
    --header-height: 75px;
}

html, body {
    overflow-x: hidden;
}

body {
    position: relative;
    font-family: var(--font-sans);
    background-color: var(--bg-color);
    color: var(--text-light);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main, .main-home {
    flex: 1 0 auto;
    padding-top: var(--header-height);
}

#tsparticles { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; }
.fade-in-section { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.fade-in-section.is-visible { opacity: 1; transform: translateY(0); }

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    box-sizing: border-box;
    z-index: 1000;
    background: rgba(13, 13, 43, 0.5);
    backdrop-filter: blur(10px);
    padding: 0 5%;
    border-bottom: 1px solid var(--border-color);
    height: var(--header-height);
    display: flex;
    align-items: center;
}
nav { display: flex; justify-content: space-between; align-items: center; width: 100%; }
nav .logo { font-family: var(--font-mono); font-size: 1.8rem; font-weight: 700; color: var(--accent-color); text-decoration: none; }
.nav-links ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; }
.nav-links ul li { margin-left: 15px; font-family: var(--font-mono); }
.nav-links ul li a { color: var(--text-light); text-decoration: none; padding: 12px 18px; font-size: 1rem; transition: color 0.3s ease; }
.nav-links ul li a:hover { color: var(--accent-color); }
.hamburger { display: none; cursor: pointer; }
.hamburger div { width: 25px; height: 3px; background-color: var(--text-light); margin: 5px; transition: all 0.3s ease; }

.main-home { display: flex; flex-direction: column; align-items: center; justify-content: center; padding-left: 20px; padding-right: 20px; padding-bottom: 50px; }
.hero { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; max-width: 1200px; width: 100%; gap: 30px; }
.hero-text { flex: 1.5; min-width: 320px; display: flex; align-items: center; gap: 30px; }
.profile-photo { width: 150px; height: 150px; border-radius: 50%; overflow: hidden; border: 3px solid var(--accent-color); box-shadow: 0 0 25px var(--primary-glow); flex-shrink: 0; transition: transform 0.3s ease; }
.profile-photo:hover { transform: scale(1.05); }
.profile-photo img { width: 100%; height: 100%; object-fit: cover; }
.intro-text { display: flex; flex-direction: column; justify-content: center; }
.intro-text h1 { font-size: clamp(40px, 6vw, 60px); color: var(--text-light); font-weight: 600; margin: 0 0 10px; }
.intro-text h1 .highlight { color: var(--accent-color); }
.intro-text .subtitle { font-family: var(--font-mono); color: var(--accent-color); margin-bottom: 15px; font-size: 1.2rem; }
.intro-text p { font-size: 1.1rem; color: var(--text-dark); margin-bottom: 30px; max-width: 500px; }
.cta-group { display: flex; gap: 15px; flex-wrap: wrap; }
.hero-animation { flex: 1; min-width: 400px; max-width: 400px; height: 400px; border-radius: 50%; overflow: hidden; display: flex; justify-content: center; align-items: center; border: 2px solid var(--border-color); box-shadow: 0 0 25px var(--secondary-glow); transition: box-shadow 0.3s ease; }
.hero-animation:hover { box-shadow: 0 0 35px var(--accent-color); }

.stats-container { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; margin-top: 80px; width: 100%; max-width: 1000px; }
.stat-card { background: var(--card-bg); backdrop-filter: blur(10px); border: 1px solid var(--border-color); border-radius: 8px; padding: 20px; text-align: center; min-width: 180px; transition: transform 0.3s ease; }
.stat-card:hover { transform: translateY(-5px); }
.stat-card h3 { font-size: 2.5rem; color: var(--accent-color); margin: 0 0 5px; font-family: var(--font-mono); }
.stat-card p { margin: 0; color: var(--text-dark); }

.container { padding: 80px 20px; max-width: 1000px; margin: 0 auto; }
.container h1, .container h2 { font-size: clamp(2rem, 5vw, 2.5rem); color: var(--text-light); margin-bottom: 50px; font-family: var(--font-mono); text-align: center; position: relative; padding-bottom: 10px; }
.container h1::after, .container h2::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 60px; height: 3px; background: linear-gradient(90deg, var(--primary-glow), var(--accent-color)); border-radius: 2px; }
.container > p { color: var(--text-dark); margin-bottom: 50px; max-width: 600px; margin-left: auto; margin-right: auto; text-align: center; }

.skills-section, .education-section, .projects-grid, .contact-grid { margin-top: 80px; }
.about-content { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; }
.about-avatar { width: 250px; height: 250px; border-radius: 8px; object-fit: cover; border: 3px solid var(--accent-color); box-shadow: 0 10px 30px -15px var(--shadow-color); flex-shrink: 0; }
.about-text { flex: 1; min-width: 300px; }
.location-info { display: flex; align-items: center; gap: 10px; color: var(--text-dark); font-family: var(--font-mono); margin-top: -10px; margin-bottom: 20px; }
.location-info i { color: var(--accent-color); }

.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.skill-category { background: var(--card-bg); backdrop-filter: blur(10px); border: 1px solid var(--border-color); border-radius: 8px; padding: 25px; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.skill-category:hover { transform: translateY(-7px); box-shadow: 0 0 25px var(--secondary-glow); }
.skill-category h3 { font-size: 1.2rem; color: var(--accent-color); margin: 0 0 15px; }
.skills-list { display: flex; flex-wrap: wrap; gap: 10px; }
.skills-list span { background-color: var(--bg-color); color: var(--text-dark); padding: 5px 12px; border-radius: 4px; font-family: var(--font-mono); font-size: 0.9rem; }

.education-timeline { position: relative; max-width: 750px; margin: 0 auto; padding: 20px 0; }
.education-timeline::after { content: ''; position: absolute; width: 4px; background-color: var(--card-bg); border-radius: 2px; top: 0; bottom: 0; left: 50%; margin-left: -2px; }
.timeline-item { padding: 10px 40px; position: relative; background-color: inherit; width: 50%; box-sizing: border-box; }
.timeline-item.is-visible { animation: fadeIn 1s ease-in-out forwards; }
.timeline-item:nth-child(odd) { left: 0; }
.timeline-item:nth-child(even) { left: 50%; }
.timeline-dot { position: absolute; width: 20px; height: 20px; background-color: var(--bg-color); border: 4px solid var(--accent-color); top: 35px; border-radius: 50%; z-index: 1; }
.timeline-item:nth-child(odd) .timeline-dot { right: -12px; }
.timeline-item:nth-child(even) .timeline-dot { left: -8px; }
.timeline-content { padding: 20px 30px; background: var(--card-bg); backdrop-filter: blur(10px); border: 1px solid var(--border-color); position: relative; border-radius: 8px; }
.timeline-content h3 { font-size: 1.4rem; color: var(--accent-color); margin: 0 0 5px; }
.timeline-content p { color: var(--text-light); margin: 0 0 15px; font-size: 1.1rem; }
.timeline-content .score { font-family: var(--font-mono); font-size: 0.9rem; color: var(--text-dark); }
.timeline-date { font-family: var(--font-mono); color: var(--accent-color); font-size: 1rem; padding: 0 20px; }
.timeline-item:nth-child(even) { text-align: right; }

.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.project-card { background: var(--card-bg); backdrop-filter: blur(10px); border: 1px solid var(--border-color); border-radius: 8px; padding: 2rem; transition: transform 0.3s ease, box-shadow 0.3s ease; display: flex; flex-direction: column; }
.project-card:hover { transform: translateY(-7px); box-shadow: 0 0 25px var(--secondary-glow); }
.project-card h3 { font-size: 1.5rem; text-transform: capitalize; color: var(--text-light); margin: 0 0 10px; }
.project-card p { color: var(--text-dark); font-size: 1rem; flex-grow: 1; }
.project-footer { margin-top: 20px; font-family: var(--font-mono); display: flex; justify-content: space-between; align-items: center; }
.project-footer a { color: var(--accent-color); text-decoration: none; }

.contact-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; }
.contact-info h3 { font-size: 1.5rem; color: var(--accent-color); }
.contact-info ul { list-style: none; padding: 0; }
.contact-info li { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; color: var(--text-dark); }
.contact-info li a { color: var(--text-dark); transition: color 0.3s ease; }
.contact-info li a:hover { color: var(--accent-color); }
.contact-info i { color: var(--accent-color); font-size: 1.2rem; width: 20px; text-align: center; }
.form-group input, .form-group textarea { width: 100%; padding: 1rem; background-color: var(--bg-color); border: 1px solid var(--text-dark); border-radius: 4px; color: var(--text-light); font-size: 1rem; box-sizing: border-box; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--accent-color); box-shadow: 0 0 10px var(--secondary-glow); }

.cta-button { font-family: var(--font-mono); color: var(--accent-color); background-color: transparent; border: 1px solid var(--accent-color); border-radius: 4px; padding: 1rem 1.75rem; font-size: 1rem; text-decoration: none; cursor: pointer; transition: background-color 0.3s ease, box-shadow 0.3s ease; display: inline-block; margin-top: 10px; }
.cta-button:hover { background-color: rgba(91, 255, 211, 0.1); box-shadow: 0 0 15px rgba(91, 255, 211, 0.4); }
.cta-button.secondary { color: var(--text-light); border-color: var(--text-dark); }
.cta-button.secondary:hover { background-color: rgba(136, 146, 176, 0.1); border-color: var(--text-light); }

footer { text-align: center; padding: 30px 20px; font-family: var(--font-mono); color: var(--text-dark); font-size: 0.8rem; border-top: 1px solid var(--border-color); margin: 80px 20px 0; }
.social-links { margin-bottom: 15px; }
.social-links a { color: var(--text-dark); margin: 0 15px; font-size: 1.5rem; transition: color 0.3s ease, transform 0.3s ease; }
.social-links a:hover { color: var(--accent-color); transform: scale(1.2); }

@media screen and (max-width: 768px) {
    .nav-links { position: fixed; right: 0; top: 0; height: 100vh; width: 60%; background: rgba(13, 13, 43, 0.9); backdrop-filter: blur(10px); display: flex; flex-direction: column; align-items: center; justify-content: center; transform: translateX(100%); transition: transform 0.5s ease-in-out; z-index: 1000; }
    .nav-links ul { flex-direction: column; }
    .nav-links li { margin: 25px 0; font-size: 1.2rem; }
    .hamburger { display: block; z-index: 1001; }
    .nav-active { transform: translateX(0%); }
    .toggle .line1 { transform: rotate(-45deg) translate(-5px, 6px); }
    .toggle .line2 { opacity: 0; }
    .toggle .line3 { transform: rotate(45deg) translate(-5px, -6px); }
    
    nav { flex-direction: row; }
    .contact-grid { grid-template-columns: 1fr; } 
    
    .education-timeline::after { left: 20px; }
    .timeline-item { width: 100%; padding-left: 60px; padding-right: 15px; left: 0 !important; text-align: left !important; }
    .timeline-dot { left: 11px; }
    .hero-animation { min-width: 300px; max-width: 300px; height: 300px; }
}

/* --- RESPONSIVE LAYOUT CORRECTION --- */
@media (max-width: 820px) {
    /* Rule for homepage hero to stack with robot below text */
    .hero {
        flex-direction: column-reverse;
    }
    .hero-text {
        flex-direction: column;
        text-align: center;
    }

    /* Rule for About page to stack with picture on top */
    .about-content {
        flex-direction: column; 
        align-items: center;
        text-align: center;
    }
}