:root {
  --ink: #20252b;
  --muted: #626a73;
  --navy: #17365d;
  --accent: #5e7897;
  --rule: #d9dde2;
  --soft-rule: #e9ebee;
  --paper: #ffffff;
  --subtle: #f6f7f8;
  --content-width: 1120px;
  --serif: Georgia, "Times New Roman", Times, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.68;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: var(--navy);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

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

a:focus-visible {
  outline: 3px solid rgba(94, 120, 151, 0.4);
  outline-offset: 4px;
}

h1,
h2,
h3,
p,
figure,
ul,
dl,
dd {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: #17212c;
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.18;
}

p:last-child {
  margin-bottom: 0;
}

cite {
  font-family: var(--serif);
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.55rem 0.8rem;
  color: #fff;
  background: var(--navy);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  border-bottom: 1px solid var(--rule);
  background: rgba(255, 255, 255, 0.97);
}

.header-inner {
  width: min(calc(100% - 48px), var(--content-width));
  min-height: 86px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.wordmark {
  display: inline-flex;
  flex-direction: column;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.12;
}

.wordmark:hover {
  color: var(--ink);
}

.wordmark-name {
  font-family: var(--serif);
  font-size: 1.34rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.wordmark-field {
  margin-top: 0.28rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.2vw, 1.9rem);
}

nav a {
  position: relative;
  padding: 0.25rem 0;
  color: #3e4650;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
}

nav a:hover,
nav a[aria-current="page"] {
  color: var(--navy);
}

nav a[aria-current="page"]::after {
  position: absolute;
  right: 0;
  bottom: -0.38rem;
  left: 0;
  height: 1px;
  background: var(--navy);
  content: "";
}

.eyebrow {
  margin-bottom: 0.75rem;
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  line-height: 1.4;
  text-transform: uppercase;
}

.profile {
  width: min(calc(100% - 48px), var(--content-width));
  margin: 0 auto;
  padding: clamp(3.5rem, 7vw, 6.5rem) 0 clamp(4rem, 7vw, 6.5rem);
  display: grid;
  grid-template-columns: minmax(240px, 330px) minmax(0, 1fr);
  align-items: start;
  gap: clamp(3rem, 7vw, 6.5rem);
}

.portrait {
  margin-bottom: 0;
}

.portrait img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--rule);
  object-fit: cover;
  object-position: center 18%;
}

.profile-copy {
  padding-top: 0.2rem;
}

.profile h1 {
  margin-bottom: 0.7rem;
  font-size: clamp(2.9rem, 5.5vw, 4.6rem);
  letter-spacing: -0.035em;
}

.profile-role {
  margin-bottom: 2rem;
  color: #4e5761;
  font-family: var(--serif);
  font-size: 1.12rem;
  line-height: 1.55;
}

.profile-summary {
  max-width: 750px;
  color: #343b43;
  font-family: var(--serif);
  font-size: 1.03rem;
  line-height: 1.75;
}

.profile-summary p {
  margin-bottom: 1.15rem;
}

.profile-links {
  margin: 1.8rem 0 0;
  padding: 1.15rem 0 0;
  border-top: 1px solid var(--soft-rule);
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0;
  list-style: none;
}

.profile-links li {
  display: flex;
  align-items: center;
}

.profile-links li + li::before {
  margin: 0 0.65rem;
  color: #a2a8ae;
  content: "·";
}

.profile-links a,
.section-link a,
.project-links a {
  font-size: 0.88rem;
  font-weight: 600;
}

.home-section {
  width: min(calc(100% - 48px), var(--content-width));
  margin: 0 auto;
  padding: clamp(3.4rem, 6vw, 5.2rem) 0;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 5.5rem);
}

.section-header h2,
.simple-section-header h2 {
  margin-bottom: 0;
  font-size: clamp(1.7rem, 3vw, 2.25rem);
  letter-spacing: -0.02em;
}

.research-areas {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
}

.research-areas article {
  padding: 0 1.8rem;
  border-left: 1px solid var(--soft-rule);
}

.research-areas article:first-child {
  padding-left: 0;
  border-left: 0;
}

.research-areas article:last-child {
  padding-right: 0;
}

.research-areas h3 {
  margin-bottom: 0.85rem;
  font-size: 1.16rem;
}

.research-areas p,
.home-teaching p,
.contact-details p {
  color: #444c55;
}

.section-link {
  grid-column: 2;
  margin: 1.9rem 0 0;
}

.home-teaching {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(270px, 0.75fr);
  gap: clamp(2.5rem, 6vw, 5rem);
}

.course-list {
  margin-bottom: 0;
}

.course-list > div {
  padding: 1rem 0;
  border-top: 1px solid var(--soft-rule);
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 1rem;
}

.course-list > div:last-child {
  border-bottom: 1px solid var(--soft-rule);
}

.course-list dt {
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.course-list dd {
  margin-bottom: 0;
}

.course-list strong,
.course-list span {
  display: block;
}

.course-list strong {
  font-family: var(--serif);
  font-size: 0.99rem;
  line-height: 1.4;
}

.course-list span {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.contact-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3rem;
}

.page-intro {
  width: min(calc(100% - 48px), 960px);
  margin: 0 auto;
  padding: clamp(3.7rem, 7vw, 6.5rem) 0 clamp(3.5rem, 6vw, 5.2rem);
}

.page-intro h1 {
  margin-bottom: clamp(2rem, 4vw, 3.1rem);
  font-size: clamp(2.9rem, 6vw, 4.7rem);
  letter-spacing: -0.04em;
}

.page-intro-copy {
  max-width: 780px;
  color: #343b43;
  font-family: var(--serif);
  font-size: 1.08rem;
  line-height: 1.78;
}

.page-intro-copy p {
  margin-bottom: 1.2rem;
}

.research-section,
.teaching-section {
  width: min(calc(100% - 48px), var(--content-width));
  margin: 0 auto;
  padding: clamp(3.7rem, 6vw, 5.7rem) 0;
  border-top: 1px solid var(--rule);
}

.research-section-header {
  display: grid;
  grid-template-columns: 62px minmax(0, 780px);
  gap: 1.6rem;
}

.research-section-header h2 {
  margin-bottom: 1rem;
  font-size: clamp(1.8rem, 3.4vw, 2.55rem);
  letter-spacing: -0.025em;
}

.research-section-header p:last-child {
  color: #4b535c;
  font-family: var(--serif);
  font-size: 1.01rem;
  line-height: 1.72;
}

.section-number {
  margin-top: 0.18rem;
  color: #8a939d;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.project-list {
  margin: clamp(2.7rem, 5vw, 4.4rem) 0 0 78px;
}

.project {
  max-width: 900px;
  padding: 1.8rem 0 2rem;
  border-top: 1px solid var(--soft-rule);
}

.project:last-child {
  border-bottom: 1px solid var(--soft-rule);
}

.project h3 {
  max-width: 820px;
  margin-bottom: 0.55rem;
  font-size: clamp(1.17rem, 2vw, 1.38rem);
  line-height: 1.36;
}

.project-meta {
  margin-bottom: 0.9rem;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.project > p:not(.project-meta) {
  max-width: 820px;
  margin-bottom: 0;
  color: #3e464f;
  font-family: var(--serif);
  font-size: 0.98rem;
  line-height: 1.72;
}

.project-links {
  margin-top: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.project-links:empty {
  display: none;
}

.project-links a {
  display: inline-flex;
  align-items: center;
}

.project-links a::after {
  margin-left: 0.25rem;
  content: "↗";
}

.simple-section-header {
  margin-bottom: clamp(2rem, 4vw, 3.25rem);
}

.prose-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2.5rem, 6vw, 5rem);
}

.prose-columns p,
.narrow-prose p,
.course-detail > div > p:not(.course-meta) {
  color: #3e464f;
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.75;
}

.prose-columns p {
  margin-bottom: 1.15rem;
}

.course-detail-list,
.experience-list {
  max-width: 920px;
}

.course-detail {
  padding: 1.8rem 0 2rem;
  border-top: 1px solid var(--soft-rule);
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 1.8rem;
}

.course-detail:last-child {
  border-bottom: 1px solid var(--soft-rule);
}

.course-code {
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.course-detail h3 {
  margin-bottom: 0.42rem;
  font-size: 1.32rem;
}

.course-meta {
  margin-bottom: 0.9rem;
  color: var(--muted);
  font-size: 0.84rem;
}

.experience-list article {
  padding: 1.15rem 0;
  border-top: 1px solid var(--soft-rule);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 2rem;
}

.experience-list article:last-child {
  border-bottom: 1px solid var(--soft-rule);
}

.experience-list h3 {
  margin-bottom: 0.2rem;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.experience-list p {
  margin-bottom: 0;
  color: #4b535c;
  font-size: 0.91rem;
}

.experience-list article > p {
  color: var(--muted);
  white-space: nowrap;
}

.narrow-prose {
  max-width: 780px;
}

.narrow-prose p {
  margin-bottom: 1.15rem;
}

.teaching-interests {
  max-width: 830px;
  margin-bottom: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  list-style: none;
}

.teaching-interests li {
  margin: 0 1.4rem 0.55rem 0;
  color: #414952;
  font-family: var(--serif);
  font-size: 1rem;
}

.teaching-interests li:not(:last-child)::after {
  margin-left: 1.4rem;
  color: #a5abb1;
  content: "·";
}

.site-footer {
  width: min(calc(100% - 48px), var(--content-width));
  margin: clamp(2rem, 5vw, 4rem) auto 0;
  padding: 1.6rem 0 2.2rem;
  border-top: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.site-footer p {
  margin-bottom: 0;
}

.site-footer a {
  color: inherit;
}

@media (max-width: 900px) {
  .profile {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 3rem;
  }

  .profile h1 {
    font-size: 3.3rem;
  }

  .home-section {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .section-link {
    grid-column: 1;
  }

  .research-areas {
    grid-template-columns: 1fr;
  }

  .research-areas article,
  .research-areas article:first-child,
  .research-areas article:last-child {
    padding: 1.35rem 0;
    border-top: 1px solid var(--soft-rule);
    border-left: 0;
  }

  .research-areas article:last-child {
    border-bottom: 1px solid var(--soft-rule);
  }

  .home-teaching {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .header-inner {
    width: min(calc(100% - 32px), var(--content-width));
    padding: 1.1rem 0 0.9rem;
    align-items: flex-start;
    flex-direction: column;
    gap: 0.9rem;
  }

  nav {
    width: 100%;
    gap: 0.7rem 1.2rem;
    flex-wrap: wrap;
  }

  .profile,
  .home-section,
  .research-section,
  .teaching-section,
  .site-footer {
    width: min(calc(100% - 32px), var(--content-width));
  }

  .page-intro {
    width: min(calc(100% - 32px), 960px);
  }

  .profile {
    padding-top: 2.8rem;
    grid-template-columns: 1fr;
    gap: 2.2rem;
  }

  .portrait {
    max-width: 230px;
  }

  .profile h1 {
    font-size: clamp(2.7rem, 14vw, 3.6rem);
  }

  .profile-summary,
  .page-intro-copy {
    font-size: 1rem;
  }

  .contact-details,
  .prose-columns {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .research-section-header {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  .project-list {
    margin-left: 0;
  }

  .course-detail {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }

  .experience-list article {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.5rem;
  }
}

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