/* css/style.css */

/* === Reset & Custom Properties === */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* The inline icon sprite exists only so repeated glyphs can be referenced through <use>
   instead of each carrying a copy of their path data. It must stay out of layout. */
.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

:root {
  --bg-primary: #0f0a1a;
  --bg-card: rgba(30, 20, 50, 0.7);
  --accent-pink: #f75c7e;
  --accent-violet: #7c3aed;
  --accent-bright: #ff7eb3;

  /* RGB triplets for the three accent hues above, so every glow and shadow alpha is
     written `rgba(var(--accent-pink-rgb), 0.25)`. Without these the channel values were
     restated at 26 call sites, which made re-theming a hunt rather than an edit. */
  --accent-pink-rgb: 247, 92, 126;
  --accent-violet-rgb: 124, 58, 237;
  --accent-bright-rgb: 255, 126, 179;
  --gradient: linear-gradient(135deg, #f75c7e, #7c3aed);
  --text-primary: #e8e0f0;
  --text-secondary: #a09bb5;
  /* === Type system ===
     All faces are self-hosted from /fonts, generated at build time by
     scripts/build-fonts.mjs — so a reader in mainland China never waits on
     fonts.googleapis.com, which is unreliable there.

     Composition is per-glyph: each Latin face carries Latin/digits only, so a Han
     character finds no glyph in it and falls through to Noto Sans SC
     (Source Han Sans / 思源黑体). System faces are the final safety net. */
  --font-latin: "Inter Variable";
  --font-cjk: "Noto Sans SC Variable";
  --font-mono-latin: "JetBrains Mono Variable";

  --font-heading: var(--font-latin), var(--font-cjk), "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: var(--font-latin), var(--font-cjk), system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: var(--font-mono-latin), var(--font-cjk), ui-monospace, "Cascadia Code", Menlo, Consolas, monospace;
  --nav-height: 80px;
  --section-padding: 115px 0;
}

button, input, textarea, select {
  font-family: inherit;
}

html {
  font-size: 20.5px;
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* === Grid Overlay (fades on scroll) === */
#grid-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(var(--accent-violet-rgb), 0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(var(--accent-violet-rgb), 0.08) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 1;
  transition: opacity 0.1s linear;
}

/* === Bottom glow (initial, on body) === */
body {
  --glow-opacity: 1;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 90% 40% at 50% 100%, rgba(var(--accent-pink-rgb), 0.12), transparent 70%);
  opacity: var(--glow-opacity);
  transition: opacity 0.1s linear;
}

/* === Top highlight (appears on scroll) === */
#top-highlight {
  position: fixed;
  top: -60px;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 90% 35% at 50% 0%, rgba(var(--accent-violet-rgb), 0.12), transparent 70%);
  opacity: 0;
  transition: opacity 0.1s linear;
}

a {
  color: var(--accent-bright);
  text-decoration: none;
  transition: color 0.3s;
}

a:hover {
  color: var(--accent-pink);
}

.section {
  padding: var(--section-padding) 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  text-transform: uppercase;
  text-align: left;
  margin-bottom: 1.5rem;
  color: #f06e8e;
}

/* === Particle Canvas === */
#particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* === Navigation === */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0.75rem 0;
  transform: translateY(0);
  will-change: transform, opacity;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transition: opacity 0.32s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

#navbar::before,
#navbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 140%;
  pointer-events: none;
}

#navbar::before {
  z-index: -2;
  background: linear-gradient(to bottom, rgba(15, 10, 26, 0.85), transparent);
}

#navbar::after {
  z-index: -1;
  mask: linear-gradient(0deg, transparent 0%, #000 80%);
  -webkit-mask: linear-gradient(0deg, transparent 0%, #000 80%);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

#navbar.hidden {
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transform: translateZ(0);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.nav-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
}

.nav-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

/* === Segmented Capsule Navigation (Hakadao Style) === */
.nav-pill {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 3px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px) brightness(1.2);
  -webkit-backdrop-filter: blur(12px) brightness(1.2);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  padding: 4px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
}

.nav-seg-divider {
  width: 1px;
  height: 16px;
  background-color: rgba(255, 255, 255, 0.14);
  flex-shrink: 0;
}

.nav-item {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.42rem 1.15rem;
  border-radius: 9999px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  text-decoration: none;
  mix-blend-mode: lighten;
}

.nav-item:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.nav-item.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.22);
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

/* Standalone CTA Button in Navbar */
.nav-cta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 1.15rem;
  border-radius: 9999px;
  font-size: 0.88rem;
  font-weight: 600;
  background: #ffffff;
  color: #0b0714;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-cta-pill:hover {
  background: #f4f4f6;
  color: #000000;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
  transform: translateY(-1px);
}

.nav-cta-pill svg {
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.nav-cta-pill:hover svg {
  transform: scale(1.12);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: transform 0.3s, opacity 0.3s;
}

/* === Card base === */
.card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 1.5rem;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 40px rgba(var(--accent-pink-rgb), 0.12);
  border-color: rgba(var(--accent-pink-rgb), 0.25);
}

/* === Scroll reveal === */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(.16, 1, .3, 1), transform 0.7s cubic-bezier(.16, 1, .3, 1);
}

.reveal[data-reveal="scale"] {
  transform: scale(0.92);
}

.reveal[data-reveal="slide-left"] {
  transform: translateX(-40px);
}

.reveal[data-reveal="slide-right"] {
  transform: translateX(40px);
}

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

/* === Hero === */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: calc(var(--nav-height) + 1.5rem) 1.5rem 2rem;
}

.hero-split {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3.5rem;
  align-items: center;
  max-width: 1080px;
  width: 100%;
}

/* -- Hero Left: 3D Pixel Avatar Card -- */
.hero-left {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-avatar-large {
  display: flex;
  justify-content: center;
  align-items: center;
}

@keyframes avatar-card-in {
  0% {
    opacity: 0;
    transform: translate3d(-46px, 22px, 0) scale(0.82) rotate(-7deg);
  }
  52% {
    opacity: 1;
    transform: translate3d(10px, -8px, 0) scale(1.045) rotate(2deg);
  }
  74% {
    transform: translate3d(-4px, 3px, 0) scale(0.98) rotate(-0.7deg);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1) rotate(0deg);
  }
}

.pixel-avatar {
  position: relative;
  width: clamp(270px, 26vw, 350px);
  aspect-ratio: 1;
  background: transparent;
  border: none;
  box-shadow: none;
  overflow: visible; /* Native integration: no clipping frame */
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Image fallback (visible only if JS/WebGL fails) */
.pixel-avatar .pixel-fallback {
  width: 82%;
  height: 82%;
  border-radius: 20px;
  object-fit: cover;
  display: block;
}

.pixel-avatar.has-gl .pixel-fallback,
.pixel-avatar.is-loading .pixel-fallback {
  display: none;
}

.pixel-avatar.is-fallback .pixel-fallback {
  display: block;
}

/* Keep the raw image and the WebGL card out of the first paint until the
   real texture is ready, then reveal only the finished 3D card. */
.pixel-avatar.is-loading {
  visibility: hidden;
}

.pixel-avatar .pixel-canvas {
  opacity: 0;
  transition: none;
}

.pixel-avatar.is-ready {
  visibility: visible;
  animation: avatar-card-in 0.98s cubic-bezier(0.22, 1, 0.36, 1) 0.28s both;
}

.pixel-avatar.is-ready .pixel-canvas {
  opacity: 1;
}

.pixel-avatar.is-fallback {
  visibility: visible;
}

.pixel-avatar.is-loading .pixel-canvas,
.pixel-avatar.is-fallback .pixel-canvas {
  pointer-events: none;
}

.pixel-avatar.is-fallback .pixel-canvas {
  display: none;
}

/* 3D WebGL Canvas: extends with padding so tilted corners never clip */
.pixel-canvas {
  position: absolute;
  top: -25%;
  left: -25%;
  width: 150%;
  height: 150%;
  display: block;
  pointer-events: auto;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.pixel-canvas:active {
  cursor: grabbing;
}

/* -- Hero Right: Terminal (embedded in background) -- */
.hero-right {
  display: flex;
  flex-direction: column;
}

.hero-terminal {
  font-family: var(--font-mono);
  padding: 0;
}

/* Entrance animations for terminal elements */
.terminal-cmdline {
  font-size: 0.85rem;
  opacity: 0;
  margin-bottom: 0.5rem;
  animation: heroRowIn 0.78s cubic-bezier(0.22, 1, 0.36, 1) 0.25s forwards;
}

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

.terminal-user {
  color: var(--accent-pink);
}

.terminal-sep {
  color: var(--text-secondary);
  opacity: 0.5;
}

.terminal-path {
  color: var(--accent-violet);
}

.terminal-cmd {
  color: var(--text-primary);
  margin-left: 0.5rem;
}

.terminal-output {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  line-height: 1.2;
  opacity: 0;
  animation: heroRowIn 0.78s cubic-bezier(0.22, 1, 0.36, 1) 0.45s forwards;
}

.typing-text {
  background: linear-gradient(
    90deg,
    #e0dfe4 0%,
    #e0dfe4 2%,
    #f0a6c0 12%,
    #ff7eb3 30%,
    #ffa4c6 45%,
    #ff7eb3 60%,
    #f0a6c0 78%,
    #e0dfe4 90%,
    #e0dfe4 100%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 6s linear infinite;
  animation-delay: 2.5s;
}

@keyframes shimmer {
  0% { background-position: 0% center; }
  100% { background-position: -200% center; }
}

.terminal-gt {
  color: var(--text-secondary);
  margin-right: 0.25rem;
}

.typing-cursor {
  font-weight: 300;
  animation: blink 1s step-end infinite;
  color: var(--accent-bright);
  text-shadow: 0 0 8px rgba(var(--accent-bright-rgb), 0.8), 0 0 20px rgba(var(--accent-bright-rgb), 0.4);
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.terminal-role {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.4rem;
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  opacity: 0;
  animation: heroRowIn 0.78s cubic-bezier(0.22, 1, 0.36, 1) 0.65s forwards;
}

.tag-item {
  display: inline-block;
  border: 1px solid var(--text-secondary);
  border-radius: 4px;
  padding: 0.1em 0.4em;
  font-size: 0.85rem;
  opacity: 0.7;
  margin: 0 0.3em;
}

.terminal-quote {
  font-size: 0.95rem;
  color: var(--text-primary);
  padding-left: 1rem;
  border-left: 3px solid var(--accent-violet);
  margin-bottom: 0.75rem;
  white-space: nowrap;
  line-height: 1.6;
  opacity: 0;
  animation: heroRowIn 0.78s cubic-bezier(0.22, 1, 0.36, 1) 0.85s forwards;
}

/* ==========================================================================
   Hero Interactive Rows (Terminal Keycap Frames & Framed Typography)
   ========================================================================== */

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

/* --------------------------------------------------------------------------
   Row 1: External Sub-sites (Cyber Pink Keycap Frames)
   -------------------------------------------------------------------------- */
.hero-sites-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.85rem;
  opacity: 0;
  animation: sitesRowIn 0.78s cubic-bezier(0.22, 1, 0.36, 1) 1.05s forwards;
}

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

.hero-site-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1rem;
  border-radius: 9999px;
  background-color: rgba(var(--accent-pink-rgb), 0.12);
  border: none;
  color: #ff6e8e;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  user-select: none;
  transition: color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.hero-site-btn .site-icon {
  width: 22px;
  height: 22px;
  color: inherit;
  flex-shrink: 0;
}

.hero-site-btn .site-label {
  font-size: 0.88rem;
  color: inherit;
}

.hero-site-btn .site-arrow {
  width: 14px;
  height: 14px;
  color: rgba(var(--accent-pink-rgb), 0.85);
  flex-shrink: 0;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), color 0.25s ease;
}

/* Hover: Solid Pink Invert Fill (Clean Physical Shadow, Zero Neon Glow) */
.hero-site-btn:hover {
  background-color: #f75c7e;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  transform: translateY(-2px);
}

.hero-site-btn:hover .site-arrow {
  color: #ffffff;
  transform: translate(2px, -2px);
}

.hero-site-btn:active {
  transform: translateY(1px);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* --------------------------------------------------------------------------
   Row 2: Social Net Profiles (Hakadao Circular Brand Icons)
   -------------------------------------------------------------------------- */
.hero-social-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.85rem;
  opacity: 0;
  animation: socialRowIn 0.78s cubic-bezier(0.22, 1, 0.36, 1) 1.25s forwards;
}

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

.hero-social-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  position: relative;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              background-color 0.3s ease,
              box-shadow 0.3s ease;
}

.hero-social-circle svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s ease;
}

.hero-social-circle .social-brand-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  filter: brightness(0) invert(1);
}

.hero-social-circle:hover {
  transform: translateY(-3px) scale(1.1);
}

.hero-social-circle:active {
  transform: translateY(0) scale(0.96);
}

/* Individual Brand Color Themes (Clean Subtle Elevation, Zero Overblown Glow) */
.social-wechat {
  color: #07c160;
  background-color: rgba(7, 193, 96, 0.12);
  border: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.social-wechat:hover {
  color: #4dd68e;
  background-color: rgba(7, 193, 96, 0.22);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.28);
}

.social-wechat .social-brand-icon {
  filter: none;
}

.social-afdian {
  color: #b99bff;
  background-color: rgba(148, 108, 230, 0.12);
  border: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.social-afdian:hover {
  color: #c9b5ff;
  background-color: rgba(148, 108, 230, 0.22);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.28);
}

.social-afdian .social-brand-icon {
  filter: none;
}
.social-github {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.10);
  border: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.social-github:hover {
  background-color: rgba(255, 255, 255, 0.20);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.28);
}

.social-steam {
  color: #66c0f4;
  background-color: rgba(102, 192, 244, 0.12);
  border: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.social-steam:hover {
  background-color: rgba(102, 192, 244, 0.22);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.28);
}

.social-douyin {
  color: #fe2c55;
  background-color: rgba(254, 44, 85, 0.12);
  border: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.social-douyin:hover {
  background-color: rgba(254, 44, 85, 0.22);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.28);
}

.social-bilibili {
  color: #00a1d6;
  background-color: rgba(0, 161, 214, 0.12);
  border: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.social-bilibili:hover {
  background-color: rgba(0, 161, 214, 0.22);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.28);
}

.wechat-dialog {
  position: fixed;
  inset: auto;
  top: 50%;
  left: 50%;
  width: min(420px, calc(100% - 2rem));
  max-width: none;
  max-height: calc(100dvh - 2rem);
  margin: 0;
  padding: 0;
  overflow: visible;
  color: #f8fafc;
  background: #111018;
  border: 1px solid rgba(7, 193, 96, 0.38);
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  transform: translate(-50%, -50%);
}

.wechat-dialog[open] .wechat-dialog-content {
  animation: wechat-dialog-content-in 0.46s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes wechat-dialog-content-in {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.wechat-dialog::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(7, 193, 96, 0.32), transparent 42%, rgba(124, 58, 237, 0.28));
  filter: blur(18px);
  opacity: 0.7;
}

.wechat-dialog::backdrop {
  background: rgba(5, 4, 10, 0.78);
  backdrop-filter: blur(10px) saturate(0.85);
  animation: wechat-backdrop-in 0.42s ease both;
}

@keyframes wechat-backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.wechat-dialog-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-height: calc(100dvh - 2rem);
  overflow: auto;
  padding: 2rem;
  text-align: center;
}

.wechat-dialog-content h2 {
  margin: 0 2rem 0.35rem;
  color: #fff;
  font-size: 1.2rem;
}

.wechat-dialog-content p {
  margin: 0 0 1.25rem;
  color: #a1a1aa;
  font-size: 0.9rem;
}

.wechat-qr-shell {
  position: relative;
  width: min(100%, 320px);
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28), inset 0 0 0 1px rgba(0, 0, 0, 0.08);
  isolation: isolate;
  cursor: pointer;
}

.wechat-qr-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: inherit;
  pointer-events: none;
}

.wechat-qr-shell > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
  filter: none;
  transform: scale(1);
  transition: opacity 0.3s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.wechat-qr-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 1rem;
  color: #27272a;
  background: transparent;
  border: 0;
  font: inherit;
  cursor: pointer;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.wechat-qr-cover-icon {
  display: grid;
  width: 80px;
  height: 80px;
  place-items: center;
}

.wechat-qr-brand-icon {
  display: block;
  width: 80px;
  height: 80px;
}

.wechat-qr-shell.is-revealed > img {
  opacity: 1;
  filter: none;
  transform: scale(1);
}

.wechat-qr-shell.is-revealed .wechat-qr-cover {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

@media (hover: hover) {
  .wechat-qr-shell > img {
    filter: blur(4px);
  }

  .wechat-qr-shell:hover > img {
    opacity: 1;
    filter: none;
    transform: scale(1);
  }

  .wechat-qr-shell:hover .wechat-qr-cover {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
}

.wechat-dialog-close {
  position: absolute;
  top: 0.7rem;
  right: 0.8rem;
  z-index: 4;
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  color: #a1a1aa;
  background: transparent;
  border: 0;
  border-radius: 50%;
  font: inherit;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.wechat-dialog-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  transform: rotate(90deg);
}

/* --------------------------------------------------------------------------
   Row 3: In-site Actions & CTA (Hakadao Action Pills Archetype)
   -------------------------------------------------------------------------- */
.hero-actions-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
  opacity: 0;
  animation: actionsRowIn 0.82s cubic-bezier(0.22, 1, 0.36, 1) 1.45s forwards;
}

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

/* About & Works: Frosted Glass Capsule (Subtle, Clean) */
.hero-action-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.52rem 1.25rem;
  border-radius: 9999px;
  background-color: rgba(255, 255, 255, 0.08);
  border: none;
  color: #ffffff;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-action-pill .pill-arrow-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.2rem;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-action-pill .pill-arrow {
  width: 18px;
  height: 18px;
  color: inherit;
  flex-shrink: 0;
}

/* Hover: Subtle Background Shift + Clean Physical Shadow (Zero White Fog) */
.hero-action-pill:hover {
  background-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  transform: translateY(-2px);
}

.hero-action-pill:hover .pill-arrow-wrap {
  transform: translateX(4px);
}

.hero-action-pill:active {
  transform: translateY(0);
}

/* Get in touch: Solid Pure White Pill CTA */
.hero-action-pill.hero-action-cta {
  background-color: #ffffff;
  color: #0b0714;
  border: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.hero-action-pill.hero-action-cta .pill-mail-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.2rem;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-action-pill.hero-action-cta .pill-mail {
  width: 18px;
  height: 18px;
  color: inherit;
  flex-shrink: 0;
}

.hero-action-pill.hero-action-cta:hover {
  background-color: #f4f4f6;
  color: #000000;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  transform: translateY(-2px);
}

.hero-action-pill.hero-action-cta:hover .pill-mail-wrap {
  transform: scale(1.15);
}

/* Copied feedback state for white buttons & navbar */
.hero-action-pill.hero-action-cta.copied,
.nav-cta-pill.copied {
  background-color: #ffffff !important;
  color: var(--accent-pink) !important;
  transform: scale(1.03) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25) !important;
}

.hero-action-pill.hero-action-cta.copied svg,
.nav-cta-pill.copied svg {
  animation: none;
  transform: none;
}

.scroll-indicator {
  color: var(--text-secondary);
  opacity: 0.6;
  text-align: center;
}

.bounce {
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(10px); }
  60% { transform: translateY(5px); }
}

@media (max-width: 1024px) {
  .pixel-avatar {
    width: clamp(220px, 30vw, 300px);
  }
}


/* === Works (Hakadao Showcase Style) === */
.featured-projects {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.featured-card {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 1rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  text-decoration: none;
  background-color: #120d20;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.featured-card:hover {
  border-color: rgba(var(--accent-pink-rgb), 0.4);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.45), 0 0 25px rgba(var(--accent-pink-rgb), 0.15);
  transform: translateY(-3px);
}

.featured-card-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: rgba(30, 20, 50, 0.5);
}

.featured-card-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.featured-card:hover .featured-card-bg img {
  transform: scale(1.05);
}

.featured-card-overlay {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding: 1.25rem 1.5rem 1.5rem;
}

.featured-card-overlay::before {
  content: "";
  position: absolute;
  inset: -3.5rem 0 0 0;
  z-index: -1;
  background: linear-gradient(
    to top,
    rgba(10, 6, 20, 0.95) 0%,
    rgba(10, 6, 20, 0.8) 45%,
    rgba(10, 6, 20, 0.25) 80%,
    transparent 100%
  );
  pointer-events: none;
}

.featured-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.featured-card-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
  transition: color 0.3s ease;
}

.featured-card:hover .featured-card-title {
  color: var(--accent-pink);
}

.featured-card-icon {
  color: rgba(255, 255, 255, 0.45);
  flex-shrink: 0;
  transition: color 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.featured-card:hover .featured-card-icon {
  color: var(--accent-pink);
  transform: translate(2px, -2px);
}

.featured-card-desc {
  font-size: 0.85rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.65);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}


/* === About (Hakadao Refined Style) === */
.about-content {
  width: 100%;
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--text-secondary);
}

.about-content p {
  margin-bottom: 1.35rem;
  text-align: justify;
  text-justify: inter-word;
}

.about-content p:last-child {
  margin-bottom: 0;
}

/* Hakadao-style Inline Highlight Capsules (.link-tag) */
.link-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.18rem 0.6rem;
  margin: 0.1rem 0.25rem;
  border-radius: 0.5rem;
  background-color: rgba(var(--accent-pink-rgb), 0.12);
  border: 1px solid rgba(var(--accent-pink-rgb), 0.28);
  color: var(--accent-pink);
  text-decoration: none;
  font-size: 0.9em;
  font-family: var(--font-mono);
  vertical-align: baseline;
  white-space: nowrap;
  transition: background-color 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              color 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.link-tag:hover {
  background-color: rgba(var(--accent-pink-rgb), 0.22);
  border-color: rgba(var(--accent-pink-rgb), 0.5);
  color: #ffffff;
  box-shadow: 0 0 14px rgba(var(--accent-pink-rgb), 0.35);
  transform: translateY(-1px);
}

.link-tag svg {
  width: 1.15em;
  height: 1.15em;
  flex-shrink: 0;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.link-tag:hover svg {
  transform: scale(1.18);
}

/* === Bottom Ambient Horizon Glow (Hakadao Inspired Full-Viewport Bloom) === */
#bottom-ambient-glow {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  will-change: opacity;
  transform: translateZ(0);
  background-image:
    radial-gradient(130% 90% at 50% 100%, rgba(var(--accent-violet-rgb), 0.28) 0%, rgba(var(--accent-pink-rgb), 0.20) 28%, rgba(0, 217, 255, 0.12) 55%, transparent 75%);
  transition: opacity 0.15s ease-out;
}

/* === Footer Multi-layer Chromatic Aura === */
#footer {
  position: relative;
  z-index: 2;
  padding: 5.5rem 0 3.5rem;
  margin-top: 5rem;
  overflow: hidden;
  background:
    radial-gradient(ellipse 120% 80% at 25% 100%, rgba(var(--accent-pink-rgb), 0.22), transparent 52%),
    radial-gradient(ellipse 105% 65% at 75% 92%, rgba(0, 217, 255, 0.18), transparent 58%),
    radial-gradient(ellipse 95% 75% at 50% 82%, rgba(var(--accent-violet-rgb), 0.28), transparent 65%),
    radial-gradient(ellipse 110% 50% at 15% 105%, rgba(255, 180, 0, 0.10), transparent 42%),
    linear-gradient(180deg, transparent 0%, rgba(6, 3, 13, 0.95) 85%);
}

.footer-glow {
  position: absolute;
  bottom: -25%;
  left: 50%;
  transform: translateX(-50%);
  width: 125%;
  height: 120%;
  background:
    radial-gradient(ellipse 70% 50% at 50% 100%, rgba(var(--accent-pink-rgb), 0.32), transparent 70%),
    radial-gradient(ellipse 55% 42% at 30% 90%, rgba(var(--accent-violet-rgb), 0.38), transparent 60%),
    radial-gradient(ellipse 60% 40% at 72% 95%, rgba(0, 217, 255, 0.24), transparent 65%);
  filter: blur(55px);
  -webkit-filter: blur(55px);
  pointer-events: none;
  z-index: 0;
  animation: footerAuroraGlow 9s ease-in-out infinite alternate;
}

@keyframes footerAuroraGlow {
  0% {
    transform: translateX(-50%) scale(0.96);
    opacity: 0.8;
  }
  50% {
    transform: translateX(-48%) scale(1.06);
    opacity: 1;
  }
  100% {
    transform: translateX(-52%) scale(1.02);
    opacity: 0.88;
  }
}

/* === Footer Connect & Expanded Social Pills (Hakadao Footer Matrix) === */
.footer-connect {
  max-width: 1200px;
  margin: 0 auto 2.5rem;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  position: relative;
  z-index: 2;
}

.footer-social-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
}

.footer-social-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 1.1rem;
  border-radius: 9999px;
  border: none;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              background-color 0.3s ease,
              box-shadow 0.3s ease;
}

.footer-social-tag svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.footer-social-tag .social-brand-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.footer-social-tag:hover {
  transform: translateY(-2px) scale(1.05);
}

.footer-social-tag:active {
  transform: translateY(0) scale(0.98);
}

/* Stagger entrance when scrolling into bottom view */
.footer-connect .footer-social-tag,
.footer-connect .footer-cta-box {
  opacity: 0;
}

.footer-connect.visible .footer-social-tag {
  animation: footerTagIn 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.footer-connect.visible .footer-social-tag:nth-child(1) { animation-delay: 0.05s; }
.footer-connect.visible .footer-social-tag:nth-child(2) { animation-delay: 0.12s; }
.footer-connect.visible .footer-social-tag:nth-child(3) { animation-delay: 0.19s; }
.footer-connect.visible .footer-social-tag:nth-child(4) { animation-delay: 0.26s; }
.footer-connect.visible .footer-social-tag:nth-child(5) { animation-delay: 0.33s; }
.footer-connect.visible .footer-social-tag:nth-child(6) { animation-delay: 0.40s; }

.footer-connect.visible .footer-cta-box {
  animation: footerTagIn 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.42s both;
}

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

.footer-cta-box {
  display: flex;
  justify-content: center;
}

.footer-brand {
  width: 100%;
  height: clamp(140px, 20vw, 280px);
  margin-bottom: 2rem;
  position: relative;
  z-index: 2;
  user-select: none;
}

#brand-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: default;
  touch-action: none;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  position: relative;
}

.footer-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.footer-beian {
  flex-basis: 100%;
  text-align: center;
  font-size: 0.72rem;
}

.footer-beian-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.18rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  color: var(--text-secondary);
  transition: color 0.3s, border-color 0.3s, background-color 0.3s;
}

.footer-beian-link img {
  width: 16px;
  height: 15px;
  flex-shrink: 0;
  opacity: 0.85;
}

.footer-beian-link:hover {
  color: var(--accent-bright);
  border-color: rgba(var(--accent-pink-rgb), 0.35);
  background-color: rgba(var(--accent-pink-rgb), 0.08);
}

.footer-counter img {
  height: 80px;
  opacity: 0.9;
}

/* === Back to Top === */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(240, 110, 142, 0.85);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s, border-color 0.3s, box-shadow 0.3s;
  z-index: 999;
  pointer-events: none;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  background: rgba(240, 110, 142, 1);
  box-shadow: 0 0 15px rgba(240, 110, 142, 0.5);
}

/* === Hamburger animation === */
.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* === Custom Scrollbar === */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: rgba(240, 110, 142, 0.6);
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(240, 110, 142, 0.9);
}

/* === Selection === */
::selection {
  background: rgba(var(--accent-pink-rgb), 0.3);
}

/* === Responsive: Mobile === */
@media (max-width: 768px) {
  html {
    font-size: 16px;
  }

  :root {
    --section-padding: 50px 0;
    --nav-height: 60px;
  }

  .section {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-pill {
    position: fixed;
    top: calc(0.75rem + 0.75rem + 50px);
    left: 1rem;
    right: 1rem;
    flex-direction: column;
    padding: 0.6rem;
    gap: 0.25rem;
    background: rgba(18, 12, 32, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6);
    border-radius: 1.25rem;
    transform: translateY(-20px);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    pointer-events: none;
  }

  .nav-seg-divider {
    display: none;
  }

  .nav-pill.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-pill.open .nav-item {
    width: 100%;
    text-align: center;
    padding: 0.65rem 1rem;
  }

  .nav-cta-pill {
    padding: 0.32rem 0.75rem;
    font-size: 0.8rem;
    gap: 0.35rem;
  }

  .nav-logo {
    gap: 0.5rem;
    flex-shrink: 0;
  }

  .nav-avatar {
    width: 34px;
    height: 34px;
  }

  .nav-name {
    display: inline-block;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
  }

  .section-title {
    font-size: 1.5rem;
  }

  /* Navbar: show immediately on mobile */
  #navbar.hidden {
    opacity: 1;
    pointer-events: auto;
  }

  /* Hero mobile */
  .hero-split {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 100%;
  }

  .hero-left {
    justify-content: center;
  }

  .hero-right {
    width: 100%;
    align-items: stretch;
  }

  .pixel-avatar {
    width: min(72vw, 260px);
  }


  .terminal-output {
    font-size: 1.6rem;
  }

  .terminal-role {
    flex-wrap: wrap;
  }

  .terminal-quote {
    white-space: normal;
    font-size: 0.85rem;
  }

  /* Hero buttons mobile (3 distinct tiers - Terminal Keycaps) */
  .hero-sites-row {
    gap: 0.45rem;
    margin-top: 0.65rem;
  }

  .hero-site-btn {
    padding: 0.35rem 0.75rem;
    font-size: 0.82rem;
    border-radius: 5px;
  }

  .hero-site-btn .site-icon {
    width: 18px;
    height: 18px;
  }

  .hero-social-row {
    gap: 0.55rem;
    margin-top: 0.65rem;
  }

  .hero-social-circle {
    width: 38px;
    height: 38px;
  }

  .hero-social-circle svg {
    width: 19px;
    height: 19px;
  }

  .footer-connect {
    margin-bottom: 2rem;
    gap: 1.2rem;
  }

  .footer-social-tags {
    gap: 0.5rem;
  }

  .footer-social-tag {
    padding: 0.38rem 0.85rem;
    font-size: 0.82rem;
  }

  .hero-actions-row {
    gap: 0.5rem;
    margin-top: 0.6rem;
  }

  .hero-action-pill {
    padding: 0.42rem 0.95rem;
    font-size: 0.84rem;
  }

  .hero-action-pill .pill-arrow,
  .hero-action-pill.hero-action-cta .pill-mail {
    width: 15px;
    height: 15px;
  }

  /* About mobile */
  .about-content {
    font-size: 0.95rem;
    line-height: 1.75;
  }

  .about-content p {
    margin-bottom: 1rem;
    text-align: left;
  }

  .link-tag {
    padding: 0.12rem 0.45rem;
    font-size: 0.85em;
  }

  /* Works mobile */
  .featured-projects {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .featured-card {
    aspect-ratio: 16 / 10;
  }

  .featured-card-overlay {
    padding: 1rem 1.25rem 1.25rem;
  }

  .featured-card-title {
    font-size: 1.1rem;
  }

  .featured-card-desc {
    font-size: 0.8rem;
  }

  /* Footer mobile */
  .footer-brand {
    height: 110px;
    margin-bottom: 1rem;
  }

  .footer-inner {
    flex-direction: column;
    gap: 0.5rem;
    padding: 0 1rem;
  }

  .footer-beian {
    flex-basis: auto;
    order: 3;
  }

  .footer-counter img {
    height: 50px;
  }

  /* Back to top mobile */
  .back-to-top {
    bottom: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
  }
}

/* === Reduced motion ===
   Honour the OS-level "minimise motion" preference. `js/motion.js` handles the half CSS
   cannot reach — the particle, brand-wordmark and three.js animation loops, plus the
   typewriter. This block neutralises everything CSS owns (eleven keyframe sets, every
   transition, smooth scrolling) in one place instead of bolting a reduced-motion variant
   onto each rule.

   Durations collapse to 0.01ms rather than 0 so that transitionend / animationend still
   fire: a script waiting on one would otherwise hang forever. `animation-fill-mode:
   forwards` keeps elements that animate in from `opacity: 0` at their end state, so
   nothing is left invisible. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
