/* =========================================================
   LIN YU — personal site
   A quiet, cinematic portfolio. Built to be edited in /admin.
   ========================================================= */

@font-face {
  font-family: "Cormorant Garamond";
  src: url("/assets/fonts/cormorant.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("/assets/fonts/cormorant-italic.woff2") format("woff2");
  font-weight: 300 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("/assets/fonts/manrope.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-display: "Cormorant Garamond", "Songti SC", "STSong", "Noto Serif SC", Georgia, serif;
  --font-body: "Manrope", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif;
  --bg: #0b0c0e;
  --bg-soft: #111316;
  --ink: #f2ede4;
  --ink-soft: #c3bdb2;
  --ink-mute: #88847c;
  --line: rgba(242, 237, 228, 0.13);
  --line-strong: rgba(242, 237, 228, 0.26);
  --accent: #c9aa7c;
  --accent-rgb: 201, 170, 124;
  --overlay: 0.56;
  --radius: 18px;
  --page: min(1240px, calc(100vw - 96px));
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.75;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.is-locked {
  overflow: hidden;
}

::selection {
  background: rgba(var(--accent-rgb), 0.35);
  color: #fff;
}

::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: #0b0c0e;
}
::-webkit-scrollbar-thumb {
  border: 3px solid #0b0c0e;
  border-radius: 10px;
  background: #34332f;
}

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

button,
input,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  transform: translateY(-160%);
  transition: transform 0.25s;
}
.skip-link:focus {
  transform: translateY(0);
}

/* ---------- ambient background ---------- */
.ambient {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background: var(--bg);
  pointer-events: none;
}

.ambient__layer {
  position: absolute;
  inset: -3%;
  z-index: 1;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0;
  filter: brightness(0.82) saturate(0.9);
  transform: scale(1.045);
  transition: opacity 1.8s var(--ease-soft), transform 9s linear;
  will-change: opacity, transform;
}
.ambient__layer.is-active {
  opacity: 1;
  transform: scale(1);
}

.ambient__shade {
  position: absolute;
  inset: 0;
  z-index: 5;
  background:
    linear-gradient(180deg, rgba(5, 6, 7, 0.5) 0%, rgba(5, 6, 7, 0.08) 34%, rgba(5, 6, 7, 0.58) 76%, #0b0c0e 100%),
    radial-gradient(ellipse at 50% 42%, transparent 0%, rgba(5, 6, 7, 0.4) 80%);
}
.ambient__shade::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(5, 6, 7, var(--overlay));
}

.ambient__glow {
  position: absolute;
  inset: 0;
  z-index: 6;
  background: radial-gradient(circle at 50% 35%, rgba(var(--accent-rgb), 0.1), transparent 42%);
  mix-blend-mode: screen;
}

.ambient__grain {
  position: absolute;
  inset: 0;
  z-index: 7;
  background-image: url("/assets/img/noise.png");
  background-size: 180px 180px;
  opacity: 0.055;
  mix-blend-mode: overlay;
}

/* ---------- top bar ---------- */
.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 92px;
  padding: 0 42px;
  transition: height 0.35s var(--ease), background 0.35s, border-color 0.35s, backdrop-filter 0.35s;
  border-bottom: 1px solid transparent;
}
.topbar.is-scrolled {
  height: 72px;
  border-bottom-color: var(--line);
  background: rgba(9, 10, 12, 0.68);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
  backdrop-filter: blur(18px) saturate(1.1);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: none;
}
.brand__mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(242, 237, 228, 0.35);
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: 0.02em;
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.brand:hover .brand__mark {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.brand__name {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.34em;
  color: var(--ink-soft);
}

.topnav {
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.35s, transform 0.35s var(--ease);
}
.topbar.is-scrolled .topnav {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.topnav a {
  position: relative;
  padding: 8px 14px;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--ink-soft);
  transition: color 0.25s;
}
.topnav a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 4px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.topnav a:hover,
.topnav a.is-active {
  color: var(--ink);
}
.topnav a:hover::after,
.topnav a.is-active::after {
  transform: scaleX(1);
}

.topbar__meta {
  display: flex;
  align-items: center;
  gap: 22px;
  flex: none;
}
.clock {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
}
.clock__dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.13);
}

.menu-btn {
  display: none;
  position: relative;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(10, 11, 13, 0.25);
  cursor: pointer;
}
.menu-btn span {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 1px;
  background: var(--ink);
  transition: transform 0.3s var(--ease), top 0.3s;
}
.menu-btn span:first-child {
  top: 18px;
}
.menu-btn span:last-child {
  top: 23px;
  width: 11px;
}

/* ---------- mobile menu ---------- */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  flex-direction: column;
  padding: 28px;
  background: rgba(9, 10, 12, 0.96);
  -webkit-backdrop-filter: blur(26px);
  backdrop-filter: blur(26px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px);
  transition: opacity 0.35s, visibility 0.35s, transform 0.45s var(--ease);
}
.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.mobile-menu__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mobile-menu__label {
  font-size: 9px;
  letter-spacing: 0.3em;
  color: var(--ink-mute);
}
.mobile-menu__close {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 16px;
  background: none;
  color: var(--ink-soft);
  font-size: 11px;
  cursor: pointer;
}
.mobile-menu__nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 30px 0;
}
.mobile-menu__nav a {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 8px 0;
  font-family: var(--font-display);
  font-size: clamp(44px, 12vw, 72px);
  line-height: 1.1;
  border-bottom: 1px solid var(--line);
}
.mobile-menu__nav a small {
  font-family: var(--font-body);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--accent);
}
.mobile-menu__foot p {
  margin: 0 0 14px;
  color: var(--ink-mute);
  font-size: 12px;
}
.mobile-menu__socials {
  display: flex;
  gap: 8px;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  display: grid;
  min-height: 100svh;
  padding: 122px 80px 104px;
  place-items: center;
  isolation: isolate;
}

.hero__inner {
  position: relative;
  z-index: 2;
  display: flex;
  width: min(860px, 100%);
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: hero-in 1.2s var(--ease) both;
}
@keyframes hero-in {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.hero__rail {
  position: absolute;
  top: 50%;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 8px;
  letter-spacing: 0.32em;
  color: rgba(242, 237, 228, 0.38);
  writing-mode: vertical-rl;
  transform: translateY(-50%);
}
.hero__rail--left {
  left: 44px;
}
.hero__rail--right {
  right: 44px;
}
.hero__rail-line {
  display: block;
  width: 1px;
  height: 52px;
  background: linear-gradient(180deg, transparent, rgba(242, 237, 228, 0.38), transparent);
}

.avatar {
  position: relative;
  display: block;
  width: 152px;
  height: 152px;
  margin-bottom: 28px;
  border-radius: 50%;
  transition: transform 0.6s var(--ease);
}
.avatar:hover {
  transform: scale(1.035);
}
.avatar__halo {
  position: absolute;
  inset: -18px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.23), transparent 68%);
  filter: blur(8px);
  animation: halo 6s ease-in-out infinite;
}
@keyframes halo {
  0%,
  100% {
    opacity: 0.6;
    transform: scale(0.96);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
}
.avatar__ring {
  position: absolute;
  inset: -13px;
  border: 1px solid rgba(242, 237, 228, 0.24);
  border-radius: 50%;
  border-top-color: rgba(var(--accent-rgb), 0.9);
  transform: rotate(-20deg);
  transition: transform 0.8s var(--ease);
}
.avatar:hover .avatar__ring {
  transform: rotate(40deg);
}
.avatar img {
  position: relative;
  width: 100%;
  height: 100%;
  border: 4px solid rgba(242, 237, 228, 0.12);
  border-radius: 50%;
  background: #d8cdb8;
  object-fit: cover;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
}
.avatar__badge {
  position: absolute;
  right: 6px;
  bottom: 9px;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 3px solid #17181a;
  border-radius: 50%;
  background: #82a886;
}
.avatar__badge i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
}
.hero__eyebrow {
  justify-content: center;
  margin-bottom: 16px;
  color: var(--ink-soft);
  font-size: 9px;
  letter-spacing: 0.32em;
}
.eyebrow__line {
  width: 28px;
  height: 1px;
  background: rgba(var(--accent-rgb), 0.6);
}

.hero__name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 0.9;
}
.hero__name-cn {
  display: block;
  font-size: clamp(72px, 9.4vw, 122px);
  letter-spacing: 0.08em;
  padding-left: 0.08em;
  text-shadow: 0 18px 70px rgba(0, 0, 0, 0.26);
}
.hero__name-en {
  display: block;
  margin-top: 17px;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.62em;
  padding-left: 0.62em;
  color: var(--ink-soft);
}

.hero__tagline {
  max-width: 560px;
  margin: 27px auto 0;
  font-size: 14px;
  letter-spacing: 0.15em;
  color: var(--ink-soft);
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
}

.hero__quote {
  position: relative;
  max-width: 520px;
  margin: 34px auto 0;
  padding: 20px 28px 0;
  border-top: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: 20px;
  font-style: italic;
  line-height: 1.5;
  color: rgba(242, 237, 228, 0.84);
}
.hero__quote::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 50%;
  width: 7px;
  height: 7px;
  border: 1px solid var(--accent);
  background: #0c0d0f;
  transform: translateX(-50%) rotate(45deg);
}
.hero__quote p {
  margin: 0;
}
.hero__quote cite {
  display: block;
  margin-top: 7px;
  font-family: var(--font-body);
  font-size: 9px;
  font-style: normal;
  letter-spacing: 0.28em;
  color: var(--ink-mute);
}

.hero__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 33px;
}
.hero__nav a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 7px 22px;
  border: 1px solid rgba(242, 237, 228, 0.3);
  border-radius: 999px;
  background: rgba(10, 11, 13, 0.16);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
  transition: color 0.3s, border-color 0.3s, background 0.3s, transform 0.3s var(--ease);
}
.hero__nav a:hover,
.hero__nav a.is-active {
  color: #fff;
  border-color: rgba(242, 237, 228, 0.65);
  background: rgba(242, 237, 228, 0.09);
  transform: translateY(-2px);
}

.hero__socials {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 28px;
}
.social-link {
  position: relative;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: rgba(242, 237, 228, 0.62);
  transition: color 0.25s, transform 0.3s var(--ease);
}
.social-link::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  transition: border-color 0.25s, transform 0.3s;
}
.social-link:hover {
  color: var(--ink);
  transform: translateY(-3px);
}
.social-link:hover::after {
  border-color: var(--line);
}
.social-link svg {
  width: 17px;
  height: 17px;
}
.social-link--lg {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
}
.social-link--lg svg {
  width: 18px;
  height: 18px;
}

.hero__foot {
  position: absolute;
  inset: auto 42px 34px;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 20px;
}

.status-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  justify-self: start;
  padding: 9px 14px 9px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(12, 13, 15, 0.48);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.3s, background 0.3s;
}
.status-chip:hover {
  border-color: rgba(var(--accent-rgb), 0.55);
  background: rgba(20, 21, 23, 0.7);
}
.status-chip__icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--accent);
}
.status-chip__icon svg {
  width: 14px;
  height: 14px;
}
.status-chip__text {
  display: flex;
  flex-direction: column;
  line-height: 1.35;
}
.status-chip__text > span {
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--ink);
}
.status-chip__text small {
  font-size: 8px;
  letter-spacing: 0.1em;
  color: var(--ink-mute);
}
.status-chip__pulse {
  width: 5px;
  height: 5px;
  margin: 0 2px 0 3px;
  border-radius: 50%;
  background: #8db38f;
  box-shadow: 0 0 0 0 rgba(141, 179, 143, 0.5);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(141, 179, 143, 0.45);
  }
  70% {
    box-shadow: 0 0 0 7px rgba(141, 179, 143, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(141, 179, 143, 0);
  }
}

.scroll-cue {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  justify-self: center;
  font-size: 8px;
  letter-spacing: 0.28em;
  color: var(--ink-mute);
  transition: color 0.3s;
}
.scroll-cue:hover {
  color: var(--ink-soft);
}
.scroll-cue i {
  position: relative;
  width: 1px;
  height: 34px;
  overflow: hidden;
  background: var(--line);
}
.scroll-cue i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  animation: scroll-line 2.4s var(--ease-soft) infinite;
}
@keyframes scroll-line {
  0% {
    transform: translateY(-100%);
  }
  55%,
  100% {
    transform: translateY(100%);
  }
}

.hero__coords {
  justify-self: end;
  margin: 0 0 5px;
  font-size: 8px;
  letter-spacing: 0.2em;
  color: rgba(242, 237, 228, 0.45);
  font-variant-numeric: tabular-nums;
}

/* ---------- shared section language ---------- */
.section {
  position: relative;
  width: var(--page);
  margin: 0 auto;
  padding: 130px 0;
  border-top: 1px solid var(--line);
}

.section__head {
  margin-bottom: 62px;
}
.section__head--row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 60px;
}
.section__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(44px, 6vw, 76px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: 0.01em;
  white-space: pre-line;
}
.section__title--sm {
  font-size: clamp(38px, 4.6vw, 58px);
}
.section__sub {
  max-width: 360px;
  margin: 0 0 6px;
  font-size: 12px;
  line-height: 1.9;
  letter-spacing: 0.05em;
  color: var(--ink-mute);
}
.section__sub--right {
  text-align: right;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- about ---------- */
.about {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(320px, 0.72fr);
  gap: clamp(50px, 8vw, 112px);
  align-items: start;
}
.about__lead {
  max-width: 610px;
  margin: 0 0 27px;
  font-family: var(--font-display);
  font-size: clamp(24px, 2.4vw, 31px);
  font-weight: 400;
  line-height: 1.48;
  color: var(--ink);
}
.about__body {
  max-width: 570px;
}
.about__body p {
  margin: 0 0 18px;
  font-size: 13.5px;
  line-height: 2;
  color: var(--ink-soft);
}
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
}
.tag-row li {
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
}
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 34px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(var(--accent-rgb), 0.55);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--accent);
}
.text-link span {
  transition: transform 0.3s var(--ease);
}
.text-link:hover span {
  transform: translate(3px, -3px);
}

.about__figure {
  position: relative;
  min-height: 520px;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #1a1a18;
  isolation: isolate;
}
.about__figure-img {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  filter: saturate(0.72) contrast(1.02);
  transform: scale(1.03);
  transition: transform 1.2s var(--ease);
}
.about__figure.is-empty .about__figure-img {
  background:
    radial-gradient(circle at 70% 20%, rgba(var(--accent-rgb), 0.45), transparent 40%),
    linear-gradient(150deg, #2a2925, #121316 70%);
}
.about__figure:hover .about__figure-img {
  transform: scale(1.08);
}
.about__figure-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 9, 10, 0.05) 20%, rgba(8, 9, 10, 0.82) 100%);
}
.about__figure figcaption {
  position: absolute;
  inset: auto 26px 25px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.about__figure-quote {
  font-family: var(--font-display);
  font-size: 31px;
  font-style: italic;
  line-height: 1.2;
}
.about__figure-caption {
  font-size: 8px;
  letter-spacing: 0.18em;
  color: rgba(242, 237, 228, 0.52);
}
.about__figure-mark {
  position: absolute;
  top: 20px;
  right: 22px;
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.06em;
  color: rgba(242, 237, 228, 0.64);
  writing-mode: vertical-rl;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 82px 0 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stats > div {
  padding: 28px 24px 26px;
  border-left: 1px solid var(--line);
}
.stats > div:first-child {
  border-left: 0;
  padding-left: 0;
}
.stats dt {
  font-family: var(--font-display);
  font-size: clamp(38px, 4vw, 58px);
  font-weight: 400;
  line-height: 1;
  color: var(--ink);
}
.stats dd {
  margin: 10px 0 0;
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--ink-mute);
}

/* ---------- skills ---------- */
.section--skills {
  padding-top: 110px;
  padding-bottom: 110px;
}
.skill-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}
.skill-card {
  position: relative;
  min-height: 250px;
  padding: 30px 30px 26px;
  background: rgba(16, 18, 21, 0.78);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.skill-card__num {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--accent);
}
.skill-card h3 {
  margin: 34px 0 20px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
}
.skill-card ul {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}
.skill-card li {
  padding: 8px 0;
  border-top: 1px solid rgba(242, 237, 228, 0.08);
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--ink-soft);
}

/* ---------- work ---------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}
.work-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 17, 20, 0.62);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: border-color 0.4s, transform 0.5s var(--ease), background 0.4s;
}
.work-card:hover {
  border-color: rgba(var(--accent-rgb), 0.42);
  transform: translateY(-5px);
  background: rgba(19, 21, 25, 0.8);
}
.work-card:first-child,
.work-card:last-child:nth-child(even) {
  grid-column: span 2;
}
.work-card__link {
  display: flex;
  flex: 1;
  flex-direction: column;
}
.work-media {
  position: relative;
  display: block;
  aspect-ratio: 1.42 / 1;
  overflow: hidden;
  background:
    radial-gradient(circle at 76% 22%, color-mix(in srgb, var(--card-color) 58%, transparent), transparent 36%),
    linear-gradient(140deg, color-mix(in srgb, var(--card-color) 60%, #111 40%), #121316 72%);
}
.work-card:first-child .work-media,
.work-card:last-child:nth-child(even) .work-media {
  aspect-ratio: 2.42 / 1;
}
.work-media__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
  filter: brightness(0.8) saturate(0.85);
  transition: transform 1s var(--ease), opacity 0.5s;
}
.work-card:hover .work-media__img {
  transform: scale(1.04);
  opacity: 0.86;
}
.work-media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    repeating-linear-gradient(120deg, transparent 0 38px, rgba(242, 237, 228, 0.05) 38px 39px),
    linear-gradient(180deg, rgba(10, 11, 12, 0.34) 0%, rgba(10, 11, 12, 0.16) 42%, rgba(10, 11, 12, 0.78) 100%);
  pointer-events: none;
}
.work-media__index {
  position: absolute;
  left: 26px;
  top: 24px;
  z-index: 2;
  font-size: 9px;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.62);
}
.work-media__monogram {
  position: absolute;
  right: 28px;
  bottom: 18px;
  z-index: 1;
  font-family: var(--font-display);
  font-size: clamp(92px, 12vw, 180px);
  line-height: 0.8;
  color: rgba(242, 237, 228, 0.13);
  transition: transform 0.9s var(--ease), color 0.5s;
}
.work-card:hover .work-media__monogram {
  transform: translateY(-8px);
  color: rgba(242, 237, 228, 0.2);
}
.work-media__img ~ .work-media__monogram {
  color: rgba(242, 237, 228, 0.09);
}
.work-media__tag {
  position: absolute;
  left: 24px;
  bottom: 22px;
  z-index: 2;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(10, 11, 12, 0.25);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-size: 8px;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.8);
}
.work-media__arrow {
  position: absolute;
  right: 22px;
  top: 22px;
  z-index: 2;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 50%;
  color: #fff;
  transition: background 0.3s, color 0.3s, transform 0.4s var(--ease);
}
.work-card:hover .work-media__arrow {
  background: var(--ink);
  color: #111;
  transform: rotate(45deg);
}
.work-media__arrow svg {
  width: 13px;
  height: 13px;
}
.work-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 24px 26px 26px;
}
.work-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 8px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.work-meta__year {
  color: var(--accent);
}
.work-card h3 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 37px);
  font-weight: 500;
  line-height: 1.12;
  color: var(--ink);
}
.work-desc {
  max-width: 540px;
  margin: 0;
  font-size: 12px;
  line-height: 1.85;
  color: var(--ink-soft);
}
.work-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 20px;
}
.work-tags span {
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 8px;
  letter-spacing: 0.08em;
  color: var(--ink-mute);
}
.work-card--featured .work-media__index::after {
  content: "FEATURED";
  margin-left: 12px;
  padding: 3px 7px;
  border: 1px solid rgba(var(--accent-rgb), 0.5);
  border-radius: 999px;
  color: var(--accent);
  font-size: 7px;
  letter-spacing: 0.1em;
}

/* ---------- journey ---------- */
.section--journey {
  display: grid;
  grid-template-columns: minmax(250px, 0.62fr) minmax(0, 1.38fr);
  gap: clamp(50px, 8vw, 110px);
  align-items: start;
}
.journey__aside {
  position: sticky;
  top: 120px;
}
.journey__aside .section__sub {
  margin-top: 24px;
}
.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}
.timeline__item {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 30px;
  padding: 27px 0 30px;
  border-top: 1px solid var(--line);
}
.timeline__item:first-child {
  padding-top: 0;
  border-top: 0;
}
.timeline__period {
  padding-top: 4px;
  font-size: 9px;
  letter-spacing: 0.13em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.timeline__role {
  margin: 0 0 5px;
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 500;
  line-height: 1.2;
}
.timeline__company {
  margin: 0 0 12px;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--ink-mute);
}
.timeline__desc {
  max-width: 590px;
  margin: 0;
  font-size: 12px;
  line-height: 1.9;
  color: var(--ink-soft);
}
.timeline__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 13px;
}
.timeline__tags span {
  font-size: 8px;
  letter-spacing: 0.08em;
  color: var(--ink-mute);
}
.timeline__tags span + span::before {
  content: "·";
  margin-right: 6px;
  color: var(--accent);
}

/* ---------- contact ---------- */
.section--contact {
  padding-bottom: 0;
  overflow: hidden;
}
.contact__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}
.contact__top .eyebrow {
  margin-bottom: 0;
}
.contact__note {
  margin: 0;
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--ink-mute);
}
.contact__main {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(280px, 0.68fr);
  gap: clamp(40px, 8vw, 110px);
  align-items: end;
  padding: 70px 0 90px;
}
.contact__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(56px, 8.2vw, 116px);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: 0.005em;
  white-space: pre-line;
}
.contact__text {
  margin: 0 0 27px;
  font-size: 12.5px;
  line-height: 1.9;
  color: var(--ink-soft);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-width: 218px;
  padding: 15px 20px 15px 23px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.12em;
  transition: background 0.35s, color 0.35s, border-color 0.35s, transform 0.35s var(--ease);
}
.btn__arrow {
  font-size: 15px;
  transition: transform 0.35s var(--ease);
}
.btn:hover .btn__arrow {
  transform: translate(3px, -3px);
}
.btn--mail {
  background: var(--ink);
  color: #0d0e10;
}
.btn--mail:hover {
  background: var(--accent);
  transform: translateY(-2px);
}
.btn--ghost {
  width: 100%;
  margin-top: 25px;
  border-color: var(--line);
  color: var(--ink-soft);
}
.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--ink);
}
.contact__mail {
  margin: 14px 0 0;
  font-size: 10px;
  letter-spacing: 0.09em;
  color: var(--ink-mute);
}
.contact__mail a {
  border-bottom: 1px solid rgba(var(--accent-rgb), 0.35);
}

.contact__marquee {
  position: relative;
  width: calc(100% + 96px);
  margin-left: -48px;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 15px 0 12px;
}
.contact__marquee > div {
  width: max-content;
  font-family: var(--font-display);
  font-size: clamp(40px, 7vw, 92px);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(242, 237, 228, 0.21);
  white-space: nowrap;
  animation: marquee 34s linear infinite;
}
@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

/* ---------- footer ---------- */
.footer {
  width: var(--page);
  margin: 0 auto;
  padding: 55px 0 30px;
}
.footer__brand {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
}
.footer__mark {
  display: grid;
  width: 54px;
  height: 54px;
  flex: none;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 22px;
}
.footer__brand p {
  margin: 0;
  font-family: var(--font-display);
  font-size: 26px;
  font-style: italic;
  color: var(--ink-soft);
}
.footer__socials {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 25px 0;
}
.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--ink-mute);
}
.footer__bottom p {
  margin: 0;
}
.footer__bottom nav {
  display: flex;
  gap: 20px;
}
.footer__bottom a:hover {
  color: var(--ink);
}
.back-top {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-mute);
  font-size: 9px;
  letter-spacing: 0.08em;
  cursor: pointer;
}
.back-top:hover {
  color: var(--ink);
}

/* ---------- status dialog ---------- */
.status-dialog {
  width: min(430px, calc(100vw - 36px));
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: rgba(17, 19, 22, 0.94);
  color: var(--ink);
  -webkit-backdrop-filter: blur(30px);
  backdrop-filter: blur(30px);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.6);
}
.status-dialog::backdrop {
  background: rgba(3, 4, 5, 0.62);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
}
.status-dialog[open] {
  animation: dialog-in 0.4s var(--ease);
}
@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
}
.status-dialog__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 0;
}
.live-dot {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 8px;
  letter-spacing: 0.24em;
  color: var(--ink-mute);
}
.live-dot i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #8db38f;
}
.icon-btn {
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  background: none;
  color: var(--ink-mute);
  font-size: 11px;
  cursor: pointer;
}
.status-dialog__kicker {
  margin: 30px 26px 6px;
  font-size: 8px;
  letter-spacing: 0.24em;
  color: var(--accent);
}
.status-dialog h3 {
  margin: 0 26px;
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 500;
  line-height: 1.08;
}
.status-dialog > p:not(.status-dialog__kicker) {
  margin: 8px 26px 23px;
  font-size: 11px;
  color: var(--ink-mute);
}
.status-dialog__rows {
  margin: 0 26px;
  border-top: 1px solid var(--line);
}
.status-dialog__rows > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 10px;
}
.status-dialog__rows span {
  color: var(--ink-mute);
}
.status-dialog__rows strong,
.status-dialog__rows a {
  font-weight: 400;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.status-dialog .btn {
  width: auto;
  margin: 22px 26px 26px;
  justify-content: center;
}

/* ---------- 404 ---------- */
.not-found-page {
  display: grid;
  min-height: 100svh;
  padding: 40px;
  place-items: center;
  background:
    radial-gradient(circle at 78% 18%, rgba(var(--accent-rgb), 0.1), transparent 38%),
    #0b0c0e;
}
.nf {
  position: relative;
  width: min(760px, 100%);
  padding: 32px 0;
}
.nf__brand {
  margin-bottom: 100px;
}
.nf .eyebrow {
  margin-bottom: 22px;
}
.nf h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(50px, 8vw, 96px);
  font-weight: 500;
  line-height: 1.02;
}
.nf__text {
  max-width: 390px;
  margin: 28px 0 0;
  font-size: 12px;
  line-height: 2;
  color: var(--ink-mute);
}
.nf__actions {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 34px;
}
.nf__admin {
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--ink-mute);
  border-bottom: 1px solid var(--line);
}
.nf__admin:hover {
  color: var(--ink);
}
.nf__mark {
  position: absolute;
  right: -20px;
  bottom: 10px;
  z-index: -1;
  font-family: var(--font-display);
  font-size: clamp(150px, 28vw, 380px);
  line-height: 0.7;
  color: transparent;
  -webkit-text-stroke: 1px rgba(242, 237, 228, 0.06);
}
@media (max-width: 600px) {
  .not-found-page {
    padding: 24px;
  }
  .nf__brand {
    margin-bottom: 64px;
  }
  .nf__actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }
}

/* ---------- utilities ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.load-error {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 300;
  max-width: calc(100vw - 36px);
  padding: 11px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(18, 19, 21, 0.92);
  color: var(--ink-soft);
  font-size: 10px;
  transform: translateX(-50%);
}
.noscript {
  position: fixed;
  inset: auto 20px 20px;
  z-index: 999;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #111;
  color: #ddd;
  font-size: 12px;
}

/* Preview mode hides edit-only chrome */
html.is-preview .skip-link,
html.is-preview .topbar,
html.is-preview .hero__rail {
  display: none;
}
html.is-preview .hero {
  padding-top: 80px;
}

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .hero__rail {
    display: none;
  }
  .topnav {
    display: none;
  }
  .menu-btn {
    display: block;
  }
}

@media (max-width: 900px) {
  :root {
    --page: calc(100vw - 44px);
  }
  .topbar {
    height: 78px;
    padding: 0 22px;
  }
  .topbar.is-scrolled {
    height: 66px;
  }
  .clock {
    display: none;
  }
  .hero {
    min-height: 100svh;
    padding: 110px 24px 110px;
  }
  .hero__foot {
    inset: auto 22px 24px;
    grid-template-columns: 1fr auto;
  }
  .scroll-cue {
    display: none;
  }
  .hero__coords {
    grid-column: 2;
  }
  .section {
    padding: 92px 0;
  }
  .section__head {
    margin-bottom: 42px;
  }
  .section__head--row {
    display: block;
  }
  .section__sub {
    margin-top: 18px;
  }
  .about {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .about__figure {
    min-height: 480px;
  }
  .stats {
    margin-top: 55px;
  }
  .skill-grid {
    grid-template-columns: 1fr;
  }
  .skill-card {
    min-height: auto;
  }
  .work-grid {
    grid-template-columns: 1fr;
  }
  .work-card,
  .work-card:first-child,
  .work-card:last-child:nth-child(even) {
    grid-column: auto;
  }
  .work-card:first-child .work-media,
  .work-card:last-child:nth-child(even) .work-media,
  .work-media {
    aspect-ratio: 1.5 / 1;
  }
  .section--journey {
    grid-template-columns: 1fr;
    gap: 45px;
  }
  .journey__aside {
    position: static;
  }
  .contact__main {
    grid-template-columns: 1fr;
    gap: 45px;
    padding: 50px 0 70px;
  }
  .contact__top {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
  .contact__marquee {
    width: calc(100% + 44px);
    margin-left: -22px;
  }
  .footer__bottom {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 600px) {
  .brand__name {
    display: none;
  }
  .hero {
    padding-top: 96px;
  }
  .avatar {
    width: 120px;
    height: 120px;
    margin-bottom: 25px;
  }
  .hero__name-cn {
    font-size: clamp(58px, 19vw, 82px);
  }
  .hero__tagline {
    font-size: 12px;
    letter-spacing: 0.1em;
  }
  .hero__quote {
    padding: 17px 10px 0;
    font-size: 17px;
  }
  .hero__nav {
    gap: 6px;
  }
  .hero__nav a {
    min-height: 34px;
    padding: 6px 14px;
    font-size: 10px;
  }
  .hero__socials {
    margin-top: 22px;
  }
  .hero__foot {
    inset: auto 18px 18px;
  }
  .status-chip__text small {
    display: none;
  }
  .hero__coords {
    font-size: 7px;
  }
  .section__title {
    font-size: 42px;
  }
  .section__title--sm {
    font-size: 35px;
  }
  .about__lead {
    font-size: 22px;
  }
  .about__figure {
    min-height: 400px;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .stats > div {
    padding: 22px 16px;
  }
  .stats > div:nth-child(odd) {
    border-left: 0;
    padding-left: 0;
  }
  .stats > div:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
  .timeline__item {
    grid-template-columns: 1fr;
    gap: 9px;
    padding: 23px 0;
  }
  .timeline__period {
    padding-top: 0;
  }
  .contact__title {
    font-size: clamp(48px, 14vw, 66px);
  }
  .btn {
    width: 100%;
  }
  .footer {
    padding-top: 38px;
  }
  .footer__brand p {
    font-size: 21px;
  }
  .footer__socials {
    padding-bottom: 12px;
  }
  .footer__bottom nav {
    flex-wrap: wrap;
    gap: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
