@font-face {
  font-family: "IBM Plex Sans";
  src: url("/assets/fonts/ibm-plex-sans-latin-variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/fonts/ibm-plex-mono-latin-400.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/fonts/ibm-plex-mono-latin-700.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #01040a;
  --bg-soft: #06101f;
  --panel: rgba(5, 15, 32, 0.86);
  --panel-strong: rgba(7, 20, 43, 0.95);
  --blue: #4f8cff;
  --blue-soft: #a8c7ff;
  --cyan: #67e8f9;
  --text: #edf6ff;
  --muted: #94a9c4;
  --border: rgba(79, 140, 255, 0.3);
  --shadow: rgba(37, 99, 235, 0.22);
  --font-ui:
    "IBM Plex Sans",
    "Noto Sans SC",
    "PingFang SC",
    "Hiragino Sans GB",
    "Microsoft YaHei",
    sans-serif;
  --font-mono:
    "IBM Plex Mono",
    SFMono-Regular,
    Menlo,
    Monaco,
    Consolas,
    "Liberation Mono",
    monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-ui);
  color: var(--text);
  background:
    radial-gradient(circle at 18% 12%, rgba(37, 99, 235, 0.2), transparent 34%),
    radial-gradient(circle at 82% 30%, rgba(56, 189, 248, 0.1), transparent 30%),
    linear-gradient(180deg, #01040a 0%, #020817 48%, #01030a 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(79, 140, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 140, 255, 0.03) 1px, transparent 1px);
  background-size: 42px 42px;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 88%);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 88%);
  z-index: -2;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.018),
    rgba(255, 255, 255, 0.018) 1px,
    transparent 1px,
    transparent 4px
  );
  opacity: 0.35;
  z-index: -1;
}

a {
  color: var(--blue);
  text-decoration: none;
}

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

a:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 4px;
  border-radius: 4px;
}

code {
  font-family: var(--font-mono);
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 10;
  padding: 10px 14px;
  border: 1px solid var(--blue);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  transform: translateY(-180%);
  transition: transform 0.16s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.page {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

header {
  padding: 28px 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}

.brand {
  display: flex;
  flex-shrink: 0;
  flex-direction: column;
  gap: 7px;
}

.brand-logo {
  display: block;
  width: clamp(250px, 29vw, 360px);
  height: auto;
}

.brand-motto {
  max-width: 370px;
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 11px;
  font-style: italic;
  letter-spacing: 0.025em;
  line-height: 1.45;
}

.header-tools {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
}

.primary-nav,
.language-switcher {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.primary-nav {
  gap: 20px;
  font-size: 14px;
}

.primary-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  color: var(--muted);
}

.primary-nav a:hover,
.primary-nav a:focus-visible {
  color: var(--cyan);
}

.language-switcher {
  gap: 8px 12px;
  font-size: 12px;
}

.language-switcher a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  color: var(--muted);
  border-bottom: 1px solid transparent;
}

.language-switcher a:hover,
.language-switcher a:focus-visible,
.language-switcher a[aria-current="page"] {
  color: var(--blue-soft);
  border-bottom-color: var(--blue);
}

.hero {
  padding: 110px 0 86px;
  border-bottom: 1px solid var(--border);
}

.status {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--blue-soft);
  background: rgba(5, 15, 32, 0.7);
  box-shadow: 0 0 32px var(--shadow);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.45;
}

.pulse {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--blue);
  box-shadow: 0 0 12px var(--blue);
}

h1 {
  max-width: 980px;
  margin: 26px 0 22px;
  font-size: clamp(42px, 7.4vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.04em;
  overflow-wrap: break-word;
  hyphens: auto;
}

[lang="zh-CN"] h1 {
  letter-spacing: -0.02em;
  line-height: 1.08;
}

.accent {
  color: var(--blue);
  text-shadow: 0 0 24px rgba(79, 140, 255, 0.38);
}

.hero-text {
  max-width: 780px;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.75;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(5, 15, 32, 0.78);
  color: var(--text);
  font-weight: 700;
}

.button:hover {
  border-color: var(--cyan);
}

.button.primary {
  background: var(--blue);
  color: #01040a;
  border-color: var(--blue);
  box-shadow: 0 0 32px rgba(37, 99, 235, 0.3);
}

.button.primary:hover,
.button.primary:focus-visible {
  background: var(--cyan);
  color: #01040a;
  border-color: var(--cyan);
}

section {
  padding: 74px 0;
  scroll-margin-top: 20px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 26px;
  color: var(--blue);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 14px;
  font-weight: 700;
}

.section-title::before {
  content: "";
  width: 36px;
  height: 1px;
  background: var(--blue);
  box-shadow: 0 0 10px var(--blue);
}

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

.card {
  min-height: 210px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(79, 140, 255, 0.07), transparent 52%),
    var(--panel);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.25);
}

.card h3 {
  margin: 0 0 14px;
  font-size: 20px;
  color: var(--text);
}

.project-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.project-card-header h3 {
  margin: 0;
}

.project-mark {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
}

.card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 15px;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 20px;
}

.card-action {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-bottom: 1px solid rgba(168, 199, 255, 0.35);
  color: var(--blue-soft);
  font-size: 13px;
  font-weight: 700;
}

.card-action:hover,
.card-action:focus-visible {
  border-bottom-color: var(--cyan);
  color: var(--cyan);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
  align-items: stretch;
}

.terminal {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--panel-strong);
  box-shadow: inset 0 0 42px rgba(37, 99, 235, 0.08);
  overflow: hidden;
}

.terminal-top {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--blue);
  opacity: 0.75;
}

.terminal pre {
  margin: 0;
  color: var(--blue-soft);
  font-family: var(--font-mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.75;
  font-size: 14px;
}

.about-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
  font-size: 17px;
}

.motto {
  margin-top: 22px;
  padding: 18px 20px;
  border-left: 3px solid var(--blue);
  background: rgba(79, 140, 255, 0.075);
  color: var(--blue-soft);
  line-height: 1.7;
}

.not-found {
  min-height: 72vh;
  display: grid;
  align-content: center;
}

footer {
  padding: 32px 0 42px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

@media (max-width: 920px) {
  header {
    flex-direction: column;
  }

  .header-tools {
    align-items: flex-start;
  }

  .primary-nav,
  .language-switcher {
    justify-content: flex-start;
  }
}

@media (max-width: 820px) {
  .hero {
    padding-top: 70px;
  }

  .grid,
  .split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .page {
    width: min(100% - 28px, 1120px);
  }

  .hero {
    padding: 56px 0 64px;
  }

  section {
    padding: 58px 0;
  }

  .card,
  .terminal {
    padding: 20px;
  }
}

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

  .skip-link {
    transition: none;
  }
}
