@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;600;800&display=swap');

/* --- Global Variables --- */
:root {
    --bg-dark: #08080c;
    --card-bg: rgba(20, 20, 25, 0.6);
    --primary-color: #8b5cf6; 
    --accent-glow: rgba(139, 92, 246, 0.5);
    --text-white: #ffffff;
    --text-gray: #94a3b8;
}

/* --- Reset and Base Styles --- */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    font-family: 'Plus Jakarta Sans', sans-serif; 
    cursor: none; 
}

body { 
    background-color: var(--bg-dark); 
    color: var(--text-white); 
    line-height: 1.6; 
    overflow-x: hidden; 
    position: relative; 
    z-index: 1;
}

::selection { background-color: var(--primary-color); color: var(--text-white); }
::-moz-selection { background-color: var(--primary-color); color: var(--text-white); }
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--primary-color); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #7c3aed; }

/* --- Special Elements --- */
#scroll-progress { position: fixed; top: 0; left: 0; width: 0%; height: 4px; background-color: var(--primary-color); z-index: 10001; box-shadow: 0 0 10px var(--accent-glow); transition: width 0.1s ease; }
#particles-js { position: fixed; width: 100vw; height: 100vh; top: 0; left: 0; z-index: 0; pointer-events: none; }
section, nav, footer, .theme-switcher, .whatsapp-float-btn, .back-to-top { position: relative; z-index: 10; }

#preloader { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background-color: var(--bg-dark); z-index: 9999; display: flex; flex-direction: column; justify-content: center; align-items: center; transition: opacity 0.5s ease; }
#preloader.hide { opacity: 0; pointer-events: none; }
.loader-circle { width: 60px; height: 60px; border: 4px solid rgba(255, 255, 255, 0.1); border-top: 4px solid var(--primary-color); border-radius: 50%; animation: spin 1s linear infinite; margin-bottom: 20px; }
.loader-text { color: var(--primary-color); font-weight: 800; letter-spacing: 2px; animation: pulse 1.5s infinite alternate; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.custom-cursor { position: fixed; top: 0; left: 0; width: 20px; height: 20px; border: 2px solid var(--primary-color); border-radius: 50%; transform: translate(-50%, -50%); pointer-events: none; z-index: 10000; transition: width 0.2s, height 0.2s, background-color 0.2s; box-shadow: 0 0 10px var(--accent-glow); }
.custom-cursor.hovered { width: 40px; height: 40px; background-color: var(--accent-glow); }

.theme-switcher { position: fixed; top: 50%; left: 15px; transform: translateY(-50%); background: rgba(20, 20, 25, 0.8); backdrop-filter: blur(10px); padding: 15px 10px; border-radius: 30px; border: 1px solid rgba(255, 255, 255, 0.1); display: flex; flex-direction: column; gap: 15px; z-index: 10000; box-shadow: 0 5px 15px rgba(0,0,0,0.5); }
.theme-btn { width: 20px; height: 20px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; transition: 0.3s ease; }
.theme-btn:hover, .theme-btn.active { transform: scale(1.3); border-color: #fff; }

.magnetic-item { display: inline-block; transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1); }
.highlight { color: var(--primary-color); text-shadow: 0 0 20px var(--accent-glow); transition: color 0.3s, text-shadow 0.3s; }

/* --- Navigation Bar --- */
nav { display: flex; justify-content: space-between; align-items: center; padding: 25px 8%; position: fixed; width: 100%; top: 0; z-index: 1000; background: rgba(8, 8, 12, 0.8); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(255, 255, 255, 0.05); transition: padding 0.3s; }
.logo { font-size: 1.6rem; font-weight: 800; }
.logo span { color: var(--primary-color); transition: color 0.3s; }
.nav-links { list-style: none; display: flex; gap: 35px; }
.nav-links a { color: var(--text-gray); text-decoration: none; font-weight: 500; font-size: 0.95rem; transition: color 0.3s; }
.nav-links a:hover { color: var(--primary-color); }

/* --- Hero Section --- */
.hero { height: 100vh; display: flex; align-items: center; justify-content: center; padding: 0 5%; padding-top: 60px; }
.hero-content { display: flex; align-items: center; justify-content: space-between; width: 100%; max-width: 1300px; gap: 30px; }
.greeting { font-size: 1.2rem; color: var(--text-gray); margin-bottom: 5px; }
.typing-container { font-size: 1.2rem; color: var(--text-gray); margin-top: 15px; font-weight: 600; }
#typewriter { color: var(--primary-color); transition: color 0.3s; }
.cursor-blink { font-weight: bold; color: var(--primary-color); animation: blink 0.8s infinite; transition: color 0.3s; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.hero-left { display: flex; align-items: center; gap: 40px; flex: 1; justify-content: flex-start;}
.side-socials { display: flex; flex-direction: column; gap: 25px; }
.side-socials a { color: var(--text-gray); font-size: 1.4rem; text-decoration: none; transition: color 0.3s;}
.side-socials a:hover { color: var(--primary-color); }
.hero-text-name h1 { font-size: 4rem; line-height: 1.1; margin-top: 0;}

.hero-image-wrapper { position: relative; width: 400px; height: 480px; display: flex; justify-content: center; align-items: flex-end; flex: 1.2; }
.profile-img { width: 100%; height: 100%; object-fit: contain; object-position: bottom; position: relative; z-index: 10; -webkit-mask-image: linear-gradient(to top, transparent 5%, black 30%); mask-image: linear-gradient(to top, transparent 5%, black 30%); filter: drop-shadow(0 -10px 30px var(--accent-glow)); transition: filter 0.3s; }
.glow-effect { position: absolute; width: 80%; height: 80%; bottom: 5%; background: radial-gradient(circle, var(--accent-glow) 0%, transparent 60%); filter: blur(40px); z-index: 1; animation: pulse 4s infinite alternate; transition: background 0.3s; }

.hero-right { display: flex; flex-direction: column; justify-content: center; height: 100%; flex: 1; align-items: flex-end; gap: 50px; }
.glitch { font-size: 3.5rem; font-weight: 800; position: relative; display: inline-block; color: var(--text-white); line-height: 1.1; text-align: right; }
.glitch::before, .glitch::after { content: attr(data-text); position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: transparent; }
.glitch::before { left: 3px; text-shadow: -2px 0 #ff00c1; animation: glitch-anim-1 2s infinite linear alternate-reverse; }
.glitch::after { left: -3px; text-shadow: -2px 0 #00fff9; animation: glitch-anim-2 2.5s infinite linear alternate-reverse; }
@keyframes pulse { from { opacity: 0.3; transform: scale(1); } to { opacity: 0.6; transform: scale(1.05); } }
@keyframes glitch-anim-1 { 0% { clip-path: inset(20% 0 80% 0); transform: translate(-2px, 1px); } 20% { clip-path: inset(60% 0 10% 0); transform: translate(2px, -1px); } 40% { clip-path: inset(40% 0 50% 0); transform: translate(-2px, 2px); } }
@keyframes glitch-anim-2 { 0% { clip-path: inset(10% 0 60% 0); transform: translate(2px, 1px); } 20% { clip-path: inset(30% 0 20% 0); transform: translate(-2px, -1px); } 40% { clip-path: inset(70% 0 10% 0); transform: translate(2px, 2px); } }

.resume-link { color: var(--text-gray); font-weight: 600; font-size: 0.9rem; letter-spacing: 2px; text-decoration: none; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid transparent; padding-bottom: 5px; transition: color 0.3s, border-color 0.3s;}
.resume-link:hover { color: var(--primary-color); border-bottom: 1px solid var(--primary-color); }

/* --- Common Section Layouts --- */
.about, .services, .timeline-section, .skills, .projects, .testimonials, .github-stats, .contact { padding: 80px 8%; }
.section-header { text-align: center; margin-bottom: 50px; }
.section-header h2 { font-size: 2.5rem; }

/* --- About & Services --- */
.about-card { background: var(--card-bg); border: 1px solid rgba(255, 255, 255, 0.05); padding: 50px; border-radius: 30px; text-align: center; backdrop-filter: blur(10px); }
.about h2 { font-size: 2.5rem; margin-bottom: 20px; }
.about p { color: var(--text-gray); max-width: 800px; margin: 0 auto 30px; font-size: 1rem; }

.stats { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; margin-top: 30px; }
.stat-item { background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.05); padding: 20px 30px; border-radius: 15px; text-align: center; flex: 1; min-width: 200px; transition: transform 0.3s ease, border-color 0.3s ease; }
.stat-item:hover { transform: translateY(-5px); border-color: var(--primary-color); }
.stat-item span { display: block; font-size: 1.5rem; font-weight: 800; color: var(--primary-color); margin-bottom: 5px; transition: color 0.3s; }

.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.service-card { background: var(--card-bg); border: 1px solid rgba(255, 255, 255, 0.05); padding: 40px; border-radius: 20px; text-align: center; transition: border-color 0.4s ease; transform-style: preserve-3d; }
.service-card:hover { border-color: var(--primary-color); }
.service-card i { font-size: 3rem; color: var(--primary-color); margin-bottom: 20px; transform: translateZ(30px); transition: color 0.3s; }
.service-card h3 { font-size: 1.5rem; margin-bottom: 15px; transform: translateZ(20px); }
.service-card p { color: var(--text-gray); font-size: 0.95rem; transform: translateZ(10px); }

/* --- Timeline & Skills --- */
.timeline { position: relative; max-width: 800px; margin: 0 auto; }
.timeline::after { content: ''; position: absolute; width: 2px; background: var(--accent-glow); top: 0; bottom: 0; left: 20px; margin-left: -1px; transition: background 0.3s; }
.timeline-item { padding: 10px 40px; position: relative; width: 100%; margin-bottom: 30px; }
.timeline-dot { position: absolute; width: 16px; height: 16px; left: 12px; background-color: var(--primary-color); border: 4px solid var(--bg-dark); border-radius: 50%; z-index: 1; top: 15px; transition: background-color 0.3s; }
.timeline-content { padding: 30px; background: var(--card-bg); border-radius: 20px; border: 1px solid rgba(255, 255, 255, 0.05); }
.timeline-date { color: var(--primary-color); font-weight: 800; font-size: 0.9rem; margin-bottom: 10px; display: block; transition: color 0.3s; }
.timeline-content h3 { font-size: 1.3rem; margin-bottom: 10px; }
.timeline-content p { color: var(--text-gray); font-size: 0.95rem; }

.skills-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.skill-box { background: var(--card-bg); border: 1px solid rgba(255, 255, 255, 0.05); padding: 30px; border-radius: 20px; transition: border-color 0.4s ease; }
.skill-box:hover { border-color: var(--accent-glow); }
.skill-box h3 { font-size: 1.3rem; margin-bottom: 20px; color: var(--text-white); }
.skill-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.skill-tags span { display: inline-block; white-space: nowrap; background: rgba(255,255,255,0.05); color: var(--text-white); padding: 8px 15px; border-radius: 8px; font-size: 0.85rem; border: 1px solid var(--accent-glow); transition: border-color 0.3s ease, transform 0.3s ease; }
.skill-tags span:hover { border-color: var(--primary-color); transform: translateY(-3px); }

/* --- GitHub Stats --- */
.github-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; max-width: 1100px; margin: 0 auto; justify-items: center; align-items: center; }
.github-container img { width: 100%; height: auto; max-width: 100%; border-radius: 15px; box-shadow: 0 10px 30px rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.05); transition: border-color 0.3s, box-shadow 0.3s; object-fit: cover; }
.github-container img:hover { border-color: var(--primary-color); box-shadow: 0 10px 30px var(--accent-glow); }

/* --- Projects Section --- */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; max-width: 1200px; margin: 0 auto; }
.project-card { background: var(--card-bg); border-radius: 20px; border: 1px solid rgba(255, 255, 255, 0.05); overflow: hidden; display: flex; flex-direction: column; transform-style: preserve-3d; transition: border-color 0.4s ease; height: 100%; }
.project-card:hover { border-color: var(--primary-color); }
.card-info { padding: 25px; display: flex; flex-direction: column; flex-grow: 1; transform: translateZ(20px); }
.tags-container { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.p-tag { font-size: 0.7rem; background: var(--accent-glow); color: var(--text-white); padding: 5px 10px; border-radius: 8px; font-weight: 700; transition: background 0.3s; }
.status-tag { font-size: 0.7rem; padding: 5px 10px; border-radius: 8px; font-weight: 700; }
.status-tag.completed { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.status-tag.ongoing { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.status-tag.pending { background: rgba(239, 68, 68, 0.1); color: #ef4444; }
.card-info h3 { margin: 5px 0 10px; font-size: 1.4rem; }
.card-info p { color: var(--text-gray); font-size: 0.85rem; line-height: 1.5; }
.tech-stack-mini { font-size: 0.8rem; color: var(--primary-color); margin-top: 10px; font-weight: 600; transition: color 0.3s; }
.project-links { margin-top: auto; padding-top: 20px; display: flex; gap: 10px; }
.btn-small { padding: 8px 15px; background: var(--primary-color); color: white; border-radius: 8px; text-decoration: none; font-size: 0.8rem; font-weight: 600; display: flex; align-items: center; gap: 6px; transition: background-color 0.3s, box-shadow 0.3s; }
.btn-small:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.3); }
.btn-small.outline { background: transparent; border: 1px solid var(--primary-color); color: var(--primary-color);}
.btn-small.outline:hover { background: var(--accent-glow); color: white; }
.btn-small.disabled { background: rgba(255, 255, 255, 0.05); color: #666; pointer-events: none; border: 1px solid rgba(255, 255, 255, 0.1); }
.card-visual { height: 220px; min-height: 220px; overflow: hidden; transform: translateZ(10px); }
.card-visual img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.project-card:hover .card-visual img { transform: scale(1.1); }

/* --- Testimonials Section --- */
.testi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; max-width: 1000px; margin: 0 auto; }
.testi-card { background: var(--card-bg); padding: 40px; border-radius: 20px; border: 1px solid rgba(255, 255, 255, 0.05); text-align: center; display: flex; flex-direction: column; justify-content: center; }
.stars { color: #f59e0b; margin-bottom: 15px; font-size: 1.1rem; }
.testi-card p { font-style: italic; color: var(--text-gray); margin-bottom: 20px; font-size: 0.95rem; }
.testi-card h4 { color: var(--primary-color); font-size: 1.1rem; transition: color 0.3s; }

/* --- Contact Form --- */
.contact-box { background: linear-gradient(135deg, var(--accent-glow) 0%, transparent 100%); padding: 50px 20px; border-radius: 30px; border: 1px solid var(--accent-glow); text-align: center; max-width: 800px; margin: 0 auto; transition: background 0.3s, border-color 0.3s; }
.contact-box h2 { font-size: 2.2rem; margin-bottom: 10px; }
.contact-box p { color: var(--text-gray); margin-bottom: 30px; }
.contact-form { display: flex; flex-direction: column; gap: 20px; margin-bottom: 30px; }
.input-group { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.contact-form input, .contact-form textarea { width: 100%; padding: 15px 20px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 10px; color: var(--text-white); font-size: 1rem; outline: none; transition: 0.3s; }
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--primary-color); background: rgba(255, 255, 255, 0.1); }
.contact-form textarea { resize: none; }
.form-btn { border: none; cursor: pointer; width: 100%; justify-content: center; display: flex; align-items: center; gap: 10px; font-size: 1.1rem; }
.btn { text-decoration: none; padding: 15px 30px; border-radius: 10px; font-weight: 700; transition: 0.3s; }
.main-btn { background: var(--primary-color); color: white; box-shadow: 0 10px 25px var(--accent-glow); padding: 15px 30px; border-radius: 10px; font-weight: 700; border: none; transition: background-color 0.3s, box-shadow 0.3s; }
.main-btn:hover { transform: scale(1.02); }

.social-icons { display: flex; justify-content: center; gap: 15px; margin-top: 15px; flex-wrap: wrap;}
.social-icons a { display: inline-flex; justify-content: center; align-items: center; width: 45px; height: 45px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 50%; color: var(--text-gray); font-size: 1.2rem; text-decoration: none; transition: color 0.3s, border-color 0.3s, background-color 0.3s; }
.social-icons a:hover { background: var(--primary-color); color: white; border-color: var(--primary-color); }

/* ========================================== */
/* Footer & View Counter Styles               */
/* ========================================== */
footer {
    text-align: center;
    padding: 1rem; /* Reduced space a bit */
    background: transparent;
    color: #ffffff; 
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px; /* Reduced the gap */
    margin-top: 0px; /* The large space above was completely removed */
}
footer p {
    font-size: 0.9rem;
    opacity: 0.8;
}

.view-counter {
    display: inline-block;
    transition: transform 0.3s ease;
}

.view-counter:hover {
    transform: scale(1.05);
}

.view-counter img {
    height: 28px;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    footer {
        padding: 1.5rem 1rem;
    }
    .view-counter img {
        height: 24px;
    }
}

.back-to-top { position: fixed; bottom: 30px; right: 30px; width: 45px; height: 45px; background: var(--primary-color); color: white; border: none; border-radius: 50%; font-size: 1.2rem; display: flex; justify-content: center; align-items: center; opacity: 0; pointer-events: none; transition: opacity 0.3s ease, background-color 0.3s; z-index: 999; box-shadow: 0 5px 15px var(--accent-glow); }
.back-to-top.show { opacity: 1; pointer-events: auto; }

.whatsapp-float-btn { position: fixed; bottom: 30px; left: 30px; width: 55px; height: 55px; background-color: #25d366; color: #FFF; border-radius: 50%; text-align: center; font-size: 30px; box-shadow: 0 5px 15px rgba(37, 211, 102, 0.4); z-index: 10000; display: flex; justify-content: center; align-items: center; text-decoration: none; transition: transform 0.3s ease, background-color 0.3s ease; }
.whatsapp-float-btn:hover { transform: translateY(-5px) scale(1.05); background-color: #1ebe57; color: #fff; box-shadow: 0 8px 20px rgba(37, 211, 102, 0.6); }

.hidden { opacity: 0; transform: translateY(30px); transition: 1s ease-out; }
.show { opacity: 1; transform: translateY(0); }

/* --- Mobile Responsive Adjustments --- */
@media (max-width: 1024px) {
    .hero-content { flex-direction: column; text-align: center; gap: 30px; }
    .hero-left { flex-direction: column; gap: 15px; align-items: center; }
    .side-socials { flex-direction: row; justify-content: center; }
    .hero-right { align-items: center; gap: 20px; height: auto;}
    .glitch { text-align: center; font-size: 3rem;}
    .hero-text-title { text-align: center; }
    .hero-image-wrapper { width: 300px; height: 350px; margin: 0 auto;}
}

@media (max-width: 768px) {
    nav { padding: 15px 5%; flex-direction: column; gap: 15px; background: rgba(8, 8, 12, 0.95);}
    .nav-links { gap: 15px; flex-wrap: wrap; justify-content: center;}
    .nav-links a { font-size: 0.85rem; }
    .hero { height: auto; padding-top: 140px; padding-bottom: 60px; }
    .hero-text-name h1 { font-size: 2.8rem; }
    .glitch { font-size: 2.2rem; }
    .hero-image-wrapper { width: 250px; height: 300px; }
    
    .about, .services, .timeline-section, .skills, .projects, .testimonials, .github-stats, .contact { padding: 60px 5%; }
    .section-header h2, .about h2 { font-size: 2rem; }
    .input-group { grid-template-columns: 1fr; }
    
    .timeline::after { left: 15px; }
    .timeline-item { padding-left: 35px; padding-right: 0; }
    .timeline-dot { left: 7px; }
    
    .theme-switcher { top: auto; bottom: 25px; left: 50%; transform: translateX(-50%); flex-direction: row; padding: 10px 20px; box-shadow: 0 -5px 15px rgba(0,0,0,0.5); }
    .whatsapp-float-btn { bottom: 25px; left: 15px; width: 45px; height: 45px; font-size: 24px; }
    .back-to-top { bottom: 25px; right: 15px; width: 45px; height: 45px; }
    
    .custom-cursor { display: none; }
    * { cursor: auto; }
    .magnetic-item { transform: none !important; }
    .service-card, .project-card, .card-info, .card-visual { transform: none !important; }
}

@media (max-width: 480px) {
    .theme-switcher { bottom: 20px; padding: 8px 15px; gap: 12px; }
    .theme-btn { width: 18px; height: 18px; }
    .whatsapp-float-btn { bottom: 20px; left: 10px; width: 40px; height: 40px; font-size: 22px; }
    .back-to-top { bottom: 20px; right: 10px; width: 40px; height: 40px; font-size: 1rem; }
}