/* ===================================================
   个人官网主页 — 严格还原 Ardot 设计稿
   设计文件：700887521863810
   =================================================== */

/* ---------- CSS Variables ---------- */
:root {
  /* 主色板 */
  --bg-primary: #0F0E0E;
  --bg-secondary: rgba(15, 14, 14, 0.55);
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.08);

  /* 强调色 */
  --amber: #E8C268;
  --amber-muted: rgba(232, 194, 104, 0.18);
  --coral: #FFB347;
  --coral-muted: rgba(255, 179, 71, 0.18);
  --blue: #B1E2FF;
  --blue-muted: rgba(177, 226, 255, 0.18);
  --green: #34D399;
  --rose: #FA6881;

  /* 文字 */
  --text-primary: #FFFFFF;
  --text-secondary: rgba(255, 255, 255, 0.75);
  --text-muted: rgba(255, 255, 255, 0.65);
  --text-dim: rgba(255, 255, 255, 0.5);
  --text-faint: rgba(255, 255, 255, 0.4);

  /* 边框 */
  --border-subtle: rgba(255, 255, 255, 0.1);
  --border-light: rgba(255, 255, 255, 0.12);
  --border-amber: rgba(232, 194, 104, 0.35);
  --border-blue: rgba(177, 226, 255, 0.35);
  --border-coral: rgba(255, 179, 71, 0.35);

  /* 间距 */
  --section-pad-x: 120px;
  --section-pad-y: 120px;
  --gap-lg: 64px;

  /* 圆角 */
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-2xl: 28px;
  --radius-pill: 100px;

  /* 字体 */
  --font-sans: 'Noto Sans SC', Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Cascadia Code', Inter, monospace;

  /* 主题相关（深色默认值） */
  --bg-section-alt: rgba(15, 14, 14, 0.4);
  --bg-nav-scrolled: rgba(15, 14, 14, 0.85);
  --bg-mobile-menu: rgba(15, 14, 14, 0.96);
  --bg-footer: #0A0A0A;
  --text-on-accent: #141313;
  --amber-strong: #E8C268;
  --blue-strong: #B1E2FF;
  --coral-strong: #FFB347;
  --green-strong: #34D399;
  --rose-strong: #FA6881;
}

/* ===================================================
   浅色主题（白天版）
   =================================================== */
[data-theme='light'] {
  --bg-primary: #F6F5F1;
  --bg-secondary: rgba(246, 245, 241, 0.75);
  --bg-card: #FFFFFF;
  --bg-card-hover: #FFFFFF;
  --bg-section-alt: rgba(29, 26, 22, 0.03);
  --bg-nav-scrolled: rgba(246, 245, 241, 0.92);
  --bg-mobile-menu: rgba(246, 245, 241, 0.98);
  --bg-footer: #EDEAE3;

  /* 浅色下基色变量加深以保证对比度 */
  --amber: #B8860B;
  --coral: #C2611B;
  --blue: #1E6BA0;
  --green: #15855C;
  --rose: #D13A58;

  --text-primary: #1D1A16;
  --text-secondary: rgba(29, 26, 22, 0.78);
  --text-muted: rgba(29, 26, 22, 0.62);
  --text-dim: rgba(29, 26, 22, 0.5);
  --text-faint: rgba(29, 26, 22, 0.45);

  --border-subtle: rgba(29, 26, 22, 0.08);
  --border-light: rgba(29, 26, 22, 0.1);
  --border-amber: rgba(156, 116, 34, 0.35);
  --border-blue: rgba(47, 127, 191, 0.35);
  --border-coral: rgba(194, 97, 27, 0.35);

  /* 浅色下主题色加深，保证文字对比度 */
  --amber-strong: #9C7422;
  --blue-strong: #2F7FBF;
  --coral-strong: #C2611B;
  --green-strong: #15855C;
  --rose-strong: #D13A58;

  --amber-muted: rgba(156, 116, 34, 0.14);
  --blue-muted: rgba(47, 127, 191, 0.12);
  --coral-muted: rgba(194, 97, 27, 0.12);
}

/* 浅色主题的元素级微调 */
[data-theme='light'] .hero__badge {
  background: #FFFFFF;
  border-color: rgba(29, 26, 22, 0.1);
}

[data-theme='light'] .hero__title-accent {
  background: linear-gradient(120deg, var(--amber-strong) 0%, var(--rose-strong) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme='light'] .hero__chip {
  background: #FFFFFF;
  border-color: rgba(29, 26, 22, 0.12);
  box-shadow: 0 8px 20px rgba(29, 26, 22, 0.08);
}

[data-theme='light'] .hero__card {
  box-shadow:
    0 24px 64px rgba(29, 26, 22, 0.18),
    0 0 80px rgba(232, 194, 104, 0.12);
}

[data-theme='light'] .projects__featured {
  background: linear-gradient(
    135deg,
    rgba(232, 194, 104, 0.35) 0%,
    rgba(232, 194, 104, 0.08) 100%
  );
}

[data-theme='light'] .timeline__line {
  background: linear-gradient(
    to bottom,
    var(--amber-strong) 0%,
    rgba(29, 26, 22, 0.12) 100%
  );
}

[data-theme='light'] .timeline__dot {
  background: rgba(29, 26, 22, 0.3);
}

[data-theme='light'] .back-to-top {
  background: #FFFFFF;
}

/* 主题切换按钮 */
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.theme-toggle:hover {
  color: var(--amber-strong);
  border-color: var(--border-amber);
  background: var(--bg-card-hover);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

[data-theme='dark'] .theme-toggle__icon--moon {
  display: none;
}

[data-theme='light'] .theme-toggle__icon--sun {
  display: none;
}

/* 主题切换过渡动画（JS 临时挂载） */
html.theme-transition,
html.theme-transition *,
html.theme-transition *::before,
html.theme-transition *::after {
  transition:
    background-color 0.35s ease,
    border-color 0.35s ease,
    color 0.35s ease,
    box-shadow 0.35s ease !important;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

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

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

::selection {
  background: rgba(232, 194, 104, 0.35);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 4px;
}

/* 图标 SVG 尺寸 */
.fact-card__icon svg {
  width: 24px;
  height: 24px;
}

.cap-card__icon svg {
  width: 22px;
  height: 22px;
}

/* ---------- 滚动显现动画（JS 控制） ---------- */
.reveal-init {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ---------- Noise Texture Overlay ---------- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* ---------- Section Tag (共用) ---------- */
.section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 400;
  color: var(--amber-strong);
  opacity: 0.8;
  letter-spacing: 0.08em;
}

.section-tag--center {
  display: block;
  text-align: center;
  margin-bottom: 24px;
}

/* ---------- Section Title (共用) ---------- */
.section-title {
  font-family: var(--font-sans);
  font-size: 48px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--text-primary);
  margin-top: 16px;
}

/* ===================================================
   NAVIGATION
   =================================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 64px;
  background: var(--bg-secondary);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.3s ease;
}

.nav--scrolled {
  background: var(--bg-nav-scrolled);
}

.nav__logo {
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav__link {
  position: relative;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 400;
  color: var(--text-primary);
  opacity: 0.65;
  transition: opacity 0.2s ease;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 1px;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav__link:hover {
  opacity: 1;
}

.nav__link:hover::after {
  transform: scaleX(0.6);
}

.nav__link--active {
  opacity: 1;
}

.nav__link--active::after {
  transform: scaleX(1);
}

/* ---------- 移动端菜单 ---------- */
.nav__right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.nav__toggle:hover {
  background: var(--bg-card-hover);
}

.nav__toggle span {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 1px;
  background: var(--text-primary);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav__toggle--open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav__toggle--open span:nth-child(2) {
  opacity: 0;
}

.nav__toggle--open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav__mobile {
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  z-index: 99;
  display: flex;
  flex-direction: column;
  padding: 16px 20px 24px;
  background: var(--bg-mobile-menu);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  transform: translateY(-110%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav__mobile--open {
  transform: translateY(0);
}

.nav__mobile-link {
  padding: 14px 8px;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
  transition: color 0.2s ease;
}

.nav__mobile-link:hover {
  color: var(--amber);
}

.nav__mobile-link--cta {
  margin-top: 12px;
  border-bottom: none;
  border-radius: var(--radius-sm);
  background: var(--amber);
  color: var(--bg-primary);
  text-align: center;
}

.nav__mobile-link--cta:hover {
  color: var(--bg-primary);
}

.nav__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-on-accent);
  background: var(--amber);
  border-radius: var(--radius-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav__cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(232, 194, 104, 0.3);
}

/* ===================================================
   HERO
   =================================================== */
.hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  padding: 160px var(--section-pad-x) 80px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: 64px;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    ellipse 70% 60% at 30% 0%,
    rgba(255, 179, 71, 0.12) 0%,
    rgba(250, 104, 129, 0.04) 50%,
    transparent 100%
  );
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  width: fit-content;
}

.hero__badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #FFB347;
  animation: badge-pulse 2.4s ease-in-out infinite;
}

@keyframes badge-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(255, 179, 71, 0.5);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(255, 179, 71, 0);
  }
}

.hero__badge-text {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 400;
  color: var(--text-primary);
  opacity: 0.8;
}

.hero__title {
  font-family: var(--font-sans);
  font-size: 56px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}

.hero__subtitle {
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 640px;
}

.hero__ctas {
  display: flex;
  gap: 16px;
  margin-top: 8px;
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero__cta--primary {
  background: var(--amber);
  color: var(--text-on-accent);
}

.hero__cta--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(232, 194, 104, 0.35);
}

.hero__title-accent {
  background: linear-gradient(120deg, var(--amber) 0%, #FA6881 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ---------- Hero 视觉卡片 ---------- */
.hero__visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 420px;
}

.hero__card {
  position: relative;
  width: 100%;
  max-width: 440px;
  border-radius: var(--radius-lg);
  background: rgba(20, 19, 19, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(232, 194, 104, 0.06),
    0 0 80px rgba(232, 194, 104, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow: hidden;
  animation: hero-float 7s ease-in-out infinite;
}

@keyframes hero-float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

.hero__card-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.03);
}

.hero__card-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.hero__card-dot:nth-child(1) {
  background: rgba(250, 104, 129, 0.7);
}

.hero__card-dot:nth-child(2) {
  background: rgba(232, 194, 104, 0.7);
}

.hero__card-dot:nth-child(3) {
  background: rgba(52, 211, 153, 0.7);
}

.hero__card-file {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
}

.hero__card-body {
  padding: 24px 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.5;
}

.code-line {
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.75);
}

.code-line--indent {
  padding-left: 24px;
}

.code-k {
  color: #FA6881;
}

.code-v {
  color: var(--blue);
}

.code-p {
  color: var(--amber);
}

.code-s {
  color: var(--green);
}

.code-f {
  color: var(--coral);
}

.code-cursor {
  display: inline-block;
  width: 8px;
  height: 16px;
  margin-left: 4px;
  vertical-align: text-bottom;
  background: var(--amber);
  animation: cursor-blink 1.1s steps(1) infinite;
}

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

/* 漂浮标签 */
.hero__chip {
  position: absolute;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  animation: hero-float 6s ease-in-out infinite;
}

.hero__chip--1 {
  top: 6%;
  left: -4%;
  color: var(--amber-strong);
  border-color: var(--border-amber);
  animation-delay: 0.6s;
}

.hero__chip--2 {
  top: 22%;
  right: -6%;
  color: var(--blue-strong);
  border-color: var(--border-blue);
  animation-delay: 1.4s;
}

.hero__chip--3 {
  bottom: 20%;
  left: -8%;
  color: var(--coral-strong);
  border-color: var(--border-coral);
  animation-delay: 2.2s;
}

.hero__chip--4 {
  bottom: 4%;
  right: -2%;
  color: var(--green-strong);
  border-color: rgba(52, 211, 153, 0.35);
  animation-delay: 3s;
}

/* ===================================================
   ABOUT
   =================================================== */
.about {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 80px;
  padding: var(--section-pad-y) var(--section-pad-x);
  min-height: 720px;
  background: var(--bg-section-alt);
}

.about__left {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.about__desc {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text-secondary);
}

.about__sign {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 16px;
}

.about__sign-line {
  width: 40px;
  height: 1px;
  background: var(--amber);
}

.about__sign-text {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 400;
  color: var(--amber-strong);
  opacity: 0.85;
}

.about__right {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ---------- Fact Cards ---------- */
.fact-card {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 24px 28px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-light);
  transition: background 0.2s ease, transform 0.2s ease;
}

.fact-card:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.fact-card__icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fact-card__icon--amber {
  background: var(--amber);
  color: var(--text-on-accent);
}

.fact-card__icon--coral {
  background: var(--coral);
  color: var(--text-on-accent);
}

.fact-card__icon--blue {
  background: var(--blue);
  color: var(--text-on-accent);
}

.fact-card__icon--green {
  background: var(--green);
  color: var(--text-on-accent);
}

.fact-card__text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.fact-card__title {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.fact-card__desc {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--text-muted);
}

/* ===================================================
   CAPABILITIES
   =================================================== */
.capabilities {
  padding: var(--section-pad-y) var(--section-pad-x);
  display: flex;
  flex-direction: column;
  gap: var(--gap-lg);
}

.capabilities__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
}

.capabilities__head-left {
  flex: 1;
  min-width: 0;
}

.capabilities__head-right {
  flex: 0 0 400px;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text-muted);
}

/* ---------- Capability Grid ---------- */
.capabilities__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* ---------- Capability Cards（统一规格 + 主题色变量） ---------- */
.cap-card {
  --card-accent: var(--amber-strong);
  --card-accent-soft: var(--amber-muted);
  --card-accent-border: var(--border-amber);

  position: relative;
  display: flex;
  flex-direction: column;
  padding: 28px;
  border-radius: var(--radius-xl);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

/* 左上角微弱主题光晕 */
.cap-card::before {
  content: '';
  position: absolute;
  top: -70px;
  left: -70px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--card-accent-soft) 0%, transparent 70%);
  opacity: 0.7;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.cap-card:hover {
  transform: translateY(-4px);
  background: var(--bg-card-hover);
  border-color: var(--card-accent-border);
}

.cap-card:hover::before {
  opacity: 1;
}

.cap-card--amber {
  --card-accent: var(--amber-strong);
  --card-accent-soft: var(--amber-muted);
  --card-accent-border: var(--border-amber);
}

.cap-card--blue {
  --card-accent: var(--blue-strong);
  --card-accent-soft: var(--blue-muted);
  --card-accent-border: var(--border-blue);
}

.cap-card--coral {
  --card-accent: var(--coral-strong);
  --card-accent-soft: var(--coral-muted);
  --card-accent-border: var(--border-coral);
}

.cap-card--green {
  --card-accent: var(--green-strong);
  --card-accent-soft: rgba(52, 211, 153, 0.15);
  --card-accent-border: rgba(52, 211, 153, 0.35);
}

.cap-card--rose {
  --card-accent: var(--rose-strong);
  --card-accent-soft: rgba(250, 104, 129, 0.15);
  --card-accent-border: rgba(250, 104, 129, 0.35);
}

.cap-card--neutral {
  --card-accent: rgba(255, 255, 255, 0.85);
  --card-accent-soft: rgba(255, 255, 255, 0.1);
  --card-accent-border: rgba(255, 255, 255, 0.25);
}

.cap-card__head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.cap-card__num {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 400;
  color: var(--card-accent);
  opacity: 0.7;
}

.cap-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card-accent-soft);
  color: var(--card-accent);
}

.cap-card__title {
  position: relative;
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
}

.cap-card__desc {
  position: relative;
  flex: 1;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.65;
  color: var(--text-muted);
  margin-top: 10px;
}

.cap-card__tags {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.cap-card__tag {
  padding: 4px 10px;
  border-radius: 6px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 400;
  color: var(--card-accent);
  background: var(--card-accent-soft);
}

/* ===================================================
   THOUGHTS
   =================================================== */
.thoughts {
  padding: var(--section-pad-y) var(--section-pad-x);
  display: flex;
  flex-direction: column;
  gap: var(--gap-lg);
  background: var(--bg-section-alt);
}

.thoughts__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
}

.thoughts__head-left {
  flex: 1;
  min-width: 0;
}

.thoughts__head-right {
  flex: 0 0 400px;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text-muted);
}

/* ---------- Article Cards ---------- */
.thoughts__list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.article-card {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 28px 32px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
}

.article-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
}

.article-card__meta {
  flex-shrink: 0;
  width: 180px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.article-card__date {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 400;
  color: var(--amber-strong);
  opacity: 0.8;
}

.article-card__read {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  color: var(--text-faint);
}

.article-card__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.article-card__tag {
  display: inline-block;
  width: fit-content;
  padding: 4px 10px;
  border-radius: 6px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
}

.article-card__tag--amber {
  background: var(--amber-muted);
  color: var(--amber-strong);
}

.article-card__tag--blue {
  background: var(--blue-muted);
  color: var(--blue-strong);
}

.article-card__tag--coral {
  background: var(--coral-muted);
  color: var(--coral-strong);
}

.article-card__tag--green {
  background: rgba(52, 211, 153, 0.18);
  color: var(--green-strong);
}

.article-card__title {
  font-family: var(--font-sans);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
}

.article-card__excerpt {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-dim);
}

.article-card__arrow {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(232, 194, 104, 0.12);
  font-size: 18px;
  color: var(--amber-strong);
  transition: background 0.2s ease, transform 0.2s ease;
}

.article-card:hover .article-card__arrow {
  background: rgba(232, 194, 104, 0.25);
  transform: translateX(3px);
}

/* ===================================================
   PROJECTS
   =================================================== */
.projects {
  padding: var(--section-pad-y) var(--section-pad-x);
  display: flex;
  flex-direction: column;
  gap: var(--gap-lg);
}

.projects__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
}

.projects__head-left {
  flex: 1;
  min-width: 0;
}

.projects__head-right {
  flex: 0 0 400px;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text-muted);
}

/* ---------- Featured Project Card ---------- */
.projects__featured {
  display: flex;
  border-radius: var(--radius-2xl);
  background: linear-gradient(
    135deg,
    rgba(232, 194, 104, 0.18) 0%,
    rgba(15, 14, 14, 0.4) 100%
  );
  border: 1px solid var(--border-amber);
  overflow: hidden;
  min-height: 320px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.projects__featured:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.35);
}

.projects__featured-left {
  flex: 1;
  min-width: 0;
  padding: 40px 48px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: center;
}

.projects__featured-badge {
  display: inline-block;
  width: fit-content;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(232, 194, 104, 0.22);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--amber-strong);
  letter-spacing: 0.05em;
}

.projects__featured-name {
  font-family: var(--font-sans);
  font-size: 34px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.projects__featured-desc {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text-secondary);
}

.projects__featured-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.projects__featured-tags span {
  padding: 4px 10px;
  border-radius: 6px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 400;
  color: var(--amber-strong);
  background: var(--amber-muted);
}

/* 占位链接/卡片的交互提示 */
.projects__placeholder-link {
  cursor: pointer;
}

.projects__featured-link {
  display: inline-block;
  margin-top: 8px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--amber-strong);
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.projects__featured-link:hover {
  opacity: 1;
}

.projects__featured-meta {
  display: flex;
  gap: 24px;
  padding-top: 16px;
  flex-wrap: wrap;
}

.projects__meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.projects__meta-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  color: var(--text-faint);
}

.projects__meta-value {
  font-family: Inter, var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.projects__meta-value--green {
  color: var(--green);
}

.projects__featured-right {
  flex: 0 0 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.projects__visual {
  width: 100%;
  max-width: 280px;
  height: 200px;
  border-radius: var(--radius-md);
  background: linear-gradient(
    135deg,
    var(--amber) 0%,
    #FA6881 100%
  );
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* ---------- 仪表盘视觉 ---------- */
.projects__dashboard {
  width: 100%;
  max-width: 300px;
  padding: 24px 22px 20px;
  border-radius: var(--radius-lg);
  background: rgba(20, 19, 19, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dashboard__header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dashboard__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green-strong);
  animation: badge-pulse 2.4s ease-in-out infinite;
}

.dashboard__label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.05em;
}

.dashboard__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.dashboard__metric {
  padding: 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dashboard__metric-val {
  font-family: Inter, var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: -0.02em;
}

.dashboard__metric-unit {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.45);
}

.dashboard__metric-label {
  font-family: var(--font-sans);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
}

.dashboard__metric--alert .dashboard__metric-val {
  color: var(--coral);
}

.dashboard__bar {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.dashboard__bar-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--amber) 0%, var(--coral) 100%);
  transition: width 1.2s ease;
}

.dashboard__bar-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  text-align: right;
}

.projects__featured:hover .dashboard__bar-fill {
  animation: bar-pulse 1.2s ease;
}

@keyframes bar-pulse {
  0% { width: 0%; }
  100% { width: 78%; }
}

.projects__visual-sub {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-on-accent);
  opacity: 0.8;
}

/* ---------- Project Sub-Cards Grid（与能力卡片同一视觉语言） ---------- */
.projects__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.project-card {
  --card-accent: var(--amber-strong);
  --card-accent-soft: var(--amber-muted);
  --card-accent-border: var(--border-amber);

  position: relative;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: background 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.project-card::before {
  content: '';
  position: absolute;
  top: -70px;
  left: -70px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--card-accent-soft) 0%, transparent 70%);
  opacity: 0.7;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.project-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--card-accent-border);
  transform: translateY(-4px);
}

.project-card:hover::before {
  opacity: 1;
}

.project-card--amber {
  --card-accent: var(--amber-strong);
  --card-accent-soft: var(--amber-muted);
  --card-accent-border: var(--border-amber);
}

.project-card--amber {
  --card-accent: var(--amber-strong);
  --card-accent-soft: var(--amber-muted);
  --card-accent-border: var(--border-amber);
}

.project-card--blue {
  --card-accent: var(--blue-strong);
  --card-accent-soft: var(--blue-muted);
  --card-accent-border: var(--border-blue);
}

.project-card--coral {
  --card-accent: var(--coral-strong);
  --card-accent-soft: var(--coral-muted);
  --card-accent-border: var(--border-coral);
}

.project-card--green {
  --card-accent: var(--green-strong);
  --card-accent-soft: rgba(52, 211, 153, 0.15);
  --card-accent-border: rgba(52, 211, 153, 0.35);
}

.project-card__top {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.project-card__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card-accent-soft);
  color: var(--card-accent);
}

.project-card__icon svg {
  width: 20px;
  height: 20px;
}

.project-card__tag {
  position: relative;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  color: var(--card-accent);
  opacity: 0.85;
  margin-bottom: 8px;
}

.project-card__year {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  color: var(--text-faint);
}

.project-card__name {
  position: relative;
  font-family: var(--font-sans);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.project-card__desc {
  position: relative;
  flex: 1;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.65;
  color: var(--text-muted);
}

.project-card__stack {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}

.project-card__stack span {
  padding: 4px 10px;
  border-radius: 6px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 400;
  color: var(--card-accent);
  background: var(--card-accent-soft);
}

/* ===================================================
   TIMELINE
   =================================================== */
.timeline {
  padding: var(--section-pad-y) var(--section-pad-x);
  display: flex;
  flex-direction: column;
  gap: 80px;
  background: var(--bg-section-alt);
}

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

.timeline__track {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-left: 200px;
}

.timeline__line {
  position: absolute;
  /* track 左内边距 200 + year 宽 200 + dot 中心偏移 2 = 竖线对齐圆点中心 */
  left: 402px;
  top: 16px;
  bottom: 48px;
  width: 1px;
  background: linear-gradient(
    to bottom,
    var(--amber) 0%,
    rgba(255, 255, 255, 0.15) 100%
  );
}

.timeline__item {
  display: flex;
  align-items: flex-start;
  min-height: 120px;
  position: relative;
}

.timeline__item + .timeline__item {
  border-top: 1px solid var(--border-subtle);
  padding-top: 0;
}

.timeline__year {
  flex-shrink: 0;
  width: 200px;
  padding-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.timeline__year-text {
  font-family: Inter, var(--font-mono);
  font-size: 28px;
  font-weight: 700;
  color: var(--text-dim);
}

.timeline__year-text--active {
  color: var(--amber-strong);
}

.timeline__year-status {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 400;
  color: var(--text-faint);
}

.timeline__body {
  flex: 1;
  min-width: 0;
  padding: 28px 0 32px 48px;
  position: relative;
}

.timeline__dot {
  position: absolute;
  left: -4px;
  top: 36px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
}

.timeline__dot--active {
  background: var(--amber);
  box-shadow: 0 0 12px rgba(232, 194, 104, 0.4);
}

.timeline__item-title {
  font-family: var(--font-sans);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.timeline__item-desc {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-muted);
}

/* ===================================================
   CTA
   =================================================== */
.cta {
  position: relative;
  padding: 120px var(--section-pad-x);
  min-height: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  text-align: center;
  overflow: hidden;
}

.cta__bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    ellipse 50% 40% at 50% 30%,
    rgba(232, 194, 104, 0.18) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.cta .section-tag {
  position: relative;
  z-index: 1;
}

.cta__title {
  position: relative;
  z-index: 1;
  font-family: var(--font-sans);
  font-size: 56px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}

.cta__subtitle {
  position: relative;
  z-index: 1;
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 640px;
}

.cta__btns {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 16px;
  padding-top: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.cta__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 32px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 500;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta__btn--primary {
  background: var(--amber);
  color: var(--text-on-accent);
}

.cta__btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(232, 194, 104, 0.4);
}

/* ===================================================
   FOOTER
   =================================================== */
.footer {
  padding: 80px var(--section-pad-x) 48px;
  background: var(--bg-footer);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.footer__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
}

.footer__brand {
  max-width: 360px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer__logo {
  font-family: var(--font-sans);
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
}

.footer__tagline {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-muted);
}

.footer__cols {
  display: flex;
  gap: 64px;
}

.footer__col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer__col-title {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer__link {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 400;
  color: var(--text-secondary);
  opacity: 0.8;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.footer__link:hover {
  opacity: 1;
  color: var(--amber-strong);
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 16px;
}

.footer__copyright-line {
  display: flex;
  align-items: center;
}

.footer__copyright {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  color: var(--text-faint);
}

.footer__legal {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer__legal-link {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  color: var(--text-faint);
  transition: color 0.2s ease;
}

.footer__legal-link:hover {
  color: var(--amber-strong);
}

.footer__legal-link--police {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.footer__legal-link--police svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.footer__legal-sep {
  color: var(--text-faint);
  opacity: 0.5;
  font-size: 12px;
}

.footer__built {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  color: var(--text-faint);
}

/* ===================================================
   BACK TO TOP
   =================================================== */
.back-to-top {
  position: fixed;
  right: 32px;
  bottom: 32px;
  z-index: 90;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 19, 19, 0.9);
  border: 1px solid var(--border-amber);
  color: var(--amber-strong);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s ease;
}

.back-to-top svg {
  width: 20px;
  height: 20px;
}

.back-to-top--visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  background: rgba(232, 194, 104, 0.15);
  transform: translateY(-2px);
}

/* ===================================================
   RESPONSIVE DESIGN
   =================================================== */

/* Large screens (1440px and below) */
@media (max-width: 1440px) {
  :root {
    --section-pad-x: 80px;
  }
}

/* Tablet and small desktop (1024px and below) */
@media (max-width: 1024px) {
  :root {
    --section-pad-x: 48px;
    --section-pad-y: 80px;
  }

  .nav {
    padding: 0 48px;
  }

  .hero {
    padding: 140px 48px 80px;
    grid-template-columns: 1fr;
    min-height: auto;
  }

  /* 平板端：代码卡片移到文案下方，不再隐藏 */
  .hero__visual {
    min-height: 0;
    margin-top: 24px;
  }

  .hero__card {
    max-width: 560px;
    margin: 0 auto;
  }

  .hero__title {
    font-size: 44px;
  }

  .about {
    flex-direction: column;
    gap: 48px;
  }

  .capabilities__head,
  .thoughts__head,
  .projects__head {
    flex-direction: column;
    align-items: flex-start;
  }

  .capabilities__head-right,
  .thoughts__head-right,
  .projects__head-right {
    flex: none;
    max-width: 100%;
  }

  .capabilities__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .projects__featured {
    flex-direction: column;
  }

  .projects__featured-right {
    flex: none;
    padding: 0 48px 48px;
  }

  .timeline__track {
    padding-left: 120px;
  }

  .timeline__line {
    /* 120 + 120 + dot 中心偏移 2 */
    left: 242px;
  }

  .timeline__year {
    width: 120px;
  }

  .cta__title {
    font-size: 44px;
  }

  .footer__top {
    flex-wrap: wrap;
  }

  .footer__cols {
    flex-basis: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
  }
}

/* Mobile (768px and below) */
@media (max-width: 768px) {
  :root {
    --section-pad-x: 20px;
    --section-pad-y: 64px;
  }

  .nav {
    padding: 0 20px;
  }

  .nav__links {
    display: none;
  }

  .nav__cta {
    display: none;
  }

  .nav__toggle {
    display: flex;
  }

  .hero {
    padding: 120px 20px 60px;
    min-height: auto;
  }

  .hero__title {
    font-size: 32px;
  }

  .hero__subtitle {
    font-size: 15px;
  }

  /* 手机端：隐藏漂浮标签，代码卡片缩小字号防溢出 */
  .hero__chip {
    display: none;
  }

  .hero__card-body {
    font-size: 12.5px;
    padding: 20px 18px 22px;
  }

  .hero__ctas {
    flex-direction: column;
    width: 100%;
  }

  .hero__cta {
    width: 100%;
  }

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

  .about {
    gap: 32px;
  }

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

  .projects__featured-left {
    padding: 32px 24px;
  }

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

  .projects__featured-name {
    font-size: 26px;
  }

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

  .timeline {
    gap: 48px;
  }

  /* 手机端时间线：改为"年份在上、内容在下"，竖线贴左穿过圆点 */
  .timeline__track {
    padding-left: 0;
  }

  .timeline__line {
    left: 5px;
    top: 12px;
    bottom: 40px;
  }

  .timeline__item {
    flex-direction: column;
    gap: 6px;
    padding-left: 24px;
    min-height: 0;
  }

  .timeline__year {
    width: auto;
    padding-top: 24px;
    flex-direction: row;
    align-items: baseline;
    gap: 12px;
  }

  .timeline__year-text {
    font-size: 20px;
  }

  .timeline__body {
    padding: 0 0 28px;
  }

  .timeline__dot {
    left: -24px;
    top: 8px;
  }

  .cta {
    padding: 80px 20px;
    min-height: auto;
  }

  .cta__title {
    font-size: 28px;
  }

  .cta__subtitle {
    font-size: 15px;
  }

  .cta__btns {
    flex-direction: column;
    width: 100%;
  }

  .cta__btn {
    width: 100%;
  }

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

  .footer__top {
    flex-direction: column;
    gap: 32px;
  }

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

  .footer__bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
  }

  .footer__legal {
    justify-content: center;
  }

  .article-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
  }

  .article-card__meta {
    width: 100%;
    flex-direction: row;
    align-items: center;
    gap: 16px;
  }

  .article-card__arrow {
    align-self: flex-end;
  }
}

/* Small mobile (480px and below) */
@media (max-width: 480px) {
  .back-to-top {
    right: 20px;
    bottom: 20px;
    width: 42px;
    height: 42px;
  }

  /* 长徽章文字允许换行，圆角随之调整 */
  .hero__badge {
    border-radius: 16px;
  }

  .hero__badge-text {
    line-height: 1.5;
  }

  .timeline__item-title {
    font-size: 18px;
  }

  .project-card__name {
    font-size: 20px;
  }

  .projects__dashboard {
    max-width: 100%;
  }
  .hero__title {
    font-size: 28px;
  }

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

  .fact-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .cap-card__title {
    font-size: 18px;
  }
}

/* ===================================================
   TOAST 提示
   =================================================== */
.toast {
  position: fixed;
  top: 88px;
  left: 50%;
  transform: translateX(-50%) translateY(-16px);
  z-index: 200;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  background: var(--amber);
  color: var(--text-on-accent);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 8px 28px rgba(232, 194, 104, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

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

[data-theme='light'] .toast {
  box-shadow: 0 8px 28px rgba(156, 116, 34, 0.25);
}

/* ===================================================
   减少动态效果偏好
   =================================================== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal-init {
    opacity: 1;
    transform: none;
  }
}
