:root {
    --primary-color: #2c3e50; /* Dark Blue/Charcoal */
    --secondary-color: #3498db; /* Bright Blue */
    --background-color: #f8f9fa; /* Off-White */
    --text-color: #34495e; /* Dark Gray */
    --heading-font: 'Merriweather', serif;
    --body-font: 'Open Sans', sans-serif;
}

body {
    margin: 0;
    font-family: var(--body-font);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.7;
}

.hero {
    background-color: #ffffff;
    padding: 60px 40px;
    border-bottom: 1px solid #e0e0e0;
}

.hero-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap; /* Allows items to wrap on smaller screens */
}

.hero-text {
    flex: 2; /* Takes up 2/3 of the space */
    padding-right: 40px;
    text-align: left;
}

.hero-image {
    flex: 1; /* Takes up 1/3 of the space */
    text-align: right;
}

.profile-photo {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 5px solid var(--background-color);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    object-fit: cover; /* Ensures the image covers the area without distortion */
}

h1 {
    font-family: var(--heading-font);
    font-size: 2.8rem;
    margin: 0 0 10px 0;
    font-weight: 700;
    color: var(--primary-color);
}

.subtitle {
    font-size: 1.2rem;
    font-weight: 300;
    line-height: 1.5;
    color: var(--text-color);
}

main {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

section {
    padding: 50px 20px;
    border-bottom: 1px solid #e0e0e0;
}

section:last-child {
    border-bottom: none;
}

h2 {
    font-family: var(--heading-font);
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 40px;
    color: var(--primary-color);
}

.narrative p {
    font-size: 1.1rem;
    text-align: justify;
    margin-bottom: 1.5em;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.grid-item {
    background: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.grid-item h3 {
    font-family: var(--heading-font);
    color: var(--secondary-color);
    margin-top: 0;
    font-size: 1.4rem;
}

.timeline {
    position: relative;
    max-width: 750px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 3px;
    background-color: var(--secondary-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1.5px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: white;
    border: 4px solid var(--secondary-color);
    top: 25px;
    border-radius: 50%;
    z-index: 1;
}

.timeline-item:nth-child(even):::after {
    left: -10px;
}

.timeline-content {
    padding: 20px 30px;
    background-color: white;
    position: relative;
    border-radius: 6px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

.timeline-content h3 {
    margin-top: 0;
    font-family: var(--heading-font);
    color: var(--primary-color);
}

.timeline-content .description {
    font-size: 0.9rem;
    font-style: italic;
    opacity: 0.8;
}

.contact {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    padding: 60px 20px;
}

.contact h2 {
    color: white;
}

.contact p {
    max-width: 600px;
    margin: 15px auto;
    color: rgba(255, 255, 255, 0.9);
}

/* Responsive adjustments for mobile */
@media screen and (max-width: 768px) {
    .hero-container {
        flex-direction: column-reverse; /* Stack image on top of text */
        text-align: center;
    }

    .hero-text {
        padding-right: 0;
        text-align: center;
        margin-top: 30px;
    }

    .hero-image {
        text-align: center;
    }
    
    h1 {
        font-size: 2.2rem;
    }

    .timeline::after {
        left: 20px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 60px;
        padding-right: 15px;
    }

    .timeline-item:nth-child(odd), .timeline-item:nth-child(even) {
        left: 0;
    }

    .timeline-item::after {
        left: 10px;
    }
}