@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Noto+Serif+SC:wght@500;700&family=Zhi+Mang+Xing&display=swap');

@font-face {
  font-family: "MiSans";
  src: url("./bloom/fonts/MiSans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "MiSans";
  src: url("./bloom/fonts/MiSans-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "MiSans";
  src: url("./bloom/fonts/MiSans-Semibold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --header-h: 64px;
  --accent-2: color-mix(in oklch, var(--accent), var(--bg) 65%);
}

body {
  margin: 0;
  font-family: "MiSans", 'Inter', "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  transition: background 0.6s cubic-bezier(0.4, 0, 0.2, 1), color 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  scroll-margin-top: 100px;
}

/* ... [Animated Mesh Background logic] ... */
/* (Keeping lines consistent with file structure) */


/* Animated Mesh Background */
.bg-canvas-wrap {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  filter: blur(80px);
  /* 增加通透度，使深色模式下更有生气 */
  opacity: 0.7;
  pointer-events: none;
}

.bg-blob {
  position: absolute;
  width: 600px;
  height: 600px;
  background: var(--accent);
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.45;
  animation: move 12s infinite alternate cubic-bezier(0.45, 0, 0.55, 1);
}

.bg-blob-2 {
  background: var(--accent-2);
  width: 500px;
  height: 500px;
  right: -10%;
  top: 20%;
  animation-duration: 25s;
  animation-delay: -5s;
}

.bg-blob-3 {
  background: #4d94ff;
  width: 400px;
  height: 400px;
  left: 20%;
  bottom: 10%;
  animation-duration: 30s;
  animation-delay: -10s;
}

@keyframes move {
  from {
    transform: translate(-10%, -10%) rotate(0deg);
  }

  to {
    transform: translate(20%, 20%) rotate(360deg);
  }
}

/* Grainy Texture */
.bg-grain {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.04;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

@keyframes revealUp {
  from {
    opacity: 0;
    transform: translateY(50px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-on-scroll.active {
  opacity: 1;
  transform: translateY(0);
}

/* 3D Card Hover Effect Base */
.premium-card {
  transition: transform 0.2s cubic-bezier(0.03, 0.98, 0.52, 0.99), box-shadow 0.3s ease;
  transform-style: preserve-3d;
  perspective: 1000px;
}

.reveal {
  animation: revealUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.reveal-delay-1 {
  animation-delay: 0.1s;
}

.reveal-delay-2 {
  animation-delay: 0.2s;
}

.reveal-delay-3 {
  animation-delay: 0.3s;
}

/* Premium Sleek Header */
.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-h);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  background: color-mix(in srgb, var(--bg) 65%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 40%, transparent);
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
}

.topbar-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text);
}

.brand-logo {
  width: 36px;
  height: 36px;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.brand-name {
  margin-left: 12px;
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.brand:hover .brand-logo {
  transform: scale(1.1) rotate(10deg);
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-logo {
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.brand:hover .brand-logo {
  transform: rotate(15deg) scale(1.1);
}

/* Theme Dropdown UI */
.theme-dropdown {
  position: relative;
}

.theme-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--surface);
  border: none;
  border-radius: 100px;
  cursor: pointer;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.theme-trigger:hover {
  border-color: var(--accent);
  background: var(--surface-2);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.theme-trigger.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 15%, transparent);
}

.theme-trigger .chevron {
  transition: transform 0.3s ease;
  opacity: 0.6;
}

.theme-trigger.active .chevron {
  transform: rotate(180deg);
}

.theme-menu {
  position: absolute;
  top: 120%;
  right: 0;
  width: 220px;
  background: color-mix(in oklab, var(--bg) 85%, transparent);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.05);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 2000;
}

.theme-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.theme-group {
  font-size: 11px;
  font-weight: 800;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 12px 14px 6px;
  opacity: 0.6;
}

.theme-item {
  appearance: none;
  border: none;
  background: transparent;
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  color: var(--text-semi);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.theme-item:hover {
  background: var(--accent-soft);
  color: var(--text);
  transform: translateX(4px);
}

.theme-item.active {
  background: color-mix(in oklab, var(--accent) 15%, transparent);
  color: var(--accent);
  font-weight: 700;
}

.nav-link {
  color: var(--text-semi);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--accent);
}

.nav-link.github {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link.github svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Layout */
.layout {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 48px;
  padding: 64px 24px 120px;
}

@media (max-width: 1024px) {
  .layout {
    grid-template-columns: 1fr;
    padding-top: 40px;
  }

  .sidebar {
    order: 1;
    /* Move sidebar to bottom on mobile */
    position: static !important;
  }
}

.preview-container {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow-lg), 0 20px 50px -12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

/* Content Styling Blocks */
.md-hero-box {
  background: linear-gradient(135deg, var(--accent-2), transparent);
  border: 1px solid var(--border);
  border-left: 5px solid var(--accent);
  border-radius: 20px;
  padding: 32px;
  margin-bottom: 40px;
}

.md-principle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 32px 0;
}

.md-principle-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  transition: transform 0.3s, border-color 0.3s;
}

.md-principle-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
}

.md-principle-card h4 {
  margin-top: 0;
  color: var(--accent);
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
}

.md-principle-card p {
  margin-bottom: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-semi);
}



.sidebar {
  position: sticky;
  top: 100px;
  align-self: start;
}

.sidebar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 32px;
  margin-bottom: 32px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.sidebar-card:hover {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.sidebar-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 24px;
  font-weight: 800;
}

.sidebar-author {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--accent) 16%, transparent);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2px;
  margin-bottom: 18px;
}

.sidebar-author span {
  color: var(--accent);
}

.sidebar-contact {
  margin: 6px 0 18px;
  font-size: 13px;
  color: var(--text-semi);
}

.sidebar-contact a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dashed var(--border);
}

.sidebar-contact a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Theme Color Matrix Styling */
.theme-matrix {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px 12px;
}

.matrix-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-semi);
  transition: all 0.3s ease;
}

.matrix-item:hover {
  color: var(--text);
  transform: translateX(2px);
}

.matrix-dot {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  /* Squircle style */
  flex-shrink: 0;
  position: relative;
}

.matrix-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 6px;
  background: currentColor;
  opacity: 0.15;
}

/* Sidebar Feature List Premium Styling */
.feat-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-semi);
  padding: 10px 14px;
  background: color-mix(in srgb, var(--bg) 50%, transparent);
  border: 1px solid transparent;
  border-radius: 14px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feat-item:hover {
  background: var(--surface);
  border-color: color-mix(in srgb, var(--accent) 30%, transparent);
  transform: translateX(4px);
  color: var(--text);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.feat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  font-size: 10px;
  flex-shrink: 0;
  font-weight: 800;
  transition: all 0.3s ease;
}

.feat-item:hover .feat-icon {
  background: var(--accent);
  color: #fff;
  transform: scale(1.1);
}

/* Syntax Highlighting Simulation */
.token.keyword {
  color: #ff79c6;
}

.token.function {
  color: #50fa7b;
}

.token.string {
  color: #f1fa8c;
}

.token.comment {
  color: #6272a4;
  font-style: italic;
}

.token.operator {
  color: #ff79c6;
}

#write {
  animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hero Section */
.hero {
  background: radial-gradient(circle at 50% -20%, var(--accent-2) 0%, transparent 60%);
  border-bottom: 1px solid var(--border);
  padding: 100px 24px 140px;
  /* Increased padding */
  position: relative;
  overflow: visible;
  /* Allow 3D tilt to overflow */
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 800px;
  /* Larger, softer blob */
  height: 800px;
  background: radial-gradient(circle, var(--accent-2) 0%, transparent 70%);
  opacity: 0.2;
  /* Subtler */
  filter: blur(80px);
  /* More blur */
  pointer-events: none;
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
  animation: heroFadeIn 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--surface) 75%, transparent);
  border: 1px solid var(--border);
  color: var(--text-semi);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin: 0 0 18px;
  box-shadow: 0 10px 30px rgba(var(--accent-rgb), 0.08);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  animation: heroFloat 4s ease-in-out infinite;
}

@keyframes heroFloat {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

.hero-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-2);
  animation: badgePulse 2.2s ease-in-out infinite;
}

@keyframes badgePulse {

  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 5px var(--accent-2), 0 0 8px rgba(var(--accent-rgb), 0.12);
    opacity: 0.65;
  }

  50% {
    transform: scale(1.18);
    box-shadow: 0 0 0 10px rgba(var(--accent-rgb), 0.22), 0 0 16px rgba(var(--accent-rgb), 0.55);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-badge-dot {
    animation: none;
  }
}

.hero-title {
  font-size: 4em;
  /* Larger */
  font-weight: 800;
  color: var(--text);
  margin: 0 0 0.4em;
  letter-spacing: -0.03em;
  /* Tighter letter spacing for premium feel */
  line-height: 1.1;
}

.hero-title-accent {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  /* Simpler, cleaner gradient */
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  /* Removed animation for cleaner look */
  text-shadow: 0 10px 40px rgba(var(--accent-rgb), 0.2);
}

@keyframes titleScale {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.02);
  }
}

@keyframes gradientFlow {
  0% {
    background-position: 0% center;
  }

  100% {
    background-position: 200% center;
  }
}

.hero-subtitle {
  font-size: 1.25em;
  color: var(--text-semi);
  max-width: 700px;
  margin: 0 auto 2em;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 64px;
}

/* Hero Visual (Mac Window Mockup) */
.hero-visual {
  margin: 0 auto;
  max-width: 800px;
  perspective: 2000px;
}

.window-mockup {
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow:
    0 20px 60px -10px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(0, 0, 0, 0.05);
  /* Simulated border */
  overflow: hidden;
  transform: rotateX(2deg) rotateY(0deg);
  /* Slight default tilt */
  transition: transform 0.5s ease;
}

.window-header {
  height: 36px;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.window-controls {
  position: absolute;
  left: 12px;
  display: flex;
  gap: 8px;
}

.control {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.control.red {
  background: #ff5f56;
}

.control.yellow {
  background: #ffbd2e;
}

.control.green {
  background: #27c93f;
}

.window-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-semi);
  opacity: 0.7;
}

.window-content {
  padding: 40px 50px;
  text-align: left;
  font-family: "JetBrains Mono", "Fira Code", monospace;
  font-size: 15px;
  line-height: 1.8;
  color: var(--text);
}

.window-content .line {
  display: block;
}

.token.keyword {
  color: var(--accent);
  font-weight: bold;
}

.token.highlight {
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  padding: 2px 4px;
  border-radius: 4px;
  color: var(--accent);
}

.token.comment {
  color: var(--text-semi);
  opacity: 0.6;
  font-style: italic;
}

.cursor {
  display: inline-block;
  width: 2px;
  height: 1.2em;
  background: var(--accent);
  animation: blink 1s step-end infinite;
  vertical-align: middle;
}

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

/* Tilt effect applied by JS */
.premium-tilt {
  transform-style: preserve-3d;
}



.hero-highlight:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.hero-highlight::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle at top right, rgba(var(--accent-rgb), 0.1), transparent 70%);
  pointer-events: none;
}

.hero-highlight-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.hero-highlight-desc {
  margin: 0;
  font-size: 14px;
  color: var(--text-semi);
  line-height: 1.6;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border-radius: 100px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: none;
  box-sizing: border-box;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 20px var(--accent-2);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px var(--accent-2);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--surface-2);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.sidebar .btn {
  width: 100%;
}

@keyframes heroFadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Smooth Scroll */
html {
  scroll-behavior: smooth;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 8px 20px var(--accent-2);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px var(--accent-2);
}

/* File Tree Preview */
.file-tree {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.file-tree-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 12px;
  color: var(--muted);
  background: transparent;
  transition: background 0.2s ease, color 0.2s ease;
}

.file-tree-item.is-active {
  color: var(--text);
  background: rgba(var(--accent-rgb), 0.16);
  box-shadow: 0 10px 28px rgba(var(--black-rgb), 0.12);
}

.file-tree-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  -webkit-mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
  mask-position: center;
}

.file-tree-item[data-type="folder"] .file-tree-icon {
  -webkit-mask-image: var(--icon-folder);
  mask-image: var(--icon-folder);
}

.file-tree-item[data-type="file"] .file-tree-icon {
  -webkit-mask-image: var(--icon-document);
  mask-image: var(--icon-document);
}

.file-tree-label {
  font-weight: 600;
  color: inherit;
}

/* Responsive */
@media (max-width: 768px) {
  .topbar-inner {
    padding: 0 16px;
  }

  .brand-name {
    display: none;
    /* Hide brand name on very small screens to save space */
  }

  .toolbar .nav-link:not(.github) {
    display: none;
    /* Hide text links to keep header clean */
  }

  .theme-toggle-group {
    gap: 2px;
    padding: 2px;
  }

  .btn-toggle {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }

  .hero {
    padding: 48px 16px;
  }

  .hero-badge {
    font-size: 11px;
    padding: 6px 12px;
  }

  .hero-title {
    font-size: 2.2em;
  }

  .hero-subtitle {
    font-size: 1em;
    margin-bottom: 1.5em;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

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

  .hero-highlight {
    padding: 24px;
  }

  .btn {
    width: 100%;
    max-width: 100%;
  }

  .layout {
    padding: 32px 16px 80px;
    gap: 32px;
  }

  .preview-container {
    border-radius: 20px;
  }

  .md-hero-box {
    padding: 24px;
  }

  .md-principle-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .brand-name {
    display: none;
  }

  .hero-title {
    font-size: 1.8em;
  }
}

/* --- Footer Thanks Section --- */
.thanks-section {
  margin-top: 100px;
  padding: 80px 40px;
  text-align: center;
  position: relative;
  background: linear-gradient(to bottom, transparent, rgba(var(--accent-rgb), 0.04));
  border-radius: 48px;
  border: 1px solid color-mix(in srgb, var(--border) 20%, transparent);
  overflow: hidden;
}

.thanks-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.1), transparent 70%);
  pointer-events: none;
}

.thanks-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-bottom: 40px;
}

.thanks-line {
  height: 1px;
  width: 80px;
  background: linear-gradient(to right, transparent, var(--accent), transparent);
  opacity: 0.4;
}

.thanks-icon {
  font-size: 28px;
  filter: drop-shadow(0 0 15px var(--accent-2));
  animation: heartBeat 3s ease-in-out infinite;
}

@keyframes heartBeat {

  0%,
  100% {
    transform: scale(1);
    opacity: 0.7;
  }

  50% {
    transform: scale(1.2);
    opacity: 1;
  }
}

.thanks-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.4em;
  margin-bottom: 32px;
  text-transform: uppercase;
  opacity: 0.8;
}

.thanks-quote {
  font-size: 26px;
  line-height: 2;
  color: var(--text);
  font-weight: 500;
  max-width: 760px;
  margin: 0 auto 40px;
  font-family: 'Inter', 'Noto Serif SC', serif;
  letter-spacing: 0.02em;
}

.thanks-quote mark {
  background: transparent;
  color: var(--accent);
  font-weight: 800;
}

.thanks-signature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.thanks-author {
  font-size: 36px;
  font-weight: 400;
  color: var(--accent);
  font-family: 'Zhi Mang Xing', cursive;
  margin-top: -10px;
}

.thanks-date {
  font-size: 13px;
  color: var(--muted);
  opacity: 0.6;
}

@media (max-width: 768px) {
  .thanks-section {
    margin-top: 60px;
    padding: 60px 24px;
  }

  .thanks-quote {
    font-size: 20px;
  }
}

/* --- Recommendation Card --- */
.recommend-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 24px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-decoration: none;
}

.recommend-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.05);
}

.recommend-tag {
  font-size: 11px;
  font-weight: 800;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.recommend-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.recommend-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

.recommend-link-icon {
  position: absolute;
  top: 20px;
  right: 20px;
  color: var(--accent);
  opacity: 0.3;
  transition: opacity 0.3s ease;
}

.recommend-card:hover .recommend-link-icon {
  opacity: 1;
}