/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%; overflow-x: hidden; background: #000000;
  overscroll-behavior: none; cursor: none;
  font-family: "Segoe UI", "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
}
a, button, input, label, [role="button"], .tgl-btn { cursor: none !important; }
html { scrollbar-width: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar { display: none; }
html.loading, html.loading body { overflow: hidden; height: 100%; }

#three-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
#three-bg canvas { display: block; }

/* ============================================================
   主内容
   ============================================================ */
.main-content { position: relative; z-index: 1; opacity: 0; }

.main-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  padding: 1.2rem 2.5rem; pointer-events: none;
}
.header-brand {
  font-family: "Georgia", "Times New Roman", serif;
  font-size: clamp(1rem, 1.8vw, 1.3rem); font-weight: 400;
  letter-spacing: 0.25em; color: rgba(200,196,208,0.7);
}

/* ============================================================
   水平滚动 — 显式列
   ============================================================ */
.horizontal-section {
  width: 100%; height: 100vh; overflow: hidden;
  touch-action: none;                  /* 禁止浏览器默认上下滑，全交 JS 处理 */
}

.horizontal-track {
  display: flex; flex-direction: row; height: 100vh;
  gap: 2.5rem; padding: 120px clamp(4rem, 12vw, 8rem);
  will-change: transform; user-select: none;
}

/* 每一列 */
.track-col {
  display: flex;
  flex-direction: column;
  gap: 1px;
  height: 100%;
  justify-content: center;         /* 列内块垂直居中 */
}

/* ============================================================
   内容块
   ============================================================ */
.block {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem 2.2rem;
  border-bottom: 1px solid rgba(255,255,255,0.025);
  position: relative;
  transition: background 0.35s ease;
}

.block:hover { background: rgba(255,255,255,0.012); }

/* hover 圆点 */
.block::after {
  content: "";
  position: absolute;
  top: 2rem; right: 2.2rem;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: rgba(200,180,240,0);
  box-shadow: 0 0 0px rgba(200,180,240,0);
  transition: all 0.4s ease;
  pointer-events: none;
}
.block:hover::after {
  background: rgba(200,180,240,0.7);
  box-shadow: 0 0 8px rgba(200,180,240,0.5), 0 0 20px rgba(180,160,220,0.2);
}

/* 宽 */
.block-xl { width: 620px; }
.block-lg { width: 480px; }
.block-md { width: 360px; }
.block-sm { width: 260px; }

/* 高 */
.block-tall  { min-height: 82vh; }
.block       { min-height: 42vh; }
.block-short { min-height: 28vh; }

/* 列之间微妙的右边线 */
.track-col:not(:last-child) {
  border-right: 1px solid rgba(255,255,255,0.04);
  padding-right: 2.5rem;
}

/* 标签 */
.block-tag {
  font-family: "Georgia", serif; font-size: 0.66rem;
  letter-spacing: 0.3em; color: rgba(180,170,210,0.3);
  text-transform: uppercase; margin-bottom: 0.9rem; display: block;
}

/* 标题 */
.block-hero {
  font-family: "Georgia", "Times New Roman", serif;
  font-size: clamp(1.6rem, 2.8vw, 2.4rem); font-weight: 400;
  line-height: 1.35; letter-spacing: 0.04em;
  color: #e8e5f0; margin-bottom: 1rem;
}
.block-hero em { font-style: italic; color: #c8bdf0; }
.block-sub { font-size: 0.85rem; font-weight: 300; line-height: 1.7; color: #7a7784; max-width: 32ch; }
.block-icp { font-size: 0.72rem; font-weight: 300; color: #6a6678; margin-top: 1rem; }
.block-icp:empty { display: none; }
.block-head {
  font-family: "Georgia", serif; font-size: clamp(1.2rem, 1.8vw, 1.7rem);
  font-weight: 400; letter-spacing: 0.06em; color: #ddd9eb; margin-bottom: 0.7rem;
}
.block-desc {
  font-size: 0.84rem; font-weight: 300; line-height: 1.7;
  color: #888590; max-width: 34ch; margin-bottom: 0.9rem;
}

/* 技术栈标签 */
.block-meta { display: flex; flex-wrap: wrap; gap: 5px; }
.block-meta span {
  font-size: 0.64rem; letter-spacing: 0.1em; color: #8a84a0;
  padding: 2px 9px; border: 1px solid rgba(180,170,210,0.1); border-radius: 2px;
}

/* 列表 */
.block-list { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.block-list li {
  font-size: 0.84rem; font-weight: 300; color: #888590;
  padding-left: 0.9em; position: relative;
}
.block-list li::before {
  content: ""; position: absolute; left: 0; top: 0.5em;
  width: 4px; height: 1px; background: rgba(180,160,220,0.4);
}

/* 统计 */
.block-stat { flex-direction: row; align-items: center; gap: 1.6rem; }
.stat-group { text-align: center; }
.stat-num { display: block; font-family: "Georgia", serif; font-size: 1.7rem; color: #d5cff0; line-height: 1.2; }
.stat-label { font-size: 0.6rem; letter-spacing: 0.1em; color: #6a6678; text-transform: uppercase; }

/* 格言 */
.block-quote { justify-content: center; gap: 0.8rem; }
.quote-text { font-family: "Georgia", serif; font-size: 1.05rem; font-style: italic; line-height: 1.5; color: #b8b2cc; }
.quote-author { font-size: 0.68rem; letter-spacing: 0.1em; color: #6a6678; }

/* 技能云 */
.block-skills .block-head { margin-bottom: 1.3rem; }
.skill-cloud { display: flex; flex-wrap: wrap; gap: 7px; max-width: 440px; }
.skill-cloud span {
  font-size: 0.72rem; letter-spacing: 0.04em; color: #b0aac8;
  padding: 4px 12px; border: 1px solid rgba(180,170,210,0.1);
  border-radius: 2px; background: rgba(255,255,255,0.01);
}

/* 时间线 */
.block-timeline .block-head { margin-bottom: 1rem; }
.tl-item { display: flex; gap: 0.7rem; padding: 0.4rem 0; border-bottom: 1px solid rgba(255,255,255,0.018); }
.tl-year { flex-shrink: 0; width: 34px; font-family: "Georgia", serif; font-size: 0.68rem; color: rgba(180,170,210,0.38); }
.tl-text { font-size: 0.78rem; font-weight: 300; color: #8a8696; }

/* 联系 */
.connect-links { display: flex; flex-direction: column; gap: 7px; }
.connect-link { font-size: 0.88rem; font-weight: 300; letter-spacing: 0.05em; color: #908aa8; text-decoration: none; transition: color 0.25s; }
.connect-link:hover { color: #d5cff0; }

/* ============================================================
   Toggle Switch
   ============================================================ */
.checkbox-wrapper-8 { margin-top: 1.2rem; }

.checkbox-wrapper-8 .tgl { display: none; }

.checkbox-wrapper-8 .tgl,
.checkbox-wrapper-8 .tgl:after,
.checkbox-wrapper-8 .tgl:before,
.checkbox-wrapper-8 .tgl *,
.checkbox-wrapper-8 .tgl *:after,
.checkbox-wrapper-8 .tgl *:before,
.checkbox-wrapper-8 .tgl + .tgl-btn {
  box-sizing: border-box;
}

.checkbox-wrapper-8 .tgl + .tgl-btn {
  outline: 0; display: block; width: 4em; height: 2em;
  position: relative; cursor: pointer;
  user-select: none;
}
.checkbox-wrapper-8 .tgl + .tgl-btn:after,
.checkbox-wrapper-8 .tgl + .tgl-btn:before {
  position: relative; display: block; content: ""; width: 50%; height: 100%;
}
.checkbox-wrapper-8 .tgl + .tgl-btn:after  { left: 0; }
.checkbox-wrapper-8 .tgl + .tgl-btn:before { display: none; }
.checkbox-wrapper-8 .tgl:checked + .tgl-btn:after { left: 50%; }

.checkbox-wrapper-8 .tgl-skewed + .tgl-btn {
  overflow: hidden; transform: skew(-10deg);
  backface-visibility: hidden; transition: all 0.2s ease;
  background: #444;
}
.checkbox-wrapper-8 .tgl-skewed + .tgl-btn:after,
.checkbox-wrapper-8 .tgl-skewed + .tgl-btn:before {
  transform: skew(10deg); display: inline-block;
  transition: all 0.2s ease; width: 100%;
  text-align: center; position: absolute;
  line-height: 2em; font-weight: bold;
  color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,0.4);
}
.checkbox-wrapper-8 .tgl-skewed + .tgl-btn:after {
  left: 100%; content: attr(data-tg-on);
}
.checkbox-wrapper-8 .tgl-skewed + .tgl-btn:before {
  left: 0; content: attr(data-tg-off);
}
.checkbox-wrapper-8 .tgl-skewed + .tgl-btn:active { background: #555; }
.checkbox-wrapper-8 .tgl-skewed + .tgl-btn:active:before { left: -10%; }

.checkbox-wrapper-8 .tgl-skewed:checked + .tgl-btn {
  background: #6a996a;
}
.checkbox-wrapper-8 .tgl-skewed:checked + .tgl-btn:before { left: -100%; }
.checkbox-wrapper-8 .tgl-skewed:checked + .tgl-btn:after  { left: 0; }
.checkbox-wrapper-8 .tgl-skewed:checked + .tgl-btn:active:after { left: 10%; }

/* ============================================================
   加载遮罩
   ============================================================ */
.loading-overlay {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  background: #000000; perspective: 1000px; overflow: hidden;
}
.stroke-svg { width: min(85vw, 700px); height: auto; overflow: visible; transform-style: preserve-3d; }
.svg-text { font-family: "Georgia", serif; font-size: 110px; font-weight: bold; letter-spacing: 4px; }
.stroke-outer { fill: none; stroke: rgba(170,150,220,0.45); stroke-width: 4px; stroke-linecap: round; stroke-linejoin: round; }
.stroke-inner { fill: none; stroke: #ffffff; stroke-width: 1.8px; stroke-linecap: round; stroke-linejoin: round; }
.fill-text { fill: #ffffff; opacity: 0; }

/* 自定义光标 */
.cursor-main, .cursor-trail {
  position: fixed; top: 0; left: 0;
  width: 8px; height: 8px;
  border-radius: 50%;
  pointer-events: none; z-index: 9999;
  transform: translate(-50%, -50%);
}
.cursor-main {
  background: rgba(210,195,250,0.9);
  box-shadow: 0 0 10px rgba(200,180,240,0.6), 0 0 24px rgba(180,160,220,0.25);
  transition: width 0.15s, height 0.15s, background 0.15s;
}
.cursor-ring {
  position: absolute;
  top: 50%; left: 50%;
  width: 0; height: 0;
  border-radius: 50%;
  border: 1px solid rgba(200,180,240,0);
  transform: translate(-50%, -50%);
  transition: width 0.35s ease, height 0.35s ease, border-color 0.35s ease;
}
.cursor-main.ring-on .cursor-ring {
  width: 32px; height: 32px;
  border-color: rgba(200,180,240,0.5);
}
.cursor-trail {
  width: 12px; height: 12px;
  background: rgba(200,180,240,0.15);
  box-shadow: 0 0 20px rgba(180,160,220,0.1);
  filter: blur(4px);
  transition: transform 0.08s linear;
}

/* 底部进度条 */
.scroll-progress {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
  height: 1.5px; background: rgba(255,255,255,0.04); pointer-events: none;
}
.scroll-progress-fill {
  height: 100%; width: 0%;
  background: linear-gradient(to right,
    transparent 0%, rgba(180,160,230,0.7) 30%,
    rgba(210,195,250,0.9) 50%, rgba(180,160,230,0.7) 70%, transparent 100%);
  box-shadow: 0 0 6px rgba(200,180,240,0.5), 0 0 14px rgba(180,160,220,0.2);
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 700px) {
  .horizontal-track { gap: 1.2rem; padding: 40px 2.4rem; }
  .track-col:not(:last-child) { padding-right: 1.2rem; }
  .block-xl { width: 78vw; }
  .block-lg { width: 70vw; }
  .block-md { width: 62vw; }
  .block-sm { width: 54vw; }
  .block-tall  { min-height: 55vh; }
  .block       { min-height: 32vh; padding: 1.3rem 1.2rem; }
  .block-short { min-height: 22vh; }
  .block-stat  { flex-direction: column; gap: 0.6rem; }
  .main-header { padding: 0.9rem 1.2rem; }
  .stroke-svg  { width: 92vw; }
  .svg-text    { font-size: 80px; }
}
