:root {
  --ink: #202632;
  --muted: #667080;
  --soft: #f6f8fb;
  --line: #dfe4ea;
  --accent: #1e3765;
  --accent-dark: #152b52;
  --accent-light: #007fa3;
  --accent-soft: #eaf1f6;
  --max-width: 960px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  color: #102d4e;
}

img {
  max-width: 100%;
}

.skip-link {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 30;
  padding: 0.55rem 0.8rem;
  color: #fff;
  background: var(--ink);
  transform: translateY(-150%);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  width: min(calc(100% - 3rem), var(--max-width));
  min-height: 66px;
  margin: 0 auto;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  font-weight: 720;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}

.site-brand__mark {
  display: inline-grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border: 1px solid #c9d5e2;
  border-radius: 6px;
  color: var(--accent-dark);
  background: var(--soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.03em;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.3rem 1.4rem;
}

.site-nav a {
  color: #4c5563;
  font-size: 0.89rem;
  font-weight: 580;
  text-decoration: none;
}

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

.page-shell {
  width: min(calc(100% - 3rem), var(--max-width));
  margin: 0 auto;
}

.home-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: clamp(3rem, 8vw, 6rem);
  align-items: start;
  padding: clamp(2.5rem, 5vw, 4rem) 0 3.5rem;
}

.home-intro h1,
.page-header h1 {
  margin: 0;
  color: #141a24;
  font-size: clamp(2.45rem, 6vw, 3.65rem);
  font-weight: 710;
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.home-intro__role {
  margin: 0.55rem 0 1.65rem;
  color: #3f4856;
  font-size: 1.08rem;
}

.home-intro__cross-appointment {
  display: block;
  margin-top: 0.18rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.research-list {
  display: grid;
  gap: 0.3rem;
  margin: 0 0 1.75rem;
  padding: 0;
  color: var(--accent-dark);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86rem;
  list-style: none;
}

.research-list li::before {
  margin-right: 0.42rem;
  color: var(--accent-light);
  content: ">";
}

.home-intro__bio {
  max-width: 680px;
}

.home-intro__bio p {
  margin: 0 0 1rem;
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 1.7rem 0 0;
  padding: 0;
  list-style: none;
}

.profile-links a,
.paper-links a {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0.34rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: #4f5967;
  background: #fff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  text-decoration: none;
}

.profile-links a {
  gap: 0.42rem;
}

.profile-icon {
  width: 0.95rem;
  height: 0.95rem;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.profile-links a:hover,
.paper-links a:hover {
  border-color: #bdc9d7;
  color: var(--accent-dark);
  background: var(--soft);
}

.profile-card {
  margin: 0;
}

.profile-card img {
  display: block;
  width: 220px;
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(25, 38, 55, 0.08);
}

.profile-card figcaption {
  margin-top: 0.85rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.academic-entry {
  padding: 0;
}

.academic-entry h3 {
  margin: 0 0 0.2rem;
  color: #1a2230;
  font-size: 0.98rem;
  font-weight: 670;
}

.academic-entry p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.student-note {
  margin-bottom: clamp(4rem, 8vw, 6rem);
}

.student-note--page {
  margin-top: 0;
}

.student-note h2,
.content-section h2 {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 0 0 1rem;
  color: #28303d;
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.student-note h2::before,
.content-section h2::before {
  color: var(--accent-light);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  content: ">";
}

.student-note p {
  max-width: 760px;
  margin: 0;
}

.page-header {
  padding: clamp(2.25rem, 4vw, 3.25rem) 0 1.25rem;
}

.page-header p {
  max-width: 760px;
  margin: 1rem 0 0;
  color: var(--muted);
}

.publication-list {
  counter-reset: publication 21;
  margin: 0;
  padding: 1rem 0 4rem;
  list-style: none;
}

.publication {
  counter-increment: publication -1;
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr) auto;
  gap: 0.35rem 1.25rem;
  align-items: start;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--line);
}

.publication:last-child {
  border-bottom: 0;
}

.publication::before {
  padding-top: 0.1rem;
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  content: counter(publication) ".";
}

.publication__year {
  display: none;
}

.publication__title {
  margin: 0 0 0.25rem;
  color: #1a2230;
  font-size: 1rem;
  font-weight: 680;
  line-height: 1.5;
}

.publication__authors,
.publication__venue {
  margin: 0;
  color: #505967;
  font-size: 0.9rem;
  line-height: 1.55;
}

.publication__venue {
  color: var(--accent-dark);
  font-weight: 630;
}

.publication__award {
  display: inline-block;
  margin-top: 0.35rem;
  color: #8b4d1d;
  font-size: 0.82rem;
  font-weight: 650;
}

.paper-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
  padding-top: 0.1rem;
}

.paper-links a {
  min-height: auto;
  padding: 0.25rem 0.55rem;
  font-size: 0.72rem;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3rem;
  padding: 1.75rem 0 5rem;
}

.content-section {
  min-width: 0;
}

.content-section--wide {
  grid-column: 1 / -1;
}

.course-list {
  display: grid;
  gap: 1rem;
  padding: 1.75rem 0 5rem;
}

.course-card {
  padding: 1.25rem 1.35rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.course-card__title {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 0.85rem;
  align-items: center;
}

.course-card h2 {
  margin: 0;
  color: #1a2230;
  font-size: 1.04rem;
  font-weight: 680;
}

.course-code,
.service-period,
.service-tags span {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.course-code {
  padding: 0.18rem 0.48rem;
  border-radius: 4px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 0.78rem;
  white-space: nowrap;
}

.course-terms {
  margin: 0.65rem 0 0;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
}

.service-sections {
  max-width: 820px;
  padding: 1.75rem 0 5rem;
}

.service-group + .service-group {
  margin-top: 2.75rem;
}

.service-group h2 {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 0 0 0.8rem;
  color: #28303d;
  font-size: 1rem;
  font-weight: 650;
}

.service-group h2::before {
  color: var(--accent-light);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  content: ">";
}

.service-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.service-list li {
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
}

.service-list li:last-child {
  border-bottom: 0;
}

.service-period {
  padding-top: 0.14rem;
  color: var(--accent);
  font-size: 0.8rem;
  white-space: nowrap;
}

.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.service-tags span {
  display: inline-block;
  padding: 0.22rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: #535c69;
  background: var(--soft);
  font-size: 0.75rem;
  line-height: 1.4;
}

.clean-list,
.award-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.clean-list li,
.award-list li {
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}

.clean-list li:last-child,
.award-list li:last-child {
  border-bottom: 0;
}

.award-list li {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  gap: 1rem;
}

.award-list time {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.photo-card {
  margin: 0;
}

.photo-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 7px;
  object-fit: cover;
}

.photo-card figcaption {
  margin-top: 0.65rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.calendar-wrap {
  padding: 3rem 0 5rem;
}

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
}

.site-footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  width: min(calc(100% - 3rem), var(--max-width));
  margin: 0 auto;
  padding: 1.5rem 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-nav a {
  color: var(--muted);
  text-decoration: none;
}

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

.not-found {
  padding: 7rem 0;
}

.not-found h1 {
  margin: 0 0 0.6rem;
  font-size: 2.5rem;
}

@media (max-width: 760px) {
  .site-header__inner {
    display: block;
    padding: 0.9rem 0 0.8rem;
  }

  .site-nav {
    justify-content: flex-start;
    margin-top: 0.7rem;
  }

  .home-intro {
    grid-template-columns: minmax(0, 1fr) 170px;
    gap: 2.5rem;
  }

  .profile-card img {
    width: 170px;
  }

  .publication {
    grid-template-columns: 3.25rem minmax(0, 1fr);
  }

  .paper-links {
    grid-column: 2;
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .site-header__inner,
  .page-shell,
  .site-footer__inner {
    width: min(calc(100% - 2rem), var(--max-width));
  }

  .site-nav {
    gap: 0.25rem 1rem;
  }

  .home-intro {
    grid-template-columns: 1fr;
    gap: 1.8rem;
    padding-top: 2.15rem;
  }

  .profile-card {
    grid-row: 1;
  }

  .profile-card img {
    width: 150px;
  }

  .profile-card figcaption {
    display: none;
  }

  .content-grid,
  .photo-grid {
    grid-template-columns: 1fr;
  }

  .service-list li {
    grid-template-columns: 4.5rem minmax(0, 1fr);
    gap: 0.75rem;
  }

  .content-section--wide {
    grid-column: auto;
  }

  .publication {
    grid-template-columns: 2.5rem minmax(0, 1fr);
  }

  .paper-links {
    grid-column: 2;
  }

  .site-footer__inner {
    display: block;
  }
}

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