/* --- CSS Variables for easy theme customization --- */
:root {
    --bg-color: #121212;
    --surface-color: #1e1e1e;
    --primary-text-color: #e0e0e0;
    --secondary-text-color: #a0a0a0;
    --accent-color: #03a9f4; /* A nice light blue */
    --border-color: #2c2c2c;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--primary-text-color);
    line-height: 1.6;
}

h1, h2 {
    color: #ffffff;
    margin-bottom: 0.5em;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.3em;
    margin-bottom: 1em;
}

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

a:hover {
    color: #ffffff;
}

/* --- Layout --- */
.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 2rem;
}

/* --- Header / About Section --- */
#about {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 4rem;
}

.profile-photo {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    border: 3px solid var(--border-color);
    object-fit: cover;
    transform: scaleX(-1); /* --- Corrected: Flips the image horizontally --- */
}

.bio .tagline {
    font-size: 1.2rem;
    font-style: italic;
    color: var(--secondary-text-color);
    margin-bottom: 1rem;
}

.social-links a {
    display: inline-block;
    padding: 0.5em 1em;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    margin-top: 1rem;
}

.social-links a:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

/* --- Projects Section --- */
#project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.project-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.project-card p {
    color: var(--secondary-text-color);
    font-size: 0.9rem;
    flex-grow: 1; /* Pushes the language to the bottom */
    margin-bottom: 1rem;
}

.project-card .language {
    font-size: 0.8rem;
    font-weight: bold;
}

.repo-header {
    margin-top: 4rem;
}

/* --- Footer --- */
footer {
    text-align: center;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--secondary-text-color);
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    #about {
        flex-direction: column;
        text-align: center;
    }
    h1 {
        font-size: 2rem;
    }
}