/* Visual language: white canvas with warm ivory insets,
   terracotta accent #C96442, serif display headings over HarmonyOS Sans
   body text, hairline borders instead of shadows.

   This site uses HarmonyOS Sans Fonts. The font files in fonts/ are
   unmodified copies redistributed under the HarmonyOS Sans Fonts License
   Agreement; see fonts/HarmonyOS-Sans-LICENSE.txt. */

@font-face {
  font-family: "HarmonyOS Sans";
  src: url("fonts/HarmonyOS_Sans_Light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "HarmonyOS Sans";
  src: url("fonts/HarmonyOS_Sans_Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "HarmonyOS Sans";
  src: url("fonts/HarmonyOS_Sans_Regular_Italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "HarmonyOS Sans";
  src: url("fonts/HarmonyOS_Sans_Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "HarmonyOS Sans";
  src: url("fonts/HarmonyOS_Sans_Bold.ttf") format("truetype");
  font-weight: 600 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --brand: #C96442;
  --brand-hover: #A8502F;

  --text: #141413;
  --muted: #3D3D3A;
  --tertiary: #73726C;

  --line: rgba(31, 30, 29, 0.10);
  --soft-line: rgba(31, 30, 29, 0.08);

  --canvas: #FFFFFF;
  --card: #FFFFFF;
  --sunken: #F5F4ED;

  --serif: "Source Serif 4", "Noto Serif SC", Georgia, "Times New Roman", serif;

  --radius-card: 16px;
  --radius-inner: 12px;
  --radius-chip: 8px;
  --radius-lg: 24px;

  --orange: #D97757;
  --purple: #8E6FA8;
  --green: #788C5D;
}

* {
  box-sizing: border-box;
}

/* Grid items default to min-width:auto, which lets an image's intrinsic
   width push the track wider than the viewport. */
.profile-copy,
.profile-side,
.story-main,
.item-main,
.talk-main,
.project-body,
.publication-body,
.brief-row > span {
  min-width: 0;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 0;
  height: 0;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background: var(--canvas);
  font-family: "HarmonyOS Sans", "HarmonyOS Sans SC", "Noto Sans SC", "PingFang SC", "PingFang TC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--brand);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--brand-hover);
  text-decoration: none;
}

p {
  margin: 0 0 0.5rem;
}

img {
  max-width: 100%;
}

/* Navigation */

.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid var(--soft-line);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}

.nav-container {
  display: flex;
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 32px;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--serif);
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
}

.logo:hover {
  color: var(--text);
}

.nav-links {
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a {
  color: var(--muted);
  font-size: 16px;
  font-weight: 500;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--brand);
}

.nav-links a.active {
  font-weight: 700;
}

.menu-toggle {
  display: none;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--muted);
  border-radius: 1px;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.menu-toggle.active span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Page shell and containers */

.page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 8px 32px 56px;
}

.section {
  margin-top: 16px;
  padding: 26px 30px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
}

.section-title {
  font-family: var(--serif);
  margin: 0 0 1rem;
  color: var(--text);
  font-size: 26px;
  font-weight: 500;
  line-height: 1.35;
  text-align: left;
}

.section-intro {
  margin-bottom: 1rem;
}

.subpage-header {
  padding: 24px 4px 4px;
}

.subpage-header h1 {
  font-family: var(--serif);
  margin: 0 0 0.35rem;
  color: var(--text);
  font-size: 34px;
  font-weight: 500;
  line-height: 1.3;
}

.subpage-header p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.empty-state {
  margin: 0;
  padding: 4px 0;
  color: var(--tertiary);
}

.info-box-grid {
  display: grid;
  gap: 20px;
}

/* Opt-in two-column layout; single-column pages keep full width. */
.info-box-grid--split {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.info-box--wide {
  grid-column: 1 / -1;
}

.info-box {
  padding: 18px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-inner);
}

.info-box h2 {
  font-family: var(--serif);
  margin: 0 0 0.85rem;
  color: var(--text);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.4;
}

.item-list {
  display: grid;
  gap: 10px;
}

.info-item {
  padding: 0 0 10px;
  border-bottom: 1px solid var(--soft-line);
}

.info-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.item-head {
  display: flex;
  gap: 14px;
  align-items: baseline;
  justify-content: space-between;
}

.item-time {
  flex-shrink: 0;
  color: var(--tertiary);
  font-size: 14px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  line-height: 1.6;
  white-space: nowrap;
}

.item-main h3,
.info-item .item-head h3,
.research-card h3 {
  margin: 0 0 0.25rem;
  color: var(--text);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
}

.item-main p {
  margin-bottom: 0;
}

.research-grid {
  display: grid;
  gap: 12px;
}

.research-card {
  padding-top: 14px;
  border-top: 1px solid var(--soft-line);
}

.research-card:first-child {
  padding-top: 0;
  border-top: 0;
}

.research-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.publication-list,
.compact-list {
  margin: 0;
  padding-left: 1.25rem;
}

.publication-list li,
.compact-list li {
  margin-bottom: 0.45rem;
  padding-left: 0.25rem;
}

.publication-list li::marker,
.compact-list li::marker {
  color: var(--brand);
  font-weight: 700;
}

/* Home hero */

.hero {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 56px;
  align-items: start;
  margin-top: 16px;
  padding: 34px 30px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
}

.profile-side {
  text-align: center;
}

.profile-photo {
  padding: 0;
}

.profile-side .image-shell {
  border-radius: var(--radius-lg);
}

.profile-role {
  margin: 0 0 0.35rem;
  color: var(--muted);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
}

.profile-org {
  margin: 0;
  color: var(--tertiary);
  font-size: 14px;
  line-height: 1.6;
}

.image-shell {
  display: block;
  overflow: hidden;
  background: var(--sunken);
  border-radius: var(--radius-inner);
}

.profile-photo .image-shell {
  aspect-ratio: 1 / 1;
}

.image-shell img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-copy {
  padding: 0;
}

/* Display name in the serif face */
.name {
  margin: 1.1rem 0 0.4rem;
  font-family: var(--serif);
  font-size: 38px;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 0.01em;
  text-align: center;
}

.profile-copy p {
  margin-bottom: 0.65rem;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.profile-copy p:last-child {
  margin-bottom: 0;
}

.profile-copy strong {
  color: var(--text);
  font-weight: 600;
}

.hero-detail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 40px;
  margin-top: 1.3rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--soft-line);
}

.hero-detail-col {
  min-width: 0;
}

.hero-detail h2 {
  font-family: var(--serif);
  margin: 0 0 0.6rem;
  color: var(--text);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
}

.hero-detail .compact-list li {
  margin-bottom: 0.2rem;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.hero-detail .compact-list li:last-child {
  margin-bottom: 0;
}

.hero-detail .item-list {
  gap: 6px;
}

.hero-detail .info-item {
  padding-bottom: 6px;
}

.hero-detail .info-item p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.hero-detail .item-head h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.4;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.6rem;
  justify-content: center;
  margin-top: 1rem;
  font-size: 16px;
}

.contact-links span {
  color: var(--tertiary);
}

/* News timeline */

.news-scroll-container {
  padding: 0.2rem 0 0.2rem 1rem;
  border-left: 2px solid var(--line);
}

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

.timeline-item {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 0.45rem;
  align-items: baseline;
  padding-left: 0.25rem;
  font-size: 15px;
  line-height: 1.6;
}

.news-date {
  color: var(--tertiary);
  font-size: 14px;
  font-weight: 500;
}

.news-icon {
  display: inline-flex;
  align-self: center;
  justify-content: center;
  min-width: 1.3rem;
  color: var(--brand);
}

.news-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.news-icon-orange {
  color: var(--orange);
}

.news-icon-purple {
  color: var(--purple);
}

.news-icon-green {
  color: var(--green);
}

/* Publications and talks */

.publication-card {
  display: grid;
  grid-template-columns: minmax(240px, 35%) 1fr;
  gap: 24px;
  align-items: center;
  margin-top: 18px;
  padding: 12px 0;
}

.publication-media {
  aspect-ratio: 810 / 370;
  background: var(--sunken);
  border-radius: var(--radius-inner);
}

.publication-body h3 {
  margin: 0 0 0.3rem;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
}

.publication-meta,
.publication-links {
  margin-bottom: 0.45rem;
}

.publication-note {
  margin: 0.6rem 0 0;
  color: var(--tertiary);
  font-size: 13px;
}

.talk-list {
  display: grid;
  gap: 14px;
}

.talk-item {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 18px;
  padding: 15px 0;
  border-top: 1px solid var(--soft-line);
}

.talk-time {
  color: var(--tertiary);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.6;
}

.talk-main h3 {
  margin: 0 0 0.3rem;
  color: var(--text);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
}

.talk-main p {
  margin-bottom: 0.35rem;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.talk-main p:last-child {
  margin-bottom: 0;
}

/* Projects */

.project-card {
  display: grid;
  grid-template-columns: minmax(280px, 38%) 1fr;
  gap: 24px;
  align-items: start;
  padding: 20px 0 4px;
  border-top: 1px solid var(--soft-line);
}

.project-media {
  aspect-ratio: 1080 / 721;
  background: var(--sunken);
  border-radius: var(--radius-inner);
}

.project-body h3 {
  margin: 0 0 0.45rem;
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
}

.project-body p {
  margin-bottom: 0.5rem;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.62;
}

.project-body strong {
  color: var(--text);
  font-weight: 600;
}

.project-meta {
  color: var(--tertiary);
  font-size: 12px;
  font-weight: 500;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0.75rem 0 0.55rem;
}

.project-tags span {
  padding: 4px 12px;
  color: var(--muted);
  background: var(--sunken);
  border-radius: var(--radius-chip);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  align-items: center;
  margin-bottom: 0;
}

.project-links span {
  color: var(--tertiary);
}

.service-heading {
  margin-bottom: 0.8rem;
  font-size: 17px;
  font-weight: 600;
}

.service-list {
  margin: 0;
  padding-left: 1.2rem;
  list-style: disc;
}

.service-list li {
  margin-bottom: 0.5rem;
}

.service-list li::marker {
  color: var(--brand);
}

/* Story: milestones */

.story-timeline {
  display: grid;
  padding-left: 28px;
  border-left: 2px solid var(--line);
}

.story-entry {
  position: relative;
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 28px;
  padding: 18px 0;
  border-bottom: 1px solid var(--soft-line);
}

/* Node on the timeline rail */
.story-entry::before {
  content: "";
  position: absolute;
  top: 23px;
  left: -36px;
  width: 10px;
  height: 10px;
  background: var(--card);
  border: 2px solid var(--brand);
  border-radius: 50%;
}

.story-entry:first-child {
  padding-top: 2px;
}

.story-entry:first-child::before {
  top: 7px;
}

.story-entry:last-child {
  padding-bottom: 2px;
  border-bottom: 0;
}

.story-date {
  margin: 0;
  color: var(--tertiary);
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  line-height: 1.9;
  white-space: nowrap;
}

.story-main h3 {
  margin: 0 0 0.4rem;
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
}

.story-main p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.58;
}

.story-main strong {
  color: var(--text);
  font-weight: 600;
}

.story-caption {
  margin: 0.6rem 0 0;
  color: var(--tertiary);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.6;
}

/* Story: condensed list */

.story-brief {
  padding-left: 28px;
  border-left: 2px solid var(--line);
}

.brief-row {
  position: relative;
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 28px;
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--soft-line);
  border-radius: var(--radius-chip);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  transition: background 0.15s ease;
}

.brief-row::before {
  content: "";
  position: absolute;
  top: 18px;
  left: -33px;
  width: 6px;
  height: 6px;
  background: rgba(31, 30, 29, 0.22);
  border-radius: 50%;
}

.brief-row:hover {
  background: var(--sunken);
}

.brief-row:last-child {
  border-bottom: 0;
}

.brief-date {
  color: var(--tertiary);
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.story-figure {
  display: block;
  overflow: hidden;
  max-width: 460px;
  margin-top: 1.1rem;
  background: var(--card);
  border-radius: var(--radius-inner);
  border: 1px solid var(--line);
  box-shadow: 0 2px 10px rgba(31, 30, 29, 0.06);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.story-figure:hover {
  box-shadow: 0 6px 18px rgba(31, 30, 29, 0.10);
  transform: translateY(-2px);
}

.story-figure-sm {
  max-width: 320px;
}

.story-figure img {
  display: block;
  width: 100%;
  height: auto;
}

/* Image zoom */

.zoom-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  padding: 50px 24px;
  background: rgba(31, 30, 29, 0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.zoom-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  display: block;
  max-width: 90vw;
  max-height: 80vh;
  border-radius: var(--radius-card);
}

.close-modal {
  position: absolute;
  top: 20px;
  right: 35px;
  border: 0;
  color: #ffffff;
  background: transparent;
  font-size: 40px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 768px) {
  .nav-container {
    padding: 12px 18px;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 59px;
    right: 0;
    left: 0;
    flex-direction: column;
    gap: 0;
    padding: 8px 0;
    background: var(--card);
    border-radius: 0 0 var(--radius-card) var(--radius-card);
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links li {
    padding: 10px 24px;
  }

  .page {
    padding: 4px 12px 40px;
  }

  .nav-container {
    padding: 12px 18px;
  }

  .section,
  .hero {
    padding: 20px 16px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .hero-detail {
    grid-template-columns: 1fr;
  }

  .profile-org br {
    display: none;
  }

  .profile-photo {
    max-width: 320px;
    margin: 0 auto;
  }

  .name {
    font-size: 30px;
  }

  .info-box-grid--split {
    grid-template-columns: 1fr;
  }

  .item-head {
    flex-direction: column;
    gap: 2px;
  }

  .research-grid {
    grid-template-columns: 1fr;
  }

  .publication-card {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .talk-item {
    grid-template-columns: 1fr;
    gap: 4px;
  }

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

  .story-entry,
  .brief-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .story-entry::before,
  .brief-row::before {
    left: -34px;
  }

  .brief-row::before {
    left: -31px;
  }

  .timeline-item {
    grid-template-columns: auto auto 1fr;
  }
}
