/* Reference-inspired text navigation and open academic introduction. */
.site-header { background: #fbfaf7; border-bottom: 1px solid #d8dfd9; padding: 0; min-height: 76px; }
.site-header .wrapper { max-width: 1060px; box-sizing: border-box; gap: 28px; }
.site-title, .site-title.current { color: #024731; font-size: 1.3rem; font-weight: 700; }
.site-title::after { display: none; }
.site-nav { position: static; background: transparent; border: 0; box-shadow: none; overflow: visible; }
.site-nav .trigger { display: block; min-width: 0; }
.site-nav ul { gap: 22px; font-size: 1rem; font-weight: 400; letter-spacing: 0; text-transform: none; }
.site-nav ul li { margin: 0; }
.site-nav .page-link { padding: 10px 0; color: #424b46; border: 0; }
.site-nav ul li.current a, .site-nav .page-link:hover { color: #024731; background: transparent; }
.site-nav ul li.current a { font-weight: 600; }
.site-nav ul li.current a::after { display: block; height: 2px; bottom: 4px; background: #B3995D; }
.site-nav ul li.theme-control { margin: 0; padding: 0; border: 0; }
.theme-toggle { color: #024731; border-color: #bbc9c0; background: transparent; }
.site-nav a:focus-visible, .intro-links a:focus-visible { outline: 2px solid #B3995D; outline-offset: 4px; }
.home-page .page-content > .wrapper { max-width: 1060px; box-sizing: border-box; }
.home-page .page-content { padding-top: 48px; }
.intro { display: flex; align-items: center; gap: 36px; margin: 0 0 48px; }
.intro-photo { width: 210px; height: 210px; flex: 0 0 210px; border-radius: 50%; border: 2px solid #024731; object-fit: cover; object-position: 43% 30%; box-sizing: border-box; }
.intro-text { min-width: 0; }
.intro h1 { font-family: "Libre Baskerville", Georgia, serif; color: #024731; font-weight: 700; font-size: clamp(1.8rem, 3.4vw, 2.5rem); line-height: 1.25; margin: 0 0 12px; }
.intro-role { color: #505852; line-height: 1.7; margin: 0 0 12px; font-size: 1rem; }
.intro-interests { font-weight: 600; line-height: 1.6; margin: 0 0 16px; }
.intro-links { display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; margin: 0; padding: 0; }
.intro-links a { color: #024731; text-decoration: underline; text-decoration-color: #B3995D; text-underline-offset: 4px; }
.home-page .home-layout, .home-page .home-main { display: block; }
.home-page .about-me-container, .home-page .news-container { padding: 0; margin: 0 0 40px; background: transparent; border: 0; border-radius: 0; box-shadow: none; transform: none; }
.home-page .about-me-text { padding: 0; }
.home-page h2 { font-family: "Libre Baskerville", Georgia, serif; font-size: 1.5rem; font-weight: 700; color: #024731; margin: 0 0 20px; line-height: 1.3; }
.home-page .about-me-text p { text-align: left; line-height: 1.8 !important; margin-bottom: 18px; }
.home-page .bio-strands { margin: 0; }
.home-page .home-main > .news-container .news-list { max-height: none; }
html.dark-mode body .site-header, html.dark-mode body .site-nav { background: #101a16; }
html.dark-mode body .site-title, html.dark-mode body .intro h1, html.dark-mode body.home-page h2 { color: #b9d7c8; }
html.dark-mode body .intro-role { color: #b9c3bd; }
html.dark-mode body .intro-links a { color: #79cdbd; }
html.dark-mode body.home-page .about-me-container, html.dark-mode body.home-page .news-container { background: transparent; border: 0; box-shadow: none; }
html.dark-mode body .intro-photo { border-color: #B3995D; }
@media (max-width: 760px) {
    .site-header .wrapper { flex-direction: column; align-items: flex-start; gap: 12px; padding-top: 20px; padding-bottom: 12px; min-height: 0; }
    .site-identity { max-width: 100%; }
    .site-title { font-size: clamp(1.1rem, 5vw, 1.3rem); }
    .site-nav { margin: 0; width: 100%; padding: 0; }
    .site-nav ul { display: flex; flex-wrap: wrap; justify-content: flex-start; align-items: center; gap: 4px 22px; text-align: left; }
    .site-nav ul li { display: block; margin: 0; }
    .site-nav .page-link { padding: 10px 0; margin: 0 !important; text-align: left; }
    .site-nav ul li.theme-control { margin-left: auto; padding: 0; }
    .home-page .page-content { padding-top: 32px; }
    .intro { align-items: flex-start; gap: 24px; }
    .intro-photo { width: 180px; height: 180px; flex-basis: 180px; }
}
@media (max-width: 540px) {
    .intro { flex-direction: column; gap: 24px; margin-bottom: 36px; }
    .intro-photo { width: 190px; height: 190px; flex-basis: auto; }
    .intro h1 { font-size: 1.85rem; }
    .intro-links { gap: 10px 20px; }
    .site-nav ul { gap: 0 18px; }
}
/* Let the stacked navigation determine header height on narrow screens. */
.site-header { height: auto; }
.intro p { text-align: left; hyphens: none; }
.home-page .about-me-text p { hyphens: none; }

@media (max-width: 760px) { .site-header { height: auto !important; min-height: 128px; } }

/* Icon links retain names for screen readers, keyboard focus, and hover. */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.intro-links { gap: 12px; }
.intro-links a { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; text-decoration: none; transition: background-color .15s ease; }
.intro-links a:hover, .intro-links a:focus-visible { background: rgba(179,153,93,.16); }
.intro-links svg { width: 25px; height: 25px; display: block; }
.icon-tooltip { position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%); padding: 4px 8px; border-radius: 4px; background: #024731; color: #fff; font-size: .875rem; line-height: 1.5; white-space: nowrap; pointer-events: none; opacity: 0; z-index: 2; }
.intro-links a:hover .icon-tooltip, .intro-links a:focus-visible .icon-tooltip { opacity: 1; }

/* Requested refinements: square portrait, larger introduction, and research figures. */
.intro-photo { border-radius: 0; }
.intro h1 { font-size: clamp(2rem, 3.6vw, 2.7rem); }
.intro-role { font-size: 1.1rem; }
.intro-interests { font-size: 1.06rem; text-align: left; }
.home-page h2 { font-size: 1.65rem; }
.home-page .about-me-text ul.bio-strands { margin: 0 0 18px; padding: 0; list-style: none; }
.home-page .about-me-text ul.bio-strands li { position: relative; padding-left: 22px; margin-bottom: 14px; line-height: 1.8; text-align: left; hyphens: none; }
.paper-container img.rounded-image { width: 330px; height: 225px; aspect-ratio: 22 / 15; object-fit: contain; box-sizing: border-box; background: #fff; }
@media (max-width: 600px) {
    .paper-container img.rounded-image { width: 100%; height: auto; aspect-ratio: 22 / 15; max-height: none; }
}
@media (max-width: 540px) {
    .intro h1 { font-size: 2rem; }
}
/* Restore the original typography and boxed sections. */
.intro { flex-direction: row-reverse; align-items: center; }
.intro-text { flex: 1; }
.intro-photo { width: 190px; height: 190px; flex: 0 0 190px; object-fit: cover; object-position: 43% 42%; }
.intro h1, .home-page h2 { font-family: "Noto Sans", Helvetica, Arial, sans-serif; font-weight: 400; }
.home-page .about-me-container, .home-page .news-container { padding: 30px 34px; background: #fffefa; border: 1px solid rgba(2,71,49,.09); border-radius: 12px; box-shadow: 0 8px 24px rgba(2,71,49,.06); margin-bottom: 24px; }
.home-page .about-me-text p, .home-page .about-me-text ul.bio-strands li, .intro p, .news-content-text, .post-content p, .post-content li, .post-content h4, .post-content h5 { text-align: justify; text-justify: inter-word; }
html.dark-mode body.home-page .about-me-container, html.dark-mode body.home-page .news-container { background: #15201b; border: 1px solid rgba(185,215,200,.14); box-shadow: 0 8px 24px rgba(0,0,0,.14); }
@media (max-width: 600px) {
    .home-page .about-me-container, .home-page .news-container { padding: 24px 20px; }
}
@media (max-width: 540px) {
    .intro { flex-direction: row-reverse; gap: 18px; align-items: flex-start; }
    .intro-photo { width: 115px; height: 115px; flex-basis: 115px; }
    .intro h1 { font-size: 1.65rem; }
    .intro-role, .intro-interests { font-size: 1rem; }
}

/* A larger circular frame with a tighter crop of the original portrait. */
.intro { flex-direction: row; }
.intro-photo { width: 240px; height: 240px; flex: 0 0 240px; border-radius: 50%; overflow: hidden; position: relative; }
.intro-photo img { display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 43% 42%; transform: scale(1.3); transform-origin: 50% 47%; }
@media (max-width: 760px) {
    .intro-photo { width: 210px; height: 210px; flex-basis: 210px; }
}
@media (max-width: 540px) {
    .intro { flex-direction: column; }
    .intro-photo { width: 230px; height: 230px; flex-basis: auto; }
}

/* Shared centered page width and semesters below their course titles. */
.page-content > .wrapper { max-width: 1060px; box-sizing: border-box; margin-inline: auto; }
.ta-course-item { display: block; }
.ta-course-item .course-terms, .course-item > .course-terms { justify-content: flex-start; margin: 10px 0 12px 98px; padding-left: 0; }
.home-page .page-content { padding-top: 20px; }
.home-page .intro { margin-bottom: 22px; gap: 30px; }
.home-page .intro-photo { width: 210px; height: 210px; flex-basis: 210px; }
.home-page .about-me-container { padding: 22px 28px; }
.home-page .about-me-text p, .home-page .about-me-text ul.bio-strands li { line-height: 1.6 !important; margin-bottom: 12px; }
.home-page .about-me-text p:last-child { margin-bottom: 0; }
.home-page h2 { margin-bottom: 14px; }
.home-page .about-me-text ul.bio-strands { margin-bottom: 12px; }
@media (max-width: 600px) {
    .home-page .about-me-container { padding: 24px 20px; }
}
@media (max-width: 540px) {
    .home-page .intro-photo { flex-basis: auto; width: 230px; height: 230px; }
}
@media (max-width: 420px) {
    .ta-course-item .course-terms, .course-item > .course-terms { margin-left: 0; }
}
@media (min-width: 900px) {
    .home-page .page-content { padding-top: 14px; }
    .home-page .intro { margin-bottom: 16px; }
    .home-page .about-me-container { padding-block: 18px; }
    .home-page .about-me-text p, .home-page .about-me-text ul.bio-strands li { line-height: 1.5 !important; margin-bottom: 10px; }
}

/* Keep the biography first; profile and campus photos follow the news. */
.profile-section { margin-top: 36px; }
.home-page .profile-section .intro { margin-bottom: 0; }
@media (max-width: 600px) {
}
@media (max-width: 600px) {
}
/* University green navigation with a gold ribbon below. */
.site-header { background: #024731; border-bottom: 6px solid #B3995D; }
.site-title, .site-title.current, .site-nav .page-link { color: #fff; }
.site-title:hover, .site-nav .page-link:hover, .site-nav ul li.current a { color: #e1c77e; }
.site-nav { background: transparent; }
.theme-toggle { color: #fff; border-color: rgba(255,255,255,.5); background: rgba(255,255,255,.08); }
html.dark-mode body .site-header { background: #024731; }
html.dark-mode body .site-nav { background: transparent; }
html.dark-mode body .site-title, html.dark-mode body .site-nav a { color: #fff; }
html.dark-mode body .site-title:hover, html.dark-mode body .site-nav ul li.current a, html.dark-mode body .site-nav a:hover { color: #e1c77e; }

/* Centered, larger navigation in a softer rounded typeface. */
.site-header .wrapper { position: relative; justify-content: center; flex-direction: row; align-items: center; gap: 0; padding-top: 0; padding-bottom: 0; min-height: 80px; }
.site-header .wrapper::after { display: none; }
.site-nav { margin: 0; width: auto; }
.site-nav ul { justify-content: center; gap: 32px; font-family: "Nunito", "Noto Sans", sans-serif; font-size: 1.3rem; font-weight: 700; }
.site-nav ul li.current a { font-weight: 800; }
.site-nav ul li.theme-control { position: absolute; right: 30px; top: 24px; margin: 0; }
@media (max-width: 760px) {
    .site-header { min-height: 76px; }
    .site-header .wrapper { min-height: 76px; padding-right: 52px; }
    .site-nav ul { gap: 20px; font-size: 1.2rem; }
    .site-nav ul li.theme-control { right: 15px; top: 23px; }
}
@media (max-width: 420px) {
    .site-nav ul { gap: 15px; font-size: 1.08rem; }
}

/* More breathing room below the header and a finer gold ribbon. */
.site-header { border-bottom-width: 3px; }
.home-page .page-content { padding-top: 36px; }
.intro-links a[title="Email"] svg { width: 28px; height: 28px; }
.intro-links a[title="LinkedIn"] svg { width: 26px; height: 26px; }

/* Quieter card depth keeps the focus on the content. */
.home-page .about-me-container, .home-page .news-container,
.pubs-container, .course-container { box-shadow: 0 2px 8px rgba(2,71,49,.025); }
.paper-container, .uni-container { box-shadow: 0 1px 5px rgba(2,71,49,.025); }
.home-page .about-me-container:hover, .home-page .news-container:hover,
.pubs-container:hover, .course-container:hover { box-shadow: 0 3px 10px rgba(2,71,49,.04); }
.paper-container:hover, .uni-container:hover { box-shadow: 0 2px 8px rgba(2,71,49,.04); }
html.dark-mode body.home-page .about-me-container,
html.dark-mode body.home-page .news-container,
html.dark-mode body .pubs-container, html.dark-mode body .course-container,
html.dark-mode body .paper-container, html.dark-mode body .uni-container { box-shadow: 0 2px 8px rgba(0,0,0,.08); }
/* Matching homepage section headings and inset spacing. */
.home-page .about-me-container, .home-page .news-container { padding: 24px 28px; }
.home-page .about-me-text > h2, .home-page .news-container > h2 { font-family: "Noto Sans", Helvetica, Arial, sans-serif; font-size: 1.65rem; font-weight: 400; line-height: 1.3; letter-spacing: normal; margin: 0 0 16px; }
@media (max-width: 600px) {
    .home-page .about-me-container, .home-page .news-container { padding: 24px 20px; }
}

/* A consistent icon family for every news category. */
.news-icon { display: inline-block; width: 17px; height: 17px; margin-right: 6px; vertical-align: -3px; color: #024731; flex-shrink: 0; }
html.dark-mode body .news-icon { color: #79cdbd; }
/* Uniform filled research thumbnails, following the reference proportions. */
.paper-container img.rounded-image { width: 320px; height: 200px; aspect-ratio: 8 / 5; object-fit: cover; object-position: center; border-radius: 8px; }
.paper-container { transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease; }
.paper-container:hover, .paper-container:focus-within { background-color: #f5f2e9; border-color: rgba(179,153,93,.45); box-shadow: 0 3px 12px rgba(2,71,49,.06); transform: none; }
.paper-container a:hover img.rounded-image { transform: none; }
html.dark-mode body .paper-container:hover, html.dark-mode body .paper-container:focus-within { background-color: #202b23; border-color: rgba(200,169,81,.5); }
@media (max-width: 600px) {
    .paper-container img.rounded-image { width: 100%; height: auto; aspect-ratio: 8 / 5; }
}
@media (prefers-reduced-motion: reduce) {
    .paper-container { transition: none; }
}
/* Preserve complete charts inside the shared thumbnail dimensions. */
.paper-container img.paper-figure-image,
.paper-container img[src*="paradise/"] { object-fit: contain; background-color: #fff; }

/* Open homepage sections with a simple rule beneath each heading. */
.home-page .about-me-container, .home-page .news-container,
.home-page .about-me-container:hover, .home-page .news-container:hover,
html.dark-mode body.home-page .about-me-container,
html.dark-mode body.home-page .news-container { background: transparent; border: 0; border-radius: 0; box-shadow: none; padding: 0; transform: none; margin-bottom: 30px; }
.home-page .about-me-text > h2, .home-page .news-container > h2 { padding-bottom: 12px; margin-bottom: 18px; border-bottom: 1px solid rgba(2,71,49,.2); }
html.dark-mode body.home-page .about-me-text > h2,
html.dark-mode body.home-page .news-container > h2 { border-bottom-color: rgba(185,215,200,.25); }
/* A quiet theme control at the far edge of the navigation. */
.site-nav ul li.theme-control { right: 16px; top: 27px; }
.theme-toggle, html.dark-mode body .theme-toggle { width: 26px; height: 26px; border: 0; background: transparent; color: #d2dbd5; opacity: .72; }
.theme-toggle:hover, .theme-toggle:focus-visible,
html.dark-mode body .theme-toggle:hover, html.dark-mode body .theme-toggle:focus-visible { color: #e1c77e; background: rgba(255,255,255,.06); opacity: 1; }
.theme-toggle:focus-visible { outline: 1px solid #e1c77e; outline-offset: 3px; }
.theme-toggle-icon { transform: scale(.78); }
.home-page .about-me-text > h2 { padding-bottom: 10px; margin-bottom: 14px; }
.home-page .about-me-text p, .home-page .about-me-text ul.bio-strands li { margin-bottom: 10px; }
.home-page .about-me-text ul.bio-strands { margin-bottom: 10px; }
@media (max-width: 760px) {
    .site-nav ul li.theme-control { right: 10px; top: 25px; }
    .site-header .wrapper { padding-right: 44px; }
}
/* Keep the theme control with the navigation rather than at the page edge. */
.site-nav ul li.theme-control { position: static; margin-left: -14px; padding-left: 16px; border-left: 1px solid rgba(255,255,255,.2); }
.site-header .wrapper { padding-right: 30px; }
@media (max-width: 760px) {
    .site-header .wrapper { padding-right: 15px; }
    .site-nav ul li.theme-control { margin-left: -8px; padding-left: 10px; }
}
@media (max-width: 420px) {
    .site-nav ul { gap: 12px; }
    .site-nav ul li.theme-control { margin-left: -4px; padding-left: 8px; }
}

/* A consistent, softly rounded typeface throughout the website. */
body, .site-nav ul, .intro h1, .home-page h2,
.home-page .about-me-text > h2, .home-page .news-container > h2,
h1, h2, h3, h4, h5, h6, button { font-family: "Nunito Sans", "Noto Sans", Helvetica, Arial, sans-serif; }
body { font-weight: 400; }
.intro h1, .home-page .about-me-text > h2, .home-page .news-container > h2 { font-weight: 600; }
.site-nav ul { font-weight: 700; }
/* Open Research and Teaching layouts to match the homepage. */
.pubs-container, .course-container, .paper-container, .uni-container,
.pubs-container:hover, .course-container:hover, .paper-container:hover,
.paper-container:focus-within, .uni-container:hover,
html.dark-mode body .pubs-container, html.dark-mode body .course-container,
html.dark-mode body .paper-container, html.dark-mode body .uni-container,
html.dark-mode body .paper-container:hover,
html.dark-mode body .paper-container:focus-within { background: transparent; border: 0; border-radius: 0; box-shadow: none; transform: none; }
.pubs-container, .course-container { padding: 0; }
.paper-container { padding: 22px 0; margin-bottom: 16px; }
.uni-container { padding: 20px 0; }
/* Section separators matching About and Latest News. */
.pubs-container > h1, .course-container > .teaching-section-heading {
    padding-bottom: 12px;
    margin-bottom: 18px;
    border-bottom: 1px solid rgba(2,71,49,.2);
}
html.dark-mode body .pubs-container > h1,
html.dark-mode body .course-container > .teaching-section-heading {
    border-bottom-color: rgba(185,215,200,.25);
}
/* Quiet separation between papers, without enclosing boxes. */
.pubs-container > .paper-container { margin-bottom: 0; padding-block: 24px; }
.pubs-container > .paper-container + .paper-container { border-top: 1px solid rgba(2,71,49,.09); }
html.dark-mode body .pubs-container > .paper-container + .paper-container { border-top: 1px solid rgba(185,215,200,.12); }
/* A subtle gold outline on hover or keyboard interaction. */
.pubs-container .paper-container { outline: 1px solid transparent; outline-offset: 8px; transition: outline-color .18s ease; }
.pubs-container .paper-container:hover,
.pubs-container .paper-container:focus-within { outline-color: rgba(179,153,93,.65); }
html.dark-mode body .pubs-container .paper-container:hover,
html.dark-mode body .pubs-container .paper-container:focus-within { outline-color: rgba(200,169,81,.7); }
@media (prefers-reduced-motion: reduce) {
    .pubs-container .paper-container { transition: none; }
}
/* Consistent section colors and a quieter paper interaction. */
.pubs-container > h1, .course-container > .teaching-section-heading { color: #024731; }
html.dark-mode body .pubs-container > h1,
html.dark-mode body .course-container > .teaching-section-heading { color: #b9d7c8; }
.pubs-container .paper-container,
.pubs-container .paper-container:hover,
.pubs-container .paper-container:focus-within,
html.dark-mode body .pubs-container .paper-container:hover,
html.dark-mode body .pubs-container .paper-container:focus-within { outline: none; transition: background-color .18s ease; }
.pubs-container .paper-container:hover,
.pubs-container .paper-container:focus-within { background-color: rgba(179,153,93,.035); }
html.dark-mode body .pubs-container .paper-container:hover,
html.dark-mode body .pubs-container .paper-container:focus-within { background-color: rgba(200,169,81,.045); }
@media (prefers-reduced-motion: reduce) {
    .pubs-container .paper-container { transition: none; }
}
/* Match night-mode headings to the clearer mint used for Abstract. */
html.dark-mode body .intro h1,
html.dark-mode body.home-page h2,
html.dark-mode body .pubs-container > h1,
html.dark-mode body .course-container > .teaching-section-heading { color: #79cdbd; }
