* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: #202326;
  background: #fff;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.65;
}
.container { width: min(1120px, 88%); margin: 0 auto; }
.narrow { max-width: 820px; }
.site-header {
  background:  #edf2ed;
  border-bottom: 1px solid #e8e8e8;
  position: sticky; top: 0; z-index: 10;
}
.nav-wrap { min-height: 108px; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.brand { font-family: Georgia, serif; font-size: 1.3rem; letter-spacing: .16em; color: #222; text-decoration: none; font-weight: 700; }
nav { display: flex; flex-wrap: wrap; gap: 24px; }
nav a { color: #4a4a4a; text-decoration: none; font-size: 1.15rem; }
nav a:hover { color: #000; }
.hero {
  min-height: 500px;
  display: grid;
  grid-template-columns: 1.45fr .75fr;
  gap: 80px;
  align-items: center;
  padding-top: 40px;
  padding-bottom: 40px;
}

.eyebrow, .section-label { font-size: .75rem; letter-spacing: .2em; font-weight: 700; color: #6d6258; }
h1, h2, h3 { font-family: Georgia, 'Times New Roman', serif; font-weight: 500; line-height: 1.15; }
h1 { font-size: clamp(4rem, 8vw, 7rem); margin: 12px 0 20px; }
h2 { font-size: clamp(2.2rem, 4vw, 3.5rem); margin: 8px 0 28px; }
h3 { font-size: 1.55rem; }
.title { font-size: 1.1rem; color: #4d5154; }
.lead { max-width: 700px; font-size: 1.16rem; color: #50555a; margin-top: 28px; }
.portrait-wrap { display: flex; justify-content: center; }
.portrait { width: min(100%, 250px); height: auto; display: block; box-shadow: 15px 15px 0 #dfe6e8; }
.hero-links { display: flex; gap: 24px; align-items: center; margin-top: 32px; }
.button { background: #272b2e; color: white; text-decoration: none; padding: 12px 19px; font-size: .9rem; }
.text-link { color: #292d30; text-decoration: none; font-weight: 600; }
.section { padding-top: 100px; padding-bottom: 100px; }
.section-soft { background: #f1f5f5; }
.section p { font-size: 1.06rem; }
.cards { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; margin-top: 45px; }
.card { border-top: 2px solid #333; padding: 25px 8px 10px 0; }
.card span { font-size: .75rem; color: #777; }
.card p { color: #5b6064; font-size: .96rem; }
.section-dark { background: #25292c; color: white; }
.light { color: #d2c4b6; }
.intro-light { max-width: 820px; font-size: 1.18rem !important; color: #ececec; }
.note { color: #bfc2c4; font-size: .92rem !important; margin-top: 30px; }
.wide-copy { max-width: 850px; }
.subjects { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 35px; }
.subjects span { border: 1px solid #bbb; padding: 8px 13px; font-size: .87rem; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; }
.contact-note { align-self: end; color: #5c6063; }
footer { background: #181a1c; color: #bbb; padding: 28px 0; font-size: .8rem; }
.footer-wrap { display: flex; justify-content: space-between; gap: 20px; }
@media (max-width: 760px) {
  .nav-wrap { padding: 16px 0; align-items: flex-start; }
  nav { gap: 12px; justify-content: flex-end; }
  .hero { grid-template-columns: 1fr; gap: 45px; min-height: auto; }
  .portrait-wrap { justify-content: flex-start; }
  .portrait { width: 220px; }
  .cards, .contact-grid { grid-template-columns: 1fr; }
  .section { padding-top: 70px; padding-bottom: 70px; }
  .footer-wrap { flex-direction: column; }
}
/* Academic publication lists */

.publication-list {
  margin-top: 1.5rem;
}

.publication-list p {
  margin: 0 0 1.6rem 0;
  line-height: 1.65;
}

.publication-list strong {
  font-weight: 600;
}

.publication-list em {
  font-family: Georgia, "Times New Roman", serif;
}

.publication-list a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid #aaa;
  transition: border-color 0.2s ease;
}

.publication-list a:hover {
  border-bottom-color: #222;
}

/* Tighter spacing for interior content pages */

main > .section {
  padding-top: 4.5rem;
  padding-bottom: 4.5rem;
}

main > .section + .section {
  padding-top: 2.5rem;
}

/* Research area navigation */

.research-nav {
  margin-top: 60px;
  border-top: 1px solid #d8d8d8;
  max-width: 900px;
}

.research-nav-item {
  display: grid;
  grid-template-columns: 70px 1fr 40px;
  align-items: center;
  gap: 20px;
  padding: 26px 0;
  border-bottom: 1px solid #d8d8d8;
  color: #202326;
  text-decoration: none;
  transition: padding-left 0.25s ease;
}

.research-number {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: #6d6258;
}

.research-nav-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  line-height: 1.2;
}

.research-arrow {
  font-size: 1.25rem;
  text-align: right;
  transition: transform 0.25s ease;
}

.research-nav-item:hover {
  padding-left: 10px;
}

.research-nav-item:hover .research-arrow {
  transform: translateX(5px);
}

/* Give anchored sections breathing room below sticky navigation */
#behavioral,
#development,
#education {
  scroll-margin-top: 120px;
}

@media (max-width: 700px) {
  .research-nav {
    margin-top: 40px;
  }

  .research-nav-item {
    grid-template-columns: 42px 1fr 25px;
    gap: 12px;
    padding: 21px 0;
  }

  .research-nav-title {
    font-size: 1.25rem;
  }
}
/* Homepage name size */
.home-name {
  font-size: clamp(3.2rem, 6vw, 5.5rem);
}

/* Homepage contact section */

.home-contact {
  background: #edf2ed;
  padding: 38px 0 42px;
}

.home-contact h2 {
  margin: 5px 0 20px;
}

.home-contact-inner {
  max-width: 1120px;
}

.contact-details {
  display: flex;
  gap: 90px;
  padding-top: 16px;
  border-top: 1px solid #c4cec4;
}

.contact-detail {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.contact-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6d6258;
}

.contact-detail a {
  color: #202326;
  text-decoration: none;
  font-size: 1rem;
}

.contact-detail a:hover {
  text-decoration: underline;
}

@media (max-width: 700px) {
  .contact-details {
    flex-direction: column;
    gap: 25px;
  }
}


.contact-heading {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6d6258;
  margin: 0 0 14px;
}
.research-page-title {
  font-size: clamp(2.6rem, 4vw, 3.8rem);
}


.creative-page-title {
  font-size: clamp(2.6rem, 4vw, 3.8rem);
}


.creative-intro {
  padding-bottom: 35px;
}

.creative-writing-section {
  padding-top: 35px;
}

.creative-intro {
  padding-bottom: 20px;
}

.home-contact {
background: #edf2ed;
  padding: 30px 0 32px;
}

.teaching-page-title {
  font-size: clamp(2.6rem, 4vw, 3.8rem);
}

/* Teaching page section links — align with Academic Research */

.teaching-links {
  width: min(820px, 88%);
  margin: 35px auto 70px;
}

.teaching-links .research-row {
  display: grid;
  grid-template-columns: 55px 1fr 30px;
  align-items: center;
  width: 100%;
  padding: 20px 0;
  border-top: 1px solid #d8d8d8;
  color: #202326;
  text-decoration: none;
}

.teaching-links .research-row:last-child {
  border-bottom: 1px solid #d8d8d8;
}

.teaching-links .research-number {
  font-size: 0.75rem;
  color: #6d6258;
}

.teaching-links .research-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
}

.teaching-links .research-arrow {
  text-align: right;
  font-size: 1.1rem;
}

/* Keep homepage contact section at bottom of viewport */
body {
    min-height: 100vh;
}

main {
    min-height: calc(100vh - 96px);
    display: flex;
    flex-direction: column;
}

.home-contact {
    margin-top: auto;
}

/* Match homepage Li Qi heading size to Contact page */
.home-name {
    font-size: clamp(2.6rem, 4vw, 3.8rem);
}

/* Smaller subsection headings on Teaching page */
#courses .section-heading h2,
#experiential .section-heading h2,
#mentoring .section-heading h2 {
  font-size: 38px;
  line-height: 1.15;
}

/* Keep Teaching section titles visible below sticky header */
#courses,
#experiential,
#mentoring {
  scroll-margin-top: 130px;
}

/* Institutional links: same text color, but visibly clickable */
.title-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.title-link:visited {
  color: inherit;
}

.title-link:hover {
  text-decoration-thickness: 2px;
}

/* Position homepage portrait beside bio text */
@media (min-width: 701px) {
  .hero .portrait-wrap {
    align-self: center;
    transform: translateY(65px);
  }
}
