/* --- CSS VARIABLES FOR EASY THEMEING --- */
:root {
    --bg-color: #0f0f1a;
    --primary-color: #8a2be2;
    --secondary-color: #4a00e0;
    --text-color: #e0e0e0;
    --text-muted: #a0a0a0;
    --card-bg: rgba(255, 255, 255, 0.05);
    --border-color: rgba(255, 255, 255, 0.1);
    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'Lato', sans-serif;
}

/* --- GENERAL & RESET STYLES --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

h1, h2, h3 {
    font-family: var(--font-primary);
    font-weight: 700;
}

h1 {
    font-size: 3.5rem;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

h2.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
}

h2.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}


p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

/* --- ANIMATED BACKGROUND --- */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    z-index: -1;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(150px);
    opacity: 0.4;
}

.blob1 {
    width: 400px;
    height: 400px;
    background: var(--primary-color);
    top: -100px;
    left: -100px;
    animation: move 15s infinite alternate;
}

.blob2 {
    width: 500px;
    height: 500px;
    background: var(--secondary-color);
    bottom: -150px;
    right: -150px;
    animation: move 20s infinite alternate-reverse;
}

@keyframes move {
    from { transform: translate(0, 0) rotate(0deg); }
    to { transform: translate(200px, 100px) rotate(360deg); }
}


/* --- HEADER & NAVIGATION --- */
header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 100;
    padding: 1.5rem 0;
    background: transparent;
    transition: background 0.3s ease, backdrop-filter 0.3s ease;
}

header.scrolled {
    background: rgba(15, 15, 26, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-family: var(--font-primary);
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    color: var(--text-color);
    font-weight: 600;
    position: relative;
    padding-bottom: 5px;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
}

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


/* --- SECTIONS --- */
section {
    padding: 6rem 0;
    min-height: 100vh;
}

/* --- HERO SECTION --- */
#hero {
    display: flex;
    align-items: center;
}

#hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-content h3 {
    font-size: 1.5rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-family: var(--font-secondary);
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image .image-wrapper {
    width: 350px;
    height: 350px;
    border-radius: 50%;
    overflow: hidden;
    border: 5px solid var(--border-color);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 5px;
    box-shadow: 0 0 30px rgba(74, 0, 224, 0.5);
}

.profile-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.hero-image-mobile { display: none; }


/* --- ABOUT SECTION --- */
#about .container {
    max-width: 900px;
}

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

.about-img {
    flex-basis: 300px;
    flex-shrink: 0;
}

.profile-img {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.skills h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-tag {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}


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

.project-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: var(--primary-color);
}

.project-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.project-info p {
    flex-grow: 1;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.project-tag {
    background-color: var(--bg-color);
    color: var(--text-muted);
    font-size: 0.8rem;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}


/* --- CONTACT SECTION --- */
#contact .container {
    text-align: center;
    max-width: 700px;
}

.contact-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}


/* --- FOOTER --- */
footer {
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
    margin-top: 4rem;
}

footer p {
    font-size: 0.9rem;
    margin-top: 1rem;
    color: var(--text-muted);
}


/* --- BUTTONS & SOCIAL ICONS --- */
.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-top: 1.5rem;
}

.btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(74, 0, 224, 0.4);
    color: #fff;
}

.project-card .btn {
    margin-top: auto; /* Pushes button to bottom of card */
    align-self: flex-start;
}

.social-icons {
    margin-top: 2rem;
}

.social-icon {
    color: var(--text-muted);
    font-size: 1.5rem;
    margin: 0 0.75rem;
    transition: all 0.3s ease;
}

.social-icon:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

footer .social-icons {
    margin-top: 0;
}

/* --- FADE-IN ANIMATION --- */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}


/* --- RESPONSIVE DESIGN --- */
@media (max-width: 768px) {
    h1 { font-size: 2.8rem; }
    h2.section-title { font-size: 2rem; }

    .nav-links { display: none; } /* Add mobile menu logic if needed */

    #hero .container { flex-direction: column; text-align: center; }
    .hero-image { display: none; }
    .hero-image-mobile {
        display: block;
        margin: 0 auto 2rem;
        width: 200px;
        height: 200px;
    }
    .hero-image-mobile .profile-hero-img {
        width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
        border: 4px solid var(--border-color);
    }
    .social-icons { justify-content: center; }

    .about-content { flex-direction: column; }
    .about-img { max-width: 250px; margin-bottom: 2rem; }
}