/* =========================================
   1. CSS Variables & Reset
========================================= */
:root {
    --bg-main: #0b0f19;
    --bg-secondary: #111827;
    --text-main: #f9fafb;
    --text-muted: #9ca3af;
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --gradient-primary: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

html {
    scroll-behavior: smooth;
}

/* =========================================
   2. Typography & Utility Classes
========================================= */
h1,
h2,
h3 {
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.section {
    padding: 100px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 60px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    width: 100%;
    position: relative;
}

/* Background for alternate sections */
.bg-light {
    background-color: var(--bg-secondary);
    max-width: 100%;
}

.bg-light .section-title {
    padding-top: 100px;
}

/* Button Styling (Gradient Pill) */
.btn {
    display: inline-block;
    padding: 14px 32px;
    background: var(--gradient-primary);
    color: #fff;
    border-radius: 50px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.5);
}

/* =========================================
   3. Navigation Bar (Glassmorphism)
========================================= */
#navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    background: rgba(11, 15, 25, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
}

.logo {
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links li a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: var(--transition);
    position: relative;
}

.nav-links li a:hover {
    color: var(--text-main);
}

.nav-links li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background: var(--gradient-primary);
    transition: var(--transition);
}

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

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 2px;
    margin: 6px auto;
    background-color: var(--text-main);
    transition: var(--transition);
}

/* =========================================
   4. Hero (Home) Section
========================================= */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 180px 50px 100px;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
}

/* Ambient Background Glow */
.hero::before {
    content: '';
    position: absolute;
    top: 20%;
    left: 10%;
    width: 400px;
    height: 400px;
    background: var(--accent-blue);
    filter: blur(150px);
    border-radius: 50%;
    opacity: 0.15;
    z-index: -1;
}

.hero-content {
    flex: 1.2;
    padding-right: 40px;
}

.hero-content h1 {
    font-size: 4.5rem;
    margin-bottom: 20px;
    letter-spacing: -1.5px;
}

.hero-content h1 span {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 500px;
}

.hero-image {
    flex: 1;
    text-align: center;
    position: relative;
}

.hero-image::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 320px;
    height: 320px;
    background: var(--accent-purple);
    filter: blur(100px);
    border-radius: 50%;
    opacity: 0.2;
    z-index: -1;
}

.hero-image img {
    border-radius: 30px;
    width: 350px;
    height: 450px;
    object-fit: cover;
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    transform: perspective(1000px) rotateY(-5deg);
    transition: var(--transition);
}

.hero-image img:hover {
    transform: perspective(1000px) rotateY(0deg) scale(1.02);
}

/* =========================================
   5. About Me Section
========================================= */
.about-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.2rem;
    color: var(--text-muted);
}

.about-content p {
    margin-bottom: 25px;
}

.about-content strong {
    color: var(--text-main);
    font-weight: 600;
}

/* =========================================
   6. Skills Section (Glass Cards)
========================================= */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 100px;
}

.skill-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition);
}

.skill-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.skill-card:hover::before {
    transform: scaleX(1);
}

.skill-card h3 {
    margin-bottom: 20px;
    font-size: 1.5rem;
    color: var(--text-main);
}

.skill-card p {
    color: var(--text-muted);
    font-size: 1rem;
}

/* =========================================
   7. Projects Section
========================================= */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
}

.project-card {
    background: var(--bg-secondary);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(139, 92, 246, 0.3);
}

.project-card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-bottom: 1px solid var(--glass-border);
    transition: var(--transition);
}

.project-card:hover img {
    transform: scale(1.05);
}

.project-info {
    padding: 30px;
    position: relative;
    background: var(--bg-secondary);
    z-index: 2;
}

.project-info h3 {
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.project-info p {
    color: var(--text-muted);
}

/* =========================================
   8. Experience / Timeline Section
========================================= */
.timeline {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px 100px;
    border-left: 2px solid var(--glass-border);
}

.timeline li {
    position: relative;
    padding-left: 40px;
    margin-bottom: 40px;
}

.timeline li::before {
    content: '';
    position: absolute;
    left: -9px;
    top: 0;
    width: 16px;
    height: 16px;
    background: var(--bg-main);
    border: 2px solid var(--accent-purple);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-purple);
}

.timeline-content {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 30px;
    border-radius: 15px;
    transition: var(--transition);
}

.timeline-content:hover {
    border-color: rgba(59, 130, 246, 0.4);
    transform: translateX(10px);
}

.timeline-content h3 {
    color: var(--text-main);
    margin-bottom: 10px;
}

.timeline-content p {
    color: var(--text-muted);
}

/* =========================================
   9. Contact Form
========================================= */
.contact-container {
    max-width: 650px;
    margin: 0 auto;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 50px;
    border-radius: 20px;
}

.input-group {
    margin-bottom: 25px;
}

.input-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 16px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.input-group input:focus,
.input-group textarea:focus {
    outline: none;
    border-color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.05);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

/* =========================================
   10. Footer
========================================= */
footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
    text-align: center;
    padding: 60px 20px;
}

.social-links {
    margin-bottom: 30px;
}

.social-links a {
    margin: 0 15px;
    font-weight: 500;
    color: var(--text-main);
    transition: var(--transition);
    font-size: 1.1rem;
}

.social-links a:hover {
    color: var(--accent-blue);
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

/* =========================================
   11. Mobile Responsiveness
========================================= */
@media (max-width: 768px) {
    #navbar {
        padding: 20px;
        background: rgba(11, 15, 25, 0.95);
    }

    .nav-links {
        position: fixed;
        right: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--bg-secondary);
        width: 100%;
        text-align: center;
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        border-bottom: 1px solid var(--glass-border);
        padding: 30px 0;
        gap: 20px;
    }

    .nav-links.active {
        right: 0;
    }

    .hamburger {
        display: block;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero {
        flex-direction: column-reverse;
        text-align: center;
        padding-top: 140px;
    }

    .hero-content {
        padding-right: 0;
    }

    .hero-content h1 {
        font-size: 3rem;
    }

    .hero-image {
        margin-bottom: 50px;
    }

    .hero-image img {
        width: 280px;
        height: 280px;
        border-radius: 50%;
    }

    .section-title {
        font-size: 2.5rem;
    }

    .contact-container {
        padding: 30px 20px;
    }
}

/* =========================================
   12. Simple Scroll Animations
========================================= */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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