/* ============================================
   欧阳威个人网站 · Apple Design Style
   共享样式表 — styles.css
   ============================================ */

/* ===== 1. Reset & Base ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background:
    radial-gradient(120% 90% at 12% 0%,   rgba(0,102,204,0.12),  transparent 55%),
    radial-gradient(120% 90% at 100% 18%, rgba(123,92,255,0.12), transparent 52%),
    radial-gradient(150% 110% at 50% 100%, rgba(0,188,212,0.10), transparent 58%),
    var(--color-bg);
  color: var(--color-fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background 0.3s ease, color 0.3s ease;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}

html[data-theme="dark"] body {
  background:
    radial-gradient(120% 90% at 12% 0%,   rgba(41,151,255,0.14),  transparent 55%),
    radial-gradient(120% 90% at 100% 18%, rgba(94,92,230,0.14),   transparent 52%),
    radial-gradient(150% 110% at 50% 100%, rgba(0,188,212,0.10),  transparent 58%),
    var(--color-bg);
}

/* ===== 2. Design Tokens ===== */
:root {
  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Cascadia Code', ui-monospace, monospace;

  /* Light Mode — Apple Design */
  --color-bg: #f5f5f7;
  --color-bg-alt: #ffffff;
  --color-bg-dark: #1d1d1f;
  --color-fg: #1d1d1f;
  --color-fg-bold: #1d1d1f;
  --color-fg-light: #6e6e73;
  --color-fg-muted: #86868b;
  --color-accent: #0066cc;
  --color-accent-hover: #0052a3;
  --color-accent-light: rgba(0, 102, 204, 0.08);
  --color-accent-underline: rgba(0, 102, 204, 0.3);
  --color-border: #e0e0e0;
  --color-border-light: #f0f0f2;
  --color-surface: #ffffff;
  --color-surface-hover: rgba(0, 0, 0, 0.03);
  --color-on-accent: #ffffff;

  /* Glassmorphism tokens */
  --glass-bg: rgba(255, 255, 255, 0.65);
  --glass-border: rgba(255, 255, 255, 0.72);
  --glass-highlight-top: rgba(255, 255, 255, 0.42);
  --glass-highlight-bottom: rgba(255, 255, 255, 0.1);
  --glass-blur: blur(22px) saturate(180%);

  /* Gradient accents */
  --gradient-blue: linear-gradient(135deg, #0066cc, #003d7a);
  --gradient-purple: linear-gradient(135deg, #5856d6, #3634a3);
  --gradient-orange: linear-gradient(135deg, #ff9500, #e68600);
  --gradient-cta: linear-gradient(135deg, #0066cc 0%, #5856d6 100%);
  --gradient-tint-blue: rgba(0, 102, 204, 0.04);
  --gradient-tint-purple: rgba(88, 86, 214, 0.04);
  --gradient-tint-orange: rgba(255, 149, 0, 0.04);
  --gradient-tint-green: rgba(48, 209, 88, 0.04);

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.10);
  --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.14);
  --shadow-blue: 0 8px 30px rgba(0, 102, 204, 0.15);
  --shadow-purple: 0 8px 30px rgba(88, 86, 214, 0.15);

  /* Radii */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 9999px;

  /* Apple 连续曲率圆角（Squircle）：超椭圆 n=4 mask（圆角平滑连续过渡，非圆弧） */
  --sq-xs: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20120%20120%22%3E%3Cpath%20d%3D%22M%206.00%200%20L%20114.00%200%20L%20115.77%200.01%20L%20116.50%200.05%20L%20117.05%200.10%20L%20117.51%200.18%20L%20117.90%200.29%20L%20118.24%200.42%20L%20118.54%200.57%20L%20118.81%200.75%20L%20119.05%200.95%20L%20119.25%201.19%20L%20119.43%201.46%20L%20119.58%201.76%20L%20119.71%202.10%20L%20119.82%202.49%20L%20119.90%202.95%20L%20119.95%203.50%20L%20119.99%204.23%20L%20120.00%206.00%20L%20120.00%20114.00%20L%20119.99%20115.77%20L%20119.95%20116.50%20L%20119.90%20117.05%20L%20119.82%20117.51%20L%20119.71%20117.90%20L%20119.58%20118.24%20L%20119.43%20118.54%20L%20119.25%20118.81%20L%20119.05%20119.05%20L%20118.81%20119.25%20L%20118.54%20119.43%20L%20118.24%20119.58%20L%20117.90%20119.71%20L%20117.51%20119.82%20L%20117.05%20119.90%20L%20116.50%20119.95%20L%20115.77%20119.99%20L%20114.00%20120.00%20L%206.00%20120.00%20L%204.23%20119.99%20L%203.50%20119.95%20L%202.95%20119.90%20L%202.49%20119.82%20L%202.10%20119.71%20L%201.76%20119.58%20L%201.46%20119.43%20L%201.19%20119.25%20L%200.95%20119.05%20L%200.75%20118.81%20L%200.57%20118.54%20L%200.42%20118.24%20L%200.29%20117.90%20L%200.18%20117.51%20L%200.10%20117.05%20L%200.05%20116.50%20L%200.01%20115.77%20L%200.00%20114.00%20L%200%206.00%20L%200.01%204.23%20L%200.05%203.50%20L%200.10%202.95%20L%200.18%202.49%20L%200.29%202.10%20L%200.42%201.76%20L%200.57%201.46%20L%200.75%201.19%20L%200.95%200.95%20L%201.19%200.75%20L%201.46%200.57%20L%201.76%200.42%20L%202.10%200.29%20L%202.49%200.18%20L%202.95%200.10%20L%203.50%200.05%20L%204.23%200.01%20L%206.00%200.00%20Z%22%20fill%3D%22%23fff%22%2F%3E%3C%2Fsvg%3E");
  --sq-sm: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20160%20160%22%3E%3Cpath%20d%3D%22M%2010.00%200%20L%20150.00%200%20L%20152.95%200.02%20L%20154.17%200.08%20L%20155.09%200.17%20L%20155.85%200.31%20L%20156.50%200.48%20L%20157.07%200.69%20L%20157.57%200.95%20L%20158.02%201.25%20L%20158.41%201.59%20L%20158.75%201.98%20L%20159.05%202.43%20L%20159.31%202.93%20L%20159.52%203.50%20L%20159.69%204.15%20L%20159.83%204.91%20L%20159.92%205.83%20L%20159.98%207.05%20L%20160.00%2010.00%20L%20160.00%20150.00%20L%20159.98%20152.95%20L%20159.92%20154.17%20L%20159.83%20155.09%20L%20159.69%20155.85%20L%20159.52%20156.50%20L%20159.31%20157.07%20L%20159.05%20157.57%20L%20158.75%20158.02%20L%20158.41%20158.41%20L%20158.02%20158.75%20L%20157.57%20159.05%20L%20157.07%20159.31%20L%20156.50%20159.52%20L%20155.85%20159.69%20L%20155.09%20159.83%20L%20154.17%20159.92%20L%20152.95%20159.98%20L%20150.00%20160.00%20L%2010.00%20160.00%20L%207.05%20159.98%20L%205.83%20159.92%20L%204.91%20159.83%20L%204.15%20159.69%20L%203.50%20159.52%20L%202.93%20159.31%20L%202.43%20159.05%20L%201.98%20158.75%20L%201.59%20158.41%20L%201.25%20158.02%20L%200.95%20157.57%20L%200.69%20157.07%20L%200.48%20156.50%20L%200.31%20155.85%20L%200.17%20155.09%20L%200.08%20154.17%20L%200.02%20152.95%20L%200.00%20150.00%20L%200%2010.00%20L%200.02%207.05%20L%200.08%205.83%20L%200.17%204.91%20L%200.31%204.15%20L%200.48%203.50%20L%200.69%202.93%20L%200.95%202.43%20L%201.25%201.98%20L%201.59%201.59%20L%201.98%201.25%20L%202.43%200.95%20L%202.93%200.69%20L%203.50%200.48%20L%204.15%200.31%20L%204.91%200.17%20L%205.83%200.08%20L%207.05%200.02%20L%2010.00%200.00%20Z%22%20fill%3D%22%23fff%22%2F%3E%3C%2Fsvg%3E");
  --sq-md: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20240%20240%22%3E%3Cpath%20d%3D%22M%2014.00%200%20L%20226.00%200%20L%20230.13%200.03%20L%20231.83%200.11%20L%20233.12%200.24%20L%20234.19%200.43%20L%20235.10%200.67%20L%20235.90%200.97%20L%20236.60%201.33%20L%20237.22%201.75%20L%20237.77%202.23%20L%20238.25%202.78%20L%20238.67%203.40%20L%20239.03%204.10%20L%20239.33%204.90%20L%20239.57%205.81%20L%20239.76%206.88%20L%20239.89%208.17%20L%20239.97%209.87%20L%20240.00%2014.00%20L%20240.00%20226.00%20L%20239.97%20230.13%20L%20239.89%20231.83%20L%20239.76%20233.12%20L%20239.57%20234.19%20L%20239.33%20235.10%20L%20239.03%20235.90%20L%20238.67%20236.60%20L%20238.25%20237.22%20L%20237.77%20237.77%20L%20237.22%20238.25%20L%20236.60%20238.67%20L%20235.90%20239.03%20L%20235.10%20239.33%20L%20234.19%20239.57%20L%20233.12%20239.76%20L%20231.83%20239.89%20L%20230.13%20239.97%20L%20226.00%20240.00%20L%2014.00%20240.00%20L%209.87%20239.97%20L%208.17%20239.89%20L%206.88%20239.76%20L%205.81%20239.57%20L%204.90%20239.33%20L%204.10%20239.03%20L%203.40%20238.67%20L%202.78%20238.25%20L%202.23%20237.77%20L%201.75%20237.22%20L%201.33%20236.60%20L%200.97%20235.90%20L%200.67%20235.10%20L%200.43%20234.19%20L%200.24%20233.12%20L%200.11%20231.83%20L%200.03%20230.13%20L%200.00%20226.00%20L%200%2014.00%20L%200.03%209.87%20L%200.11%208.17%20L%200.24%206.88%20L%200.43%205.81%20L%200.67%204.90%20L%200.97%204.10%20L%201.33%203.40%20L%201.75%202.78%20L%202.23%202.23%20L%202.78%201.75%20L%203.40%201.33%20L%204.10%200.97%20L%204.90%200.67%20L%205.81%200.43%20L%206.88%200.24%20L%208.17%200.11%20L%209.87%200.03%20L%2014.00%200.00%20Z%22%20fill%3D%22%23fff%22%2F%3E%3C%2Fsvg%3E");
  --sq-lg: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20360%20360%22%3E%3Cpath%20d%3D%22M%2020.00%200%20L%20340.00%200%20L%20345.90%200.04%20L%20348.33%200.15%20L%20350.17%200.34%20L%20351.70%200.61%20L%20353.00%200.96%20L%20354.14%201.39%20L%20355.15%201.90%20L%20356.03%202.50%20L%20356.82%203.18%20L%20357.50%203.97%20L%20358.10%204.85%20L%20358.61%205.86%20L%20359.04%207.00%20L%20359.39%208.30%20L%20359.66%209.83%20L%20359.85%2011.67%20L%20359.96%2014.10%20L%20360.00%2020.00%20L%20360.00%20340.00%20L%20359.96%20345.90%20L%20359.85%20348.33%20L%20359.66%20350.17%20L%20359.39%20351.70%20L%20359.04%20353.00%20L%20358.61%20354.14%20L%20358.10%20355.15%20L%20357.50%20356.03%20L%20356.82%20356.82%20L%20356.03%20357.50%20L%20355.15%20358.10%20L%20354.14%20358.61%20L%20353.00%20359.04%20L%20351.70%20359.39%20L%20350.17%20359.66%20L%20348.33%20359.85%20L%20345.90%20359.96%20L%20340.00%20360.00%20L%2020.00%20360.00%20L%2014.10%20359.96%20L%2011.67%20359.85%20L%209.83%20359.66%20L%208.30%20359.39%20L%207.00%20359.04%20L%205.86%20358.61%20L%204.85%20358.10%20L%203.97%20357.50%20L%203.18%20356.82%20L%202.50%20356.03%20L%201.90%20355.15%20L%201.39%20354.14%20L%200.96%20353.00%20L%200.61%20351.70%20L%200.34%20350.17%20L%200.15%20348.33%20L%200.04%20345.90%20L%200.00%20340.00%20L%200%2020.00%20L%200.04%2014.10%20L%200.15%2011.67%20L%200.34%209.83%20L%200.61%208.30%20L%200.96%207.00%20L%201.39%205.86%20L%201.90%204.85%20L%202.50%203.97%20L%203.18%203.18%20L%203.97%202.50%20L%204.85%201.90%20L%205.86%201.39%20L%207.00%200.96%20L%208.30%200.61%20L%209.83%200.34%20L%2011.67%200.15%20L%2014.10%200.04%20L%2020.00%200.00%20Z%22%20fill%3D%22%23fff%22%2F%3E%3C%2Fsvg%3E");
  --sq-xl: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20400%20400%22%3E%3Cpath%20d%3D%22M%2028.00%200%20L%20372.00%200%20L%20380.27%200.05%20L%20383.67%200.21%20L%20386.24%200.48%20L%20388.38%200.86%20L%20390.20%201.34%20L%20391.80%201.94%20L%20393.21%202.66%20L%20394.45%203.49%20L%20395.55%204.45%20L%20396.51%205.55%20L%20397.34%206.79%20L%20398.06%208.20%20L%20398.66%209.80%20L%20399.14%2011.62%20L%20399.52%2013.76%20L%20399.79%2016.33%20L%20399.95%2019.73%20L%20400.00%2028.00%20L%20400.00%20372.00%20L%20399.95%20380.27%20L%20399.79%20383.67%20L%20399.52%20386.24%20L%20399.14%20388.38%20L%20398.66%20390.20%20L%20398.06%20391.80%20L%20397.34%20393.21%20L%20396.51%20394.45%20L%20395.55%20395.55%20L%20394.45%20396.51%20L%20393.21%20397.34%20L%20391.80%20398.06%20L%20390.20%20398.66%20L%20388.38%20399.14%20L%20386.24%20399.52%20L%20383.67%20399.79%20L%20380.27%20399.95%20L%20372.00%20400.00%20L%2028.00%20400.00%20L%2019.73%20399.95%20L%2016.33%20399.79%20L%2013.76%20399.52%20L%2011.62%20399.14%20L%209.80%20398.66%20L%208.20%20398.06%20L%206.79%20397.34%20L%205.55%20396.51%20L%204.45%20395.55%20L%203.49%20394.45%20L%202.66%20393.21%20L%201.94%20391.80%20L%201.34%20390.20%20L%200.86%20388.38%20L%200.48%20386.24%20L%200.21%20383.67%20L%200.05%20380.27%20L%200.00%20372.00%20L%200%2028.00%20L%200.05%2019.73%20L%200.21%2016.33%20L%200.48%2013.76%20L%200.86%2011.62%20L%201.34%209.80%20L%201.94%208.20%20L%202.66%206.79%20L%203.49%205.55%20L%204.45%204.45%20L%205.55%203.49%20L%206.79%202.66%20L%208.20%201.94%20L%209.80%201.34%20L%2011.62%200.86%20L%2013.76%200.48%20L%2016.33%200.21%20L%2019.73%200.05%20L%2028.00%200.00%20Z%22%20fill%3D%22%23fff%22%2F%3E%3C%2Fsvg%3E");
  --sq-pill: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20120%2032%22%3E%3Cpath%20d%3D%22M%2016.00%200%20L%20104.00%200%20L%20108.72%200.03%20L%20110.67%200.12%20L%20112.14%200.27%20L%20113.36%200.49%20L%20114.40%200.77%20L%20115.31%201.11%20L%20116.12%201.52%20L%20116.83%202.00%20L%20117.45%202.55%20L%20118.00%203.17%20L%20118.48%203.88%20L%20118.89%204.69%20L%20119.23%205.60%20L%20119.51%206.64%20L%20119.73%207.86%20L%20119.88%209.33%20L%20119.97%2011.28%20L%20120.00%2016.00%20L%20120.00%2016.00%20L%20119.97%2020.72%20L%20119.88%2022.67%20L%20119.73%2024.14%20L%20119.51%2025.36%20L%20119.23%2026.40%20L%20118.89%2027.31%20L%20118.48%2028.12%20L%20118.00%2028.83%20L%20117.45%2029.45%20L%20116.83%2030.00%20L%20116.12%2030.48%20L%20115.31%2030.89%20L%20114.40%2031.23%20L%20113.36%2031.51%20L%20112.14%2031.73%20L%20110.67%2031.88%20L%20108.72%2031.97%20L%20104.00%2032.00%20L%2016.00%2032.00%20L%2011.28%2031.97%20L%209.33%2031.88%20L%207.86%2031.73%20L%206.64%2031.51%20L%205.60%2031.23%20L%204.69%2030.89%20L%203.88%2030.48%20L%203.17%2030.00%20L%202.55%2029.45%20L%202.00%2028.83%20L%201.52%2028.12%20L%201.11%2027.31%20L%200.77%2026.40%20L%200.49%2025.36%20L%200.27%2024.14%20L%200.12%2022.67%20L%200.03%2020.72%20L%200.00%2016.00%20L%200%2016.00%20L%200.03%2011.28%20L%200.12%209.33%20L%200.27%207.86%20L%200.49%206.64%20L%200.77%205.60%20L%201.11%204.69%20L%201.52%203.88%20L%202.00%203.17%20L%202.55%202.55%20L%203.17%202.00%20L%203.88%201.52%20L%204.69%201.11%20L%205.60%200.77%20L%206.64%200.49%20L%207.86%200.27%20L%209.33%200.12%20L%2011.28%200.03%20L%2016.00%200.00%20Z%22%20fill%3D%22%23fff%22%2F%3E%3C%2Fsvg%3E");

  /* Layout */
  --max-width: 1080px;
  --header-height: 56px;
  --section-padding: 80px;
}

/* Dark Mode */
html[data-theme="dark"] {
  --color-bg: #000000;
  --color-bg-alt: #1c1c1e;
  --color-bg-dark: #000000;
  --color-fg: #f5f5f7;
  --color-fg-bold: #ffffff;
  --color-fg-light: #a1a1a6;
  --color-fg-muted: #6e6e73;
  --color-accent: #2997ff;
  --color-accent-hover: #5ab3ff;
  --color-accent-light: rgba(41, 151, 255, 0.12);
  --color-accent-underline: rgba(41, 151, 255, 0.3);
  --color-border: #38383a;
  --color-border-light: #2c2c2e;
  --color-surface: #1c1c1e;
  --color-surface-hover: rgba(255, 255, 255, 0.06);

  /* Glassmorphism tokens */
  --glass-bg: rgba(28, 28, 30, 0.65);
  --glass-border: rgba(255, 255, 255, 0.14);
  --glass-highlight-top: rgba(255, 255, 255, 0.09);
  --glass-highlight-bottom: rgba(255, 255, 255, 0.03);
  --glass-blur: blur(22px) saturate(180%);

  --gradient-blue: linear-gradient(135deg, #2997ff, #0066cc);
  --gradient-purple: linear-gradient(135deg, #5e5ce6, #3634a3);
  --gradient-orange: linear-gradient(135deg, #ff9f0a, #ff9500);
  --gradient-cta: linear-gradient(135deg, #2997ff 0%, #5e5ce6 100%);
  --gradient-tint-blue: rgba(41, 151, 255, 0.06);
  --gradient-tint-purple: rgba(94, 92, 230, 0.06);
  --gradient-tint-orange: rgba(255, 159, 10, 0.06);
  --gradient-tint-green: rgba(48, 209, 88, 0.06);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.6);
  --shadow-blue: 0 8px 30px rgba(41, 151, 255, 0.2);
  --shadow-purple: 0 8px 30px rgba(94, 92, 230, 0.2);
}

/* ===== 3. Links & Buttons ===== */
a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--color-accent-hover);
}

button {
  font-family: inherit;
  cursor: pointer;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border: none;
  border-radius: var(--radius-pill);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-on-accent);
  box-shadow: var(--shadow-blue);
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  color: var(--color-on-accent);
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(0, 102, 204, 0.25);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: transparent;
  color: var(--color-accent);
  border: 1.5px solid var(--color-accent);
}

.btn-secondary:hover {
  background: var(--color-accent-light);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--color-fg);
  border: 1px solid var(--color-border);
}

.btn-ghost:hover {
  background: var(--color-surface-hover);
  border-color: var(--color-fg-muted);
}

/* ===== 4. Header / Navigation ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: rgba(245, 245, 247, 0.72);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--color-border);
  transition: background 0.3s ease;
}

html[data-theme="dark"] .site-header {
  background: rgba(0, 0, 0, 0.72);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.site-logo {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-fg-bold);
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: color 0.15s;
}

.site-logo:hover {
  color: var(--color-accent);
}

.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}

.nav-link {
  color: var(--color-fg-light);
  font-size: 0.93rem;
  font-weight: 500;
  padding: 4px 0;
  position: relative;
  transition: color 0.15s;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  border-radius: 1px;
  transition: width 0.25s ease;
}

.nav-link:hover {
  color: var(--color-fg-bold);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link.active {
  color: var(--color-fg-bold);
  font-weight: 600;
}

.header-spacer {
  flex: 1;
}

.theme-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--color-fg-light);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px 6px 9px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease,
    transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.theme-toggle:hover {
  color: var(--color-fg-bold);
  border-color: var(--color-accent);
  background: var(--color-accent-light);
}

/* iOS 按压反馈：弹性回缩 */
.theme-toggle:active {
  transform: scale(0.9);
}

/* iOS 太阳/月亮切换动效（图标放大版） */
.theme-icon {
  position: relative;
  width: 20px;
  height: 20px;
  display: inline-block;
  flex-shrink: 0;
}

.theme-icon svg {
  position: absolute;
  inset: 0;
  width: 20px;
  height: 20px;
  transition: transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

.icon-sun {
  color: #ff9f0a;
}

.icon-moon {
  color: #a5a5ff;
  opacity: 0;
  transform: rotate(-150deg) scale(0.3);
}

/* 深色主题：太阳旋出、月亮旋入（由 head 的 data-theme 直接驱动，无需 JS） */
html[data-theme="dark"] .theme-icon .icon-sun {
  opacity: 0;
  transform: rotate(150deg) scale(0.3);
}

html[data-theme="dark"] .theme-icon .icon-moon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.hamburger {
  display: none;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  width: 40px;
  height: 40px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
}

.hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 1px;
  background: var(--color-fg);
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.hamburger.open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.mobile-menu {
  display: none;
  flex-direction: column;
  background: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border);
  padding: 12px 24px 20px;
  gap: 2px;
}

.mobile-menu.open {
  display: flex;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.mobile-menu a {
  color: var(--color-fg-light);
  font-size: 1rem;
  font-weight: 500;
  padding: 12px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
}

.mobile-menu a:hover,
.mobile-menu a.active {
  color: var(--color-accent);
  background: var(--color-accent-light);
}

/* ===== 5. Hero Section ===== */
.hero {
  position: relative;
  padding: 100px 24px 60px;
  text-align: center;
  overflow: hidden;
  background: transparent;
}

/* Interactive wave background（整页俯视涟漪，固定铺满视口） */
#wave-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  display: block;
  z-index: -1;
  pointer-events: none;
}

/* Shared wave banner (used on all sub-pages) */
.wave-banner {
  position: relative;
  overflow: hidden;
  padding: 56px 16px 48px;
  margin-bottom: 8px;
  background: transparent;
}
.wave-banner > * {
  position: relative;
  z-index: 1;
}
.wave-banner .section-head {
  margin-bottom: 0;
}

/* chat page banner: slimmer padding, header flush */
.chat-banner {
  padding: 28px 16px 8px;
  margin-bottom: 0;
}
.chat-banner > .chat-header {
  margin-bottom: 0;
}

html[data-theme="dark"] .wave-banner {
  background: transparent;
}

/* Decorative gradient orbs */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
  pointer-events: none;
  animation: float 8s ease-in-out infinite;
  will-change: transform;
}

.orb-blue {
  width: 400px;
  height: 400px;
  top: -80px;
  left: -60px;
  background: radial-gradient(circle, rgba(0, 102, 204, 0.35), transparent 70%);
}

.orb-purple {
  width: 350px;
  height: 350px;
  top: 40px;
  right: -50px;
  background: radial-gradient(circle, rgba(88, 86, 214, 0.30), transparent 70%);
  animation-delay: 2s;
}

.orb-orange {
  width: 300px;
  height: 300px;
  bottom: -60px;
  left: 30%;
  background: radial-gradient(circle, rgba(255, 149, 0, 0.20), transparent 70%);
  animation-delay: 4s;
}

html[data-theme="dark"] .orb-blue {
  background: radial-gradient(circle, rgba(41, 151, 255, 0.25), transparent 70%);
}

html[data-theme="dark"] .orb-purple {
  background: radial-gradient(circle, rgba(94, 92, 230, 0.25), transparent 70%);
}

html[data-theme="dark"] .orb-orange {
  background: radial-gradient(circle, rgba(255, 159, 10, 0.15), transparent 70%);
}

html[data-theme="dark"] .hero {
  background: transparent;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(20px, -30px); }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
}

.hero-eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  background: var(--color-accent-light);
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 800;
  color: var(--color-fg-bold);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--color-fg-light);
  line-height: 1.6;
  margin-bottom: 36px;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.scroll-hint {
  position: relative;
  margin-top: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--color-fg-muted);
  font-size: 0.78rem;
  font-family: var(--font-mono);
}

.scroll-hint .mouse {
  width: 24px;
  height: 38px;
  border: 2px solid var(--color-fg-muted);
  border-radius: 12px;
  position: relative;
}

.scroll-hint .mouse::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  border-radius: 2px;
  background: var(--color-fg-muted);
  animation: scrollDot 1.8s ease-in-out infinite;
  will-change: transform;
}

@keyframes scrollDot {
  0%, 100% { opacity: 0; transform: translateX(-50%) translateY(0); }
  40% { opacity: 1; }
  80% { opacity: 0; transform: translateX(-50%) translateY(10px); }
}

/* ===== 6. Stats Bar ===== */
.stats-bar {
  background: transparent;
  padding: 48px 24px;
  border-bottom: 1px solid var(--color-border);
}

.stats-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  color: var(--color-accent);
  letter-spacing: -0.02em;
  line-height: 1;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--color-fg-light);
  margin-top: 8px;
  font-weight: 500;
}

/* ===== 7. Keyword Ticker ===== */
.keyword-ticker {
  background: var(--color-bg-dark);
  padding: 18px 0;
  overflow: hidden;
  position: relative;
}

html[data-theme="dark"] .keyword-ticker {
  background: #111;
}

.keyword-ticker::before,
.keyword-ticker::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}

.keyword-ticker::before {
  left: 0;
  background: linear-gradient(to right, var(--color-bg-dark), transparent);
}

.keyword-ticker::after {
  right: 0;
  background: linear-gradient(to left, var(--color-bg-dark), transparent);
}

html[data-theme="dark"] .keyword-ticker::before {
  background: linear-gradient(to right, #111, transparent);
}

html[data-theme="dark"] .keyword-ticker::after {
  background: linear-gradient(to left, #111, transparent);
}

.ticker-track {
  display: flex;
  gap: 48px;
  animation: marquee 30s linear infinite;
  will-change: transform;
  white-space: nowrap;
  width: max-content;
}

.ticker-track:hover {
  animation-play-state: paused;
}

.ticker-item {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 48px;
}

.ticker-item::after {
  content: '◆';
  color: var(--color-accent);
  font-size: 0.6rem;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ===== 8. Section Common ===== */
.section {
  padding: var(--section-padding) 24px;
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-alt {
  background: transparent;
}

.section-dark {
  background: rgba(0,0,0,0.5);
  color: #f5f5f7;
}

html[data-theme="dark"] .section-dark {
  background: #111;
}

.section-head {
  text-align: center;
  margin-bottom: 56px;
}

.section-kicker {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 10px;
}

.section-dark .section-kicker {
  color: #5ab3ff;
}

.section-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  color: var(--color-fg-bold);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.section-dark .section-title {
  color: #f5f5f7;
}

.section-sub {
  font-size: 1rem;
  color: var(--color-fg-light);
  margin-top: 12px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.section-dark .section-sub {
  color: rgba(255, 255, 255, 0.6);
}

/* ===== 9. In-page Nav Anchors ===== */
.section-nav {
  padding: 24px;
  background: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: var(--header-height);
  z-index: 50;
}

.section-nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.section-nav a {
  padding: 8px 20px;
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--color-fg-light);
  background: transparent;
  border: 1px solid var(--color-border);
  transition: all 0.2s;
}

.section-nav a:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
  background: var(--color-accent-light);
}

/* ===== 10. About Section ===== */
.about-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.about-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.about-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.about-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-fg-bold);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.about-card h3 .icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--color-accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.about-card p {
  font-size: 0.95rem;
  color: var(--color-fg-light);
  line-height: 1.7;
}

.about-card .tag {
  display: inline-block;
  margin-top: 16px;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-family: var(--font-mono);
  color: var(--color-accent);
  background: var(--color-accent-light);
}

/* ===== 11. Quote Section ===== */
.quote-section {
  text-align: center;
  padding: 100px 24px;
}

.quote-text {
  font-size: clamp(1.4rem, 3.5vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.5;
  max-width: 800px;
  margin: 0 auto;
  color: #f5f5f7;
}

.quote-open,
.quote-close {
  font-size: 1.3em;
  font-weight: 800;
  color: var(--color-accent);
  line-height: 0;
  position: relative;
  top: 0.12em;
}

html[data-theme="dark"] .quote-open,
html[data-theme="dark"] .quote-close {
  color: #5ab3ff;
}

/* ===== 12. Skills Bento Grid ===== */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 960px;
  margin: 0 auto;
}

.bento-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bento-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.bento-card.tint-blue {
  background: linear-gradient(180deg, var(--gradient-tint-blue), var(--color-surface));
}

.bento-card.tint-purple {
  background: linear-gradient(180deg, var(--gradient-tint-purple), var(--color-surface));
}

.bento-card.tint-orange {
  background: linear-gradient(180deg, var(--gradient-tint-orange), var(--color-surface));
}

.bento-card.tint-green {
  background: linear-gradient(180deg, var(--gradient-tint-green), var(--color-surface));
}

.bento-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-fg-bold);
}

.bento-card p {
  font-size: 0.92rem;
  color: var(--color-fg-light);
  line-height: 1.65;
}

.bento-card .skill-icons {
  display: flex;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
  flex-wrap: wrap;
}

.bento-card .skill-icons span {
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 500;
  background: var(--color-surface-hover);
  color: var(--color-fg-light);
}

.bento-right {
  display: flex;
  flex-direction: column;
  gap: 20px;
  grid-column: span 2;
}

.bento-right .bento-card {
  flex: 1;
}

/* Responsive: bento grid collapses to single column */
@media (max-width: 900px) {
  .bento-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== 13. Awards Section ===== */
.awards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.award-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}

.award-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  color: inherit;
}

.award-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.78rem;
  margin-bottom: 14px;
}

.badge-gold {
  background: linear-gradient(135deg, rgba(255, 149, 0, 0.12), rgba(255, 204, 0, 0.08));
  color: #b8860b;
}

.badge-blue {
  background: linear-gradient(135deg, rgba(0, 102, 204, 0.12), rgba(88, 86, 214, 0.08));
  color: var(--color-accent);
}

.badge-purple {
  background: linear-gradient(135deg, rgba(88, 86, 214, 0.12), rgba(175, 82, 222, 0.08));
  color: #5856d6;
}

.badge-bronze {
  background: linear-gradient(135deg, rgba(180, 83, 9, 0.12), rgba(217, 119, 6, 0.08));
  color: #b45309;
}

html[data-theme="dark"] .badge-gold { color: #ffcc00; }
html[data-theme="dark"] .badge-blue { color: #5ab3ff; }
html[data-theme="dark"] .badge-purple { color: #a5a5ff; }
html[data-theme="dark"] .badge-bronze { color: #d97706; }

.award-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-fg-bold);
  margin-bottom: 8px;
  line-height: 1.4;
}

.award-card .award-meta {
  font-size: 0.82rem;
  color: var(--color-fg-muted);
  font-family: var(--font-mono);
  margin-bottom: 12px;
}

.award-card .award-summary {
  font-size: 0.9rem;
  color: var(--color-fg-light);
  line-height: 1.6;
}

.award-card .award-arrow {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-accent);
  transition: gap 0.2s;
}

.award-card:hover .award-arrow {
  gap: 8px;
}

/* ===== 14. Experience Section ===== */
.exp-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.exp-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}

.exp-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  color: inherit;
}

.exp-card.shadow-blue {
  box-shadow: var(--shadow-sm), 0 4px 20px rgba(0, 102, 204, 0.06);
}

.exp-card.shadow-purple {
  box-shadow: var(--shadow-sm), 0 4px 20px rgba(88, 86, 214, 0.06);
}

.exp-card.shadow-blue:hover {
  box-shadow: var(--shadow-lg), 0 8px 30px rgba(0, 102, 204, 0.12);
}

.exp-card.shadow-purple:hover {
  box-shadow: var(--shadow-lg), 0 8px 30px rgba(88, 86, 214, 0.12);
}

.exp-card .exp-time {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--color-fg-muted);
  margin-bottom: 10px;
}

.exp-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-fg-bold);
  margin-bottom: 10px;
}

.exp-card p {
  font-size: 0.9rem;
  color: var(--color-fg-light);
  line-height: 1.6;
}

.exp-card .exp-arrow {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-accent);
  transition: gap 0.2s;
}

.exp-card:hover .exp-arrow {
  gap: 8px;
}

/* ===== 15. CTA Section ===== */
.cta-section {
  padding: 80px 24px;
  text-align: center;
  background: var(--gradient-cta);
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15), transparent 70%);
  pointer-events: none;
}

.cta-section::after {
  content: '';
  position: absolute;
  bottom: -40%;
  right: -10%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.10), transparent 70%);
  pointer-events: none;
}

.cta-content {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
}

.cta-title {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.cta-sub {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 32px;
}

.cta-section .btn-primary {
  background: #ffffff;
  color: var(--color-accent);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.cta-section .btn-primary:hover {
  background: #f5f5f7;
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

/* ===== 16. Footer ===== */
.site-footer {
  background: rgba(0,0,0,0.5);
  color: rgba(255, 255, 255, 0.6);
  padding: 60px 24px 32px;
  margin-top: auto;
}

html[data-theme="dark"] .site-footer {
  background: rgba(0,0,0,0.5);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 48px;
}

.footer-brand .logo {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.1rem;
  color: #f5f5f7;
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 0.88rem;
  line-height: 1.6;
  max-width: 320px;
}

.footer-col h4 {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #f5f5f7;
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  transition: color 0.15s;
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-copy {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.4);
}

.footer-social {
  display: flex;
  gap: 16px;
}

.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.footer-social a:hover {
  background: var(--color-accent);
  transform: translateY(-2px);
}

/* ===== 17. Detail Page ===== */
.page-main {
  max-width: 820px;
  margin: 0 auto;
  padding: 48px 24px;
  width: 100%;
  flex: 1;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-fg-light);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 24px;
  transition: color 0.15s;
}

.back-link:hover {
  color: var(--color-accent);
}

/* ===== 17. Detail Page ===== */
.detail-hero {
  background: linear-gradient(180deg, var(--color-surface) 0%, var(--gradient-tint-blue) 100%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 40px 36px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.detail-hero:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.detail-hero.tint-gold {
  background: linear-gradient(180deg, var(--color-surface) 0%, rgba(255, 149, 0, 0.04) 100%);
}

.detail-hero.tint-silver {
  background: linear-gradient(180deg, var(--color-surface) 0%, var(--gradient-tint-purple) 100%);
}

.detail-hero.tint-bronze {
  background: linear-gradient(180deg, var(--color-surface) 0%, rgba(180, 83, 9, 0.04) 100%);
}

.detail-hero-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.detail-hero-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--gradient-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.detail-hero.tint-gold .detail-hero-icon {
  background: linear-gradient(135deg, #ff9500, #ffcc00);
}

.detail-hero.tint-silver .detail-hero-icon {
  background: linear-gradient(135deg, #5856d6, #3634a3);
}

.detail-hero.tint-bronze .detail-hero-icon {
  background: linear-gradient(135deg, #b45309, #d97706);
}

.detail-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 48px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.78rem;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 0;
}

.detail-badge.award-gold {
  background: linear-gradient(135deg, rgba(255, 149, 0, 0.12), rgba(255, 204, 0, 0.08));
  color: #b8860b;
}

.detail-badge.award-silver {
  background: linear-gradient(135deg, rgba(0, 102, 204, 0.12), rgba(88, 86, 214, 0.08));
  color: var(--color-accent);
}

.detail-badge.award-bronze {
  background: linear-gradient(135deg, rgba(180, 83, 9, 0.12), rgba(217, 119, 6, 0.08));
  color: #b45309;
}

.detail-badge.exp {
  background: linear-gradient(135deg, rgba(0, 102, 204, 0.12), rgba(88, 86, 214, 0.08));
  color: var(--color-accent);
}

html[data-theme="dark"] .detail-badge.award-gold { color: #ffcc00; }
html[data-theme="dark"] .detail-badge.award-silver { color: #5ab3ff; }
html[data-theme="dark"] .detail-badge.award-bronze { color: #d97706; }
html[data-theme="dark"] .detail-badge.exp { color: #5ab3ff; }

.detail-title {
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 800;
  color: var(--color-fg-bold);
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-top: 16px;
}

.detail-meta {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--color-fg-muted);
  margin-top: 12px;
}

.detail-summary {
  font-size: 1.05rem;
  color: var(--color-fg);
  margin-top: 20px;
  line-height: 1.8;
}

.detail-section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px 30px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.detail-section:hover {
  box-shadow: var(--shadow-md);
}

.detail-section h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-fg-bold);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.detail-section h2::before {
  content: '';
  width: 4px;
  height: 22px;
  border-radius: 2px;
  background: var(--color-accent);
}

.detail-section ul {
  list-style: none;
  padding: 0;
}

.detail-section li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 14px;
  font-size: 0.96rem;
  color: var(--color-fg);
  line-height: 1.7;
}

.detail-section li::before {
  content: '\25B8';
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-size: 0.95rem;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-tag {
  background: var(--color-accent-light);
  color: var(--color-accent);
  padding: 5px 15px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid var(--color-accent-underline);
  transition: all 0.15s;
}

.skill-tag:hover {
  background: var(--color-accent);
  color: var(--color-on-accent);
}

.takeaway-box {
  border-left: 4px solid #ff9500;
  padding: 18px 20px;
  margin-top: 24px;
  background: linear-gradient(90deg, rgba(255, 149, 0, 0.08), transparent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  position: relative;
}

.takeaway-box strong {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #b8860b;
  font-size: 0.85rem;
  font-family: var(--font-mono);
  font-weight: 700;
}

.takeaway-box strong::before {
  content: '✦';
  font-size: 1rem;
}

html[data-theme="dark"] .takeaway-box strong {
  color: #ffcc00;
}

.takeaway-box p {
  font-size: 0.95rem;
  color: var(--color-fg);
  margin-top: 8px;
  line-height: 1.75;
}

/* Detail navigation & CTA */
.detail-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
}

.detail-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-fg-light);
  border: 1px solid var(--color-border);
  transition: all 0.2s;
}

.detail-nav-link:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
  background: var(--color-accent-light);
  gap: 10px;
}

.detail-nav-link.next {
  margin-left: auto;
}

.detail-cta {
  background: linear-gradient(135deg, var(--gradient-tint-blue), var(--gradient-tint-purple));
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  margin-top: 32px;
}

.detail-cta h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-fg-bold);
  margin-bottom: 8px;
}

.detail-cta p {
  font-size: 0.94rem;
  color: var(--color-fg-light);
  margin-bottom: 20px;
}

.detail-related {
  margin-top: 32px;
}

.detail-related h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-fg-bold);
  margin-bottom: 16px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.related-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}

.related-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  color: inherit;
}

.related-card .related-label {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--color-fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.related-card .related-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--color-fg-bold);
  line-height: 1.4;
}

/* ===== 18. Contact Page ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 40px;
  max-width: 900px;
  margin: 0 auto;
}

.contact-info-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
}

.contact-info-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-fg-bold);
  margin-bottom: 20px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--color-border-light);
}

.contact-item:last-child {
  border-bottom: none;
}

.contact-item .icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--color-accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-item .label {
  font-size: 0.78rem;
  color: var(--color-fg-muted);
  font-family: var(--font-mono);
}

.contact-item .value {
  font-size: 0.95rem;
  color: var(--color-fg-bold);
  font-weight: 500;
  word-break: break-all;
}

.contact-form-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow-sm);
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-fg-bold);
  margin-bottom: 8px;
}

.form-group label .required {
  color: #ff3b30;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  color: var(--color-fg);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-light);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--color-fg-muted);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-error {
  display: none;
  color: #ff3b30;
  font-size: 0.82rem;
  margin-top: 6px;
}

.form-error.show {
  display: block;
  animation: shake 0.3s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.form-success {
  display: none;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  background: rgba(48, 209, 88, 0.1);
  border: 1px solid rgba(48, 209, 88, 0.3);
  color: #248a3d;
  font-size: 0.92rem;
  margin-bottom: 20px;
  text-align: center;
}

html[data-theme="dark"] .form-success {
  color: #30d158;
}

.form-success.show {
  display: block;
  animation: fadeInUp 0.4s ease;
}

.form-fail {
  display: none;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  background: rgba(255, 59, 48, 0.1);
  border: 1px solid rgba(255, 59, 48, 0.3);
  color: #d70015;
  font-size: 0.92rem;
  margin-bottom: 20px;
  text-align: center;
}

html[data-theme="dark"] .form-fail {
  color: #ff453a;
}

.form-fail.show {
  display: block;
  animation: fadeInUp 0.4s ease;
}

.form-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.6;
}

.form-loading .btn-primary {
  position: relative;
  color: transparent;
}

.form-loading .btn-primary::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  will-change: transform;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== 19. Other Page ===== */
.placeholder-card {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 56px 40px;
  box-shadow: var(--shadow-md);
}

.placeholder-card .big {
  font-size: 3rem;
  margin-bottom: 16px;
}

.placeholder-card h2 {
  font-size: 1.3rem;
  color: var(--color-fg-bold);
  margin-bottom: 10px;
}

.placeholder-card p {
  font-size: 0.94rem;
  color: var(--color-fg-light);
  line-height: 1.6;
}

/* ===== 20. AI Assistant Page ===== */
.chat-page {
  max-width: 860px;
  margin: 0 auto;
  padding: 40px 24px 24px;
  width: 100%;
  height: calc(100vh - var(--header-height));
  height: calc(100dvh - var(--header-height));
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.chat-header {
  text-align: center;
  margin-bottom: 28px;
}

.chat-kicker {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 8px;
}

.chat-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--color-fg-bold);
  letter-spacing: -0.01em;
}

.chat-sub {
  font-size: 0.92rem;
  color: var(--color-fg-light);
  margin-top: 6px;
}

.chat-window {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.chat-window-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--color-border);
}

.chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-cta);
  font-family: var(--font-mono);
  font-weight: 800;
  color: #fff;
  font-size: 1rem;
}

.chat-window-name {
  font-weight: 700;
  color: var(--color-fg-bold);
  font-size: 0.98rem;
}

.chat-window-status {
  font-size: 0.78rem;
  color: var(--color-fg-light);
  display: flex;
  align-items: center;
  gap: 6px;
}

.chat-window-status::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-fg-muted);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.chat-window-status.connecting::before {
  background: #ff9500;
  box-shadow: 0 0 6px #ff9500;
  animation: pulse 1.2s infinite;
  will-change: opacity;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.chat-window-status.online::before {
  background: #30d158;
  box-shadow: 0 0 6px #30d158;
}

.chat-window-status.offline::before {
  background: var(--color-fg-muted);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  scrollbar-width: none;
}

.chat-messages::-webkit-scrollbar {
  display: none;
}

.msg {
  display: flex;
  gap: 12px;
  max-width: 85%;
  animation: fadeInUp 0.3s ease;
}

.msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.78rem;
}

.msg.bot .msg-avatar {
  background: var(--color-accent-light);
  color: var(--color-accent);
}

.msg.user .msg-avatar {
  background: rgba(255, 149, 0, 0.12);
  color: #ff9500;
}

.msg-bubble {
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 0.94rem;
  line-height: 1.65;
}

.msg.bot .msg-bubble {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-top-left-radius: 4px;
}

.msg.user {
  flex-direction: row-reverse;
  margin-left: auto;
}

.msg.user .msg-bubble {
  background: var(--gradient-cta);
  color: #fff;
  border: none;
  border-top-right-radius: 4px;
  box-shadow: 0 4px 14px rgba(0, 102, 204, 0.25);
}

.msg-time {
  font-size: 0.72rem;
  color: var(--color-fg-muted);
  margin-top: 4px;
  font-family: var(--font-mono);
}

.msg.user .msg-time {
  text-align: right;
}

.typing {
  display: flex;
  gap: 5px;
  padding: 4px 2px;
}

.typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-fg-light);
  animation: blink 1.2s infinite;
  will-change: opacity;
}

.typing span:nth-child(2) { animation-delay: 0.2s; }
.typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes blink {
  0%, 80%, 100% { opacity: 0.3; }
  40% { opacity: 1; }
}

.chat-input {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  padding: 16px 20px 18px;
  border-top: 1px solid var(--color-border);
}

.chat-input textarea {
  flex: 1;
  resize: none;
  min-height: 44px;
  max-height: 140px;
  background: var(--color-bg);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 11px 16px;
  color: var(--color-fg);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.chat-input textarea::placeholder {
  color: var(--color-fg-muted);
}

.chat-input textarea:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-light);
}

.chat-send {
  flex-shrink: 0;
  height: 44px;
  padding: 0 22px;
  background: var(--color-accent);
  color: var(--color-on-accent);
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}

.chat-send:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
}

.chat-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.chat-hint {
  margin-top: 16px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--color-fg-muted);
}

.chat-hint button {
  background: none;
  border: none;
  color: var(--color-accent);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 0 4px;
  transition: text-decoration 0.15s;
}

.chat-hint button:hover {
  text-decoration: underline;
}

/* ===== 21. Scroll Animations ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== 22. Skip Link (Accessibility) ===== */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--color-accent);
  color: #fff;
  padding: 8px 16px;
  z-index: 200;
  border-radius: 0 0 var(--radius-sm) 0;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
}

/* ===== 23. Focus Styles (Accessibility) ===== */
*:focus-visible {
  outline: 2.5px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ===== 24. Responsive ===== */
@media (max-width: 900px) {
  :root {
    --section-padding: 64px;
  }

  .about-grid,
  .bento-grid,
  .awards-grid,
  .exp-grid {
    grid-template-columns: 1fr;
  }

  .bento-right {
    flex-direction: row;
  }

  .bento-right .bento-card {
    flex: 1;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --section-padding: 48px;
    --header-height: 52px;
  }

  .nav-links {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .site-logo {
    margin-right: auto;
  }

  .hero {
    padding: 64px 20px 60px;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
  }

  .hero-actions .btn {
    justify-content: center;
    width: 100%;
  }

  .scroll-hint {
    display: none;
  }

  .stats-inner {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px 16px;
    max-width: 420px;
    margin: 0 auto;
  }

  .stat-item {
    min-width: auto;
  }

  .stat-number {
    font-size: clamp(1.8rem, 9vw, 2.4rem);
  }

  .stat-label {
    font-size: 0.78rem;
  }

  .section-nav {
    position: static;
  }

  .section-nav-inner {
    overflow-x: auto;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .section-nav-inner::-webkit-scrollbar {
    display: none;
  }

  .bento-right {
    flex-direction: column;
  }

  .detail-hero {
    padding: 28px 22px;
  }

  .detail-hero-header {
    flex-direction: column;
    gap: 12px;
  }

  .detail-hero-icon {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }

  .detail-section {
    padding: 22px 20px;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }

  .detail-nav {
    flex-direction: column;
    align-items: stretch;
  }

  .detail-nav-link.next {
    margin-left: 0;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .chat-page {
    padding: 16px;
    height: calc(100vh - var(--header-height));
    height: calc(100dvh - var(--header-height));
  }

  .chat-header {
    margin-bottom: 16px;
  }

  .chat-kicker {
    font-size: 0.7rem;
    margin-bottom: 6px;
  }

  .chat-title {
    font-size: 1.25rem;
  }

  .chat-sub {
    font-size: 0.85rem;
    margin-top: 4px;
  }

  .chat-window {
    flex: 1;
    min-height: 0;
    max-height: none;
    border-radius: var(--radius-lg);
  }

  .chat-window-head {
    padding: 12px 16px;
  }

  .chat-messages {
    padding: 16px;
  }

  .chat-input {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px 16px 14px;
  }

  .chat-input textarea {
    min-height: 48px;
    max-height: 120px;
  }

  .chat-send {
    width: 100%;
    height: 40px;
  }

  .chat-hint {
    margin-top: 12px;
    font-size: 0.78rem;
    line-height: 1.6;
  }

  .chat-hint button {
    font-size: 0.78rem;
    padding: 0 3px;
  }

  .msg {
    max-width: 92%;
  }

  .msg-bubble {
    font-size: 0.92rem;
  }

  .contact-form-card {
    padding: 24px 20px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.75rem;
  }

  .hero-subtitle {
    font-size: 0.95rem;
  }

  .stats-inner {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px 16px;
    justify-items: center;
  }

  .stat-number {
    font-size: clamp(2rem, 9vw, 2.75rem);
  }

  .stat-label {
    font-size: 0.8rem;
  }

  .quote-text {
    font-size: 1.3rem;
  }

  .award-card,
  .exp-card {
    padding: 22px 20px;
  }

  .cta-section {
    padding: 56px 20px;
  }
}

/* ===== 25. Print Styles ===== */
@media print {
  .site-header,
  .section-nav,
  .scroll-hint,
  .keyword-ticker,
  .cta-section,
  .hamburger,
  .mobile-menu,
  .theme-toggle,
  .site-footer {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .orb {
    display: none;
  }
}

/* ===== 26. Glassmorphism — Shared Card Treatment ===== */
.about-card,
.bento-card,
.award-card,
.exp-card,
.detail-hero,
.detail-section,
.related-card,
.contact-info-card,
.contact-form-card,
.placeholder-card,
.chat-window {
  background:
    linear-gradient(180deg, var(--glass-highlight-top), var(--glass-highlight-bottom) 45%, transparent 62%),
    var(--glass-bg);
  border-color: var(--glass-border);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}

/* 聊天窗口是常驻滚动区域：用更实的玻璃底，保证长文本可读性 */
.chat-window {
  background:
    linear-gradient(180deg, var(--glass-highlight-top), var(--glass-highlight-bottom) 45%, transparent 62%),
    var(--glass-bg);
}

/* tint 渐变卡片：渐变终点接入玻璃底色，与全站玻璃语言统一 */
.bento-card.tint-blue {
  background: linear-gradient(180deg, var(--gradient-tint-blue) 0%, var(--glass-bg) 100%);
}
.bento-card.tint-purple {
  background: linear-gradient(180deg, var(--gradient-tint-purple) 0%, var(--glass-bg) 100%);
}
.bento-card.tint-orange {
  background: linear-gradient(180deg, var(--gradient-tint-orange) 0%, var(--glass-bg) 100%);
}
.bento-card.tint-green {
  background: linear-gradient(180deg, var(--gradient-tint-green) 0%, var(--glass-bg) 100%);
}
.detail-hero.tint-gold {
  background: linear-gradient(180deg, var(--glass-bg) 0%, rgba(255, 149, 0, 0.05) 100%);
}
.detail-hero.tint-silver {
  background: linear-gradient(180deg, var(--glass-bg) 0%, var(--gradient-tint-purple) 100%);
}
.detail-hero.tint-bronze {
  background: linear-gradient(180deg, var(--glass-bg) 0%, rgba(180, 83, 9, 0.05) 100%);
}

/* 不支持 backdrop-filter 的浏览器：回退到实底卡片，保证可读性 */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .about-card,
  .bento-card,
  .award-card,
  .exp-card,
  .detail-hero,
  .detail-section,
  .related-card,
  .contact-info-card,
  .contact-form-card,
  .placeholder-card,
  .chat-window {
    background: var(--color-surface);
    border-color: var(--color-border);
  }
}

/* ===== 26b. Glassmorphism — Small Elements (chips, badges, inputs, nav, buttons) ===== */
.mobile-menu,
.section-nav,
.award-badge,
.badge-gold,
.badge-blue,
.badge-purple,
.badge-bronze,
.detail-badge.award-gold,
.detail-badge.award-silver,
.detail-badge.award-bronze,
.detail-badge.exp,
.skill-tag,
.takeaway-box,
.detail-nav-link,
.detail-cta,
.msg.bot .msg-bubble,
.chat-input textarea,
.form-input,
.form-textarea,
.theme-toggle,
.hamburger,
.btn-secondary,
.btn-ghost,
.contact-item .icon {
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}

/* 实底 → 强玻璃底（菜单/导航/气泡/输入框需要更高可读性） */
.mobile-menu,
.section-nav,
.msg.bot .msg-bubble,
.chat-input textarea,
.form-input,
.form-textarea {
  background: var(--glass-bg);
}

/* 透明底 → 玻璃底（小控件） */
.theme-toggle,
.hamburger,
.btn-secondary,
.btn-ghost,
.detail-nav-link {
  background: var(--glass-bg);
}

/* 边框统一为玻璃边（accent 描边按钮 btn-secondary 保留蓝色描边） */
.mobile-menu,
.section-nav,
.msg.bot .msg-bubble,
.chat-input textarea,
.form-input,
.form-textarea,
.theme-toggle,
.hamburger,
.btn-ghost,
.detail-nav-link {
  border-color: var(--glass-border);
}

/* 不支持 backdrop-filter 时回退到原来的实底 */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .mobile-menu,
  .section-nav,
  .msg.bot .msg-bubble,
  .chat-input textarea,
  .form-input,
  .form-textarea {
    background: var(--color-bg-alt);
  }
  .chat-input textarea,
  .form-input,
  .form-textarea {
    background: var(--color-bg);
  }
  .theme-toggle,
  .hamburger,
  .btn-secondary,
  .btn-ghost,
  .detail-nav-link {
    background: transparent;
  }
}

/* ===== 27. Language Toggle (中/EN) ===== */
.lang-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 2px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  flex-shrink: 0;
}

.lang-toggle button {
  position: relative;
  z-index: 2;
  width: 42px;
  height: 26px;
  border: none;
  background: transparent;
  color: var(--color-fg-light);
  font-size: 0.78rem;
  font-weight: 700;
  font-family: var(--font-mono);
  cursor: pointer;
  border-radius: var(--radius-pill);
  transition: color 0.25s ease;
  padding: 0;
}

.lang-toggle button[aria-pressed="true"] {
  color: #fff;
}

.lang-slider {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 42px;
  height: 26px;
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  box-shadow: 0 2px 10px rgba(0, 102, 204, 0.35);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

.lang-toggle[data-lang="en"] .lang-slider {
  transform: translateX(42px);
}

/* 语言切换：正文淡入淡出 */
main,
footer,
.chat-page {
  transition: opacity 0.22s ease, transform 0.22s ease;
}

body.i18n-fade-out main,
body.i18n-fade-out footer,
body.i18n-fade-out .chat-page {
  opacity: 0;
  transform: translateY(6px);
}

/* 移动端紧凑 */
@media (max-width: 768px) {
  .header-inner {
    gap: 10px;
  }
  .lang-toggle {
    height: 30px;
  }
  .lang-toggle button {
    width: 36px;
    height: 24px;
  }
  .lang-slider {
    width: 36px;
    height: 24px;
  }
  .lang-toggle[data-lang="en"] .lang-slider {
    transform: translateX(36px);
  }
  .theme-toggle {
    padding: 6px 8px;
  }
  .theme-toggle .theme-label {
    display: none;
  }
}


/* ===== 28. Apple 连续曲率圆角（Squircle） =====
   说明：Apple 圆角是平滑连续过渡的超椭圆曲线（n≈4），不是普通四分之一圆弧。
   实现：5 层 mask —— 四角固定尺寸的 squircle 角（角半径精确、不随元素尺寸变形）
         + 中心白色矩形（calc 拉伸，无角所以无变形）。Chrome/Safari/Firefox 均支持。
   - 渐进增强：@supports 检测原生 corner-shape（Chrome/Edge 129+）时改用原生
   - 兜底：不支持 mask 的旧浏览器保留普通 border-radius
   注意：胶囊元素（--radius-pill）保持圆形端部，不套 mask。 */

/* —— 大容器（28px） —— */
.chat-window,
.placeholder-card,
.detail-hero {
  border-radius: var(--radius-xl);
  -webkit-mask-image: var(--sqc-xl-tl), var(--sqc-xl-tr), var(--sqc-xl-br), var(--sqc-xl-bl), var(--sqc-center);
  mask-image: var(--sqc-xl-tl), var(--sqc-xl-tr), var(--sqc-xl-br), var(--sqc-xl-bl), var(--sqc-center);
  -webkit-mask-size: 28px 28px, 28px 28px, 28px 28px, 28px 28px, calc(100% - 56px) calc(100% - 56px);
  mask-size: 28px 28px, 28px 28px, 28px 28px, 28px 28px, calc(100% - 56px) calc(100% - 56px);
  -webkit-mask-position: 0 0, 100% 0, 100% 100%, 0 100%, 28px 28px;
  mask-position: 0 0, 100% 0, 100% 100%, 0 100%, 28px 28px;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

/* —— 卡片 / 面板（20px） —— */
.about-card,
.bento-card,
.award-card,
.exp-card,
.detail-section,
.detail-cta,
.contact-info-card,
.contact-form-card {
  -webkit-mask-image: var(--sqc-lg-tl), var(--sqc-lg-tr), var(--sqc-lg-br), var(--sqc-lg-bl), var(--sqc-center);
  mask-image: var(--sqc-lg-tl), var(--sqc-lg-tr), var(--sqc-lg-br), var(--sqc-lg-bl), var(--sqc-center);
  -webkit-mask-size: 20px 20px, 20px 20px, 20px 20px, 20px 20px, calc(100% - 40px) calc(100% - 40px);
  mask-size: 20px 20px, 20px 20px, 20px 20px, 20px 20px, calc(100% - 40px) calc(100% - 40px);
  -webkit-mask-position: 0 0, 100% 0, 100% 100%, 0 100%, 20px 20px;
  mask-position: 0 0, 100% 0, 100% 100%, 0 100%, 20px 20px;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

/* —— 输入框 / 小面板 / 消息气泡（14px） —— */
.detail-hero-icon,
.related-card,
.form-input,
.form-textarea,
.chat-input textarea,
.chat-send,
.msg-bubble,
.scroll-hint .mouse {
  -webkit-mask-image: var(--sqc-md-tl), var(--sqc-md-tr), var(--sqc-md-br), var(--sqc-md-bl), var(--sqc-center);
  mask-image: var(--sqc-md-tl), var(--sqc-md-tr), var(--sqc-md-br), var(--sqc-md-bl), var(--sqc-center);
  -webkit-mask-size: 14px 14px, 14px 14px, 14px 14px, 14px 14px, calc(100% - 28px) calc(100% - 28px);
  mask-size: 14px 14px, 14px 14px, 14px 14px, 14px 14px, calc(100% - 28px) calc(100% - 28px);
  -webkit-mask-position: 0 0, 100% 0, 100% 100%, 0 100%, 14px 14px;
  mask-position: 0 0, 100% 0, 100% 100%, 0 100%, 14px 14px;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

/* —— 小控件 / 标签（10px） —— */
.hamburger,
.mobile-menu a,
.section-nav a,
.award-badge,
.detail-badge,
.contact-item .icon {
  -webkit-mask-image: var(--sqc-sm-tl), var(--sqc-sm-tr), var(--sqc-sm-br), var(--sqc-sm-bl), var(--sqc-center);
  mask-image: var(--sqc-sm-tl), var(--sqc-sm-tr), var(--sqc-sm-br), var(--sqc-sm-bl), var(--sqc-center);
  -webkit-mask-size: 10px 10px, 10px 10px, 10px 10px, 10px 10px, calc(100% - 20px) calc(100% - 20px);
  mask-size: 10px 10px, 10px 10px, 10px 10px, 10px 10px, calc(100% - 20px) calc(100% - 20px);
  -webkit-mask-position: 0 0, 100% 0, 100% 100%, 0 100%, 10px 10px;
  mask-position: 0 0, 100% 0, 100% 100%, 0 100%, 10px 10px;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

/* 移动端 768px：chat-window 圆角降档为 lg，mask 同步换档 */
@media (max-width: 768px) {
  .chat-window {
  -webkit-mask-image: var(--sqc-lg-tl), var(--sqc-lg-tr), var(--sqc-lg-br), var(--sqc-lg-bl), var(--sqc-center);
  mask-image: var(--sqc-lg-tl), var(--sqc-lg-tr), var(--sqc-lg-br), var(--sqc-lg-bl), var(--sqc-center);
  -webkit-mask-size: 20px 20px, 20px 20px, 20px 20px, 20px 20px, calc(100% - 40px) calc(100% - 40px);
  mask-size: 20px 20px, 20px 20px, 20px 20px, 20px 20px, calc(100% - 40px) calc(100% - 40px);
  -webkit-mask-position: 0 0, 100% 0, 100% 100%, 0 100%, 20px 20px;
  mask-position: 0 0, 100% 0, 100% 100%, 0 100%, 20px 20px;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  }
}

/* —— 原生连续圆角（Chrome/Edge 129+ 支持 corner-shape） —— */
@supports (corner-shape: squircle) {
  .chat-window,
  .placeholder-card,
  .about-card,
  .bento-card,
  .award-card,
  .exp-card,
  .detail-hero,
  .detail-section,
  .detail-cta,
  .contact-info-card,
  .contact-form-card,
  .detail-hero-icon,
  .related-card,
  .form-input,
  .form-textarea,
  .chat-input textarea,
  .chat-send,
  .msg-bubble,
  .scroll-hint .mouse,
  .hamburger,
  .mobile-menu a,
  .section-nav a,
  .award-badge,
  .detail-badge,
  .contact-item .icon {
    corner-shape: squircle;
    -webkit-mask-image: none;
    mask-image: none;
  }
}

/* ===== 29. 主题切换按钮 · iOS/macOS 控制中心规范 ===== */
/* 按钮本体：胶囊 Squircle 连续曲率 + 背景/阴影随主题 300ms 柔和过渡 */
.theme-toggle {
  box-shadow: var(--shadow-sm);
  transition: color 0.3s ease, border-color 0.3s ease, background-color 0.3s ease,
    box-shadow 0.3s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  -webkit-mask-image: var(--sqc-pill-tl), var(--sqc-pill-tr), var(--sqc-pill-br), var(--sqc-pill-bl), var(--sqc-center);
  mask-image: var(--sqc-pill-tl), var(--sqc-pill-tr), var(--sqc-pill-br), var(--sqc-pill-bl), var(--sqc-center);
  -webkit-mask-size: 16px 16px, 16px 16px, 16px 16px, 16px 16px, calc(100% - 32px) calc(100% - 32px);
  mask-size: 16px 16px, 16px 16px, 16px 16px, 16px 16px, calc(100% - 32px) calc(100% - 32px);
  -webkit-mask-position: 0 0, 100% 0, 100% 100%, 0 100%, 16px 16px;
  mask-position: 0 0, 100% 0, 100% 100%, 0 100%, 16px 16px;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

/* hover：苹果式微弱透明度变化 */
.theme-toggle:hover {
  opacity: 0.9;
}

/* 图标切换期间的轻微柔化（连续形变质感） */
.theme-icon {
  transition: filter 0.15s ease;
}
.theme-toggle.switching .theme-icon {
  filter: blur(1.5px);
}

/* 图标旋转变换原点居中 */
.theme-icon svg {
  transform-origin: 50% 50%;
}

/* 无障碍：减弱动态效果 → 取消弹簧回弹，仅平缓淡入淡出 */
@media (prefers-reduced-motion: reduce) {
  .theme-icon svg {
    transition: opacity 0.3s ease !important;
    transform: none !important;
  }
  .theme-toggle,
  .theme-toggle:active {
    transform: none !important;
  }
}

/* —— 阴影适配：mask 会裁掉 box-shadow，非 corner-shape 浏览器改用 drop-shadow
       （阴影跟随 squircle 形状；Chrome/Edge 原生 corner-shape 分支保留 box-shadow） —— */
@supports not (corner-shape: squircle) {
  .about-card,
  .bento-card,
  .award-card,
  .exp-card,
  .detail-hero,
  .detail-section,
  .detail-cta,
  .contact-info-card,
  .contact-form-card,
  .related-card,
  .placeholder-card {
    box-shadow: none;
    filter: drop-shadow(var(--shadow-sm));
  }
  .about-card:hover,
  .bento-card:hover,
  .award-card:hover,
  .exp-card:hover,
  .detail-hero:hover,
  .detail-section:hover,
  .related-card:hover {
    filter: drop-shadow(var(--shadow-lg));
  }
  .chat-window {
    box-shadow: none;
    filter: drop-shadow(var(--shadow-lg));
  }
  .msg.user .msg-bubble {
    box-shadow: none;
    filter: drop-shadow(0 4px 14px rgba(0, 102, 204, 0.25));
  }
  /* 输入框 focus 光圈 */
  .form-input:focus,
  .form-textarea:focus,
  .chat-input textarea:focus {
    box-shadow: none;
    filter: drop-shadow(0 0 0 3px var(--color-accent-light));
  }
}


/* ===== 详情页 · 项目图表 ===== */
.detail-figures {
  display: grid;
  gap: 18px;
}

.detail-figure {
  margin: 0;
  padding: 14px;
  background: var(--color-surface-hover);
  border: 1px solid var(--color-border);
  border-radius: 12px;
}

.detail-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  background: #ffffff;
}

.detail-figure figcaption {
  margin-top: 12px;
  font-size: 0.85rem;
  line-height: 1.65;
  color: var(--color-fg-light);
  text-align: center;
}

.detail-figure-link {
  display: block;
  cursor: zoom-in;
}


/* ===== 详情页 · 技术参数表 ===== */
.detail-specs {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  line-height: 1.6;
}

.detail-specs th,
.detail-specs td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
  text-align: left;
}

.detail-specs th {
  width: 26%;
  font-weight: 600;
  color: var(--color-fg-light);
  white-space: nowrap;
  background: var(--color-surface-hover);
}

.detail-specs td {
  color: var(--color-fg);
}

.detail-specs tr:last-child th,
.detail-specs tr:last-child td {
  border-bottom: none;
}

@media (max-width: 560px) {
  .detail-specs th {
    white-space: normal;
    width: 34%;
  }
}
