/* ─── Custom Properties ─────────────────────────────────────────────────── */
:root {
    /* Core celadon palette */
    --celadon: #AFE1AF;
    --celadon-dark: #6b9b6b;
    --velvet-leaf: #8fc78f;

    /* Neutrals */
    --erie-black: #1a1a1a;
    --nero: #222822;
    --deep-slate: #2d3748;
    --turbulence: #555C64;
    --shadowed-steel: #4a4a4a;
    --text-gray: #6b7280;
    --off-white: #fdfdfd;
    --white: #ffffff;

    /* Accent */
    --dive-in: #3E4B8D;

    /* Semantic tokens */
    --bg: #f8faf9;
    --surface: #ffffff;
    --text: #24303f;
    --muted: #6e7d8b;
    --border: #e7ecf0;
    --border-light: #e1e1e1;
    --shadow: 0 18px 40px rgba(35, 53, 72, 0.08);
}

/* ─── Global Reset ──────────────────────────────────────────────────────── */
* {
    box-sizing: border-box;
    transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

/* ─── Base ──────────────────────────────────────────────────────────────── */
body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(180deg, #fdfdfd 0%, #f2f6f9 100%);
    color: var(--text);
    font-family: 'Lora', serif;
    line-height: 1.5;
    font-size: 1.05rem;
}

p {
    margin-top: 0;
    margin-bottom: 0.75rem;
}

h1, h2, h3, h4 {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    margin-top: 0;
}

h2, h3 {
    margin-bottom: 0.75rem;
}

/* ─── Links ─────────────────────────────────────────────────────────────── */
a {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: var(--celadon-dark);
    text-underline-offset: 3px;
    transition: text-decoration-color 0.3s ease;
}

a:hover {
    text-decoration-color: var(--deep-slate);
}

/* ─── Images ────────────────────────────────────────────────────────────── */
img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* ─── Navigation ────────────────────────────────────────────────────────── */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 1rem 0;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(154, 168, 178, 0.16);
    backdrop-filter: blur(10px);
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 900;
}

.logo span {
    color: var(--celadon-dark);
}

.top-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin: 0;
    padding: 0;
}

.top-nav a {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text);
    text-decoration: none;
}

.top-nav a:hover,
.top-nav a:focus-visible {
    color: var(--celadon-dark);
    text-decoration: underline;
    text-decoration-color: var(--celadon-dark);
}

/* ─── Hero ──────────────────────────────────────────────────────────────── */
.hero {
    padding: 120px 2rem 40px;
    text-align: center;
    background: var(--off-white);
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-gray);
    max-width: 800px;
    margin: 0 auto;
}

/* ─── Page Layout ───────────────────────────────────────────────────────── */
.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 120px 1.5rem 3rem;
}

.wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 2rem;
}

.section-block {
    margin-bottom: 2rem;
}

.section-block::after {
    content: "";
    display: table;
    clear: both;
}

h1 {
    margin: 0 0 1.5rem;
    text-align: center;
    font-size: clamp(2.5rem, 4vw, 3.75rem);
    letter-spacing: -0.04em;
    color: var(--text);
}

/* ─── Section Labels ────────────────────────────────────────────────────── */
.section-label {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--celadon-dark);
    border-bottom: 1px solid var(--celadon-dark);
    padding-bottom: 0.25rem;
    margin-bottom: 0.5rem;
    display: block;
}

/* ─── Biography ─────────────────────────────────────────────────────────── */
.bio-wrapper {
    display: block;
    overflow: auto;
    margin-top: 0;
}

.bio-headshot-float {
    float: left;
    width: 250px;
    max-width: 35%;
    margin-top: 0;
    margin-right: 1.5rem;
    margin-bottom: 0.5rem;
    border-radius: 4px;
    border-left: 6px solid var(--celadon);
    box-shadow: 15px 15px 40px rgba(0, 0, 0, 0.05);
}

.bio-text-start {
    margin-top: 0;
    line-height: 1.5;
    display: block;
}

/* ─── Research / Content Items ──────────────────────────────────────────── */
.content-item {
    padding: 1.2rem 0;
    border-bottom: 1px solid var(--border-light);
}

.content-item:first-of-type {
    padding-top: 0;
}

.content-item h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.doi {
    color: var(--celadon-dark);
    font-weight: 600;
    text-decoration: none;
    display: block;
    margin-top: 0.5rem;
}

.doi:hover {
    text-decoration: underline;
    text-decoration-color: var(--celadon-dark);
}

.doi-link {
    display: inline;
    font-weight: inherit;
    color: var(--celadon-dark);
    text-decoration: underline;
    text-decoration-color: var(--celadon-dark);
    text-underline-offset: 3px;
}

/* ─── Awards ────────────────────────────────────────────────────────────── */
.award-row {
    display: flex;
    gap: 0.5rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border-light);
}

.award-year {
    font-weight: 900;
    color: var(--text-gray);
    min-width: 60px;
}

/* ─── Course Cards (image grid) ─────────────────────────────────────────── */
.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.course-grid li {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.course-grid li:hover,
.course-grid li:focus-within {
    transform: translateY(-4px);
    border-color: var(--celadon);
    box-shadow: 0 24px 52px rgba(35, 53, 72, 0.12);
}

.course-grid a {
    display: block;
    height: 100%;
    text-decoration: none;
}

.course-grid img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    background: #f4f7fa;
    border-bottom: 1px solid var(--border);
}

/* ─── Teaching / Course List ────────────────────────────────────────────── */
.teaching-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.course-column h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.05rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--turbulence);
    border-bottom: 1px solid var(--celadon);
    padding-bottom: 0.2rem;
    margin: 0 0 0.8rem;
}

/* Teaching List — primary/graduate courses; more prominent treatment */
.teaching-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.teaching-list li {
    padding: 0.4rem 0 0.4rem 0.75rem;
    border-bottom: 1px solid #d0d4d8;
    border-left: 3px solid var(--celadon);
    font-size: 0.95rem;
    line-height: 1.4;
    color: var(--text);
    margin-bottom: 0.2rem;
}

.teaching-list li:last-child {
    border-bottom: none;
}


/* ─── General Lists ─────────────────────────────────────────────────────── */
.plain-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.plain-list li {
    padding: 0.3rem 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.9rem;
    line-height: 1.3;
    color: var(--text-gray);
}

.plain-list li:last-child {
    border-bottom: none;
}

/* ─── Embedded Videos ───────────────────────────────────────────────────── */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.video-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.video-item:hover {
    transform: translateY(-3px);
    border-color: var(--celadon);
    box-shadow: 0 24px 52px rgba(35, 53, 72, 0.12);
}

.video-embed {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
}

.video-embed iframe,
.video-embed video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.video-caption {
    padding: 0.85rem 1.1rem 1rem;
    border-top: 1px solid var(--border);
}

.video-caption h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
    color: var(--text);
    line-height: 1.3;
}

.video-caption p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.4;
}

/* ─── Footer ────────────────────────────────────────────────────────────── */
footer {
    text-align: center;
    padding: 4rem;
    background: var(--deep-slate);
    color: var(--white);
    font-size: 0.8rem;
}

/* ─── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 850px) {
    .teaching-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .award-row {
        flex-direction: column;
        gap: 0.25rem;
    }
}

@media (max-width: 720px) {
    .nav-container {
        flex-direction: column;
        align-items: flex-start;
    }

    .top-nav ul {
        gap: 0.75rem;
    }

    .container {
        padding-top: 140px;
    }
}

@media (max-width: 520px) {
    .course-grid {
        grid-template-columns: 1fr;
    }

    .top-nav {
        padding-bottom: 0.75rem;
    }
}

@media (max-width: 500px) {
    .bio-headshot-float {
        float: none;
        display: block;
        margin: 0 auto 1.5rem auto;
        max-width: 100%;
    }
}
