/* ==============================
   Reset & Base Styles
================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-family: 'Open Sans', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    background-color: #ffffff;
    color: #000000;
}

body {
    max-width: 960px;
    margin: auto;
    padding: 1rem;
}

/* ==============================
   Typography
================================= */
h1, h2, h3 {
    font-family: 'Merriweather', serif;
    font-weight: 700;
    color: #000000;
}

/* ==============================
   Header / Navigation
================================= */
header nav ul {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    list-style: none;
    background-color: #000000;
    padding: 1rem;
    border-radius: 8px;
}

header nav a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

header nav a:hover,
header nav a.active {
    color: #FFC904;
}

/* ==============================
   Intro Section
================================= */
.intro {
    text-align: center;
    margin-top: 2rem;
    padding: 2rem;
    background-color: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

.intro .headshot {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 3px solid #000000;
}

.intro h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.intro p {
    margin-bottom: 0.75rem;
}

/* ==============================
   Buttons
================================= */
.button {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #000000;
    color: #FFC904;
    text-decoration: none;
    font-weight: 500;
    border-radius: 4px;
    transition: background-color 0.3s, color 0.3s;
}

.button:hover {
    background-color: #333333;
    color: #ffffff;
}

.button-row {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

/* ==============================
   Footer
================================= */
footer.profile-bar {
    background-color: #f4f4f4;
    border-top: 2px solid #000000;
    margin-top: 3rem;
    padding: 1rem;
    text-align: center;
    font-size: 0.9em;
}

footer .profile-links {
    margin-bottom: 0.5em;
}

footer .profile-links a {
    margin: 0 10px;
    display: inline-block;
    transition: transform 0.2s ease;
}

footer .profile-links a:hover {
    transform: scale(1.2);
}

footer .profile-links img {
    width: 28px;
    height: 28px;
    vertical-align: middle;
    border-radius: 4px;
}

/* ==============================
   Teaching/Research Blocks
================================= */
.block-areas {
    margin-top: 2rem;
}

.block-areas h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.block-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}

@media (min-width: 800px) {
    .block-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.block-area {
    background-color: #f0f0f0;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    margin-bottom: 1.5rem;
    transition: background-color 0.3s ease;
}

.block-area:hover {
    background-color: #fdf8e7;
}

.block-area h3 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.block-area ul {
    list-style: disc;
    padding-left: 1.2rem;
    margin: 0;
}

.block-area ul li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.chevron {
    margin-left: 0.5rem;
    font-size: 0.9em;
    vertical-align: middle;
    transition: transform 0.3s ease;
}

.block-area.open .chevron {
    transform: rotate(90deg);
}

/* ==============================
   Expandable Section Content
================================= */
.expanded-content {
    display: none;
    margin-top: 1rem;
    padding: 1rem 1.25rem;
    border-left: 4px solid #FFC904;
    background-color: #fffdee;
    border-radius: 6px;
    font-size: 0.95rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease, background-color 0.3s ease;
}

.block-area.open .expanded-content {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

/* ==============================
   Course Lists
================================= */
.courses{
    margin-top: 2rem;
}

.course-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.course {
    background-color: #f0f0f0;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    transition: background-color 0.3s ease;
}

.course:hover {
    background-color: #fdf8e7;
}

/* ==============================
   Responsive Adjustments
================================= */
@media (max-width: 600px) {
    header nav ul {
        flex-direction: column;
        align-items: center;
    }

    .intro {
        padding: 1rem;
    }

    .intro .headshot {
        width: 120px;
        height: 120px;
    }
}

/* ==============================
   Dark Mode Support
================================= */
@media (prefers-color-scheme: dark) {
    html {
        background-color: #121212;
        color: #f5f5f5;
    }

    header nav ul {
        background-color: #000000;
    }

    header nav a {
        color: #f5f5f5;
    }

    header nav a:hover,
    header nav a.active {
        color: #FFC904;
    }

    .intro {
        background-color: #1e1e1e;
        box-shadow: 0 0 12px rgba(0, 0, 0, 0.4);
    }

    .intro h1,
    h1, h2, h3 {
        color: #ffffff;
    }

    .intro .headshot {
        border-color: #FFC904;
    }

    .button {
        background-color: #FFC904;
        color: #000000;
    }

    .button:hover {
        background-color: #ffda33;
        color: #000000;
    }

    footer.profile-bar {
        background-color: #1a1a1a;
        color: #cccccc;
        border-top: 2px solid #FFC904;
    }

    footer.profile-bar a {
        color: #FFC904;
    }

    .block-areas h2 {
        color: #ffffff;
    }

    .block-area {
        background-color: #1e1e1e;
        color: #ffffff;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    }

    .block-area:hover {
        background-color: #2a2a2a;
    }

    .block-area h3 {
        color: #ffffff;
    }

    .block-area p,
    .block-area ul,
    .block-area li {
        color: #cccccc;
    }

    .expanded-content {
        background-color: #222;
        border-left: 4px solid #FFC904;
        box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.05);
    }
}
