:root {
  --text: #1a1a1a;
  --muted: #6b6b6b;
  --rule: #e4e4e4;
  --accent: #a51c30;
  --bg: #ffffff;
  --panel: #f7f7f7;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica,
    Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.wrapper {
  max-width: 1180px;
  margin: 0 auto;
  padding: 80px 32px 120px;
}

header {
  margin-bottom: 56px;
}

.name {
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 38px;
  font-weight: 500;
  margin: 0 0 6px;
}

.role {
  font-size: 15px;
  color: var(--muted);
  margin: 0 0 36px;
  padding-bottom: 18px;
  border-bottom: 1.5px solid var(--text);
}

/* two columns: photo and contact stay in place while the content scrolls */
.layout {
  display: flex;
  gap: 48px;
  align-items: flex-start;
}

.photo-block {
  flex: 0 0 260px;
  position: sticky;
  top: 32px;
}

.photo-block img {
  width: 260px;
  height: auto;
  display: block;
}

.photo-placeholder {
  width: 260px;
  height: 330px;
  background: var(--panel);
  border: 1px solid var(--rule);
}

.content {
  flex: 1 1 auto;
  min-width: 0;
}

.contact {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
  font-size: 14px;
}

.intro-text p {
  margin: 0;
  font-size: 16px;
  line-height: 1.7;
}

.intro-text p + p {
  margin-top: 14px;
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}

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

section {
  margin-top: 64px;
}

h2 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
}

.paper-title {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 10px;
  line-height: 1.4;
}

.paper-links {
  font-size: 13.5px;
  margin: 0 0 14px;
}

.abstract {
  padding: 16px 18px;
  background: var(--panel);
  border-radius: 6px;
  font-size: 14.5px;
  line-height: 1.65;
  color: #444;
}

.abstract p {
  margin: 0;
}

/* narrow windows and phones: one column, photo and contact centred on top */
@media (max-width: 900px) {
  .layout {
    flex-direction: column;
    gap: 28px;
  }
  .photo-block {
    position: static;
    flex: none;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .photo-block img,
  .photo-placeholder {
    width: 200px;
  }
  .photo-placeholder {
    height: 254px;
  }
  .contact {
    align-items: center;
  }
}

@media (max-width: 560px) {
  .wrapper {
    padding: 48px 20px 80px;
  }
}

/* collapsible abstract */
details.abstract { margin-top: 0.4rem; }
details.abstract summary { cursor: pointer; font-weight: 600; list-style: none; display: inline-block; }
details.abstract summary::-webkit-details-marker { display: none; }
details.abstract summary::before { content: "\25B8"; display: inline-block; width: 1em; }
details.abstract[open] summary::before { content: "\25BE"; }
details.abstract p { margin-top: 0.5rem; }

/* interests + teaching */
.interests { margin-top: 0.4rem; }
.teaching-note { margin: 0 0 0.5rem 0; font-weight: 600; }
.wrapper ul.teaching { list-style: none; padding-left: 1.4rem; margin: 0; }
.wrapper ul.teaching li { margin: 0.2rem 0; padding-left: 0; }
.wrapper ul.teaching > li { margin-top: 0.5rem; }
.wrapper ul.teaching ul { list-style: none; padding-left: 1.2rem; margin: 0.1rem 0 0 0; color: var(--muted); }
.wrapper ul.teaching ul li { margin: 0.1rem 0; }

.paper-links .sep, ul.teaching .sep {
  color: var(--muted);
  margin: 0 6px;
}

/* selected figures: carousel */
.figures-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 40px 0 14px;
}
.figure-carousel { margin: 0; }
.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 14px;
}
.carousel-btn {
  font-family: inherit;
  font-size: 13px;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 6px 12px;
  cursor: pointer;
  color: var(--text);
}
.carousel-btn:hover { background: #ededed; }
.carousel-count { font-size: 13px; color: var(--muted); min-width: 44px; text-align: center; }
.figure-slide { display: none; margin: 0; text-align: center; }
.figure-slide.active { display: block; }
.figure-slide img {
  max-width: 100%;
  max-height: 520px;
  width: auto;
  height: auto;
  display: inline-block;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: #fff;
}
.figure-slide figcaption {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
  margin: 10px auto 0;
  max-width: 760px;
  text-align: left;
}
.figure-slide .figgroup { font-weight: 600; color: var(--text); }
.carousel-dots { text-align: center; margin-top: 12px; }
.carousel-dots .dot {
  width: 8px; height: 8px; border-radius: 50%;
  border: none; background: var(--rule); margin: 0 3px; padding: 0; cursor: pointer;
}
.carousel-dots .dot.active { background: var(--accent); }

/* interactive map link under the carousel */
.map-link {
  margin: 18px 0 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--muted);
}
.map-link a { font-weight: 600; }

.wip-summary { margin: 0.4rem 0 0 0; }
