:root {
  color-scheme: dark;
  --bg: #05070a;
  --bg-soft: #081014;
  --panel: rgba(8, 16, 20, 0.82);
  --panel-solid: #0b1014;
  --text: #e6fff5;
  --muted: #8aa9a2;
  --muted-strong: #b9d8d0;
  --green: #40ff9c;
  --cyan: #2fe8ff;
  --purple: #b36bff;
  --warning: #f4d35e;
  --line: rgba(64, 255, 156, 0.24);
  --line-strong: rgba(64, 255, 156, 0.48);
  --shadow-green: 0 0 24px rgba(64, 255, 156, 0.14);
  --shadow-cyan: 0 0 28px rgba(47, 232, 255, 0.16);
  --font-ui: "Microsoft YaHei", "DengXian", "Segoe UI", Arial, sans-serif;
  --font-mono: Consolas, "JetBrains Mono", "Courier New", monospace;
  --max: 1180px;
  --header: 76px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% 14%, rgba(64, 255, 156, 0.12), transparent 24rem),
    radial-gradient(circle at 78% 4%, rgba(179, 107, 255, 0.1), transparent 26rem),
    linear-gradient(180deg, #05070a 0%, #071015 46%, #05070a 100%);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 300;
  line-height: 1.7;
  letter-spacing: 0;
}

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

button {
  font: inherit;
  letter-spacing: 0;
}

.matrix-canvas,
.signal-noise,
.scanline {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.matrix-canvas {
  z-index: -4;
  opacity: 0.8;
}

.signal-noise {
  z-index: -3;
  opacity: 0.36;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.25));
}

.scanline {
  z-index: 20;
  opacity: 0.12;
  background: linear-gradient(
    180deg,
    transparent 0,
    transparent 48%,
    rgba(47, 232, 255, 0.2) 50%,
    transparent 52%,
    transparent 100%
  );
  background-size: 100% 8px;
}

.site-header {
  position: fixed;
  z-index: 30;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header);
  padding: 0 32px;
  border-bottom: 1px solid rgba(64, 255, 156, 0.12);
  background: rgba(5, 7, 10, 0.68);
  backdrop-filter: blur(12px);
  transition: background 0.25s ease, border-color 0.25s ease;
}

.site-header.scrolled {
  border-color: rgba(64, 255, 156, 0.28);
  background: rgba(5, 7, 10, 0.9);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 178px;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line-strong);
  background: rgba(64, 255, 156, 0.08);
  box-shadow: var(--shadow-green);
  color: var(--green);
  font-family: var(--font-mono);
  font-weight: 700;
}

.brand-copy {
  display: grid;
  line-height: 1.1;
}

.brand-copy strong {
  font-family: var(--font-mono);
  font-size: 0.98rem;
}

.brand-copy small {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.nav-link {
  position: relative;
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  padding: 0 12px;
  color: var(--muted-strong);
  font-size: 0.92rem;
}

.nav-link::after {
  position: absolute;
  right: 12px;
  bottom: 4px;
  left: 12px;
  height: 1px;
  background: var(--green);
  box-shadow: var(--shadow-green);
  content: "";
  opacity: 0;
  transform: scaleX(0.24);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--green);
}

.nav-link:hover::after,
.nav-link.active::after {
  opacity: 1;
  transform: scaleX(1);
}

.header-actions {
  display: flex;
  justify-content: flex-end;
  min-width: 178px;
}

.lang-toggle {
  display: inline-flex;
  min-width: 76px;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid rgba(47, 232, 255, 0.4);
  border-radius: 6px;
  background: rgba(47, 232, 255, 0.06);
  color: var(--cyan);
  cursor: pointer;
  font-family: var(--font-mono);
}

.lang-toggle:hover {
  border-color: rgba(47, 232, 255, 0.72);
  box-shadow: var(--shadow-cyan);
}

.toggle-divider {
  color: var(--muted);
}

.section {
  position: relative;
  padding: 104px 32px;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.section.visible,
.hero {
  opacity: 1;
  transform: translateY(0);
}

.section-band {
  background:
    linear-gradient(90deg, rgba(64, 255, 156, 0.04), transparent 34%, rgba(47, 232, 255, 0.04)),
    rgba(5, 10, 12, 0.34);
  border-top: 1px solid rgba(64, 255, 156, 0.08);
  border-bottom: 1px solid rgba(64, 255, 156, 0.08);
}

.section-shell,
.hero-grid {
  width: min(100%, var(--max));
  margin: 0 auto;
}

.hero-content,
.hero-console,
.console-panel,
.work-card,
.repo-row,
.contact-panel,
.channel-list {
  min-width: 0;
}

.hero {
  display: flex;
  min-height: 84vh;
  align-items: center;
  padding-top: calc(var(--header) + 64px);
  padding-bottom: 54px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.82fr);
  gap: 48px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.4;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  color: #f6fff9;
  font-size: 4.25rem;
  line-height: 1.04;
  font-weight: 800;
}

.hero-title-row {
  display: flex;
  align-items: flex-end;
  gap: 22px;
  margin-bottom: 18px;
}

.hero-title-row h1 {
  margin-bottom: 0;
  line-height: 1;
}

.hero-avatar {
  width: 65px;
  height: 65px;
  border-radius: 8px;
  border: 1px solid rgba(64, 255, 156, 0.42);
  box-shadow: 0 0 18px rgba(64, 255, 156, 0.18), 0 0 40px rgba(47, 232, 255, 0.08);
  object-fit: cover;
  flex-shrink: 0;
  margin-bottom: -1px;
}

h2 {
  margin-bottom: 18px;
  color: #f2fff8;
  font-size: 2.2rem;
  line-height: 1.22;
  font-weight: 760;
}

h3 {
  margin-bottom: 10px;
  color: #f4fff8;
  font-size: 1.18rem;
  line-height: 1.32;
}

.hero-subtitle {
  max-width: 760px;
  margin-bottom: 22px;
  color: #d7fff0;
  font-size: 1.24rem;
  line-height: 1.42;
  overflow-wrap: anywhere;
}

.hero-intro {
  max-width: 740px;
  margin-bottom: 24px;
  color: var(--muted-strong);
  font-size: 0.8rem;
  overflow-wrap: anywhere;
}

.tag-row,
.proof-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag,
.proof-row span {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  border: 1px solid rgba(64, 255, 156, 0.22);
  border-radius: 999px;
  background: rgba(64, 255, 156, 0.055);
  color: #d9fff0;
  font-size: 0.86rem;
  padding: 0 12px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.action-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(64, 255, 156, 0.32);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.95rem;
  padding: 0 18px;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

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

.action-link.primary {
  border-color: rgba(64, 255, 156, 0.64);
  background: rgba(64, 255, 156, 0.14);
  color: #eafff5;
  box-shadow: var(--shadow-green);
}

.action-link.secondary {
  border-color: rgba(47, 232, 255, 0.52);
  background: rgba(47, 232, 255, 0.08);
  color: #dcfbff;
}

.action-link.ghost {
  border-color: rgba(179, 107, 255, 0.5);
  background: rgba(179, 107, 255, 0.07);
  color: #efe4ff;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 38px;
  max-width: 760px;
}

.stat {
  min-height: 82px;
  border: 1px solid rgba(64, 255, 156, 0.16);
  border-radius: 6px;
  background: rgba(5, 12, 14, 0.58);
  padding: 15px 14px;
}

.stat strong {
  display: block;
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 1.26rem;
  line-height: 1.2;
}

.stat span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.82rem;
}

.hero-console {
  position: relative;
  min-height: 520px;
}

.console-panel {
  position: relative;
  z-index: 2;
  overflow: hidden;
  border: 1px solid rgba(64, 255, 156, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(64, 255, 156, 0.08), transparent 35%),
    rgba(5, 10, 12, 0.86);
  box-shadow: var(--shadow-green), inset 0 0 30px rgba(64, 255, 156, 0.035);
}

.console-panel::before {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 22%);
  content: "";
  pointer-events: none;
}

.console-top {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(64, 255, 156, 0.18);
  padding: 0 14px;
  font-family: var(--font-mono);
}

.console-top span {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 10px rgba(64, 255, 156, 0.58);
}

.console-top span:nth-child(2) {
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(47, 232, 255, 0.5);
}

.console-top span:nth-child(3) {
  background: var(--purple);
  box-shadow: 0 0 10px rgba(179, 107, 255, 0.5);
}

.console-top strong {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
}

.console-lines {
  min-height: 300px;
  padding: 26px 22px 30px;
  font-family: var(--font-mono);
}

.console-lines p {
  margin-bottom: 16px;
  color: #d7fff0;
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

.console-lines p:nth-child(2n) {
  color: #c8fbff;
}

.cursor-line {
  color: var(--green);
}

.cursor {
  display: inline-block;
  width: 9px;
  height: 18px;
  vertical-align: -3px;
  background: var(--green);
  animation: blink 0.9s steps(2, start) infinite;
}

.signal-orbit {
  position: absolute;
  right: -20px;
  bottom: 8px;
  width: 260px;
  height: 260px;
  opacity: 0.8;
}

.orbit,
.orbit-core {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(47, 232, 255, 0.24);
  border-radius: 50%;
}

.orbit-a {
  animation: rotate 18s linear infinite;
}

.orbit-b {
  inset: 34px;
  border-color: rgba(64, 255, 156, 0.26);
  animation: rotate 12s linear infinite reverse;
}

.orbit-c {
  inset: 72px;
  border-color: rgba(179, 107, 255, 0.26);
}

.orbit-core {
  inset: 105px;
  background: radial-gradient(circle, rgba(64, 255, 156, 0.42), rgba(47, 232, 255, 0.05));
  box-shadow: 0 0 40px rgba(64, 255, 156, 0.22);
}

.section-head {
  max-width: 820px;
  margin-bottom: 42px;
}

.section-head p:not(.eyebrow) {
  color: var(--muted-strong);
  font-size: 1rem;
}

.signal-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.signal-grid::before {
  position: absolute;
  top: 40px;
  right: 8%;
  left: 8%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(64, 255, 156, 0.32), transparent);
  content: "";
}

.signal-card,
.work-card,
.collab-item {
  border: 1px solid rgba(64, 255, 156, 0.16);
  border-radius: 8px;
  background: rgba(8, 16, 20, 0.72);
}

.signal-card {
  position: relative;
  min-height: 260px;
  padding: 24px;
  overflow: hidden;
}

.signal-card::after {
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(47, 232, 255, 0.2);
  border-radius: 50%;
  content: "";
}

.signal-card:hover,
.work-card:hover,
.collab-item:hover,
.repo-row:hover {
  border-color: rgba(64, 255, 156, 0.45);
  box-shadow: var(--shadow-green);
}

.signal-code {
  display: inline-flex;
  margin-bottom: 28px;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.signal-card p,
.work-card p,
.collab-item p,
.trace-item p,
.contact-panel p {
  color: var(--muted-strong);
}

.work-matrix {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.work-card {
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.work-card:hover {
  transform: translateY(-3px);
}

.work-cover {
  position: relative;
  min-height: 240px;
  overflow: hidden;
  border-bottom: 1px solid rgba(64, 255, 156, 0.16);
  background:
    radial-gradient(circle at 28% 34%, rgba(64, 255, 156, 0.16), transparent 22%),
    linear-gradient(135deg, rgba(47, 232, 255, 0.12), transparent 48%),
    #070d12;
  aspect-ratio: 16 / 9;
}

.cover-ai-book {
  background:
    radial-gradient(circle at 50% 48%, rgba(64, 255, 156, 0.22), transparent 18%),
    radial-gradient(circle at 72% 28%, rgba(179, 107, 255, 0.16), transparent 20%),
    #070d12;
}

.cover-xiaoxin {
  background:
    radial-gradient(circle at 68% 44%, rgba(47, 232, 255, 0.22), transparent 18%),
    linear-gradient(135deg, rgba(64, 255, 156, 0.13), transparent 42%),
    #061016;
}

.cover-xihumei {
  background:
    radial-gradient(circle at 42% 66%, rgba(64, 255, 156, 0.18), transparent 20%),
    linear-gradient(160deg, rgba(47, 232, 255, 0.15), transparent 40%, rgba(179, 107, 255, 0.08)),
    #07100e;
}

.cover-lingling {
  background:
    radial-gradient(circle at 31% 38%, rgba(244, 211, 94, 0.14), transparent 18%),
    radial-gradient(circle at 72% 62%, rgba(47, 232, 255, 0.18), transparent 20%),
    #090f13;
}

.cover-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.65;
  transition: opacity 0.35s ease, transform 0.45s ease;
  z-index: 0;
}

.work-card:hover .cover-image {
  opacity: 0.95;
  transform: scale(1.02);
}

.work-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(5, 7, 10, 0.95) 0%, rgba(5, 7, 10, 0.3) 30%, transparent 100%);
  pointer-events: none;
  z-index: 1;
}

.cover-title {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  display: grid;
  gap: 6px;
  font-family: var(--font-mono);
}

.cover-title span {
  color: var(--cyan);
  font-size: 0.74rem;
}

.cover-title strong {
  color: #f5fff9;
  font-size: 1.18rem;
}

.work-body {
  padding: 24px;
}

.work-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.work-label {
  display: block;
  margin-bottom: 6px;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.76rem;
}

.small-link {
  display: inline-flex;
  min-width: 54px;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(47, 232, 255, 0.36);
  border-radius: 6px;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  padding: 0 10px;
}

.small-link.muted {
  border-color: rgba(138, 169, 162, 0.2);
  color: var(--muted);
}

.work-summary {
  color: #e6fff5;
  font-size: 1rem;
}

.proof-row {
  margin-top: 18px;
}

.inline-link {
  display: inline-flex;
  margin-top: 18px;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.86rem;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.filter-button {
  min-height: 38px;
  border: 1px solid rgba(64, 255, 156, 0.22);
  border-radius: 6px;
  background: rgba(64, 255, 156, 0.05);
  color: var(--muted-strong);
  cursor: pointer;
  padding: 0 14px;
}

.filter-button:hover,
.filter-button.active {
  border-color: rgba(64, 255, 156, 0.62);
  color: var(--green);
  box-shadow: var(--shadow-green);
}

.repo-terminal {
  overflow: hidden;
  border: 1px solid rgba(47, 232, 255, 0.24);
  border-radius: 8px;
  background: rgba(5, 10, 12, 0.78);
}

.repo-head {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(47, 232, 255, 0.16);
  color: var(--cyan);
  font-family: var(--font-mono);
  padding: 0 18px;
}

.repo-head strong {
  color: var(--green);
}

.repo-list {
  display: grid;
}

.repo-row {
  display: grid;
  grid-template-columns: 250px 96px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  min-height: 64px;
  border-bottom: 1px solid rgba(64, 255, 156, 0.1);
  padding: 14px 18px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.repo-row:last-child {
  border-bottom: 0;
}

.repo-row:hover {
  background: rgba(64, 255, 156, 0.045);
}

.repo-name {
  color: var(--green);
  font-family: var(--font-mono);
  word-break: break-word;
}

.repo-lang {
  color: var(--purple);
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.repo-text {
  color: var(--muted-strong);
}

.section-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.trace-list {
  position: relative;
  display: grid;
  gap: 18px;
}

.trace-list::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 28px;
  width: 1px;
  background: linear-gradient(180deg, rgba(64, 255, 156, 0.56), rgba(47, 232, 255, 0.12));
  content: "";
}

.trace-item {
  position: relative;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.trace-index {
  position: relative;
  z-index: 1;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 1px solid rgba(64, 255, 156, 0.42);
  border-radius: 50%;
  background: #061014;
  color: var(--green);
  font-family: var(--font-mono);
}

.trace-item div {
  min-height: 100px;
  border-bottom: 1px solid rgba(64, 255, 156, 0.12);
  padding: 6px 0 24px;
}

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

.collab-item {
  min-height: 190px;
  padding: 20px;
}

.status-dot {
  display: block;
  width: 11px;
  height: 11px;
  margin-bottom: 20px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 18px rgba(64, 255, 156, 0.64);
}

.contact-section {
  padding-bottom: 72px;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  gap: 24px;
}

.contact-panel,
.channel-list {
  border: 1px solid rgba(64, 255, 156, 0.18);
  border-radius: 8px;
  background: rgba(8, 16, 20, 0.72);
  padding: 24px;
}

.contact-command {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 24px 0;
  border: 1px solid rgba(47, 232, 255, 0.22);
  border-radius: 6px;
  background: rgba(47, 232, 255, 0.05);
  padding: 14px;
}

.contact-command span,
.contact-command code {
  color: var(--green);
  font-family: var(--font-mono);
}

.contact-command button {
  min-height: 34px;
  margin-left: auto;
  border: 1px solid rgba(64, 255, 156, 0.4);
  border-radius: 6px;
  background: rgba(64, 255, 156, 0.1);
  color: var(--green);
  cursor: pointer;
  padding: 0 12px;
}

.privacy-note {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.channel-list {
  display: grid;
  gap: 12px;
}

.channel-row {
  display: grid;
  gap: 6px;
  border-bottom: 1px solid rgba(64, 255, 156, 0.12);
  padding-bottom: 14px;
}

.channel-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.channel-row span {
  color: var(--muted);
  font-size: 0.86rem;
}

.channel-row strong,
.channel-row a {
  color: #effff8;
  font-family: var(--font-mono);
  word-break: break-word;
}

.channel-row a:hover {
  color: var(--cyan);
}

.site-footer {
  border-top: 1px solid rgba(64, 255, 156, 0.12);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  padding: 28px 32px 38px;
  text-align: center;
}

.noscript-message {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 50;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-solid);
  color: var(--text);
  padding: 12px 14px;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

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

@media (max-width: 1120px) {
  .site-header {
    padding: 0 20px;
  }

  .brand,
  .header-actions {
    min-width: auto;
  }

  .nav-links {
    gap: 2px;
  }

  .nav-link {
    padding: 0 8px;
    font-size: 0.86rem;
  }

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

  .hero-console {
    min-height: 380px;
  }

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

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

@media (max-width: 820px) {
  :root {
    --header: 66px;
  }

  .site-header {
    align-items: center;
    gap: 10px;
    padding: 0 14px;
  }

  .brand-copy {
    display: none;
  }

  .nav-links {
    position: static;
    flex: 1 1 auto;
    justify-content: flex-start;
    overflow-x: auto;
    border: 1px solid rgba(64, 255, 156, 0.18);
    border-radius: 8px;
    background: rgba(5, 7, 10, 0.5);
    padding: 6px;
  }

  .nav-link {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 0 9px;
    font-size: 0.78rem;
  }

  .lang-toggle {
    min-width: 68px;
    min-height: 34px;
  }

  .section {
    padding: 76px 18px;
  }

  .hero {
    min-height: auto;
    padding-top: calc(var(--header) + 42px);
  }

  h1 {
    font-size: 3.1rem;
  }

  h2 {
    font-size: 1.76rem;
  }

  .hero-subtitle {
    font-size: 1.18rem;
  }

  .hero-stats,
  .work-matrix,
  .signal-grid,
  .collab-grid {
    grid-template-columns: 1fr;
  }

  .signal-grid::before {
    display: none;
  }

  .signal-card {
    min-height: auto;
  }

  .work-cover {
    min-height: 210px;
  }

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

  .contact-command button {
    margin-left: 0;
  }

  .site-footer {
    padding-bottom: 38px;
  }
}

@media (max-width: 520px) {
  body {
    font-size: 15px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .brand-copy strong {
    font-size: 0.86rem;
  }

  h1 {
    font-size: 2.56rem;
  }

  h2 {
    font-size: 1.48rem;
  }

  .hero-actions {
    display: grid;
  }

  .action-link {
    width: 100%;
  }

  .console-lines {
    padding: 20px 16px 24px;
  }

  .console-lines p {
    font-size: 0.82rem;
  }

  .signal-orbit {
    display: none;
  }

  .work-body,
  .contact-panel,
  .channel-list {
    padding: 18px;
  }

  .trace-item {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 14px;
  }

  .trace-list::before {
    left: 22px;
  }

  .trace-index {
    width: 44px;
    height: 44px;
    font-size: 0.82rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
