:root {
  --ink: #1f2937;
  --muted: #667085;
  --blue: #29447b;
  --blue-dark: #18345f;
  --gold: #b78103;
  --paper: #ffffff;
  --wash: #f5f7fa;
  --line: #dfe4ea;
  --max-width: 900px;
  --radius: 12px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--wash);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; }
a { color: var(--blue); text-underline-offset: 0.16em; }
a:hover { color: var(--blue-dark); }
a:focus-visible, summary:focus-visible {
  outline: 3px solid #8fb4ff;
  outline-offset: 3px;
  border-radius: 3px;
}

.container {
  width: min(calc(100% - 2rem), var(--max-width));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: .7rem 1rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 700;
}
.skip-link:focus { top: 1rem; }

.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.hero {
  min-height: 190px;
  padding-block: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.eyebrow {
  margin: 0 0 .25rem;
  color: var(--blue);
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.hero h1 {
  margin: 0;
  color: #152240;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.4rem, 7vw, 4rem);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -.025em;
}
.subtitle {
  margin: .55rem 0 0;
  font-size: 1.2rem;
  font-weight: 700;
}
.department { margin: .1rem 0 0; color: var(--muted); }
.header-map {
  flex: 0 0 auto;
  width: min(320px, 38vw);
  aspect-ratio: 16 / 9;
  height: auto;
  object-fit: cover;
  object-position: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(15, 23, 42, .12);
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(41, 68, 123, .97);
  box-shadow: 0 1px 8px rgba(15, 23, 42, .12);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: .25rem;
  overflow-x: auto;
  scrollbar-width: thin;
}
.site-nav a {
  flex: 0 0 auto;
  padding: .78rem .72rem;
  color: #fff;
  font-size: .92rem;
  font-weight: 700;
  text-decoration: none;
}
.site-nav a:hover { background: rgba(255,255,255,.1); color: #fff; }

main { padding-block: 2.2rem 3.5rem; }
.section {
  scroll-margin-top: 4.5rem;
  margin-bottom: 2rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 26px rgba(15, 23, 42, .045);
}
.section h2 {
  margin: 0 0 1rem;
  color: #543d1c;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.65rem;
  line-height: 1.2;
}
.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .25rem;
}
.section-heading h2 { margin-bottom: .25rem; }
.section-heading p { margin: 0; color: var(--muted); font-size: .9rem; }
.contact-card p { margin-bottom: 0; }

.publication-list,
.working-list,
.teaching-list {
  margin: 0;
  padding-left: 1.4rem;
}
.publication-list > li,
.working-list > li,
.teaching-list > li {
  padding: .85rem 0 .95rem .35rem;
}
.publication-list > li + li,
.working-list > li + li,
.teaching-list > li + li {
  border-top: 1px solid var(--line);
}
.publication-list > li::marker { color: #98a2b3; }
.publication a,
.working-paper a { font-weight: 700; }
.publication i { color: #344054; }

.publication,
.working-paper {
  position: relative;
}

.abstract {
  margin-top: .5rem;
  color: var(--muted);
}
.abstract summary {
  width: fit-content;
  cursor: pointer;
  color: var(--blue);
  font-size: .82rem;
  font-weight: 700;
  user-select: none;
}
.abstract summary:hover {
  text-decoration: underline;
}
.abstract p {
  margin: .6rem 0 0;
  padding: .8rem .95rem;
  background: #f8fafc;
  border-left: 3px solid #cbd5e1;
  border-radius: 0 8px 8px 0;
  font-size: .93rem;
}

/* On a desktop with a mouse, hovered/focused abstracts become compact floating cards.
   The Abstract control remains available for click/touch and keyboard use. */
@media (hover: hover) and (pointer: fine) and (min-width: 760px) {
  .publication .abstract[open],
  .working-paper .abstract[open] {
    position: absolute;
    left: 1.25rem;
    right: 0;
    z-index: 30;
    margin-top: .4rem;
    padding: .8rem .95rem .95rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, .18);
  }

  .publication .abstract[open] summary,
  .working-paper .abstract[open] summary {
    margin-bottom: .35rem;
  }

  .publication .abstract[open] p,
  .working-paper .abstract[open] p {
    max-height: min(44vh, 360px);
    overflow-y: auto;
    margin-top: .35rem;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    color: var(--ink);
    line-height: 1.55;
  }
}

.note {
  margin: .55rem 0 0;
  color: var(--muted);
  font-size: .9rem;
}

.site-footer {
  color: #fff;
  background: var(--blue-dark);
}
.footer-inner {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: .9rem;
}
.footer-inner p { margin: 0; }
.footer-inner a { color: #fff; }

@media (max-width: 640px) {
  .hero { min-height: 0; padding-block: 1.5rem; align-items: flex-start; }
  .header-map { width: min(250px, 40vw); }
  .subtitle { font-size: 1.05rem; }
  .section-heading { display: block; }
  .section-heading p { margin-bottom: .75rem; }
  .site-nav a { padding-inline: .6rem; }
}

@media (max-width: 430px) {
  .header-map { width: 132px; }
  .hero { gap: 1rem; }
  .department { font-size: .9rem; }
  .section { border-radius: 0; border-left: 0; border-right: 0; }
  main.container { width: 100%; }
  .site-header .container, .site-nav .container, .site-footer .container { width: min(calc(100% - 1.5rem), var(--max-width)); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}


/* Compact academic layout */
main {
  line-height: 1.5;
}

section {
  margin-block: 1.65rem;
}

section > h2,
#content h1 {
  margin-bottom: .55rem;
  font-size: 1.12rem;
  letter-spacing: .01em;
}

.contact-line {
  margin: .15rem 0 0;
  font-size: .9rem;
  line-height: 1.4;
  color: var(--muted);
}

.publication,
.working-paper {
  margin-bottom: .8rem;
}

.publication > p,
.working-paper > p,
.publication li,
.working-paper li {
  font-size: .94rem;
}

.abstract summary {
  font-size: .78rem;
}

.abstract p {
  font-size: .86rem;
  line-height: 1.5;
}

nav a {
  font-size: .9rem;
}

footer {
  font-size: .78rem;
}

@media (max-width: 700px) {
  section {
    margin-block: 1.35rem;
  }

  section > h2,
  #content h1 {
    font-size: 1.05rem;
  }

  .contact-line {
    font-size: .86rem;
  }
}


/* Dense academic layout: compact typography and spacing */
html {
  font-size: 15px;
}

body {
  line-height: 1.42;
}

header {
  padding-top: .75rem;
  padding-bottom: .65rem;
}

.header-inner {
  gap: 1rem;
}

.header-copy h1 {
  font-size: 2rem;
  line-height: 1.05;
  margin-bottom: .2rem;
}

.header-copy p {
  margin: .1rem 0;
  font-size: .92rem;
}

.header-map {
  width: min(280px, 34vw);
}

nav {
  min-height: 0;
}

nav a {
  padding: .5rem .65rem;
  font-size: .82rem;
}

main {
  padding-top: 1rem;
  padding-bottom: 1.5rem;
}

section {
  margin-block: 1.15rem;
}

section > h2,
#content h1 {
  margin: 0 0 .35rem;
  font-size: 1rem;
  line-height: 1.2;
}

.contact-line {
  margin: 0;
  font-size: .82rem;
}

.publications,
.working-papers,
.teaching-list,
ul {
  margin-top: .25rem;
  margin-bottom: .25rem;
}

.publication,
.working-paper {
  margin-bottom: .35rem;
  line-height: 1.34;
}

.publication:last-child,
.working-paper:last-child {
  margin-bottom: 0;
}

.publication > p,
.working-paper > p,
.publication li,
.working-paper li,
.publications li,
.working-papers li {
  font-size: .88rem;
  margin-top: 0;
  margin-bottom: 0;
}

.abstract {
  margin-top: .15rem;
}

.abstract summary {
  font-size: .72rem;
  line-height: 1.2;
}

.abstract p {
  font-size: .8rem;
  line-height: 1.4;
}

.teaching-list li,
#teach li {
  margin-bottom: .18rem;
  line-height: 1.3;
  font-size: .88rem;
}

.teaching-list li:last-child,
#teach li:last-child {
  margin-bottom: 0;
}

footer {
  padding-top: .55rem;
  padding-bottom: .55rem;
  font-size: .72rem;
}

@media (max-width: 700px) {
  html {
    font-size: 14px;
  }

  header {
    padding-top: .6rem;
    padding-bottom: .55rem;
  }

  .header-copy h1 {
    font-size: 1.7rem;
  }

  .header-map {
    width: 120px;
  }

  section {
    margin-block: 1rem;
  }

  .publication,
  .working-paper {
    margin-bottom: .32rem;
  }

  .teaching-list li,
  #teach li {
    margin-bottom: .16rem;
  }
}
