/* ============================================================================
   AFTER DESIGN - Main Stylesheet
   Designer Portfolio & Thinking Showcase
   Inspired by Athos Framer Template
   ============================================================================ */

/* ============================================================================
   1. CSS VARIABLES - Color System & Design Tokens
   ============================================================================ */

:root {
  /* Colors */
  --color-bg-page: #F8EDE2;
  --color-text-primary: #1A1A1A;
  --color-text-secondary: #4D4D4D;
  --color-card-1: #D6E8D0;
  --color-card-2: #F5E0CF;
  --color-card-3: #C9D8EC;
  --color-card-4: #E8D8E8;
  --color-card-5: #D6DDD0;
  --color-dark-section: #0C0C10;
  --color-button-primary: #1A1A1A;
  --color-border: #E0DDD8;
  --color-divider: #E0DDD8;

  /* Typography */
  --font-family-base: -apple-system, "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  --font-size-h1: 52px;
  --font-size-section-title: 32px;
  --font-size-card-title: 28px;
  --font-size-body: 16px;
  --font-size-caption: 13px;
  --font-size-tag: 12px;
  --font-weight-light: 400;
  --font-weight-medium: 500;
  --line-height-body: 1.7;
  --letter-spacing-tag: 0.05em;

  /* Spacing */
  --spacing-section: 160px;
  --spacing-section-md: 120px;
  --spacing-card: 36px;
  --content-max-width: 1120px;
  --content-padding: 0 80px;

  /* Border Radius */
  --radius-card: 24px;
  --radius-button: 9999px;

  /* Transitions */
  --transition-smooth: all 0.3s ease;
  --transition-fast: all 0.2s ease;
}

/* ============================================================================
   2. RESET & BASE STYLES
   ============================================================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family-base);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-light);
  color: var(--color-text-primary);
  background-color: var(--color-bg-page);
  line-height: var(--line-height-body);
  overflow-x: hidden;
}

/* ============================================================================
   3. TYPOGRAPHY
   ============================================================================ */

h1 {
  font-size: var(--font-size-h1);
  font-weight: var(--font-weight-light);
  line-height: 1.2;
  color: var(--color-text-primary);
}

h2 {
  font-size: var(--font-size-section-title);
  font-weight: var(--font-weight-light);
  line-height: 1.3;
  color: var(--color-text-primary);
}

h3 {
  font-size: var(--font-size-card-title);
  font-weight: var(--font-weight-medium);
  line-height: 1.3;
  color: var(--color-text-primary);
}

h4 {
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
}

h5 {
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
  text-transform: uppercase;
}

p {
  color: var(--color-text-secondary);
  line-height: var(--line-height-body);
}

a {
  color: var(--color-text-primary);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--color-text-secondary);
}

/* ============================================================================
   4. CONTAINER & LAYOUT UTILITIES
   ============================================================================ */

.container {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: var(--content-padding);
}

.section {
  padding: var(--spacing-section) var(--content-padding);
}

#projects { padding-bottom: 40px; }
#practice { padding-top: 40px; }

.section-md {
  padding: var(--spacing-section-md) var(--content-padding);
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.grid {
  display: grid;
  gap: 2rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

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

.text-center {
  text-align: center;
}

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

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

/* ============================================================================
   5. NAVIGATION
   ============================================================================ */

nav.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 80px;
  background: transparent;
  border-bottom: none;
  transition: background 0.4s ease, border-bottom 0.4s ease, box-shadow 0.4s ease;
}

.navbar-logo {
  font-size: 18px;
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
  letter-spacing: 1px;
}

.navbar-links {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 48px;
  list-style: none;
}

.navbar-links a {
  font-size: 14px;
  color: var(--color-text-primary);
  transition: var(--transition-fast);
  position: relative;
}

.navbar-links a::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--color-text-primary);
  transition: width 0.3s ease;
}

.navbar-links a:hover::after {
  width: 100%;
}

.navbar-cta {
  display: none;
}

nav.navbar.scrolled {
  background: rgba(248, 237, 226, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(224, 221, 216, 0.3);
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.04);
}

/* ============================================================================
   6. BUTTONS
   ============================================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-medium);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: var(--transition-smooth);
  border: none;
  border-radius: var(--radius-button);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--color-button-primary);
  color: var(--color-bg-page);
  padding: 12px 28px;
  font-size: 13px;
}

.btn-primary:hover {
  background-color: var(--color-text-secondary);
  color: var(--color-bg-page);
  transform: translateY(-2px);
}

.btn-outline {
  background-color: transparent;
  color: var(--color-text-primary);
  border: 1.5px solid var(--color-border);
  padding: 13px 30px;
  font-size: 13px;
}

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

.btn-secondary {
  background-color: var(--color-button-primary);
  color: var(--color-bg-page);
  border: none;
  padding: 11px 26px;
  font-size: 13px;
  border-radius: var(--radius-button);
  text-decoration: none;
  letter-spacing: 0.04em;
}

.btn-secondary:hover {
  background-color: #333333;
  color: var(--color-bg-page);
  transform: translateY(-2px);
}

/* ============================================================================
   7. HERO SECTION
   ============================================================================ */

.hero {
  padding-top: 80px;
  padding-bottom: 80px;
  text-align: center;
  height: 100vh;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background-image: url('https://raw.githubusercontent.com/prebuiltui/prebuiltui/main/assets/hero/gridBackground.png');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

/* ── Dual halo flowing effect — disabled (grid bg active) ── */
.hero::before,
.hero::after {
  content: none;
}

/* Halo 1 & 2 — hidden while grid background is active */
.hero::before { opacity: 0; }
.hero::after  { opacity: 0; }

/* Remove third blob */
.hero .hero-blob {
  display: none;
}

/* ── Floating Icon Cards ── */
.hero-icons {
  position: absolute !important;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.fi-card {
  position: absolute;
  pointer-events: auto;
  will-change: transform;
}

.fi-card-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.07),
    0 2px 8px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255,255,255,0.9);
  opacity: 0;
  animation: fiIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.fi-card-inner svg {
  width: 30px;
  height: 30px;
  color: #2D2D2D;
}

@keyframes fiIn {
  from { opacity: 0; transform: scale(0.5); }
  to   { opacity: 1; transform: scale(1); }
}

/* Bouncing image icon */
.fi-bounce-img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 18px;
  animation: imgBounce 1.6s cubic-bezier(0.36, 0.07, 0.19, 0.97) infinite;
  display: block;
  flex-shrink: 0;
}

/* SVG icon in card */
.fi-svg-icon {
  width: 44px;
  height: 44px;
  object-fit: contain;
  display: block;
  animation: emojiFloat 2.8s ease-in-out infinite;
}

/* Emoji icon in card */
.fi-emoji {
  font-size: 36px;
  line-height: 1;
  display: block;
  animation: emojiFloat 2.8s ease-in-out infinite;
  transform-origin: center bottom;
}

@keyframes emojiFloat {
  0%, 100% { transform: translateY(0)   scale(1);    }
  30%       { transform: translateY(-6px) scale(1.08); }
  60%       { transform: translateY(-2px) scale(1.03); }
}

/* 透明背景图用 contain 展示完整轮廓 */
.fi-contain-img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  border-radius: 0;
}

@keyframes imgBounce {
  0%   { transform: translateY(0)    scale(1);    }
  18%  { transform: translateY(-9px) scale(1.06); }
  36%  { transform: translateY(0)    scale(0.97); }
  50%  { transform: translateY(-4px) scale(1.02); }
  64%  { transform: translateY(0)    scale(1);    }
  100% { transform: translateY(0)    scale(1);    }
}

.fi-card.peach .fi-card-inner {
  background: rgba(255, 237, 218, 0.72);
}
.fi-card.mint .fi-card-inner {
  background: rgba(222, 244, 228, 0.72);
}
.fi-card.lavender .fi-card-inner {
  background: rgba(237, 232, 255, 0.72);
}

/* Ensure hero content sits above blobs */
.hero > *:not(.hero-blob):not(.hero-icons) {
  position: relative;
  z-index: 2;
}

.hero h1 {
  margin-bottom: 24px;
  max-width: none;
  font-size: 52px;
  line-height: 1.18;
  letter-spacing: -0.025em;
  white-space: nowrap;
}

.hero .subtitle {
  font-size: 22px;
  font-weight: 500;
  color: var(--color-text-secondary);
  max-width: none;
  white-space: nowrap;
  margin: 0 auto 48px;
  line-height: 1.7;
}

.hero .cta-group {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================================================
   8. LOGO MARQUEE STRIP
   ============================================================================ */

.logo-strip {
  width: 100%;
  overflow: hidden;
  padding: 32px 0;
  background: transparent;
  border-top: none;
  border-bottom: none;
  position: relative;
}

.logo-strip-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: marqueeScroll 28s linear infinite;
}

.logo-strip-track:hover {
  animation-play-state: paused;
}

.logo-strip-item {
  display: flex;
  align-items: center;
  padding: 0 48px;
  font-size: 14px;
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
  letter-spacing: 0.02em;
  white-space: nowrap;
  gap: 10px;
  transition: color 0.2s ease;
}

.logo-strip-item:hover {
  color: var(--color-text-primary);
}

.logo-strip-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: var(--color-border);
  flex-shrink: 0;
}

@keyframes marqueeScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ============================================================================
   9. CARDS - Project/Work Cards
   ============================================================================ */

.card {
  border-radius: var(--radius-card);
  overflow: hidden;
  transition: var(--transition-smooth);
  display: grid;
  grid-template-columns: 60% 40%;
  height: auto;
  position: sticky;
  top: 100px;
  margin-bottom: 32px;
}

.card:hover {
  transform: scale(1.005);
}

.card-1 {
  background-color: var(--color-card-1);
}

.card-2 {
  background-color: var(--color-card-2);
}

.card-3 {
  background-color: var(--color-card-3);
}

.card-4 {
  background-color: var(--color-card-4);
}

.card-5 {
  background-color: var(--color-card-5);
}

.card-content {
  padding: var(--spacing-card);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.card-image {
  background-color: transparent;
  overflow: visible;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 28px 28px 12px;
}

.card-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
}

.card-title {
  font-size: var(--font-size-card-title);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
  margin-bottom: 16px;
}

.card-description {
  font-size: var(--font-size-body);
  color: var(--color-text-primary);
  margin-bottom: 24px;
  line-height: var(--line-height-body);
}

.card-meta {
  font-size: var(--font-size-caption);
  color: var(--color-text-secondary);
  margin-bottom: 16px;
}

.card-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.card-link {
  align-self: flex-start;
  margin-top: auto;
}

[data-card-group] {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* ============================================================================
   9b-ext. PRACTICE SECTION
   ============================================================================ */

.practice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  max-width: 800px;
}

.practice-card {
  background: #fff;
  border: 1px solid #EBEBEB;
  border-radius: 16px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: box-shadow 0.22s ease, transform 0.22s ease, border-color 0.22s ease;
}

.practice-card:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
  transform: translateY(-2px);
  border-color: #D0D0D0;
}

.practice-card-placeholder {
  border-style: dashed;
  border-color: #E0E0E0;
  background: #FAFAFA;
  align-items: center;
  justify-content: center;
  min-height: 240px;
}

.practice-placeholder-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.practice-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.practice-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.practice-type-badge {
  font-size: 11px;
  font-weight: 500;
  color: #1A1A1A;
  background: #F0F0F0;
  border-radius: 20px;
  padding: 4px 10px;
  letter-spacing: 0.02em;
}

.practice-card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.practice-card-title {
  font-size: 18px;
  font-weight: 600;
  color: #1A1A1A;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.practice-card-desc {
  font-size: 14px;
  color: #4D4D4D;
  line-height: 1.75;
}

.practice-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.practice-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid #F0F0F0;
  gap: 12px;
}

.practice-download-btn {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  flex-shrink: 0;
}

.practice-how {
  background: #F7F7F7;
  border-radius: 10px;
  padding: 16px 18px;
}

.practice-how-title {
  font-size: 11px;
  font-weight: 600;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.practice-how-steps {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.practice-how-steps li {
  font-size: 13px;
  color: #4D4D4D;
  line-height: 1.6;
}

.practice-how-steps code {
  background: #EBEBEB;
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 12px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  color: #1A1A1A;
}

.practice-how-steps strong {
  color: #1A1A1A;
  font-weight: 600;
}

.practice-how-steps em {
  font-style: normal;
  background: #EBEBEB;
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 12px;
  color: #333;
}

/* ============================================================================
   9b. FLOATING TEST ENTRY (FAB)
   ============================================================================ */

/* ── Sparkle Gradient FAB ── */
.fab-test {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 900;
  text-decoration: none;
  border-radius: 9999px;
  padding: 3px;
  background: linear-gradient(90deg,
    rgba(147,197,253,0.3) 0%,
    rgba(59,130,246,0.3) 40%,
    rgba(168,85,247,0.3) 100%);
  cursor: pointer;
  animation: fabEnter 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 1.5s both;
  transition: transform 0.25s ease;
}

.fab-test:hover  { transform: scale(1.1); }
.fab-test:active { transform: scale(1.05); }

/* solid gradient inner pill */
.fab-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px 10px 14px;
  border-radius: 9999px;
  background: linear-gradient(90deg, #93c5fd 0%, #3b82f6 40%, #a855f7 100%);
  white-space: nowrap;
  overflow: visible;
}

/* label */
.fab-label {
  font-family: var(--font-family-base);
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.02em;
}

/* ── Sparkle icons ── */
.fab-sp {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.fab-sp-main {
  position: relative;
  flex-shrink: 0;
  animation: fabSparkleMain 2s ease-in-out infinite;
}

.fab-sp-1 {
  bottom: 5px; left: 14px;
  transform: rotate(12deg);
  animation: fabSparkle 2s ease-in-out 1s infinite;
}
.fab-sp-2 {
  top: 5px; left: 20px;
  transform: rotate(-12deg);
  animation: fabSparkle 2.5s ease-in-out 1.5s infinite;
}
.fab-sp-3 {
  top: 6px; left: 11px;
  animation: fabSparkle 2.5s ease-in-out 0.5s infinite;
}

@keyframes fabSparkle {
  0%, 100% { transform: scale(0) rotate(0deg);  opacity: 0; }
  50%       { transform: scale(1) rotate(90deg); opacity: 1; }
}
@keyframes fabSparkleMain {
  0%, 100% { opacity: 0.7; transform: rotate(-10deg) scale(0.9); }
  50%       { opacity: 1;   transform: rotate(10deg)  scale(1.1); }
}

/* particle canvas */
.fab-canvas {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 280px; height: 130px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: -1;
}
.fab-test:hover .fab-canvas { opacity: 1; }

@keyframes fabEnter {
  from { opacity: 0; transform: translateY(30px) scale(0.8); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

@media (max-width: 768px) {
  .fab-test { bottom: 24px; right: 20px; }
  .fab-inner { padding: 11px 18px 11px 14px; gap: 8px; }
  .fab-label { font-size: 13px; }
}

@media (max-width: 480px) {
  .fab-test { bottom: 20px; right: 16px; }
}

/* ============================================================================
   9. TAGS & LABELS
   ============================================================================ */

.tag {
  display: inline-block;
  padding: 6px 14px;
  font-size: var(--font-size-tag);
  font-weight: var(--font-weight-medium);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-tag);
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--color-text-primary);
  border-radius: 4px;
  transition: var(--transition-fast);
}

.tag:hover {
  background-color: rgba(0, 0, 0, 0.1);
}

.label {
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-medium);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-tag);
  color: var(--color-text-secondary);
}

/* ============================================================================
   10. DETAIL PAGE LAYOUT
   ============================================================================ */

.detail-container {
  max-width: 850px;
  margin: 0 auto;
  padding: var(--spacing-section) var(--content-padding);
}

.detail-header {
  margin-bottom: var(--spacing-section);
}

.detail-header h1 {
  margin-bottom: 24px;
}

.detail-hero-image {
  width: 100%;
  border-radius: var(--radius-card);
  margin-bottom: var(--spacing-section);
  overflow: hidden;
}

.detail-hero-image img {
  width: 100%;
  height: auto;
  display: block;
}

.detail-section {
  margin-bottom: var(--spacing-section-md);
}

.detail-section h2 {
  margin-bottom: 32px;
}

.detail-two-column {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 64px;
  margin-bottom: var(--spacing-section-md);
}

.detail-meta-col {
  position: relative;
}

.detail-meta-item {
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--color-divider);
}

.detail-meta-item:last-child {
  border-bottom: none;
}

.detail-meta-label {
  font-size: var(--font-size-caption);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-tag);
  color: var(--color-text-secondary);
  margin-bottom: 8px;
  display: block;
}

.detail-meta-value {
  font-size: var(--font-size-body);
  color: var(--color-text-primary);
  line-height: var(--line-height-body);
}

.detail-content-col {
  padding-top: 0;
}

.detail-content-col p {
  margin-bottom: 24px;
}

.detail-content-col h3 {
  margin-top: 32px;
  margin-bottom: 16px;
}

/* ============================================================================
   11. EXPERIENCE SECTION
   ============================================================================ */

.experience-list {
  list-style: none;
}

.experience-item {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 64px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--color-divider);
  margin-bottom: 48px;
}

.experience-item:last-child {
  border-bottom: none;
}

.experience-role {
  font-size: var(--font-size-card-title);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
}

.experience-company {
  font-size: var(--font-size-body);
  color: var(--color-text-primary);
  margin-bottom: 8px;
}

.experience-period {
  font-size: var(--font-size-caption);
  color: var(--color-text-secondary);
  margin-bottom: 16px;
}

.experience-description {
  font-size: var(--font-size-body);
  color: var(--color-text-secondary);
  line-height: var(--line-height-body);
}

/* ============================================================================
   12. DIVIDER
   ============================================================================ */

.divider {
  height: 1px;
  background-color: var(--color-divider);
  margin: var(--spacing-section-md) 0;
}

.divider-short {
  height: 1px;
  background-color: var(--color-divider);
  margin: 24px 0;
  max-width: 100px;
}

/* ============================================================================
   13. DARK ZONE — unified CTA + Footer container
   ============================================================================ */

.dark-zone {
  position: relative;
  overflow: hidden;
  /* 白→灰100 渐变底色 */
  background: linear-gradient(135deg, #ffffff 0%, #f9fafb 50%, #f3f4f6 100%);
}

/* 蓝/紫/粉 各5%透明度叠加 → 形成浅紫感 */
.dark-zone::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(135deg,
    rgba(59, 130, 246, 0.05) 0%,
    rgba(168, 85, 247, 0.05) 50%,
    rgba(236, 72, 153, 0.05) 100%);
  pointer-events: none;
}

/* 网格线 + 从顶部中心向外椭圆渐变遮罩 */
.dark-zone::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(to right, #f0f0f0 1px, transparent 1px),
    linear-gradient(to bottom, #f0f0f0 1px, transparent 1px);
  background-size: 4rem 4rem;
  -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 0%, #000 70%, transparent 100%);
  mask-image: radial-gradient(ellipse 60% 50% at 50% 0%, #000 70%, transparent 100%);
  pointer-events: none;
}

.dz-halo { display: none; }

/* ============================================================================
   13b. DARK SECTION (CTA — inside .dark-zone)
   ============================================================================ */

.dark-section {
  background: transparent;
  color: #1A1A1A;
  padding: var(--spacing-section) var(--content-padding);
  text-align: center;
  position: relative;
  z-index: 2;
}

.dark-section h2 {
  color: #1A1A1A;
  margin-bottom: 32px;
}

.dark-section p {
  color: #666;
  max-width: 600px;
  margin: 0 auto 48px;
}

.dark-section .btn-primary {
  background-color: #1A1A1A;
  color: #F7F4EF;
}

.dark-section .btn-primary:hover {
  background-color: #333;
}

/* ============================================================================
   14. FOOTER
   ============================================================================ */

footer {
  /* 和 dark-zone 完全相同的背景，无缝衔接，无网格无线条 */
  background: transparent;
  color: #4D4D4D;
  padding: 44px var(--content-padding);
  border-top: none;
  position: relative;
  z-index: 1;
}

.footer-content {
  max-width: var(--content-max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
  position: relative;
  z-index: 1;
}

.footer-section h4 {
  color: #1A1A1A;
  margin-bottom: 24px;
  font-size: var(--font-size-body);
}

.footer-section ul {
  list-style: none;
}

.footer-section li {
  margin-bottom: 12px;
}

.footer-section a {
  color: #808080;
  font-size: 14px;
  transition: var(--transition-fast);
}

.footer-section a:hover {
  color: #1A1A1A;
}

.footer-bottom {
  border-top: none;
  padding-top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #999;
  position: relative;
  z-index: 2;
}

.footer-socials {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-socials a {
  color: #808080;
}

.footer-socials a:hover {
  color: #1A1A1A;
}

/* ============================================================================
   15. ANIMATIONS & TRANSITIONS
   ============================================================================ */

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Blob 1: slow wide orbit */
/* Blob 1: wide flowing orbit */
/* Halo 1: sweeps right and down, breathing scale */
@keyframes haloFlow1 {
  0%,100% { transform: translate(0, 0) scale(1);              opacity: 0.90; }
  25%     { transform: translate(90px, 70px) scale(1.09);     opacity: 0.76; }
  50%     { transform: translate(150px, 10px) scale(1.04);    opacity: 0.90; }
  75%     { transform: translate(50px, -60px) scale(0.95);    opacity: 0.82; }
}

/* Halo 2: counter-orbit, left and up */
@keyframes haloFlow2 {
  0%,100% { transform: translate(0, 0) scale(1);              opacity: 0.78; }
  30%     { transform: translate(-100px, -70px) scale(1.10);  opacity: 0.62; }
  55%     { transform: translate(-150px, 20px) scale(0.94);   opacity: 0.82; }
  80%     { transform: translate(-60px, 80px) scale(1.06);    opacity: 0.68; }
}


.fade-up {
  animation: fadeUp 0.8s ease-out;
}

.fade-in {
  animation: fadeIn 0.8s ease-out;
}

.slide-in-left {
  animation: slideInLeft 0.8s ease-out;
}

.slide-in-right {
  animation: slideInRight 0.8s ease-out;
}

/* ============================================================================
   16. UTILITY CLASSES
   ============================================================================ */

.mb-0 { margin-bottom: 0; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mb-48 { margin-bottom: 48px; }
.mb-64 { margin-bottom: 64px; }

.mt-0 { margin-top: 0; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mt-64 { margin-top: 64px; }

.px-0 { padding-left: 0; padding-right: 0; }
.px-16 { padding-left: 16px; padding-right: 16px; }
.px-24 { padding-left: 24px; padding-right: 24px; }
.px-32 { padding-left: 32px; padding-right: 32px; }

.py-16 { padding-top: 16px; padding-bottom: 16px; }
.py-24 { padding-top: 24px; padding-bottom: 24px; }
.py-32 { padding-top: 32px; padding-bottom: 32px; }

.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.gap-32 { gap: 32px; }
.gap-48 { gap: 48px; }

.w-full { width: 100%; }
.h-full { height: 100%; }

.opacity-50 { opacity: 0.5; }
.opacity-70 { opacity: 0.7; }
.opacity-100 { opacity: 1; }

.rounded-lg { border-radius: 12px; }
.rounded-xl { border-radius: 24px; }
.rounded-full { border-radius: 9999px; }

.border-bottom {
  border-bottom: 1px solid var(--color-divider);
}

.border-top {
  border-top: 1px solid var(--color-divider);
}

.no-wrap {
  white-space: nowrap;
}

.truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hidden {
  display: none;
}

.visible {
  display: block;
}

/* ============================================================================
   17. RESPONSIVE DESIGN
   ============================================================================ */

@media (max-width: 1024px) {
  :root {
    --spacing-section: 120px;
    --spacing-section-md: 100px;
    --content-padding: 0 48px;
  }

  nav.navbar {
    padding: 0 48px;
  }

  .navbar-links {
    gap: 32px;
  }

  .card {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .card-content {
    padding: var(--spacing-card);
  }

  .card-image {
    min-height: 300px;
  }

  .detail-two-column {
    grid-template-columns: 150px 1fr;
    gap: 48px;
  }

  .experience-item {
    grid-template-columns: 150px 1fr;
    gap: 48px;
  }

  .footer-content {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --font-size-h1: 40px;
    --font-size-section-title: 28px;
    --font-size-card-title: 24px;
    --spacing-section: 80px;
    --spacing-section-md: 60px;
    --content-padding: 0 24px;
    --spacing-card: 32px;
  }

  nav.navbar {
    padding: 0 24px;
    height: 70px;
  }

  .navbar-links {
    display: none;
  }

  .navbar-cta {
    display: flex;
  }

  .hero {
    padding-top: 140px;
    padding-bottom: 80px;
  }

  .hero::before { width: 450px; height: 450px; filter: blur(60px); }
  .hero::after { width: 350px; height: 350px; filter: blur(60px); }
  .hero .hero-blob { width: 300px; height: 300px; filter: blur(50px); }

  .hero h1 {
    font-size: 36px;
  }

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

  .card-content {
    padding: 32px;
  }

  .card-image {
    min-height: 250px;
  }

  .detail-container {
    padding: 80px 24px;
  }

  .detail-two-column {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .detail-meta-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .detail-meta-item {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
  }

  .experience-item {
    grid-template-columns: 1fr;
    gap: 16px;
  }

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

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

  .footer-content {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 24px;
  }

  h1 {
    font-size: 36px;
  }

  h2 {
    font-size: 28px;
  }

  h3 {
    font-size: 20px;
  }

  .section {
    padding: 80px 24px;
  }

  .section-md {
    padding: 60px 24px;
  }

  .dark-section {
    padding: 80px 24px;
  }

  footer {
    padding: 60px 24px;
  }
}

@media (max-width: 480px) {
  :root {
    --font-size-h1: 32px;
    --font-size-section-title: 24px;
    --font-size-card-title: 20px;
    --spacing-section: 60px;
    --spacing-section-md: 48px;
    --content-padding: 0 16px;
    --spacing-card: 24px;
  }

  nav.navbar {
    padding: 0 16px;
    height: 60px;
  }

  .hero {
    padding-top: 100px;
    padding-bottom: 60px;
    min-height: auto;
  }

  .hero h1 {
    font-size: 28px;
    margin-bottom: 16px;
  }

  .hero .subtitle {
    font-size: 14px;
    margin-bottom: 32px;
  }

  .hero .cta-group {
    flex-direction: column;
    gap: 12px;
  }

  .hero .btn {
    width: 100%;
  }

  .card {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .card-content {
    padding: 24px;
  }

  .card-image {
    min-height: 200px;
  }

  .card-title {
    font-size: 18px;
    margin-bottom: 12px;
  }

  .card-description {
    font-size: 14px;
    margin-bottom: 16px;
  }

  .detail-container {
    padding: 60px 16px;
  }

  .detail-header h1 {
    font-size: 28px;
  }

  .detail-meta-col {
    grid-template-columns: 1fr;
  }

  .detail-meta-label {
    font-size: 11px;
  }

  .experience-role {
    font-size: 18px;
  }

  h1 {
    font-size: 28px;
  }

  h2 {
    font-size: 22px;
  }

  h3 {
    font-size: 18px;
  }

  .section {
    padding: 60px 16px;
  }

  .section-md {
    padding: 48px 16px;
  }

  .dark-section {
    padding: 60px 16px;
  }

  footer {
    padding: 48px 16px;
  }

  .footer-section {
    margin-bottom: 24px;
  }

  .tag {
    padding: 5px 10px;
    font-size: 10px;
  }

  .btn {
    padding: 12px 20px;
    font-size: 12px;
  }

  .btn-primary {
    padding: 10px 20px;
  }

  .btn-outline {
    padding: 10px 20px;
  }
}

/* ============================================================================
   18. PRINT STYLES
   ============================================================================ */

@media print {
  nav.navbar {
    display: none;
  }

  .dark-section {
    page-break-inside: avoid;
  }

  a {
    text-decoration: underline;
  }
}

/* ============================================================================
   MESSAGE DOCK
   ============================================================================ */

.mdock {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  border-radius: 9999px;
  border: 1px solid rgba(220,215,210,0.6);
  box-shadow: 0 8px 32px rgba(0,0,0,0.10), 0 2px 8px rgba(0,0,0,0.06);
  padding: 8px 16px;
  background: #fff;
  transition: width 0.4s cubic-bezier(0.34,1.46,0.64,1),
              background 0.22s ease;
  /* width set by JS after measure */
}

/* ── Inner: two views stack on top of each other ── */
.mdock-c,
.mdock-e {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 48px;
}

.mdock-e {
  position: absolute;
  inset: 8px 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.mdock-c {
  transition: opacity 0.15s ease;
  white-space: nowrap;
}

/* expanded state */
.mdock.mdock-open .mdock-c {
  opacity: 0;
  pointer-events: none;
}
.mdock.mdock-open .mdock-e {
  opacity: 1;
  pointer-events: auto;
}

/* ── Sparkle button ── */
.mdock-sparkle {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 26px;
  border-radius: 50%;
  flex-shrink: 0;
  text-decoration: none;
  color: inherit;
  animation: orbCall 2.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) infinite;
  transform-origin: center bottom;
  filter: drop-shadow(0 0 0px rgba(139, 92, 246, 0));
}
.mdock-sparkle:hover {
  animation-play-state: paused;
  transform: scale(1.22) translateY(-4px);
  filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.7));
}

@keyframes orbCall {
  /* 悬浮上下 */
  0%   { transform: translateY(0)    scale(1);    filter: drop-shadow(0 2px 6px rgba(139,92,246,0.35)); }
  25%  { transform: translateY(-7px) scale(1.12); filter: drop-shadow(0 6px 12px rgba(139,92,246,0.6)); }
  50%  { transform: translateY(0)    scale(1);    filter: drop-shadow(0 2px 6px rgba(139,92,246,0.35)); }
  /* 突然弹跳 */
  60%  { transform: translateY(-11px) scale(1.2) rotate(-8deg); filter: drop-shadow(0 8px 16px rgba(139,92,246,0.8)); }
  68%  { transform: translateY(2px)   scale(0.9) rotate(4deg);  filter: drop-shadow(0 1px 4px rgba(139,92,246,0.2)); }
  76%  { transform: translateY(-5px)  scale(1.1) rotate(-3deg); filter: drop-shadow(0 4px 10px rgba(139,92,246,0.5)); }
  85%  { transform: translateY(0)     scale(1)   rotate(0deg);  filter: drop-shadow(0 2px 6px rgba(139,92,246,0.35)); }
  100% { transform: translateY(0)     scale(1)   rotate(0deg);  filter: drop-shadow(0 2px 6px rgba(139,92,246,0.35)); }
}

/* ── Separator ── */
.mdock-line {
  width: 1px;
  height: 24px;
  background: rgba(0,0,0,0.13);
  flex-shrink: 0;
  margin: 0 4px;
}

/* ── Character buttons (collapsed) ── */
.mdock-char {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  font-size: 22px;
  flex-shrink: 0;
  transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1);
}
.mdock-char:hover { transform: scale(1.08) translateY(-5px); }

/* ── Dock Tooltips ── */
.mdock-c [data-tip] { position: relative; }
.mdock-c [data-tip]::before {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: rgba(20,20,20,0.88);
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .02em;
  white-space: nowrap;
  padding: 5px 10px;
  border-radius: 7px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .18s ease, transform .18s ease;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 100;
}
.mdock-c [data-tip]::after {
  content: '';
  position: absolute;
  bottom: calc(100% + 5px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  border: 5px solid transparent;
  border-top-color: rgba(20,20,20,0.88);
  pointer-events: none;
  opacity: 0;
  transition: opacity .18s ease, transform .18s ease;
  z-index: 100;
}
.mdock-c [data-tip]:hover::before,
.mdock-c [data-tip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.mdock-dot {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 10px;
  height: 10px;
  background: #22c55e;
  border: 2px solid #fff;
  border-radius: 50%;
}

/* ── Menu button ── */
.mdock-menu {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  cursor: pointer;
  color: #6b7280;
  border-radius: 50%;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.mdock-menu:hover { transform: scale(1.08) translateY(-2px); }

/* ── Expanded view ── */

/* Selected character pill */
.mdock-sel {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.85);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  transition: transform 0.2s ease;
}
.mdock-sel:hover { transform: scale(1.06); }

/* Text input */
.mdock-inp {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  font-family: 'PingFang SC', -apple-system, sans-serif;
}
.mdock-inp::placeholder { color: rgba(55,65,81,0.5); }

/* Send button */
.mdock-send {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: rgba(255,255,255,0.88);
  border-radius: 50%;
  cursor: pointer;
  color: #374151;
  flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.mdock-send:hover:not(:disabled) { transform: scale(1.1); background: #fff; }
.mdock-send:disabled { opacity: 0.38; cursor: not-allowed; }

@media (max-width: 768px) {
  .hero h1,
  .hero .subtitle {
    white-space: normal;
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-icons {
    opacity: 0.8;
  }

  .fi-card-inner {
    width: 62px;
    height: 62px;
    border-radius: 18px;
  }

  .fi-bounce-img {
    width: 58px;
    height: 58px;
    border-radius: 15px;
  }

  .fi-contain-img {
    width: 48px;
    height: 48px;
  }

  .fi-svg-icon {
    width: 36px;
    height: 36px;
  }

  .fi-emoji {
    font-size: 28px;
  }

  .practice-grid {
    grid-template-columns: 1fr;
    max-width: none;
  }

  .practice-card-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .practice-download-btn {
    width: 100%;
  }

  .mdock {
    left: 12px;
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    transform: none;
    width: auto !important;
    max-width: none;
    padding: 8px 12px;
  }

  .mdock-c {
    gap: 4px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 2px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .mdock-c::-webkit-scrollbar {
    display: none;
  }

  .mdock-line {
    margin: 0 2px;
  }

  .mdock-sparkle,
  .mdock-menu {
    width: 42px;
    height: 42px;
    font-size: 22px;
  }

  .mdock-char {
    width: 36px;
    height: 36px;
    font-size: 20px;
  }

  .mdock-dot {
    width: 8px;
    height: 8px;
  }

  .mdock-e {
    inset: 8px 12px;
  }
}

@media (max-width: 480px) {
  body {
    padding-bottom: calc(88px + env(safe-area-inset-bottom));
  }

  .hero {
    height: auto;
  }

  .hero-icons .fi-card:nth-child(n+9) {
    display: none;
  }

  .hero h1 {
    white-space: normal;
    text-wrap: balance;
  }

  .hero .subtitle {
    white-space: normal;
  }

  .card-image {
    min-height: 180px;
  }

  .practice-card {
    padding: 22px;
    gap: 16px;
  }

  .practice-card-header {
    gap: 12px;
  }

  .practice-type-badge {
    font-size: 10px;
    padding: 4px 8px;
  }

  .practice-card-meta {
    text-align: center;
  }

  .mdock {
    padding: 6px 10px;
    border-radius: 26px;
  }

  .mdock-c,
  .mdock-e {
    height: 42px;
  }

  .mdock-sparkle,
  .mdock-menu {
    width: 38px;
    height: 38px;
    font-size: 20px;
  }

  .mdock-char,
  .mdock-sel,
  .mdock-send {
    width: 34px;
    height: 34px;
    font-size: 18px;
  }

  .mdock-inp {
    font-size: 13px;
  }
}

/* ============================================================================
   END OF STYLESHEET
   ============================================================================ */
