/* Shared character and homepage refinements for the sixth revision. */
.hero-playground {
  background:
    radial-gradient(ellipse at 63% 46%, #dcf3d785, transparent 62%),
    radial-gradient(ellipse at 32% 54%, #e5eff780, transparent 65%);
}

.pet-v6 {
  max-width: 375px;
  aspect-ratio: 320 / 286;
  perspective: 850px;
}

.pet-v6 .pet-svg {
  display: block;
  filter: drop-shadow(0 20px 20px #549ba22b);
  animation: pet-hover-rest 5.8s ease-in-out infinite;
  transform-origin: center;
}

.pet-v6 .pet-spin {
  transform-origin: 50% 48%;
  transform-box: view-box;
}

.pet-eye-white { fill: #fcfff9; }
.pet-iris { fill: #133941; transition: opacity .22s ease; }
.pet-eye-detail {
  transform: translate(var(--look-x, 0px), var(--look-y, 0px));
  transition: transform .16s ease-out;
}

.pet-eyes-v6 {
  transform-box: fill-box;
  transform-origin: center;
  transition: scale .18s ease-out;
}

.pet-v6.is-blinking .pet-eyes-v6 { scale: 1 .08; }

.pet-chat-mark, .pet-cheek, .pet-grin {
  opacity: 0;
  transition: opacity .28s ease;
}

.pet-cheek { fill: #ef9ab0; }
.pet-grin {
  fill: none;
  stroke: #28616a;
  stroke-width: 3.2px;
  stroke-linecap: round;
}

.pet-v6.is-chat .pet-cheek { opacity: .72; }
.pet-v6.is-chat .pet-grin,
.pet-v6[data-channel="wechat"] .pet-chat-mark { opacity: 1; }
.pet-v6[data-channel="wechat"] .pet-iris { opacity: 0; }

.pet-v6 .pet-speech {
  display: flex;
  align-items: center;
  gap: 10px;
  top: -1%;
  right: -6%;
  padding: 11px 14px;
  width: max-content;
  max-width: min(225px, 72vw);
  color: #213941;
  background: #fffffff0;
  border: 0;
  box-shadow: 0 8px 28px #2a506421;
  font-size: 12px;
  line-height: 1.55;
}

.pet-v6 .pet-speech svg { width: 19px; height: 19px; flex: none; }
.pet-v6 .pet-speech b, .pet-v6 .pet-speech small { display: block; }
.pet-v6 .pet-speech small { font-size: 11px; color: #51665f; }
.contact-pet .pet-v6 .pet-speech { top: -6%; right: -5px; max-width: 220px; }

.hero-fields span {
  border: 0;
  background: #ffffffe6;
  box-shadow: 0 5px 17px #32594817;
  backdrop-filter: blur(12px);
}

.hero-fields span:first-child { top: 19%; right: 7%; }
.hero-fields span:nth-child(2) { bottom: 23%; left: 4%; }
.hero-fields span:nth-child(3) { bottom: 13%; right: 9%; }

.portrait-circle {
  width: 285px;
  height: 340px;
  aspect-ratio: auto;
  left: 13px;
  top: 32px;
  translate: none;
  border-radius: 110px 110px 58px 58px;
  background: linear-gradient(150deg, #e7f0fa, #eee9df);
  transform: rotate(-8deg);
  box-shadow: none;
}

.career-card .tenure-tag {
  background: #e2f2c9;
  color: #294827;
  border: 0;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 650;
}

.colleague-note {
  min-height: 240px;
  gap: 25px;
  padding: 38px 45px;
  border: 0;
  border-radius: 28px;
}

.colleague-note .note-symbol {
  font-size: 92px;
  color: #709052;
  line-height: .92;
  align-self: center;
}

.colleague-note .small-label { color: #53634e; }
.colleague-note h3 { margin: 12px 0 10px; }
.colleague-note .note-author { display: block; margin-top: 14px; }
.colleague-note .note-link { background: #1c2025; }

.project-meta {
  gap: 11px;
  padding-inline-start: 5px;
  flex-wrap: wrap;
}

.project-meta .project-company {
  padding-inline-end: 10px;
  border-inline-end: 1px solid #b9c7ba;
}

.project-meta .project-tags { gap: 5px; flex-wrap: wrap; }
.project-meta .project-tags span { border-radius: 999px; padding: 4px 8px; }

.knowledge-project {
  gap: clamp(20px, 4vw, 47px);
  background: var(--letter-wash);
  border: 0;
  border-radius: 25px;
  padding: 17px;
  align-items: stretch;
}

.knowledge-project .project-media { align-self: center; border-radius: 16px; }
.knowledge-project .project-caption {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-width: 0;
  padding: 15px 14px 12px 0;
}

.knowledge-project .project-company { color: #3d5543; }
.knowledge-project .project-caption p { max-width: 27em; }
.knowledge-project .project-caption .knowledge-cta {
  align-self: flex-end;
  margin-top: auto;
  translate: 0 0;
  padding: 13px 17px;
  color: #fff;
  background: #1c2025;
  border-radius: 12px;
  transition: background .2s ease;
}

.knowledge-project .project-caption p { margin-bottom: 23px; }

.project-card:not(.knowledge-project) .card-action {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 17px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -46%) scale(.93);
  padding: 16px 24px;
  border-radius: 50px;
  background: var(--lime);
  color: #17200e;
  box-shadow: 0 10px 26px #24431126;
  opacity: 0;
  transition: opacity .2s ease, transform .28s var(--ease);
  white-space: nowrap;
  pointer-events: none;
}

.project-card:not(.knowledge-project):focus-visible .card-action {
  opacity: 1;
  transform: translate(-50%, -50%);
}

@media (hover: hover) and (pointer: fine) {
  .home-page .project-card { cursor: pointer; }
  .project-card:not(.knowledge-project):hover .card-action {
    left: var(--card-x, 50%);
    top: var(--card-y, 50%);
    opacity: 1;
    transform: translate(-50%, -50%);
  }
  .knowledge-project, .knowledge-project * { cursor: pointer; }
}

@media (max-width: 850px) {
  .project-meta { padding-inline-start: 0; }
}

@media (max-width: 640px) {
  .hero-playground .pet-v6 { max-width: 270px; }
  .hero-fields span:first-child { top: 15%; right: 4%; }
  .hero-fields span:nth-child(2) { bottom: 21%; left: 4%; }
  .hero-fields span:nth-child(3) { bottom: 10%; right: 7%; }
  .pet-v6 .pet-speech { right: 0; }
  .portrait-circle {
    width: min(80%, 265px);
    height: 310px;
    left: 50%;
    top: 30px;
    translate: -50% 0;
    border-radius: 90px 90px 55px 55px;
  }
  .colleague-note { min-height: 0; padding: 28px 24px; gap: 16px; }
  .colleague-note .note-symbol {
    align-self: flex-start;
    height: 29px;
    font-size: 65px;
  }
  .colleague-note .note-link { align-self: flex-start; }
  .knowledge-project { padding: 13px; border-radius: 22px; }
  .knowledge-project .project-caption { padding: 19px 8px 6px; }
}

@media (prefers-reduced-motion: reduce) {
  .pet-v6 .pet-svg { animation: none; }
  .pet-v6 *, .project-card .card-action { transition: none; }
}

/* Let wheel and touch gestures pass to the document at the end of the page. */
.contact-section,
.contact-section .contact-rows { overflow: clip; }

.motion-ready .contact-layout .reveal {
  opacity: 1;
  transform: none;
  translate: none;
}

.hero .pet-v6 .pet-speech {
  top: auto;
  bottom: -2%;
  left: 0;
  right: auto;
}

@media (max-width: 360px) {
  .home-page .site-header .header-inner { gap: 8px; }
  .home-page .site-header nav { gap: 0; }
  .home-page .site-header nav a {
    padding-inline: 4px;
    white-space: nowrap;
  }
}
