/* Studio editorial system: readable Chinese, image-led cards, purposeful motion. */
:root {
  --studio-font: Inter, -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  --studio-ease: cubic-bezier(.22, 1, .36, 1);
}
body { font-family: var(--studio-font); }
:is(.section-head h2,.work-intro h1,.route-intro h1,.resume-hero h1,.resume-block h2,.resume-project h3,.timeline-title,.lab-card h3,.project-tile__body h3,.work-card__body h3,.work-detail h1,.detail-module h2,.experience-page h1,.experience-card h2) {
  font-family: var(--studio-font); font-weight: 650; font-style: normal; letter-spacing: -.025em; line-height: 1.3; overflow-wrap: anywhere;
}
.hero-statement { font-family: var(--studio-font); font-weight: 650; line-height: 1.32; letter-spacing: -.035em; }
:is(.work-intro h1,.route-intro h1,.resume-hero h1,.work-detail h1) { font-size: clamp(36px, 5.2vw, 72px); }
:is(.hero-lede,.section-head p,.work-intro > p,.route-intro > p,.resume-block > p,.resume-project p,.timeline-item p,.lab-card p,.work-detail__summary) { font-size: 16px; line-height: 1.8; text-wrap: pretty; }
.timeline-title { font-size: 19px; }
.timeline-role,.timeline-date,.resume-meta,.award-list,.skill-list,.work-detail__facts { font-size: 14px; line-height: 1.7; }
.lab-card h3 { margin-top: 18px; font-size: 25px; }
.lab-card__cover { margin-bottom: 20px; }
.project-tile__body { padding: 23px 24px 24px; }
.project-tile__body h3 { font-size: clamp(22px, 1.65vw, 25px); line-height: 1.4; margin: 12px 0; }
.project-tile__body p { font-size: 15px; line-height: 1.8; -webkit-line-clamp: 4; }
.project-tile__tag,.project-tile__link { font-size: 12px; }
.project-tile__media { aspect-ratio: 4 / 3; }
.project-tile[data-project-card="caremonitor"] img,.project-tile[data-project-card="carepulse"] img,.project-tile[data-project-card="fuyi"] img { object-fit: contain; background: #fff; }
.project-tile.is-portrait .project-tile__media { aspect-ratio: 4 / 3; }
.project-tile.is-portrait .project-tile__media img { width: 100%; height: 100%; }
.work-card__body h3 { font-size: clamp(24px, 2.5vw, 36px); line-height: 1.35; }
.work-card__body p { font-size: 15px; line-height: 1.75; }
.work-card__body { min-height: 170px; }
.experience-card h2 { font-size: 24px; line-height: 1.4; }
.experience-card__copy > p:last-child { font-size: 14px; line-height: 1.8; max-height: 145px; }
.experience-card__close { width: 44px; height: 44px; }
.experience-page__text-view,.experience-page__back { font-size: 14px; line-height: 1.75; }
.experience-page__intro p { font-size: 15px; }
.photo-carousel__caption { line-height: 1.65; }
:is(a,button,summary):focus-visible { outline: 2px solid var(--orange); outline-offset: 5px; }
.text-link .ph,.button .ph,.project-tile__arrow .ph,.lab-card .ph-arrow-up-right { transition: transform 200ms var(--studio-ease); }
.studio-enter { animation: studio-rise 640ms var(--studio-ease) both; animation-delay: var(--studio-delay,0ms); }
.studio-media-enter { animation: studio-unveil 750ms var(--studio-ease) both; }
@keyframes studio-rise { from { opacity: 0; translate: 0 22px; } to { opacity: 1; translate: 0 0; } }
@keyframes studio-unveil { from { clip-path: inset(8% 0 8% 0 round 12px); opacity: .35; } to { clip-path: inset(0 round 12px); opacity: 1; } }
@media (hover:hover) and (pointer:fine) {
  .project-tile,.lab-card { transition: transform 220ms var(--studio-ease), box-shadow 220ms ease; }
  .project-tile:hover,.lab-card:hover { transform: translateY(-5px); box-shadow: 0 16px 36px rgba(23,24,26,.11); }
  .project-tile:hover .project-tile__arrow .ph,.lab-card:hover .ph-arrow-up-right { transform: translate(2px,-2px); }
  .text-link:hover .ph,.button:hover .ph { transform: translateX(3px); }
}
@media (min-width:621px) and (max-width:1100px) { .work-list { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width:560px) {
  .project-tile__body { padding: 20px; }
  .project-tile__body h3 { font-size: 23px; }
  .work-card__body { min-height: 205px; padding: 22px; }
  .work-card__body h3 { font-size: 23px; }
  .work-card__body p { font-size: 14px; line-height: 1.7; }
  .lab-card h3 { font-size: 23px; }
  .experience-card h2 { font-size: 21px; }
  .experience-card__copy > p:last-child { font-size: 14px; }
}
@media (prefers-reduced-motion:reduce) {
  .studio-enter,.studio-media-enter { animation: none !important; }
  *,*::before,*::after { scroll-behavior:auto !important; animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; }
}
html[data-motion="off"] .studio-enter,html[data-motion="off"] .studio-media-enter,
html[data-motion="reduced"] .studio-enter,html[data-motion="reduced"] .studio-media-enter { animation:none; }
html.studio-keyboard .work-card { transition:none !important; }

/* Explicit width prevents max-height + intrinsic aspect ratio from shrinking
   the stage horizontally on wide screens. The button fills that stage. */
.photo-carousel__stage {
  width: 100%;
  min-width: 0;
  min-height: 0;
  aspect-ratio: 3 / 2;
  max-height: min(68vh, 720px);
}
.photo-carousel__image-button {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  max-height: none;
  aspect-ratio: auto;
}
.photo-carousel__image {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
  object-position: 50% 50%;
  margin: auto;
  padding: clamp(8px, 1.2vw, 18px);
}
.photo-carousel__caption strong { font-family: var(--studio-font); font-weight: 600; font-style: normal; }
