@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,wght@0,300;0,400;0,600;1,400&family=DM+Mono:wght@400;500&family=DM+Sans:wght@400;500&display=swap');

/* ─── Variables ─────────────────────────── */
:root {
  --bg:        #f9f8f5;
  --surface:   #ffffff;
  --ink:       #1a1916;
  --muted:     #72706a;
  --accent:    #1a4a8a;
  --accent2:   #c0522a;
  --border:    #e4e0d8;
  --serif:     'Source Serif 4', Georgia, serif;
  --mono:      'DM Mono', monospace;
  --sans:      'DM Sans', sans-serif;
  --max-w:     960px;
  --header-h:  58px;
}

/* ─── Reset ──────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body { background: var(--bg); color: var(--ink); font-family: var(--sans); line-height: 1.65; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }

/* ─── Header ─────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(249,248,245,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
}
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex; align-items: center; justify-content: space-between;
}
.logo {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.nav { display: flex; gap: 0.25rem; }
.nav-link {
  padding: 0.35rem 0.75rem;
  border-radius: 5px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.15s, background 0.15s;
}
.nav-link:hover { color: var(--ink); background: rgba(0,0,0,0.05); text-decoration: none; }
.nav-link.active { color: var(--accent); background: rgba(26,74,138,0.08); }

/* ─── Main content ───────────────────────── */
.main-content {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 3.5rem 2rem 5rem;
}

/* ─── Homepage: Profile grid ─────────────── */
.profile-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 4rem;
  align-items: start;
}

/* Left column */
.profile-left { position: sticky; top: calc(var(--header-h) + 2rem); }

.photo-wrap { margin-bottom: 1.5rem; }
.photo-wrap img {
  width: 180px; height: 180px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}
.photo-placeholder {
  width: 180px; height: 180px;
  background: linear-gradient(135deg, #1a4a8a 0%, #2d6cc0 100%);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 1.6rem; font-weight: 500;
  color: rgba(255,255,255,0.9);
  letter-spacing: 0.05em;
}

.contact-name { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; margin-bottom: 0.25rem; }
.contact-role { font-size: 0.85rem; font-weight: 500; color: var(--ink); margin-bottom: 0.1rem; }
.contact-dept { font-size: 0.82rem; color: var(--muted); }
.contact-univ { font-size: 0.82rem; color: var(--muted); margin-bottom: 1rem; }

.contact-details { margin-bottom: 1rem; display: flex; flex-direction: column; gap: 0.4rem; }
.contact-row { display: flex; flex-direction: column; }
.contact-label { font-family: var(--mono); font-size: 0.68rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.contact-val { font-size: 0.8rem; color: var(--ink); word-break: break-all; }
.contact-val a { color: var(--accent); }

.ext-links { display: flex; flex-direction: column; gap: 0.3rem; margin-top: 0.5rem; }
.ext-link {
  font-size: 0.8rem; font-weight: 500;
  color: var(--accent);
  display: inline-flex; align-items: center; gap: 0.3rem;
}
.ext-link::before { content: "↗"; font-size: 0.75rem; }
.ext-link:hover { text-decoration: underline; }

/* Right column */
.bio-text {
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.8;
  color: #2a2820;
  margin-bottom: 1.1rem;
}

.block-title {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

.interests-block { margin: 1.75rem 0; }
.interests-list { list-style: none; display: flex; flex-direction: column; gap: 0.35rem; }
.interests-list li {
  font-size: 0.88rem;
  color: var(--ink);
  padding-left: 1rem;
  position: relative;
}
.interests-list li::before {
  content: "·";
  position: absolute; left: 0;
  color: var(--accent2);
  font-weight: 700;
}

.news-block { margin: 1.75rem 0; }
.news-list { list-style: none; display: flex; flex-direction: column; gap: 0.65rem; }
.news-list li { display: flex; gap: 1rem; font-size: 0.86rem; align-items: baseline; }
.news-date { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); flex-shrink: 0; width: 60px; }
.news-text { color: var(--ink); line-height: 1.5; }

.page-generated { font-size: 0.75rem; color: #b0ac a4; color: var(--muted); margin-top: 2.5rem; }

/* ─── Research / inner pages ──────────────── */
.page-body { max-width: 700px; }
.page-title {
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 2.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.section-heading {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 1.25rem;
}
.paper-section { margin-bottom: 3rem; }
.paper-card {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}
.paper-title { font-family: var(--serif); font-size: 1rem; font-weight: 600; margin-bottom: 0.25rem; }
.paper-authors { font-size: 0.84rem; color: var(--muted); margin-bottom: 0.15rem; }
.paper-venue { font-size: 0.82rem; color: var(--muted); font-style: italic; margin-bottom: 0.5rem; }
.paper-links { display: flex; gap: 0.5rem; margin-bottom: 0.6rem; }
.paper-link {
  font-size: 0.75rem; font-weight: 500;
  font-family: var(--mono);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.15rem 0.55rem;
  color: var(--accent);
  transition: all 0.15s;
}
.paper-link:hover { background: var(--accent); color: #fff; text-decoration: none; }
.paper-abstract { font-size: 0.85rem; color: #4a4840; line-height: 1.65; }
.empty-note { font-size: 0.85rem; color: var(--muted); font-style: italic; }

/* ─── Responsive ─────────────────────────── */
@media (max-width: 700px) {
  .profile-grid { grid-template-columns: 1fr; gap: 2rem; }
  .profile-left { position: static; }
  .photo-wrap img, .photo-placeholder { width: 120px; height: 120px; }
  .main-content { padding: 2rem 1.25rem 4rem; }
  .header-inner { padding: 0 1.25rem; }
}
