/*
    ======================================
    1. GLOBAL STYLES & RESET
    ======================================
*/
:root {
    --primary-color: #007bff; 
    --secondary-color: #28a745; 
    --text-dark: #333;
    --text-light: #f4f4f4;
    --bg-light: #f9f9f9;
    --bg-dark: #222;
    --card-bg: #fff;
    --highlight-color: #ffc107;
    --font-family: 'Poppins', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-light);
    scroll-behavior: smooth;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

a:hover {
    color: #0056b3;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 80px 0;
}

.bg-light {
    background-color: var(--bg-light);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
    color: var(--text-dark);
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 50px;
}

/*
    ======================================
    2. STICKY NAV BAR (HEADER)
    ======================================
*/
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--card-bg);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-dark);
}

.navbar nav ul {
    display: flex;
}

.navbar nav ul li a {
    color: var(--text-dark);
    font-weight: 600;
    padding: 10px 15px;
    font-size: 1rem;
    position: relative;
}

.navbar nav ul li a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    background-color: var(--primary-color);
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.navbar nav ul li a:hover:after,
.navbar nav ul li a.active:after {
    width: 100%;
}

/*
    ======================================
    3. BUTTONS
    ======================================
*/
.btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    font-weight: 600;
    text-transform: uppercase;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    margin-right: 15px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--text-light);
    border: 2px solid var(--primary-color);
}

.btn-primary:hover {
    background-color: #0056b3;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.4);
    color: white;
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--text-light);
}

.btn-highlight {
    background-color: var(--highlight-color);
    color: var(--text-dark);
    border: 2px solid var(--highlight-color);
    margin-top: 15px;
}
.btn-highlight:hover {
    background-color: #e0b400;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.4);
}

/*
    ======================================
    4. HOME SECTION (HERO)
    ======================================
*/
.hero {
    background: linear-gradient(135deg, var(--bg-light) 0%, #e0e0e0 100%);
    padding: 100px 0;
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.hero-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
}

.hero-content .text-content {
    flex: 1;
}

.hero-content .text-content .greeting {
    font-size: 1.2rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 5px;
}

.hero-content .text-content h1 {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.hero-content .text-content .subtitle {
    font-size: 1.7rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 20px;
}

.hero-content .text-content .description {
    font-size: 1.1rem;
    margin-bottom: 30px;
    max-width: 550px;
}

.hero-content .image-content {
    flex-shrink: 0;
    max-width: 400px;
    text-align: center;
    position: relative;
}

.hero-content .image-content .profile-image {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    filter: grayscale(10%);
    transition: transform 0.3s ease;
}

.hero-content .image-content .profile-image:hover {
    transform: translateY(-5px);
    filter: grayscale(0%);
}

/*
    ======================================
    5. BUSINESS HIGHLIGHT SECTION
    ======================================
*/
.business-highlight {
    padding: 40px 0;
    background-color: var(--primary-color);
}

.highlight-box {
    background-color: var(--text-light);
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.highlight-box i {
    font-size: 3rem;
    color: var(--highlight-color);
    margin-bottom: 15px;
}

.highlight-box h3 {
    font-size: 1.8rem;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.highlight-box p {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto 20px;
}


/*
    ======================================
    6. ABOUT SECTION
    ======================================
*/
.about-content {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.about-text {
    flex: 1;
    font-size: 1.1rem;
}

.about-text h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: 25px;
    margin-bottom: 10px;
}

.about-text .intro-paragraph {
    font-style: italic;
    font-weight: 600;
    margin-bottom: 20px;
    color: #555;
}

.about-text ul li {
    padding: 8px 0;
    border-bottom: 1px dashed #ddd;
}
.about-text ul li i {
    color: var(--secondary-color);
    margin-right: 10px;
}

/*
    ======================================
    7. SKILLS SECTION (GROWING SLIDER ANIMATION & PERCENTAGE FIX)
    ======================================
*/
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.skill-category {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.skill-category h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.skill-category i {
    margin-right: 10px;
}

.skill-item {
    margin-bottom: 20px;
}

.skill-name {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 1rem;
}

.skill-bar {
    background-color: #ddd;
    border-radius: 5px;
    height: 20px; 
    position: relative;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background-color: var(--secondary-color);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    /* FIX: Set initial width to 0 and apply animation: forwards */
    width: 0; 
    animation: skill-fill 1.5s ease-out forwards;
    /* The final width is set by the inline style in HTML, e.g., style="width: 95%;" */
}

/* Base style for progress bar text */
.skill-progress span {
    color: var(--text-light);
    font-size: 0.85rem;
    font-weight: 700;
    padding-right: 8px;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
    opacity: 1;
    transition: opacity 0.5s ease;
}

/* Keyframes for the skill progress bar animation (starts at 0, finishes at the inline width due to 'forwards') */
@keyframes skill-fill {
    from { 
        width: 0; 
    }
    to { 
        /* Targets the final inline width set in HTML, essential for persistence with 'forwards' */
        width: 100%; 
    }
}

.ai-note {
    font-size: 0.9rem;
    color: #777;
    margin-top: 15px;
    font-style: italic;
}


/*
    ======================================
    8. PROJECTS SECTION
    ======================================
*/
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.project-card {
    display: block; 
    background-color: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.project-card img {
    width: 100%;
    height: 220px; 
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover img {
    transform: scale(1.05);
}

.project-info {
    padding: 20px;
}

.project-info h4 {
    font-size: 1.3rem;
    margin-bottom: 5px;
    color: var(--text-dark);
}

.project-info p {
    color: #666;
    margin-bottom: 10px;
}

.project-tag {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.85rem;
    font-weight: 600;
}

/*
    ======================================
    9. CONTACT SECTION
    ======================================
*/
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 50px;
    align-items: flex-start;
}

.contact-details h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.contact-details p {
    font-size: 1.1rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.contact-details i {
    color: var(--secondary-color);
    margin-right: 15px;
    font-size: 1.2rem;
}

.social-links {
    margin-top: 30px;
}

.social-links a {
    display: inline-block;
    width: 45px;
    height: 45px;
    line-height: 45px;
    text-align: center;
    background-color: var(--text-dark);
    color: var(--text-light);
    border-radius: 50%;
    font-size: 1.2rem;
    margin-right: 10px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.social-links a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px) scale(1.1);
}

.contact-form-container h3 {
    font-size: 1.8rem;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    font-family: var(--font-family);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 8px rgba(0, 123, 255, 0.2);
    outline: none;
}

.contact-form .btn-primary {
    width: 100%;
}


/*
    ======================================
    10. FOOTER
    ======================================
*/
footer {
    background-color: var(--bg-dark);
    color: #aaa;
    text-align: center;
    padding: 30px 0;
    font-size: 0.9rem;
}

footer i {
    color: #ff6b6b; 
}


/*
    ======================================
    11. BASIC SCROLL-IN ANIMATIONS (CSS ONLY FIX)
    ======================================
*/
/* Fade in from bottom animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    opacity: 0; 
    /* FIX: animation-fill-mode: forwards; is crucial to ensure the animation stays in its 'to' state */
    animation: fadeInUp 1s ease-out forwards;
}

/* Simple fade-in */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-fade-in {
    opacity: 0;
    /* FIX: animation-fill-mode: forwards; is crucial to ensure the animation stays in its 'to' state */
    animation: fadeIn 1.5s ease-out forwards;
}

/*
    ======================================
    12. MEDIA QUERIES (RESPONSIVENESS)
    ======================================
*/
@media (max-width: 992px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
    }

    .hero-content .image-content {
        order: -1; 
        margin-bottom: 40px;
    }

    .hero-content .text-content h1 {
        font-size: 3rem;
    }

    .hero-content .text-content .subtitle {
        font-size: 1.4rem;
    }

    .navbar nav {
        display: none; 
    }

    .navbar .container {
        justify-content: center;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .skill-category {
        padding: 20px;
    }

}

@media (max-width: 768px) {
    .section-padding {
        padding: 60px 0;
    }

    .section-title {
        font-size: 2rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .contact-details, .contact-form-container {
        padding: 0;
    }
}