/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

/* CSS Variables for Easy Customization */
:root {
    --primary-color: #e74c3c;
    --primary-gradient: linear-gradient(90deg, #e74c3c, #c0392b);
    --bg-dark: #121212;
    --bg-light-dark: #1a1a1a;
    --text-light: #ffffff;
    --text-muted: #a0a0a0;
}

/* Basic Styling & Dark Theme */
body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-dark);
    color: var(--text-light);
    scroll-behavior: smooth;
}

/* ===== NAVIGATION BAR ===== */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background-color: rgba(18, 18, 18, 0.8);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    width: 90%;
    z-index: 1000;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

nav.scrolled {
    background-color: rgba(10, 10, 10, 0.9);
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* ===== HERO SECTION ===== */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden;
}

#tsparticles {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 10px;
}

#typed-text {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    color: var(--text-muted);
}

/* ===== GENERAL SECTION STYLING ===== */
.section-container {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: -webkit-linear-gradient(var(--primary-color), #c0392b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 4rem;
}

/* Buttons */
.cta-button {
    display: inline-block;
    margin-top: 2rem;
    padding: 12px 25px;
    border: 2px solid var(--primary-color);
    border-radius: 25px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    background: transparent;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    cursor: pointer;
}

.cta-button:hover {
    color: var(--text-light);
    background: var(--primary-gradient);
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(231, 76, 60, 0.4);
    border-color: transparent;
}

/* ===== ABOUT, SKILLS, EXPERIENCE SECTIONS ===== */
#skills, #experience, #contact { 
    background-color: var(--bg-light-dark); 
}

.about-content {
    display: flex;
    gap: 3rem;
    align-items: center;
}

.about-image img {
    max-width: 350px;
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.about-text { flex: 2; }
.about-text p { font-size: 1.1rem; line-height: 1.7; color: #c0c0c0; }

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

.skill-card {
    background-color: var(--bg-dark);
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    width: 120px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.skill-card:hover { transform: translateY(-10px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5); }
.skill-card i { font-size: 3rem; color: var(--primary-color); margin-bottom: 1rem; }
.skill-card span { font-size: 1rem; }

/* ===== EXPERIENCE TIMELINE ===== */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}
.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--primary-color);
    top: 0; bottom: 0;
    left: 50%;
    margin-left: -2px;
    border-radius: 2px;
}
.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    box-sizing: border-box;
}
.timeline-item:nth-child(odd) { left: 0; }
.timeline-item:nth-child(even) { left: 50%; }
.timeline-dot {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background-color: var(--bg-dark);
    border: 4px solid var(--primary-color);
    top: 24px;
    border-radius: 50%;
    z-index: 1;
}
.timeline-item:nth-child(odd) .timeline-dot { right: -10px; }
.timeline-item:nth-child(even) .timeline-dot { left: -10px; }

.timeline-content {
    padding: 20px 30px;
    background-color: var(--bg-dark);
    position: relative;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
}
.timeline-date { font-weight: bold; color: var(--primary-color); }
.timeline-content h3 { margin-top: 0; }

/* ===== PROJECTS SECTION ===== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.project-card {
    background-color: rgba(30, 30, 30, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    overflow: hidden;
    padding: 1.5rem;
    display: flex; flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.project-card:hover { transform: translateY(-10px); box-shadow: 0 8px 25px rgba(231, 76, 60, 0.3); }
.project-card img { width: 100%; height: 200px; object-fit: cover; border-radius: 10px; }
.project-card h3 { margin: 1rem 0 0.5rem 0; color: var(--primary-color); }
.project-card p { font-size: 0.95rem; color: #c0c0c0; flex-grow: 1; }
.project-tags { margin: 1rem 0; }
.project-tags span { background-color: #333; color: var(--text-muted); padding: 5px 10px; border-radius: 5px; font-size: 0.8rem; margin: 2px; display: inline-block; }
.project-links { margin-top: auto; display: flex; gap: 10px; align-items: center; }
.project-links a, .project-links button { text-decoration: none; padding: 10px 15px; border-radius: 5px; transition: all 0.3s ease; font-weight: bold; }
.project-links a { color: var(--text-light); background-color: #333; }
.project-links a:hover { background: var(--primary-gradient); }
.project-links button { background: transparent; border: 1px solid var(--primary-color); color: var(--primary-color); cursor: pointer; font-family: 'Poppins', sans-serif; font-size: 0.9rem; }
.project-links button:hover { background: var(--primary-color); color: var(--text-light); }

/* ===== CONTACT SECTION ===== */
#contact-form { display: flex; flex-direction: column; gap: 1rem; max-width: 600px; margin: 2rem auto 0 auto; }
#contact-form input, #contact-form textarea { width: 100%; box-sizing: border-box; padding: 15px; background-color: #1e1e1e; border: 1px solid #333; border-radius: 5px; color: var(--text-light); font-family: 'Poppins', sans-serif; }
#contact-form button { width: fit-content; align-self: center; }
.social-links { display: flex; justify-content: center; gap: 2rem; margin-top: 3rem; }
.social-links a { color: var(--text-light); font-size: 2rem; transition: color 0.3s ease, transform 0.3s ease; }
.social-links a:hover { color: var(--primary-color); transform: translateY(-5px); }

/* ===== FOOTER ===== */
footer {
    text-align: center;
    padding: 1.5rem;
    
    /* बैकग्राउंड को कॉन्टैक्ट सेक्शन से अलग किया */
    background: var(--bg-dark); 
    
    /* बॉर्डर को थोड़ा और चमकीला बनाया ताकि वो दिखे */
    border-top: 1px solid #444; 
    
    /* फुटर को सबसे ऊपर रखने के लिए (Main Fix) */
    position: relative;
    z-index: 10; 
}

/* यह फुटर के टेक्स्ट का स्टाइल है, इसे भी सुनिश्चित करें कि यह मौजूद है */
footer p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}
/* ===== MODAL STYLES ===== */
.modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.7); backdrop-filter: blur(5px); }
.modal-content { background-color: #1e1e1e; margin: 10% auto; padding: 2rem; border: 1px solid rgba(255, 255, 255, 0.2); width: 60%; max-width: 800px; border-radius: 10px; position: relative; animation: fadeIn 0.5s; }
@keyframes fadeIn { from {transform: scale(0.9); opacity: 0;} to {transform: scale(1); opacity: 1;} }
.close-btn { color: #aaa; float: right; font-size: 28px; font-weight: bold; cursor: pointer; }
.close-btn:hover { color: var(--primary-color); }
.modal-img { width: 100%; border-radius: 5px; margin-bottom: 1rem; }
.modal-content ul { padding-left: 20px; } .modal-content ul li { margin-bottom: 0.5rem; }

/* ===== ANIMATION & Z-INDEX ===== */
.hidden { opacity: 0; transform: translateY(50px); transition: all 1s ease-out; }
.show { opacity: 1; transform: translateY(0); }
section { position: relative; z-index: 5; }

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    nav { flex-direction: column; gap: 1rem; }
    .about-content { flex-direction: column; }
    .projects-grid { grid-template-columns: 1fr; }
    .timeline::after { left: 20px; }
    .timeline-item { width: 100%; padding-left: 60px; padding-right: 15px; }
    .timeline-item:nth-child(even) { left: 0; }
    .timeline-dot { left: 12px; }
    .timeline-item:nth-child(odd) .timeline-dot, .timeline-item:nth-child(even) .timeline-dot {
        right: auto; left: 12px;
    }
    .modal-content { width: 90%; margin: 20% auto; }
}