/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: #1f2430;
  background: #fbfaf7;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Theme tokens ---------- */
:root {
  --maple: #8a2a2b;            /* deep maple red, nods to Canada */
  --maple-dark: #6c2021;
  --ink: #1f2430;
  --muted: #5b6370;
  --rule: #e6e1d6;
  --paper: #fbfaf7;
  --paper-2: #f3efe6;
  --gold: #b08940;
  --max-w: 1100px;
}

img { max-width: 100%; display: block; }
a {
  color: var(--maple);
  text-decoration: none;
  transition: color .15s ease;
}
a:hover { color: var(--maple-dark); text-decoration: underline; }

h1, h2, h3 {
  font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  color: var(--ink);
  margin: 0 0 .4em;
  font-weight: 600;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1em; }

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

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 250, 247, 0.92);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: .85rem;
  padding-bottom: .85rem;
}
.brand {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.01em;
}
.brand:hover { text-decoration: none; color: var(--maple); }
.site-nav { display: flex; gap: 1.4rem; }
.site-nav a {
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
  padding: .25rem 0;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--maple);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s ease;
}
.site-nav a:hover {
  text-decoration: none;
  color: var(--maple);
}
.site-nav a:hover::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  width: 36px;
  height: 36px;
  padding: 6px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
  transition: transform .2s ease, opacity .2s ease;
}

/* ---------- Hero ---------- */
.hero {
  padding: 5rem 0 4rem;
  background:
    radial-gradient(1200px 600px at 110% -10%, rgba(138, 42, 43, .07), transparent 60%),
    radial-gradient(900px 500px at -10% 0%, rgba(176, 137, 64, .08), transparent 60%);
}
.hero-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 3rem;
  align-items: center;
}
.hero-photo { display: flex; justify-content: center; }
.portrait {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 30%;
  border: 4px solid #fff;
  box-shadow: 0 10px 30px rgba(31, 36, 48, .15);
}
.photo-placeholder {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: var(--paper-2);
  border: 1px dashed #c8c0ad;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--muted);
  font-size: .85rem;
  padding: 1rem;
}
.photo-placeholder small { font-size: .72rem; opacity: .8; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: .78rem;
  color: var(--maple);
  font-weight: 600;
  margin: 0 0 .75rem;
}
.hero-text h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.05;
  margin-bottom: 1rem;
}
.tagline {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 620px;
  margin-bottom: 1.5rem;
}
.tagline em { color: var(--ink); font-style: italic; }

.hero-meta {
  list-style: none;
  padding: 0;
  margin: 0 0 1.75rem;
  font-size: .95rem;
  color: var(--muted);
}
.hero-meta li { margin-bottom: .35rem; }
.hero-meta strong { color: var(--ink); font-weight: 600; }

.hero-cta { display: flex; flex-wrap: wrap; gap: .75rem; }
.btn {
  display: inline-block;
  padding: .7rem 1.2rem;
  border-radius: 6px;
  font-size: .95rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: all .15s ease;
  cursor: pointer;
}
.btn-primary { background: var(--maple); color: #fff; }
.btn-primary:hover { background: var(--maple-dark); color: #fff; text-decoration: none; }
.btn-secondary {
  background: #fff;
  color: var(--ink);
  border-color: var(--rule);
}
.btn-secondary:hover { border-color: var(--ink); color: var(--ink); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { color: var(--maple); text-decoration: none; }

/* ---------- Sections ---------- */
.section {
  padding: 5rem 0;
  border-top: 1px solid var(--rule);
}
.section-alt {
  background: var(--paper-2);
}
.section-title {
  font-size: 2.2rem;
  margin-bottom: 1.25rem;
  position: relative;
  padding-bottom: .75rem;
}
.section-title::after {
  content: "";
  display: block;
  position: absolute;
  bottom: 0; left: 0;
  width: 56px;
  height: 3px;
  background: var(--maple);
}
.section-title.no-bar { padding-bottom: 0; }
.section-title.no-bar::after { display: none; }

.section-lead {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 760px;
  margin-bottom: 2.25rem;
}
.section-lead em { color: var(--ink); font-style: italic; }

.subhead {
  font-size: 1.25rem;
  margin: 2rem 0 .75rem;
  color: var(--ink);
}

.muted { color: var(--muted); font-size: .9rem; margin-bottom: .5rem; }

/* ---------- Research grid ---------- */
.research-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}
.research-card {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 1.4rem 1.4rem 1.25rem;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.research-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(31, 36, 48, .07);
  border-color: #d8d2c4;
}
.research-card h3 {
  font-size: 1.25rem;
  margin-bottom: .5rem;
  color: var(--maple);
}
.research-card p { color: var(--muted); margin: 0; font-size: .96rem; }

/* ---------- Publications ---------- */
.pub-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid var(--rule);
}
.pub-tab {
  background: none;
  border: 0;
  font: inherit;
  color: var(--muted);
  padding: .65rem 1rem;
  cursor: pointer;
  font-size: .95rem;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color .15s ease, border-color .15s ease;
}
.pub-tab:hover { color: var(--ink); }
.pub-tab.is-active {
  color: var(--maple);
  border-bottom-color: var(--maple);
}

.pub-panel { display: none; }
.pub-panel.is-active { display: block; animation: fadeIn .25s ease; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.pub-list {
  padding-left: 1.2rem;
  margin: 0;
}
.pub-list li {
  margin-bottom: 1rem;
  padding-left: .25rem;
  line-height: 1.6;
}
.pub-list li::marker { color: var(--maple); }
.pub-list em { color: var(--ink); }

/* ---------- Teaching ---------- */
.teaching-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}
.teaching-card {
  background: #fff;
  border-left: 3px solid var(--maple);
  border-radius: 4px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 1px 2px rgba(31,36,48,.04);
}
.teaching-card h3 {
  font-size: 1.15rem;
  margin-bottom: .25rem;
}
.teaching-card p:last-child { margin-bottom: 0; }

.plain-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}
.plain-list li {
  padding: .55rem 0;
  border-bottom: 1px solid var(--rule);
}
.plain-list li:last-child { border-bottom: 0; }

/* ---------- Two-col ---------- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.contact-card {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 1.75rem;
  box-shadow: 0 4px 18px rgba(31,36,48,.05);
}
.contact-card p { margin-bottom: .9rem; }
.contact-card p:last-child { margin-bottom: 0; }
.contact-label {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: .72rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: .15rem;
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 2rem 0;
  text-align: center;
  background: var(--ink);
  color: #c6cad3;
  font-size: .9rem;
}
.site-footer p { margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    padding: 1rem 1.5rem 1.5rem;
    gap: .25rem;
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: .65rem 0; border-bottom: 1px solid var(--rule); }
  .site-nav a:last-child { border-bottom: 0; }

  .hero { padding: 3rem 0 2.5rem; }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
  .hero-meta { text-align: left; }
  .hero-cta { justify-content: center; }
  .photo-placeholder { width: 180px; height: 180px; }

  .section { padding: 3.5rem 0; }
  .two-col, .contact-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}
