/* =============================================================
   0. Tokens & Reset
   ============================================================= */
:root {
  --bg: #05070d;
  --bg-soft: #080b12;
  --text: #eef2fa;
  --text-2: #c6cfdd;
  --muted: #8b97ab;
  --muted-2: #5f6b7e;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --c-mint: #5eead4;
  --c-blue: #60a5fa;
  --c-violet: #a78bfa;
  --c-pink: #f472b6;
  --grad: linear-gradient(100deg, #5eead4 0%, #60a5fa 36%, #a78bfa 68%, #f472b6 100%);
  --grad-soft: linear-gradient(100deg, #5eead4, #60a5fa 50%, #a78bfa);
  --font: "Inter", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system,
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "JetBrains Mono", "SF Mono", "Cascadia Code", Consolas, "Liberation Mono", monospace;
  --radius: 20px;
  --radius-lg: 28px;
  --maxw: 1180px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

section[id] {
  scroll-margin-top: 92px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: 0.002em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

h1, h2, h3, h4, p, figure, ul, ol, pre {
  margin: 0;
  padding: 0;
}

ul, ol {
  list-style: none;
}

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

button {
  font: inherit;
  color: inherit;
}

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

::selection {
  background: rgba(96, 165, 250, 0.28);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--c-mint);
  outline-offset: 3px;
  border-radius: 4px;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #05070d;
}

::-webkit-scrollbar-thumb {
  background: #1c2432;
  border-radius: 99px;
  border: 2px solid #05070d;
}

::-webkit-scrollbar-thumb:hover {
  background: #2b3648;
}

/* =============================================================
   1. Utilities
   ============================================================= */
.container {
  width: min(var(--maxw), calc(100% - 48px));
  margin-inline: auto;
}

.mono-tag {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.grad {
  background: var(--grad);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: gradShift 9s ease-in-out infinite;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 10px;
  background: #0d1420;
  border: 1px solid var(--line-2);
  font-size: 13px;
  transform: translateY(-160%);
  transition: transform 0.3s var(--ease);
}

.skip-link:focus-visible {
  transform: none;
}

/* =============================================================
   2. Background layers
   ============================================================= */
.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(80% 55% at 50% -8%, rgba(37, 55, 92, 0.36), transparent 70%),
    radial-gradient(60% 50% at 100% 100%, rgba(76, 46, 110, 0.2), transparent 70%),
    var(--bg);
}

.ambient__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.032) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.032) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse 85% 62% at 50% 0%, #000 0%, transparent 78%);
  mask-image: radial-gradient(ellipse 85% 62% at 50% 0%, #000 0%, transparent 78%);
}

.ambient__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.55;
  will-change: transform;
}

.ambient__orb--a {
  top: -12%;
  left: 46%;
  width: 620px;
  height: 620px;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.5), rgba(96, 165, 250, 0) 68%);
  animation: driftA 26s ease-in-out infinite alternate;
}

.ambient__orb--b {
  top: 18%;
  left: -16%;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(94, 234, 212, 0.32), rgba(94, 234, 212, 0) 68%);
  animation: driftB 32s ease-in-out infinite alternate;
}

.ambient__orb--c {
  right: -14%;
  bottom: -12%;
  width: 580px;
  height: 580px;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.34), rgba(167, 139, 250, 0) 68%);
  animation: driftC 29s ease-in-out infinite alternate;
}

.ambient__vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 100% 80% at 50% 40%, transparent 30%, rgba(3, 5, 10, 0.72) 100%);
}

#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.75;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 55;
  pointer-events: none;
  opacity: 0.038;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 2;
  width: 560px;
  height: 560px;
  margin: -280px 0 0 -280px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.14), rgba(167, 139, 250, 0.06) 42%, transparent 66%);
  transition: opacity 0.8s ease;
  will-change: transform;
}

.cursor-glow.is-on {
  opacity: 1;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 70;
  height: 2px;
  background: rgba(255, 255, 255, 0.05);
}

.scroll-progress i {
  display: block;
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: var(--grad);
  box-shadow: 0 0 12px rgba(96, 165, 250, 0.7);
}

/* =============================================================
   3. Header
   ============================================================= */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background 0.4s ease, border-color 0.4s ease, backdrop-filter 0.4s ease;
}

.header.is-scrolled {
  background: rgba(5, 7, 13, 0.72);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
  border-bottom-color: var(--line);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 78px;
  transition: height 0.4s var(--ease);
}

.header.is-scrolled .header__inner {
  height: 66px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  flex-shrink: 0;
}

.brand__mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.04);
  transition: border-color 0.35s, transform 0.35s var(--ease), box-shadow 0.35s;
}

.brand:hover .brand__mark {
  border-color: rgba(94, 234, 212, 0.4);
  transform: rotate(-6deg);
  box-shadow: 0 0 20px -4px rgba(94, 234, 212, 0.4);
}

.brand__mark svg {
  width: 21px;
  height: 21px;
}

.brand__text {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.brand__dot {
  color: var(--c-mint);
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav__link {
  position: relative;
  padding: 8px 13px;
  font-size: 13px;
  color: var(--muted);
  border-radius: 8px;
  transition: color 0.3s ease, background 0.3s ease;
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 3px;
  height: 1px;
  background: var(--grad-soft);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.4s var(--ease);
}

.nav__link:hover,
.nav__link.is-active {
  color: var(--text);
}

.nav__link:hover::after,
.nav__link.is-active::after {
  transform: scaleX(1);
}

.header__cta {
  height: 38px;
  padding: 0 16px;
  font-size: 12.5px;
  flex-shrink: 0;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  position: relative;
}

.menu-toggle span {
  position: absolute;
  left: 50%;
  width: 16px;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.35s var(--ease), opacity 0.25s;
}

.menu-toggle span:nth-child(1) {
  top: 17px;
  transform: translateX(-50%);
}

.menu-toggle span:nth-child(2) {
  top: 23px;
  transform: translateX(-50%);
  width: 11px;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  top: 20px;
  transform: translateX(-50%) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  top: 20px;
  width: 16px;
  transform: translateX(-50%) rotate(-45deg);
}

.mobile-menu {
  position: fixed;
  top: 80px;
  left: 16px;
  right: 16px;
  z-index: 49;
  padding: 12px;
  border-radius: 22px;
  border: 1px solid var(--line-2);
  background: rgba(8, 12, 20, 0.94);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.9);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px) scale(0.985);
  transform-origin: top center;
  transition: opacity 0.35s ease, transform 0.4s var(--ease), visibility 0.35s;
}

.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.mobile-menu__link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 12px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-2);
  transition: background 0.25s, color 0.25s;
}

.mobile-menu__link span {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted-2);
  letter-spacing: 0.1em;
}

.mobile-menu__link svg {
  width: 14px;
  height: 14px;
  margin-left: auto;
  color: var(--muted-2);
}

.mobile-menu__link:hover,
.mobile-menu__link:focus-visible {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.mobile-menu__foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  padding: 14px 12px 4px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}

/* =============================================================
   4. Buttons & badges
   ============================================================= */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 48px;
  padding: 0 22px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.4s var(--ease), background 0.35s, border-color 0.35s, box-shadow 0.4s;
  -webkit-tap-highlight-color: transparent;
}

.btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.btn[hidden] {
  display: none;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  border-color: transparent;
  color: #04121a;
  font-weight: 600;
  background: linear-gradient(100deg, #7df0dd 0%, #74b9ff 42%, #b79cff 100%);
  box-shadow: 0 12px 30px -14px rgba(96, 165, 250, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.btn--primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 25%, rgba(255, 255, 255, 0.55) 50%, transparent 75%);
  transform: translateX(-130%);
  transition: transform 0.8s var(--ease);
}

.btn--primary:hover {
  box-shadow: 0 18px 42px -14px rgba(96, 165, 250, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.btn--primary:hover::after {
  transform: translateX(130%);
}

.btn--ghost {
  color: var(--text-2);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.22);
  color: var(--text);
}

.btn--lg {
  height: 54px;
  padding: 0 26px;
  font-size: 14.5px;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.15);
  animation: dotPulse 2.4s ease-in-out infinite;
  flex-shrink: 0;
}

/* =============================================================
   5. Hero
   ============================================================= */
.hero {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 132px 0 88px;
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  gap: 40px;
  align-items: center;
  width: min(var(--maxw), calc(100% - 48px));
}

.hero__copy {
  max-width: 650px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  font-size: 12px;
  color: var(--text-2);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.status-pill__sep {
  width: 1px;
  height: 12px;
  background: var(--line-2);
}

.status-pill__mono {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--muted-2);
}

.hero__intro {
  margin-top: 26px;
  font-size: 14.5px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.hero__intro strong {
  color: var(--text);
  font-weight: 600;
}

.hero__alias {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--muted-2);
  margin-left: 6px;
}

.hero__title {
  margin: 14px 0 20px;
  font-size: clamp(2.6rem, 5.9vw, 4.4rem);
  line-height: 1.07;
  letter-spacing: -0.035em;
  font-weight: 700;
}

.hero__title .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.06em;
  margin-bottom: -0.02em;
}

.line__in {
  display: block;
  transform: translateY(112%);
  opacity: 0;
  transition: transform 1.05s var(--ease), opacity 0.8s ease;
}

.is-ready .line:nth-child(1) .line__in {
  transform: none;
  opacity: 1;
  transition-delay: 0.1s;
}

.is-ready .line:nth-child(2) .line__in {
  transform: none;
  opacity: 1;
  transition-delay: 0.24s;
}

.hero__desc {
  max-width: 48ch;
  font-size: 16px;
  line-height: 1.85;
  color: rgba(232, 237, 247, 0.7);
  white-space: pre-line;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 36px;
  margin-top: 38px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.meta-label {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.meta-item > span:last-child {
  font-size: 12.5px;
  color: var(--text-2);
}

.meta-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.meta-live i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #4ade80;
  animation: dotPulse 2.4s ease-in-out infinite;
}

/* --- Hero visual --- */
.hero__visual {
  position: relative;
  display: flex;
  justify-content: flex-end;
}

.stage {
  position: relative;
  width: min(100%, 430px);
  aspect-ratio: 1 / 1;
  transform-style: preserve-3d;
  transition: transform 0.5s var(--ease);
  margin-right: 6px;
}

.stage__glow {
  position: absolute;
  inset: 6%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 46%, rgba(96, 165, 250, 0.5), rgba(167, 139, 250, 0.2) 46%, transparent 70%);
  filter: blur(46px);
  animation: pulseGlow 8s ease-in-out infinite;
}

.stage__orb {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 45%;
  height: 45%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.9), rgba(165, 243, 252, 0.55) 18%, transparent 42%),
    radial-gradient(circle at 68% 72%, rgba(244, 114, 182, 0.55), transparent 52%),
    radial-gradient(circle at 38% 30%, #7dd3fc 0%, #6366f1 42%, #4c1d95 72%, #170b2e 100%);
  box-shadow:
    inset -18px -22px 46px rgba(2, 6, 23, 0.85),
    inset 12px 12px 34px rgba(255, 255, 255, 0.22),
    0 0 70px rgba(96, 165, 250, 0.4);
  animation: orbFloat 9s ease-in-out infinite;
}

.stage__orb::after {
  content: "";
  position: absolute;
  inset: -18%;
  border-radius: 50%;
  border: 1px solid rgba(147, 197, 253, 0.16);
  filter: blur(0.4px);
}

.stage__orb span {
  position: absolute;
  inset: 22%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.16), transparent 65%);
}

.ring {
  position: absolute;
  inset: 0;
  margin: auto;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.ring i {
  position: absolute;
  top: -3px;
  left: 50%;
  width: 5px;
  height: 5px;
  margin-left: -2.5px;
  border-radius: 50%;
  background: var(--c-mint);
  box-shadow: 0 0 10px 2px rgba(94, 234, 212, 0.7);
}

.ring--1 {
  width: 66%;
  height: 66%;
  animation: spin 22s linear infinite;
}

.ring--1 i {
  background: var(--c-blue);
  box-shadow: 0 0 10px 2px rgba(96, 165, 250, 0.7);
}

.ring--2 {
  width: 84%;
  height: 84%;
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.075);
  animation: spinRev 34s linear infinite;
}

.ring--2 i {
  background: var(--c-violet);
  box-shadow: 0 0 10px 2px rgba(167, 139, 250, 0.7);
}

.ring--3 {
  width: 100%;
  height: 100%;
  border-color: rgba(255, 255, 255, 0.055);
  animation: spin 48s linear infinite;
}

.ring--3 i {
  background: var(--c-pink);
  box-shadow: 0 0 10px 2px rgba(244, 114, 182, 0.7);
}

.terminal {
  position: absolute;
  right: -6%;
  bottom: 0;
  width: 322px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(9, 13, 22, 0.82);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  backdrop-filter: blur(20px) saturate(140%);
  box-shadow: 0 30px 70px -24px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  transform: rotate(-3.5deg);
  overflow: hidden;
  animation: floatCard 8.5s ease-in-out infinite;
}

.terminal__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 34px;
  padding: 0 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.025);
}

.terminal__dots {
  display: flex;
  gap: 5px;
}

.terminal__dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}

.terminal__dots i:nth-child(1) { background: #f87171; opacity: 0.75; }
.terminal__dots i:nth-child(2) { background: #fbbf24; opacity: 0.75; }
.terminal__dots i:nth-child(3) { background: #4ade80; opacity: 0.75; }

.terminal__name {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  color: var(--muted-2);
}

.terminal__live {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.1em;
  color: #4ade80;
  opacity: 0.85;
}

.terminal__code {
  padding: 13px 15px 15px;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.85;
  color: #d7e0ef;
  overflow-x: auto;
  scrollbar-width: none;
}

.terminal__code::-webkit-scrollbar {
  display: none;
}

.tok-k { color: #f0abfc; }
.tok-p { color: #93c5fd; }
.tok-s { color: #6ee7b7; }
.tok-b { color: #fdba74; }

.chip {
  position: absolute;
  z-index: 3;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(11, 16, 26, 0.85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  color: var(--text-2);
  box-shadow: 0 8px 24px -12px rgba(0, 0, 0, 0.9);
  white-space: nowrap;
}

.chip::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--c-mint);
  vertical-align: middle;
}

.chip--1 {
  top: 8%;
  left: -4%;
  animation: floatChip 7s ease-in-out infinite;
}

.chip--2 {
  right: -2%;
  top: 22%;
  animation: floatChip 8.5s ease-in-out infinite 0.6s;
}

.chip--2::before { background: var(--c-blue); }

.chip--3 {
  left: -8%;
  bottom: 30%;
  animation: floatChip 9s ease-in-out infinite 1.2s;
}

.chip--3::before { background: var(--c-violet); }

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.hero__scroll i {
  width: 1px;
  height: 38px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.35), transparent);
  position: relative;
  overflow: hidden;
}

.hero__scroll i::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 12px;
  background: var(--c-mint);
  animation: scrollLine 2.2s ease-in-out infinite;
}

/* =============================================================
   6. Marquee
   ============================================================= */
.marquee {
  position: relative;
  z-index: 3;
  padding: 16px 0;
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.016);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 42s linear infinite;
}

.marquee:hover .marquee__track {
  animation-play-state: paused;
}

.marquee__item {
  display: inline-flex;
  align-items: center;
  gap: 26px;
  padding-right: 26px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.marquee__item::after {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(94, 234, 212, 0.5);
}

/* =============================================================
   7. Sections
   ============================================================= */
.section {
  position: relative;
  z-index: 3;
  padding: clamp(84px, 10vw, 138px) 0;
}

.section__head {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 48px;
  align-items: end;
  margin-bottom: clamp(40px, 5vw, 62px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 18px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow::after {
  content: "";
  width: 38px;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.3), transparent);
}

.eyebrow__num {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 20px;
  border: 1px solid rgba(94, 234, 212, 0.28);
  border-radius: 5px;
  font-size: 9px;
  letter-spacing: 0.06em;
  color: var(--c-mint);
  background: rgba(94, 234, 212, 0.06);
}

.eyebrow--center {
  justify-content: center;
  margin-bottom: 16px;
}

.eyebrow--center::after {
  display: none;
}

.section__title {
  font-size: clamp(1.95rem, 3.5vw, 2.9rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
  font-weight: 700;
  color: #f4f7fd;
}

.section__lead {
  font-size: 15px;
  line-height: 1.85;
  color: var(--muted);
  max-width: 44ch;
}

.section__note {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 18px;
}

/* =============================================================
   8. About
   ============================================================= */
.about {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(30px, 5vw, 64px);
  align-items: start;
}

.profile-card {
  position: relative;
}

.profile-card__frame {
  position: relative;
  aspect-ratio: 1 / 1.12;
  padding: 24px 26px 26px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background:
    radial-gradient(120% 90% at 18% 0%, rgba(94, 234, 212, 0.16), transparent 55%),
    radial-gradient(110% 100% at 92% 100%, rgba(167, 139, 250, 0.22), transparent 62%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.012));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 30px 60px -40px rgba(0, 0, 0, 0.9);
}

.profile-card__top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--muted-2);
}

.profile-card__top span:last-child {
  color: rgba(255, 255, 255, 0.28);
}

.profile-card__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 30px 30px;
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 50%, #000, transparent 80%);
  mask-image: radial-gradient(ellipse 90% 80% at 50% 50%, #000, transparent 80%);
  opacity: 0.7;
}

.profile-card__monogram {
  position: relative;
  z-index: 2;
  align-self: center;
  font-size: clamp(4.5rem, 8.4vw, 6.2rem);
  line-height: 0.9;
  font-weight: 700;
  letter-spacing: -0.07em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 10px 30px rgba(96, 165, 250, 0.25));
}

.profile-card__scan {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  height: 28%;
  background: linear-gradient(180deg, transparent, rgba(96, 165, 250, 0.12), transparent);
  animation: scan 7.5s ease-in-out infinite;
  pointer-events: none;
}

.profile-card__frame::before {
  content: "";
  position: absolute;
  right: -86px;
  top: 34%;
  width: 300px;
  height: 300px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  box-shadow: 0 0 0 32px rgba(255, 255, 255, 0.022), 0 0 0 68px rgba(255, 255, 255, 0.012);
  pointer-events: none;
}

.corner {
  position: absolute;
  width: 12px;
  height: 12px;
  opacity: 0.42;
}

.corner--tl { top: 10px; left: 10px; border-top: 1px solid var(--c-mint); border-left: 1px solid var(--c-mint); }
.corner--tr { top: 10px; right: 10px; border-top: 1px solid var(--c-mint); border-right: 1px solid var(--c-mint); }
.corner--bl { bottom: 10px; left: 10px; border-bottom: 1px solid var(--c-mint); border-left: 1px solid var(--c-mint); }
.corner--br { bottom: 10px; right: 10px; border-bottom: 1px solid var(--c-mint); border-right: 1px solid var(--c-mint); }

.profile-card__caption {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-card__name {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.profile-card__role {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.profile-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}

.profile-card__loc {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--muted);
}

.profile-card__loc svg {
  width: 14px;
  height: 14px;
  color: var(--muted-2);
}

.profile-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border: 1px solid rgba(94, 234, 212, 0.24);
  border-radius: 999px;
  background: rgba(94, 234, 212, 0.06);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #9df0e2;
}

.profile-card__badge i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #4ade80;
  animation: dotPulse 2.4s ease-in-out infinite;
}

.about__text p {
  font-size: 15.5px;
  line-height: 1.9;
  color: rgba(232, 237, 247, 0.7);
  margin-bottom: 17px;
}

.about__text p:first-child {
  font-size: 17px;
  color: var(--text-2);
  line-height: 1.85;
}

.about__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 24px;
  margin-top: 26px;
}

.about__item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.about__check {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  background: rgba(94, 234, 212, 0.06);
}

.about__check svg {
  width: 11px;
  height: 11px;
  stroke: var(--c-mint);
}

.about__item strong {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-2);
  letter-spacing: 0.01em;
}

.about__item div span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted);
}

.stats {
  display: grid;
  grid-template-columns: repeat(var(--stat-cols, 4), minmax(0, 1fr));
  gap: 0;
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

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

.stat__num {
  display: block;
  font-family: var(--mono);
  font-size: clamp(1.5rem, 2.4vw, 1.95rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #f2f6fd;
}

.stat__num i {
  font-style: normal;
  color: var(--c-mint);
  font-size: 0.7em;
  margin-left: 1px;
}

.stat__label {
  display: block;
  margin-top: 8px;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* =============================================================
   9. Skills
   ============================================================= */
.skills {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.skill {
  position: relative;
  padding: 26px 26px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.012));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
  transition: border-color 0.4s ease, transform 0.5s var(--ease), box-shadow 0.5s;
}

.skill::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, var(--sc, #5eead4), transparent 40%, transparent 70%, var(--sc, #5eead4));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.5s;
  pointer-events: none;
}

.skill:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 24px 50px -30px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.skill:hover::before {
  opacity: 0.35;
}

.skill__head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 24px;
}

.skill__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.015));
  color: var(--sc, #5eead4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.skill__icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skill__head h3 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.005em;
}

.skill__head p {
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted-2);
}

.skill__bars {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.bar__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.bar__label {
  font-size: 12.5px;
  color: var(--text-2);
  letter-spacing: 0.01em;
}

.bar__val {
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.bar__track {
  display: block;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.bar__fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--sc, #5eead4), rgba(255, 255, 255, 0.9));
  box-shadow: 0 0 12px -2px var(--sc, #5eead4);
  transition: width 1.35s var(--ease) 0.15s;
}

.skill.in .bar__fill {
  width: var(--w);
}

.skill__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.skill__tags li {
  padding: 3px 8px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.025);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.03em;
  color: var(--muted);
  transition: color 0.3s, border-color 0.3s;
}

.skill:hover .skill__tags li {
  color: var(--muted);
  border-color: rgba(255, 255, 255, 0.11);
}

/* =============================================================
   10. Work
   ============================================================= */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font-size: 12.5px;
  cursor: pointer;
  transition: color 0.3s, background 0.3s, border-color 0.3s, transform 0.3s var(--ease);
}

.filter-btn:hover {
  color: var(--text-2);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.filter-btn.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.075);
  border-color: rgba(255, 255, 255, 0.22);
}

.filter-btn::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--c-mint);
  opacity: 0;
  transition: opacity 0.3s;
}

.filter-btn.is-active::before {
  opacity: 1;
}

.projects {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}

.project {
  grid-column: span 2;
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
  overflow: hidden;
  transition: transform 0.55s var(--ease), border-color 0.4s, box-shadow 0.5s;
}

.project--lg {
  grid-column: span 3;
}

/* 筛选后按结果数量重排，避免出现空列 */
.projects.is-filtered[data-count="1"] .project {
  grid-column: 2 / span 4;
}

.projects.is-filtered[data-count="1"] .project .project__cover {
  aspect-ratio: 16 / 7;
}

.projects.is-filtered[data-count="2"] .project {
  grid-column: span 3;
}

.projects.is-filtered[data-count="2"] .project .project__cover {
  aspect-ratio: 16 / 9;
}

.projects.is-filtered[data-count="3"] .project {
  grid-column: span 2;
}

.project.is-hidden {
  display: none;
}

.project:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.19);
  box-shadow: 0 30px 60px -34px rgba(0, 0, 0, 0.95);
}

.project:focus-within {
  border-color: rgba(94, 234, 212, 0.4);
}

.project__cover {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #090e17;
}

.project--lg .project__cover {
  aspect-ratio: 16 / 8.6;
}

.project__art {
  position: absolute;
  inset: 0;
  transform: scale(1.001);
  transition: transform 0.7s var(--ease);
}

.project__art::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 34px 34px;
  -webkit-mask-image: radial-gradient(ellipse 100% 100% at 50% 50%, #000 20%, transparent 78%);
  mask-image: radial-gradient(ellipse 100% 100% at 50% 50%, #000 20%, transparent 78%);
  opacity: 0.55;
}

.project__art::after {
  content: "";
  position: absolute;
  left: var(--gx, 50%);
  top: var(--gy, 50%);
  width: 62%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  box-shadow: 0 0 0 26px rgba(255, 255, 255, 0.038), 0 0 0 54px rgba(255, 255, 255, 0.022);
  transition: transform 0.9s var(--ease);
}

.project:hover .project__art {
  transform: scale(1.055);
}

.project__cover::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(180deg, rgba(4, 7, 13, 0.42), transparent 28%, transparent 72%, rgba(4, 7, 13, 0.32));
  pointer-events: none;
}

.project__cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 40%), rgba(255, 255, 255, 0.18), transparent 65%);
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
  z-index: 2;
}

.project:hover .project__cover::after {
  opacity: 1;
}

.project__index,
.project__year {
  position: absolute;
  top: 14px;
  z-index: 3;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.88);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.65);
}

.project__index { left: 16px; }
.project__year { right: 16px; color: rgba(255, 255, 255, 0.68); }

.project__badge {
  position: absolute;
  left: 16px;
  bottom: 14px;
  z-index: 3;
  padding: 4px 9px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(5, 7, 13, 0.5);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #fff;
}

.project__glyph {
  position: absolute;
  right: 8px;
  bottom: -26px;
  z-index: 1;
  font-size: 118px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.06em;
  color: rgba(255, 255, 255, 0.14);
  pointer-events: none;
  transition: transform 0.8s var(--ease), color 0.5s;
}

.project--lg .project__glyph {
  right: 18px;
  bottom: -34px;
  font-size: 156px;
}

.project:hover .project__glyph {
  transform: translateY(-5px);
  color: rgba(255, 255, 255, 0.19);
}

.project__body {
  position: relative;
  z-index: 3;
  padding: 19px 21px 21px;
}

.project__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.project__title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.008em;
  line-height: 1.4;
}

/* 整卡点击热区 */
.project__hit {
  position: absolute;
  inset: 0;
  z-index: 6;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
}

.project__hit:focus-visible {
  outline: 2px solid var(--c-mint);
  outline-offset: -3px;
}

.project__arrow {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  color: var(--muted);
  transition: color 0.35s, border-color 0.35s, background 0.35s, transform 0.45s var(--ease);
}

.project__arrow svg {
  width: 12px;
  height: 12px;
}

.project:hover .project__arrow {
  color: #06121a;
  border-color: transparent;
  background: var(--c-mint);
  transform: translate(2px, -2px) rotate(0deg);
}

.project__desc {
  margin-top: 9px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 15px;
}

.project__tags li {
  padding: 3px 7px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 5px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.03em;
  color: var(--muted);
}

/* 作品网格收尾卡片 */
.project-cta {
  grid-column: span 6;
  align-self: stretch;
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  min-height: 172px;
  padding: 32px 40px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  background:
    radial-gradient(90% 150% at 100% 0%, rgba(94, 234, 212, 0.08), transparent 58%),
    linear-gradient(165deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0.006));
  overflow: hidden;
  transition: border-color 0.4s, background 0.4s, transform 0.5s var(--ease);
}

.project-cta::after {
  content: "";
  position: absolute;
  right: -46px;
  bottom: -110px;
  width: 280px;
  height: 280px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 50%;
  box-shadow: 0 0 0 40px rgba(255, 255, 255, 0.022), 0 0 0 82px rgba(255, 255, 255, 0.012);
  pointer-events: none;
}

.project-cta:hover {
  transform: translateY(-4px);
  border-color: rgba(94, 234, 212, 0.42);
  background:
    radial-gradient(90% 150% at 100% 0%, rgba(94, 234, 212, 0.13), transparent 58%),
    linear-gradient(165deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
}

.project-cta[hidden] {
  display: none;
}

.project-cta__body {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 72%;
}

.project-cta__label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-mint);
}

.project-cta__title {
  font-size: clamp(1.25rem, 2.4vw, 1.65rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.4;
}

.project-cta__meta {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.7;
}

.project-cta__arrow {
  position: absolute;
  top: 50%;
  right: 40px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  color: var(--muted);
  transform: translateY(-50%);
  transition: color 0.35s, background 0.35s, border-color 0.35s, translate 0.4s var(--ease);
}

.project-cta__arrow svg {
  width: 16px;
  height: 16px;
}

.project-cta:hover .project-cta__arrow {
  color: #04121a;
  background: var(--c-mint);
  border-color: transparent;
  translate: 3px -3px;
}

/* =============================================================
   11. Timeline
   ============================================================= */
.timeline-wrap {
  position: relative;
  padding: 10px 0 0;
}

.timeline__axis {
  position: absolute;
  top: 0;
  bottom: 26px;
  left: 50%;
  width: 1px;
  background: rgba(255, 255, 255, 0.13);
}

.timeline__fill {
  position: absolute;
  top: 0;
  left: 50%;
  width: 1px;
  height: 0;
  background: linear-gradient(180deg, #5eead4, #60a5fa 45%, #a78bfa 80%, transparent);
  box-shadow: 0 0 14px rgba(96, 165, 250, 0.6);
  transition: height 0.2s linear;
}

.timeline {
  position: relative;
  z-index: 2;
}

.tl {
  position: relative;
  width: 50%;
  padding: 0 46px 38px 0;
}

.tl:nth-child(even) {
  margin-left: 50%;
  padding: 0 0 38px 46px;
}

.tl:last-child {
  padding-bottom: 0;
}

.tl__dot {
  position: absolute;
  top: 26px;
  right: -5px;
  z-index: 2;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--c-mint), var(--c-blue));
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.1), 0 0 14px rgba(94, 234, 212, 0.6);
}

.tl:nth-child(even) .tl__dot {
  right: auto;
  left: -5px;
}

.tl__content {
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.01));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: border-color 0.4s, transform 0.45s var(--ease), background 0.4s;
}

.tl__content:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.17);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015));
}

.tl__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}

.tl__date {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  color: var(--c-mint);
}

.tl__now {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  border: 1px solid rgba(74, 222, 128, 0.3);
  border-radius: 999px;
  background: rgba(74, 222, 128, 0.08);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #86efac;
}

.tl__now::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #4ade80;
  animation: dotPulse 2.4s ease-in-out infinite;
}

.tl__title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.005em;
  line-height: 1.45;
}

.tl__org {
  margin-top: 3px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.tl__desc {
  margin-top: 9px;
  font-size: 13px;
  line-height: 1.8;
  color: rgba(232, 237, 247, 0.62);
}

.tl__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tl__tags li {
  padding: 2px 7px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 5px;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted);
}

/* =============================================================
   12. Contact
   ============================================================= */
.section--contact {
  padding-top: 20px;
}

.contact__panel {
  position: relative;
  overflow: hidden;
  padding: clamp(40px, 6vw, 78px) clamp(22px, 5vw, 64px);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: var(--radius-lg);
  text-align: center;
  background:
    radial-gradient(120% 100% at 50% -10%, rgba(96, 165, 250, 0.2), transparent 55%),
    radial-gradient(90% 80% at 8% 110%, rgba(94, 234, 212, 0.12), transparent 60%),
    linear-gradient(170deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.012));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 50px 100px -70px rgba(96, 165, 250, 0.6);
}

.contact__glow {
  position: absolute;
  top: -44%;
  left: 50%;
  width: 70%;
  aspect-ratio: 1;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.4), rgba(167, 139, 250, 0.16) 45%, transparent 68%);
  filter: blur(60px);
  pointer-events: none;
  animation: pulseGlow 10s ease-in-out infinite;
}

.contact__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 40%, #000, transparent 78%);
  mask-image: radial-gradient(ellipse 70% 70% at 50% 40%, #000, transparent 78%);
  pointer-events: none;
}

.contact__panel > *:not(.contact__glow):not(.contact__grid) {
  position: relative;
  z-index: 2;
}

.contact__title {
  font-size: clamp(2.05rem, 5vw, 3.6rem);
  line-height: 1.16;
  letter-spacing: -0.035em;
  font-weight: 700;
}

.contact__desc {
  max-width: 52ch;
  margin: 16px auto 0;
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--muted);
}

.contact__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
}

.btn__email {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.01em;
}

.socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.social {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  text-align: left;
  transition: transform 0.4s var(--ease), border-color 0.35s, background 0.35s;
}

.social:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.045);
}

.social__text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.social__label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-2);
  line-height: 1.4;
}

.social__handle {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.04em;
  color: var(--muted);
  line-height: 1.4;
}

.social__arrow {
  width: 12px;
  height: 12px;
  color: var(--muted-2);
  transition: transform 0.35s var(--ease), color 0.35s;
}

.social:hover .social__arrow {
  transform: translate(2px, -2px);
  color: var(--c-mint);
}

.social__arrow svg {
  width: 12px;
  height: 12px;
}

.contact__note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
}

/* =============================================================
   13. Footer
   ============================================================= */
.footer {
  position: relative;
  z-index: 3;
  padding: 26px 0 30px;
  border-top: 1px solid var(--line);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12px;
  color: var(--muted);
}

.footer__meta {
  display: flex;
  gap: 14px;
  opacity: 0.78;
}

.footer__top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  transition: color 0.3s, transform 0.3s var(--ease);
}

.footer__top:hover {
  color: var(--text);
  transform: translateY(-2px);
}

/* =============================================================
   14. Modal
   ============================================================= */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s;
}

.modal.is-open {
  opacity: 1;
  visibility: visible;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 4, 10, 0.74);
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
}

.modal__panel {
  position: relative;
  width: min(700px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  background: #080c15;
  box-shadow: 0 50px 130px -30px rgba(0, 0, 0, 0.95);
  transform: translateY(20px) scale(0.98);
  transition: transform 0.5s var(--ease);
}

.modal.is-open .modal__panel {
  transform: none;
}

.modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 6;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(4, 7, 13, 0.45);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #fff;
  cursor: pointer;
  transition: transform 0.4s var(--ease), background 0.3s;
}

.modal__close:hover {
  transform: rotate(90deg);
  background: rgba(4, 7, 13, 0.8);
}

.modal__close svg {
  width: 16px;
  height: 16px;
}

.modal__cover {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: #0a1020;
  box-shadow: inset 0 -80px 70px -55px rgba(8, 12, 21, 0.95);
}

.modal__cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 34px 34px;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent);
  mask-image: linear-gradient(180deg, #000, transparent);
  opacity: 0.6;
}

.modal__cover-index {
  position: absolute;
  left: 24px;
  bottom: -14px;
  font-family: var(--mono);
  font-size: 92px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.06em;
  color: rgba(255, 255, 255, 0.16);
}

.modal__cover-tag {
  position: absolute;
  top: 18px;
  left: 24px;
  padding: 4px 10px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  background: rgba(5, 7, 13, 0.4);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  color: #fff;
}

.modal__body {
  padding: 26px clamp(20px, 4vw, 34px) 32px;
}

.modal__meta {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-mint);
  margin-bottom: 8px;
}

.modal__title {
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.3;
}

.modal__desc {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.85;
  color: var(--muted);
}

.modal__label {
  margin: 24px 0 10px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.modal__points {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal__points li {
  position: relative;
  padding-left: 18px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text-2);
}

.modal__points li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--c-mint), var(--c-blue));
}

.modal__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 22px;
}

.modal__tags li {
  padding: 3px 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--muted);
}

.modal__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.modal__hint {
  font-size: 11.5px;
  color: var(--muted);
}

.modal__hint span {
  font-family: var(--mono);
  color: var(--muted);
}

/* =============================================================
   15. Toast
   ============================================================= */
.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 110;
  padding: 12px 20px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(10, 15, 24, 0.95);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.9);
  font-size: 13px;
  color: var(--text-2);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 14px);
  transition: opacity 0.35s ease, transform 0.4s var(--ease), visibility 0.35s;
  pointer-events: none;
  white-space: nowrap;
}

.toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

/* =============================================================
   16. Reveal & keyframes
   ============================================================= */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--d, 0ms);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

.no-js .reveal {
  opacity: 1;
  transform: none;
}

@keyframes gradShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes dotPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.16); }
  50% { opacity: 0.55; box-shadow: 0 0 0 5px rgba(74, 222, 128, 0.04); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes spinRev {
  to { transform: rotate(-360deg); }
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.75; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.06); }
}

@keyframes orbFloat {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -14px; }
}

@keyframes floatCard {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -10px; }
}

@keyframes floatChip {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -8px; }
}

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

@keyframes scan {
  0% { top: -30%; opacity: 0; }
  25% { opacity: 1; }
  75% { opacity: 1; }
  100% { top: 102%; opacity: 0; }
}

@keyframes scrollLine {
  0% { transform: translateY(-14px); }
  60%, 100% { transform: translateY(40px); }
}

@keyframes driftA {
  from { translate: 0 0; }
  to { translate: 70px 40px; }
}

@keyframes driftB {
  from { translate: 0 0; }
  to { translate: 50px -40px; }
}

@keyframes driftC {
  from { translate: 0 0; }
  to { translate: -60px -30px; }
}

/* =============================================================
   17. Responsive
   ============================================================= */
@media (max-width: 1080px) {
  .hero {
    padding-top: 120px;
  }

  .hero__inner {
    grid-template-columns: 1fr;
    gap: 54px;
  }

  .hero__copy {
    max-width: 720px;
  }

  .hero__visual {
    justify-content: center;
  }

  .stage {
    width: min(100%, 400px);
  }

  .hero__scroll {
    display: none;
  }

  .about {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  }

  .profile-card__frame {
    aspect-ratio: 1 / 1.2;
  }
}

@media (max-width: 900px) {
  html {
    scrollbar-gutter: auto;
  }

  .container,
  .hero__inner {
    width: calc(100% - 40px);
  }

  .nav,
  .header__cta {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .header__inner {
    height: 68px;
  }

  .header.is-scrolled .header__inner {
    height: 62px;
  }

  .mobile-menu {
    top: 74px;
  }

  .section__head {
    grid-template-columns: 1fr;
    gap: 18px;
    align-items: start;
  }

  .section__lead {
    max-width: 56ch;
  }

  .about {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .profile-card {
    width: 100%;
    max-width: 420px;
    margin-inline: auto;
  }

  .profile-card__frame {
    aspect-ratio: 1 / 1.05;
  }

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

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

  .project,
  .project--lg {
    grid-column: span 1;
  }

  .projects.is-filtered[data-count] .project {
    grid-column: span 1;
  }

  .projects.is-filtered[data-count="1"] .project {
    grid-column: 1 / -1;
  }

  .projects.is-filtered[data-count] .project .project__cover {
    aspect-ratio: 16 / 10;
  }

  .project-cta {
    grid-column: span 2;
    min-height: 180px;
  }

  .project--lg .project__cover {
    aspect-ratio: 16 / 10;
  }

  .timeline__axis,
  .timeline__fill {
    left: 4px;
  }

  .tl,
  .tl:nth-child(even) {
    width: 100%;
    margin-left: 0;
    padding: 0 0 26px 32px;
  }

  .tl:last-child {
    padding-bottom: 0;
  }

  .tl__dot,
  .tl:nth-child(even) .tl__dot {
    left: 0;
    right: auto;
    top: 24px;
    width: 9px;
    height: 9px;
  }

  .contact__panel {
    border-radius: 24px;
  }

  .socials {
    gap: 8px;
  }

  .footer__inner {
    font-size: 11px;
  }

  .footer__meta {
    display: none;
  }
}

@media (min-width: 641px) and (max-width: 900px) {
  .projects .project:nth-of-type(3) {
    grid-column: span 2;
  }
}

@media (max-width: 640px) {
  .container,
  .hero__inner {
    width: calc(100% - 32px);
  }

  .hero {
    padding: 106px 0 64px;
    min-height: auto;
  }

  .hero__title {
    font-size: clamp(2.3rem, 10.6vw, 3rem);
  }

  .hero__desc {
    font-size: 14.5px;
    line-height: 1.8;
  }

  .hero__meta {
    gap: 18px 26px;
    margin-top: 30px;
  }

  .meta-item:nth-child(3) {
    display: none;
  }

  .hero__visual {
    margin-top: 4px;
  }

  .stage {
    width: min(100%, 330px);
  }

  .terminal {
    width: min(272px, 82%);
    right: 0;
    bottom: -2%;
    transform: rotate(-3deg);
  }

  .terminal__code {
    font-size: 10px;
    line-height: 1.8;
  }

  .chip--1 { left: -2%; top: 4%; }
  .chip--2 { right: 0; top: 14%; }
  .chip--3 { display: none; }

  .marquee__item {
    font-size: 10.5px;
    gap: 20px;
    padding-right: 20px;
  }

  .section {
    padding: 72px 0;
  }

  .section__title {
    font-size: clamp(1.7rem, 7.4vw, 2.1rem);
  }

  .section__lead {
    font-size: 14px;
  }

  .profile-card {
    max-width: 100%;
  }

  .profile-card__frame {
    aspect-ratio: 1 / 0.92;
  }

  .about__list {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 0;
  }

  .stat:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }

  .stat:nth-child(n + 3) {
    padding-top: 18px;
    border-top: 1px solid var(--line);
  }

  .stat:last-child:nth-child(odd) {
    grid-column: span 2;
  }

  .skill {
    padding: 22px 20px;
  }

  .projects {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .project-cta {
    grid-column: span 1;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    min-height: 190px;
    padding: 26px;
  }

  .project-cta__body {
    gap: 6px;
    max-width: 100%;
    padding-right: 44px;
  }

  .project-cta__title {
    font-size: 1.15rem;
  }

  .project-cta__arrow {
    top: 22px;
    right: 22px;
    width: 38px;
    height: 38px;
    transform: none;
  }

  .project-cta__arrow svg {
    width: 13px;
    height: 13px;
  }

  .project-cta:hover .project-cta__arrow {
    translate: 0 0;
  }

  .project__cover,
  .project--lg .project__cover {
    aspect-ratio: 16 / 9.5;
  }

  .project__glyph {
    font-size: 96px;
    bottom: -20px;
  }

  .project--lg .project__glyph {
    font-size: 110px;
    bottom: -24px;
  }

  .filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .filters::-webkit-scrollbar {
    display: none;
  }

  .filter-btn {
    flex-shrink: 0;
  }

  .contact__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .contact__actions .btn {
    width: 100%;
  }

  .btn__email {
    font-size: 12px;
  }

  .socials {
    display: grid;
    grid-template-columns: 1fr;
    max-width: 360px;
    margin-inline: auto;
    text-align: left;
  }

  .social {
    min-width: 0;
  }

  .social__handle {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .modal {
    padding: 12px;
  }

  .modal__panel {
    max-height: 92vh;
    border-radius: 20px;
  }

  .modal__cover {
    height: 150px;
  }

  .modal__cover-index {
    font-size: 68px;
    left: 18px;
    bottom: -10px;
  }

  .modal__cover-tag {
    left: 18px;
    top: 14px;
  }

  .modal__body {
    padding: 22px 18px 26px;
  }

  .modal__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .modal__hint {
    text-align: center;
  }

  .footer {
    padding-bottom: 26px;
  }

  .footer__copy {
    line-height: 1.7;
  }

  /* 移动端降低背景层的渲染开销 */
  .ambient__orb {
    filter: blur(64px);
    opacity: 0.45;
  }

  .ambient__orb--a {
    width: 380px;
    height: 380px;
  }

  .ambient__orb--b {
    width: 320px;
    height: 320px;
  }

  .ambient__orb--c {
    width: 360px;
    height: 360px;
  }

  .grain {
    opacity: 0.025;
  }
}

/* =============================================================
   18. Reduced motion & fallbacks
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .line__in {
    transform: none;
    opacity: 1;
  }

  .skill .bar__fill {
    width: var(--w);
  }

  .cursor-glow {
    display: none;
  }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .header.is-scrolled,
  .mobile-menu,
  .modal__panel,
  .terminal,
  .chip {
    background: #0a0f19;
  }
}

@media (hover: none) {
  .cursor-glow {
    display: none;
  }

  .project:hover,
  .skill:hover,
  .tl__content:hover,
  .social:hover {
    transform: none;
  }
}
