/* ============================================
   破碎流星个人主页 - Design System
   Dark Theme + Amber Gold Accent
   ============================================ */

/* ========== CSS变量 ========== */
:root {
  color-scheme: dark;

  /* Colors */
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-glass: rgba(255, 255, 255, 0.05);
  --bg-tertiary: rgba(255, 255, 255, 0.08);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);

  /* Accent - Amber Gold */
  --accent-primary: #f59e0b;
  --accent-secondary: #fbbf24;
  --accent-glow: rgba(245, 158, 11, 0.3);
  --accent-glow-strong: rgba(245, 158, 11, 0.5);
  --accent-subtle: rgba(245, 158, 11, 0.1);

  /* Danger */
  --color-danger: #ef4444;

  /* Text */
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-tertiary: rgba(255, 255, 255, 0.5);

  /* Typography - System fonts stack for better performance */
  --font-body: system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Border Radius */
  --radius-sm: 0.5rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --radius-xl: 2rem;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
  --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px var(--accent-glow);

  /* Card hover transition - 统一复用 */
  --card-hover-transition: border-color var(--transition-base), transform var(--transition-base), box-shadow var(--transition-base);
}

/* ========== Reset & Base ========== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-tap-highlight-color: rgba(245, 158, 11, 0.3);
  /* Sticky Footer:内容不足时 main 撑满,footer 贴底 */
  display: flex;
  flex-direction: column;
}

#main-content {
  flex: 1;
}

/* ========== Layout ========== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding-inline: var(--space-3xl);
}

.section {
  padding-block: var(--space-3xl);
}

/* ========== Background Effects ========== */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(245, 158, 11, 0.04), transparent),
    radial-gradient(ellipse 80% 60% at 100% 100%, rgba(245, 158, 11, 0.1), transparent);
  pointer-events: none;
  z-index: -1;
}

/* ========== Typography ========== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

p {
  color: var(--text-secondary);
  max-width: 65ch;
  text-wrap: pretty;
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--accent-secondary);
}

/* ========== Navigation ========== */
.nav {
  position: sticky;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 100;
  padding: var(--space-md) 0;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding-inline: var(--space-3xl);
}

.nav-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.nav-logo span {
  color: var(--accent-primary);
}

.nav-links {
  display: flex;
  gap: var(--space-xl);
  list-style: none;
}

.nav-link {
  color: var(--text-secondary);
  font-weight: 500;
  padding: var(--space-sm) 0;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-primary);
  transition: var(--transition-base);
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Mobile Menu */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: var(--space-xs);
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: var(--transition-fast);
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ========== Buttons ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  border: none;
  transition: var(--transition-base);
}

.btn-primary {
  background: var(--accent-primary);
  color: var(--bg-primary);
}

.btn-primary:hover {
  background: var(--accent-secondary);
  color: var(--bg-primary);
  transform: translateY(-3px);
  box-shadow: 0 0 40px var(--accent-glow-strong);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--accent-primary);
  color: var(--accent-primary);
}

.btn-outline:hover {
  background: var(--accent-subtle);
  border-color: var(--accent-secondary);
  color: var(--accent-secondary);
  transform: translateY(-3px);
  box-shadow: 0 0 30px var(--accent-glow);
}

/* ========== Tags ========== */
.tag {
  display: inline-flex;
  padding: var(--space-xs) var(--space-sm);
  background: var(--accent-subtle);
  color: var(--accent-primary);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
}






/* ========== Hero Section ========== */
.hero-404-signature {
  border-left: none;
  margin-bottom: var(--space-xl);
}

.hero-404-number {
  font-size: clamp(4rem, 10vw, 8rem);
  font-weight: 800;
  color: var(--accent-primary);
  font-style: normal;
  display: block;
  line-height: 1;
}

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-3xl) var(--space-lg);
  position: relative;
  overflow: hidden;
}

#star-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero-avatar {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--accent-primary);
  box-shadow: var(--shadow-glow);
  margin-bottom: var(--space-xl);
  animation: float 6s ease-in-out infinite;
  position: relative;
  z-index: 2;
  will-change: transform;
}

.avatar-wrapper {
  position: relative;
  display: inline-block;
  margin-bottom: var(--space-xl);
}

.avatar-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.25) 0%, transparent 70%);
  animation: glowPulse 3s ease-in-out infinite;
  z-index: 1;
  pointer-events: none;
}

.avatar-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 1px solid rgba(245, 158, 11, 0.2);
  animation: ringRotate 20s linear infinite;
  z-index: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.avatar-ring::before {
  content: '';
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-primary);
  box-shadow: 0 0 10px var(--accent-primary);
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); }
}

@keyframes ringRotate {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.hero-name {
  margin-bottom: var(--space-sm);
}

.hero-enname {
  font-size: 1.25rem;
  color: var(--text-tertiary);
  font-weight: 400;
  text-align: center;
  margin: 0 auto var(--space-sm);
}

.hero-subtitle {
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--accent-primary);
  margin-bottom: var(--space-lg);
  font-weight: 700;
  letter-spacing: 0.15em;
  text-shadow: 0 0 30px var(--accent-glow);
  text-transform: capitalize;
}

.hero-signature {
  font-size: 1.125rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: var(--space-lg);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-glass);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--accent-primary);
  display: inline-block;
  word-break: keep-all;
}

.hero-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  max-width: 420px;
  margin-inline: auto;
}
.hero-links .btn {
  padding-block: var(--space-md);
}




/* ========== Filter Button ========== */
.filter-btn {
  padding: var(--space-sm) var(--space-lg);
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.875rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.filter-btn:hover {
  background: var(--bg-glass);
  border-color: var(--border-hover);
  color: var(--accent-secondary);
}

.filter-btn.active {
  background: var(--accent-subtle);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

/* ========== Detail Page ========== */
.detail-header {
  padding-top: var(--space-md);
  padding-bottom: var(--space-md);
  text-align: center;
  overflow-x: hidden;
}

.detail-title {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: var(--space-md);
}

.header-divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  border-radius: 2px;
  margin: var(--space-md) auto;
}



.warning-highlight {
  margin-top: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: rgba(239, 68, 68, 0.1);
  border-left: 3px solid var(--color-danger);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--color-danger);
}



/* ========== Detail Section (通用卡片样式) ========== */
.detail-section {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  scroll-margin-top: calc(60px + var(--space-lg));
  transition: var(--card-hover-transition);
  contain: layout style paint;
}

.detail-section:hover {
  border-color: var(--accent-primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.detail-section h2 {
  margin-bottom: var(--space-md);
  color: var(--accent-primary);
  font-size: 1.25rem;
  font-weight: 400;
}

.detail-section h3 {
  font-size: 1rem;
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
  color: var(--text-secondary);
  font-weight: 600;
  scroll-margin-top: calc(60px + var(--space-lg));
}

.detail-section h4 {
  font-size: 0.95rem;
  margin-top: var(--space-md);
  margin-bottom: var(--space-xs);
  color: var(--text-secondary);
  font-weight: 500;
}

.detail-section p,
.detail-section li,
.detail-section ol,
.detail-section ul,
.detail-section code,
.detail-section strong {
  overflow-wrap: anywhere;
  font-weight: 400;
}

.detail-section p,
.detail-section li {
  line-height: 1.8;
}

.detail-section p {
  margin-bottom: var(--space-md);
}

.detail-section li {
  margin-bottom: var(--space-xs);
}

.detail-section ul,
.detail-section ol {
  margin: var(--space-md) 0;
  padding-left: var(--space-xl);
}

.detail-section ol.start-0 {
  counter-reset: item -1;
  list-style: none;
  padding-left: 0;
}

.detail-section ol.start-0 li {
  counter-increment: item 1;
  padding-left: 2.2em;
  text-indent: -2.2em;
}

.detail-section ol.start-0 li::before {
  content: counter(item) ". ";
  display: inline-block;
  width: 2em;
  text-align: right;
  margin-right: 0.3em;
  color: var(--text-tertiary);
}

.detail-section .tutorial-img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-lg);
  display: block;
}



/* ========== Profile Card ========== */
.profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  text-align: center;
  margin-bottom: var(--space-2xl);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  transition: var(--card-hover-transition);
  contain: layout style paint;
}

.profile-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent-primary);
  box-shadow: var(--shadow-glow);
  margin-bottom: var(--space-md);
}

.profile-name {
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.profile-subtitle {
  font-size: 1rem;
  color: var(--text-tertiary);
  margin-bottom: var(--space-lg);
}

.profile-signature {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-glass);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--accent-primary);
}

.profile-signature span {
  font-style: italic;
  color: var(--text-secondary);
  font-size: 0.875rem;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .profile-card {
    padding: var(--space-lg);
  }
}

/* ========== Contact Page ========== */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  text-align: center;
  transition: var(--card-hover-transition);
  contain: layout style paint;
}

.contact-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.contact-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto var(--space-md);
  background: var(--accent-subtle);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.contact-label {
  font-size: 0.875rem;
  color: var(--text-tertiary);
  margin-bottom: var(--space-sm);
}

.contact-value {
  font-size: 1.125rem;
  color: var(--text-primary);
  font-weight: 600;
}

.contact-email-link {
  color: var(--text-primary);
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.2);
  text-underline-offset: 3px;
  transition: var(--transition-fast);
}

.contact-email-link:hover {
  color: var(--accent-primary);
  text-decoration-color: var(--accent-primary);
}

.contact-action-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--accent-primary);
  font-weight: 600;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.contact-action-link:hover {
  color: var(--accent-secondary);
  background: var(--accent-subtle);
}

/* ========== Quote Section ========== */
.quote-section {
  text-align: center;
  padding: 7rem var(--space-lg);
  background: linear-gradient(180deg, transparent, var(--bg-secondary), transparent);
  position: relative;
}

/* 顶部琥珀渐变分隔线 */
.quote-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(280px, 60%);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-primary), var(--accent-secondary), var(--accent-primary), transparent);
}

.quote-text {
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 400;
  color: var(--text-primary);
  margin-bottom: var(--space-lg);
  /* 诗句用楷书(霞鹜文楷普通版,笔画更细),回退宋体 */
  font-family: "LXGW WenKai", "LXGW WenKai Screen", "Songti SC", "SimSun", serif;
  text-align: center;
}

.quote-source {
  color: var(--accent-primary);
  font-size: 1.125rem;
  text-align: center;
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
}

/* 落款两侧星饰 */
.quote-source::before,
.quote-source::after {
  content: '\2726';
  font-size: 0.6em;
  opacity: 0.7;
}

/* ========== Footer ========== */
.footer {
  padding: var(--space-xl);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  border-top: 1px solid var(--border-subtle);
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.8rem;
  text-align: center;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding-inline: var(--space-lg);
  text-align: center;
}

.footer-inner p {
  margin-inline: auto;
}

#detail-meta {
  text-align: center;
  margin-inline: auto;
}

.footer a {
  color: rgba(245, 158, 11, 0.65);
}

.footer .icp {
  margin-top: var(--space-xs);
  font-size: 0.8rem;
}
.footer .icp a {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: color var(--transition-fast);
}
.footer .icp a:hover {
  color: var(--accent-primary);
  text-decoration: underline;
}
.footer .disclaimer {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.32);
  max-width: 600px;
  margin-inline: auto;
  line-height: 1.5;
}

.beian-icon {
  width: 16px;
  height: 20px;
  vertical-align: middle;
  margin-right: 2px;
}

/* ========== Animations ========== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: fadeInUp 0.6s ease forwards;
}

.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
/* ========== Scroll Reveal ========== */
/* 仅在 JS 可用时隐藏(reveal 靠 JS 加 .visible);无 JS 时内容始终可见 */
.js .reveal {
  opacity: 0;
  transition: opacity 0.6s ease;
}

.js .reveal.visible {
  opacity: 1;
}

/* ========== Scrollbar ========== */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--border-hover) var(--bg-primary);
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-hover);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-tertiary);
}

/* ========== Utility Classes ========== */
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }

.padding-top-0 { padding-top: 0; }
.color-text-secondary { color: var(--text-secondary); }
.line-height-1-8 { line-height: 1.8; }

/* 内联样式替换类 */
.svg-icon-sm { vertical-align: middle; margin-inline-end: 8px; }

.filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 4px;
  border-radius: 0.625rem;
  font-size: 0.65rem;
  background: var(--bg-glass);
  color: var(--text-tertiary);
  margin-left: 2px;
  transition: var(--transition-fast);
}

.filter-btn.active .filter-count {
  background: var(--accent-subtle);
  color: var(--accent-primary);
}

/* ========== Back to Top Button ========== */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 90;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent-primary);
  color: var(--bg-primary);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity var(--transition-base), visibility var(--transition-base), transform var(--transition-base), background var(--transition-fast);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--accent-secondary);
  transform: translateY(-4px);
  box-shadow: 0 6px 24px var(--accent-glow-strong);
}

.back-to-top:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

@media (max-width: 768px) {
  .back-to-top {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 40px;
    height: 40px;
  }
}

/* ========== Focus Visible ========== */
.nav-link:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
  border-radius: 2px;
}

.nav-toggle:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

.filter-btn:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

.btn:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}


a:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ========== Skip Link ========== */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  z-index: 1001;
  background: var(--accent-primary);
  color: var(--bg-primary);
  padding: 0.5rem 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 var(--radius-sm) 0;
}

.skip-link:focus {
  top: 0;
}

/* ========== Toast ========== */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-primary);
  color: var(--bg-primary);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  z-index: 1000;
  animation: fadeInUp 0.3s ease;
}

/* ========== High Contrast ========== */
@media (prefers-contrast: more) {
  :root {
    --border-subtle: rgba(255, 255, 255, 0.25);
    --border-hover: rgba(255, 255, 255, 0.4);
    --text-secondary: rgba(255, 255, 255, 0.85);
    --text-tertiary: rgba(255, 255, 255, 0.65);
  }

  .detail-section,
  .contact-card,
  .profile-card {
    border-width: 2px;
  }

  .filter-btn.active {
    border-width: 2px;
  }
}

/* ========== Reduced Motion ========== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ========== Responsive ========== */
@media (min-width: 769px) {
  html {
    scrollbar-gutter: stable;
  }
}

@media (max-width: 1024px) {
  .container,
  .nav-inner {
    padding-inline: var(--space-2xl);
  }

  .detail-section {
    padding: var(--space-lg);
  }
}

@media (max-width: 768px) {
  .container,
  .nav-inner {
    padding-inline: var(--space-xl);
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    flex-direction: column;
    padding: 0;
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
  }

  .nav-links.open {
    max-height: 400px;
    padding: var(--space-lg);
    gap: var(--space-md);
  }

  .nav-links li {
    padding-left: var(--space-lg);
  }

  /* Hero mobile */
  .hero-avatar {
    width: clamp(100px, 25vw, 150px);
    height: clamp(100px, 25vw, 150px);
  }

  .hero-signature {
    font-size: 0.9rem;
    padding: var(--space-sm) var(--space-md);
  }

  .hero-links {
    gap: var(--space-xs);
  }

  /* Contact cards stack */
  .contact-grid {
    grid-template-columns: 1fr;
  }

}

/* ========== Tutorial Redesign: knowledge-base index + flexible reader ========== */
.tutorial-page,
.tutorial-detail-page {
  min-height: 100%;
  padding-bottom: var(--space-3xl);
}

html:has(.tutorial-detail-page) {
  scroll-padding-top: 5.75rem;
}

.tutorial-index-hero,
.tutorial-detail-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border-subtle);
  background:
    radial-gradient(circle at 86% 18%, rgba(245, 158, 11, 0.12), transparent 26rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.025), transparent 58%);
}

.tutorial-index-hero::after,
.tutorial-detail-hero::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: -8rem;
  width: 22rem;
  height: 22rem;
  border: 1px solid rgba(245, 158, 11, 0.1);
  border-radius: 50%;
  pointer-events: none;
}

.tutorial-detail-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.25rem;
}

.tutorial-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  color: var(--text-tertiary);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.tutorial-detail-back {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--border-subtle);
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-secondary);
  font-size: 0.76rem;
  letter-spacing: 0.03em;
  text-decoration: none;
  transition: border-color var(--transition-fast), background var(--transition-fast), color var(--transition-fast);
}

.tutorial-detail-back > span:first-child {
  color: var(--accent-primary);
  font-size: 1rem;
  line-height: 1;
  transition: transform var(--transition-fast);
}

.tutorial-detail-back:hover,
.tutorial-detail-back:focus-visible {
  border-color: rgba(245, 158, 11, 0.42);
  background: rgba(245, 158, 11, 0.08);
  color: var(--accent-secondary);
}

.tutorial-detail-back:hover > span:first-child {
  transform: translateX(-0.15rem);
}

.tutorial-detail-back:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 3px;
}

.tutorial-breadcrumb a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.tutorial-breadcrumb a:hover {
  color: var(--accent-primary);
}

.tutorial-overline,
.tutorial-side-kicker,
.tutorial-panel-label {
  color: var(--accent-primary);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
}

.tutorial-index-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: var(--space-3xl);
  padding: 2.5rem 0 3.75rem;
}

.tutorial-index-title,
.tutorial-detail-title {
  max-width: 900px;
  margin: 0.45rem 0 0;
  color: var(--text-primary);
  font-size: clamp(2.7rem, 7vw, 5.8rem);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 1.02;
}

.tutorial-index-lede {
  max-width: 620px;
  margin: 1.25rem 0 0;
  color: var(--text-secondary);
  font-size: clamp(1rem, 1.8vw, 1.18rem);
  line-height: 1.85;
}

.tutorial-index-stats {
  min-width: 145px;
  padding: 0.5rem 0 0.5rem 1.5rem;
  border-left: 1px solid var(--border-hover);
  color: var(--text-tertiary);
}

.tutorial-index-stats strong {
  display: block;
  color: var(--accent-secondary);
  font-size: 3.4rem;
  font-weight: 500;
  letter-spacing: -0.07em;
  line-height: 0.95;
}

.tutorial-index-stats > span {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.82rem;
}

.tutorial-index-latest {
  display: grid;
  gap: 0.18rem;
  margin-top: 1.25rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.72rem;
}

.tutorial-index-latest time {
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.tutorial-library {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  align-items: start;
  gap: clamp(1.5rem, 4vw, 3.25rem);
  max-width: 1280px;
  padding-top: 2.25rem;
  padding-bottom: 4rem;
}

.tutorial-library-main {
  min-width: 0;
}

.tutorial-control-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.15rem;
}

.tutorial-search-shell {
  display: flex;
  align-items: center;
  flex: 1 1 420px;
  gap: 0.7rem;
  max-width: 650px;
  padding: 0.78rem 1rem;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  color: var(--text-tertiary);
  transition: border-color var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
}

.tutorial-search-shell:focus-within {
  background: rgba(255, 255, 255, 0.065);
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

.tutorial-search-shell svg {
  flex: 0 0 1.05rem;
  width: 1.05rem;
  height: 1.05rem;
}

.tutorial-search-shell input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  font-size: 0.88rem;
}

.tutorial-search-shell input::placeholder {
  color: var(--text-tertiary);
}

.tutorial-result-summary {
  flex: 0 0 auto;
  color: var(--text-tertiary);
  font-size: 0.78rem;
  white-space: nowrap;
}

.tutorial-category-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.85rem;
  padding: 0.9rem 0 1.2rem;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.tutorial-filter-label {
  color: var(--text-tertiary);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.tutorial-category-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tutorial-category-list .filter-btn {
  padding: 0.38rem 0.72rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--text-tertiary);
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
  transition: color var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast);
}

.tutorial-category-list .filter-btn:hover,
.tutorial-category-list .filter-btn.active {
  border-color: rgba(245, 158, 11, 0.28);
  background: var(--accent-subtle);
  color: var(--accent-secondary);
}

.tutorial-category-list .filter-count {
  margin-left: 0.15rem;
  color: inherit;
  font-size: 0.7rem;
  opacity: 0.7;
}

.tutorial-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  padding-top: 1.35rem;
}

.tutorial-card {
  min-width: 0;
  min-height: 250px;
  padding: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border-subtle);
  border-radius: 1.15rem;
  transition: border-color var(--transition-base), background var(--transition-base), transform var(--transition-base), box-shadow var(--transition-base);
}

.tutorial-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(245, 158, 11, 0.42);
  box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.2);
  transform: translateY(-4px);
}

.tutorial-card-link {
  display: flex;
  min-height: 250px;
  flex-direction: column;
  padding: 1.35rem 1.4rem 1.25rem;
  color: inherit;
  text-decoration: none;
}

.tutorial-card-link:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: -4px;
  border-radius: 1rem;
}

.tutorial-card-top,
.tutorial-card-meta {
  display: flex;
  align-items: center;
}

.tutorial-card-top {
  gap: 0.65rem;
}

.tutorial-card-number {
  color: var(--accent-primary);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
}

.tutorial-card-category {
  padding: 0.24rem 0.55rem;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  color: var(--text-tertiary);
  font-size: 0.68rem;
}

.tutorial-card-arrow {
  margin-left: auto;
  color: var(--text-tertiary);
  font-size: 1.2rem;
  line-height: 1;
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.tutorial-card:hover .tutorial-card-arrow {
  color: var(--accent-secondary);
  transform: translate(2px, -2px);
}

.tutorial-card-body {
  margin-top: 2.1rem;
}

.tutorial-card-body h2 {
  margin: 0;
  color: var(--text-primary);
  font-size: clamp(1.15rem, 2vw, 1.42rem);
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.35;
  transition: color var(--transition-fast);
}

.tutorial-card:hover .tutorial-card-body h2 {
  color: var(--accent-secondary);
}

.tutorial-card-desc {
  display: -webkit-box;
  margin: 0.75rem 0 0;
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 0.86rem;
  line-height: 1.7;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.tutorial-card-bottom {
  margin-top: auto;
  padding-top: 1.6rem;
}

.tutorial-card-meta {
  flex-wrap: wrap;
  gap: 0.45rem 0.85rem;
  color: var(--text-tertiary);
  font-size: 0.7rem;
}

.tutorial-card-meta span + span::before,
.tutorial-card-meta time::before {
  content: '·';
  margin-right: 0.85rem;
  color: var(--border-hover);
}

.tutorial-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.tutorial-card-tags .tag,
.tutorial-detail-tags .tag {
  padding: 0.25rem 0.58rem;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  color: var(--text-tertiary);
  font-size: 0.68rem;
}

.tutorial-empty {
  display: grid;
  min-height: 300px;
  place-content: center;
  justify-items: center;
  padding: 2rem;
  border: 1px dashed var(--border-hover);
  border-radius: 1.15rem;
  color: var(--text-tertiary);
  text-align: center;
}

.tutorial-empty-mark {
  display: block;
  margin-bottom: 0.75rem;
  color: var(--accent-primary);
  font-size: 1.4rem;
}

.tutorial-empty h2 {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.tutorial-empty p {
  margin-top: 0.35rem;
  font-size: 0.82rem;
}

.tutorial-placeholder {
  display: grid;
  min-height: 260px;
  place-content: center;
  color: var(--text-tertiary);
  text-align: center;
}

.tutorial-discovery {
  position: sticky;
  top: 5.5rem;
  display: grid;
  gap: 1rem;
}

.tutorial-side-card,
.tutorial-related-card {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border-subtle);
  border-radius: 1.15rem;
}

.tutorial-side-card {
  padding: 1.35rem;
}

.tutorial-random-pick-card {
  background:
    linear-gradient(145deg, rgba(245, 158, 11, 0.16), transparent 74%),
    rgba(255, 255, 255, 0.04);
}

.tutorial-side-card h2,
.tutorial-related-card h2 {
  margin-top: 0.55rem;
  color: var(--text-primary);
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.tutorial-side-card > p:not(.tutorial-side-kicker) {
  margin-top: 0.6rem;
  color: var(--text-secondary);
  font-size: 0.82rem;
  line-height: 1.7;
}

.tutorial-random-button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 1.2rem;
  padding: 0.68rem 0.8rem 0.68rem 0.95rem;
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 0.75rem;
  background: rgba(245, 158, 11, 0.12);
  color: var(--accent-secondary);
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.tutorial-random-button:hover,
.tutorial-random-button:focus-visible {
  background: rgba(245, 158, 11, 0.2);
  border-color: var(--accent-primary);
  outline: none;
}

.tutorial-side-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.tutorial-side-mark {
  color: var(--accent-primary);
  font-size: 1.3rem;
}

.tutorial-random-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
}

.tutorial-random-list li + li {
  border-top: 1px solid var(--border-subtle);
}

.tutorial-random-list .tutorial-link {
  display: grid;
  grid-template-columns: 1.5rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.45rem;
  padding: 0.78rem 0;
  color: var(--text-secondary);
  font-size: 0.78rem;
  line-height: 1.45;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.tutorial-random-list .tutorial-link:hover {
  color: var(--accent-secondary);
}

.tutorial-random-index {
  color: var(--text-tertiary);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.65rem;
}

.tutorial-random-title {
  min-width: 0;
}

.tutorial-random-arrow {
  color: var(--text-tertiary);
}

.tutorial-random-empty {
  padding: 0.7rem 0;
  color: var(--text-tertiary);
  font-size: 0.78rem;
}

/* Detail header */
.tutorial-detail-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 2rem;
  padding: 2.25rem 0 3.4rem;
}

.tutorial-detail-title {
  max-width: 930px;
  margin-top: 0.5rem;
  font-size: clamp(2.2rem, 5.6vw, 4.8rem);
  line-height: 1.08;
}

.tutorial-detail-description {
  max-width: 720px;
  margin-top: 1.2rem;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.8;
}

.tutorial-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1.25rem;
  margin-top: 1.35rem;
}

.tutorial-meta-item {
  display: inline-flex;
  align-items: baseline;
  gap: 0.45rem;
  color: var(--text-tertiary);
  font-size: 0.72rem;
}

.tutorial-meta-item strong,
.tutorial-meta-item time {
  color: var(--text-secondary);
  font-weight: 500;
}

.tutorial-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.95rem;
}

.tutorial-detail-stamp {
  display: grid;
  min-width: 105px;
  gap: 0.35rem;
  align-content: center;
  justify-items: center;
  padding: 1.1rem 0.85rem;
  border: 1px solid rgba(245, 158, 11, 0.38);
  border-radius: 0.85rem;
  background: rgba(245, 158, 11, 0.07);
  color: var(--accent-primary);
  transform: rotate(3deg);
}

.tutorial-detail-stamp span {
  font-size: 0.58rem;
  letter-spacing: 0.16em;
}

.tutorial-detail-stamp strong {
  color: var(--accent-secondary);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 2.5rem;
  font-weight: 500;
  line-height: 1;
}

.tutorial-reading-progress {
  position: fixed;
  top: 3.5rem;
  right: 0;
  left: 0;
  z-index: 101;
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.tutorial-reading-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  box-shadow: 0 0 12px var(--accent-glow);
  transition: width 100ms linear;
}

.tutorial-reader-layout {
  display: grid;
  grid-template-columns: 180px minmax(0, 820px) 220px;
  align-items: start;
  justify-content: center;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  max-width: 1360px;
  padding-top: 2.25rem;
  padding-bottom: 4rem;
}

.tutorial-reader-toc,
.tutorial-reader-related {
  position: sticky;
  top: 5.5rem;
  min-width: 0;
}

.tutorial-toc-toggle {
  display: none;
}

.tutorial-toc-panel,
.tutorial-related-card {
  padding: 1rem;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-subtle);
  border-radius: 1rem;
}

.tutorial-toc-list,
.tutorial-toc-sublist {
  list-style: none;
  padding: 0;
}

.tutorial-toc-list {
  margin: 0.7rem 0 0;
}

.tutorial-toc-list > li + li {
  margin-top: 0.18rem;
}

.tutorial-toc-link,
.tutorial-toc-sublink {
  display: block;
  border-left: 1px solid transparent;
  color: var(--text-tertiary);
  line-height: 1.45;
  text-decoration: none;
  transition: color var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
}

.tutorial-toc-link {
  padding: 0.48rem 0.6rem;
  font-size: 0.76rem;
}

.tutorial-toc-sublink {
  padding: 0.28rem 0.6rem 0.28rem 1rem;
  font-size: 0.68rem;
}

.tutorial-toc-link:hover,
.tutorial-toc-sublink:hover,
.tutorial-toc-link.is-active,
.tutorial-toc-sublink.is-active {
  border-left-color: var(--accent-primary);
  background: var(--accent-subtle);
  color: var(--accent-secondary);
}

.tutorial-toc-sublist {
  margin: 0.1rem 0 0.3rem;
}

.tutorial-toc-empty {
  margin-top: 0.8rem;
  color: var(--text-tertiary);
  font-size: 0.72rem;
}

.tutorial-article {
  min-width: 0;
}

.tutorial-article .tutorial-loading {
  display: flex;
  align-items: center;
  min-height: 160px;
  justify-content: center;
  border: 1px dashed var(--border-hover);
  border-radius: 1.15rem;
  color: var(--text-tertiary);
}

.tutorial-blocks {
  min-width: 0;
}

.tutorial-block {
  margin-bottom: 1rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border-subtle);
  border-radius: 1.15rem;
  scroll-margin-top: 5.75rem;
}

.tutorial-block--warning {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(255, 255, 255, 0.025));
  border-color: rgba(239, 68, 68, 0.35);
}

.tutorial-block-heading {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding-bottom: 0.95rem;
  border-bottom: 1px solid var(--border-subtle);
}

.tutorial-block-index {
  flex: 0 0 auto;
  color: var(--accent-primary);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
}

.tutorial-block h2 {
  margin: 0;
  color: var(--text-primary);
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.35;
}

.tutorial-block-content {
  padding-top: 1.2rem;
  color: var(--text-secondary);
  font-size: 0.94rem;
  line-height: 1.9;
}

.tutorial-block-content > :first-child {
  margin-top: 0;
}

.tutorial-block-content > :last-child {
  margin-bottom: 0;
}

.tutorial-block-content p,
.tutorial-block-content ul,
.tutorial-block-content ol,
.tutorial-block-content blockquote,
.tutorial-block-content figure {
  margin-top: 0.85rem;
}

.tutorial-block-content h3 {
  margin-top: 1.75rem;
  color: var(--text-primary);
  font-size: 1.02rem;
  line-height: 1.5;
  scroll-margin-top: 5.75rem;
}

.tutorial-block-content h4 {
  margin-top: 1.25rem;
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.tutorial-block-content a {
  color: var(--accent-secondary);
  text-decoration-color: rgba(251, 191, 36, 0.45);
  text-underline-offset: 0.18em;
}

.tutorial-block-content a:hover {
  color: var(--text-primary);
}

.tutorial-block-content ul,
.tutorial-block-content ol {
  padding-left: 1.35rem;
}

.tutorial-knowledge-list {
  margin-top: 0;
}

.tutorial-knowledge-list li::marker {
  color: var(--accent-primary);
  font-weight: 700;
}

.tutorial-knowledge-list strong {
  color: var(--text-primary);
  font-weight: 650;
}

.tutorial-block-content li + li {
  margin-top: 0.45rem;
}

.tutorial-block-content code {
  padding: 0.12rem 0.35rem;
  border: 1px solid var(--border-subtle);
  border-radius: 0.35rem;
  background: rgba(0, 0, 0, 0.22);
  color: var(--accent-secondary);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.86em;
}

.tutorial-block-content pre {
  max-width: 100%;
  overflow-x: auto;
  padding: 1rem;
  border: 1px solid var(--border-subtle);
  border-radius: 0.7rem;
  background: rgba(0, 0, 0, 0.3);
}

.tutorial-block-content pre code {
  padding: 0;
  border: 0;
  background: transparent;
}

.tutorial-block-content .warning-highlight {
  padding: 0.75rem 0.9rem;
  border-left: 3px solid var(--color-danger);
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
}

.tutorial-block-content img,
.tutorial-figure img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 0.8rem;
}

.tutorial-figure {
  margin-inline: 0;
}

.tutorial-figure figcaption {
  margin-top: 0.5rem;
  color: var(--text-tertiary);
  font-size: 0.72rem;
  text-align: center;
}

.tutorial-quote {
  padding: 0.85rem 1rem;
  border-left: 3px solid var(--accent-primary);
  background: var(--accent-subtle);
  color: var(--text-secondary);
}

.tutorial-quote cite {
  display: block;
  margin-top: 0.55rem;
  color: var(--text-tertiary);
  font-size: 0.76rem;
  font-style: normal;
}

.tutorial-checklist,
.tutorial-step-list {
  list-style: none;
  margin-left: 0;
  padding-left: 0 !important;
}

.tutorial-checklist li {
  display: grid;
  grid-template-columns: 1.3rem minmax(0, 1fr);
  gap: 0.55rem;
  align-items: start;
}

.tutorial-checkmark {
  display: grid;
  width: 1.15rem;
  height: 1.15rem;
  place-items: center;
  margin-top: 0.23rem;
  border: 1px solid rgba(245, 158, 11, 0.42);
  border-radius: 50%;
  color: var(--accent-secondary);
  font-size: 0.7rem;
  line-height: 1;
}

.tutorial-step {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  gap: 0.85rem;
  align-items: start;
}

.tutorial-step + .tutorial-step {
  margin-top: 1.2rem;
}

.tutorial-step-number {
  display: grid;
  width: 2.1rem;
  height: 2.1rem;
  place-items: center;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 0.65rem;
  color: var(--accent-secondary);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.72rem;
}

.tutorial-step-body h3 {
  margin-top: 0;
}

.tutorial-faq-list {
  margin-top: 0.85rem;
}

.tutorial-faq {
  border-bottom: 1px solid var(--border-subtle);
}

.tutorial-faq:first-child {
  border-top: 1px solid var(--border-subtle);
}

.tutorial-faq summary {
  padding: 0.85rem 0;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
}

.tutorial-faq summary::marker {
  color: var(--accent-primary);
}

.tutorial-faq > div {
  padding: 0 0 0.9rem;
  color: var(--text-secondary);
  font-size: 0.86rem;
}

.tutorial-article-footer {
  padding-top: 1rem;
}

.tutorial-article-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.tutorial-article-nav-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.3rem 0.7rem;
  align-items: center;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border-subtle);
  border-radius: 0.85rem;
  color: var(--text-primary);
  text-decoration: none;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.tutorial-article-nav-item:hover {
  background: var(--accent-subtle);
  border-color: rgba(245, 158, 11, 0.4);
}

.tutorial-article-nav-item[hidden] {
  display: none;
}

.tutorial-article-nav-label {
  grid-column: 1 / -1;
  color: var(--text-tertiary);
  font-size: 0.68rem;
}

.tutorial-article-nav-item strong {
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tutorial-article-nav-item > span:last-child {
  color: var(--accent-primary);
  font-size: 1.15rem;
}

.tutorial-article-nav-next {
  text-align: right;
}

.tutorial-article-nav-next strong {
  grid-column: 1;
  grid-row: 2;
}

.tutorial-article-nav-next > span:last-child {
  grid-column: 2;
  grid-row: 2;
}

.tutorial-return-link {
  display: block;
  width: fit-content;
  margin: 1.25rem auto 0;
  color: var(--text-tertiary);
  font-size: 0.78rem;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.tutorial-return-link:hover {
  color: var(--accent-secondary);
}

@media (max-width: 1120px) {
  .tutorial-library {
    grid-template-columns: minmax(0, 1fr) 240px;
  }

  .tutorial-reader-layout {
    grid-template-columns: 165px minmax(0, 1fr);
  }

  .tutorial-reader-related {
    display: none;
  }
}

@media (max-width: 820px) {
  .tutorial-index-heading {
    gap: 2rem;
  }

  .tutorial-library {
    grid-template-columns: 1fr;
  }

  .tutorial-discovery {
    position: static;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  }

  .tutorial-reader-layout {
    grid-template-columns: 1fr;
    padding-top: 1.25rem;
  }

  .tutorial-reader-toc {
    position: static;
  }

  .tutorial-toc-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border-subtle);
    border-radius: 0.85rem;
    background: rgba(255, 255, 255, 0.035);
    color: var(--text-secondary);
    font: inherit;
    font-size: 0.82rem;
    cursor: pointer;
  }

  .tutorial-toc-toggle.is-open {
    border-color: rgba(245, 158, 11, 0.4);
    color: var(--accent-secondary);
  }

  .tutorial-toc-panel {
    display: none;
    margin-top: 0.7rem;
  }

  .tutorial-toc-panel.is-open {
    display: block;
  }

  .tutorial-reader-related {
    position: static;
    display: block;
  }

  .tutorial-related-card {
    padding: 1.25rem;
  }

  .tutorial-detail-stamp {
    min-width: 88px;
  }
}

@media (max-width: 600px) {
  .tutorial-detail-topline {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.75rem;
  }

  .tutorial-index-heading,
  .tutorial-detail-heading {
    grid-template-columns: 1fr;
  }

  .tutorial-index-heading {
    padding-bottom: 2.5rem;
  }

  .tutorial-index-stats {
    display: flex;
    align-items: baseline;
    gap: 0.65rem;
    min-width: 0;
    padding: 0.85rem 0 0;
    border-top: 1px solid var(--border-hover);
    border-left: 0;
  }

  .tutorial-index-stats strong {
    font-size: 2.6rem;
  }

  .tutorial-index-latest {
    display: flex;
    gap: 0.4rem;
    margin: 0 0 0 auto;
    padding: 0;
    border-top: 0;
  }

  .tutorial-detail-heading {
    gap: 1.25rem;
  }

  .tutorial-detail-stamp {
    display: flex;
    width: fit-content;
    min-width: 0;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.75rem;
    transform: rotate(0);
  }

  .tutorial-detail-stamp strong {
    font-size: 1.55rem;
  }

  .tutorial-control-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .tutorial-result-summary {
    padding-left: 0.25rem;
  }

  .tutorial-results {
    grid-template-columns: 1fr;
  }

  .tutorial-discovery {
    grid-template-columns: 1fr;
  }

  .tutorial-article-nav {
    grid-template-columns: 1fr;
  }

  .tutorial-article-nav-next {
    text-align: left;
  }
}

@media (max-width: 480px) {
  .tutorial-page .container,
  .tutorial-detail-page .container {
    padding-inline: 1.1rem;
  }

  .tutorial-index-title,
  .tutorial-detail-title {
    font-size: clamp(2.25rem, 12vw, 3.6rem);
  }

  .tutorial-block {
    padding: 1.1rem;
    border-radius: 0.9rem;
  }

  .tutorial-block-content {
    font-size: 0.9rem;
  }
}

/* ========== Whole-site redesign: star map personal space ========== */

/* Shared shell */
.nav {
  padding-block: 0.85rem;
  background: rgba(10, 10, 15, 0.78);
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.nav-inner {
  max-width: 1240px;
  padding-inline: clamp(1.25rem, 4vw, 3rem);
}

.nav-logo {
  gap: 0.7rem;
  line-height: 1;
}

.nav-logo-mark {
  color: var(--accent-primary);
  font-size: 1.15rem;
  text-shadow: 0 0 16px var(--accent-glow);
}

.nav-logo-copy {
  display: inline-flex;
  flex-direction: column;
  gap: 0.22rem;
}

.nav-logo-copy strong {
  font-size: 1.02rem;
  letter-spacing: 0.02em;
}

.nav-logo-copy small {
  color: var(--text-tertiary);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.18em;
}

.nav-links {
  gap: 0.45rem;
}

.nav-link {
  padding: 0.55rem 0.85rem;
  border-radius: 0.55rem;
  font-size: 0.9rem;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.nav-link::after {
  left: 0.85rem;
  right: 0.85rem;
  bottom: 0.25rem;
  width: auto;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--transition-base);
}

.nav-link:hover,
.nav-link.active {
  background: rgba(245, 158, 11, 0.08);
}

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

.btn-quiet {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.btn-quiet:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-hover);
  color: var(--text-primary);
  transform: translateY(-3px);
}

.footer {
  margin-top: 0;
  padding: 3rem 0 1.35rem;
  background: linear-gradient(180deg, rgba(18, 18, 26, 0), rgba(18, 18, 26, 0.72));
  text-align: left;
}

.footer-inner {
  max-width: 1240px;
  padding-inline: clamp(1.25rem, 4vw, 3rem);
}

.footer-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 2rem;
}

.footer-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
  font-size: 1.05rem;
  font-weight: 700;
}

.footer-brand-link span {
  color: var(--accent-primary);
}

.footer-brand p {
  margin-top: 0.65rem;
  color: var(--text-tertiary);
  font-size: 0.85rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.6rem 1.25rem;
  padding-top: 0.25rem;
}

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

.footer-nav a:hover {
  color: var(--accent-secondary);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border-subtle);
}

.footer-bottom p,
.footer .icp {
  margin: 0;
  font-size: 0.78rem;
}

.footer .icp {
  text-align: right;
}

.footer .disclaimer {
  margin-top: 1rem;
  text-align: center;
}

/* Home */
.home-page {
  position: relative;
  z-index: 1;
}

.home-hero {
  min-height: min(760px, calc(100vh - 4.25rem));
  display: flex;
  align-items: center;
  padding: clamp(4rem, 8vw, 7rem) 0 3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.home-hero .container {
  width: 100%;
}

.home-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(360px, 0.88fr);
  align-items: center;
  gap: clamp(2.5rem, 5vw, 5rem);
  max-width: 1180px;
  margin: 0 auto;
}

.home-hero-copy {
  max-width: 660px;
}

.home-kicker,
.home-section-kicker,
.contact-kicker,
.error-kicker {
  color: var(--accent-primary);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.home-kicker {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.home-kicker > span {
  width: 2.4rem;
  height: 1px;
  background: var(--accent-primary);
  box-shadow: 0 0 12px var(--accent-glow);
}

.home-pretitle {
  margin-bottom: 0.75rem;
  color: var(--text-tertiary);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
}

.home-hero-copy h1 {
  max-width: 12.5ch;
  margin-bottom: 1.35rem;
  font-size: clamp(2.8rem, 5.2vw, 5rem);
  line-height: 1.08;
  letter-spacing: -0.055em;
}

.home-hero-copy h1 span {
  display: block;
  color: var(--accent-primary);
  text-shadow: 0 0 28px rgba(245, 158, 11, 0.18);
}

.home-hero-lede {
  max-width: 47ch;
  margin-bottom: 2rem;
  color: var(--text-secondary);
  font-size: 1.04rem;
  line-height: 1.9;
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.65rem;
}

.home-actions .btn {
  min-height: 3rem;
  padding-inline: 1.2rem;
}

.home-microcopy {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  color: var(--text-tertiary);
  font-size: 0.78rem;
}

.home-microcopy strong {
  color: var(--text-primary);
  font-size: 0.95rem;
}

.home-live-dot {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--accent-primary);
  box-shadow: 0 0 0 0.25rem rgba(245, 158, 11, 0.1), 0 0 12px var(--accent-glow);
}

.home-micro-divider {
  width: 1px;
  height: 0.8rem;
  margin-inline: 0.25rem;
  background: var(--border-hover);
}

.home-hero-visual {
  position: relative;
  min-height: 430px;
  display: grid;
  place-items: center;
  overflow: clip;
}

.home-hero-visual::before,
.home-hero-visual::after {
  content: '';
  position: absolute;
  border: 1px solid rgba(245, 158, 11, 0.16);
  border-radius: 50%;
  pointer-events: none;
}

.home-hero-visual::before {
  width: min(100%, 430px);
  height: min(100%, 430px);
  min-width: 300px;
  min-height: 300px;
}

.home-hero-visual::after {
  width: min(100%, 560px);
  height: min(100%, 560px);
  min-width: 390px;
  min-height: 390px;
  border-color: rgba(255, 255, 255, 0.06);
}

.home-orbit-card {
  position: relative;
  z-index: 1;
  width: min(100%, 360px);
  min-height: 390px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.2rem;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.018)),
    rgba(13, 13, 19, 0.88);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 1.35rem;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.42), 0 0 40px rgba(245, 158, 11, 0.08);
  overflow: hidden;
}

.home-orbit-card::before {
  content: '';
  position: absolute;
  inset: auto 0 -32% 15%;
  height: 65%;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.22), transparent 68%);
  pointer-events: none;
}

.home-orbit-topline,
.home-card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-tertiary);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.home-orbit-topline span:last-child {
  color: var(--accent-primary);
  font-size: 1rem;
}

.home-avatar-shell {
  position: relative;
  z-index: 1;
  width: 190px;
  height: 190px;
  display: grid;
  place-items: center;
  margin: 0 auto;
}

.home-avatar {
  position: relative;
  z-index: 2;
  width: 145px;
  height: 145px;
  border: 3px solid var(--accent-primary);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 0.8rem rgba(245, 158, 11, 0.06), 0 0 42px rgba(245, 158, 11, 0.3);
  animation: float 6s ease-in-out infinite;
}

.home-avatar-glow {
  position: absolute;
  inset: 18px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.36), transparent 68%);
  filter: blur(5px);
}

.home-avatar-ring {
  position: absolute;
  inset: 0;
  border: 1px dashed rgba(245, 158, 11, 0.42);
  border-radius: 50%;
  animation: ringRotate 22s linear infinite;
}

.home-avatar-ring::before,
.home-avatar-ring::after {
  content: '';
  position: absolute;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--accent-primary);
  box-shadow: 0 0 12px var(--accent-primary);
}

.home-avatar-ring::before {
  top: 8%;
  left: 14%;
}

.home-avatar-ring::after {
  right: 10%;
  bottom: 20%;
  background: var(--accent-secondary);
}

.home-visual-caption {
  position: relative;
  z-index: 1;
  text-align: center;
}

.home-visual-caption p {
  margin: 0 auto 0.5rem;
  color: var(--text-primary);
  font-family: "LXGW WenKai", "LXGW WenKai Screen", "Songti SC", "SimSun", serif;
  font-size: 1.12rem;
}

.home-visual-caption span {
  color: var(--text-tertiary);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
}

.home-orbit-note {
  position: absolute;
  z-index: 2;
  color: var(--text-tertiary);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  white-space: nowrap;
}

.home-orbit-note--top {
  top: 7%;
  right: max(0.75rem, calc(50% - 180px + 0.75rem));
  color: var(--accent-primary);
}

.home-orbit-note--bottom {
  bottom: 9%;
  left: max(0.75rem, calc(50% - 180px + 1.25rem));
  transform: rotate(-90deg);
  transform-origin: left center;
}

.home-scroll-cue {
  width: fit-content;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: clamp(2.5rem, 6vw, 5rem) auto 0;
  color: var(--text-tertiary);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.home-scroll-cue:hover {
  color: var(--accent-secondary);
}

.home-scroll-line {
  width: 3rem;
  height: 1px;
  background: var(--border-hover);
}

.home-overview {
  padding: clamp(4.5rem, 9vw, 8rem) 0 clamp(4rem, 8vw, 7rem);
}

.home-section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.72fr);
  align-items: end;
  gap: 2rem;
  margin-bottom: 2rem;
}

.home-section-kicker {
  margin-bottom: 0.75rem;
}

.home-section-heading h2,
.home-panel-heading h2,
.contact-panel-heading h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.home-section-heading > p {
  max-width: 36ch;
  justify-self: end;
  color: var(--text-tertiary);
  font-size: 0.95rem;
  line-height: 1.85;
}

.home-launch-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.home-launch-card {
  min-height: 250px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2.2rem;
  padding: clamp(1.35rem, 3vw, 2rem);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: 1.15rem;
  transition: var(--card-hover-transition), color var(--transition-fast);
  overflow: hidden;
}

.home-launch-card:hover {
  color: var(--text-primary);
  border-color: rgba(245, 158, 11, 0.42);
  transform: translateY(-5px);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22), 0 0 28px rgba(245, 158, 11, 0.08);
}

.home-launch-card--primary {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(245, 158, 11, 0.035) 62%, rgba(255, 255, 255, 0.025));
}

.home-launch-card--secondary {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.018));
}

.home-card-topline {
  color: var(--accent-primary);
}

.home-card-topline span:last-child {
  font-size: 1.15rem;
}

.home-launch-card h3 {
  margin-bottom: 0.7rem;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
}

.home-launch-card p {
  max-width: 38ch;
  color: var(--text-secondary);
  line-height: 1.8;
}

.home-card-cta,
.home-panel-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  width: fit-content;
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 700;
}

.home-card-cta span,
.home-panel-link span {
  color: var(--accent-primary);
  transition: transform var(--transition-fast);
}

.home-launch-card:hover .home-card-cta span,
.home-panel-link:hover span {
  transform: translateX(3px);
}

.home-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 1rem;
  margin-top: 1rem;
}

.home-notes-panel,
.home-quote-panel {
  background: rgba(255, 255, 255, 0.028);
  border: 1px solid var(--border-subtle);
  border-radius: 1.15rem;
}

.home-notes-panel {
  padding: clamp(1.35rem, 3vw, 2rem);
}

.home-panel-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.25rem;
}

.home-panel-heading h2 {
  font-size: clamp(1.65rem, 3vw, 2.25rem);
}

.home-panel-link {
  color: var(--text-secondary);
  white-space: nowrap;
}

.home-panel-link:hover {
  color: var(--accent-secondary);
}

.home-note-list {
  border-top: 1px solid var(--border-subtle);
}

.home-note-item {
  display: grid;
  grid-template-columns: 2.8rem minmax(0, 1fr) 1.4rem;
  align-items: center;
  gap: 0.75rem;
  padding: 1.1rem 0;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-subtle);
  transition: color var(--transition-fast), padding var(--transition-fast);
}

.home-note-item:last-child {
  border-bottom: 0;
}

.home-note-item:hover {
  padding-inline: 0.35rem;
  color: var(--text-primary);
}

.home-note-index {
  color: var(--accent-primary);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.home-note-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.home-note-meta {
  color: var(--text-tertiary);
  font-size: 0.72rem;
}

.home-note-copy strong {
  overflow: hidden;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-note-description {
  overflow: hidden;
  color: var(--text-tertiary);
  font-size: 0.8rem;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-note-arrow {
  color: var(--text-tertiary);
  font-size: 1rem;
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.home-note-item:hover .home-note-arrow {
  color: var(--accent-primary);
  transform: translate(2px, -2px);
}

.home-note-loading,
.home-note-empty {
  padding: 1.35rem 0;
  color: var(--text-tertiary);
  font-size: 0.9rem;
}

.home-quote-panel {
  position: relative;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  padding: clamp(1.35rem, 3vw, 2rem);
  overflow: hidden;
}

.home-quote-panel::after {
  content: '✦';
  position: absolute;
  right: 1.5rem;
  bottom: 1.35rem;
  color: rgba(245, 158, 11, 0.25);
  font-size: 3rem;
}

.home-quote-mark {
  height: 2.8rem;
  color: var(--accent-primary);
  font-family: Georgia, serif;
  font-size: 4.2rem;
  line-height: 1;
}

.home-quote-panel blockquote {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  margin: 0.55rem 0 1.25rem;
  color: var(--text-primary);
  font-family: "LXGW WenKai", "LXGW WenKai Screen", "Songti SC", "SimSun", serif;
  font-size: clamp(1.6rem, 3vw, 2.35rem);
  line-height: 1.5;
}

.home-quote-panel cite {
  color: var(--text-tertiary);
  font-size: 0.8rem;
  font-style: normal;
}

.home-quote-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: auto;
  padding-top: 2.5rem;
  color: var(--text-tertiary);
  font-size: 0.75rem;
}

.home-quote-footer time {
  color: var(--accent-primary);
}

/* Contact */
.contact-page,
.error-page {
  position: relative;
  z-index: 1;
}

.contact-hero {
  padding: clamp(3rem, 7vw, 6rem) 0 clamp(3rem, 6vw, 5rem);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.page-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: clamp(2.5rem, 6vw, 5rem);
  color: var(--text-tertiary);
  font-size: 0.78rem;
}

.page-breadcrumb a {
  color: var(--text-secondary);
}

.page-breadcrumb a:hover {
  color: var(--accent-secondary);
}

.contact-heading-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  align-items: end;
  gap: 2rem;
  max-width: 1160px;
  margin: 0 auto;
}

.contact-heading-grid h1 {
  margin: 0.75rem 0 1.25rem;
  font-size: clamp(3rem, 7vw, 6.5rem);
  letter-spacing: -0.06em;
}

.contact-lede {
  max-width: 40ch;
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.9;
}

.contact-heading-note {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1rem;
  color: var(--text-tertiary);
  border-left: 1px solid var(--accent-primary);
  background: linear-gradient(145deg, rgba(245, 158, 11, 0.08), rgba(255, 255, 255, 0.02));
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.contact-heading-note strong {
  align-self: center;
  color: var(--accent-primary);
  font-size: 2rem;
  font-weight: 400;
}

.contact-content {
  padding: clamp(3rem, 7vw, 6rem) 0 clamp(4rem, 8vw, 7rem);
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(250px, 0.68fr) minmax(0, 1.32fr);
  align-items: start;
  gap: 1rem;
  max-width: 1160px;
  margin: 0 auto;
}

.contact-profile-panel,
.contact-channel-panel {
  background: rgba(255, 255, 255, 0.028);
  border: 1px solid var(--border-subtle);
  border-radius: 1.15rem;
}

.contact-profile-panel {
  position: sticky;
  top: 6.3rem;
  padding: 1.3rem;
}

.contact-panel-topline,
.contact-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.contact-panel-topline {
  color: var(--text-tertiary);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.contact-panel-topline span:last-child {
  color: var(--accent-primary);
}

.contact-profile-avatar-wrap {
  position: relative;
  width: 150px;
  height: 150px;
  display: grid;
  place-items: center;
  margin: 3rem auto 1.6rem;
}

.contact-profile-glow {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.3), transparent 68%);
  filter: blur(6px);
}

.contact-profile-avatar {
  position: relative;
  z-index: 1;
  width: 112px;
  height: 112px;
  border: 3px solid var(--accent-primary);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 28px rgba(245, 158, 11, 0.25);
}

.contact-profile-panel h2 {
  text-align: center;
  font-size: 1.65rem;
}

.contact-profile-name-en {
  margin: 0.3rem auto 1.25rem;
  color: var(--text-tertiary);
  text-align: center;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.contact-profile-quote {
  margin: 0 auto;
  padding: 0.75rem 0.85rem;
  color: var(--text-secondary);
  background: rgba(245, 158, 11, 0.06);
  border-left: 2px solid var(--accent-primary);
  font-family: "LXGW WenKai", "LXGW WenKai Screen", "Songti SC", "SimSun", serif;
  font-size: 0.95rem;
  text-align: center;
}

.contact-profile-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.8rem;
  padding-top: 0.85rem;
  color: var(--text-tertiary);
  border-top: 1px solid var(--border-subtle);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.contact-panel-heading {
  align-items: flex-end;
  padding: clamp(1.35rem, 3vw, 2rem);
  border-bottom: 1px solid var(--border-subtle);
}

.contact-panel-heading h2 {
  margin-top: 0.7rem;
}

.contact-heading-count {
  color: var(--accent-primary);
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1;
}

.contact-channel-list {
  padding: 0 clamp(1.35rem, 3vw, 2rem);
}

.contact-channel-card {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 1.45rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.contact-channel-icon {
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  color: var(--accent-primary);
  background: rgba(245, 158, 11, 0.09);
  border: 1px solid rgba(245, 158, 11, 0.17);
  border-radius: 0.9rem;
}

.contact-channel-copy {
  min-width: 0;
}

.contact-channel-label {
  margin-bottom: 0.4rem;
  color: var(--text-tertiary);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.contact-channel-value {
  display: block;
  overflow-wrap: anywhere;
  color: var(--text-primary);
  font-size: clamp(1rem, 2vw, 1.28rem);
  font-weight: 700;
}

.contact-channel-value:hover {
  color: var(--accent-secondary);
}

.contact-channel-desc {
  margin-top: 0.3rem;
  color: var(--text-tertiary);
  font-size: 0.82rem;
}

.contact-channel-action {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.7rem;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 0.55rem;
  background: transparent;
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
  white-space: nowrap;
}

.contact-channel-action:hover {
  color: var(--accent-secondary);
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.06);
}

.contact-channel-action span:last-child {
  color: var(--accent-primary);
}

.contact-note {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin: 1.25rem clamp(1.35rem, 3vw, 2rem) clamp(1.35rem, 3vw, 2rem);
  padding: 0.85rem 0;
  color: var(--text-tertiary);
  font-size: 0.82rem;
  line-height: 1.7;
}

.contact-note-mark {
  flex: 0 0 auto;
  width: 1.15rem;
  height: 1.15rem;
  display: grid;
  place-items: center;
  color: var(--accent-primary);
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: 50%;
  font-family: Georgia, serif;
  font-size: 0.72rem;
}

/* 404 */
.error-page {
  min-height: calc(100vh - 4.25rem);
  display: grid;
  place-items: center;
  padding: 4rem 0;
}

.error-panel {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 4.5rem);
  text-align: center;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.018));
  border: 1px solid var(--border-subtle);
  border-radius: 1.35rem;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.24);
  overflow: hidden;
}

.error-panel::after {
  content: '✦';
  position: absolute;
  right: 1.5rem;
  top: 1.15rem;
  color: rgba(245, 158, 11, 0.45);
  font-size: 1.1rem;
}

.error-code {
  margin-top: 1rem;
  color: var(--accent-primary);
  font-size: clamp(6rem, 16vw, 10rem);
  font-weight: 800;
  letter-spacing: -0.08em;
  line-height: 0.95;
  text-shadow: 0 0 35px rgba(245, 158, 11, 0.2);
}

.error-divider {
  width: 4rem;
  height: 2px;
  margin: 1.2rem auto;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
}

.error-panel h1 {
  margin-bottom: 0.9rem;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
}

.error-description {
  margin: 0 auto;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.8;
}

.error-quote {
  margin: 1.3rem auto 0;
  color: var(--text-tertiary);
  font-family: "LXGW WenKai", "LXGW WenKai Screen", "Songti SC", "SimSun", serif;
  font-size: 1rem;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
  margin-top: 2rem;
}

/* New pages' responsive behavior */
@media (max-width: 1024px) {
  .home-hero-grid {
    gap: clamp(2rem, 4vw, 3.5rem);
  }

  .home-hero-copy h1 {
    font-size: clamp(2.7rem, 5.7vw, 4.8rem);
  }

  .contact-layout {
    grid-template-columns: minmax(230px, 0.62fr) minmax(0, 1.38fr);
  }
}

@media (max-width: 820px) {
  .nav-logo-copy small {
    display: none;
  }

  .home-hero {
    min-height: auto;
    padding-top: 4.5rem;
  }

  .home-hero-grid,
  .home-section-heading,
  .contact-heading-grid {
    grid-template-columns: 1fr;
  }

  .home-hero-copy {
    max-width: 680px;
  }

  .home-hero-copy h1 {
    max-width: 14ch;
  }

  .home-section-heading > p {
    justify-self: start;
  }

  .home-hero-visual {
    min-height: 380px;
    margin-top: 0.5rem;
  }

  .home-hero-visual::before {
    width: 360px;
    height: 360px;
  }

  .home-hero-visual::after {
    width: 460px;
    height: 460px;
  }

  .contact-heading-note {
    width: min(220px, 100%);
    min-height: 115px;
    justify-self: start;
  }

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

  .contact-profile-panel {
    position: static;
  }

  .contact-channel-panel {
    order: -1;
  }
}

@media (max-width: 600px) {
  .footer-main,
  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-nav {
    justify-content: flex-start;
  }

  .footer .icp {
    text-align: left;
  }

  .home-hero {
    padding-bottom: 2rem;
  }

  .home-hero-copy h1 {
    max-width: 11ch;
    font-size: clamp(2.4rem, 10.5vw, 3.8rem);
  }

  .home-hero-lede {
    font-size: 0.98rem;
  }

  .home-launch-grid,
  .home-content-grid {
    grid-template-columns: 1fr;
  }

  .home-launch-card {
    min-height: 220px;
  }

  .home-hero-visual {
    min-height: 350px;
  }

  .home-hero-visual::before {
    width: min(100%, 300px);
    height: min(100%, 300px);
    min-width: 0;
    min-height: 0;
  }

  .home-hero-visual::after {
    width: min(100%, 360px);
    height: min(100%, 360px);
    min-width: 0;
    min-height: 0;
  }

  .home-orbit-card {
    min-height: 330px;
  }

  .home-avatar-shell {
    width: 150px;
    height: 150px;
  }

  .home-avatar {
    width: 118px;
    height: 118px;
  }

  .home-note-item {
    grid-template-columns: 2rem minmax(0, 1fr) 1rem;
    gap: 0.55rem;
  }

  .home-note-description {
    display: none;
  }

  .contact-channel-card {
    grid-template-columns: 2.7rem minmax(0, 1fr);
  }

  .contact-channel-icon {
    width: 2.7rem;
    height: 2.7rem;
  }

  .contact-channel-action {
    grid-column: 2;
    justify-self: start;
    margin-top: 0.25rem;
  }

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

  .error-actions .btn {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .home-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .home-actions .btn {
    width: 100%;
  }

  .home-micro-divider {
    display: none;
  }

  .contact-heading-grid h1 {
    font-size: clamp(2.8rem, 16vw, 4.2rem);
  }
}


