/* --- Variables & Reset --- */
:root {
    --bg-color: #faf9f6; /* Off-white paper feel */
    --text-main: #2b2b2b;
    --text-light: #555555;
    --accent: #8b4513; /* Elegant saddle brown */
    --reflection-bg: #f4f1ea; /* Soft background for reflections */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Lora', serif;
}

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

html {
    scroll-behavior: smooth;
}

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

/* --- Navigation --- */
header {
    background-color: var(--bg-color);
    padding: 1.5rem 5%;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--accent);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--accent);
}

/* --- Hero Section --- */
.hero {
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
}

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

.hero h1 {
    font-family: var(--font-heading);
    font-size: 4rem;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--text-main);
    color: var(--bg-color);
    text-decoration: none;
    border-radius: 4px;
    font-family: var(--font-body);
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn:hover {
    background-color: var(--accent);
    transform: translateY(-2px);
}

/* --- Shared Section Styles --- */
section {
    padding: 5rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

section h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

section h2::after {
    content: "";
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--accent);
    margin: 15px auto 0;
}

/* --- About Section --- */
.about-container {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.15rem;
    color: var(--text-light);
}

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

.card {
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.category {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent);
    display: block;
    margin-bottom: 1rem;
}

.card h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.read-more {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    font-style: italic;
    margin-top: auto;
    transition: color 0.3s ease;
}

.read-more:hover {
    color: var(--accent);
}

/* --- Project Detail Shared Styles --- */
.project-detail {
    padding: 5rem 5%;
    max-width: 1000px; /* Slightly wider for the photo essay flow */
    margin: 0 auto;
    border-top: 1px solid #eaeaea;
}

.project-detail h2 {
    margin-bottom: 1.5rem;
}

.project-content h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-top: 3rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.project-content p {
    margin-bottom: 1.5rem;
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-light);
}

/* --- Photo Essay Specific Styles (NEW) --- */
.photo-essay-container {
    display: flex;
    flex-direction: column;
    gap: 4rem; /* Spacing between essay items */
}

.essay-intro {
    text-align: center;
    font-size: 1.25rem;
    color: var(--text-main);
    max-width: 700px;
    margin: 0 auto 3rem auto;
}

.essay-item {
    display: flex;
    align-items: center;
    gap: 3rem;
}

/* Alternate layout: Reverse order for every other item */
.essay-item:nth-child(even) {
    flex-direction: row-reverse;
}

.essay-item img {
    width: 55%; /* Image takes 55% width */
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border: 1px solid #eaeaea;
}

.item-text {
    width: 45%; /* Text takes 45% width */
}

.item-text h3 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.item-text p {
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.7;
}

/* --- Survey Specific Styles --- */
.survey-question {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--text-main);
    text-align: center;
    margin-top: 3rem;
    margin-bottom: 0.5rem;
}

.chart-image {
    display: block;
    width: 100%;
    height: 400px; /* Fixed height for all images to make them exactly the same size */
    object-fit: contain; /* Ensures the whole chart fits inside the box without stretching */
    background-color: #ffffff; /* Adds a solid background behind the chart */
    margin: 0 auto 2.5rem auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border: 1px solid #eaeaea;
    padding: 10px;
}

/* --- Reflection Block Styles --- */
.reflection {
    background-color: var(--reflection-bg);
    padding: 2.5rem;
    margin-top: 4rem;
    border-left: 5px solid var(--accent);
    border-radius: 0 8px 8px 0;
}

.reflection h3 {
    margin-top: 0;
    font-family: var(--font-heading);
    font-size: 1.6rem;
    color: var(--text-main);
}

.reflection p {
    margin-bottom: 0;
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-main);
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 2rem;
    background-color: var(--text-main);
    color: #fff;
    font-size: 0.9rem;
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.8rem;
    }
    .nav-links {
        display: none; 
    }
    nav {
        justify-content: center;
    }
    
    /* Photo Essay Mobile Styles */
    .essay-item, 
    .essay-item:nth-child(even) {
        flex-direction: column; /* Stack vertically on mobile */
        gap: 1.5rem;
    }
    
    .essay-item img, 
    .item-text {
        width: 100%; /* Take full width on mobile */
    }

    .chart-image {
        height: 250px; /* Smaller uniform size for mobile devices */
    }
}