/* Erewhon — SIL Open Font License 1.1. See assets/fonts/README.txt */
@font-face {
  font-family: erewhon;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(assets/fonts/Erewhon-Regular.woff2) format('woff2');
}
@font-face {
  font-family: erewhon;
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(assets/fonts/Erewhon-Italic.woff2) format('woff2');
}
@font-face {
  font-family: erewhon;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(assets/fonts/Erewhon-Bold.woff2) format('woff2');
}
@font-face {
  font-family: erewhon;
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url(assets/fonts/Erewhon-BoldItalic.woff2) format('woff2');
}

:root {
  --bg:        #fcf5ea;
  --surface:   #f5eee1;
  --primary:   #0e2841;
  --content:   #33302e;
  --secondary: #6b625a;
  --border:    #ded5c5;
  --tint:      #ece4d5;
  --band-border: #d8cdba;
  --shadow:    rgba(14, 40, 65, .12);

  --main-width: 1200px;
  --gap: 28px;
  --header-height: 80px;
  --textsize: 20px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--content);
  font-family: erewhon, Charter, "Bitstream Charter", Georgia, serif;
  font-size: var(--textsize);
  line-height: 1.6;
}

h1, h2, h3 { line-height: 1.2; margin: 0; }
img { display: block; max-width: 100%; }

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- nav ---------- */
.nav {
  background: var(--surface);
  border-bottom: 1px solid var(--band-border);
}
.nav-inner {
  max-width: calc(var(--main-width) + var(--gap) * 2);
  margin: 0 auto;
  padding: 0 var(--gap);
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--content);
}
.brand:hover { color: var(--primary); text-decoration: none; }
.menu {
  display: flex;
  gap: 28px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
}
.menu a { color: var(--content); }
.menu a.here {
  color: var(--primary);
  font-weight: 600;
  border-bottom: 2px solid var(--primary);
}

/* ---------- layout ---------- */
main {
  max-width: calc(var(--main-width) + var(--gap) * 2);
  margin: 0 auto;
  padding: 0 var(--gap) 72px;
}

/* ---------- hero: bio left, photo right ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(230px, 32%, 400px);
  gap: 56px;
  align-items: start;
  padding: 90px 0 40px;
}
.hero-photo img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  border: 2px solid var(--border);
  box-shadow: 0 4px 16px var(--shadow);
}
.hero-bio h1 {
  font-size: 42px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--primary);
  margin: 0 0 20px;
}
.hero-subtitle {
  font-size: 19px;
  line-height: 1.7;
  margin: 0 0 .9rem;
}
.hero-subtitle:last-of-type { margin-bottom: 0; }
.hero-subtitle strong { color: var(--primary); }
.hero-subtitle a {
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 700;
}
.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: 1.5rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
}
.hero-links a {
  display: inline-block;
  padding: 7px 16px;
  background: var(--tint);
  border: 1px solid var(--band-border);
  border-radius: 8px;
  color: var(--primary);
}
.hero-links a:hover {
  background: var(--primary);
  color: var(--bg);
  text-decoration: none;
}

/* ---------- research ---------- */
.research { padding: 20px 0 60px; }
.research h2 {
  font-size: 26px;
  font-weight: 700;
  color: var(--primary);
  margin: 40px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}
.research h2:first-child { margin-top: 0; }

.item {
  margin-bottom: 28px;
  padding: 12px 0 12px 24px;
  border-left: 3px solid var(--border);
  transition: border-color .2s ease;
}
.item:hover { border-left-color: var(--primary); }
.item h3 {
  font-size: 23px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 10px;
}
.authors, .status {
  font-size: 17px;
  line-height: 1.6;
  color: var(--secondary);
  margin: 0;
}

/* 1. paper titles are links: make that visible */
.item h3 a {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}
.status { color: var(--primary); }

/* ---------- contact ---------- */
.page { padding: 60px 0 0; }
.page h1 {
  font-size: 42px;
  font-weight: 700;
  color: var(--primary);
  margin: 0 0 24px;
}
.page p { margin: 0 0 1.2rem; }
address { font-style: normal; }

/* ---------- footer ---------- */
footer {
  background: var(--surface);
  border-top: 1px solid var(--band-border);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  color: var(--secondary);
}
footer div {
  max-width: calc(var(--main-width) + var(--gap) * 2);
  margin: 0 auto;
  padding: 24px var(--gap);
}

@media (max-width: 700px) {
  :root { --gap: 14px; --header-height: 64px; --textsize: 19px; }
  .brand { font-size: 15px; }
  .hero {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 30px 0 20px;
  }
  .hero-photo { order: -1; }
  .hero-photo img { width: 100%; max-width: 300px; }
  .hero-bio h1 { font-size: 32px; }
  .hero-subtitle { font-size: 17px; }
  .research h2 { font-size: 23px; }
  .item h3 { font-size: 20px; }
  .authors, .status { font-size: 16px; }
}


/* ---------- collapsible abstracts ---------- */
.item details { margin-top: 10px; }
.item summary {
  display: inline-block;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  user-select: none;
}
.item summary::marker { color: var(--border); }
.item summary:hover { text-decoration: underline; text-underline-offset: 3px; }
.item details[open] summary { margin-bottom: 10px; }
.item .abstract {
  font-size: 18px;
  line-height: 1.65;
  color: var(--content);
  margin: 0;
}
