@font-face {
  font-family: "Source Han Sans CN Local";
  src: url("./assets/fonts/SourceHanSansCN-Light.otf") format("opentype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Han Sans CN Local";
  src: url("./assets/fonts/SourceHanSansCN-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Han Sans CN Local";
  src: url("./assets/fonts/SourceHanSansCN-Medium.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Han Sans CN Local";
  src: url("./assets/fonts/SourceHanSansCN-Bold.otf") format("opentype");
  font-weight: 600 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --desktop-text: #ffffff;
  --desktop-shadow: 0 1px 5px rgb(0 0 0 / 0.58), 0 0 18px rgb(0 0 0 / 0.2);
  --desktop-font: "Source Han Sans CN Local", "Source Han Sans SC", "思源黑体", "Noto Sans CJK SC", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  min-height: 100vh;
  overflow: hidden;
  color: var(--desktop-text);
  font-family: var(--desktop-font);
  background: #63adef;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

a {
  color: inherit;
  text-decoration: none;
}

.desktop-video {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  background: #63adef;
}

.desktop {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 5vh 4vw 7vh;
}

.icon-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(146px, 204px));
  align-items: end;
  justify-content: center;
  column-gap: clamp(1.2rem, 2.9vw, 3.3rem);
  width: min(1040px, 94vw);
  transform: translateY(-1.6vh);
}

.desktop-icon {
  --icon-size: clamp(141px, 12.6vw, 198px);
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 0.76rem;
  min-width: 0;
  color: #fff;
  outline: none;
  filter: drop-shadow(0 12px 16px rgb(0 0 0 / 0.18));
  transition: transform 180ms ease, filter 180ms ease;
}

.desktop-icon:hover,
.desktop-icon:focus-visible {
  transform: translateY(-5px) scale(1.035);
  filter: drop-shadow(0 18px 22px rgb(0 0 0 / 0.26));
}

.desktop-icon:focus-visible .icon-label {
  outline: 2px solid rgb(255 255 255 / 0.8);
  outline-offset: 4px;
}

.icon-shell {
  display: grid;
  width: var(--icon-size);
  height: var(--icon-size);
  place-items: center;
}

.icon-shell img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.icon-label {
  display: block;
  width: max-content;
  max-width: 150px;
  padding: 0 0.08rem;
  overflow-wrap: anywhere;
  color: #fff;
  font-size: clamp(0.79rem, 1.08vw, 0.95rem);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.12;
  text-align: center;
  text-shadow: var(--desktop-shadow);
}

.desktop-footer {
  position: fixed;
  right: 1rem;
  bottom: clamp(0.95rem, 2.5vh, 1.8rem);
  left: 1rem;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  color: #fff;
  font-size: clamp(0.8rem, 1.05vw, 0.95rem);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.2;
  text-align: center;
  text-shadow: var(--desktop-shadow);
}

.desktop-footer a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.13em;
}

.about-overlay {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 4rem);
  background: rgb(0 0 0 / 0.08);
}

.about-overlay[hidden] {
  display: none;
}

.experience-overlay,
.case-overlay {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 4rem);
  background: rgb(0 0 0 / 0.08);
}

.case-overlay {
  z-index: 8;
  background: rgb(0 0 0 / 0.16);
}

.experience-overlay[hidden],
.case-overlay[hidden] {
  display: none;
}

.about-window {
  width: 860px;
  min-height: 510px;
  overflow: hidden;
  color: #171717;
  background: #fff;
  border-radius: 1.8rem;
  box-shadow: 0.4rem 0.4rem 2rem rgb(0 0 0 / 0.15);
}

.experience-window,
.case-window {
  width: 1040px;
  max-width: calc(100vw - 6rem);
  max-height: calc(100vh - 4.5rem);
  overflow: hidden;
  color: #171717;
  background: #fff;
  border-radius: 1.8rem;
  box-shadow: 0.4rem 0.4rem 2rem rgb(0 0 0 / 0.15);
}

.case-window {
  width: 1040px;
  height: calc(4.2rem + clamp(660px, calc(100vh - 9rem), 850px));
  max-height: calc(100vh - 4.5rem);
  transform: translate(36px, 36px);
}

.window-titlebar {
  display: flex;
  align-items: center;
  gap: 0.58rem;
  min-height: 4.2rem;
  padding: 1.25rem 1.45rem 0.7rem;
}

.window-titlebar h1 {
  margin: 0 0 0 0.72rem;
  color: #666;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1;
}

.window-dot {
  display: block;
  width: 0.86rem;
  height: 0.86rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
}

.close-dot {
  cursor: pointer;
  background: rgb(255 92 95);
}

.minimize-dot {
  background: rgb(250 200 0);
}

.zoom-dot {
  background: rgb(52 199 89);
}

.experience-list {
  height: calc(100vh - 9rem);
  min-height: 660px;
  max-height: 850px;
  padding: 1.2rem 2.2rem 3rem;
  overflow: auto;
  scrollbar-width: none;
}

.experience-list::-webkit-scrollbar,
.case-body::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.experience-item {
  display: grid;
  grid-template-columns: 38% 1fr;
  gap: 2.15rem;
  align-items: stretch;
  padding: 2rem 0;
  border-top: 1px solid rgb(0 0 0 / 0.12);
}

.experience-item:first-child {
  border-top: 0;
  padding-top: 0.6rem;
}

.experience-thumb,
.experience-text {
  font: inherit;
  color: inherit;
  text-align: left;
}

button.experience-thumb,
button.experience-text {
  cursor: pointer;
}

.experience-thumb {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  border: 0;
  border-radius: 1.35rem;
  background: #e6e5df;
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.04);
}

.image-thumb {
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.image-thumb::before,
.image-thumb::after {
  display: none;
}

.experience-thumb::before,
.case-hero::before {
  position: absolute;
  inset: 0;
  content: "";
  background-image:
    linear-gradient(rgb(0 0 0 / 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgb(0 0 0 / 0.045) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, rgb(0 0 0 / 0.85), rgb(0 0 0 / 0.2));
}

.experience-thumb::after,
.case-hero::after {
  position: absolute;
  content: "";
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 1.1rem 2.6rem rgb(0 0 0 / 0.12);
}

.thumb-memory::after {
  right: 11%;
  bottom: -18%;
  width: 34%;
  height: 128%;
  transform: rotate(9deg);
  border: 14px solid #3b3d3d;
}

.thumb-level::after {
  left: 13%;
  bottom: -22%;
  width: 36%;
  height: 132%;
  transform: rotate(-8deg);
  border: 14px solid #404343;
}

.thumb-ai::after {
  top: 28%;
  left: 35%;
  width: 34%;
  height: 26%;
}

.thumb-systems::after {
  right: 12%;
  bottom: -12%;
  width: 42%;
  height: 118%;
  transform: rotate(6deg);
  border: 13px solid #343737;
}

.thumb-research::after {
  top: 25%;
  left: 12%;
  width: 76%;
  height: 40%;
}

.experience-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 0.15rem 0;
  border: 0;
  background: transparent;
}

.experience-text h2 {
  margin: 0 0 1rem;
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.12;
}

.experience-text h2::after {
  content: " ↗";
}

.static-text h2::after {
  content: "";
}

.experience-text p {
  max-width: 31rem;
  margin: 0 0 1.7rem;
  font-size: 1.05rem;
  line-height: 1.55;
}

.experience-text dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem;
  margin: 0;
}

.experience-text div {
  min-width: 0;
}

.experience-text dt {
  margin: 0 0 0.55rem;
  color: rgb(0 0 0 / 0.42);
  font-size: 0.96rem;
}

.experience-text dd {
  margin: 0;
  font-size: 1rem;
  line-height: 1.45;
}

.experience-text:hover h2,
.experience-text:focus-visible h2 {
  text-decoration: underline;
  text-underline-offset: 0.14em;
}

.experience-thumb:focus-visible,
.experience-text:focus-visible {
  outline: 2px solid rgb(0 0 0 / 0.34);
  outline-offset: 4px;
}

.case-body {
  height: calc(100% - 4.2rem);
  max-height: none;
  padding: 0 3rem 3.4rem;
  overflow: auto;
  scrollbar-width: none;
}

.case-hero {
  position: relative;
  min-height: 0;
  aspect-ratio: var(--thumb-aspect, 16 / 9);
  margin: 0 0 2.2rem;
  overflow: hidden;
  border-radius: 1.45rem;
  background: transparent;
}

.case-hero::after {
  right: 10%;
  bottom: -20%;
  width: 24%;
  height: 126%;
  transform: rotate(8deg);
  border: 14px solid #3b3d3d;
}

.case-hero.image-thumb {
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.case-hero.image-thumb::before,
.case-hero.image-thumb::after {
  display: none;
}

.case-kicker {
  margin: 0 0 0.65rem;
  color: rgb(0 0 0 / 0.45);
  font-size: 0.94rem;
}

.case-body h2 {
  margin: 0 0 1rem;
  font-size: 2.4rem;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.1;
}

#case-summary {
  max-width: 100%;
  margin: 0 0 2rem;
  font-size: 1.18rem;
  line-height: 1.6;
}

.case-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.6rem;
  max-width: 42rem;
  margin: 0 0 2.2rem;
}

.case-meta span {
  display: block;
  margin-bottom: 0.55rem;
  color: rgb(0 0 0 / 0.42);
}

.case-meta strong {
  font-weight: 400;
}

.case-article {
  display: grid;
  gap: 1rem;
  max-width: 100%;
  font-size: 1.05rem;
  line-height: 1.68;
}

.case-article p {
  margin: 0;
}

.case-article a {
  display: inline-flex;
  gap: 0.28em;
  align-items: center;
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
}

.case-article a::before {
  content: "";
  flex: 0 0 auto;
  width: 0.82em;
  height: 0.82em;
  background-color: currentColor;
  mask: url("./assets/icons/Link.svg") center / contain no-repeat;
  -webkit-mask: url("./assets/icons/Link.svg") center / contain no-repeat;
}

.case-article h2,
.case-article h3,
.case-article h4 {
  margin: 0.8rem 0 0;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.25;
}

.case-article h2 {
  font-size: 1.75rem;
}

.case-article h3 {
  font-size: 1.35rem;
}

.case-article h4 {
  font-size: 1.12rem;
}

.case-article ul,
.case-article ol {
  margin: 0;
  padding-left: 1.35rem;
}

.case-article li + li {
  margin-top: 0.35rem;
}

.case-article blockquote {
  margin: 0;
  padding: 0.15rem 0 0.15rem 1rem;
  color: rgb(0 0 0 / 0.62);
  border-left: 3px solid rgb(0 0 0 / 0.16);
}

.case-article code {
  padding: 0.08rem 0.3rem;
  background: rgb(0 0 0 / 0.06);
  border-radius: 0.25rem;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.92em;
}

.case-article img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 0.8rem;
}

.about-content {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 44px;
  align-items: start;
  padding: 2rem 48px 3rem;
}

.about-photo-wrap {
  display: flex;
  justify-content: flex-start;
  padding-top: 0.1rem;
}

.about-photo {
  width: 112px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 0.4rem 1rem rgb(0 0 0 / 0.12);
}

.about-copy {
  max-width: none;
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.55;
}

.about-copy p {
  margin: 0 0 1.1rem;
}

.contact-lines {
  margin-top: 1.35rem;
}

.contact-lines p {
  margin-bottom: 0.36rem;
}

.about-copy a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.14em;
}

.blink-caret {
  animation: blink-caret 0.75s steps(1, end) infinite;
}

@keyframes blink-caret {
  50% {
    opacity: 0;
  }
}

@media (max-width: 820px) {
  body {
    overflow: auto;
  }

  .desktop {
    min-height: 100svh;
    padding: 10svh 6vw 14svh;
  }

  .icon-grid {
    grid-template-columns: repeat(2, minmax(118px, 1fr));
    row-gap: 2.2rem;
    width: min(430px, 90vw);
    transform: translateY(0);
  }

  .desktop-icon {
    --icon-size: clamp(118px, 35vw, 172px);
  }

  .about-window {
    width: min(92vw, 620px);
    min-height: auto;
    max-height: 82svh;
    overflow: auto;
    border-radius: 1.35rem;
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 1.35rem;
    padding: 1.1rem 32px 2.6rem;
  }

  .about-photo-wrap {
    justify-content: flex-start;
  }

  .about-photo {
    width: 88px;
  }

  .about-copy {
    font-size: 18px;
  }

  .experience-window,
  .case-window {
    width: min(92vw, 680px);
    height: auto;
    max-width: 92vw;
    max-height: 82svh;
    border-radius: 1.35rem;
  }

  .case-window {
    transform: translate(0.75rem, 0.75rem);
  }

  .experience-list,
  .case-body {
    height: auto;
    min-height: 0;
    max-height: calc(82svh - 4.6rem);
    padding: 1rem 1.35rem 2.2rem;
  }

  .experience-item {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding: 1.55rem 0;
  }

  .experience-thumb {
    min-height: 210px;
  }

  .experience-text h2 {
    font-size: 1.55rem;
  }

  .experience-text p,
  .case-article,
  #case-summary {
    font-size: 1rem;
  }

  .case-hero {
    min-height: 0;
  }

  .case-body h2 {
    font-size: 1.8rem;
  }
}

@media (max-width: 460px) {
  .icon-grid {
    column-gap: 0.8rem;
    row-gap: 1.8rem;
  }

  .icon-label {
    max-width: 42vw;
    font-size: 0.8rem;
  }

  .desktop-footer {
    flex-wrap: wrap;
    gap: 0.42rem 0.75rem;
    padding: 0 1.5rem;
    font-size: 0.78rem;
  }

  .window-titlebar {
    min-height: 3.55rem;
    padding: 1.05rem 1.1rem 0.45rem;
  }

  .about-content {
    padding: 1rem 1.1rem 2rem;
  }

  .about-copy {
    font-size: 16px;
  }

  .experience-overlay,
  .case-overlay {
    padding: 0.8rem;
  }

  .experience-list,
  .case-body {
    padding: 0.9rem 1rem 1.8rem;
  }

  .experience-thumb {
    min-height: 170px;
    border-radius: 1rem;
  }

  .experience-text dl,
  .case-meta {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .case-hero {
    min-height: 0;
    border-radius: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .desktop-video {
    animation-play-state: paused;
  }

  .desktop-icon {
    transition: none;
  }

  .blink-caret {
    animation: none;
  }
}
