/* Approved layout adaptation. Existing font/config/style sources remain intact.
 * Layout reference: https://github.com/aolattus/aolattus.github.io
 */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #f5f0eb;
  --text: #1a1a1a;
  --accent: #c4622c;
  --muted: #999;
  --rule: #d8d0c8;
  --bio-text: #3a3530;
  --abstract-text: #6b6460;
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body {
  padding: 80px 60px;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ── Two-column layout ── */

.page {
  display: grid;
  grid-template-columns: 370px 1fr;
  gap: 72px;
  max-width: 1050px;
  margin: 0 auto;
}

/* ── Bio column ── */

.bio-col {
  position: sticky;
  top: 80px;
  align-self: start;
}

.photo {
  width: 100%;
  display: block;
  margin-bottom: 18px;
  image-rendering: high-quality;
}

h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin-bottom: 10px;
}

.bio {
  font-size: 0.87rem;
  color: var(--bio-text);
  line-height: 1.7;
  margin-bottom: 18px;
}

.icon-links {
  display: flex;
  gap: 14px;
  font-size: 1.15rem;
  margin-top: 20px;
}

.icon-links a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.15s;
}

.icon-links a:hover {
  color: var(--accent);
  text-decoration: none;
}

.cv-link {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
}

.cv-link:hover {
  text-decoration: none;
  opacity: 0.75;
}

/* ── Page tabs ── */

.page-tabs {
  display: flex;
  gap: 28px;
  margin-bottom: 36px;
}

.page-tab {
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  padding-bottom: 6px;
  border-bottom: 2px solid transparent;
}

.page-tab:hover {
  color: var(--text);
  text-decoration: none;
}

.page-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ── Research column ── */

.research-col {
  padding-top: 2px;
}

/* ── Teaching ── */

.teaching-institution {
  font-size: 0.82rem;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 18px;
}

section {
  margin-bottom: 44px;
}

h2 {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 20px;
}

.paper {
  margin-bottom: 22px;
}

.paper-title {
  font-size: 0.9rem;
  line-height: 1.45;
  margin-bottom: 3px;
}

.paper-title a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.paper-title a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
  text-decoration: none;
}

.paper-meta {
  font-size: 0.78rem;
  color: var(--muted);
}

.paper-status {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 3px;
  padding: 1px 6px;
  margin-left: 4px;
  vertical-align: middle;
  white-space: nowrap;
}

.paper-link {
  display: inline-block;
  font-size: 0.78rem;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 2px;
  padding: 0px 5px;
  margin-left: 7px;
  white-space: nowrap;
  vertical-align: middle;
  text-decoration: none;
}

.paper-link:hover {
  background: var(--accent);
  color: var(--bg);
  text-decoration: none;
}

.jmp-label {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 3px;
  padding: 1px 6px;
  margin-left: 4px;
  vertical-align: middle;
  white-space: nowrap;
}

.abstract {
  font-size: 0.8rem;
  color: var(--abstract-text);
  line-height: 1.7;
  margin-top: 8px;
}

/* ── Mobile ── */

@media (max-width: 680px) {
  body {
    padding: 40px 24px;
  }

  .page {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .bio-col {
    position: static;
  }

  .photo {
    width: 160px;
  }
}


/* Original Involve font, logos, and color themes within the retained layout. */
:root {
  color-scheme: light;
  --bg: #fff;
  --text: #595959;
  --accent: #39c;
  --heading: #043361;
  --muted: #747474;
  --rule: #e5e5e5;
  --bio-text: #595959;
  --abstract-text: #595959;
  --strong: #222;
  --companion: #000;
  --hover: #069;
  --control-hover: #f1f5f8;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #20212b;
  --text: #dadbdf;
  --accent: #3eb7f0;
  --heading: #3eb7f0;
  --muted: #acadb7;
  --rule: #3a3b47;
  --bio-text: #dadbdf;
  --abstract-text: #dadbdf;
  --strong: #eeeff0;
  --companion: #fff;
  --hover: #8fd4f5;
  --control-hover: #2b2d3a;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]):not([data-auto-dark-mode="false"]) {
    color-scheme: dark;
    --bg: #20212b; --text: #dadbdf; --accent: #3eb7f0; --heading: #3eb7f0;
    --muted: #acadb7; --rule: #3a3b47; --bio-text: #dadbdf;
    --abstract-text: #dadbdf; --strong: #eeeff0; --companion: #fff; --hover: #8fd4f5; --control-hover: #2b2d3a;
  }
}
html { scroll-behavior: smooth; }
body { padding: 0; }
h1 { color: var(--heading); letter-spacing: -.04em; }
h2 { color: var(--heading); }
strong { color: var(--strong); }
a:hover { color: var(--hover); }
.top-nav { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--rule); }
.nav-container { max-width: 1170px; margin: 0 auto; padding: 12px 60px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.nav-links { list-style: none; display: flex; align-items: center; gap: 32px; }
.nav-links a { color: var(--text); font-size: .88rem; text-decoration: none; }
.nav-links a:hover { color: var(--accent); }
.has-dropdown { position: relative; }
.dropdown { display: none; position: absolute; top: 100%; left: -14px; min-width: 160px; padding: 12px 0 8px; list-style: none; background: var(--bg); border: 1px solid var(--rule); box-shadow: 0 5px 14px #0001; }
.dropdown a { display: block; padding: 5px 14px; white-space: nowrap; }
.has-dropdown:hover .dropdown, .has-dropdown:focus-within .dropdown { display: block; }
.theme-toggle { margin-left: auto; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 34px; height: 34px; color: var(--heading); background: transparent; border: 1px solid var(--rule); border-radius: 5px; padding: 6px; cursor: pointer; }
.theme-icon { display: none; width: 20px; height: 20px; }
.theme-toggle[data-theme-action="light"] [data-theme-icon="light"],
.theme-toggle[data-theme-action="dark"] [data-theme-icon="dark"] { display: block; }
.theme-toggle:hover { background: var(--control-hover); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.page { max-width: 1170px; padding: 56px 60px 80px; }
.bio-col { top: 94px; }
.page > * { min-width: 0; }
.photo { width: 240px; max-width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 50%; }
.section-title { font-size: 1.75rem; line-height: 1.15; font-weight: 700; letter-spacing: -.05em; text-transform: none; border: 0; padding: 0; margin: 0 0 28px; }
.subsection-title { font-size: 1.15rem; line-height: 1.3; font-weight: 700; letter-spacing: -.02em; color: var(--heading); margin: 0 0 18px; }
.research-col > section { margin-bottom: 58px; }
section { scroll-margin-top: 110px; }
.paper-title { font-weight: 400; }
.paper-status-note { font-size: .7rem; color: var(--accent); font-style: italic; margin-left: 6px; }
.companion-label { color: var(--companion); font-style: italic; }
.paper-divider { height: 0; border: 0; border-top: 1px solid var(--rule); background: transparent; margin: 1.5rem 0; }
.paper-meta { line-height: 1.55; }
.paper-link { font-size: .66rem; line-height: 1.35; padding: 0 4px; margin-top: 4px; margin-left: 4px; }
.paper-meta > .paper-link:first-child { margin-left: 0; }
.cv-link { font-size: .8rem; }
.icon-links { gap: 16px; padding: 0; margin-left: 0; }
.icon-links a { display: inline-flex; align-items: center; justify-content: flex-start; width: 24px; height: 2.4rem; padding: 0; margin-left: 0; color: var(--heading); border-radius: 100%; }
.icon-links a:hover { color: var(--heading); background: var(--control-hover); transform: scale(1.15); }
.icon-links svg { width: 1em; height: 1em; fill: currentColor; }
.ai-cv { font: normal 1.3rem/1 Academicons; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.resource-list { padding-left: 18px; font-size: .9rem; }
.resource-list > li { margin-bottom: 16px; }
.resource-list ul { margin: 7px 0 0; padding-left: 20px; font-size: .9em; }
.resource-list ul li { margin: 6px 0; }
.resource-note { font-size: .86em; color: var(--abstract-text); margin-top: 5px; }
.site-credit { font-size: .67rem; color: var(--muted); margin-top: 40px; }
.site-credit a { color: inherit; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.skip-link { position: fixed; z-index: 30; left: 24px; top: 12px; transform: translateY(-180%); background: var(--bg); padding: 4px 10px; }
.skip-link:focus { transform: translateY(0); }
#content:focus { outline: none; }
@media (min-width: 681px) and (max-width: 1050px) {
  .nav-container { padding-left: 40px; padding-right: 40px; }
  .page { padding: 48px 40px 60px; grid-template-columns: minmax(240px, 34%) 1fr; gap: 40px; }
}
@media (min-width: 681px) and (max-height: 900px) {
  .bio-col { position: static; }
}
@media (max-width: 680px) {
  body { padding: 0; }
  .nav-container { padding: 12px 24px; gap: 10px 12px; }
  .nav-links { gap: 18px; }
  .nav-links a { font-size: .78rem; }
  .theme-toggle { width: 40px; height: 40px; padding: 9px; }
  .page { padding: 36px 24px 48px; }
  .photo { width: 160px; }
  .icon-links { gap: 16px; }
  .paper-link { min-height: 24px; padding: 4px; }
  .section-title { font-size: 1.6rem; }
}
@media (max-width: 380px) {
  .nav-links { gap: 14px; }
  .nav-links a { font-size: .72rem; }
  .nav-container { column-gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}

/* Apply the approved presentation to unchanged Jekyll-generated content. */
.approved-homepage { font-size: 17px; line-height: 1.65; font-weight: 400; }
.approved-homepage h1 { line-height: 1.65; margin: 0 0 10px; font-size: 2rem; font-weight: 700; text-wrap: initial; }
.approved-homepage .profile-affiliation { font-size: 15px; line-height: 1.5; font-style: normal; font-weight: 400; letter-spacing: .01em; color: var(--affiliation-text); margin: 0 0 24px; }
.approved-homepage .profile-bio p { font-size: .87rem; line-height: 1.7; color: var(--bio-text); margin: 0 0 18px; text-wrap: wrap; }
.approved-homepage .nav-links { margin: 0; padding: 0; list-style: none; }
.approved-homepage .nav-links > li { margin: 0; }
.approved-homepage .nav-links a { color: var(--text); font-size: .88rem; text-decoration: none; }
.approved-homepage .nav-links a:hover { color: var(--accent); }
.approved-homepage .nav-toggle { display: none; }
.approved-homepage .has-dropdown .dropdown { min-width: 160px; background: var(--bg); border-color: var(--rule); padding: 12px 0 8px; margin: 0; }
.approved-homepage .has-dropdown .dropdown li { margin: 0; }
.approved-homepage .has-dropdown .dropdown a { padding: 5px 14px; }
.approved-homepage .research-col > h2 { color: var(--heading); font-size: 1.75rem; font-weight: 700; line-height: 1.15; letter-spacing: -.05em; text-transform: none; border: 0; padding: 0; margin: 58px 0 28px; }
.approved-homepage .research-col > h2:first-of-type { margin-top: 0; }
.approved-homepage .research-col > h3 { color: var(--heading); font-size: 1.15rem; font-weight: 700; line-height: 1.3; letter-spacing: -.02em; margin: 40px 0 18px; }
.approved-homepage .research-col > h2 + h3 { margin-top: 0; }
.approved-homepage .research-col > p { font-size: .9rem; line-height: 1.45; margin: 0 0 22px; color: var(--text); }
.approved-homepage .research-col > p > strong { color: var(--text); font-weight: 400; }
.approved-homepage .research-col > p > em:first-child headingcolor { color: var(--companion); }
.approved-homepage .research-col > p > strong + em { color: var(--accent); font-size: .7rem; margin-left: 6px; }
.approved-homepage .research-col > p:has(> a:first-child) { font-size: 0; line-height: 1.55; }
.approved-homepage .research-col > p > a { display: inline-block; font-size: .66rem; line-height: 1.35; padding: 0 4px; margin-top: 4px; margin-left: 4px; border: 1px solid var(--accent); border-radius: 2px; text-decoration: none; color: var(--accent); vertical-align: middle; white-space: nowrap; }
.approved-homepage .research-col > p > a:first-child { margin-left: 0; }
.approved-homepage .research-col > p > a:hover { background: var(--accent); color: var(--bg); }
.approved-homepage .research-col > hr { height: 0; border: 0; border-top: 1px solid var(--rule); background: transparent; margin: 1.5rem 0; }
.approved-homepage .research-col > ul { padding-left: 18px; font-size: .9rem; margin: 0 0 44px; }
.approved-homepage .research-col > ul > li { margin-bottom: 16px; }
.approved-homepage .research-col ul ul { margin: 7px 0 0; padding-left: 20px; font-size: .9em; }
.approved-homepage .research-col ul ul li { margin: 6px 0; }
.approved-homepage .research-col ul a { text-decoration: none; }
.approved-homepage .research-col ul a:hover { text-decoration: underline; }
.approved-homepage .site-credit { width: auto; text-align: left; border: 0; padding: 0; }
.approved-homepage .site-credit p { margin: 0; }
.approved-homepage .icon-links a { background: transparent; color: var(--heading); }
.approved-homepage #content-area:focus { outline: none; }
@media (max-width: 768px) {
  .approved-homepage .nav-links { display: flex; flex-direction: row; width: auto; position: static; padding: 0; border: 0; background: transparent; }
  .approved-homepage .nav-links > li > a { display: inline; padding: 0; }
  .approved-homepage .has-dropdown .dropdown { position: absolute; border: 1px solid var(--rule); }
}
@media (max-width: 680px) {
  .approved-homepage .nav-links a { font-size: .78rem; }
  .approved-homepage .research-col > h2 { font-size: 1.6rem; }
  .approved-homepage .research-col > p > a { min-height: 24px; padding: 4px; }
}
@media (max-width: 380px) { .approved-homepage .nav-links a { font-size: .72rem; } }

@media (min-width: 1051px) {
  .approved-homepage .page { column-gap: 104px; }
}

/* Extend only the research side; preserve the approved sidebar position/width. */
@media (min-width: 1051px) {
  .approved-homepage .page {
    max-width: 1280px;
    margin-left: max(0px, calc(50% - 585px));
    margin-right: 0;
    padding-right: 16px;
    column-gap: 120px;
    grid-template-columns: 370px minmax(0, 1fr);
  }
}
@media (min-width: 1280px) {
  .approved-homepage .page { column-gap: 136px; padding-right: 32px; }
}
.approved-homepage .research-col > p:has(> strong + em) { text-wrap: wrap; }
.approved-homepage .research-col > p > strong + em { display: inline-block; white-space: nowrap; }
/* Reduce only paper-title-to-link spacing, without tightening other paragraphs. */
.approved-homepage .research-col > p:has(> strong):has(+ p > a:first-child) { margin-bottom: 8px; }
.approved-homepage .research-col > p > a { font-size: 12px; padding: 2px 7px; margin-top: 0; margin-left: 8px; }
.approved-homepage .research-col > p > a:first-child { margin-left: 0; }
@media (min-width: 681px) and (max-width: 1050px) {
  .approved-homepage .research-col > p > a { margin-bottom: 4px; }
}
@media (max-width: 680px) {
  .approved-homepage .research-col > p > a { min-height: 28px; padding: 4px 7px; margin-top: 4px; }
}

/* Paper title font size: edit this one value; labels and other text stay unchanged. */
.approved-homepage { --paper-title-size: 17.3px; }
.approved-homepage .research-col > #research ~ p:has(~ #public-goods) > strong {
  font-size: var(--paper-title-size);
}


/* Fixed profile header; site.bio below is ordinary, freely editable Markdown. */
.approved-homepage .job-market { margin: 0 0 12px; text-wrap: wrap; }
.approved-homepage .job-market strong { font-weight: 700; color: var(--strong); }
.approved-homepage .profile-cv { display: table; margin: 0 0 20px; font-size: .8rem; }

/* Subtle neutral affiliation, distinct from the bio in both color themes. */
:root { --affiliation-text: #6b6b6b; }
:root[data-theme="dark"] { --affiliation-text: #eeeeee; }
.approved-homepage .profile-name > h1:has(+ .profile-affiliation) { line-height: 1; padding-top: .325em; margin-bottom: 0; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]):not([data-auto-dark-mode="false"]) { --affiliation-text: #eeeeee; }
}

/* Keep profile text/icons left-aligned and retain normal block margin collapsing. */
.approved-homepage .profile-name { width: fit-content; max-width: 100%; }
.approved-homepage .profile-name > .profile-affiliation { text-align: left; margin-top: 2px; }
