/* --- 1. Variables & Base Reset --- */
:root {
    --primary-color: #2563eb;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --white: #ffffff;
    --container-width: 1100px;
}

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

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

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

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* --- 2. Navigation & Header --- */
header {
    background: var(--white);
    border-bottom: 1px solid #eee;
    padding: 1.5rem 0;
}

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

nav ul { display: flex; list-style: none; gap: 2rem; }
nav a { text-decoration: none; color: var(--text-dark); font-weight: 500; }
nav a:hover { color: var(--primary-color); }

/* --- 3. Home Page Hero --- */
.home-hero {
    height: 60vh;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-align: center;
    position: relative;
}

.home-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4); /* Darkens image for text readability */
}

.home-hero h1 {
    position: relative;
    font-size: 3.5rem;
    z-index: 1;
}

/* --- 4. Portfolio Grid --- */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.project-card {
    background: var(--bg-light);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s;
    border: 1px solid #eee;
}

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

.project-card h3 { padding: 1rem 1rem 0.5rem; }

/* --- 5. About & Contact --- */
.about-flex {
    display: flex;
    gap: 4rem;
    align-items: center;
    margin: 4rem 0;
}

.profile-img {
    width: 400px;
    border-radius: 12px;
}

.contact-details {
    list-style: none;
    margin: 2rem 0;
    padding: 2rem;
    background: var(--bg-light);
    border-radius: 8px;
}

.contact-details li { margin-bottom: 1rem; }

/* --- 6. Footer --- */
footer {
    text-align: center;
    padding: 4rem 0;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* --- 7. Mobile Responsiveness --- */
@media (max-width: 768px) {
    .about-flex { flex-direction: column; text-align: center; }
    .home-hero h1 { font-size: 2.5rem; }
    nav { flex-direction: column; gap: 1rem; }
}
