/* =========================================
   CSS Variables & Resets
========================================= */
:root {
    /* Color Palette - Light Mode */
    --primary-color: #4f46e5;
    --secondary-color: #3b82f6;
    --bg-color: #ffffff;
    --bg-light: #f8fafc;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --card-bg: #ffffff;
    
    /* Gradients & Shadows */
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Typography */
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* =========================================
   Typography & Utilities
========================================= */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--text-main);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--gradient-primary);
    margin: 10px auto 0;
    border-radius: 2px;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 5rem 2rem;
}

.bg-light {
    background-color: var(--bg-light);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 30px;
    font-weight: 500;
    font-family: var(--font-body);
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

/* =========================================
   Navigation
========================================= */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: box-shadow 0.3s ease;
}

nav.scrolled {
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.2rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--text-main);
}

.logo span {
    color: var(--primary-color);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    font-size: 1rem;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-main);
}

/* =========================================
   Hero Section
========================================= */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 2rem;
    background: radial-gradient(circle at center, #f8fafc 0%, #ffffff 100%);
    margin-top: 60px; /* Offset for fixed nav */
}

.hero-container {
    max-width: 1100px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    margin: 0 auto;
}

.hero-text {
    flex: 1;
    text-align: left;
}

.greeting {
    font-size: 1.2rem;
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.name {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.role {
    font-size: 1.5rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.summary {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
    margin-bottom: 2rem;
}

.social-icons a {
    font-size: 1.5rem;
    margin-right: 20px;
    color: var(--text-muted);
}

.social-icons a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
    display: inline-block;
}

/* Hero Image Styling */
.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-wrapper {
    position: relative;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    padding: 8px;
    background: var(--gradient-primary); /* Creates a gradient ring around the image */
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease;
}

.image-wrapper:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 6px solid var(--bg-color); /* Creates space between the image and gradient ring */
}

/* =========================================
   About Section
========================================= */
.about-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
}

.about-text p {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.education-list {
    list-style: none;
    margin-top: 1.5rem;
}

.education-list li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.education-list i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: 5px;
}

.education-list strong {
    display: block;
    color: var(--text-main);
    font-size: 1.1rem;
}

.education-list span {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* =========================================
   Skills Section (Categorized Cards)
========================================= */
.skills-category-grid {
    display: grid;
    /* Adjusts to 1 column on mobile, 2 columns on desktop */
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.skill-category-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid #f1f5f9;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.category-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--bg-light);
}

.category-header i {
    font-size: 1.8rem;
    color: var(--primary-color);
}

.category-header h3 {
    font-size: 1.3rem;
    color: var(--text-main);
    font-family: var(--font-heading);
}

/* Progress Bar Styles */
.category-body .skill-item {
    margin-bottom: 1.2rem;
}

.category-body .skill-item:last-child {
    margin-bottom: 0;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.95rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 4px;
    transition: width 1s ease-in-out;
}

/* Tags Styles for Data Structures Section */
.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.skill-tag {
    background: var(--bg-light);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid rgba(79, 70, 229, 0.15);
    transition: all 0.3s ease;
    cursor: default;
}

.skill-tag:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* =========================================
   Projects Section
========================================= */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 1px solid #f1f5f9;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.project-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.project-card p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.project-tags span {
    background: var(--bg-light);
    color: var(--primary-color);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.btn-github {
    display: inline-block;
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.95rem;
}

.btn-github:hover {
    color: var(--primary-color);
}

/* =========================================
   Certifications Section
========================================= */
.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.cert-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease;
}

.cert-card:hover {
    transform: translateY(-5px);
}

.cert-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.cert-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.cert-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* =========================================
   Contact Section
========================================= */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.contact-info p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.info-item {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.info-item i {
    font-size: 1.2rem;
    color: var(--primary-color);
    background: var(--bg-light);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.contact-form .input-group {
    margin-bottom: 1.5rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background: var(--bg-light);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--bg-color);
}

/* =========================================
   Footer
========================================= */
footer {
    background: var(--text-main);
    color: white;
    text-align: center;
    padding: 2rem;
    font-size: 0.9rem;
}

/* =========================================
   Animations (Scroll Reveal)
========================================= */
.section-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.section-reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   Responsive Design (Mobile & Tablet)
========================================= */
@media screen and (max-width: 768px) {
    /* Navigation */
    .nav-links {
        display: none; 
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-color);
        padding: 2rem;
        box-shadow: var(--shadow-md);
        text-align: center;
    }
    
    .nav-links.active {
        display: flex;
    }

    .hamburger {
        display: block;
    }

    /* Hero Section */
    .hero-container {
        flex-direction: column-reverse; /* Stacks the image on top of the text */
        text-align: center;
        margin-top: 2rem;
        gap: 2rem;
    }

    .hero-text {
        text-align: center;
    }

    .name {
        font-size: 2.8rem;
    }

    .image-wrapper {
        width: 250px; /* Scaled down for mobile */
        height: 250px;
        margin: 0 auto; /* Centers the image */
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .social-icons {
        text-align: center;
        margin-top: 1.5rem;
        display: flex;
        justify-content: center;
    }

    .social-icons a {
        margin: 0 15px;
    }

    /* Contact Section */
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}