:root {
  --ink: #222222;
  --muted: #686868;
  --accent: #8d2424;
  --accent-dark: #6f1717;
  --line: #dddddd;
  --soft: #f6f6f6;
  --surface: #ffffff;
  --page-width: 1120px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #f3f3f3;
  color: var(--ink);
  font-family: "Avenir Next", Avenir, Montserrat, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(141, 36, 36, 0.45);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color 180ms ease, opacity 180ms ease;
}

a:hover,
a:focus-visible {
  color: var(--accent);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid #e4e4e4;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  backdrop-filter: blur(8px);
}

.nav,
.page-shell,
.footer-inner {
  width: min(calc(100% - 80px), var(--page-width));
  margin-inline: auto;
}

.nav {
  position: relative;
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.wordmark {
  flex: 0 0 auto;
  color: #111111;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.035em;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 5px;
}

.nav-links a {
  padding: 11px 17px;
  border: 1px solid transparent;
  color: #272727;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.075em;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a[aria-current="page"] {
  border-color: currentColor;
  color: var(--accent);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  content: "";
  transition: transform 180ms ease, opacity 180ms ease;
}

.menu-toggle span {
  position: relative;
  margin: auto;
}

.menu-toggle span::before {
  position: absolute;
  top: -7px;
}

.menu-toggle span::after {
  position: absolute;
  top: 7px;
}

.menu-toggle[aria-expanded="true"] span {
  background: transparent;
}

.menu-toggle[aria-expanded="true"] span::before {
  top: 0;
  transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span::after {
  top: 0;
  transform: rotate(-45deg);
}

.page-shell {
  min-height: calc(100vh - 78px);
  padding: 60px 40px 72px;
  background: var(--surface);
}

section {
  scroll-margin-top: 105px;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(160px, 18vw, 190px);
  align-items: stretch;
  gap: clamp(38px, 7vw, 88px);
  padding-bottom: 58px;
}

.intro-copy {
  grid-column: 1;
  grid-row: 1;
  max-width: 680px;
}

.portrait-frame {
  position: relative;
  grid-column: 2;
  grid-row: 1;
  min-height: 0;
}

.portrait {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 1px solid #e2e2e2;
  object-fit: cover;
  object-position: center 20%;
}

.eyebrow,
.section-kicker,
.topic-label,
.paper-topic {
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.105em;
  line-height: 1.4;
  text-transform: uppercase;
}

.intro h1 {
  margin: 4px 0 12px;
  font-size: clamp(1.85rem, 4vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.role {
  margin: 0 0 18px;
  color: #303030;
  font-size: 1rem;
  line-height: 1.65;
}

.contact {
  display: grid;
  gap: 7px;
  margin: 0;
  color: var(--muted);
  font-style: normal;
  font-size: 0.9rem;
  line-height: 1.55;
}

.contact-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
}

.contact-icon {
  width: 16px;
  height: 16px;
  margin-top: 3px;
  fill: none;
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.intro-links {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 22px;
  margin-top: 18px;
  font-size: 0.82rem;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(180px, 0.35fr) minmax(0, 1fr);
  align-items: end;
  gap: 38px;
  padding-top: 46px;
  border-top: 1px solid var(--line);
}

.section-heading h2 {
  margin: 4px 0 0;
  font-size: clamp(1.55rem, 3vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.section-intro {
  max-width: 670px;
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.75;
}

.inner-page .page-section > .section-heading {
  padding-top: 0;
  border-top: 0;
}

.research-interests,
.landing-papers {
  margin-top: 14px;
}

.interest-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 34px;
  border: 1px solid var(--line);
}

.interest-item {
  min-height: 145px;
  padding: 22px;
  border-right: 1px solid var(--line);
}

.interest-item:last-child {
  border-right: 0;
}

.interest-item h3 {
  margin: 8px 0 5px;
  font-size: 0.96rem;
  font-weight: 600;
  line-height: 1.45;
}

.interest-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.6;
}

.topics {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  margin: 34px 0 14px;
  border: 1px solid var(--line);
  background: var(--line);
}

.topic-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  align-self: stretch;
  height: 100%;
  min-height: 122px;
  padding: 19px 21px;
  border: 0;
  border-right: 0;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: background-color 170ms ease, color 170ms ease;
}

.topic-card:last-child {
  border-right: 0;
}

.topic-card strong {
  display: block;
  width: 100%;
  margin: 7px 0 4px;
  font-size: 0.94rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: left;
}

.topic-card small {
  display: block;
  width: 100%;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.5;
  text-align: left;
}

.topic-card .topic-label {
  width: 100%;
  text-align: left;
}

.topic-card:hover,
.topic-card[aria-pressed="true"] {
  background: var(--accent);
  color: #ffffff;
}

.topic-card:hover .topic-label,
.topic-card:hover small,
.topic-card[aria-pressed="true"] .topic-label,
.topic-card[aria-pressed="true"] small {
  color: #ffffff;
}

.filter-status {
  min-height: 25px;
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 0.78rem;
}

.filter-status button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.research-group {
  margin-top: 42px;
}

.group-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin: 0;
  padding: 0 0 12px;
  border-bottom: 2px solid var(--accent);
  color: var(--accent);
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: 0.015em;
}

.group-title span {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.collapsible {
  position: relative;
  display: block;
  width: 100%;
  min-height: 76px;
  padding: 18px 235px 18px 17px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  line-height: 1.6;
  text-align: left;
  transition: background-color 170ms ease;
}

.collapsible::after {
  position: absolute;
  top: 50%;
  right: 16px;
  width: 25px;
  height: 25px;
  border: 1px solid var(--accent);
  color: var(--accent);
  content: "+";
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 22px;
  text-align: center;
  transform: translateY(-50%);
}

.collapsible.active::after {
  content: "−";
}

.collapsible:hover,
.collapsible.active {
  background: var(--soft);
}

.collapsible:hover strong {
  color: var(--accent);
}

.collapsible strong {
  display: block;
  margin-bottom: 3px;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.45;
  transition: color 170ms ease;
}

.collapsible strong + br,
.collapsible strong + br + br {
  display: none;
}

.collapsible i {
  font-style: italic;
}

.paper-topic {
  position: absolute;
  top: 50%;
  right: 55px;
  max-width: 170px;
  text-align: right;
  transform: translateY(-50%);
}

.content {
  max-height: none;
  overflow: visible;
  border-bottom: 1px solid var(--line);
  background: #fafafa;
  transition: max-height 260ms ease;
}

.js .content {
  max-height: 0;
  overflow: hidden;
}

.content > * {
  max-width: 860px;
  margin-inline: 17px;
}

.content hr {
  display: none;
}

.content p {
  margin-top: 0;
  margin-bottom: 0;
  padding-top: 18px;
  color: #4c4c4c;
  font-size: 0.88rem;
  line-height: 1.75;
}

.content p:last-child {
  padding-bottom: 20px;
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.content p:empty {
  display: none;
}

[data-filtered="true"],
[hidden],
.research-group > br,
.landing-paper-list > br {
  display: none !important;
}

.teaching {
  margin-top: 76px;
}

.landing-papers {
  margin-top: 76px;
}

.landing-paper-list {
  margin-top: 30px;
  border-top: 2px solid var(--accent);
}

.section-link {
  margin: 24px 0 0;
  font-size: 0.82rem;
}

.bio-placeholder {
  max-width: 760px;
  margin-top: 42px;
  padding: 26px 28px;
  border-left: 3px solid var(--accent);
  background: var(--soft);
  color: var(--muted);
  font-size: 0.92rem;
}

.bio-placeholder p {
  margin: 0;
}

.teaching-list {
  margin-top: 30px;
  border-top: 1px solid var(--line);
}

.teaching-list .collapsible {
  padding-right: 55px;
  font-size: 0.95rem;
  font-weight: 600;
}

.course-heading h2 {
  max-width: 520px;
}

.course-description {
  max-width: 850px;
  margin-top: 42px;
  padding: 28px 30px;
  border-left: 3px solid var(--accent);
  background: var(--soft);
}

.course-description h3 {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.course-description p {
  margin: 0 0 13px;
  color: #444444;
  font-size: 0.92rem;
  line-height: 1.75;
}

.course-description p:last-child {
  margin-bottom: 0;
}

.course-projects {
  margin-top: 76px;
}

.semester-tabs {
  margin-top: 28px;
}

.semester-tab-list {
  display: flex;
  border-bottom: 2px solid var(--accent);
}

.semester-tab {
  min-width: 142px;
  min-height: 46px;
  padding: 13px 22px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 0;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-align: center;
  text-transform: uppercase;
}

.semester-tab + .semester-tab {
  border-left: 0;
}

.semester-tab:hover {
  background: var(--soft);
  color: var(--accent);
}

.semester-tab:focus-visible {
  position: relative;
  z-index: 1;
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.semester-tab[aria-selected="true"] {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.semester-panel .project-list {
  margin-top: 0;
  border-top: 0;
}

.semester-empty {
  min-height: 140px;
  padding: 34px 24px;
  border: 1px solid var(--line);
  border-top: 0;
  background: var(--soft);
  color: var(--muted);
}

.semester-empty p {
  margin: 0;
  font-size: 0.88rem;
}

.course-resource {
  margin: 25px 0 0;
  font-size: 0.8rem;
}

.project-list {
  margin-top: 26px;
  border-top: 2px solid var(--accent);
}

.project-row {
  padding-right: 155px;
}

.project-number {
  position: absolute;
  top: 50%;
  right: 55px;
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.105em;
  line-height: 1.4;
  text-align: right;
  text-transform: uppercase;
  transform: translateY(-50%);
}

.project-visual {
  margin-top: 22px;
  margin-bottom: 2px;
  padding: 12px;
  border: 1px solid var(--line);
  background: #ffffff;
}

.project-visual img {
  display: block;
  width: 100%;
  height: auto;
  margin-inline: auto;
}

.project-visual-narrow img {
  max-width: 720px;
}

.project-visual figcaption {
  margin-top: 11px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 400;
  line-height: 1.55;
  text-align: left;
}

.site-footer {
  border-top: 1px solid #dddddd;
  background: #f3f3f3;
  color: var(--muted);
  font-size: 0.73rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-block: 30px;
}

@media (max-width: 900px) {
  .nav,
  .footer-inner {
    width: min(calc(100% - 40px), var(--page-width));
  }

  .page-shell {
    width: min(100%, var(--page-width));
    padding-inline: 24px;
  }

  .nav {
    min-height: 58px;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 58px;
    right: 0;
    display: none;
    width: min(320px, calc(100vw - 40px));
    padding: 10px;
    border: 1px solid var(--line);
    background: var(--surface);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  }

  .nav-links.is-open {
    display: block;
  }

  .nav-links a {
    display: block;
    min-height: 44px;
    padding: 15px 14px;
    border: 0;
    border-bottom: 1px solid #eeeeee;
  }

  .nav-links a:last-child {
    border-bottom: 0;
  }

  .nav-links a:hover,
  .nav-links a:focus-visible,
  .nav-links a[aria-current="page"] {
    border-color: transparent;
    background: var(--soft);
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  section {
    scroll-margin-top: 80px;
  }

  .topics {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {
  .page-shell {
    padding: 36px 20px 55px;
  }

  .intro {
    grid-template-columns: minmax(0, 1fr) 105px;
    gap: 23px;
    padding-bottom: 44px;
  }

  .portrait-frame {
    align-self: start;
    height: 157px;
  }

  .intro h1 {
    font-size: 1.75rem;
  }

  .role {
    font-size: 0.88rem;
  }

  .contact {
    font-size: 0.78rem;
  }

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

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

  .interest-item {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .interest-item:last-child {
    border-bottom: 0;
  }

  .topic-card {
    min-height: 0;
    border-right: 0;
    border-bottom: 0;
  }

  .collapsible {
    padding: 17px 52px 17px 13px;
  }

  .paper-topic {
    position: static;
    display: block;
    max-width: none;
    margin-top: 7px;
    text-align: left;
    transform: none;
  }

  .project-row {
    padding-right: 52px;
  }

  .semester-tab {
    flex: 1;
    min-width: 0;
    padding-inline: 14px;
  }

  .project-number {
    position: static;
    display: block;
    margin-top: 7px;
    text-align: left;
    transform: none;
  }

  .course-description {
    padding: 22px 20px;
  }

  .project-visual {
    padding: 7px;
  }

  .content > * {
    margin-inline: 13px;
  }
}

@media (max-width: 470px) {
  .wordmark {
    font-size: 1.05rem;
  }

  .intro {
    grid-template-columns: minmax(0, 1fr) 82px;
    gap: 17px;
  }

  .portrait-frame {
    height: 122px;
  }

  .eyebrow {
    display: none;
  }

  .intro h1 {
    margin-top: 0;
    font-size: 1.5rem;
  }

  .intro-links {
    grid-column: 1 / -1;
  }

  .group-title {
    display: block;
  }

  .group-title span {
    display: block;
    margin-top: 3px;
  }

  .footer-inner {
    display: block;
  }

  .footer-inner span {
    display: block;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .site-header,
  .topics,
  .filter-status,
  .collapsible::after,
  .site-footer {
    display: none;
  }

  body,
  .page-shell {
    background: #ffffff;
  }

  .page-shell {
    width: 100%;
    padding: 0;
  }

  .content,
  .js .content {
    max-height: none !important;
    overflow: visible;
  }
}
