/* Basic Reset & Typography */
:root {
    --primary-color: #007bff; /* Blue */
    --secondary-color: #6c757d; /* Grey */
    --dark-color: #343a40; /* Dark Grey */
    --light-color: #f8f9fa; /* Light Grey */
    --text-color: #333;
    --heading-font: 'Playfair Display', serif;
    --body-font: 'Montserrat', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--body-font);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-color);
}

.container {
    max-width: 1200px;
    margin: auto;
    padding: 0 20px;
    overflow: hidden; /* Clear floats */
}

h1, h2, h3 {
    font-family: var(--heading-font);
    color: var(--dark-color);
    margin-bottom: 15px;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

h2::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -10px;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 5px;
}

p {
    margin-bottom: 15px;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #0056b3;
}

ul {
    list-style: none;
}

/* Buttons */
.btn {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    text-transform: uppercase;
    font-weight: 700;
    font-size: 0.9rem;
    transition: background 0.3s ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
    margin: 5px;
}

.btn:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

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

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

.btn-secondary:hover {
    background: #5a6268;
}

.btn-small {
    padding: 5px 10px;
    font-size: 0.8rem;
    margin: 0 5px;
    background: var(--dark-color);
}
.btn-small:hover {
    background: #212529;
}

.btn-centered {
    display: block;
    width: fit-content;
    margin: 40px auto 0;
}

/* Header */
.main-header {
    background: var(--dark-color);
    color: #fff;
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    font-size: 1.8rem;
    margin: 0;
    color: #fff;
}

.main-nav ul {
    display: flex;
}

.main-nav ul li {
    margin-left: 30px;
}

.main-nav ul li a {
    color: #fff;
    font-weight: 600;
    font-size: 1.1rem;
    position: relative;
}

.main-nav ul li a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.main-nav ul li a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('../images/hero-bg.jpg') no-repeat center center/cover;
    color: #fff;
    height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    padding: 20px;
}

.hero-content {
    max-width: 800px;
}

.hero-intro {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 10px;
    color: #a0a0a0;
}

.hero-name {
    font-size: 4rem;
    margin-bottom: 20px;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    line-height: 1.1;
}

.hero-tagline {
    font-size: 1.8rem;
    margin-bottom: 40px;
    color: #e0e0e0;
}

/* Section Styling */
section {
    padding: 80px 0;
    background-color: #fff;
    margin-bottom: 30px;
    box-shadow: 0 0 20px rgba(0,0,0,0.05);
}

section:nth-child(even) { /* Alternate background for sections */
    background-color: var(--light-color);
}

/* About Section */
.about-section .container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.about-content {
    display: flex;
    flex-wrap: wrap; /* Allows wrapping on smaller screens */
    gap: 40px;
    align-items: center;
    justify-content: center;
}

.profile-pic {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--primary-color);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    flex-shrink: 0; /* Prevent shrinking */
}

.about-text {
    flex: 1; /* Takes remaining space */
    max-width: 700px;
    text-align: left;
}
.about-text h2 {
    text-align: left; /* Override global h2 centering */
    margin-bottom: 20px;
}
.about-text h2::after {
    left: 0;
    transform: translateX(0);
}


/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    text-align: center;
}

.skill-item {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.skill-item i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.skill-item h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

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

/* Portfolio Section */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.portfolio-item {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.portfolio-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.portfolio-item h3 {
    padding: 15px;
    margin-bottom: 0;
    font-size: 1.4rem;
}

.portfolio-item p {
    padding: 0 15px 15px;
    font-size: 0.95rem;
    color: var(--secondary-color);
}

.project-links {
    padding: 0 15px 15px;
    display: flex;
    justify-content: flex-start;
    gap: 10px;
}
.project-links .btn-small {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Contact Section */
.contact-section {
    text-align: center;
    background-color: var(--dark-color);
    color: #fff;
    padding-bottom: 40px; /* Adjust if needed for social icons */
}
.contact-section h2 {
    color: #fff;
}
.contact-section h2::after {
    background-color: var(--primary-color);
}

.contact-intro {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 30px;
    color: #e0e0e0;
}

.contact-info p {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.contact-info a {
    color: var(--primary-color);
    font-weight: 600;
}

.social-links {
    margin-top: 30px;
}

.social-links a {
    color: #fff;
    font-size: 2.2rem;
    margin: 0 15px;
    transition: color 0.3s ease, transform 0.2s ease;
}

.social-links a:hover {
    color: var(--primary-color);
    transform: translateY(-5px);
}

/* Footer */
.main-footer {
    background: #212529;
    color: #fff;
    text-align: center;
    padding: 30px 0;
    font-size: 0.9rem;
}

.main-footer p {
    margin: 5px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-header .container {
        flex-direction: column;
        text-align: center;
    }
    .main-nav ul {
        margin-top: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }
    .main-nav ul li {
        margin: 0 10px 10px 10px;
    }

    .hero-name {
        font-size: 3rem;
    }
    .hero-tagline {
        font-size: 1.4rem;
    }

    .about-content {
        flex-direction: column;
        gap: 30px;
    }
    .profile-pic {
        width: 200px;
        height: 200px;
    }
    .about-text {
        text-align: center;
    }
    .about-text h2 {
        text-align: center; /* Adjust for mobile */
    }
    .about-text h2::after {
        left: 50%;
        transform: translateX(-50%);
    }

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

    .contact-info p {
        font-size: 1rem;
    }
    .social-links a {
        font-size: 1.8rem;
        margin: 0 10px;
    }
}

@media (max-width: 480px) {
    .hero-name {
        font-size: 2.5rem;
    }
    .hero-tagline {
        font-size: 1.2rem;
    }
    .btn {
        padding: 8px 15px;
        font-size: 0.8rem;
    }
    h2 {
        font-size: 2rem;
    }
}
