:root {
  --ink: #141414;
  --ink-soft: #2a2a2a;
  --paper: #f6f4ef;
  --paper-deep: #ece9e1;
  --card: #ffffff;
  --line: rgba(20, 20, 20, 0.14);
  --muted: #6f6f6f;
  --accent: #e5482d;
  --accent-deep: #b93822;
  --teal: #0f766e;
  --shadow: 0 20px 50px rgba(20, 20, 20, 0.12);
  --radius: 8px;
  --max: 1180px;
  --font-cn: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", sans-serif;
  --font-en: "Arial", "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-cn);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  text-wrap: balance;
}

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

button,
a {
  font: inherit;
  color: inherit;
  text-decoration: none;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
}

svg {
  width: 22px;
  height: 22px;
}

/* Intro */
.intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #16122b;
  color: var(--paper);
  overflow: hidden;
  transition: transform 0.9s cubic-bezier(0.77, 0, 0.18, 1), visibility 0.9s;
}

.intro-ripple {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
}

.intro.done {
  transform: translateY(-100%);
  visibility: hidden;
}

.intro-meta {
  position: absolute;
  top: 34px;
  left: 40px;
  right: 40px;
  display: flex;
  justify-content: space-between;
  font-family: var(--font-en);
  font-size: 12px;
  color: rgba(246, 244, 239, 0.6);
  z-index: 3;
}

.intro-stage {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0 24px;
}

.intro-type {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 780px;
}

.intro-kicker {
  display: inline-block;
  font-family: var(--font-en);
  font-size: 12px;
  color: rgba(246, 244, 239, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  padding: 7px 16px;
  margin-bottom: 26px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  animation: introFade 1s ease both;
}

.intro-title {
  display: flex;
  justify-content: center;
  gap: 14px;
  font-size: clamp(64px, 11vw, 126px);
  font-weight: 700;
  line-height: 1;
  text-shadow: 3px 3px 0 rgba(255, 159, 252, 0.85), 7px 7px 0 rgba(124, 58, 237, 0.55);
}

.intro-title span {
  display: inline-block;
  animation: introLetter 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.intro-title span:nth-child(2) {
  animation-delay: 0.12s;
}

.intro-title span:nth-child(3) {
  animation-delay: 0.24s;
}

@keyframes introLetter {
  from { opacity: 0; transform: translateY(60px) rotate(8deg) scale(0.9); filter: blur(12px); }
  to { opacity: 1; transform: translateY(0) rotate(0) scale(1); filter: blur(0); }
}

.intro-line {
  width: min(420px, 64vw);
  height: 1px;
  margin: 26px auto 18px;
  background: rgba(246, 244, 239, 0.28);
  overflow: hidden;
}

.intro-line i {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #ff9ffc, #7c3aed);
  transform: scaleX(0);
  transform-origin: left;
  animation: introLine 1.4s ease 0.5s forwards;
}

@keyframes introLine {
  to { transform: scaleX(1); }
}

.intro-sub {
  font-family: var(--font-en);
  font-size: clamp(12px, 2vw, 15px);
  color: rgba(246, 244, 239, 0.85);
  animation: introFade 1s ease 0.5s both;
}

@keyframes introFade {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.intro-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
  animation: introFade 1s ease 0.7s both;
}

.intro-tags span {
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  color: var(--paper);
}

.intro-enter {
  margin-top: 30px;
  padding: 13px 32px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: var(--radius);
  color: var(--paper);
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease, background 0.3s ease, border-color 0.3s ease;
}

.intro.show .intro-enter {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 1.05s;
}

.intro-enter:hover {
  background: #7c3aed;
  border-color: #7c3aed;
}

/* Progress bar */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 90;
  width: 0;
  height: 3px;
  background: var(--accent);
  transition: width 0.2s ease;
}

/* Nav */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 40px;
  transition: background 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease, transform 0.35s ease;
}

.nav.hidden {
  transform: translateY(-100%);
}

.nav.scrolled {
  background: rgba(246, 244, 239, 0.9);
  backdrop-filter: blur(14px);
  padding: 12px 40px;
  box-shadow: 0 1px 0 var(--line);
}

.nav-brand {
  font-weight: 700;
  font-size: 18px;
}

.nav-brand span {
  color: var(--muted);
  font-size: 13px;
  margin-left: 6px;
}

.nav-links {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
}

.goo-layer {
  position: absolute;
  inset: 0;
  filter: url(#goo);
  pointer-events: none;
  z-index: 0;
}

.goo-pill {
  position: absolute;
  top: 50%;
  left: 0;
  width: 60px;
  height: 38px;
  border-radius: 999px;
  background: var(--ink);
  transform: translate(0, -50%) scale(1);
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), width 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.nav-links a {
  position: relative;
  z-index: 1;
  font-size: 14px;
  color: var(--ink-soft);
  padding: 10px 16px;
  border-radius: 999px;
  white-space: nowrap;
  transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--paper);
}

.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
}

.nav-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-burger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-burger.open span:nth-child(2) {
  opacity: 0;
}

.nav-burger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 40px 80px;
  background:
    linear-gradient(rgba(20, 20, 20, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 20, 20, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(520px circle at var(--mx, 50%) var(--my, 40%), rgba(229, 72, 45, 0.12), transparent 60%);
}

.hero-bg canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
}

.hero-waves {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 170px;
  pointer-events: none;
  z-index: 0;
}

.hero-waves svg {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 200%;
  height: 100%;
  animation: waveMove 16s linear infinite;
}

.hero-waves svg:nth-child(2) {
  animation-duration: 20s;
  animation-direction: reverse;
}

.hero-waves svg:nth-child(3) {
  animation-duration: 24s;
  animation-direction: reverse;
}

.hero-waves svg:nth-child(4) {
  animation-duration: 30s;
}

.hero-waves svg:nth-child(5) {
  animation-duration: 18s;
  animation-direction: reverse;
}

@keyframes waveMove {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
}

.eyebrow {
  font-family: var(--font-en);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 22px;
}

.shiny {
  background: linear-gradient(100deg, var(--accent) 20%, #ffb199 45%, var(--accent) 70%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: shine 3.6s linear infinite;
}

@keyframes shine {
  from { background-position: 120% 0; }
  to { background-position: -120% 0; }
}

.hero-name {
  font-size: clamp(64px, 10vw, 148px);
  line-height: 0.98;
  font-weight: 800;
}

.hero-sub {
  margin-top: 18px;
  font-size: clamp(18px, 2.4vw, 26px);
  font-weight: 600;
  color: var(--ink-soft);
}

.hero-desc {
  margin-top: 16px;
  max-width: 560px;
  color: var(--muted);
  font-size: 16px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.btn-solid {
  background: var(--ink);
  color: var(--paper);
}

.btn-solid:hover {
  background: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(229, 72, 45, 0.3);
}

.btn-ghost {
  border: 1px solid var(--line);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 48px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.stat + .stat {
  border-left: 1px solid var(--line);
  padding-left: 20px;
}

.stat b {
  display: block;
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 800;
  font-family: var(--font-en);
  line-height: 1.1;
}

.stat span {
  font-size: 12px;
  color: var(--muted);
}

.hero-visual {
  position: relative;
}

.portrait-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 3 / 4;
  box-shadow: var(--shadow);
  background: var(--paper-deep);
}

.tilt {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  will-change: transform;
}

.portrait-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portrait-card figcaption {
  position: absolute;
  left: 14px;
  bottom: 14px;
  background: rgba(20, 20, 20, 0.78);
  color: var(--paper);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  backdrop-filter: blur(8px);
}

.float-card {
  position: absolute;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 16px;
  box-shadow: 0 14px 30px rgba(20, 20, 20, 0.12);
  display: flex;
  flex-direction: column;
  animation: float 5s ease-in-out infinite;
}

.float-card span {
  font-weight: 700;
  font-size: 14px;
}

.float-card small {
  color: var(--muted);
  font-size: 11px;
}

.float-a {
  top: 8%;
  right: -22px;
}

.float-b {
  bottom: 12%;
  left: -26px;
  animation-delay: 1.6s;
}

.float-word {
  position: absolute;
  z-index: 3;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(246, 244, 239, 0.94);
  backdrop-filter: blur(8px);
  color: var(--ink-soft);
  box-shadow: 0 10px 24px rgba(20, 20, 20, 0.12);
  white-space: nowrap;
  animation: floatWord 7s ease-in-out infinite;
}

.fw-1 { top: 6%; left: -6%; }
.fw-2 { top: 30%; right: -12%; animation-delay: 0.9s; }
.fw-3 { top: 52%; left: -14%; animation-delay: 1.8s; }
.fw-4 { bottom: 8%; right: -4%; animation-delay: 2.7s; }

@keyframes floatWord {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-12px) rotate(2deg); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.scroll-hint {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 44px;
  border: 2px solid var(--line);
  border-radius: 20px;
  display: flex;
  justify-content: center;
}

.scroll-hint span {
  width: 4px;
  height: 8px;
  margin-top: 8px;
  border-radius: 4px;
  background: var(--accent);
  animation: scrollDot 1.6s ease-in-out infinite;
}

@keyframes scrollDot {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(16px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* Marquee */
.marquee {
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
  padding: 16px 0;
}

.marquee-track {
  display: flex;
  align-items: center;
  gap: 26px;
  width: max-content;
  animation: marquee 26s linear infinite;
}

.marquee-track span {
  font-size: 14px;
  white-space: nowrap;
}

.marquee-track i {
  color: var(--accent);
  font-style: normal;
  font-size: 12px;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Sections */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 110px 24px;
}

.section-head {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 56px;
}

.section-head::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
  margin-left: 18px;
  align-self: center;
}

.section-num {
  font-family: var(--font-en);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 46px;
}

.section-head h2 {
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.1;
  font-weight: 800;
}

.section-head p {
  font-family: var(--font-en);
  color: var(--muted);
  font-size: 13px;
  margin-top: 6px;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 60px;
  align-items: center;
}

.about-photo {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: var(--paper-deep);
  box-shadow: var(--shadow);
  position: relative;
}

.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-photo figcaption {
  position: absolute;
  right: 14px;
  bottom: 14px;
  background: rgba(246, 244, 239, 0.9);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
}

.about-copy h3 {
  font-size: clamp(24px, 3.2vw, 36px);
  line-height: 1.3;
  margin-bottom: 22px;
}

.about-copy p {
  color: var(--muted);
  margin-bottom: 14px;
  max-width: 640px;
}

.info-list {
  list-style: none;
  margin: 26px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 24px;
}

.info-list li {
  font-size: 14px;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 8px;
}

.info-list span {
  display: inline-block;
  width: 56px;
  color: var(--accent);
  font-weight: 600;
}

.cert-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cert-row span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12px;
  background: var(--card);
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.skill-card {
  border-radius: var(--radius);
  padding: 36px 34px;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.spotlight-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(260px circle at var(--sx, 50%) var(--sy, 50%), rgba(229, 72, 45, 0.16), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 0;
}

.spotlight-card:hover::before {
  opacity: 1;
}

.spotlight-card > * {
  position: relative;
  z-index: 1;
}

.skill-card:hover {
  transform: translateY(-6px);
}

.skill-front {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 22px 44px rgba(20, 20, 20, 0.25);
}

.skill-front .bar span {
  color: rgba(246, 244, 239, 0.75);
}

.skill-ai {
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.skill-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  margin-bottom: 20px;
}

.skill-front .skill-icon {
  background: var(--accent);
  color: var(--paper);
}

.skill-ai .skill-icon {
  background: rgba(15, 118, 110, 0.12);
  color: var(--teal);
}

.skill-card h3 {
  font-size: 24px;
  margin-bottom: 10px;
}

.skill-card > p {
  font-size: 14px;
  opacity: 0.78;
  margin-bottom: 24px;
  min-height: 44px;
}

.skill-bars {
  display: grid;
  gap: 13px;
}

.bar {
  display: grid;
  grid-template-columns: 180px 1fr;
  align-items: center;
  gap: 14px;
}

.bar span {
  font-size: 12px;
  color: var(--muted);
}

.bar i {
  display: block;
  height: 6px;
  border-radius: 999px;
  background: var(--paper-deep);
  position: relative;
  overflow: hidden;
}

.bar i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  width: var(--p);
  border-radius: 999px;
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 1s ease 0.2s;
}

.in-view .bar i::after {
  transform: scaleX(1);
}

.skill-ai .bar i::after {
  background: var(--teal);
}

.skill-strip {
  margin-top: 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}

.skill-strip h3 {
  font-size: 20px;
}

.skill-strip p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
  max-width: 460px;
}

.tool-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.tool-chips span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 12px;
  background: var(--paper);
  transition: border-color 0.25s ease, color 0.25s ease;
}

.tool-chips span:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Tabs */
.tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 34px;
}

.tab {
  padding: 11px 24px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 14px;
  font-weight: 600;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.tab.active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.tab-panel {
  animation: fadeUp 0.5s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Projects */
.project-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  margin-bottom: 26px;
  box-shadow: 0 10px 30px rgba(20, 20, 20, 0.06);
}

.project-card.spotlight-card::before {
  background: radial-gradient(340px circle at var(--sx, 50%) var(--sy, 50%), rgba(229, 72, 45, 0.1), transparent 70%);
}

.project-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.project-tag {
  display: inline-block;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
}

.project-head h3 {
  font-size: clamp(22px, 3vw, 30px);
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.tech-tags span {
  font-size: 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  background: var(--paper);
}

.project-body {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 26px;
  align-items: start;
}

.carousel {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--ink);
  aspect-ratio: 16 / 10;
}

.carousel-track {
  display: flex;
  height: 100%;
  scroll-snap-type: x mandatory;
  overflow-x: auto;
  scrollbar-width: none;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.shot {
  flex: 0 0 100%;
  scroll-snap-align: start;
  position: relative;
}

.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(20, 20, 20, 0.55);
  color: var(--paper);
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s ease;
  z-index: 3;
}

.carousel-btn:hover {
  background: var(--accent);
}

.carousel-btn.prev {
  left: 14px;
}

.carousel-btn.next {
  right: 14px;
}

.project-desc p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 16px;
}

.feats {
  list-style: none;
  display: grid;
  gap: 9px;
}

.feats li {
  font-size: 13px;
  padding-left: 20px;
  position: relative;
}

.feats li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--accent);
}

/* AI feature */
.ai-feature {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 30px;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius);
  padding: 26px;
  margin-bottom: 40px;
}

.ai-cover {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 3 / 2;
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 14px;
  background:
    linear-gradient(150deg, rgba(229, 72, 45, 0.22), transparent 44%),
    repeating-linear-gradient(0deg, rgba(246, 244, 239, 0.06) 0 1px, transparent 1px 26px),
    var(--ink);
  color: var(--paper);
}

.cover-kicker {
  position: absolute;
  top: 24px;
  left: 26px;
  font-family: var(--font-en);
  font-size: 11px;
  color: #ff8a70;
}

.ai-cover h3 {
  font-size: clamp(32px, 4.6vw, 52px);
  line-height: 1.05;
}

.cover-sub {
  color: rgba(246, 244, 239, 0.6);
  font-size: 13px;
}

.cover-poem {
  display: grid;
  gap: 4px;
  border-left: 2px solid var(--accent);
  padding-left: 14px;
  font-size: 14px;
  color: rgba(246, 244, 239, 0.86);
}

.cover-seal {
  position: absolute;
  top: 22px;
  right: 24px;
  width: 74px;
  height: 74px;
  border: 2px solid rgba(255, 138, 112, 0.8);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 13px;
  color: #ff8a70;
  transform: rotate(-8deg);
}

.ai-info .project-tag {
  color: #ff8a70;
}

.ai-info h3 {
  font-size: clamp(30px, 4.4vw, 48px);
  margin: 6px 0 10px;
}

.ai-genre {
  color: rgba(246, 244, 239, 0.6);
  font-size: 13px;
  margin-bottom: 14px;
}

.ai-info > p:not(.ai-genre) {
  color: rgba(246, 244, 239, 0.8);
  font-size: 14px;
  margin-bottom: 20px;
}

.episodes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.episodes span {
  font-size: 12px;
  border: 1px solid rgba(246, 244, 239, 0.3);
  border-radius: 999px;
  padding: 6px 12px;
}

.workflow {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13px;
}

.workflow span {
  background: var(--accent);
  border-radius: 6px;
  padding: 8px 13px;
  font-weight: 600;
}

.workflow i {
  font-style: normal;
  color: rgba(246, 244, 239, 0.5);
}

/* Story reader */
.story-reader {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}

.story-chapters {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-left: 26px;
}

.story-line {
  position: absolute;
  left: 8px;
  top: 10px;
  width: 2px;
  height: 0;
  border-radius: 999px;
  background: linear-gradient(var(--accent), #ff8a70);
  transition: height 0.45s ease;
}

.story-chapters::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  border-radius: 999px;
  background: var(--line);
}

.story-chapter {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 12px 14px 12px 16px;
  border: 0;
  border-radius: var(--radius);
  font-size: 14px;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.story-chapter::before {
  content: "";
  position: absolute;
  left: -26px;
  top: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--card);
  border: 2px solid var(--line);
  transform: translateY(-50%);
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.story-chapter span {
  font-family: var(--font-en);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}

.story-chapter.active {
  background: var(--ink);
  color: var(--paper);
}

.story-chapter.active::before {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 5px rgba(229, 72, 45, 0.16);
}

.story-chapter.active span {
  color: #ff8a70;
}

.story-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  display: flex;
  flex-direction: column;
  min-height: 340px;
}

.story-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.story-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.story-btn:hover {
  background: var(--accent);
  color: var(--paper);
  border-color: var(--accent);
}

.story-position {
  font-family: var(--font-en);
  font-size: 12px;
  color: var(--muted);
}

.story-body {
  overflow: auto;
  max-height: 420px;
  padding-right: 6px;
}

.story-ch {
  font-family: var(--font-en);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}

.story-body h4 {
  font-size: 26px;
  margin: 6px 0 16px;
}

.story-body p {
  font-size: 14px;
  line-height: 2;
  color: #444;
  margin-bottom: 14px;
}

.story-body .story-poem {
  display: grid;
  gap: 4px;
  text-align: center;
  color: var(--accent-deep);
  font-weight: 600;
  padding: 10px 0;
  line-height: 1.9;
}

.story-body.anim {
  animation: storyIn 0.5s ease both;
}

@keyframes storyIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.block-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  margin: 32px 0 16px;
}

.block-title::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--accent);
}

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

.char-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
  text-align: left;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  padding-bottom: 16px;
}

.char-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.char-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  margin-bottom: 12px;
}

.char-name {
  display: block;
  padding: 0 16px;
  font-weight: 700;
  font-size: 15px;
}

.char-card small {
  display: block;
  padding: 2px 16px 0;
  color: var(--muted);
  font-size: 12px;
}

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

.ev-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
}

.ev-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.ev-card figcaption {
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 600;
}

.ev-video video {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #000;
}

/* Life gallery */
.filter-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 30px;
  align-items: center;
}

.life-count {
  margin-left: auto;
  font-family: var(--font-en);
  font-size: 12px;
  color: var(--muted);
}

.filter {
  padding: 9px 20px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 13px;
  transition: background 0.25s ease, color 0.25s ease;
}

.filter.active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.drift-wall {
  position: relative;
  overflow: hidden;
  padding: 10px 0;
}

.drift-wall::before,
.drift-wall::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 60px;
  z-index: 3;
  pointer-events: none;
}

.drift-wall::before {
  top: 0;
  background: linear-gradient(to bottom, var(--paper), transparent);
}

.drift-wall::after {
  bottom: 0;
  background: linear-gradient(to top, var(--paper), transparent);
}

.drift-grid {
  transform: translate3d(calc(var(--dx, 0) * 18px), calc(var(--dy, 0) * 12px), 0);
  will-change: transform;
}

.gallery-grid {
  columns: 3;
  column-gap: 16px;
}

.gallery-item {
  position: relative;
  display: block;
  width: 100%;
  margin-bottom: 16px;
  border-radius: var(--radius);
  overflow: hidden;
  break-inside: avoid;
  background: var(--paper-deep);
  opacity: 0;
  animation:
    itemIn 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards,
    driftItem var(--dur, 8s) ease-in-out var(--d, 0s) infinite alternate;
}

@keyframes itemIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes driftItem {
  from { transform: translateY(0) rotate(0deg); }
  to { transform: translateY(calc(-1 * var(--amp, 18px))) rotate(0.8deg); }
}

.gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(240px circle at var(--sx, 50%) var(--sy, 50%), rgba(255, 255, 255, 0.2), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.gallery-item:hover::after {
  opacity: 1;
}

.gallery-item img {
  width: 100%;
  transition: transform 0.55s ease, filter 0.55s ease;
}

.gallery-item:hover img {
  transform: scale(1.06);
}

.gallery-cat,
.gallery-idx {
  position: absolute;
  top: 12px;
  z-index: 2;
  background: rgba(20, 20, 20, 0.72);
  color: var(--paper);
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.gallery-cat {
  left: 12px;
}

.gallery-idx {
  right: 12px;
  font-family: var(--font-en);
}

.gallery-overlay {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
  padding: 42px 14px 13px;
  background: linear-gradient(transparent, rgba(20, 20, 20, 0.84));
  color: var(--paper);
  text-align: left;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.gallery-overlay b {
  display: block;
  font-size: 14px;
}

.gallery-overlay small {
  color: rgba(246, 244, 239, 0.75);
  font-size: 12px;
}

.gallery-item:hover .gallery-cat,
.gallery-item:hover .gallery-idx,
.gallery-item:hover .gallery-overlay {
  opacity: 1;
  transform: translateY(0);
}

/* Life editorial */
.life-editorial {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 64px;
  align-items: start;
}

.life-side {
  position: sticky;
  top: 120px;
  padding-top: 12px;
}

.life-side-kicker {
  display: inline-block;
  font-family: var(--font-en);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 18px;
}

.life-side h3 {
  font-size: clamp(26px, 3.2vw, 38px);
  line-height: 1.25;
  margin-bottom: 16px;
}

.life-side > p {
  color: var(--muted);
  font-size: 14px;
  max-width: 330px;
}

.life-side-stats {
  display: flex;
  gap: 34px;
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.life-side-stats b {
  display: block;
  font-family: var(--font-en);
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
}

.life-side-stats span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.life-side-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 26px;
  font-size: 12px;
  color: var(--muted);
}

.life-side-note::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--accent);
}

.life-roll {
  display: grid;
  gap: 22px;
}

.life-shot {
  position: relative;
  display: block;
  width: 100%;
  max-width: 620px;
  border: 0;
  padding: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper-deep);
  text-align: left;
  opacity: 0;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.life-shot.in-view {
  animation: lifeIn 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes lifeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.life-shot:nth-child(even) {
  margin-left: 56px;
}

.life-shot:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.life-shot img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.55s ease;
}

.life-shot:nth-child(3n) img {
  aspect-ratio: 1 / 1;
}

.life-shot:nth-child(4n) img {
  aspect-ratio: 16 / 10;
}

.life-shot:hover img {
  transform: scale(1.05);
}

.life-shot figcaption {
  position: absolute;
  left: 12px;
  bottom: 12px;
  background: rgba(20, 20, 20, 0.72);
  color: var(--paper);
  padding: 7px 11px;
  border-radius: 6px;
  font-size: 12px;
  backdrop-filter: blur(6px);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.life-shot:hover figcaption {
  opacity: 1;
  transform: translateY(0);
}

.life-shot-index {
  position: absolute;
  top: 12px;
  left: 12px;
  font-family: var(--font-en);
  font-size: 11px;
  color: var(--paper);
  background: rgba(20, 20, 20, 0.6);
  border-radius: 999px;
  padding: 5px 9px;
}

.life-flow {
  position: relative;
  height: 540px;
  overflow: hidden;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.life-flow::before,
.life-flow::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 48px;
  z-index: 3;
  pointer-events: none;
}

.life-flow::before {
  top: 0;
  background: linear-gradient(to bottom, var(--paper), transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.life-flow::after {
  bottom: 0;
  background: linear-gradient(to top, var(--paper), transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.life-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 300px;
  will-change: transform;
  mask-image: linear-gradient(to bottom, transparent, #000 3%, #000 97%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 3%, #000 97%, transparent);
}

.life-col-a {
  animation: lifeScrollA 46s linear infinite;
}

.life-col-b {
  animation: lifeScrollB 56s linear infinite;
}

.life-flow:hover .life-col,
.life-flow.manual .life-col {
  animation-play-state: paused;
}

.life-col-track {
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}

@keyframes lifeScrollA {
  from { transform: translateY(0); }
  to { transform: translateY(-50%); }
}

@keyframes lifeScrollB {
  from { transform: translateY(-50%); }
  to { transform: translateY(0); }
}

.life-thumb {
  position: relative;
  display: block;
  flex: 0 0 auto;
  width: 100%;
  height: auto;
  min-height: 60px;
  border: 0;
  padding: 0;
  border-radius: 8px;
  overflow: hidden;
  background: var(--paper-deep);
}

.life-thumb img {
  width: 100%;
  height: auto;
  object-fit: fill;
  display: block;
  transition: transform 0.4s ease;
}

.life-thumb:hover img {
  transform: scale(1.1);
}

.life-thumb figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 18px 7px 6px;
  background: linear-gradient(transparent, rgba(20, 20, 20, 0.78));
  color: var(--paper);
  font-size: 10px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.life-thumb-index {
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(20, 20, 20, 0.65);
  color: var(--paper);
  font-family: var(--font-en);
  font-size: 9px;
  padding: 2px 5px;
  border-radius: 999px;
}

/* Coverflow */
.coverflow {
  position: relative;
  height: 560px;
}

.coverflow-stage {
  position: absolute;
  inset: 0;
  perspective: 1400px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.coverflow-track {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  transform-style: preserve-3d;
}

.coverflow-item {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 400px;
  height: 270px;
  margin: -135px 0 0 -200px;
  border: 0;
  padding: 0;
  border-radius: 10px;
  overflow: hidden;
  background: transparent;
  box-shadow: 0 30px 60px rgba(20, 20, 20, 0.3);
  transition: transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease, filter 0.4s ease;
  will-change: transform;
  cursor: pointer;
}

.coverflow-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.coverflow-item:not(.active) {
  filter: blur(2px) brightness(0.92);
  opacity: 0.72;
}

.coverflow-item:not(.active)::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(246, 244, 239, 0.24);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.coverflow-item.active {
  filter: none;
  opacity: 1;
}

.coverflow-item.active::after {
  display: none;
}

.coverflow-label {
  position: absolute;
  left: 10px;
  bottom: 10px;
  background: rgba(20, 20, 20, 0.72);
  color: var(--paper);
  font-size: 12px;
  padding: 7px 10px;
  border-radius: 6px;
}

.coverflow-btn {
  position: absolute;
  top: 42%;
  z-index: 20;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(20, 20, 20, 0.1);
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.coverflow-btn:hover {
  background: var(--accent);
  color: var(--paper);
  border-color: var(--accent);
}

.coverflow-prev {
  left: 8px;
}

.coverflow-next {
  right: 8px;
}

.coverflow-meta {
  position: absolute;
  bottom: 8px;
  left: 0;
  right: 0;
  text-align: center;
}

.coverflow-meta span {
  font-family: var(--font-en);
  font-size: 12px;
  color: var(--muted);
}

.coverflow-meta b {
  display: block;
  margin-top: 4px;
  font-size: 16px;
}

/* Life album */
.album {
  position: relative;
  height: 660px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
  user-select: none;
  padding: 0 70px;
}

.album-deck {
  position: relative;
  width: 330px;
  height: 440px;
  cursor: grab;
}

.album-card {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: #141414;
  box-shadow: 0 24px 50px rgba(20, 20, 20, 0.28);
  transition: opacity 0.3s ease;
  will-change: transform;
}

.album-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.album-label {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  background: rgba(20, 20, 20, 0.72);
  color: var(--paper);
  font-size: 12px;
  padding: 7px 10px;
  border-radius: 6px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.album-btn {
  position: absolute;
  top: 38%;
  z-index: 20;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(20, 20, 20, 0.1);
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.album-btn:hover {
  background: var(--accent);
  color: var(--paper);
  border-color: var(--accent);
}

.album-prev {
  left: 8px;
}

.album-next {
  right: 8px;
}

.album-meta {
  margin-top: 36px;
  text-align: center;
}

.album-meta span {
  font-family: var(--font-en);
  font-size: 12px;
  color: var(--muted);
}

.album-meta b {
  display: block;
  margin-top: 6px;
  font-size: 18px;
}

/* Life featured + mosaic */
.life-featured {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 7;
  margin-bottom: 22px;
  box-shadow: var(--shadow);
}

.life-featured img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.03);
  animation: kenBurns 18s ease-in-out infinite alternate;
}

@keyframes kenBurns {
  from { transform: scale(1); }
  to { transform: scale(1.08); }
}

.life-featured::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(20, 20, 20, 0.62), transparent 55%);
}

.life-featured-copy {
  position: absolute;
  left: 28px;
  bottom: 26px;
  z-index: 2;
  color: var(--paper);
}

.life-featured-copy span {
  display: block;
  font-family: var(--font-en);
  font-size: 12px;
  color: #ff8a70;
  margin-bottom: 8px;
}

.life-featured-copy b {
  display: block;
  font-size: clamp(20px, 3vw, 30px);
}

.life-featured-copy small {
  display: block;
  margin-top: 4px;
  color: rgba(246, 244, 239, 0.75);
  font-size: 12px;
}

.life-mosaic {
  columns: 4;
  column-gap: 16px;
}

.mosaic-item {
  position: relative;
  display: block;
  width: 100%;
  margin-bottom: 16px;
  border-radius: var(--radius);
  overflow: hidden;
  break-inside: avoid;
  background: var(--paper-deep);
  opacity: 0;
}

.mosaic-item.in-view {
  animation:
    mosaicIn 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both,
    mosaicFloat var(--dur, 7s) ease-in-out var(--d, 0s) infinite alternate;
}

@keyframes mosaicIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes mosaicFloat {
  from { transform: translateY(0) rotate(0deg); }
  to { transform: translateY(calc(-1 * var(--amp, 10px))) rotate(0.6deg); }
}

.mosaic-item::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(240px circle at var(--sx, 50%) var(--sy, 50%), rgba(255, 255, 255, 0.2), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mosaic-item:hover::after {
  opacity: 1;
}

.mosaic-item img {
  width: 100%;
  transition: transform 0.55s ease;
}

.mosaic-item:hover img {
  transform: scale(1.05);
}

.mosaic-overlay {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
  padding: 42px 14px 13px;
  background: linear-gradient(transparent, rgba(20, 20, 20, 0.82));
  color: var(--paper);
  text-align: left;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.mosaic-overlay b {
  display: block;
  font-size: 14px;
}

.mosaic-overlay small {
  color: rgba(246, 244, 239, 0.75);
  font-size: 12px;
}

.mosaic-idx {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  background: rgba(20, 20, 20, 0.68);
  color: var(--paper);
  font-family: var(--font-en);
  font-size: 11px;
  padding: 5px 9px;
  border-radius: 999px;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.mosaic-item:hover .mosaic-overlay,
.mosaic-item:hover .mosaic-idx {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .life-mosaic {
    columns: 3;
  }
}

@media (max-width: 640px) {
  .coverflow {
    height: 460px;
  }

  .coverflow-item {
    width: 240px;
    height: 160px;
    margin: -80px 0 0 -120px;
  }

  .life-flow {
    height: 520px;
  }

  .life-col {
    width: 44vw;
  }

  .life-thumb {
    width: 100%;
    height: auto;
  }

  .album {
    height: 560px;
    padding: 0 54px;
  }

  .album-deck {
    width: 250px;
    height: 340px;
  }

  .life-mosaic {
    columns: 2;
  }

  .life-featured {
    aspect-ratio: 4 / 3;
  }
}

/* Circular gallery */
.circular-gallery {
  position: relative;
  padding: 30px 0 84px;
}

.cg-stage {
  position: relative;
  height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1400px;
  touch-action: pan-y;
  cursor: grab;
  user-select: none;
}

.cg-stage.dragging {
  cursor: grabbing;
}

.cg-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.cg-ring.dragging {
  transition: none;
}

.cg-item {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 168px;
  height: 232px;
  margin: -116px 0 0 -84px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 0;
  background: var(--card);
  box-shadow: 0 16px 36px rgba(20, 20, 20, 0.22);
  backface-visibility: hidden;
  opacity: 0.5;
  transition: opacity 0.35s ease, filter 0.35s ease;
}

.cg-item:hover {
  filter: saturate(1.15);
}

.cg-item.active {
  opacity: 1;
}

.cg-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cg-item span {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  background: rgba(20, 20, 20, 0.72);
  color: var(--paper);
  font-size: 12px;
  padding: 6px 9px;
  border-radius: 6px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cg-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  width: min(360px, 58vw);
  height: min(500px, 68vh);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(20, 20, 20, 0.3);
  border: 4px solid rgba(255, 255, 255, 0.7);
  background: var(--ink);
}

.cg-hero {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 0;
  background: none;
}

.cg-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.cg-hero:hover img {
  transform: scale(1.05);
}

.cg-hero-title,
.cg-hero-cat {
  position: absolute;
  left: 14px;
  z-index: 2;
  color: var(--paper);
  background: rgba(20, 20, 20, 0.72);
  backdrop-filter: blur(8px);
  padding: 7px 12px;
  border-radius: 6px;
}

.cg-hero-title {
  bottom: 46px;
  font-size: 15px;
  font-weight: 700;
}

.cg-hero-cat {
  bottom: 14px;
  font-size: 12px;
}

.cg-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 6;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
  box-shadow: 0 8px 20px rgba(20, 20, 20, 0.1);
}

.cg-btn:hover {
  background: var(--accent);
  color: var(--paper);
  border-color: var(--accent);
}

.cg-prev {
  left: 14px;
}

.cg-next {
  right: 14px;
}

.cg-count {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-en);
  font-size: 12px;
  color: var(--muted);
}

/* Circular gallery: React Bits style */
.cg-wrap {
  position: relative;
  height: 600px;
  overflow: hidden;
  touch-action: pan-y;
  cursor: grab;
  user-select: none;
}

.cg-wrap.dragging {
  cursor: grabbing;
}

.cg-scene {
  position: absolute;
  inset: 0;
  perspective: 1400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cg-track {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  transform-style: preserve-3d;
  will-change: transform;
}

.cg-item {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--s, 172px);
  height: calc(var(--s, 172px) * 1.32);
  margin: calc(var(--s, 172px) * -0.66) 0 0 calc(var(--s, 172px) * -0.5);
  border-radius: 5%;
  overflow: hidden;
  border: 0;
  padding: 0;
  background: #141414;
  box-shadow: 0 22px 50px rgba(20, 20, 20, 0.35);
  backface-visibility: hidden;
  opacity: 0.42;
  transition: opacity 0.45s ease, filter 0.45s ease;
}

.cg-item:hover {
  filter: brightness(1.12);
}

.cg-item.active {
  opacity: 1;
  filter: saturate(1.08);
}

.cg-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cg-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  text-align: center;
  color: #ffffff;
  font-family: "Orbitron", "Arial Black", "Microsoft YaHei", sans-serif;
  font-size: clamp(16px, 2.4vw, 30px);
  font-weight: 700;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.65);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 10px;
}

.cg-item.active .cg-label {
  opacity: 1;
  transform: translateY(0);
}

.cg-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 6;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
  box-shadow: 0 8px 20px rgba(20, 20, 20, 0.1);
}

.cg-btn:hover {
  background: var(--accent);
  color: var(--paper);
  border-color: var(--accent);
}

.cg-prev {
  left: 14px;
}

.cg-next {
  right: 14px;
}

.cg-count {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  font-family: var(--font-en);
  font-size: 12px;
  color: var(--muted);
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.contact-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-card.spotlight-card::before {
  background: radial-gradient(220px circle at var(--sx, 50%) var(--sy, 50%), rgba(15, 118, 110, 0.12), transparent 70%);
}

.contact-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.c-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: rgba(229, 72, 45, 0.1);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}

.contact-card small {
  color: var(--muted);
  font-size: 12px;
}

.contact-card b {
  font-size: 15px;
  word-break: break-all;
}

.copy-btn {
  margin-top: 4px;
  align-self: flex-start;
  font-size: 12px;
  color: var(--accent);
  border: 1px solid rgba(229, 72, 45, 0.35);
  border-radius: 999px;
  padding: 5px 12px;
  transition: background 0.25s ease, color 0.25s ease;
}

.copy-btn:hover {
  background: var(--accent);
  color: var(--paper);
}

.copy-btn.copied {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--paper);
}

.social-strip {
  margin-top: 24px;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius);
  padding: 28px 32px;
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.social-strip > span {
  font-weight: 700;
}

.social-strip .tool-chips span {
  border-color: rgba(246, 244, 239, 0.3);
  background: transparent;
  color: var(--paper);
}

.social-strip .tool-chips span:hover {
  border-color: #ff8a70;
  color: #ff8a70;
}

.social-strip .btn-solid {
  background: var(--accent);
  margin-left: auto;
}

.social-strip .btn-solid:hover {
  background: var(--paper);
  color: var(--ink);
  box-shadow: none;
}

/* Footer */
.footer {
  background: var(--ink);
  color: var(--paper);
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer strong {
  font-size: 18px;
}

.footer span,
.footer p {
  color: rgba(246, 244, 239, 0.6);
  font-size: 12px;
}

.to-top {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(246, 244, 239, 0.4);
  color: var(--paper);
  font-size: 20px;
  transition: background 0.25s ease, color 0.25s ease;
}

.to-top:hover {
  background: var(--accent);
  border-color: var(--accent);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(12, 12, 12, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.lightbox[hidden] {
  display: none;
}

.lightbox figure {
  max-width: min(1100px, 88vw);
  text-align: center;
}

.lightbox img {
  max-height: 78vh;
  width: auto;
  max-width: 100%;
  margin: 0 auto;
  border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.lightbox figcaption {
  color: var(--paper);
  margin-top: 16px;
  font-size: 14px;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  z-index: 2;
  color: var(--paper);
  background: rgba(246, 244, 239, 0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s ease;
}

.lightbox-close {
  top: 24px;
  right: 28px;
  width: 46px;
  height: 46px;
  font-size: 24px;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  font-size: 26px;
}

.lightbox-prev {
  left: 24px;
}

.lightbox-next {
  right: 24px;
}

.lightbox button:hover {
  background: var(--accent);
}

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

.reveal:nth-child(2) {
  transition-delay: 0.08s;
}

.reveal:nth-child(3) {
  transition-delay: 0.16s;
}

.reveal:nth-child(4) {
  transition-delay: 0.24s;
}

/* BlurText */
.blur-text .blur-char {
  display: inline-block;
  opacity: 0;
  filter: blur(14px);
  transform: translateY(18px);
  transition: opacity 0.7s ease, filter 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
  transition-delay: calc(var(--i) * 36ms);
}

.blur-text.in-view .blur-char {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}

/* DepthText */
.depth-text .blur-char {
  text-shadow: 2px 2px 0 rgba(229, 72, 45, 0.85), 5px 5px 0 rgba(229, 72, 45, 0.28);
}

.block-title.depth-text {
  text-shadow: 2px 2px 0 rgba(229, 72, 45, 0.5), 4px 4px 0 rgba(229, 72, 45, 0.2);
}

/* Responsive */
@media (max-width: 980px) {
  .hero-inner,
  .about-grid,
  .ai-feature,
  .project-body {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 120px;
  }

  .hero-visual {
    max-width: 420px;
  }

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

  .char-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .story-reader {
    grid-template-columns: 1fr;
  }

  .life-editorial {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .life-side {
    position: static;
  }

  .life-shot {
    max-width: none;
  }

  .life-shot:nth-child(even) {
    margin-left: 0;
  }

  .story-chapters {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 4px;
    padding-left: 0;
  }

  .story-chapter {
    flex: 0 0 auto;
  }

  .story-line,
  .story-chapters::before,
  .story-chapter::before {
    display: none;
  }

  .ai-evidence {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-grid {
    columns: 2;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(320px, 80vw);
    background: var(--paper);
    flex-direction: column;
    justify-content: center;
    gap: 26px;
    padding: 40px;
    transform: translateX(100%);
    transition: transform 0.4s ease;
    box-shadow: -20px 0 50px rgba(20, 20, 20, 0.15);
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-links a {
    font-size: 20px;
    color: var(--ink);
    padding: 4px 0;
  }

  .goo-layer {
    display: none;
  }

  .nav-burger {
    display: flex;
  }
}

@media (max-width: 640px) {
  .intro-stage {
    grid-template-columns: 1fr;
    gap: 26px;
    width: min(420px, 88vw);
    text-align: center;
  }

  .intro-type {
    text-align: center;
  }

  .intro-title {
    justify-content: center;
  }

  .intro-tags {
    justify-content: center;
  }

  .float-word {
    font-size: 11px;
    padding: 6px 10px;
  }

  .fw-1, .fw-3 { left: 0; }
  .fw-2, .fw-4 { right: 0; }

  .nav {
    padding: 14px 18px;
  }

  .nav.scrolled {
    padding: 10px 18px;
  }

  .hero {
    padding: 110px 18px 70px;
  }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .section {
    padding: 80px 18px;
  }

  .about-grid {
    gap: 34px;
  }

  .info-list {
    grid-template-columns: 1fr;
  }

  .bar {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .project-card {
    padding: 20px;
  }

  .char-grid,
  .ai-evidence,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .story-panel {
    padding: 18px;
  }

  .gallery-grid {
    columns: 1;
  }

  .cg-wrap {
    height: 520px;
  }

  .cg-item {
    --s: 132px;
    width: var(--s);
    height: calc(var(--s) * 1.32);
    margin: calc(var(--s) * -0.66) 0 0 calc(var(--s) * -0.5);
  }

  .float-a {
    right: -4px;
  }

  .float-b {
    left: -4px;
  }

  .social-strip .btn-solid {
    margin-left: 0;
  }

  .lightbox {
    padding: 18px;
  }

  .lightbox-prev {
    left: 8px;
  }

  .lightbox-next {
    right: 8px;
  }

  .footer {
    padding: 26px 18px;
  }
}

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