:root {
  color-scheme: light;
  --ink: #17211f;
  --muted: #5d6b67;
  --soft: #eef3ee;
  --paper: #fbfcf8;
  --panel: #ffffff;
  --line: #dce5de;
  --teal: #176b68;
  --green: #6b8f4e;
  --coral: #c85f45;
  --gold: #b1842d;
  --shadow: 0 20px 60px rgba(23, 33, 31, 0.1);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  width: 100%;
  overflow-x: hidden;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  width: 100%;
  min-width: 0;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, rgba(238, 243, 238, 0.9), rgba(251, 252, 248, 0.96) 320px),
    var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.62;
}

a {
  color: var(--teal);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  overflow-wrap: anywhere;
}

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -44px;
  z-index: 20;
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
  padding: 10px 14px;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 16px;
}

.page-shell {
  display: grid;
  grid-template-columns: minmax(260px, 330px) minmax(0, 820px);
  gap: 48px;
  width: min(1240px, calc(100% - 48px));
  max-width: 100%;
  margin: 0 auto;
  padding: 44px 0 56px;
}

.profile-panel {
  position: fixed;
  top: 44px;
  left: max(24px, calc((100vw - 1240px) / 2));
  width: clamp(260px, 26vw, 330px);
  align-self: start;
  will-change: transform;
  transform: translateZ(0);
  min-width: 0;
  max-height: calc(100vh - 88px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.profile-card {
  min-width: 0;
  contain: paint;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  padding: 28px;
}

.avatar {
  display: block;
  width: 148px;
  height: 148px;
  border: 1px solid var(--line);
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 22px;
}

.eyebrow,
.section-kicker,
.project-label {
  margin: 0;
  color: var(--coral);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
  overflow-wrap: anywhere;
}

h1 {
  margin-bottom: 0;
  font-size: 2.15rem;
  line-height: 1.08;
}

.cn-name {
  margin: 6px 0 16px;
  color: var(--muted);
  font-size: 1.04rem;
}

.role {
  margin-bottom: 10px;
  color: var(--muted);
}

.email-line {
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 700;
}

.email-line a {
  color: var(--ink);
  text-decoration: none;
}

.email-line a:hover {
  color: var(--teal);
  text-decoration: underline;
}

.location-line {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 800;
}

.quick-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.quick-facts span,
.pub-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  color: #30413d;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 700;
}

.profile-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.profile-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: none;
}

.profile-links a:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.site-nav {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.site-nav a {
  border-left: 3px solid transparent;
  color: var(--muted);
  padding: 7px 0 7px 13px;
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a.active {
  border-left-color: var(--teal);
  color: var(--ink);
}

.content {
  grid-column: 2;
  min-width: 0;
}

.section {
  border-bottom: 1px solid var(--line);
  padding: 38px 0;
  scroll-margin-top: 28px;
}

.intro-section {
  padding-top: 14px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 18px;
}

h2 {
  margin-bottom: 14px;
  font-size: 1.72rem;
  line-height: 1.22;
}

.intro-section h2 {
  max-width: 780px;
  font-size: 2.35rem;
  line-height: 1.12;
}

.intro-section p {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.05rem;
}

.intro-section p,
.news-list span,
.publication p,
.project-card p,
.timeline p,
.service-grid p {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

.news-list {
  display: grid;
  gap: 13px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.news-list li {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.news-list time {
  color: var(--gold);
  font-weight: 900;
}

.publication {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 24px;
  min-width: 0;
  contain: layout paint;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.76);
  padding: 22px;
  margin-bottom: 14px;
}

.publication.featured {
  border-color: rgba(23, 107, 104, 0.34);
  background: linear-gradient(135deg, rgba(23, 107, 104, 0.08), rgba(255, 255, 255, 0.88));
}

.publication.compact {
  padding: 18px 22px;
}

.pub-year {
  min-width: 0;
  color: var(--teal);
  font-size: 0.88rem;
  font-weight: 900;
}

.pub-body {
  min-width: 0;
}

.pub-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 10px;
}

.publication h3 {
  margin-bottom: 8px;
  font-size: 1.12rem;
  line-height: 1.32;
}

.publication h3 a {
  color: inherit;
  text-decoration: none;
}

.publication h3 a:hover {
  color: var(--teal);
}

.publication p {
  margin-bottom: 10px;
  color: var(--muted);
}

.authors {
  color: #344640;
  font-size: 0.95rem;
}

.pub-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
}

.pub-links a,
.text-link {
  font-weight: 900;
  min-width: 0;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.project-card {
  min-width: 0;
  contain: layout paint;
  min-height: 238px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 20px;
}

.project-card h3 {
  margin: 8px 0 10px;
  font-size: 1.18rem;
}

.project-card h3 a {
  color: inherit;
  text-decoration: none;
}

.project-card p {
  color: var(--muted);
  font-size: 0.95rem;
}

.split-section {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 42px;
  min-width: 0;
}

.timeline {
  display: grid;
  gap: 20px;
}

.timeline article {
  position: relative;
  min-width: 0;
  border-left: 2px solid var(--line);
  padding-left: 18px;
}

.timeline time {
  color: var(--gold);
  font-size: 0.88rem;
  font-weight: 900;
}

.timeline h3,
.service-grid h3 {
  margin: 4px 0 6px;
  font-size: 1.04rem;
}

.timeline p,
.service-grid p {
  margin-bottom: 0;
  color: var(--muted);
}

#education .timeline p,
#service .service-grid p {
  text-align: left;
  hyphens: manual;
}

.award-groups {
  display: grid;
  gap: 30px;
}

.subsection-title {
  margin: 0 0 14px;
  color: var(--teal);
  font-size: 1rem;
}

.clean-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.clean-list li::marker {
  color: var(--teal);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.service-grid div {
  min-width: 0;
  contain: layout paint;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  padding: 18px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 28px;
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 980px) {
  .page-shell {
    grid-template-columns: 1fr;
    gap: 26px;
    width: min(760px, calc(100% - 32px));
    max-width: 100%;
    padding-top: 24px;
  }

  .profile-panel {
    position: static;
    width: auto;
    max-height: none;
    overflow-y: visible;
    scrollbar-gutter: auto;
  }

  .content {
    grid-column: auto;
  }

  .profile-card {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    column-gap: 22px;
    align-items: start;
  }

  .avatar {
    grid-row: span 5;
    width: 120px;
    height: 120px;
    margin: 0;
  }

  .quick-facts,
  .profile-links {
    grid-column: 1 / -1;
  }

  .site-nav {
    display: flex;
    gap: 6px;
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .site-nav a {
    flex: 0 0 auto;
    border-left: 0;
    border-bottom: 3px solid transparent;
    padding: 8px 9px;
  }

  .site-nav a:hover,
  .site-nav a.active {
    border-left-color: transparent;
    border-bottom-color: var(--teal);
  }
}

@media (max-width: 720px) {
  .profile-card,
  .publication,
  .split-section,
  .news-list li {
    grid-template-columns: 1fr;
  }

  .page-shell {
    width: calc(100% - 24px);
  }

  .profile-card {
    padding: 22px;
  }

  .avatar {
    grid-row: auto;
  }

  .profile-links,
  .project-grid,
  .service-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    display: block;
  }

  .intro-section h2 {
    font-size: 1.9rem;
  }

  .section {
    padding: 30px 0;
  }

  .publication {
    gap: 10px;
    padding: 18px;
  }

  .project-card {
    min-height: auto;
  }
}
