/* --- NEW MODERN DARK THEME --- */

/* --- Base & Variables --- */
:root {
    --primary-accent: #8A2BE2; /* Vibrant Purple */
    --secondary-accent: #4D4DFF; /* Bright Blue */
    --text-primary: #EAEAEA;
    --text-secondary: #B0B0B0;
    --bg-dark: #0D0D1A;
    --bg-medium: #1A1A2E;
    --bg-light: #24243D;
    --border: #33334D;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    transition: background-color 0.3s ease;
}

/* --- Navigation --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(13, 13, 26, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-accent);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-accent);
    transition: width 0.3s ease;
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-primary);
    z-index: 1002; /* Ensure it's above the nav bar */
    position: relative;
}

/* --- Mobile Navigation Menu --- */
.mobile-nav-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1001;
    transform: translateY(-100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.mobile-nav-menu.active {
    transform: translateY(0);
}

.mobile-nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 2rem;
    margin: 1.5rem 0;
    transition: color 0.3s ease;
}

.mobile-nav-link:hover {
    color: var(--primary-accent);
}


/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: var(--bg-dark);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 15% 85%, rgba(138, 43, 226, 0.15) 0%, transparent 40%),
                radial-gradient(circle at 85% 20%, rgba(77, 77, 255, 0.15) 0%, transparent 40%);
    z-index: 1;
}

.hero-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
    z-index: 2;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text-primary);
    line-height: 1.2;
}

.hero-title span {
    color: var(--primary-accent);
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--primary-accent);
    margin-bottom: 2rem;
    font-weight: 500;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: flex-start; /* Align to start on desktop */
}

.hero-avatar {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-accent), var(--secondary-accent));
    padding: 8px;
    box-shadow: 0 0 30px rgba(138, 43, 226, 0.4);
}

.hero-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--bg-dark);
}

.tech-stack {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: flex-start; /* Default for desktop */
    margin-top: 2.5rem; /* Add spacing */
}

.tech-item {
    background: var(--bg-medium);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    font-size: 0.9rem;
    font-weight: 500;
}

/* --- General Section & Button Styles --- */
.section {
    padding: 6rem 2rem;
}

.section-title {
    font-size: 2.8rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 4rem;
    color: var(--primary-accent);
}

.btn {
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(90deg, var(--primary-accent), var(--secondary-accent));
    color: white;
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(138, 43, 226, 0.5);
}

.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--primary-accent);
    color: var(--primary-accent);
}

/* --- About Section --- */
#about {
    max-width: 1000px;
    margin: 0 auto;
}

.about-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 4rem;
    align-items: center;
}

.about-image {
    text-align: center;
}

.about-photo {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--border);
    box-shadow: var(--shadow-lg);
}

.about-content h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.about-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

/* --- Skills Grid --- */
.skills-grid {
    max-width: 1000px;
    margin: 5rem auto 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.skill-category {
    background: var(--bg-medium);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.skill-category h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--primary-accent);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-tag {
    background: var(--bg-light);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* --- Projects Section --- */
#projects {
    max-width: 1200px;
    margin: 0 auto;
}

.projects-grid {
    display: grid;
    gap: 5rem;
}

.project-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

/* Alternating layout for projects */
.project-card:nth-child(even) {
    direction: rtl; /* Reverses the order of columns */
}

.project-card:nth-child(even) * {
    direction: ltr; /* Resets text direction for content */
}

.project-image-container {
    background: var(--bg-medium);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.project-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
}

.project-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.project-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.tech-badge {
    background: var(--bg-light);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.9rem;
    border: 1px solid var(--border);
}

.project-link {
    color: var(--primary-accent);
    text-decoration: none;
    font-weight: 600;
}

/* --- Contact Section --- */
.contact {
    background: var(--bg-medium);
}

.contact-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.form-input, .form-textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: var(--bg-light);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.form-input:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--primary-accent);
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 3rem;
}

.social-link {
    width: 50px;
    height: 50px;
    background: var(--bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--primary-accent);
    transform: translateY(-3px);
}

.social-link svg {
    width: 24px;
    height: 24px;
    fill: var(--text-secondary);
    transition: fill 0.3s ease;
}

.social-link:hover svg {
    fill: white;
}

/* --- Footer --- */
.footer {
    background: var(--bg-dark);
    color: var(--text-secondary);
    text-align: center;
    padding: 2rem;
    border-top: 1px solid var(--border);
}

/* --- Scroll Indicator --- */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-accent), var(--secondary-accent));
    transform-origin: left;
    transform: scaleX(0);
    z-index: 9999;
    transition: transform 0.1s ease-out;
}

/* --- Responsive Design --- */
@media (max-width: 900px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-image {
        grid-row: 1;
        margin-bottom: 2rem;
    }
    .hero-avatar {
        width: 250px;
        height: 250px;
        margin: 0 auto;
    }
    .hero-cta {
        justify-content: center; /* Center buttons on mobile */
    }
    .tech-stack {
        justify-content: center; /* Center on mobile */
    }
    .about-grid {
        grid-template-columns: 1fr;
    }
    .about-image {
        margin-bottom: 2rem;
    }
    .project-card, .project-card:nth-child(even) {
        grid-template-columns: 1fr;
        direction: ltr;
    }
}

@media (max-width: 768px) {
    .nav-menu { display: none; }
    .mobile-menu-btn { display: block; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 2.8rem; }
    .section-title { font-size: 2.2rem; }
    .nav-container { padding: 1rem; }
    .hero-cta {
        flex-direction: column; /* Stack buttons vertically */
    }
}
