/* === About section with floated headshot === */
.about-wrap {
    max-width: 800px;
    margin: 0 auto 2rem auto;
    position: relative;
    padding: 2rem 1rem 1.5rem 1rem;
    border-radius: 12px;
}

.headshot-float {
    float: left;
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 50%;
    margin: 0 1.5rem 1rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.about-header {
    margin-left: 160px;
    margin-bottom: 0.5rem;
}
.about-header h1 {
    margin: 0 0 0.2em 0;
    font-size: 2.2rem;
}
.about-header .subtitle {
    margin: 0 0 0.5em 0;
    font-size: 1.1rem;
    color: var(--subtitle-color);
}
.about-header h2 {
    margin: 0 0 0.5em 0;
    font-size: 1.3rem;
    color: var(--text-color);
    transition: color 0.3s ease;
}
.about-body {
    color: var(--text-color);
    transition: color 0.3s ease;
    color: var(--text-color);
    transition: color 0.3s ease;
    clear: both;
    margin-top: 0.5rem;
}

@media (max-width: 700px) {
    .about-wrap {
        padding: 1rem 0.5rem;
    }
    .headshot-float {
        float: none;
        display: block;
        margin: 0 auto 1rem auto;
        width: 100px;
        height: 100px;
    }
    .about-header {
        margin-left: 0;
        text-align: center;
    }
}
/* === Layout for sidebar and main content === */
.main-layout {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    margin-bottom: 2rem;
}

.sidebar {
    flex: 0 0 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 1rem;
}

.headshot {
    width: 160px;
    height: 160px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    margin-bottom: 1rem;
}

.main-content {
    flex: 1;
}

@media (max-width: 700px) {
    .main-layout {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    .sidebar {
        flex: none;
        align-items: center;
        padding-top: 0;
    }
    .headshot {
        width: 120px;
        height: 120px;
        margin-bottom: 0.5rem;
    }
}
/* 1. DEFINE COLOR VARIABLES (THE CORE OF THE THEME SWITCHER) */
/* Light theme (default) */
:root {
    --bg-color: #f4f4f4; /* Light gray page background */
    --text-color: #333; /* Dark text */
    --container-bg: #ffffff; /* White content box */
    --border-color: #eee; /* Very light gray for lines */
    --link-color: #007BFF; /* Standard blue link */
    --shadow-color: rgba(0, 0, 0, 0.05); /* Softer shadow */
    --subtitle-color: #666; /* Subtitle text color */
}

/* Dark theme (activated by browser/OS setting) */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #1c1c1c; /* Very dark gray page background */
        --text-color: #e0e0e0; /* Light gray text */
        --container-bg: #2a2a2a; /* Dark content box */
        --border-color: #444; /* Darker border line */
        --link-color: #66bfff; /* Lighter blue link for contrast */
        --shadow-color: rgba(0, 0, 0, 0.4); /* More visible shadow on dark */
        --subtitle-color: #aaa; /* Lighter subtitle text */
    }
}

/* 2. GENERAL STYLES USING THE VARIABLES */
body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 20px; /* Add some padding for mobile view */
    transition: background-color 0.3s ease, color 0.3s ease; /* Smooth transition */
}

.container {
    max-width: 800px;
    margin: 3em auto;
    background-color: var(--container-bg);
    padding: 25px 40px;
    box-shadow: 0 5px 15px var(--shadow-color);
    border-radius: 8px;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* 3. HEADER & FOOTER */
header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    margin-bottom: 5px;
}

.subtitle {
    color: var(--subtitle-color);
    font-weight: 300;
    font-size: 1.1em;
    transition: color 0.3s ease;
}

footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    font-size: 0.9em;
    color: var(--subtitle-color);
    border-top: 1px solid var(--border-color);
    transition: border-top-color 0.3s ease, color 0.3s ease;
}

/* 4. CONTENT SECTIONS */
section {
    margin-bottom: 30px;
}

h2 {
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border-color);
    transition: border-bottom-color 0.3s ease;
}

h3 {
    margin-top: 25px;
    margin-bottom: 10px;
}

section ul {
    list-style-position: outside;
    padding-left: 20px;
}

section li {
    margin-bottom: 8px;
}

/* 5. LINKS AND RESPONSIVENESS */
a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    text-decoration: underline;
}

/* Your original media query for responsiveness */
@media (max-width: 700px) {
    body {
        padding: 0;
    }
    .container {
        margin: 0 auto;
        width: auto;
        border-radius: 0;
        padding: 25px 20px; /* Adjust padding for smaller screens */
        box-shadow: none;
    }
}