:root {
  --bg: #f6f6f6;
  --panel: #ffffff;
  --text: #111111;
  --muted: #5b5b5b;
  --line: #e9e9e9;
  --line-strong: #d8d8d8;
  --accent: #000000;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  scroll-behavior: smooth;
}

a {
  color: inherit;
}

.float-module {
  --lift: 0px;
  --gx: 0px;
  --gy: 0px;
  --rx: 0deg;
  --ry: 0deg;
  --tilt-shadow-x: 0px;
  --tilt-shadow-y: 34px;
  transition:
    transform 360ms cubic-bezier(.16, 1, .3, 1),
    box-shadow 520ms cubic-bezier(.16, 1, .3, 1),
    border-color 360ms ease,
    background-color 360ms ease;
  transform: perspective(720px) translate3d(var(--gx), calc(var(--gy) + var(--lift)), 0) rotateX(var(--rx)) rotateY(var(--ry)) scale(var(--scale, 1));
  transform-style: preserve-3d;
  transform-origin: center center;
  backface-visibility: hidden;
  will-change: transform;
  position: relative;
}

.float-module:hover,
.float-module:focus-within {
  --lift: -16px;
  --scale: 1.045;
  border-color: #111 !important;
  box-shadow:
    0 var(--tilt-shadow-y) 72px rgba(0, 0, 0, 0.15),
    var(--tilt-shadow-x) 18px 34px rgba(0, 0, 0, 0.08);
}

.float-module::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    420px circle at var(--mx, 50%) var(--my, 50%),
    rgba(0, 0, 0, 0.105),
    transparent 62%
  );
  transition: opacity 360ms ease;
}

.float-module:hover::after {
  opacity: 1;
}

.cursor-ring {
  position: fixed;
  left: 0;
  top: 0;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(0, 0, 0, 0.32);
  border-radius: 50%;
  pointer-events: none;
  z-index: 200;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 220ms ease, width 260ms cubic-bezier(.16, 1, .3, 1), height 260ms cubic-bezier(.16, 1, .3, 1), border-color 220ms ease;
  mix-blend-mode: multiply;
}

.cursor-ring.active {
  opacity: 1;
}

.cursor-ring.tight {
  width: 48px;
  height: 48px;
  border-color: rgba(0, 0, 0, 0.22);
}

.scroll-progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 2px;
  transform-origin: left center;
  transform: scaleX(0);
  background: #111;
}

.top-nav {
  position: sticky;
  top: 0;
  z-index: 90;
  height: 64px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 0 26px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 88%, white 12%);
  backdrop-filter: blur(8px);
}

.nav-left {
  display: flex;
  align-items: center;
}

.logo {
  letter-spacing: 1px;
  font-weight: 800;
  font-size: 30px;
}

.nav-center {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.nav-link {
  text-decoration: none;
  font-size: 14px;
  line-height: 1;
  padding: 9px 15px;
  border-radius: 10px;
  transition: background-color 180ms ease;
}

.nav-link.active,
.nav-link:hover {
  background: #ececec;
}

.nav-right {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 12px;
}

.location {
  font-size: 14px;
  color: #666;
}

.lang-toggle {
  border: 1px solid #d8d8d8;
  border-radius: 999px;
  background: #fff;
  padding: 2px;
  display: flex;
  align-items: center;
  gap: 2px;
  cursor: pointer;
}

.lang-pill {
  font-size: 12px;
  border-radius: 999px;
  padding: 6px 10px;
  color: #666;
}

.lang-pill.active {
  background: #000;
  color: #fff;
}

.dotted-bg {
  background-image: radial-gradient(circle at 1px 1px, #d8d8d8 1.1px, transparent 0);
  background-size: 34px 34px;
}

.striped-bg {
  background-image: repeating-linear-gradient(
    -45deg,
    #fbfbfb,
    #fbfbfb 10px,
    #f7f7f7 10px,
    #f7f7f7 20px
  );
}

.hero {
  position: relative;
  min-height: calc(100vh - 64px);
  display: grid;
  place-items: center;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.hero-content {
  --hero-rx: 0deg;
  --hero-ry: 0deg;
  --hero-gx: 0px;
  --hero-gy: 0px;
  width: min(980px, 92vw);
  text-align: center;
  margin-top: -32px;
  position: relative;
  z-index: 2;
  transform: perspective(900px) translate3d(var(--hero-gx), var(--hero-gy), 0) rotateX(var(--hero-rx)) rotateY(var(--hero-ry));
  transform-style: preserve-3d;
  transform-origin: center center;
  will-change: transform;
}

.hero-content-en {
  color: #111;
}

.hero-content-zh {
  color: #fff;
}

.hero-content-zh h1,
.hero-content-zh .hero-prefix,
.hero-content-zh .hero-name,
.hero-content-zh .hero-meta {
  color: #fff !important;
}

.hero-content-zh .hero-meta {
  color: #f0f0f0;
  text-align: center;
}

.hero-translate-proxy {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 1;
}

.hero h1 {
  margin: 0;
  font-size: clamp(54px, 10vw, 132px);
  line-height: 0.94;
  white-space: nowrap;
}

.hero-prefix {
  display: inline-block;
  font-weight: 820;
  letter-spacing: -1px;
  transform: skewX(-7deg);
  text-align: center;
}

.hero-name {
  display: inline-block;
  font-weight: 400;
  font-style: italic;
  margin-left: 8px;
  text-align: center;
}

.hero-meta {
  margin: 20px 0 0;
  font-size: clamp(20px, 2vw, 34px);
  color: #444;
  white-space: nowrap;
}

.hero-hint {
  position: absolute;
  bottom: 42px;
  left: 50%;
  transform: translateX(-50%);
  color: #888;
  font-size: 13px;
  white-space: nowrap;
  z-index: 4;
}

.agent-orb {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(28vw, 250px);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #000;
  overflow: hidden;
  pointer-events: none;
  transform: translate(-50%, -50%);
  opacity: 0;
  z-index: 5;
}

.orb-lens {
  position: absolute;
  left: 0;
  top: 0;
  will-change: transform;
}

.section {
  width: min(1000px, 92vw);
  margin: 0 auto;
  padding: 72px 0;
  position: relative;
}

.section-title-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.section-title-row h2 {
  margin: 0;
  font-size: clamp(36px, 5vw, 64px);
  letter-spacing: -0.5px;
  position: relative;
}

.section-title-row h2::after {
  content: "";
  display: block;
  width: 52px;
  height: 3px;
  background: #111;
  margin-top: 12px;
}

.section-title-row p {
  margin: 0;
  max-width: 520px;
  text-align: right;
  color: var(--muted);
  line-height: 1.8;
}

.skills-wrap {
  display: grid;
  gap: 16px;
}

.skill-group {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
}

.skill-group header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}

.group-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #111;
  color: #fff;
  font-weight: 700;
}

.skill-group h3 {
  margin: 0;
  font-size: 31px;
}

.skill-group header p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.skill-group ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.skill-group li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 8px;
  border-radius: 12px;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.skill-group li + li {
  margin-top: 8px;
}

.skill-group li:nth-child(odd) {
  background: #f5f5f5;
}

.skill-group li:hover,
.skill-group li.active {
  background: #111;
  color: #fff;
  transform: translateX(8px);
}

.skill-group b {
  font-size: 13px;
  padding: 4px 10px;
  background: #111;
  color: #fff;
  border-radius: 999px;
}

.skill-group li:hover b,
.skill-group li.active b {
  background: #fff;
  color: #111;
}

.stats {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.stats div {
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px 18px;
}

.stats strong {
  display: block;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1;
}

.stats span {
  color: var(--muted);
  font-size: 14px;
}

.skill-inspector {
  margin-top: 16px;
  padding: 22px 24px;
  background: #111;
  color: #fff;
  border-radius: 8px;
}

.skill-inspector span {
  display: block;
  color: #a7a7a7;
  font-size: 13px;
  margin-bottom: 8px;
}

.skill-inspector h3 {
  margin: 0;
  font-size: clamp(24px, 3vw, 38px);
}

.skill-inspector p {
  margin: 10px 0 0;
  color: #d8d8d8;
  line-height: 1.7;
}

.project-list {
  display: grid;
  gap: 16px;
}

.project-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 30px 30px 26px;
}

.project-card h3 {
  margin: 0;
  font-size: clamp(28px, 4.2vw, 44px);
}

.tags {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tags span {
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 12px;
  background: #f0f0f0;
}

.project-card p {
  margin: 16px 0;
  color: var(--muted);
  line-height: 1.8;
}

.project-card time {
  color: #868686;
  font-weight: 600;
}

.project-card em {
  position: absolute;
  right: 26px;
  top: 20px;
  font-style: normal;
  font-size: clamp(46px, 8vw, 84px);
  font-weight: 800;
  color: #f1f1f1;
  pointer-events: none;
}

.project-detail {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 260ms ease, opacity 220ms ease, margin 220ms ease;
  margin-top: 0;
  overflow: hidden;
}

.project-detail > * {
  min-height: 0;
}

.project-detail strong {
  display: block;
  margin-bottom: 8px;
}

.project-detail ul {
  margin: 0;
  padding-left: 18px;
  color: #555;
  line-height: 1.8;
}

.project-card.expanded .project-detail {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-top: 12px;
}

.project-toggle,
.service-pick {
  margin-top: 16px;
  border: 1px solid #111;
  background: #fff;
  color: #111;
  border-radius: 999px;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 700;
  transition: background-color 180ms ease, color 180ms ease;
}

.project-toggle:hover,
.service-pick:hover,
.collab-card.selected .service-pick {
  background: #111;
  color: #fff;
}

.collab-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.collab-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  cursor: pointer;
}

.collab-card:hover,
.collab-card.selected {
  border-color: #111;
}

.collab-card.selected .card-icon {
  outline: 3px solid #e6e6e6;
}

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 24px;
  background: #111;
}

.collab-card h3 {
  margin: 14px 0 10px;
  font-size: 29px;
}

.collab-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.contact {
  padding-bottom: 110px;
}

.contact-intro {
  margin: 0;
  color: var(--muted);
  font-size: 31px;
  line-height: 1.6;
}

.contact-meta {
  margin: 24px 0 0;
  padding-left: 20px;
  display: grid;
  gap: 10px;
  font-size: 29px;
}

.contact-tags {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.contact-tags span {
  padding: 8px 14px;
  background: #f2f2f2;
  border-radius: 12px;
  font-weight: 600;
}

.contact-form {
  margin-top: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 26px 26px 28px;
}

.contact-form label {
  display: block;
}

.contact-form label + label {
  margin-top: 14px;
}

.contact-form span {
  display: block;
  font-size: 14px;
  color: #666;
  margin-bottom: 8px;
}

.contact-form input {
  width: 100%;
  border: 0;
  border-bottom: 2px solid #dadada;
  font-size: 20px;
  line-height: 40px;
  outline: none;
  background: transparent;
}

.contact-form input:focus {
  border-bottom-color: #111;
}

.send-btn {
  margin-top: 20px;
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 16px 20px;
  font-size: 18px;
  background: #111;
  color: #fff;
  cursor: pointer;
}

.send-btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.form-feedback {
  min-height: 24px;
  margin: 12px 0 0;
  color: #555;
  font-weight: 700;
}

.form-feedback.error {
  color: #b42318;
}

.form-feedback.ok {
  color: #111;
}

.decor {
  position: absolute;
  pointer-events: none;
  opacity: 0.08;
  border: 2px solid #111;
}

.deco-circle {
  width: 250px;
  height: 250px;
  border-radius: 50%;
  right: -80px;
  top: 120px;
}

.deco-triangle {
  width: 160px;
  height: 160px;
  border: 0;
  clip-path: polygon(50% 0, 0 100%, 100% 100%);
  background: #111;
  left: -30px;
  bottom: 80px;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 500ms ease, transform 500ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1080px) {
  .logo {
    font-size: 24px;
  }

  .hero-meta {
    font-size: clamp(18px, 2.6vw, 28px);
  }

  .skill-group h3 {
    font-size: 24px;
  }

  .contact-intro {
    font-size: 24px;
  }

  .contact-meta {
    font-size: 22px;
  }
}

@media (max-width: 840px) {
  .top-nav {
    grid-template-columns: 1fr;
    height: auto;
    padding: 12px 16px;
    gap: 10px;
  }

  .nav-left,
  .nav-right {
    justify-content: center;
  }

  .nav-center {
    order: 3;
    flex-wrap: wrap;
  }

  .section {
    padding: 56px 0;
  }

  .section-title-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .section-title-row p {
    text-align: left;
  }

  .stats {
    grid-template-columns: 1fr;
    gap: 18px;
  }

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

  .agent-orb {
    width: 150px;
    font-size: 12px;
    letter-spacing: 3px;
  }

  .hero-hint {
    font-size: 11px;
    text-align: center;
    width: calc(100vw - 20px);
  }
}
