:root {
  --bg: #0b1210;
  --bg-elev: #121a17;
  --ink: #f3f6f2;
  --muted: #9aaca2;
  --muted-2: #6d7f75;
  --line: rgba(243, 246, 242, 0.1);
  --teal: #3ecfad;
  --teal-deep: #1f8f78;
  --sand: #e4c48a;
  --coral: #ef8b6c;
  --sky: #7eb8d8;
  --film: #5ec8ff;
  --violet: #a78bf0;
  --font-display: "Noto Serif SC", "Songti SC", serif;
  --font-body: "Noto Sans SC", "PingFang SC", sans-serif;
  --max: 1100px;
  --radius: 20px;
  /* Kinetics：弹性曲线 */
  --ease-spring: cubic-bezier(0.34, 1.45, 0.64, 1);
  --ease-out-soft: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-press: cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
  z-index: 100;
  background: var(--bg-elev);
  padding: 8px 12px;
  border-radius: 8px;
}

.page-shell {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

/* ——— Stage atmosphere ——— */
.stage-atmosphere {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.stage-atmosphere__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  will-change: transform;
}

.stage-atmosphere__glow--teal {
  width: 540px;
  height: 540px;
  top: -140px;
  left: -100px;
  background: radial-gradient(circle, rgba(62, 207, 173, 0.5), transparent 68%);
  animation: glow-drift 16s var(--ease-out-soft) infinite alternate;
}

.stage-atmosphere__glow--sand {
  width: 460px;
  height: 460px;
  right: -120px;
  top: 16%;
  background: radial-gradient(circle, rgba(228, 196, 138, 0.3), transparent 70%);
  animation: glow-drift 20s var(--ease-out-soft) infinite alternate-reverse;
}

.stage-atmosphere__mesh {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(243, 246, 242, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(243, 246, 242, 0.028) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse at 48% 18%, black 8%, transparent 72%);
  animation: mesh-breathe 12s ease-in-out infinite alternate;
}

@keyframes glow-drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(36px, 28px, 0) scale(1.07);
  }
}

@keyframes mesh-breathe {
  from {
    opacity: 0.7;
  }
  to {
    opacity: 1;
  }
}

.site-masthead,
main,
.site-footer {
  position: relative;
  z-index: 1;
}

/* ——— Masthead ——— */
.site-masthead {
  position: sticky;
  top: 0;
  backdrop-filter: blur(16px);
  background: rgba(11, 18, 16, 0.7);
  border-bottom: 1px solid transparent;
  transition: border-color 0.35s var(--ease-out-soft), background 0.35s ease;
}

.site-masthead.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(11, 18, 16, 0.88);
}

.site-masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.wordmark-link {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  letter-spacing: 0.18em;
  transition: transform 0.35s var(--ease-spring);
}

.wordmark-link:hover {
  transform: scale(1.03);
}

.wordmark-link:active {
  transform: scale(0.97);
}

.brand-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--sand));
  box-shadow: 0 0 0 0 rgba(62, 207, 173, 0.35);
  animation: brand-pulse 2.8s var(--ease-out-soft) infinite;
}

@keyframes brand-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 3px rgba(62, 207, 173, 0.12);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(62, 207, 173, 0.05);
  }
}

.wordmark-link__label {
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.4;
}

.primary-nav {
  display: flex;
  gap: 0.35rem;
}

.nav-link {
  position: relative;
  padding: 0.45rem 0.85rem;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  border-radius: 10px;
  transition:
    color 0.25s ease,
    background 0.3s var(--ease-spring),
    transform 0.3s var(--ease-spring);
}

.nav-link:hover {
  color: var(--ink);
  background: rgba(243, 246, 242, 0.06);
  transform: translateY(-1px);
}

.nav-link:active {
  transform: translateY(1px) scale(0.97);
}

/* ——— Hero stage ——— */
.hero-stage {
  min-height: min(92vh, 860px);
  display: grid;
  align-items: center;
  padding: 4rem 0 5rem;
}

.hero-stage__inner {
  max-width: 40rem;
}

.hero-wordmark {
  margin: 0 0 1.35rem;
  font-family: var(--font-display);
  font-size: clamp(3.4rem, 11vw, 6.4rem);
  font-weight: 700;
  letter-spacing: 0.28em;
  line-height: 1.2;
  display: flex;
  gap: 0.02em;
}

.hero-wordmark .glyph {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.55em) rotateX(40deg);
  transform-origin: 50% 100%;
  background: linear-gradient(105deg, var(--ink) 18%, var(--teal) 52%, var(--sand) 96%);
  background-size: 180% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation:
    glyph-rise 0.85s var(--ease-spring) forwards,
    ink-flow 8s ease-in-out 1s infinite alternate;
}

.hero-wordmark .glyph:nth-child(2) {
  animation-delay: 0.1s, 1.1s;
}

@keyframes glyph-rise {
  to {
    opacity: 1;
    transform: translateY(0) rotateX(0);
  }
}

/* liquid / ink shimmer on brand glyphs */
@keyframes ink-flow {
  from {
    background-position: 0% 50%;
  }
  to {
    background-position: 100% 50%;
  }
}

.hero-headline {
  margin: 0 0 1.15rem;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.8vw, 2.65rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.45;
}

.hero-headline__line {
  display: block;
}

.hero-lead {
  margin: 0 0 1.85rem;
  max-width: 34rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

/* Reveal lines */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  filter: blur(4px);
  animation: soft-rise 0.9s var(--ease-out-soft) forwards;
}

.hero-headline__line:nth-child(1) {
  animation-delay: 0.28s;
}

.hero-headline__line:nth-child(2) {
  animation-delay: 0.4s;
}

.hero-lead {
  animation-delay: 0.52s;
}

.hero-actions {
  animation-delay: 0.64s;
}

@keyframes soft-rise {
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

/* ——— Kinetic buttons ——— */
.kinetic-btn {
  appearance: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 14px;
  padding: 0.9rem 1.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  transition:
    transform 0.35s var(--ease-spring),
    box-shadow 0.35s var(--ease-out-soft),
    background 0.25s ease,
    border-color 0.25s ease,
    filter 0.25s ease;
}

.kinetic-btn__label {
  position: relative;
  z-index: 1;
}

.kinetic-btn:hover {
  transform: translateY(-3px) scale(1.02);
}

.kinetic-btn:active {
  transform: translateY(1px) scale(0.96);
  transition-duration: 0.12s;
}

.kinetic-btn--primary {
  background: linear-gradient(180deg, #54d9ba, var(--teal-deep));
  color: #04120e;
  box-shadow: 0 10px 28px rgba(31, 143, 120, 0.32);
}

.kinetic-btn--primary:hover {
  filter: brightness(1.06);
  box-shadow: 0 16px 36px rgba(31, 143, 120, 0.42);
}

.kinetic-btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid rgba(62, 207, 173, 0.42);
}

.kinetic-btn--ghost:hover {
  background: rgba(62, 207, 173, 0.1);
  border-color: rgba(62, 207, 173, 0.7);
}

/* ——— Content bands ——— */
.content-band {
  padding: 4.5rem 0 5rem;
}

.content-band--about {
  border-top: 1px solid var(--line);
  padding-top: 3.5rem;
}

.band-intro {
  margin-bottom: 2rem;
  max-width: 36rem;
}

.band-eyebrow {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
}

.band-title {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  letter-spacing: 0.06em;
  line-height: 1.35;
  font-weight: 600;
}

.band-summary {
  margin: 0;
  color: var(--muted);
}

/* ——— Project gallery (interaction tiles) ——— */
.project-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.project-tile {
  --tile-accent: var(--teal);
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 1.4rem 1.35rem 1.3rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.045), transparent 42%),
    var(--bg-elev);
  overflow: hidden;
  min-height: 240px;
  opacity: 0;
  transform: translateY(28px) scale(0.97);
  transform-style: preserve-3d;
  perspective: 800px;
  transition:
    transform 0.45s var(--ease-spring),
    border-color 0.3s ease,
    box-shadow 0.4s var(--ease-out-soft);
  will-change: transform;
}

.project-tile.is-inview {
  opacity: 1;
  transform: translateY(0) scale(1) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
}

.project-tile::before {
  content: "";
  position: absolute;
  inset: auto -18% -38% auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: var(--tile-accent);
  filter: blur(42px);
  opacity: 0.28;
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.5s var(--ease-spring);
}

.project-tile[data-tone="job"] {
  --tile-accent: var(--coral);
}

.project-tile[data-tone="df"] {
  --tile-accent: var(--sky);
}

.project-tile[data-tone="sleep"] {
  --tile-accent: var(--teal);
}

.project-tile[data-tone="video"] {
  --tile-accent: var(--film);
}

.project-tile[data-tone="translate"] {
  --tile-accent: var(--violet);
}

.project-tile[data-tone="blog"] {
  --tile-accent: var(--sand);
}

.project-tile:hover {
  transform: translateY(-6px) scale(1.015) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  border-color: color-mix(in srgb, var(--tile-accent) 45%, transparent);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.32);
}

.project-tile:hover::before {
  opacity: 0.42;
  transform: scale(1.12) translate(-8px, -6px);
}

.project-tile:active {
  transform: translateY(-1px) scale(0.985) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  transition-duration: 0.12s;
}

.project-tile__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.domain-chip {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.28rem 0.6rem;
}

.host-label {
  color: var(--muted-2);
  font-size: 0.78rem;
  font-family: var(--font-display);
}

.project-tile__title {
  margin: 0.2rem 0 0;
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: 0.04em;
  line-height: 1.4;
  font-weight: 600;
}

.project-tile__blurb {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  flex: 1;
}

.project-tile__cta {
  margin-top: 0.5rem;
  font-weight: 600;
  color: var(--teal);
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: color 0.25s ease;
}

.project-tile__arrow {
  display: inline-block;
  transition: transform 0.35s var(--ease-spring);
}

.project-tile:hover .project-tile__cta {
  color: var(--sand);
}

.project-tile:hover .project-tile__arrow {
  transform: translateX(5px);
}

/* ——— About ——— */
.about-panel {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 2rem;
  align-items: start;
}

.about-panel__copy {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 38rem;
}

/* ——— Footer ——— */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.75rem 0 2.25rem;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.85rem 1.5rem;
  align-items: center;
  color: var(--muted-2);
  font-size: 0.85rem;
}

.site-footer .wordmark-link__label {
  color: var(--ink);
  letter-spacing: 0.18em;
}

.legal-line {
  line-height: 1.6;
}

.legal-line a {
  color: var(--muted);
  margin-left: 0.35rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.legal-line a:hover {
  color: var(--teal);
}

@media (max-width: 760px) {
  .project-gallery {
    grid-template-columns: 1fr;
  }

  .about-panel {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .primary-nav {
    gap: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .hero-wordmark .glyph,
  [data-reveal],
  .project-tile {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
}
