/* Base Styles */
:root {
    --primary-color: #4a6cf7;
    --secondary-color: #6c757d;
    --dark-color: #212529;
    --light-color: #f8f9fa;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --body-color: #f5f8ff;
    --text-color: #333;
    --border-color: #e9ecef;
    --transition: all 0.3s ease;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --container-width-lg: 80%;
    --container-width-md: 90%;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--body-color);
}

.container {
    width: var(--container-width-lg);
    margin: 0 auto;
    padding: 0 15px; /* Added padding for smaller screens */
}

section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
    font-size: 2.5rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
}

h1, h2, h3, h4, h5 {
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: var(--dark-color);
    transition: var(--transition);
}

a:hover {
    color: var(--primary-color);
}

img {
    display: block;
    width: 100%;
    object-fit: cover;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    text-align: center;
}

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

.primary-btn:hover {
    background-color: #3a5bd9;
    color: white;
}

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

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

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

.highlight {
    color: var(--primary-color);
}

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: white;
    box-shadow: var(--shadow);
    padding: 15px 0;
    transition: var(--transition);
}

header.scrolled {
    padding: 10px 0;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark-color);
}

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

.nav-links a {
    font-weight: 500;
}

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

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--dark-color);
    margin: 5px 0;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    background-color: white;
    margin-top: 70px;
}

.hero-content {
    max-width: 700px;
    width: 100%;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.hero-content h2 {
    font-size: 2rem;
    font-weight: 500;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 40px;
}

.cta-buttons {
    display: flex;
    gap: 20px;
}

/* About Section */
.about {
    background-color: var(--light-color);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 50px;
}

.about-image img {
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.about-text h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

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

.personal-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-title {
    font-weight: 600;
    color: var(--secondary-color);
}

/* Projects Section */
.projects {
    background-color: white;
}

.project-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap; /* Added for smaller screens */
}

.filter-btn {
    padding: 8px 20px;
    border: none;
    background-color: var(--light-color);
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.filter-btn.active,
.filter-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

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

.project-card:hover {
    transform: translateY(-10px);
}

.project-img {
    height: 200px;
    overflow: hidden;
}

.project-img img {
    transition: var(--transition);
}

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

.project-info {
    padding: 20px;
}

.project-info h3 {
    margin-bottom: 10px;
}

.project-info p {
    margin-bottom: 15px;
    color: var(--secondary-color);
}

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

.project-tags span {
    background-color: var(--light-color);
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 0.8rem;
}

.project-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap; /* Added for smaller screens */
}

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

.skills-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.skills-text {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.skills-text h3 {
    margin-bottom: 15px;
    font-size: 1.8rem;
}

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

.skill-category h4 {
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.skill-bars {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.skill-bar {
    width: 100%;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.skill-progress {
    height: 10px;
    background-color: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 10px;
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    flex-wrap: wrap; /* Added for responsiveness */
}

.footer-logo h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-links a {
    color: white;
}

.footer-links a:hover {
    color: var(--primary-color);
}

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

.footer-social .social-link {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
}

.footer-social .social-link:hover {
    background-color: var(--primary-color);
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive Design */
@media screen and (max-width: 1024px) {
    .container {
        width: var(--container-width-md);
    }

    section {
        padding: 80px 0;
    }

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

    .hero-content h2 {
        font-size: 1.8rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .about-image {
        max-width: 400px;
        margin: 0 auto 30px;
    }

    .personal-info {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 768px) {
    .container {
        width: 95%;
    }

    section {
        padding: 60px 0;
    }

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

    .nav-links {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 70%;
        height: calc(100vh - 70px);
        background-color: white;
        flex-direction: column;
        align-items: center;
        padding: 50px 0;
        transition: var(--transition);
        box-shadow: var(--shadow);
    }

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

    .hamburger {
        display: block;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }

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

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
    }

    .hero {
        height: auto;
        padding: 100px 0;
    }

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

    .hero-content h2 {
        font-size: 1.5rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .cta-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .cta-buttons .btn {
        width: 100%;
    }

    .about-text h3 {
        font-size: 1.3rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .project-filters {
        flex-direction: column;
        align-items: center;
    }

    .skills-text h3 {
        font-size: 1.5rem;
    }

    .skill-category h4 {
        font-size: 1.2rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }
}

@media screen and (max-width: 480px) {
    .container {
        width: 90%;
    }

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

    .section-title::after {
        width: 60px;
    }

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

    .hero-content h2 {
        font-size: 1.2rem;
    }

    .hero-content p {
        font-size: 0.9rem;
    }

    .btn {
        padding: 10px 20px;
    }

    .small-btn {
        padding: 6px 15px;
        font-size: 0.8rem;
    }

    .about-text h3 {
        font-size: 1.2rem;
    }

    .about-text p {
        font-size: 0.9rem;
    }

    .project-info h3 {
        font-size: 1.2rem;
    }

    .project-info p {
        font-size: 0.9rem;
    }

    .skills-text h3 {
        font-size: 1.3rem;
    }

    .skill-category h4 {
        font-size: 1.1rem;
    }

    .skill-info {
        font-size: 0.9rem;
    }

    .footer-logo h3 {
        font-size: 1.5rem;
    }

    .footer-links a,
    .footer-social .social-link {
        font-size: 0.9rem;
    }
}