/* ========================================
   七叶怀瑾 — Editorial Magazine Design System
   ======================================== */

/* Self-hosted fonts — no external requests. CJK falls back to system fonts. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/inter-400.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/inter-500.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/inter-600.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/inter-700.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 800; font-display: swap; src: url("/fonts/inter-800.woff2") format("woff2"); }
@font-face { font-family: "Playfair Display"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/playfair-400.woff2") format("woff2"); }
@font-face { font-family: "Playfair Display"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/playfair-700.woff2") format("woff2"); }
@font-face { font-family: "Playfair Display"; font-style: normal; font-weight: 800; font-display: swap; src: url("/fonts/playfair-800.woff2") format("woff2"); }
@font-face { font-family: "Playfair Display"; font-style: italic; font-weight: 400; font-display: swap; src: url("/fonts/playfair-400i.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/jetbrains-400.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/jetbrains-500.woff2") format("woff2"); }

:root {
  /* Warm parchment palette — Claude-inspired paper warmth */
  --bg: #f5f4ed;
  --bg-alt: #eeece4;
  --bg-card: #faf9f5;
  --bg-dark: #121212;

  --text: #1d1b18;
  --text-secondary: #6b6560;
  --text-muted: #87867f;
  --text-light: #b0aea5;

  /* Terracotta accent — warm, earthy, deliberately un-tech */
  --accent: #c96442;
  --accent-muted: rgba(201, 100, 66, 0.08);

  --border: #e8e6dc;
  --border-light: #f0eee6;

  /* Typography — Latin display via self-hosted fonts; CJK falls back to system */
  --font-serif: "Playfair Display", "PingFang SC", "Microsoft YaHei", "Source Han Serif SC", Georgia, serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Spacing — generous breathing room */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 48px;
  --space-xl: 96px;
  --space-2xl: 140px;

  /* Radius */
  --radius: 8px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 999px;

  /* Shadows — ring-based, Claude-inspired */
  --shadow-whisper: rgba(0, 0, 0, 0.05) 0px 4px 24px;
  --shadow-ring: 0px 0px 0px 1px var(--border);
  --shadow-card: 0px 0px 0px 1px var(--border), rgba(0, 0, 0, 0.04) 0px 2px 8px;
  --shadow-elevated: 0px 0px 0px 1px var(--border), rgba(0, 0, 0, 0.06) 0px 8px 24px;

  /* Ease */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.33, 1, 0.68, 1);

  /* Grid overlay */
  --grid-line: rgba(29, 27, 24, 0.07);
}

/* Dark mode — deep warm slate */
[data-theme="dark"] {
  --bg: #141413;
  --bg-alt: #1c1a17;
  --bg-card: #1e1c19;

  --text: #e8e4df;
  --text-secondary: #a09890;
  --text-muted: #706860;
  --text-light: #4a4540;

  --accent: #d97757;
  --accent-muted: rgba(217, 119, 87, 0.12);

  --border: #30302e;
  --border-light: #242120;

  --grid-line: rgba(232, 228, 223, 0.08);
}

/* ========================================
   Reset
   ======================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: auto; /* We handle smooth scroll in JS */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px),
    var(--bg);
  background-size: 44px 44px, 44px 44px, auto;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.75;
  overflow-x: hidden;
  cursor: auto;
  transition: background-color 0.4s ease, color 0.4s ease;
}

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

button {
  font: inherit;
  color: inherit;
  border: none;
  background: none;
  outline: none;
  cursor: pointer;
}

img { max-width: 100%; display: block; }

body.has-fancy-cursor,
body.has-fancy-cursor a,
body.has-fancy-cursor button,
body.has-fancy-cursor input,
body.has-fancy-cursor textarea {
  cursor: none;
}

::selection {
  background: var(--accent-muted);
  color: var(--text);
}

/* ========================================
   Custom Cursor
   ======================================== */

.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 6px;
  height: 6px;
  background: var(--text);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  transition: transform 0.15s ease, opacity 0.3s ease;
  transform: translate(-50%, -50%);
}

.cursor-circle {
  position: fixed;
  top: 0;
  left: 0;
  width: 44px;
  height: 44px;
  border: 1.5px solid rgba(201, 100, 66, 0.2);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99998;
  transform: translate(-50%, -50%);
  transition: width 0.4s var(--ease), height 0.4s var(--ease),
              border-color 0.3s ease, background 0.3s ease;
}

/* Hover state — circle grows, dot hides */
.cursor-hover .cursor-dot {
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
}

.cursor-hover .cursor-circle {
  width: 64px;
  height: 64px;
  border-color: var(--accent);
  background: rgba(201, 100, 66, 0.06);
}

/* Text hover — blend mode */
.cursor-text .cursor-circle {
  width: 100px;
  height: 100px;
  background: var(--text);
  mix-blend-mode: difference;
  border-color: transparent;
}

.cursor-text .cursor-dot {
  opacity: 0;
}

/* ========================================
   Navigation
   ======================================== */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 48px;
  transition: padding 0.5s var(--ease), background-color 0.3s ease, border-color 0.3s ease;
}

.nav.scrolled {
  padding: 16px 48px;
  background: rgba(245, 244, 237, 0.92);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border-light);
}

.nav-brand {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--text);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.3s ease;
  position: relative;
}

.nav-links a:hover {
  color: var(--text);
}

/* Theme toggle */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  transition: border-color 0.3s ease, color 0.3s ease, background 0.3s ease;
  padding: 0;
  margin-left: 8px;
}

.theme-toggle:hover {
  border-color: var(--text);
  color: var(--text);
}

.theme-icon--moon { display: none; }
.theme-icon--sun { display: block; }

[data-theme="dark"] .theme-icon--sun { display: none; }
[data-theme="dark"] .theme-icon--moon { display: block; }

/* ========================================
   Hero
   ======================================== */

.hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  padding: 160px 48px 80px;
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
}

.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
}

/* ---- Hero Visual (right side) ---- */

.hero-visual {
  flex-shrink: 0;
  position: relative;
  width: 440px;
  height: 440px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  will-change: transform;
  transition: transform 0.18s var(--ease-out);
  animation: fadeInVisual 1.2s var(--ease) 0.6s forwards;
}

@keyframes fadeInVisual {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.hero-avatar-wrapper {
  position: relative;
  width: 320px;
  height: 320px;
}

.hero-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.08);
  position: relative;
  z-index: 2;
  transition: border-color 0.5s ease, box-shadow 0.5s ease, transform 0.6s var(--ease);
}

.hero-avatar:hover {
  border-color: var(--text-muted);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.12);
  transform: scale(1.02);
}

/* Inner ring */
.hero-avatar-ring {
  position: absolute;
  inset: -16px;
  border-radius: 50%;
  border: 1px solid var(--border-light);
  z-index: 1;
}

.hero-avatar-ring::after {
  content: "";
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  border: 1px dashed var(--border);
  opacity: 0.4;
}

/* Outer ring */
.hero-avatar-ring--outer {
  inset: -40px;
  border: 1px solid var(--border-light);
  opacity: 0.35;
}

.hero-avatar-ring--outer::after {
  display: none;
}

/* Decorative accent dots */
.hero-avatar-accent {
  position: absolute;
  border-radius: 50%;
  background: var(--text-muted);
  z-index: 1;
  opacity: 0;
  animation: fadeInVisual 1.2s var(--ease) 1.2s forwards;
}

.hero-avatar-accent--1 {
  width: 8px;
  height: 8px;
  top: 30px;
  right: 50px;
  opacity: 0.3;
}

.hero-avatar-accent--2 {
  width: 5px;
  height: 5px;
  bottom: 60px;
  left: 25px;
  opacity: 0.2;
}

.hero-avatar-accent--3 {
  width: 12px;
  height: 12px;
  bottom: 20px;
  right: 30px;
  background: transparent;
  border: 1px solid var(--border);
  opacity: 0.4;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(72px, 12vw, 160px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: var(--text);
  margin-bottom: var(--space-md);
  overflow: hidden;
}

.hero-desc {
  max-width: 520px;
  font-size: 17px;
  line-height: 1.8;
  color: var(--text-secondary);
  opacity: 0;
  transform: translateY(30px);
  transition-property: opacity, transform;
  transition-duration: 0.8s;
  transition-timing-function: var(--ease);
  transition-delay: 0.8s;
}

.hero-desc.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================
   Sections — Shared
   ======================================== */

.section {
  padding: var(--space-2xl) 48px;
  max-width: 1400px;
  margin: 0 auto;
}

.section-number {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-light);
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: var(--space-sm);
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: var(--space-sm);
}

.section-subtitle {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 480px;
  line-height: 1.7;
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}

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

.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.16s; }
.reveal-d3 { transition-delay: 0.24s; }
.reveal-d4 { transition-delay: 0.32s; }

/* ========================================
   About
   ======================================== */

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  margin-top: var(--space-xl);
  align-items: start;
}

.about-text {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.9;
}

.about-text p + p {
  margin-top: 24px;
}

.about-text strong {
  color: var(--text);
  font-weight: 600;
}

.about-quote {
  font-family: var(--font-serif);
  font-size: 24px;
  font-style: italic;
  line-height: 1.6;
  color: var(--text);
  margin: 40px 0;
  padding-left: 28px;
  border-left: 2px solid var(--text);
}

.about-details {
  padding-top: 12px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 18px 0;
  border-bottom: 1px solid var(--border-light);
}

.detail-row:first-child {
  border-top: 1px solid var(--border-light);
}

.detail-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.detail-value {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}

.tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.tech-item {
  font-size: 13px;
  color: var(--text-secondary);
  padding: 4px 14px;
  border: 1px solid var(--border);
  border-radius: 100px;
  transition-property: color, transform;
  transition-duration: 0.3s;
  transition-timing-function: var(--ease);
}

.tech-item:hover {
  border-color: var(--text);
  color: var(--text);
}

/* ========================================
   Footer
   ======================================== */

.footer {
  border-top: 1px solid var(--border);
  padding: var(--space-xl) 48px var(--space-lg);
  max-width: 1400px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-xl);
  padding-bottom: var(--space-xl);
}

.footer-brand-name {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.footer-brand-desc {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 340px;
  line-height: 1.7;
}

.footer-nav {
  display: flex;
  gap: 64px;
}

.footer-col-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  font-size: 14px;
  color: var(--text-secondary);
  padding: 5px 0;
  transition: color 0.3s ease;
}

.footer-col a:hover {
  color: var(--text);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-light);
  font-size: 13px;
  color: var(--text-light);
}

/* ========================================
   Surface Motion
   ======================================== */

.surface-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transform: translate3d(0, 0, 0);
  transition: transform 0.38s var(--ease), border-color 0.28s ease, box-shadow 0.38s var(--ease),
              background-color 0.28s ease;
}

.surface-card::before,
.surface-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  transition: opacity 0.32s ease;
}

.surface-card::before {
  background: linear-gradient(145deg, rgba(201, 100, 66, 0.08), transparent 38%, rgba(26, 26, 26, 0.05));
  opacity: 0;
}

.surface-card::after {
  background: radial-gradient(220px circle at var(--spot-x, 50%) var(--spot-y, 50%), rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0) 60%);
  opacity: 0;
}

.surface-card > * {
  position: relative;
  z-index: 1;
}

body.motion-enhanced .surface-card.is-hovered {
  transform: perspective(1200px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) translateY(-4px);
  border-color: rgba(201, 100, 66, 0.18);
  box-shadow: 0 24px 56px rgba(26, 24, 22, 0.08);
}

body.motion-enhanced .surface-card.is-hovered::before,
body.motion-enhanced .surface-card.is-hovered::after {
  opacity: 1;
}

/* ========================================
   Scrollbar (subtle)
   ======================================== */

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-light);
}

/* Dark mode component overrides */
[data-theme="dark"] .nav.scrolled {
  background: rgba(20, 20, 19, 0.92);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}

[data-theme="dark"] .hero-avatar {
  border-color: var(--border);
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 1024px) {
  :root {
    --space-2xl: 80px;
  }

  .section, .hero {
    padding-left: 32px;
    padding-right: 32px;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero-visual {
    width: 300px;
    height: 300px;
  }

  .hero-avatar-wrapper {
    width: 200px;
    height: 200px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  body {
    cursor: auto;
  }

  .cursor-dot, .cursor-circle {
    display: none;
  }

  .nav {
    padding: 16px 20px;
  }

  .nav.scrolled {
    padding: 12px 20px;
  }

  .nav-links {
    gap: 20px;
  }

  .nav-links a {
    font-size: 13px;
  }

  .hero {
    padding: 120px 20px 60px;
  }

  .hero-inner {
    flex-direction: column;
    text-align: center;
  }

  .hero-visual {
    width: 220px;
    height: 220px;
    order: -1;
    margin-bottom: 20px;
  }

  .hero-avatar-wrapper {
    width: 160px;
    height: 160px;
  }

  .hero-desc {
    max-width: 100%;
  }

  .section {
    padding-left: 20px;
    padding-right: 20px;
  }

  .footer {
    padding: 48px 20px 32px;
  }

  .footer-nav {
    flex-direction: column;
    gap: 28px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 56px;
  }

  .section-title {
    font-size: 32px;
  }

  .nav-links {
    display: none;
  }
}

/* ========================================
   2026 Site Refresh
   ======================================== */

.nav-links a.nav-active {
  color: var(--text);
}

.nav-links a.nav-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 1px;
  background: var(--text);
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--text);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.3s ease;
}

.button-link:hover {
  background: var(--text);
  color: var(--bg);
  box-shadow: 0px 0px 0px 1px var(--text);
}

.button-link--ghost {
  border-color: var(--border);
  background: var(--bg-card);
}

.button-link--ghost:hover {
  border-color: var(--text);
  background: var(--bg-card);
  box-shadow: var(--shadow-card);
}

.hero--home {
  min-height: auto;
  padding-bottom: 96px;
}

.hero-copy {
  flex: 1;
  min-width: 0;
}

.hero-kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 28px;
}

.hero--home .hero-title {
  font-size: clamp(54px, 9vw, 116px);
  line-height: 1.06;
  margin-bottom: 22px;
}

.hero-title-line {
  display: block;
}

.hero-title-line--offset {
  margin-top: 0.16em;
  padding-left: 1.12em;
}

.hero-desc--home {
  opacity: 1;
  transform: none;
  transition: none;
  max-width: 620px;
  margin-bottom: 30px;
}

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

.hero-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  max-width: 720px;
}

.summary-card,
.story-note,
.notes-aside,
.cta-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.summary-card {
  padding: 18px 20px;
}

.summary-card--linked {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s ease;
}

.summary-card--linked:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.06);
  border-color: var(--text);
}

.summary-label,
.story-note-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.summary-card strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.summary-card p {
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-secondary);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 420px);
  gap: 32px;
  align-items: end;
  margin-bottom: var(--space-xl);
}

.section-head-side {
  display: grid;
  gap: 16px;
  justify-items: start;
}

.section-intro {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-secondary);
}

.section-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.section-link::after,
.note-link::after {
  content: "↗";
  font-size: 12px;
}

.story-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 360px);
  gap: 36px;
  align-items: start;
}

.story-copy {
  font-size: 17px;
  line-height: 1.95;
  color: var(--text-secondary);
}

.story-copy p + p {
  margin-top: 22px;
}

.story-copy strong {
  color: var(--text);
}

.story-rail {
  display: grid;
  gap: 14px;
}

.story-note {
  padding: 20px;
}

.story-note p {
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-secondary);
}

.note-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-light);
}

.note-title,
.cta-title {
  font-family: var(--font-serif);
  color: var(--text);
}

.note-desc {
  font-size: 15px;
  line-height: 1.82;
  color: var(--text-secondary);
}

.notes-aside-list {
  display: grid;
  gap: 8px;
  padding-left: 18px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.75;
}

.note-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

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

.note-card,
.notes-aside {
  min-height: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 24px;
}

.note-card {
  display: grid;
  align-content: start;
  gap: 16px;
}

.note-card--linked {
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s ease;
}

.note-card--linked:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.06);
  border-color: var(--text);
}

.note-title {
  font-size: 28px;
  line-height: 1.22;
}

.notes-aside {
  display: grid;
  align-content: start;
  gap: 16px;
}

.notes-aside-title {
  font-family: var(--font-serif);
  font-size: 28px;
  line-height: 1.2;
  color: var(--text);
}

.cta-panel {
  padding: 30px 32px;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) auto;
  gap: 24px;
  align-items: center;
}

.cta-title {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.22;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 1120px) {
  .notes-grid {
    grid-template-columns: 1fr;
  }

  .section-head,
  .story-layout,
  .cta-panel {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 768px) {
  .hero--home .hero-title {
    font-size: 54px;
  }

  .hero-title-line--offset {
    margin-top: 0.14em;
    padding-left: 0.6em;
  }

  .hero-actions,
  .cta-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .button-link {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .nav-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .nav-links a {
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}


/* ========================================
   Subscribe Form (全站复用，基础款与 blog.css 保持一致)
   ======================================== */

.subscribe-form-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.subscribe-form--compact .subscribe-form-fields {
  flex-direction: row;
  flex-wrap: wrap;
}

.subscribe-form--compact .subscribe-input {
  flex: 1;
  min-width: 180px;
}

.subscribe-input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  font-size: 15px;
  color: var(--text);
}

.subscribe-btn {
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
  font-size: 15px;
  font-weight: 600;
}

.subscribe-btn:disabled {
  cursor: progress;
  opacity: 0.7;
}

.subscribe-status {
  min-height: 18px;
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-muted);
}

.subscribe-status[data-tone="success"] {
  color: var(--accent);
}

.subscribe-status[data-tone="error"] {
  color: var(--text);
}

.subscribe-label {
  display: block;
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.subscribe-form-title {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.subscribe-form-desc {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-muted);
}

/* Footer 订阅区 */

.footer-lead {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 420px);
  gap: var(--space-xl);
  align-items: end;
  padding-bottom: var(--space-xl);
  margin-bottom: var(--space-xl);
  border-bottom: 1px solid var(--border-light);
}

.footer-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.footer-lead h2 {
  font-family: var(--font-serif);
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

@media (max-width: 860px) {
  .footer-lead {
    grid-template-columns: 1fr;
    align-items: start;
    gap: var(--space-lg);
  }
}

/* 文章末尾订阅 CTA */

.post-subscribe {
  margin-bottom: var(--space-xl);
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface, var(--bg));
}

.post-subscribe .subscribe-form-fields {
  max-width: 460px;
}


/* ========================================
   Connect 页（一屏高密度布局）
   ======================================== */

.connect-stage {
  min-height: calc(100vh - 96px);
  display: flex;
  align-items: center;
  padding: var(--space-lg) 48px;
  max-width: 1400px;
  margin: 0 auto;
}

.connect-layout {
  display: grid;
  grid-template-columns: minmax(320px, 5fr) minmax(360px, 6fr);
  gap: var(--space-xl);
  align-items: center;
  width: 100%;
}

.connect-title {
  font-family: var(--font-serif);
  font-size: clamp(26px, 3.4vw, 40px);
  font-weight: 700;
  color: var(--text);
  margin: 10px 0 12px;
}

.connect-desc {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-muted);
  margin: 0 0 20px;
}

.connect-subscribe {
  max-width: 440px;
}

.connect-direct {
  margin: 16px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

.connect-direct a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* 右侧紧凑社群列表 */

.connect-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
}

.connect-row {
  display: grid;
  grid-template-columns: 92px 110px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 18px 8px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  transition: background 0.25s ease, padding-left 0.25s ease;
}

a.connect-row:hover {
  background: var(--accent-muted);
  padding-left: 16px;
}

.connect-row-region {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.connect-row strong {
  font-family: var(--font-serif);
  font-size: 18px;
}

.connect-row-desc {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
}

.connect-row-arrow {
  font-size: 15px;
  color: var(--text-muted);
  transition: color 0.25s ease, transform 0.25s ease;
}

a.connect-row:hover .connect-row-arrow {
  color: var(--accent);
  transform: translate(2px, -2px);
}

/* 公众号行：二维码小图，悬停放大 */

.connect-row--qr {
  grid-template-columns: 92px 110px 1fr 64px;
}

.connect-qr {
  position: relative;
  width: 64px;
  height: 64px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: width 0.25s ease, height 0.25s ease, margin 0.25s ease, box-shadow 0.25s ease;
}

.connect-qr img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}

.connect-row--qr:hover .connect-qr,
.connect-qr:hover {
  width: 160px;
  height: 160px;
  margin: -48px;
  z-index: 2;
  box-shadow: 0 12px 32px rgba(20, 20, 19, 0.18);
}

.connect-qr-placeholder {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.5;
  color: var(--text-light);
  padding: 4px;
}

.connect-qr--missing img {
  display: none;
}

.connect-qr--missing .connect-qr-placeholder {
  display: flex;
}

@media (max-width: 900px) {
  .connect-stage {
    min-height: 0;
    padding: var(--space-xl) 24px;
  }

  .connect-layout {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .connect-row,
  .connect-row--qr {
    grid-template-columns: 1fr auto;
    row-gap: 4px;
  }

  .connect-row-region,
  .connect-row-desc {
    grid-column: 1 / -1;
  }
}

