@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Playfair+Display:wght@600&display=swap');

:root {
  --bg: #f7f5f1;
  --paper: #ffffff;
  --border: #e4dfd7;
  --text: #171717;
  --muted: #5a5854;
  --link: #1a3d73;
  --link-hover: #102748;
  --max-width: 760px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}

body.scrolled .site-header {
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

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

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

p {
  margin: 0 0 1rem;
}

ul {
  margin: 0;
  padding-left: 1.2rem;
}

li {
  margin: 0.45rem 0;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.2rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(247, 245, 241, 0.96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
  transition: all 0.25s ease;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 180px;
  gap: 1rem;
  transition: min-height 0.25s ease;
}

body.scrolled .navbar {
  min-height: 78px;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 0.9rem 0;
}

.profile-photo {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--paper);
  transition: width 0.25s ease, height 0.25s ease, transform 0.25s ease, opacity 0.25s ease;
}

body.scrolled .profile-photo {
  width: 52px;
  height: 52px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.brand-name {
  color: var(--text);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.04em;
}

.brand-title {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.4;
}

.page {
  padding-top: 0.8rem;
  padding-bottom: 3.5rem;
}

.section {
  border-bottom: 1px solid var(--border);
  padding: 0 0 2.2rem;
  margin-bottom: 2.2rem;
}

.section.last {
  border-bottom: none;
  margin-bottom: 0;
}

.eyebrow {
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
  margin: 0 0 0.9rem;
  font-weight: 700;
  display: inline-block;
  padding-bottom: 0.2rem;
  border-bottom: 2px solid var(--border);
}

h1, h2, h3 {
  margin: 0 0 0.8rem;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.04em;
}

h1 {
  font-size: clamp(2.6rem, 5vw, 4.2rem);
}

.contact-list,
.papers,
.teaching-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contact-list {
  margin-top: 1.2rem;
}

.contact-list li {
  margin: 0.3rem 0;
}

.papers li {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 0.8rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--border);
}

.papers li:first-child {
  border-top: none;
}

.year {
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding-top: 0.2rem;
}

.papers a {
  font-weight: 500;
}

.meta {
  display: block;
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.teaching-list li {
  padding-left: 1rem;
  position: relative;
}

.teaching-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--muted);
}

.footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
  padding: 1.2rem 0 2rem;
}

.scholar-section {
  margin-top: 0.25rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border);
}

.scholar-card {
  display: block;
  background: transparent;
  border: none;
  padding: 0;
}

.scholar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.2rem;
}

.scholar-label {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.scholar-title {
  margin-top: 0.08rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.scholar-link { color: var(--link); font-size: 0.82rem; }

.scholar-grid {
  display: flex;
  gap: 1.2rem;
  margin-top: 0.2rem;
  align-items: center;
}

.scholar-stat {
  display: flex;
  flex-direction: column;
  gap: 0.06rem;
  padding: 0;
  border: none;
  background: transparent;
}

.scholar-value { font-size: 1.05rem; font-weight: 700; color: var(--text); }
.scholar-name { color: var(--muted); font-size: 0.72rem; text-transform: uppercase; }

/* Chart and bar layout (divider-style, labeled bars) */
.scholar-row {
  display: flex;
  align-items: center; /* vertical center whole block */
  justify-content: center; /* horizontal center within container */
  gap: 1.1rem;
}

.scholar-chart {
  display: flex;
  align-items: flex-end; /* keep bars bottom-aligned relative to each other */
  gap: 0.6rem;
  padding-bottom: 0.1rem;
}

.bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.bar-fill {
  width: 10px;
  background: var(--link);
  border-radius: 4px 4px 0 0;
}

.bar-count {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 2px;
}

.bar-year {
  font-size: 0.72rem;
  color: var(--muted);
}

/* stats column to the right of the chart */
.scholar-stats {
  width: 120px;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  justify-content: center; /* center stats vertically relative to chart */
  align-items: flex-end;
}

.stat-row { display:flex; gap:0.6rem; align-items:center; }
.stat-label { color:var(--muted); font-size:0.85rem; }
.stat-value { font-weight:700; font-size:1.02rem; color:var(--text); }

@media (max-width: 700px) {
  .navbar {
    min-height: 120px;
  }

  body.scrolled .navbar {
    min-height: 72px;
  }

  .brand-wrap {
    align-items: center;
  }

  .profile-photo {
    width: 110px;
    height: 110px;
  }

  body.scrolled .profile-photo {
    width: 42px;
    height: 42px;
  }

  .brand-name {
    font-size: 1.15rem;
  }

  .brand-title {
    font-size: 0.8rem;
  }

  .papers li {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .scholar-grid {
    grid-template-columns: 1fr;
  }

  .scholar-top {
    align-items: flex-start;
    flex-direction: column;
  }
}
