/* Basic Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f8f8;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: #007bff;
}

a:hover {
    color: #0056b3;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block; /* Remove extra space below images */
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    margin-bottom: 0.5em;
    color: #222;
}

h1 { font-size: 2.8em; }
h2 { font-size: 2.2em; }
h3 { font-size: 1.8em; }

/* Section Padding */
.section-padding {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
    font-size: 2.8em;
    font-weight: 700;
    position: relative;
    padding-bottom: 15px;
    color: #222;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: #007bff;
    border-radius: 2px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 50px;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    text-align: center;
}

.btn-primary {
    background-color: #007bff;
    color: #fff;
}

.btn-primary:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.btn-secondary {
    background-color: #6c757d;
    color: #fff;
    margin-left: 15px;
}

.btn-secondary:hover {
    background-color: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

.btn-sm {
    padding: 8px 18px;
    font-size: 0.9em;
    border-radius: 30px;
}

.btn-outline {
    background-color: transparent;
    color: #007bff;
    border: 2px solid #007bff;
}

.btn-outline:hover {
    background-color: #007bff;
    color: #fff;
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

/* Header */
.header {
    background-color: #fff;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header .logo {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8em;
    font-weight: 700;
    color: #007bff;
}

.header .nav-list {
    display: flex;
    gap: 30px;
}

.header .nav-list a {
    color: #333;
    font-weight: 600;
    position: relative;
    transition: color 0.3s ease;
}

.header .nav-list a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 0;
    height: 2px;
    background-color: #007bff;
    transition: width 0.3s ease;
}

.header .nav-list a:hover::after {
    width: 100%;
}

.header .nav-list a:hover {
    color: #007bff;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    position: relative;
    z-index: 1001;
}

.hamburger .bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 5px 0;
    transition: all 0.3s ease;
}

.anycoder-link {
    margin-left: 20px;
}

.anycoder-link a {
    font-size: 0.9em;
    color: #6c757d;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.anycoder-link a:hover {
    color: #007bff;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('https://via.placeholder.com/1920x1080/007bff/ffffff?text=Background+Image') center center/cover no-repeat;
    color: #fff;
    text-align: center;
    padding: 150px 0 100px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 100px; /* Adjust for fixed header */
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-intro {
    font-size: 1.5em;
    margin-bottom: 10px;
    font-weight: 400;
}

.hero-name {
    font-size: 4em;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.1;
}

.hero-title {
    font-size: 2.2em;
    margin-bottom: 25px;
    font-weight: 600;
}

.hero-title .highlight {
    color: #007bff;
}

.hero-description {
    font-size: 1.1em;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    margin-top: 30px;
}

.hero-buttons .btn {
    margin: 10px;
}

/* About Section */
.about-section .about-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 40px;
}

.about-section .about-image {
    flex: 1;
    min-width: 300px;
    max-width: 400px;
    margin: 0 auto;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.about-section .about-image img {
    border-radius: 8px;
}

.about-section .about-text {
    flex: 2;
    min-width: 300px;
    line-height: 1.8;
}

.about-section .about-text h2 {
    margin-top: 0;
}

.about-section .about-text p {
    margin-bottom: 1.2em;
    font-size: 1.1em;
    color: #555;
}

/* Skills Section */
.skills-section {
    background-color: #f0f4f8;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.skill-card {
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.skill-card .skill-icon {
    font-size: 3em;
    color: #007bff;
    margin-bottom: 20px;
}

.skill-card h3 {
    font-size: 1.4em;
    margin-bottom: 10px;
    color: #333;
}

.skill-card p {
    color: #666;
    font-size: 1em;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.project-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-card:hover img {
    transform: scale(1.05);
}

.project-info {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-info h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: #333;
}

.project-info p {
    color: #666;
    font-size: 1em;
    margin-bottom: 20px;
    flex-grow: 1;
}

.project-links {
    margin-top: auto;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.project-links .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Contact Section */
.contact-section {
    background-color: #f0f4f8;
    text-align: center;
}

.contact-intro {
    font-size: 1.2em;
    margin-bottom: 40px;
    color: #555;
}

.contact-form {
    max-width: 700px;
    margin: 0 auto 50px auto;
    background-color: #fff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    text-align: left;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1em;
    font-family: 'Open Sans', sans-serif;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
    outline: none;
}

.contact-form button {
    width: 100%;
    padding: 15px;
    font-size: 1.1em;
}

.contact-info {
    margin-top: 40px;
}

.contact-info p {
    font-size: 1.1em;
    margin-bottom: 15px;
    color: #555;
}

.contact-info p i {
    color: #007bff;
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.contact-info .social-links {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 25px;
}

.contact-info .social-links a {
    font-size: 1.8em;
    color: #6c757d;
    transition: color 0.3s ease, transform 0.3s ease;
}

.contact-info .social-links a:hover {
    color: #007bff;
    transform: translateY(-3px);
}

/* Footer */
.footer {
    background-color: #222;
    color: #fff;
    text-align: center;
    padding: 40px 0;
    font-size: 0.9em;
}

.footer p {
    margin-bottom: 8px;
}

/* Responsive Design */
@media (max-width: 992px) {
    .header .nav-list {
        gap: 20px;
    }

    .hero-name {
        font-size: 3.5em;
    }
    .hero-title {
        font-size: 1.8em;
    }

    .about-section .about-content {
        flex-direction: column;
        text-align: center;
    }

    .about-section .about-image {
        max-width: 300px;
        margin-bottom: 30px;
    }
}

@media (max-width: 768px) {
    .header .container {
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
    }

    .header .logo {
        width: 100%;
        margin-bottom: 15px;
    }

    .header .nav-menu {
        order: 1; /* Move nav menu below logo */
        width: 100%;
        display: flex;
        justify-content: center;
    }
    
    .header .nav-list {
        display: none; /* Hide by default on mobile */
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 80px; /* Below header */
        left: 0;
        background-color: #fff;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        padding: 20px 0;
        z-index: 999;
        text-align: center;
    }

    .header .nav-list.active {
        display: flex;
    }

    .header .nav-list li {
        margin: 10px 0;
    }

    .header .nav-list a {
        padding: 10px 0;
        display: block;
        font-size: 1.1em;
    }

    .header .nav-list a::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .hamburger {
        display: block;
        order: 0; /* Place hamburger before anycoder link */
        margin-right: 20px;
    }

    .anycoder-link {
        order: 2; /* Place anycoder link after hamburger */
        margin-left: 0;
    }

    .hero-section {
        padding-top: 150px;
        padding-bottom: 80px;
    }

    .hero-name {
        font-size: 3em;
    }

    .hero-title {
        font-size: 1.6em;
    }

    .hero-description {
        font-size: 1em;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    .hero-buttons .btn {
        width: 80%;
        margin: 10px 0;
    }

    .section-padding {
        padding: 60px 0;
    }

    .section-title {
        font-size: 2.2em;
        margin-bottom: 40px;
    }

    .skills-grid, .projects-grid {
        grid-template-columns: 1fr;
    }

    .project-info {
        padding: 20px;
    }

    .contact-form {
        padding: 30px;
    }
}

@media (max-width: 480px) {
    .header .logo {
        font-size: 1.5em;
    }

    .anycoder-link a {
        font-size: 0.8em;
    }

    .hero-name {
        font-size: 2.5em;
    }
    .hero-title {
        font-size: 1.3em;
    }

    .section-title {
        font-size: 1.8em;
    }

    .contact-info p, .contact-intro {
        font-size: 1em;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9em;
    }
    
    .btn-secondary {
        margin-left: 0;
    }
}