:root {
  --paper: #fbfaf6;
  --ink: #20211f;
  --muted: #626760;
  --line: #dedbd2;
  --teal: #176c67;
  --coral: #b85d4f;
  --mist: #edf4f1;
  --max: 1080px;
  --font-serif: Charter, "Bitstream Charter", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Songti SC", "Noto Serif CJK SC", serif;
  --font-sans: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Noto Sans CJK SC", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 16px;
  line-height: 1.7;
}

body.page-white {
  background: #fff;
}

a {
  color: inherit;
  text-decoration-color: rgba(23, 108, 103, 0.35);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition: color 160ms ease, text-decoration-color 160ms ease;
}

a:hover {
  color: var(--teal);
  text-decoration-color: currentColor;
}

.site-header {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  font-family: var(--font-sans);
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0;
}

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 14px;
}

.nav a {
  text-decoration: none;
}

.nav a.active {
  color: var(--ink);
  font-weight: 700;
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: 2px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.language-switch a {
  min-width: 34px;
  padding: 2px 8px;
  border-radius: 999px;
  color: var(--muted);
  text-align: center;
  text-decoration: none;
}

.language-switch a.active {
  background: var(--ink);
  color: var(--paper);
}

.hero {
  width: min(var(--max), calc(100% - 40px));
  margin: 54px auto 86px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.72fr);
  align-items: center;
  gap: clamp(36px, 7vw, 86px);
}

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--teal);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero .eyebrow {
  font-size: 16px;
}

h1,
h2,
h3 {
  font-family: var(--font-sans);
  margin: 0;
  line-height: 1.08;
  letter-spacing: 0;
}

h1 {
  max-width: 600px;
  font-size: clamp(34px, 4.8vw, 54px);
  font-weight: 700;
  line-height: 1.06;
}

.hero h1 {
  font-size: clamp(31px, 4vw, 46px);
  font-weight: 700;
}

.intro-name,
.name-note,
.lede,
.hero-copy > p:not(.eyebrow) {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.intro-name {
  font-family: var(--font-sans);
}

.intro-name strong {
  font-weight: 700;
}

.wave {
  display: inline-block;
  transform-origin: 70% 70%;
}

.hero:hover .wave {
  animation: wave 780ms ease-in-out;
}

@keyframes wave {
  0%,
  100% {
    transform: rotate(0deg);
  }
  20% {
    transform: rotate(16deg);
  }
  40% {
    transform: rotate(-10deg);
  }
  60% {
    transform: rotate(12deg);
  }
  80% {
    transform: rotate(-6deg);
  }
}

h2 {
  margin-bottom: 20px;
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 700;
}

h3 {
  margin-bottom: 10px;
  font-size: 18px;
}

p {
  margin: 0 0 20px;
  color: var(--muted);
}

.name-note {
  margin-top: 10px;
  color: var(--coral);
  font-family: var(--font-sans);
  font-weight: 600;
}

.lede {
  margin-top: 30px;
  color: var(--ink);
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 32px;
  font-family: var(--font-sans);
  font-weight: 600;
}

.quick-links a {
  color: var(--teal);
}

.highlight {
  color: var(--ink);
  font-weight: 700;
}

.hero-visual {
  margin: 0;
}

.photo-flip {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  border: 1px solid var(--line);
  box-shadow: 0 24px 70px rgba(32, 33, 31, 0.12);
  overflow: hidden;
}

.photo-flip img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: opacity 360ms ease, transform 520ms ease;
}

.photo-back {
  opacity: 0;
  transform: scale(1.04);
}

.photo-flip:hover .photo-front,
.photo-flip:focus-within .photo-front {
  opacity: 0;
  transform: scale(0.98);
}

.photo-flip:hover .photo-back,
.photo-flip:focus-within .photo-back {
  opacity: 1;
  transform: scale(1);
}

.page-hero {
  width: min(var(--max), calc(100% - 40px));
  margin: 68px auto 76px;
  max-width: 820px;
}

.section {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 54px 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: clamp(24px, 6vw, 76px);
}

.project-section {
  width: 100%;
  max-width: none;
  margin-top: 0;
  padding: 64px max(20px, calc((100% - var(--max)) / 2)) 74px;
  background: #fff;
}

.section-label {
  color: var(--coral);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-body {
  max-width: 820px;
}

.section-body.wide {
  max-width: 960px;
}

.org-logo-inline {
  display: inline-block;
  width: 78px;
  max-height: 1.1em;
  margin: 0 0.12em 0 0.24em;
  object-fit: contain;
  vertical-align: -0.16em;
}

.org-logo-iflytek {
  width: 82px;
}

.org-logo-fordham {
  width: 82px;
  max-height: 1.2em;
  margin-left: 0.08em;
  margin-right: 0.04em;
  vertical-align: -0.2em;
}

.hobby-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.hobby-gallery figure {
  margin: 0;
}

.hobby-gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
}

.hobby-gallery figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
}

.research-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 32px;
  background: var(--line);
  border: 1px solid var(--line);
}

.research-grid article {
  min-height: 188px;
  padding: 24px;
  background: var(--paper);
}

.compact-grid article {
  min-height: 150px;
}

.research-grid p {
  margin-bottom: 0;
  font-size: 15px;
  line-height: 1.62;
}

.work-list {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.work-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.work-title {
  font-family: var(--font-sans);
  font-weight: 650;
}

.work-meta {
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 14px;
}

.section-tail {
  margin-top: 26px;
}

.news-list {
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.news-list li {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 18px;
  padding: 14px 0;
  color: var(--muted);
}

.news-list time {
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 650;
}

.news-list span {
  color: var(--ink);
  font-weight: 650;
}

.news-list a {
  color: var(--ink);
  font-weight: 650;
}

.news-copy {
  min-width: 0;
}

.project-list {
  display: grid;
  gap: 34px;
  margin-top: 30px;
}

.project-card {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(220px, 0.72fr);
  align-items: flex-start;
  gap: 30px;
  scroll-margin-top: 24px;
  padding-bottom: 34px;
  border-bottom: 1px solid var(--line);
}

.project-card-large-figure {
  grid-template-columns: minmax(220px, 0.78fr) minmax(280px, 1.08fr);
}

.project-header {
  grid-column: 1 / -1;
}

.project-card:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.project-copy {
  max-width: 760px;
}

.project-header h3 {
  margin-bottom: 14px;
  font-size: clamp(20px, 2.4vw, 26px);
  line-height: 1.2;
}

.project-authors {
  margin: -4px 0 18px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.project-authors strong {
  color: var(--ink);
  font-weight: 700;
}

.project-figure {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.project-figure img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.project-figure-large {
  transform: none;
}

.contact {
  padding-bottom: 90px;
}

.contact-link {
  display: inline-block;
  margin-top: 4px;
  color: var(--teal);
  font-weight: 700;
}

.link-list {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.link-list li {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.link-list span {
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 700;
}

.link-list a {
  color: var(--teal);
  font-family: var(--font-sans);
  font-weight: 600;
}

@media (max-width: 840px) {
  .hero {
    margin-top: 32px;
    grid-template-columns: 1fr;
  }

  .hero-visual {
    max-width: 520px;
  }

  .section {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .research-grid,
  .hobby-gallery,
  .work-list li,
  .link-list li {
    grid-template-columns: 1fr;
  }

  .project-card {
    grid-template-columns: minmax(0, 1fr) minmax(180px, 0.72fr);
  }

  .project-card-large-figure {
    grid-template-columns: minmax(0, 0.78fr) minmax(230px, 1fr);
  }

  .project-figure {
    margin-top: 0;
  }

  .research-grid article {
    min-height: 0;
  }

}

@media (max-width: 560px) {
  .site-header {
    width: min(var(--max), calc(100% - 28px));
    min-height: 66px;
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .nav {
    flex-wrap: wrap;
    gap: 10px 14px;
    font-size: 13px;
  }

  .hero,
  .page-hero,
  .section {
    width: min(var(--max), calc(100% - 28px));
  }

  .hero {
    margin-bottom: 58px;
  }

  h1 {
    font-size: 34px;
  }

  .hero h1 {
    font-size: 32px;
  }

  .section {
    padding: 42px 0;
  }

  .page-hero {
    margin: 42px auto 54px;
  }

  .quick-links {
    gap: 14px;
  }

  .work-list li,
  .news-list li {
    gap: 6px;
  }

  .project-card {
    grid-template-columns: 1fr;
  }

  .project-header h3 {
    overflow-wrap: anywhere;
  }

  .project-figure {
    margin-top: 4px;
  }

  .news-list li {
    grid-template-columns: 1fr;
  }
}
