/* ===================================
   Global Styles & Reset
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
}

.stats-grid,
.badges-grid,
.tech-grid {
    max-width: 100%;
    overflow-x: hidden;
}

:root {
    --primary-color: #2563eb;
    --secondary-color: #10b981;
    --dark-color: #1e293b;
    --light-color: #f1f5f9;
    --text-color: #334155;
    --white: #ffffff;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    position: relative;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    overflow-x: hidden;
}

section {
    padding: 80px 0;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 50px;
    color: var(--dark-color);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--gradient-primary);
    margin: 15px auto 0;
    border-radius: 2px;
}

/* ===================================
   Navigation
   =================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 100vw;
    background: var(--white);
    box-shadow: var(--shadow-md);
    z-index: 1000;
    transition: var(--transition);
    overflow-x: hidden;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

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

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

.nav-link:hover {
    color: var(--primary-color);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--dark-color);
    margin: 3px 0;
    transition: var(--transition);
}

/* ===================================
   Hero Section
   =================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    padding-top: 120px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    width: 100%;
    max-width: 100%;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 15px;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.highlight {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline;
    white-space: nowrap;
}

.hero-subtitle {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    font-weight: 500;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 30px;
    line-height: 1.8;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
    white-space: nowrap;
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--white);
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--light-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.2rem;
    transition: var(--transition);
    text-decoration: none;
}

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

.hero-image img {
    width: 400px;
    height: 400px;
    border-radius: 50%;
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.4);
    border: 8px solid white;
    object-fit: cover;
    transition: var(--transition);
    display: block;
    margin: 0 auto;
}

.hero-image img:hover {
    transform: scale(1.05) rotate(2deg);
    box-shadow: 0 25px 70px rgba(102, 126, 234, 0.5);
}

/* ===================================
   About Section
   =================================== */
.about {
    background: var(--white);
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
}

.about-text .lead {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 40px;
}

.about-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.highlight-item {
    display: flex;
    gap: 20px;
    padding: 25px;
    background: var(--light-color);
    border-radius: 15px;
    transition: var(--transition);
}

.highlight-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.highlight-item i {
    font-size: 2rem;
    color: var(--primary-color);
}

.highlight-item h4 {
    color: var(--dark-color);
    margin-bottom: 5px;
}

.highlight-item p {
    color: var(--text-color);
    font-size: 0.95rem;
}

/* ===================================
   Skills Section
   =================================== */
.skills {
    background: var(--light-color);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.skill-category {
    background: var(--white);
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.skill-category:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.category-icon {
    width: 70px;
    height: 70px;
    border-radius: 15px;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.category-icon i {
    font-size: 2rem;
    color: var(--white);
}

.skill-category h3 {
    color: var(--dark-color);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.skill-list {
    list-style: none;
}

.skill-list li {
    padding: 8px 0;
    color: var(--text-color);
    font-size: 0.95rem;
}

.skill-badge {
    font-weight: 600;
    color: var(--primary-color);
}

/* ===================================
   Projects Section
   =================================== */
.projects {
    background: var(--white);
}

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

.project-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.project-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(37, 99, 235, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.btn-view-project {
    padding: 12px 30px;
    background: var(--white);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-view-project:hover {
    transform: scale(1.1);
}

.project-content {
    padding: 25px;
}

.project-content h3 {
    color: var(--dark-color);
    margin-bottom: 12px;
    font-size: 1.3rem;
}

.project-description {
    color: var(--text-color);
    margin-bottom: 20px;
    line-height: 1.6;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    padding: 5px 15px;
    background: var(--light-color);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Project Icon Styles */
.project-icon-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 200px;
}

.project-icon {
    width: 100px;
    height: 100px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
}

.project-icon i {
    font-size: 3rem;
    color: var(--white);
}

.project-card:hover .project-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.project-link-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.project-link-btn:hover {
    transform: scale(1.1);
    background: var(--primary-color);
    color: var(--white);
    box-shadow: var(--shadow-lg);
}

.project-link-btn i {
    font-size: 1.2rem;
}

.project-badge {
    padding: 8px 20px;
    background: var(--white);
    color: var(--dark-color);
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

/* ===================================
   Certifications Section
   =================================== */
.certifications {
    background: var(--light-color);
}

.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.cert-card {
    background: var(--white);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.cert-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.cert-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.cert-icon i {
    font-size: 2.5rem;
    color: var(--white);
}

.cert-card h3 {
    color: var(--dark-color);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.cert-date {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 5px;
}

.cert-issuer {
    color: var(--text-color);
    font-size: 0.9rem;
}

/* ===================================
   Contact Section
   =================================== */
.contact {
    background: var(--white);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-info h3 {
    color: var(--dark-color);
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.contact-info > p {
    color: var(--text-color);
    line-height: 1.8;
    margin-bottom: 30px;
}

.contact-details {
    margin-bottom: 30px;
}

.contact-item {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: 5px;
}

.contact-item h4 {
    color: var(--dark-color);
    margin-bottom: 5px;
}

.contact-item p {
    color: var(--text-color);
    font-size: 0.95rem;
}

.social-links-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.social-btn {
    padding: 10px 20px;
    background: var(--light-color);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.social-btn:hover {
    background: var(--gradient-primary);
    color: var(--white);
    transform: translateY(-2px);
}

.contact-form {
    background: var(--light-color);
    padding: 40px;
    border-radius: 15px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid transparent;
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
    background: var(--white);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.contact-form .btn-primary {
    width: 100%;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

/* ===================================
   Footer
   =================================== */
.footer {
    background: var(--dark-color);
    color: var(--white);
    text-align: center;
    padding: 30px 0;
}

.footer p {
    margin: 5px 0;
    opacity: 0.8;
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 768px) {
    html, body {
        max-width: 100vw;
        overflow-x: hidden;
    }

    .container {
        padding: 0 15px;
        max-width: 100%;
        overflow-x: hidden;
    }

    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--white);
        width: 100%;
        max-width: 100vw;
        text-align: center;
        transition: var(--transition);
        box-shadow: var(--shadow-lg);
        padding: 20px 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .hero {
        padding-top: 100px;
        padding-bottom: 40px;
        width: 100%;
        max-width: 100%;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
        width: 100%;
        max-width: 100%;
    }

    .hero-title {
        font-size: 1.6rem;
        line-height: 1.4;
        word-break: normal;
        hyphens: none;
    }

    .hero-title .highlight {
        white-space: nowrap;
    }

    .hero-subtitle {
        font-size: 1.2rem;
        line-height: 1.4;
        word-break: normal;
        hyphens: none;
    }

    .hero-description {
        font-size: 1rem;
        line-height: 1.6;
        padding: 0 10px;
    }

    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
    }

    .btn {
        font-size: 0.9rem;
        padding: 10px 20px;
    }

    .social-links {
        justify-content: center;
        flex-wrap: wrap;
    }

    .hero-image {
        order: -1;
    }

    .hero-image {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }

    .hero-image img {
        width: 280px;
        height: 280px;
        max-width: 90vw;
    }

    .contact-content {
        grid-template-columns: 1fr;
        width: 100%;
        max-width: 100%;
    }

    .section-title {
        font-size: 1.8rem;
        padding: 0 10px;
        max-width: 100%;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        width: 100%;
        max-width: 100%;
    }

    .skills-grid {
        grid-template-columns: 1fr;
        width: 100%;
        max-width: 100%;
    }

    .certifications-grid {
        grid-template-columns: 1fr;
        width: 100%;
        max-width: 100%;
    }

    section {
        padding: 60px 0;
        width: 100%;
        max-width: 100%;
    }

    .about-highlights {
        grid-template-columns: 1fr;
        width: 100%;
        max-width: 100%;
    }

    .highlight-item {
        padding: 20px;
        max-width: 100%;
    }

    .hero-text {
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    html, body {
        max-width: 100vw;
        overflow-x: hidden;
    }

    .container {
        padding: 0 12px;
        max-width: 100%;
    }

    .hero-title {
        font-size: 1.3rem;
        line-height: 1.4;
        padding: 0 5px;
        max-width: 100%;
    }

    .hero-title .highlight {
        white-space: nowrap;
        font-size: 1.3rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
        line-height: 1.4;
        padding: 0 5px;
    }

    .hero-description {
        font-size: 0.95rem;
        line-height: 1.6;
        padding: 0 5px;
    }

    .btn {
        padding: 10px 18px;
        font-size: 0.85rem;
    }

    .hero-image img {
        width: 240px;
        height: 240px;
        border: 5px solid white;
    }

    .section-title {
        font-size: 1.6rem;
        padding: 0 5px;
    }

    section {
        padding: 40px 0;
    }

    .social-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .project-content h3 {
        font-size: 1.1rem;
    }

    .project-description {
        font-size: 0.9rem;
    }

    .tag {
        font-size: 0.8rem;
        padding: 4px 12px;
    }

    .hero-text {
        max-width: 100%;
    }

    .hero-text h1,
    .hero-text h2,
    .hero-text p {
        max-width: 100%;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .contact-form {
        padding: 25px 15px;
    }

    .contact-item p {
        word-break: break-word;
    }
}

/* Extra small devices */
@media (max-width: 360px) {
    .hero-title {
        font-size: 1.1rem;
    }

    .hero-title .highlight {
        white-space: nowrap;
        font-size: 1.1rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .hero-description {
        font-size: 0.85rem;
    }

    .btn {
        padding: 8px 16px;
        font-size: 0.8rem;
    }
}

/* ===================================
   Animations
   =================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Smooth Scrolling */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}
