:root {
  --text: #202124;
  --muted: #65696f;
  --accent: #9b0000;
  --line: #dedede;
  --soft: #f7f7f6;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--text);
  background: #fff;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-underline-offset: 3px; }

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

.nav-wrap {
  width: min(100% - 40px, 1000px);
  min-height: 78px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.site-name {
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
}

nav { display: flex; align-items: center; gap: 28px; }

nav a {
  padding: 27px 0 23px;
  border-bottom: 3px solid transparent;
  color: var(--muted);
  font-size: 0.88rem;
  text-decoration: none;
}

nav a:hover,
nav a.active { color: var(--text); border-bottom-color: var(--accent); }

.page {
  width: min(100% - 40px, 1000px);
  margin: 0 auto;
}

.home-page { min-height: calc(100vh - 146px); display: grid; align-items: center; padding-block: 72px; }

.profile {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: clamp(48px, 8vw, 90px);
  align-items: center;
}

.profile-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
  border-radius: 2px;
}

h1,
h2,
h3 { font-family: var(--serif); color: var(--text); }

h1 {
  margin: 0 0 12px;
  font-size: clamp(2.25rem, 5vw, 3.6rem);
  line-height: 1.1;
  font-weight: 500;
  letter-spacing: -0.025em;
}

.position { margin: 0; color: var(--accent); font-size: 1.08rem; font-weight: 700; }
.institution { margin: 2px 0 0; color: var(--muted); }

.bio {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.bio p { margin: 0 0 15px; }
.bio p:last-child { margin-bottom: 0; }

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.profile-links a,
.button-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 15px;
  border: 1px solid var(--accent);
  border-radius: 3px;
  color: var(--accent);
  font-family: var(--sans);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition: color 150ms ease, background-color 150ms ease;
}

.profile-links a:hover,
.profile-links a:focus-visible,
.button-link:hover,
.button-link:focus-visible {
  color: #fff;
  background: var(--accent);
}

.site-footer {
  width: min(100% - 40px, 1000px);
  margin: 0 auto;
  padding: 23px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
}

.site-footer p { margin: 0; }

.content-page { padding-block: 65px 90px; }

.page-heading {
  margin-bottom: 55px;
  padding-bottom: 25px;
  border-bottom: 1px solid var(--line);
}

.page-heading h1 { margin-bottom: 0; }

.section-label {
  margin: 0 0 10px;
  color: var(--accent);
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.research-page > section { max-width: 860px; }

.research-page .section-label { margin-bottom: 18px; }

.paper {
  max-width: 860px;
  margin-bottom: 22px;
  padding: 28px 30px 30px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 3px;
  background: #fff;
}

.paper h3,
.course h3 {
  margin: 0;
  font-size: 1.42rem;
  line-height: 1.35;
  font-weight: 500;
}

.authors { margin: 7px 0 0; color: var(--muted); font-size: 0.92rem; }

.project-status {
  margin: 9px 0 0;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.8rem;
  line-height: 1.45;
}

.project-status::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin: 0 8px 2px 0;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.72;
}

.doi-link,
.doi-link:visited {
  color: #1d5fa7;
}

.doi-link:hover,
.doi-link:focus-visible {
  color: #164a82;
}

.abstract {
  margin-top: 22px;
  padding: 19px 21px;
  color: #3f4246;
  background: var(--soft);
}
.abstract strong {
  color: var(--accent);
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.abstract p { margin: 0 0 13px; }
.abstract p:last-child { margin-bottom: 0; }

.secondary-section { margin-top: 70px; }
.external-link { margin-top: 38px; font-weight: 700; }

.school { max-width: 860px; }
.school > h2 {
  margin: 0 0 18px;
  color: var(--accent);
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.course {
  margin-bottom: 22px;
  padding: 28px 30px 30px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 3px;
  background: #fff;
}

.course h3 { font-size: 1.5rem; }

.offering {
  display: grid;
  grid-template-columns: 115px 1fr;
  column-gap: 25px;
  margin-top: 16px;
}

.offering h4,
.offering p { margin: 0; }
.offering h4 { grid-row: 1 / span 2; color: var(--accent); font-size: 0.93rem; }
.offering p { color: #3f4246; }

.course-description {
  margin-top: 25px;
  padding: 19px 21px;
  background: var(--soft);
}

.course-description h4 { margin: 0 0 7px; color: var(--accent); font-size: 0.78rem; letter-spacing: 0.05em; text-transform: uppercase; }
.course-description p { margin: 0 0 8px; }
.course-description p:last-child { margin-bottom: 0; }
.note { color: var(--muted); font-size: 0.88rem; }

.personal-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  align-items: center;
}

.personal-photo img {
  display: block;
  width: 100%;
  border-radius: 2px;
}

.personal-copy {
  font-family: var(--serif);
  font-size: 1.12rem;
  line-height: 1.7;
}

.personal-copy p { margin: 0 0 20px; }
.personal-copy p:last-child { margin-bottom: 0; }

.personal-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 28px;
}

.personal-gallery figure { margin: 0; }

.personal-gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center 68%;
  border-radius: 2px;
}

@media (max-width: 720px) {
  .nav-wrap { padding-block: 17px; align-items: flex-start; flex-direction: column; gap: 10px; }
  nav { width: 100%; gap: 20px; overflow-x: auto; }
  nav a { padding: 5px 0 7px; white-space: nowrap; }
  .home-page { display: block; min-height: 0; padding-block: 45px 70px; }
  .profile { grid-template-columns: 1fr; gap: 35px; }
  .profile-photo { max-width: 280px; }
  .content-page { padding-block: 45px 70px; }
  .page-heading { margin-bottom: 38px; }
  .offering { grid-template-columns: 1fr; gap: 2px; }
  .offering h4 { grid-row: auto; margin-bottom: 2px; }
  .course { padding: 24px 22px 26px; }
  .paper { padding: 24px 22px 26px; }
  .abstract { padding: 17px 18px; }
  .personal-layout { grid-template-columns: 1fr; gap: 35px; }
  .personal-copy { padding: 0; }
  .personal-gallery { grid-template-columns: 1fr; }
}
