:root {
  --bg: #fafaf8;
  --text: #1a1a1a;
  --muted: #6b6b6b;
  --accent: #b35c3a;
  --accent-light: rgba(179, 92, 58, 0.08);
  --accent-mid: rgba(179, 92, 58, 0.18);
  --border: #e2e0dc;
  --highlight-bg: #f7f5f2;
  --max-width: 740px;
  --nav-height: 58px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  padding-top: var(--nav-height);
}

/* ——— Navigation ——— */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(250,250,248,0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  z-index: 100;
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-name {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  color: var(--accent);
  text-decoration: none;
}

.nav-links { display: flex; gap: 1.75rem; }

.nav-links a {
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: color 0.2s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--accent);
  transition: width 0.25s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); font-weight: 500; }

/* ——— Main ——— */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem 1.5rem 5rem;
}

/* ——— Hero ——— */
.hero { margin-bottom: 0; }

.hero-content {
  display: flex;
  align-items: flex-start;
  gap: 2.5rem;
}

.hero-text { flex: 1; }

.hero-photo {
  flex-shrink: 0;
  align-self: stretch;
}

.hero-photo img {
  width: auto;
  max-height: 100%;
  max-width: 130px;
  object-fit: cover;
  object-position: top;
  border-radius: 6px;
  filter: grayscale(15%);
}

.hero h1 {
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.15;
  margin-bottom: 0.6rem;
}

.subtitle {
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--accent);
  margin-bottom: 0.2rem;
}

.affiliation {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.affiliations-list {
  font-size: 0.82rem;
  color: var(--muted);
  list-style: none;
  margin-bottom: 1.2rem;
}

.affiliations-list li::before {
  content: "·";
  color: var(--accent);
  font-weight: 700;
  margin-right: 0.4rem;
}

.contact {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 1.25rem;
}

.contact a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: border-color 0.25s, color 0.25s;
}

.contact a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.separator { margin: 0 0.5rem; opacity: 0.3; }

/* ——— Bio ——— */
.bio {
  margin-bottom: 3.5rem;
  padding-top: 2rem;
  padding-bottom: 3rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-top: 2rem;
}

.bio p {
  font-size: 0.96rem;
  color: #3a3a3a;
  line-height: 1.85;
  margin-bottom: 0.9rem;
}

.bio p:last-child { margin-bottom: 0; }

/* ——— Sections ——— */
h2 {
  font-size: 1.15rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 1.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

h2::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

h3 {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--muted);
  margin-bottom: 1.25rem;
  margin-top: 2.75rem;
}

h3:first-child { margin-top: 0; }

/* ——— Publications ——— */
.pub-category { margin-bottom: 2.75rem; }

.pub-item {
  margin-bottom: 1.6rem;
  padding-left: 0;
  padding-bottom: 1.6rem;
  border-bottom: 1px solid #eeedeb;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  padding: 1rem 1rem 1.6rem 1rem;
  border-radius: 4px;
}

.pub-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.pub-item:last-child { border-bottom: none; padding-bottom: 1rem; }

.pub-title {
  font-size: 0.93rem;
  font-weight: 500;
  line-height: 1.5;
  margin-bottom: 0.25rem;
}

.pub-authors {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.15rem;
}

.pub-venue {
  font-size: 0.82rem;
  color: var(--muted);
}

.pub-venue em {
  color: var(--accent);
  font-weight: 500;
}

.pub-note {
  font-size: 0.78rem;
  color: #999;
  font-style: italic;
  margin-top: 0.35rem;
}

.pub-award {
  font-size: 0.78rem;
  color: var(--accent);
  margin-top: 0.25rem;
  font-weight: 500;
}

.pub-status {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--accent);
  margin-top: 0.15rem;
}

.pub-link {
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s;
}

.pub-link:hover {
  color: var(--accent);
}

.pub-item.highlight {
  border-left: 3px solid var(--accent);
  padding-left: 1.1rem;
  background: var(--accent-light);
  border-radius: 0 4px 4px 0;
  padding-top: 1rem;
  padding-right: 1rem;
  padding-bottom: 1rem;
  margin-left: -0.25rem;
  border-bottom: none;
  margin-bottom: 1.6rem;
}

/* ——— Book details expand ——— */
.book-details {
  margin-top: 0.75rem;
}

.book-details summary {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--accent);
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: color 0.2s;
}

.book-details summary::-webkit-details-marker { display: none; }

.book-details summary::before {
  content: '▸';
  font-size: 0.7rem;
  transition: transform 0.2s;
}

.book-details[open] summary::before {
  transform: rotate(90deg);
}

.book-details summary:hover { color: var(--text); }

.book-summary {
  margin-top: 0.75rem;
  padding: 1rem 1.1rem;
  background: var(--accent-light);
  border-radius: 4px;
  border-left: 2px solid var(--accent-mid);
}

.book-summary p {
  font-size: 0.86rem;
  color: #444;
  line-height: 1.75;
  margin-bottom: 0.75rem;
}

.book-summary p:last-child { margin-bottom: 0; }

/* ——— Generic list items (teaching, service, writing) ——— */
.item {
  margin-bottom: 1.4rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid #eeedeb;
}

.item:last-child { border-bottom: none; padding-bottom: 0; }

.item-year {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.item-title {
  font-size: 0.92rem;
  font-weight: 400;
  line-height: 1.55;
  margin-top: 0.1rem;
}

.item-title em { font-style: italic; }

.item-detail {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.55;
}

.item-link {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: border-color 0.25s, color 0.25s;
}
.item-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ——— Subsection headers ——— */
.subsection {
  margin-top: 2.5rem;
  margin-bottom: 1.25rem;
}

.subsection:first-child { margin-top: 0; }

/* ——— Section spacing ——— */
section { margin-bottom: 3.5rem; }

section:last-child { margin-bottom: 0; }

/* ——— Page header (for subpages) ——— */
.page-header {
  margin-bottom: 2.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.page-header h1 {
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

/* ——— Footer ——— */
footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: #bbb;
}

/* ——— Responsive ——— */
@media (max-width: 600px) {
  .hero-content { flex-direction: column-reverse; gap: 1.5rem; }
  .hero-photo img { width: 120px; height: 120px; }
  .nav-links { gap: 1rem; }
  .nav-links a { font-size: 0.78rem; }
  .nav-name { font-size: 0.88rem; }
  .hero h1 { font-size: 1.8rem; }
  main { padding: 2.5rem 1.25rem 4rem; }
}

/* ——— Print ——— */
@media print {
  nav, footer { display: none; }
  body { padding-top: 0; }
  .pub-item.highlight { background: none; }
}
