@import url("https://fonts.googleapis.com/css2?family=EB+Garamond:wght@400;500;600;700&family=IBM+Plex+Sans:wght@400;500;600;700&display=swap");

:root {
  --text: #1f1a14;
  --muted: #5f564a;
  --border: #d8cebf;
  --link: #0b3d6f;
  --link-hover: #7b331f;
  --bg: #f8f5ee;
  --sidebar-bg: #eee7dc;
  --surface: #fcf9f3;
  --surface-strong: #e3d8c8;
  --footer-bg: #f2ece2;
  --max-width: 980px;
  --homepage-photo-max-height: 400px;
  --font-serif: "EB Garamond", Garamond, "Times New Roman", serif;
  --font-sans: "IBM Plex Sans", "Avenir Next", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

.site-title,
.site-subtitle,
.nav a,
.content h1,
.content h2,
.content h3,
.content h4,
.content h5,
.content h6,
.footer {
  font-family: var(--font-sans);
}

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

a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

.page {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

.sidebar {
  width: 300px;
  padding: 28px 20px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
  overflow-y: auto;
}

.site-title {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 6px;
}

.site-subtitle {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 18px;
}

.nav a {
  display: block;
  margin: 6px 0;
  padding: 6px 10px;
  border-radius: 6px;
  transition: background-color 0.16s ease, color 0.16s ease;
}

.nav a:hover {
  text-decoration: none;
  background: var(--surface-strong);
}

.nav a.active {
  background: #d7cab7;
  color: #2f2419;
  font-weight: 600;
  text-decoration: none;
}

.content {
  flex: 1;
  padding: 34px 40px 48px;
}

.content-inner {
  max-width: var(--max-width);
}

.content h1 {
  margin: 0 0 1rem;
  font-size: 1.95rem;
  line-height: 1.2;
}

.content h2 {
  margin: 2.1rem 0 0.7rem;
  font-size: 1.2rem;
  line-height: 1.3;
}

.content h3 {
  margin: 1.6rem 0 0.55rem;
  font-size: 1.08rem;
  line-height: 1.3;
}

.content h4,
.content h5,
.content h6 {
  margin: 1.35rem 0 0.5rem;
  line-height: 1.3;
}

.content p {
  margin: 0 0 1.05rem;
}

.content ul,
.content ol {
  margin: 0.55rem 0 1.25rem;
  padding-left: 1.35rem;
}

.content li + li {
  margin-top: 0.3rem;
}

.content-inner > :last-child {
  margin-bottom: 0;
}

.page-publications .content ol {
  margin: 0.3rem 0 0;
  padding-left: 2.2rem;
}

.page-publications .content ol li {
  margin: 0 0 1.12rem;
  padding-left: 0.25rem;
  line-height: 1.46;
}

.page-publications .content ol li:last-child {
  margin-bottom: 0;
}

.page-publications .content ol li::marker {
  font-family: var(--font-sans);
  font-size: 0.9em;
  font-weight: 600;
  color: var(--muted);
}

.page-publications .content strong {
  font-family: var(--font-sans);
  font-weight: 600;
}

.homepage-intro {
  display: flex;
  align-items: flex-start;
  gap: 1.75rem;
  margin: 0 0 2rem;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.homepage-photo {
  margin: 0;
  flex: 0 0 auto;
}

.homepage-photo img {
  display: block;
  width: 100%;
  max-width: 300px;
  height: auto;
  max-height: var(--homepage-photo-max-height);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(17, 17, 17, 0.12);
}

.homepage-affiliations {
  min-width: 0;
}

.homepage-affiliations h2 {
  margin: 0 0 0.6rem;
}

.homepage-affiliations h3 {
  margin: 1rem 0 0.5rem;
  font-size: 1.05rem;
}

.homepage-affiliations ul {
  margin: 0;
  padding-left: 1.1rem;
}

.footer {
  border-top: 1px solid var(--border);
  background: var(--footer-bg);
  font-size: 0.9rem;
  color: var(--muted);
}

.footer-inner {
  max-width: var(--max-width);
  margin-left: 300px;
  padding: 14px 36px;
  text-align: right;
}

.footer-sep {
  margin: 0 8px;
}

@media (max-width: 800px) {
  .page {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
    position: static;
    top: auto;
    align-self: stretch;
    height: auto;
    overflow-y: visible;
  }

  .content {
    padding: 26px 20px 40px;
  }

  .homepage-intro {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }

  .footer-inner {
    margin-left: 0;
    padding: 14px 20px;
    text-align: left;
  }
}
