/* ================================================================
   Design tokens — change these to restyle the whole site
   ================================================================ */
:root {
  /* Quiet-luxury palette: ivory, cashmere sand, camel, espresso, olive */
  --bg: #f5efe6;            /* ivory */
  --surface: rgba(255, 251, 245, 0.74);
  --surface-solid: #fffbf5;
  --text: #2e2520;          /* espresso */
  --muted: #776a5f;         /* taupe */
  --faint: #ad9f90;
  --line: rgba(70, 48, 30, 0.11);
  --accent: #8b6844;        /* camel / tobacco */
  --accent-2: #b8946b;      /* vicuña */
  --sage: #7a7d5c;          /* muted olive */
  --ink: #2e2520;

  --serif: "Newsreader", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --r-lg: 28px;
  --r-md: 20px;
  --r-sm: 12px;
  --max: 1160px;
  --shadow: 0 1px 2px rgba(60,40,20,.04), 0 12px 40px -12px rgba(70, 45, 20, .16);
  --shadow-lg: 0 2px 4px rgba(60,40,20,.04), 0 40px 80px -30px rgba(70, 45, 20, .30);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

/* Dark theme: only used when a visitor clicks the moon button */
:root[data-theme="dark"] {
    --bg: #16120f;
    --surface: rgba(36, 29, 24, 0.74);
    --surface-solid: #221c17;
    --text: #f2eadf;
    --muted: #b5a796;
    --faint: #7c7064;
    --line: rgba(240, 220, 195, 0.10);
    --accent: #cfac82;
    --accent-2: #e3cba8;
    --sage: #aeb18f;
    --ink: #2e2520;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 12px 40px -12px rgba(0,0,0,.6);
    --shadow-lg: 0 40px 80px -30px rgba(0,0,0,.8);
}

/* ================================================================
   Base
   ================================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }

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

h1, h2, h3 { margin: 0; font-weight: 400; letter-spacing: -0.02em; line-height: 1.1; }
h2 {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 4.6vw, 3.6rem);
}
h2 em, h1 em { font-style: italic; color: var(--muted); }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.kicker::before { content: ""; width: 22px; height: 1.5px; background: currentColor; }
.kicker.light { color: #d8bf9c; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  color: var(--accent);
}
.text-link::after { content: "→"; transition: transform .25s var(--ease); }
.text-link:hover::after { transform: translateX(4px); }
.text-link.on-dark { color: #f3ebdf; }

/* ================================================================
   Ambient background + progress bar
   ================================================================ */
.ambient { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .55;
  animation: drift 24s ease-in-out infinite alternate;
}
.orb-1 { width: 520px; height: 520px; background: #e8d6bd; top: -160px; right: -120px; }
.orb-2 { width: 440px; height: 440px; background: #efe2d0; top: 30%; left: -180px; animation-delay: -8s; }
.orb-3 { width: 380px; height: 380px; background: #dfdcc6; bottom: -120px; right: 20%; animation-delay: -16s; }
:root[data-theme="dark"] .orb { opacity: .08; }
@keyframes drift {
  to { transform: translate(60px, 40px) scale(1.08); }
}

.progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  z-index: 50;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform-origin: 0 50%;
  transform: scaleX(0);
}

/* ================================================================
   Header
   ================================================================ */
.header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.header.scrolled { border-bottom-color: var(--line); }

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 28px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  border-radius: 11px;
  background: linear-gradient(135deg, #3a2e26, #6b5442);
  color: #fff;
  font-family: var(--serif);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  box-shadow: 0 6px 16px -6px rgba(60, 40, 20, .5);
}
.brand-mark.small { width: 28px; height: 28px; border-radius: 8px; font-size: .78rem; }
.brand-name { font-family: var(--serif); font-size: 1.3rem; }

.menu { display: flex; align-items: center; gap: 6px; }
.menu > a, .dropdown > a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.9rem;
  color: var(--muted);
  transition: color .2s, background .2s;
}
.menu > a:hover, .dropdown > a:hover { color: var(--text); background: var(--line); }
.menu .nav-cta {
  margin-left: 8px;
  background: var(--text);
  color: var(--bg);
  font-weight: 500;
}
.menu .nav-cta:hover { background: var(--text); color: var(--bg); opacity: .85; }

.dropdown { position: relative; }
.dropdown > a::after { content: "⌄"; margin-left: 5px; font-size: .8em; position: relative; top: -2px; }
.dropdown-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  width: 260px;
  padding: 8px;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -6px) scale(.98);
  transition: opacity .22s, transform .22s var(--ease), visibility .22s;
}
.dropdown-panel::before { content: ""; position: absolute; top: -14px; left: 0; right: 0; height: 14px; }
.dropdown:hover .dropdown-panel,
.dropdown:focus-within .dropdown-panel { opacity: 1; visibility: visible; transform: translate(-50%, 0) scale(1); }
.dropdown-panel a { padding: 10px 14px; border-radius: 12px; display: flex; flex-direction: column; transition: background .2s; }
.dropdown-panel a:hover { background: var(--line); }
.dropdown-panel strong { font-weight: 500; font-size: .92rem; }
.dropdown-panel small { color: var(--muted); font-size: .8rem; }

.menu-toggle {
  display: none;
  width: 40px; height: 40px;
  border: 0; background: none; position: relative;
}
.menu-toggle span {
  position: absolute; left: 10px; right: 10px; height: 1.5px;
  background: var(--text); transition: transform .3s var(--ease);
}
.menu-toggle span:first-child { top: 16px; }
.menu-toggle span:last-child { top: 23px; }
.menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* Light / dark switch */
.theme-toggle {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  margin-left: 4px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  transition: color .2s, transform .4s var(--ease);
}
.theme-toggle:hover { color: var(--text); transform: rotate(20deg); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
.header-tools { display: flex; align-items: center; gap: 4px; order: 3; margin-left: 8px; }
.header-inner .menu { margin-left: auto; }

/* ================================================================
   Buttons
   ================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  font-size: .95rem;
  font-weight: 500;
  transition: transform .25s var(--ease), box-shadow .25s, background .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn-dark { background: var(--text); color: var(--bg); box-shadow: 0 10px 24px -10px rgba(0,0,0,.45); }
.btn-ghost { background: var(--surface); border: 1px solid var(--line); backdrop-filter: blur(10px); }
.btn-ghost:hover { box-shadow: var(--shadow); }
.btn-light { background: #f5efe6; color: #2e2520; }

/* ================================================================
   Hero
   ================================================================ */
.hero {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 64px;
  align-items: center;
  padding-top: 80px;
  padding-bottom: 72px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 28px;
  padding: 7px 16px 7px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  font-size: .84rem;
  color: var(--muted);
}
.pulse {
  position: relative;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #8a9468;
}
.pulse::after {
  content: "";
  position: absolute; inset: -4px;
  border-radius: 50%;
  border: 2px solid #8a9468;
  opacity: 0;
  animation: ping 2s var(--ease) infinite;
}
@keyframes ping { 0% { transform: scale(.5); opacity: .8; } 100% { transform: scale(1.6); opacity: 0; } }

.hero-title {
  font-family: var(--serif);
  font-size: clamp(3.2rem, 7.4vw, 6rem);
  line-height: 1;
  letter-spacing: -0.035em;
}
.hero-line {
  display: block;
  margin-top: 14px;
  font-size: .42em;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--muted);
}
.rotator {
  display: inline-block;
  font-style: italic;
  color: var(--text) !important;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: opacity .4s, transform .4s var(--ease), filter .4s;
}
.rotator.out { opacity: 0; transform: translateY(8px); filter: blur(4px); }

.hero-bio {
  max-width: 540px;
  margin: 28px 0 0;
  font-size: 1.12rem;
  color: var(--muted);
}
.hero-bio strong { color: var(--text); font-weight: 500; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  list-style: none;
  padding: 0;
  margin: 36px 0 0;
  font-size: .88rem;
  color: var(--muted);
}
.hero-meta li { display: flex; align-items: center; gap: 8px; }
.hero-meta svg { width: 17px; height: 17px; color: var(--faint); }
.say { font-family: var(--serif); font-style: italic; font-size: 1.05em; color: var(--text); }

/* Portrait */
.hero-visual { position: relative; padding: 20px 0 30px; }
.portrait {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 34px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transform: rotate(1.5deg);
  transition: transform .6s var(--ease);
}
.hero-visual:hover .portrait { transform: rotate(0); }
.portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* a photo that hasn't been uploaded yet stays out of sight */
img.missing { display: none !important; }
.portrait-fallback {
  position: absolute; inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: clamp(5rem, 12vw, 9rem);
  color: rgba(255, 249, 240, .94);
  letter-spacing: -.04em;
  background:
    radial-gradient(120% 80% at 20% 10%, #e9d6b8 0%, transparent 55%),
    radial-gradient(90% 70% at 90% 90%, #6e5440 0%, transparent 60%),
    radial-gradient(80% 60% at 85% 15%, #c9c3a2 0%, transparent 60%),
    linear-gradient(160deg, #b58d63, #7c5c41);
}
.portrait-fallback::after { /* subtle film grain */
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.12'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.float-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px 12px 12px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  box-shadow: var(--shadow);
  animation: bob 6s ease-in-out infinite;
}
.float-card small { display: block; font-size: .72rem; color: var(--muted); line-height: 1.3; }
.float-card strong { display: block; font-size: .9rem; font-weight: 600; line-height: 1.3; }
.float-top { top: 52px; left: -48px; }
.float-bottom { bottom: 64px; right: -28px; animation-delay: -3s; }
@keyframes bob { 50% { transform: translateY(-8px); } }

.float-icon {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: 11px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
}
.float-icon svg { width: 20px; height: 20px; }

.avatars { display: flex; }
.avatars span {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid var(--surface-solid);
  margin-left: -8px;
}
.avatars span:first-child { margin-left: 0; background: linear-gradient(135deg, #e8d3b5, #c4a27c); }
.avatars span:nth-child(2) { background: linear-gradient(135deg, #a88b6c, #6f5440); }
.avatars span:nth-child(3) { background: linear-gradient(135deg, #b9b896, #7a7d5c); }

.credit { position: absolute; bottom: 0; right: 6px; margin: 0; font-size: .74rem; color: var(--faint); }

/* Affiliations strip */
.affiliations {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-top: 26px;
  padding-bottom: 26px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.affiliations p { margin: 0; font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: var(--faint); white-space: nowrap; }
.affiliations ul { display: flex; flex-wrap: wrap; gap: 12px 40px; list-style: none; margin: 0; padding: 0; }
.affiliations li { font-family: var(--serif); font-size: 1.2rem; color: var(--muted); }

/* ================================================================
   Sections
   ================================================================ */
.section { padding-top: 120px; padding-bottom: 20px; }
.section-head { margin-bottom: 52px; max-width: 900px; }
.section-head.split {
  max-width: none;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

/* About */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.about-copy p { margin: 0 0 18px; color: var(--muted); font-size: 1.08rem; }
.about-copy p:first-child::first-letter {
  float: left;
  font-family: var(--serif);
  font-size: 3.6em;
  line-height: .85;
  padding: 6px 10px 0 0;
  color: var(--text);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 72px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.stat { padding: 32px 28px; display: flex; flex-direction: column; gap: 4px; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat-num {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 5vw, 3.8rem);
  line-height: 1;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
.stat-label { font-size: .86rem; color: var(--muted); }

/* Research cards */
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  position: relative;
  padding: 34px 30px 36px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  transition: transform .45s var(--ease), box-shadow .45s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card-icon {
  display: grid; place-items: center;
  width: 52px; height: 52px;
  border-radius: 16px;
  margin-bottom: 48px;
}
.card-icon svg { width: 24px; height: 24px; }
.tint-blue { background: color-mix(in srgb, var(--accent) 13%, transparent); color: var(--accent); }
.tint-rose { background: color-mix(in srgb, var(--accent-2) 13%, transparent); color: var(--accent-2); }
.tint-sage { background: color-mix(in srgb, var(--sage) 15%, transparent); color: var(--sage); }
.card-num { position: absolute; top: 34px; right: 30px; font-family: var(--serif); font-size: 1rem; color: var(--faint); }
.card h3 { font-family: var(--serif); font-size: 1.6rem; margin-bottom: 12px; }
.card p { margin: 0; color: var(--muted); font-size: .97rem; }

/* Featured book */
.book {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 64px;
  align-items: center;
  padding: 72px;
  border-radius: 36px;
  color: #f3ebdf;
  background:
    radial-gradient(70% 90% at 0% 0%, rgba(184, 148, 107, .32), transparent 60%),
    radial-gradient(60% 80% at 100% 100%, rgba(122, 125, 92, .26), transparent 60%),
    #2a211b;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.book-cover-wrap { perspective: 1200px; display: flex; justify-content: center; }
.book-cover {
  position: relative;
  width: min(280px, 100%);
  aspect-ratio: 2 / 3;
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
  border-radius: 4px 14px 14px 4px;
  background:
    linear-gradient(90deg, rgba(0,0,0,.35) 0, rgba(255,255,255,.12) 3%, transparent 6%),
    linear-gradient(165deg, #f4ede1 0%, #e7dcc8 100%);
  color: #2e2520;
  box-shadow: 30px 40px 60px -20px rgba(0,0,0,.7), inset 0 0 0 1px rgba(0,0,0,.05);
  transform: rotateY(-18deg) rotateX(4deg);
  transition: transform .8s var(--ease);
}
.book:hover .book-cover { transform: rotateY(-6deg) rotateX(2deg); }
.book-cover::before { /* decorative circle on the cover */
  content: "";
  position: absolute;
  width: 62%;
  aspect-ratio: 1;
  border-radius: 50%;
  top: 38%;
  left: 19%;
  background: radial-gradient(circle at 35% 35%, #c9a27a, #8b6844);
  opacity: .9;
}
.book-label { position: relative; font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; opacity: .6; }
.book-title { position: relative; margin-top: 14px; font-family: var(--serif); font-size: 1.9rem; line-height: 1.05; letter-spacing: -.02em; }
.book-author { position: relative; margin-top: auto; font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; }

.book-text h2 { color: #fbf5ec; }
.book-sub { margin: 10px 0 22px; font-family: var(--serif); font-style: italic; font-size: 1.3rem; color: #cdbca6; }
.book-text > p:not(.kicker):not(.book-sub) { color: #cdbca6; margin: 0 0 24px; }
.book blockquote {
  margin: 0 0 32px;
  padding: 18px 22px;
  border-left: 2px solid #cfac82;
  background: rgba(255,240,220,.05);
  border-radius: 0 14px 14px 0;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-style: italic;
}
.book cite { display: block; margin-top: 8px; font-family: var(--sans); font-size: .8rem; font-style: normal; color: #a8977f; }
.book-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; }

/* Publications */
.filters {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.filter {
  border: 0;
  background: none;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: .86rem;
  color: var(--muted);
  transition: background .25s, color .25s;
}
.filter:hover { color: var(--text); }
.filter.active { background: var(--text); color: var(--bg); }

.pubs { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.pubs li {
  position: relative;
  display: grid;
  grid-template-columns: 90px 1fr auto 30px;
  align-items: center;
  gap: 20px;
  padding: 26px 12px;
  border-bottom: 1px solid var(--line);
  transition: background .3s, padding .3s var(--ease);
}
.pubs li[hidden] { display: none; }
.pubs li:hover { background: var(--surface); padding-left: 22px; }
.pub-year { font-variant-numeric: tabular-nums; color: var(--faint); font-size: .92rem; }
.pub-title { font-family: var(--serif); font-size: 1.4rem; line-height: 1.25; }
.pub-title::after { content: ""; position: absolute; inset: 0; } /* whole row clickable */
.pub-venue { margin: 4px 0 0; font-size: .88rem; color: var(--muted); }
.badge {
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: .75rem;
  color: var(--muted);
}
.pub-arrow { color: var(--faint); font-size: 1.1rem; transition: transform .3s var(--ease), color .3s; }
.pubs li:hover .pub-arrow { transform: translate(3px, -3px); color: var(--accent); }
.more-link { margin-top: 26px; }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0 0 0 30px; position: relative; max-width: 820px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 6px; top: 10px; bottom: 10px;
  width: 1.5px;
  background: linear-gradient(var(--accent), var(--accent-2), transparent);
}
.timeline li { position: relative; padding: 0 0 40px 24px; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -30px; top: 8px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
}
.timeline li:first-child::before { background: var(--accent); box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 18%, transparent); }
.t-date { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.timeline h3 { font-family: var(--serif); font-size: 1.5rem; margin: 6px 0 6px; }
.timeline p { margin: 0; color: var(--muted); }

/* Teaching */
.courses { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.course {
  display: flex;
  flex-direction: column;
  padding: 28px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--line);
  backdrop-filter: blur(14px);
  transition: transform .4s var(--ease), box-shadow .4s;
}
.course:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.course-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 36px; }
.tag {
  padding: 4px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  font-size: .74rem;
  font-weight: 600;
}
.tag-dark { background: var(--text); color: var(--bg); }
.course-code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .78rem; color: var(--faint); }
.course h3 { font-family: var(--serif); font-size: 1.45rem; margin-bottom: 10px; }
.course p { margin: 0 0 22px; color: var(--muted); font-size: .95rem; }
.course-term { margin-top: auto; font-size: .82rem; color: var(--faint); }

.testimonial { margin: 56px auto 0; max-width: 760px; text-align: center; }
.testimonial blockquote {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-style: italic;
  line-height: 1.3;
}
.testimonial figcaption { margin-top: 14px; color: var(--muted); font-size: .9rem; }

/* Beyond work */
.beyond { display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: center; }
.beyond-text > p:not(.kicker) { color: var(--muted); font-size: 1.08rem; margin: 22px 0; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.checks li { display: flex; gap: 12px; align-items: center; }
.checks li::before {
  content: "✓";
  display: grid; place-items: center;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--sage) 16%, transparent);
  color: var(--sage);
  font-size: .75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 220px 220px;
  gap: 14px;
}
.g {
  position: relative;
  margin: 0;
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .5s var(--ease);
}
.g:hover { transform: scale(1.02); }
.g img { width: 100%; height: 100%; object-fit: cover; }
.g figcaption {
  position: absolute;
  left: 12px; bottom: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255,250,242,.8);
  backdrop-filter: blur(10px);
  color: #2e2520;
  font-size: .78rem;
  font-weight: 500;
}
.g1 { grid-row: span 2; background: linear-gradient(170deg, #f1e3cd 0%, #cfaa80 50%, #7c5c41 100%); }
.g2 { background: linear-gradient(140deg, #dcdac0, #8e9070); }
.g3 { background: linear-gradient(140deg, #e6dccd, #a6917b); }
/* little sun and hills drawn with CSS so tiles feel like scenes */
.g1::before {
  content: ""; position: absolute; width: 90px; height: 90px; border-radius: 50%;
  background: #fbf3e6; top: 22%; left: 50%; transform: translateX(-50%); opacity: .9;
}
.g1::after, .g2::after, .g3::after {
  content: ""; position: absolute; left: -10%; right: -10%; bottom: -40%; height: 70%;
  border-radius: 50%; background: rgba(255,255,255,.18);
}

/* Contact */
.contact {
  position: relative;
  padding: 80px 40px;
  text-align: center;
  border-radius: 36px;
  background: var(--surface);
  border: 1px solid var(--line);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.contact::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 55% at 50% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%);
  pointer-events: none;
}
.contact > * { position: relative; }
.contact h2 { font-size: clamp(3rem, 8vw, 5.6rem); }
.contact > p:not(.kicker) { color: var(--muted); font-size: 1.1rem; margin: 16px 0 34px; }

.email-row { display: inline-flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px; }
.email {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-solid);
  font-size: .82rem;
  transition: background .25s, color .25s;
}
.copy svg { width: 16px; height: 16px; }
.copy.done { background: var(--sage); color: #fff; border-color: transparent; }

.contact-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 40px; }
.contact-links a {
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: .88rem;
  color: var(--muted);
  transition: color .2s, border-color .2s;
}
.contact-links a:hover { color: var(--text); border-color: var(--text); }

/* Footer */
.footer {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 100px;
  padding-top: 28px;
  padding-bottom: 40px;
  border-top: 1px solid var(--line);
  font-size: .84rem;
  color: var(--muted);
}
.footer p { margin: 0; flex: 1; }
.footer a:hover { color: var(--text); }

/* ================================================================
   Scroll reveal
   ================================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.reveal.visible { opacity: 1; transform: none; }
.cards-3 .reveal:nth-child(2), .courses .reveal:nth-child(2), .stats .reveal:nth-child(2) { transition-delay: .1s; }
.cards-3 .reveal:nth-child(3), .courses .reveal:nth-child(3), .stats .reveal:nth-child(3) { transition-delay: .2s; }
.stats .reveal:nth-child(4) { transition-delay: .3s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ================================================================
   Tablets & phones
   ================================================================ */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 48px; padding-top: 48px; }
  .hero-visual { max-width: 420px; margin: 0 auto; width: 100%; }
  .float-top { left: -12px; }
  .float-bottom { right: -8px; }
  .about-grid, .beyond { grid-template-columns: 1fr; gap: 32px; }
  .cards-3, .courses { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .book { grid-template-columns: 1fr; padding: 48px 28px; gap: 40px; }
  .affiliations { flex-direction: column; align-items: flex-start; gap: 12px; }

  .menu-toggle { display: block; }
  .menu {
    position: absolute;
    top: 72px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px 20px 24px;
    background: var(--surface-solid);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    display: none;
  }
  .menu.open { display: flex; }
  .menu > a, .dropdown > a { font-size: 1.05rem; padding: 12px 14px; }
  .menu .nav-cta { margin: 10px 0 0; text-align: center; }
  .dropdown > a::after { content: ""; }
  .dropdown-panel {
    position: static; width: auto; opacity: 1; visibility: visible; transform: none;
    border: 0; box-shadow: none; background: none; padding: 0 0 0 12px;
  }
  .dropdown-panel::before { display: none; }
}

@media (max-width: 600px) {
  .container, .header-inner { padding-left: 20px; padding-right: 20px; }
  .section { padding-top: 88px; }
  .pubs li { grid-template-columns: 1fr; gap: 6px; padding: 22px 6px; }
  .pubs li:hover { padding-left: 6px; }
  .badge, .pub-arrow { display: none; }
  .gallery { grid-template-rows: 160px 160px; }
  .contact { padding: 56px 22px; }
  .footer { flex-wrap: wrap; }
  .float-card { transform: scale(.9); }
}

/* ================================================================
   Full-screen photo intro
   Your photo fills the first screen behind your name and bio,
   and stops right where the Research section begins.
   ================================================================ */
section.hero.container {
  position: relative;
  isolation: isolate;
  max-width: none;
  min-height: calc(100vh - 72px);          /* whole screen below the header */
  min-height: calc(100svh - 72px);
  margin: 0;
  padding: 72px max(28px, calc((100vw - var(--max)) / 2 + 28px)) 96px;
  display: flex;
  align-items: center;
  justify-content: flex-end;               /* text on the right, you on the left */
  overflow: hidden;
  color: #f8f2e9;
}

/* The photo becomes the background of the whole intro */
section.hero .hero-visual {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0;
  transform: none !important;
}
section.hero .portrait {
  position: absolute;
  inset: 0;
  aspect-ratio: auto;
  border-radius: 0;
  box-shadow: none;
  transform: none !important;
}
section.hero .portrait img {
  object-position: 34% 58%;                /* keeps your face in view when cropped */
  animation: heroZoom 18s ease-out both;
}
@keyframes heroZoom { from { transform: scale(1.06); } to { transform: scale(1); } }
section.hero .portrait-fallback { font-size: 0; }   /* plain color until a photo is added */

/* Soft shade on the right so the text is easy to read */
section.hero .portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(28, 21, 16, 0) 20%, rgba(28, 21, 16, .58) 48%, rgba(28, 21, 16, .86) 100%),
    linear-gradient(0deg, rgba(28, 21, 16, .35) 0%, rgba(28, 21, 16, 0) 30%);
}

/* Text on the photo */
section.hero .hero-text { position: relative; max-width: 560px; }
section.hero .hero-title {
  color: #fbf6ee;
  font-size: clamp(3rem, 6.4vw, 5.4rem);
  text-shadow: 0 2px 30px rgba(0, 0, 0, .25);
}
section.hero .hero-bio,
section.hero .hero-text > div:not(.hero-actions) {
  max-width: 560px;
  margin: 22px 0 0;
  font-size: 1.04rem;
  line-height: 1.7;
  color: rgba(248, 242, 233, .9);
  text-shadow: 0 1px 12px rgba(20, 14, 10, .45);
}
section.hero .hero-text > div:not(.hero-actions) { margin-top: 14px; }
section.hero .hero-text > div:has(> br:only-child) { display: none; }   /* empty spacer lines */
section.hero .hero-bio strong { color: #fff; }

section.hero .hero-actions { margin-top: 32px; }
section.hero .btn-dark { background: #f8f2e9; color: #2e2520; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .5); }
section.hero .btn-ghost {
  background: rgba(255, 255, 255, .1);
  border-color: rgba(255, 255, 255, .35);
  color: #f8f2e9;
  backdrop-filter: blur(8px);
}
section.hero .btn-ghost:hover { background: rgba(255, 255, 255, .18); box-shadow: none; }

/* Small "scroll" cue at the bottom of the photo */
section.hero::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 28px;
  width: 22px;
  height: 36px;
  margin-left: -11px;
  border: 1.5px solid rgba(248, 242, 233, .7);
  border-radius: 12px;
  background: radial-gradient(circle, rgba(248, 242, 233, .9) 0 2.5px, transparent 3px) 50% 8px / 6px 6px no-repeat;
  animation: heroCue 2s ease-in-out infinite;
  pointer-events: none;
}
@keyframes heroCue { 50% { background-position: 50% 18px; } }

/* Research starts with a little breathing room after the photo */
section.hero + .section { padding-top: 104px; }

/* Phones and tablets: the photo fills the first screen with your name on it,
   and your bio continues just below it, before Research starts */
@media (max-width: 960px) {
  section.hero.container {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: calc(100vh - 72px);
    grid-template-rows: calc(100svh - 72px);
    align-items: start;
    min-height: 0;
    gap: 0;
    padding: 0 0 72px;
    background: #1f1813;
  }
  section.hero .hero-text { display: contents; }
  section.hero .hero-visual {
    position: relative;
    grid-row: 1;
    grid-column: 1;
    height: 100%;
    z-index: 0;
  }
  section.hero .portrait img { object-position: 32% 50%; }
  section.hero .portrait::after {
    background: linear-gradient(180deg, rgba(28, 21, 16, 0) 45%, rgba(28, 21, 16, .35) 70%, rgba(31, 24, 19, .95) 100%);
  }
  section.hero .hero-title {
    grid-row: 1;
    grid-column: 1;
    align-self: end;
    z-index: 1;
    padding: 0 22px 84px;
    font-size: clamp(2.8rem, 13vw, 4.2rem);
  }
  section.hero .hero-bio,
  section.hero .hero-text > div:not(.hero-actions),
  section.hero .hero-actions {
    max-width: 640px;
    padding: 0 22px;
    text-shadow: none;
  }
  section.hero .hero-bio { margin-top: 28px; }
  section.hero .hero-bio,
  section.hero .hero-text > div:not(.hero-actions) { font-size: 1rem; }
  section.hero::after { bottom: auto; top: calc(100svh - 72px - 56px); }
}

@media (prefers-reduced-motion: reduce) {
  section.hero .portrait img, section.hero::after { animation: none; }
}
