/* --- UNIVERSAL STYLES & VARIABLES --- */
:root {
    --primary-color: #00aaff;
    --bg-color: #0f172a;
    --surface-color: rgba(30, 41, 59, 0.7);
    --text-color: #cbd5e1;
    --heading-color: #f8fafc;
    --border-color: rgba(51, 65, 85, 0.7);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.7;
}

/* --- CUSTOM SCROLLBAR --- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-color); }
::-webkit-scrollbar-thumb { background: var(--primary-color); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #0088cc; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
section { padding: 80px 0; }

.section-title { text-align: center; font-size: 2.8rem; color: var(--heading-color); margin-bottom: 60px; font-weight: 700; position: relative; }
.section-title::after { content: ''; position: absolute; bottom: -15px; left: 50%; transform: translateX(-50%); width: 80px; height: 4px; background: var(--primary-color); border-radius: 2px; }

/* --- PARTICLE JS BACKGROUND --- */
#particles-js { position: fixed; width: 100%; height: 100%; top: 0; left: 0; z-index: -1; }

/* --- HEADER --- */
header { position: fixed; top: 0; left: 0; width: 100%; padding: 20px 0; z-index: 1000; transition: background-color 0.4s ease, backdrop-filter 0.4s ease, transform 0.4s ease, padding 0.4s ease; }
header.scrolled { background-color: rgba(15, 23, 42, 0.8); backdrop-filter: blur(10px); box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1); }
header.header-hidden { transform: translateY(-100%); }
header .container { display: flex; justify-content: space-between; align-items: center; }
header .logo { font-size: 1.8rem; font-weight: 700; color: var(--heading-color); text-decoration: none; }
header nav { display: block; } /* Show nav container on desktop */
header nav ul { display: flex; list-style: none; }
header nav ul li { margin-left: 30px; }
header nav ul li a { color: var(--text-color); text-decoration: none; font-weight: 500; transition: color 0.3s ease; }
header nav ul li a:hover { color: var(--primary-color); }
.hamburger-menu { display: none; cursor: pointer; }
.hamburger-menu .bar { width: 25px; height: 3px; background-color: var(--heading-color); margin: 5px 0; transition: 0.4s; }

/* --- HOME SECTION --- */
#home { height: 100vh; display: flex; justify-content: center; align-items: center; text-align: center; }
#home h1 { font-size: 4.5rem; color: var(--heading-color); margin-bottom: 1rem; }
#home p { font-size: 1.8rem; margin-bottom: 2rem; }
.typing-text { color: var(--primary-color); font-weight: 600; }
.social-links { margin-bottom: 2.5rem; }
.social-links a { color: var(--text-color); font-size: 1.8rem; margin: 0 15px; transition: color 0.3s ease, transform 0.3s ease; }
.social-links a:hover { color: var(--primary-color); transform: translateY(-5px); }
.cta-button { background: var(--primary-color); color: var(--heading-color); padding: 14px 35px; border-radius: 50px; text-decoration: none; font-weight: 600; transition: all 0.3s ease; border: 2px solid var(--primary-color); }
.cta-button:hover { background: transparent; color: var(--primary-color); }

/* --- ABOUT SECTION --- */
.about-content { display: flex; align-items: center; gap: 50px; flex-wrap: wrap; }
.about-image-container { flex: 1; min-width: 300px; text-align: center; }
.profile-pic-new { width: 100%; max-width: 350px; height: auto; mask-image: linear-gradient(to bottom, black 70%, transparent 100%); -webkit-mask-image: linear-gradient(to bottom, black 70%, transparent 100%); transition: transform 0.3s ease; }
.profile-pic-new:hover { transform: scale(1.05); }
.about-text-container { flex: 2; min-width: 300px; }
.about-text-container h3 { font-size: 1.8rem; color: var(--heading-color); margin-bottom: 1rem; }
.wave { animation: wave-animation 2.5s infinite; transform-origin: 70% 70%; display: inline-block; }
@keyframes wave-animation { 0% { transform: rotate(0.0deg) } 10% { transform: rotate(14.0deg) } 20% { transform: rotate(-8.0deg) } 30% { transform: rotate(14.0deg) } 40% { transform: rotate(-4.0deg) } 50% { transform: rotate(10.0deg) } 60% { transform: rotate(0.0deg) } 100% { transform: rotate(0.0deg) } }

/* --- SERVICE & PORTFOLIO CARDS --- */
.services-grid, .portfolio-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.service-card, .project-card { background: var(--surface-color); padding: 30px; border-radius: 15px; border: 1px solid var(--border-color); backdrop-filter: blur(10px); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.service-card:hover, .project-card:hover { transform: translateY(-10px); box-shadow: 0 0 40px rgba(0, 170, 255, 0.3); }
.service-card .icon { font-size: 3rem; color: var(--primary-color); margin-bottom: 1.5rem; }
.service-card h3, .project-card h3 { color: var(--heading-color); font-size: 1.4rem; margin-bottom: 1rem; }
.project-card img { width: 100%; height: 200px; object-fit: cover; border-radius: 10px; margin-bottom: 1.5rem; }
.project-card a { color: var(--primary-color); text-decoration: none; font-weight: 600; }

/* --- SKILLS SECTION --- */
.skills-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; list-style: none; }
.skills-list li { background: var(--surface-color); color: var(--text-color); padding: 12px 25px; border-radius: 50px; font-weight: 500; border: 1px solid var(--border-color); transition: all 0.3s ease; }
.skills-list li:hover { background-color: var(--primary-color); color: var(--heading-color); transform: scale(1.05); }

/* --- CONTACT SECTION --- */
.contact-wrapper { display: grid; grid-template-columns: 1fr 1.5fr; gap: 50px; background: var(--surface-color); padding: 40px; border-radius: 15px; border: 1px solid var(--border-color); }
.contact-info h3 { color: var(--heading-color); font-size: 1.6rem; margin-bottom: 1rem; }
.info-item { display: flex; align-items: center; margin-bottom: 1.5rem; }
.info-item i { color: var(--primary-color); font-size: 1.5rem; margin-right: 15px; }
.info-item a, .info-item span { color: var(--text-color); text-decoration: none; transition: color 0.3s ease; }
.info-item a:hover { color: var(--primary-color); }
.contact-form input, .contact-form textarea { width: 100%; background: var(--bg-color); border: 1px solid var(--border-color); border-radius: 8px; padding: 15px; color: var(--text-color); font-family: 'Poppins', sans-serif; margin-bottom: 20px; }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--primary-color); }

/* --- FOOTER --- */
footer { padding: 30px 0; text-align: center; border-top: 1px solid var(--border-color); }

/* --- BACK TO TOP BUTTON --- */
.back-to-top-btn { position: fixed; bottom: 30px; right: 30px; background-color: var(--primary-color); color: white; width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; text-decoration: none; opacity: 0; visibility: hidden; transition: opacity 0.4s, visibility 0.4s, transform 0.4s; z-index: 999; }
.back-to-top-btn.visible { opacity: 1; visibility: visible; }
.back-to-top-btn:hover { transform: scale(1.1); }

/* --- ANIMATIONS --- */
.fade-in-on-scroll { opacity: 0; transform: translateY(40px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.fade-in-on-scroll.is-visible { opacity: 1; transform: translateY(0); }
.fade-in-on-load { animation: fadeInAnimation 0.8s 0.2s ease-out forwards; opacity: 0; }
@keyframes fadeInAnimation { to { opacity: 1; } }

/* --- PROJECT PAGE STYLES --- */
.project-header { padding-top: 120px; padding-bottom: 40px; text-align: center; }
.project-header h1 { font-size: 3.5rem; margin-bottom: 1rem; }
.project-header p { font-size: 1.2rem; color: var(--primary-color); }
.project-content-wrapper { background: var(--surface-color); padding: 40px; border-radius: 15px; border: 1px solid var(--border-color); backdrop-filter: blur(10px); margin-bottom: 40px; }
.project-banner img { width: 100%; border-radius: 10px; margin-bottom: 40px; }
.project-details { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; }
.description h2 { color: var(--heading-color); margin-bottom: 1rem; border-bottom: 2px solid var(--primary-color); padding-bottom: 10px; }
.key-features-list { list-style: none; padding-left: 0; }
.key-features-list li { padding-left: 30px; position: relative; margin-bottom: 10px; }
.key-features-list li::before { content: '✔'; position: absolute; left: 0; color: var(--primary-color); font-weight: bold; }
.project-meta { background: rgba(15, 23, 42, 0.8); padding: 30px; border-radius: 10px; }
.project-meta h3 { margin-bottom: 1.5rem; }
.project-meta p { margin-bottom: 1rem; }
.project-meta i { margin-right: 10px; }
.back-link { display: block; text-align: center; margin-top: 40px; color: var(--primary-color); text-decoration: none; font-weight: 600; }

/* --- RESPONSIVE DESIGN & MOBILE MENU --- */
@media (max-width: 992px) {
    .project-details { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    section { padding: 60px 0; }
    #home h1 { font-size: 2.8rem; }
    #home p { font-size: 1.2rem; }
    header { padding: 15px 0; }
    header.scrolled { padding: 10px 0; }
    header nav { display: none; } /* Hide nav container on mobile */
    .hamburger-menu { display: block; }
    .nav-list { position: absolute; top: 100%; right: 0; width: 100%; flex-direction: column; background-color: rgba(15, 23, 42, 0.98); backdrop-filter: blur(10px); text-align: center; max-height: 0; overflow: hidden; transition: max-height 0.5s ease-in-out; }
    .nav-list.active { max-height: 300px; }
    .nav-list li { margin: 0; }
    .nav-list li a { display: block; padding: 1.2rem; border-bottom: 1px solid var(--border-color); }
    .about-content { flex-direction: column; text-align: center; }
    .contact-wrapper { grid-template-columns: 1fr; }
    .project-header h1 { font-size: 2.5rem; }
    .project-content-wrapper { padding: 20px; }
}

/* --- FORM STATUS MESSAGE --- */
#form-status { text-align: center; margin-top: 20px; padding: 15px; border-radius: 8px; font-weight: 500; display: none; transition: all 0.5s ease; }
#form-status.success { background-color: rgba(34, 197, 94, 0.2); color: #22c55e; border: 1px solid #22c55e; display: block; }
#form-status.error { background-color: rgba(239, 68, 68, 0.2); color: #ef4444; border: 1px solid #ef4444; display: block; }