/* ==========================================================================
   Obsidian Titanium Liquid Glass Theme (高级暗黑流体毛玻璃 · 零蓝调)
   黑曜石底色 + 液态钛银/铂金折射高光 + 真透明流体毛玻璃卡片
   ========================================================================== */

:root {
  /* 浅色备选模式：同样去蓝调，采用温润白银/羊皮纸雾面玻璃 */
  --bg: #eceae5;
  --text-primary: #141413;
  --text-secondary: #52504c;
  --text-muted: #78746d;

  --accent: #1c1b19;
  --accent-champagne: #9c7e54;
  --accent-soft: rgba(28, 27, 25, 0.08);
  --metallic-gradient: linear-gradient(135deg, #111111 0%, #4b4742 52%, #8e7655 100%);

  --glass-surface: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.56) 0%,
    rgba(255, 255, 255, 0.28) 55%,
    rgba(255, 255, 255, 0.44) 100%
  );
  --glass-surface-strong: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.78) 0%,
    rgba(248, 246, 242, 0.62) 100%
  );
  --glass-border: rgba(255, 255, 255, 0.72);
  --glass-hairline: rgba(20, 20, 19, 0.08);
  --glass-inset:
    inset 0 1px 1px rgba(255, 255, 255, 0.92),
    inset 0 -1px 1px rgba(20, 20, 19, 0.05),
    inset 1px 0 1px rgba(255, 255, 255, 0.55);
  --glass-shadow: 0 18px 42px rgba(20, 19, 17, 0.09), 0 2px 8px rgba(20, 19, 17, 0.05);
  --glass-shadow-hover: 0 28px 60px rgba(20, 19, 17, 0.14), 0 4px 14px rgba(20, 19, 17, 0.07);
  --glint-color: rgba(255, 255, 255, 0.55);

  --blob-1: radial-gradient(circle, rgba(205, 188, 165, 0.55) 0%, rgba(205, 188, 165, 0) 68%);
  --blob-2: radial-gradient(circle, rgba(175, 172, 166, 0.45) 0%, rgba(175, 172, 166, 0) 68%);
  --blob-3: radial-gradient(circle, rgba(218, 202, 178, 0.45) 0%, rgba(218, 202, 178, 0) 68%);
  --blob-4: radial-gradient(circle, rgba(145, 140, 134, 0.3) 0%, rgba(145, 140, 134, 0) 68%);
  --code-bg: rgba(20, 20, 19, 0.06);
  --pill-bg-active: #161615;
  --pill-text-active: #f7f5f0;
  --pill-hover: rgba(20, 20, 19, 0.06);

  --radius-sm: 12px;
  --radius-md: 22px;
  --radius-lg: 28px;
  --font-display: 'Plus Jakarta Sans', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-sans: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
}

html.dark {
  /* 核心默认主题：黑曜石高级暗黑 + 液态钛银 + 淡香槟铂金（零蓝调） */
  --bg: #050506;
  --text-primary: #f5f4f0;
  --text-secondary: #a8a49c;
  --text-muted: #7e7a72;

  --accent: #f3efe8;
  --accent-champagne: #d6be9b;
  --accent-soft: rgba(255, 255, 255, 0.08);
  --metallic-gradient: linear-gradient(135deg, #ffffff 0%, #dcd7ce 48%, #c9ae88 100%);

  /* 真正高透明的流体毛玻璃表面，让底层流动光影隐约穿透 */
  --glass-surface: linear-gradient(
    138deg,
    rgba(255, 255, 255, 0.085) 0%,
    rgba(255, 255, 255, 0.025) 48%,
    rgba(255, 255, 255, 0.055) 100%
  );
  --glass-surface-strong: linear-gradient(
    138deg,
    rgba(30, 29, 28, 0.72) 0%,
    rgba(16, 16, 17, 0.64) 100%
  );
  --glass-border: rgba(255, 255, 255, 0.14);
  --glass-hairline: rgba(255, 255, 255, 0.085);
  --glass-inset:
    inset 0 1px 1px rgba(255, 255, 255, 0.30),
    inset 0 -1px 1px rgba(255, 255, 255, 0.05),
    inset 1px 0 1px rgba(255, 255, 255, 0.10);
  --glass-shadow: 0 24px 56px rgba(0, 0, 0, 0.62), 0 4px 16px rgba(0, 0, 0, 0.42);
  --glass-shadow-hover:
    0 32px 72px rgba(0, 0, 0, 0.74),
    0 0 0 1px rgba(255, 255, 255, 0.22);
  --glint-color: rgba(255, 248, 236, 0.14);

  /* 流动的液态水银、暗铂金与暖烟雾光团（零蓝色） */
  --blob-1: radial-gradient(circle, rgba(214, 190, 155, 0.20) 0%, rgba(214, 190, 155, 0) 68%);
  --blob-2: radial-gradient(circle, rgba(235, 232, 226, 0.13) 0%, rgba(235, 232, 226, 0) 68%);
  --blob-3: radial-gradient(circle, rgba(168, 138, 102, 0.16) 0%, rgba(168, 138, 102, 0) 68%);
  --blob-4: radial-gradient(circle, rgba(180, 175, 170, 0.11) 0%, rgba(180, 175, 170, 0) 68%);
  --code-bg: rgba(255, 255, 255, 0.06);
  --pill-bg-active: rgba(255, 255, 255, 0.14);
  --pill-text-active: #ffffff;
  --pill-hover: rgba(255, 255, 255, 0.07);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

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

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

figure {
  margin: 0;
}

button {
  font-family: inherit;
  cursor: pointer;
}

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   Fluid Liquid-Mercury Ambient Background (让毛玻璃显出明显透明折射感)
   ========================================================================== */
.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.fluid-blob {
  position: absolute;
  border-radius: 999px;
  filter: blur(64px);
  will-change: transform;
}

.blob-1 {
  width: 680px;
  height: 680px;
  top: -160px;
  left: -80px;
  background: var(--blob-1);
  animation: floatA 20s ease-in-out infinite alternate;
}

.blob-2 {
  width: 720px;
  height: 720px;
  top: 16%;
  right: -140px;
  background: var(--blob-2);
  animation: floatB 24s ease-in-out infinite alternate;
}

.blob-3 {
  width: 640px;
  height: 640px;
  bottom: -180px;
  left: 24%;
  background: var(--blob-3);
  animation: floatC 22s ease-in-out infinite alternate;
}

.blob-4 {
  width: 520px;
  height: 520px;
  top: 52%;
  left: -120px;
  background: var(--blob-4);
  animation: floatB 26s ease-in-out infinite alternate-reverse;
}

.noise-layer {
  position: absolute;
  inset: 0;
  opacity: 0.035;
  background-image: radial-gradient(rgba(255, 255, 255, 0.5) 0.5px, transparent 0.5px);
  background-size: 24px 24px;
}

@keyframes floatA {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(110px, 70px) scale(1.12); }
}

@keyframes floatB {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-90px, 95px) scale(1.1); }
}

@keyframes floatC {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(85px, -85px) scale(1.14); }
}

/* ==========================================================================
   True Transparent Liquid Glass Material (流体透明毛玻璃材质)
   ========================================================================== */
.liquid-glass {
  position: relative;
  background: var(--glass-surface);
  backdrop-filter: blur(28px) saturate(165%);
  -webkit-backdrop-filter: blur(28px) saturate(165%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-inset), var(--glass-shadow);
  overflow: hidden;
  transition:
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.28s ease;
}

/* 顶部液态曲面折射高光线 */
.liquid-glass::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    118deg,
    rgba(255, 255, 255, 0.14) 0%,
    rgba(255, 255, 255, 0.02) 28%,
    rgba(255, 255, 255, 0) 58%,
    rgba(255, 255, 255, 0.06) 100%
  );
  pointer-events: none;
  z-index: 0;
}

/* 鼠标追踪流体光斑 */
.liquid-glass::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    420px circle at var(--mx, 50%) var(--my, -20%),
    var(--glint-color),
    transparent 65%
  );
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
  z-index: 0;
}

.liquid-glass > * {
  position: relative;
  z-index: 1;
}

.glass-interactive:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow: var(--glass-inset), var(--glass-shadow-hover);
}

.glass-interactive:hover::after {
  opacity: 1;
}

/* ==========================================================================
   Floating Liquid Glass Capsule Navbar (含「随笔」目录)
   ========================================================================== */
.floating-nav-wrap {
  position: fixed;
  top: 20px;
  left: 0;
  right: 0;
  z-index: 60;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}

.floating-nav {
  pointer-events: auto;
  width: 100%;
  max-width: 860px;
  height: 58px;
  padding: 6px 8px 6px 14px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  overflow: visible;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: -0.02em;
}

.brand-chip {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.24), rgba(214, 190, 155, 0.24));
  border: 1px solid rgba(255, 255, 255, 0.26);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.35);
}

.nav-pills {
  display: flex;
  align-items: center;
  gap: 3px;
}

.nav-pill {
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.87rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.22s ease;
  white-space: nowrap;
}

.nav-pill:hover {
  color: var(--text-primary);
  background: var(--pill-hover);
}

.nav-pill.active {
  color: var(--pill-text-active);
  background: var(--pill-bg-active);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.28), 0 4px 14px rgba(0, 0, 0, 0.22);
}

.nav-tools {
  display: flex;
  align-items: center;
  gap: 6px;
}

.glass-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.glass-icon-btn svg {
  width: 17px;
  height: 17px;
}

.glass-icon-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.14);
  transform: scale(1.05);
}

html.dark .icon-moon { display: none; }
html:not(.dark) .icon-sun { display: none; }

.mobile-toggle {
  display: none;
}

.mobile-sheet {
  pointer-events: auto;
  display: none;
  width: 100%;
  max-width: 860px;
  margin-top: 10px;
  padding: 10px;
  border-radius: var(--radius-md);
  flex-direction: column;
  gap: 4px;
}

.mobile-sheet.open {
  display: flex;
}

.mobile-pill {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.mobile-pill.active,
.mobile-pill:hover {
  background: var(--pill-bg-active);
  color: var(--pill-text-active);
}

/* ==========================================================================
   Buttons, Pills & Chips
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease, background-color 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #f7f4ee 0%, #dcd4c6 100%);
  color: #0b0b0c;
  box-shadow: inset 0 1px 1px #ffffff, 0 10px 28px rgba(0, 0, 0, 0.36);
}

html:not(.dark) .btn-primary {
  background: #141413;
  color: #f7f5f0;
  box-shadow: 0 10px 24px rgba(20, 20, 19, 0.2);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: inset 0 1px 1px #ffffff, 0 16px 36px rgba(0, 0, 0, 0.48);
}

.btn-liquid {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-color: var(--glass-border);
  color: var(--text-primary);
  box-shadow: var(--glass-inset);
}

.btn-liquid:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.13);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.82rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--accent-champagne);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-inset);
}

.led-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent-champagne);
  box-shadow: 0 0 12px var(--accent-champagne);
  animation: ledPulse 2.2s ease-in-out infinite;
}

@keyframes ledPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.8); }
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.73rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--glass-hairline);
  color: var(--text-secondary);
}

/* ==========================================================================
   Full-Viewport Dramatic Centered Opening Hero (沉浸式开屏 · 高级黑曜石)
   ========================================================================== */
.hero-stage {
  position: relative;
  min-height: 100vh;
  padding: 112px 24px 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.hero-center {
  position: relative;
  z-index: 1;
  max-width: 840px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-display {
  margin: 26px 0 18px;
  font-family: var(--font-display);
  font-size: clamp(2.85rem, 6.8vw, 5.4rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.035em;
}

.hero-display .metallic {
  background: var(--metallic-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-rotating {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(1.08rem, 2.2vw, 1.42rem);
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 16px;
  min-height: 2.2rem;
}

.hero-rotating-highlight {
  color: var(--text-primary);
  border-bottom: 1.5px solid var(--accent-champagne);
  padding-bottom: 2px;
}

.cursor-bar {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  background: var(--accent-champagne);
  vertical-align: -2px;
  margin-left: 3px;
  animation: blink 0.9s steps(1) infinite;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.hero-subline {
  margin: 0 0 34px;
  max-width: 580px;
  font-size: 0.98rem;
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.scroll-cue:hover {
  color: var(--text-primary);
}

.scroll-line {
  width: 1px;
  height: 30px;
  background: linear-gradient(180deg, var(--accent-champagne), transparent);
  animation: scrollDrop 2s ease-in-out infinite;
}

@keyframes scrollDrop {
  0%, 100% { transform: scaleY(0.75); opacity: 0.45; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* ==========================================================================
   Second Fold: Liquid Glass Spotlight Deck (透明流体毛玻璃核心展示区)
   ========================================================================== */
.deck-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 24px;
  align-items: stretch;
}

.statement-card {
  border-radius: var(--radius-lg);
  padding: 36px 34px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.statement-title {
  margin: 16px 0 12px;
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.statement-desc {
  margin: 0 0 26px;
  font-size: 0.96rem;
  color: var(--text-secondary);
}

.metrics-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding-top: 22px;
  border-top: 1px solid var(--glass-hairline);
}

.metric-box {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--glass-hairline);
  border-radius: 16px;
  padding: 14px;
}

.metric-val {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
}

.metric-lbl {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 3px;
}

/* 交互式机械臂控制遥测透明玻璃窗 */
.telemetry-window {
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
}

.window-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--glass-hairline);
  background: rgba(255, 255, 255, 0.03);
}

.window-dots {
  display: inline-flex;
  gap: 7px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.dot-1 { background: rgba(255, 255, 255, 0.36); }
.dot-2 { background: rgba(214, 190, 155, 0.55); }
.dot-3 { background: rgba(255, 255, 255, 0.18); }

.window-meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.telemetry-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  flex: 1;
}

.telemetry-mode-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--glass-hairline);
}

.mode-btn {
  padding: 7px 8px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.73rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.mode-btn.active {
  background: var(--pill-bg-active);
  border-color: rgba(255, 255, 255, 0.22);
  color: var(--pill-text-active);
}

.telemetry-preview {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--glass-hairline);
}

.telemetry-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.04) brightness(0.92);
}

.telemetry-hud {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(8, 8, 9, 0.62);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #f1eee8;
  font-family: var(--font-mono);
  font-size: 0.71rem;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.telemetry-hud-panel {
  border-radius: 16px;
  padding: 15px 16px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--glass-hairline);
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hud-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
}

.hud-label {
  color: var(--text-muted);
}

.hud-val {
  color: var(--text-primary);
  text-align: right;
}

.hud-val-accent {
  color: var(--accent-champagne);
  font-weight: 600;
}

/* Blueprint Header for Projects without Photos */
.project-blueprint {
  position: relative;
  padding: 20px 20px 18px;
  border-bottom: 1px solid var(--glass-hairline);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.045) 0%, rgba(214, 190, 155, 0.04) 100%),
    linear-gradient(to right, rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 100% 100%, 22px 22px, 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.blueprint-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.blueprint-period {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.blueprint-proto {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--accent-champagne);
  line-height: 1.45;
}

/* Awards Grid */
.awards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.award-card {
  border-radius: 18px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.award-card.award-featured {
  border-color: rgba(214, 190, 155, 0.36);
}

.award-title {
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text-primary);
}

.award-badge {
  flex-shrink: 0;
  padding: 5px 12px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-hairline);
  color: var(--text-secondary);
}

.award-featured .award-badge {
  background: rgba(214, 190, 155, 0.16);
  border-color: rgba(214, 190, 155, 0.42);
  color: var(--accent-champagne);
}

/* GitHub Repos Grid */
.repos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.repo-card {
  border-radius: 18px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.repo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.repo-name {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.repo-card:hover .repo-name {
  color: var(--accent-champagne);
}

.repo-desc {
  margin: 0;
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.repo-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-muted);
  padding-top: 10px;
  border-top: 1px solid var(--glass-hairline);
}

.empty-state-box {
  border-radius: var(--radius-lg);
  padding: 58px 28px;
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
}

.empty-state-box h3 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.empty-state-box p {
  margin: 0 auto 18px;
  max-width: 480px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Guestbook / 留言板 */
.guestbook-layout {
  display: grid;
  grid-template-columns: 0.95fr 1.25fr;
  gap: 24px;
  align-items: start;
}

.guestbook-form {
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.guestbook-form h3 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 1.18rem;
}

.glass-input,
.glass-textarea {
  width: 100%;
  padding: 12px 15px;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.glass-textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.65;
}

.glass-input:focus,
.glass-textarea:focus {
  border-color: var(--accent-champagne);
  background: rgba(255, 255, 255, 0.08);
}

.guestbook-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.guestbook-item {
  border-radius: var(--radius-md);
  padding: 20px 22px;
}

.guestbook-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.guestbook-author {
  font-weight: 600;
  font-size: 0.94rem;
}

.guestbook-time {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-muted);
}

.guestbook-msg {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-secondary);
  white-space: pre-wrap;
  line-height: 1.7;
}

@media (max-width: 960px) {
  .guestbook-layout {
    grid-template-columns: 1fr;
  }
}

.joint-grid {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.joint-row {
  display: grid;
  grid-template-columns: 56px 1fr 44px;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
}

.joint-name {
  color: var(--text-secondary);
}

.joint-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

html:not(.dark) .joint-track {
  background: rgba(20, 20, 19, 0.1);
}

.joint-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.65), var(--accent-champagne));
  transition: width 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.joint-val {
  text-align: right;
  color: var(--text-primary);
}

.bus-strip {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--glass-hairline);
  font-family: var(--font-mono);
  font-size: 0.71rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Common Sections & Page Headers
   ========================================================================== */
.section {
  padding: 44px 0;
}

.page-hero {
  padding: 118px 0 26px;
}

.page-hero-card {
  border-radius: var(--radius-lg);
  padding: 34px 36px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.page-hero h1 {
  margin: 10px 0 8px;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.8vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.page-hero p {
  margin: 0;
  max-width: 620px;
  color: var(--text-secondary);
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.kicker {
  font-family: var(--font-mono);
  font-size: 0.73rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent-champagne);
}

.section-title {
  margin: 5px 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.8vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.025em;
}

.section-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent-champagne);
  white-space: nowrap;
}

.section-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* 3-Column Bento Pillars */
.bento-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.bento-tile {
  border-radius: var(--radius-md);
  padding: 24px;
}

.bento-tile-title {
  font-family: var(--font-display);
  font-size: 1.04rem;
  font-weight: 700;
  margin: 8px 0 10px;
}

.bento-tile p {
  margin: 0 0 16px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ==========================================================================
   Filter Toolbar & Search
   ========================================================================== */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 24px;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-pill {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(18px);
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.filter-pill:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
}

.filter-pill.active {
  background: linear-gradient(135deg, #f7f4ee 0%, #dcd4c6 100%);
  border-color: transparent;
  color: #0a0a0b;
}

html:not(.dark) .filter-pill.active {
  background: #141413;
  color: #f7f5f0;
}

.search-box {
  width: 260px;
  max-width: 100%;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
  color: var(--text-primary);
  font-size: 0.86rem;
  outline: none;
}

.search-box:focus {
  border-color: var(--accent-champagne);
}

/* ==========================================================================
   Projects Cards
   ========================================================================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.project-card {
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.project-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.project-card:hover .project-media img {
  transform: scale(1.06);
}

.project-cat-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #f5f4f0;
  background: rgba(8, 8, 9, 0.62);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.project-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.project-title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1.06rem;
  font-weight: 700;
  line-height: 1.35;
}

.project-summary {
  margin: 0 0 16px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  flex: 1;
}

.project-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--glass-hairline);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.project-bottom a {
  color: var(--accent-champagne);
  font-weight: 600;
}

/* ==========================================================================
   Blog Cards
   ========================================================================== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.blog-card {
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
}

.blog-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.blog-title {
  margin: 8px 0 8px;
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.4;
}

.blog-card:hover .blog-title {
  color: var(--accent-champagne);
}

.blog-excerpt {
  margin: 0;
  font-size: 0.89rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   Essays / 随笔（时间流碎片与生活思考）
   ========================================================================== */
.essays-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.essays-feed {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 820px;
}

.essay-card {
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.essay-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.essay-mood {
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(214, 190, 155, 0.12);
  border: 1px solid rgba(214, 190, 155, 0.25);
  color: var(--accent-champagne);
  font-size: 0.74rem;
}

.essay-text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.78;
  color: var(--text-primary);
}

.essay-photo {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--glass-hairline);
  margin-top: 4px;
  cursor: zoom-in;
}

.essay-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--glass-hairline);
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Life Gallery & Lightbox
   ========================================================================== */
.gallery-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

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

.photo-card {
  margin: 0;
  border-radius: var(--radius-md);
  padding: 9px;
  cursor: zoom-in;
}

.photo-frame {
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.photo-card:hover .photo-frame img {
  transform: scale(1.06);
}

.photo-meta {
  padding: 11px 6px 4px;
}

.photo-title {
  font-weight: 600;
  font-size: 0.92rem;
}

.photo-sub {
  margin-top: 3px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.76rem;
  color: var(--text-muted);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(4, 4, 5, 0.9);
  backdrop-filter: blur(20px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
}

.lightbox.open {
  display: flex;
}

.lightbox-figure {
  max-width: 900px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.lightbox-figure img {
  max-height: 74vh;
  max-width: 100%;
  border-radius: 20px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.7);
}

.lightbox-bar {
  padding: 12px 20px;
  border-radius: 999px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
}

.lightbox-ctrl {
  position: fixed;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  color: #fff;
  font-size: 1.3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.lightbox-ctrl:hover {
  background: rgba(255, 255, 255, 0.22);
}

.lb-close { top: 22px; right: 22px; font-size: 1rem; }
.lb-prev { left: 22px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 22px; top: 50%; transform: translateY(-50%); }

/* ==========================================================================
   Resume & About
   ========================================================================== */
.resume-layout {
  display: grid;
  grid-template-columns: 0.95fr 1.25fr;
  gap: 24px;
  align-items: start;
}

.resume-card {
  border-radius: var(--radius-lg);
  padding: 28px;
}

.resume-card h3 {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
}

.skill-block {
  margin-bottom: 18px;
}

.skill-block:last-child {
  margin-bottom: 0;
}

.skill-label {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--accent-champagne);
  margin-bottom: 8px;
}

.timeline {
  position: relative;
  padding-left: 24px;
  border-left: 1.5px solid var(--glass-hairline);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.timeline-item {
  position: relative;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -30px;
  top: 6px;
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: var(--accent-champagne);
  box-shadow: 0 0 0 4px rgba(214, 190, 155, 0.16);
}

.timeline-time {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--accent-champagne);
}

.timeline-role {
  font-family: var(--font-display);
  font-size: 1.04rem;
  font-weight: 700;
  margin-top: 2px;
}

.timeline-org {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.timeline-desc {
  margin: 0;
  font-size: 0.89rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   Modal Window (Blog & Project Reader)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(4, 4, 5, 0.72);
  backdrop-filter: blur(14px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-backdrop.open {
  display: flex;
}

.modal-window {
  width: 100%;
  max-width: 820px;
  max-height: 86vh;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  background: var(--glass-surface-strong);
}

.btn-close-sm {
  width: 32px;
  height: 32px;
  font-size: 0.86rem;
}

.modal-scroll {
  padding: 30px 34px 40px;
  overflow-y: auto;
}

.prose h1 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  font-weight: 800;
  line-height: 1.25;
}

.prose h2 {
  margin: 26px 0 10px;
  font-family: var(--font-display);
  font-size: 1.24rem;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--glass-hairline);
}

.prose h3 {
  margin: 20px 0 8px;
  font-size: 1.04rem;
}

.prose p { margin: 0 0 14px; }
.prose ul, .prose ol { padding-left: 20px; margin: 0 0 14px; }
.prose li { margin-bottom: 6px; }

.prose blockquote {
  margin: 16px 0;
  padding: 12px 16px;
  border-left: 3px solid var(--accent-champagne);
  background: rgba(214, 190, 155, 0.08);
  border-radius: 0 12px 12px 0;
  color: var(--text-secondary);
}

.prose code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--code-bg);
  padding: 2px 6px;
  border-radius: 6px;
}

.prose pre {
  background: var(--code-bg);
  border: 1px solid var(--glass-hairline);
  border-radius: 14px;
  padding: 15px 18px;
  overflow-x: auto;
  margin: 14px 0;
}

.prose pre code { background: transparent; padding: 0; }
.prose img { border-radius: 16px; margin: 16px 0; }

/* ==========================================================================
   Footer & Toast
   ========================================================================== */
.footer-wrap {
  padding: 34px 0 46px;
}

.footer-glass {
  border-radius: var(--radius-lg);
  padding: 34px 36px 24px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.2fr 1.8fr;
  gap: 36px;
  margin-bottom: 26px;
}

.footer-intro p,
.footer-hint {
  margin: 12px 0 14px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

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

.footer-cols h4 {
  margin: 0 0 12px;
  font-size: 0.88rem;
  font-weight: 700;
}

.footer-cols ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.footer-cols a:hover {
  color: var(--accent-champagne);
}

.footer-bottom {
  padding-top: 18px;
  border-top: 1px solid var(--glass-hairline);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.mono-footnote {
  font-family: var(--font-mono);
  font-size: 0.74rem;
}

.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%) translateY(18px);
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  z-index: 120;
  transition: all 0.25s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.empty-state {
  text-align: center;
  padding: 48px 20px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
}

/* ==========================================================================
   Responsive & Print Resume
   ========================================================================== */
@media (max-width: 960px) {
  .deck-grid,
  .resume-layout,
  .footer-top {
    grid-template-columns: 1fr;
  }
  .bento-strip,
  .projects-grid,
  .repos-grid,
  .essays-preview-grid,
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .awards-grid {
    grid-template-columns: 1fr;
  }
  .gallery-strip {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 740px) {
  .nav-pills {
    display: none;
  }
  .mobile-toggle {
    display: inline-flex;
  }
  .statement-card,
  .page-hero-card,
  .footer-glass {
    padding: 24px 20px;
  }
  .metrics-row,
  .bento-strip,
  .projects-grid,
  .repos-grid,
  .awards-grid,
  .blog-grid,
  .essays-preview-grid,
  .gallery-grid,
  .gallery-strip,
  .footer-cols {
    grid-template-columns: 1fr;
  }
  .modal-scroll {
    padding: 22px 20px 30px;
  }
}

@media print {
  .ambient-bg, .floating-nav-wrap, .footer-wrap, .no-print, .modal-backdrop, .lightbox {
    display: none !important;
  }
  body { background: #fff !important; color: #111 !important; }
  .page-hero { padding-top: 12px; }
  .liquid-glass { background: #fff !important; box-shadow: none !important; border-color: #ddd !important; }
}
