/* ==========================================================================
   17 · UI DESIGN ENGINEER — ROWS.GG STYLE SYSTEM
   1:1 Pixel-Refined Layout & Corner Flight Logo
   ========================================================================== */

:root {
  /* jib.design 官方浅色调色盘 (Light / Studio Clean) */
  --bg-canvas: #fafafa;
  --bg-card: #ffffff;
  --bg-card-subtle: #f2f2f2;
  --bg-card-hover: #ffffff;
  --bg-input: #ffffff;

  /* 墨水文本 */
  --ink: #171717;
  --ink-secondary: rgba(0, 0, 0, 0.58);
  --ink-tertiary: rgba(0, 0, 0, 0.35);
  --ink-faint: rgba(0, 0, 0, 0.08);

  /* 发丝线边框 */
  --border: rgba(0, 0, 0, 0.08);
  --border-subtle: rgba(0, 0, 0, 0.05);
  --border-medium: rgba(0, 0, 0, 0.12);
  --border-hover: rgba(0, 0, 0, 0.24);

  /* 专属选区高亮 */
  --selection-bg: #e9e5c9;
  --selection-fg: #635b30;

  /* 品牌点睛色 (Logo 专属橙) */
  --accent: #ff5722;
  --accent-subtle: rgba(255, 87, 34, 0.1);
  --accent-glow: rgba(255, 87, 34, 0.25);

  /* 字体族 */
  --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  /* 统一圆角规范 Tokens (Unified Radius System) */
  --radius-lg: 12px;
  --radius-md: 8px;
  --radius-sm: 6px;
  --radius-full: 9999px;

  /* 阴影 */
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.02), 0 4px 12px rgba(0, 0, 0, 0.03);
  --shadow-pop: 0 4px 14px rgba(0, 0, 0, 0.06);

  /* 动效 */
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 0.15s;
  --duration-normal: 0.25s;
}

[data-theme="dark"] {
  /* jib.design 官方深色调色盘 (Dark / Obsidian OLED) */
  --bg-canvas: #121212;
  --bg-card: #1c1c1c;
  --bg-card-subtle: #242424;
  --bg-card-hover: #282828;
  --bg-input: #1c1c1c;

  --ink: #ededed;
  --ink-secondary: rgba(255, 255, 255, 0.60);
  --ink-tertiary: rgba(255, 255, 255, 0.33);
  --ink-faint: rgba(255, 255, 255, 0.08);

  --border: rgba(255, 255, 255, 0.08);
  --border-subtle: rgba(255, 255, 255, 0.05);
  --border-medium: rgba(255, 255, 255, 0.15);
  --border-hover: rgba(255, 255, 255, 0.26);

  --selection-bg: #413c4b;
  --selection-fg: #c8b6ed;

  --accent: #ff5722;
  --accent-subtle: rgba(255, 87, 34, 0.15);
  --accent-glow: rgba(255, 87, 34, 0.35);

  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.4), 0 6px 16px rgba(0, 0, 0, 0.3);
  --shadow-pop: 0 4px 14px rgba(0, 0, 0, 0.6);
}

/* ==========================================================================
   全局重置与排版
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  text-size-adjust: 100%;
}

body {
  background-color: var(--bg-canvas);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 200vh;
  position: relative;
  overflow-x: hidden;
  transition: background-color var(--duration-normal) ease, color var(--duration-normal) ease;
}

::selection {
  background-color: var(--selection-bg);
  color: var(--selection-fg);
}

/* 链接双层划线动效 (jib.design Signature) */
.site-link {
  --link-rail: var(--border-medium);
  color: var(--ink);
  background-image: linear-gradient(var(--ink), var(--ink)), linear-gradient(var(--link-rail), var(--link-rail));
  padding-bottom: 2px;
  background-position: 100% 100%, 0 100%;
  background-repeat: no-repeat;
  background-size: 0 1px, 100% 1px;
  text-decoration: none;
  transition: background-size 0.28s cubic-bezier(0.77, 0, 0.175, 1);
}

.site-link:hover, .site-link:focus-visible {
  background-position: 0 100%, 0 100%;
  background-size: 100% 1px, 100% 1px;
  transition-duration: 0.18s;
  color: var(--ink);
}

/* 全屏物理粒子 Canvas */
.logo-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 99;
}

/* 页面主容器 */
.layout-container {
  width: min(880px, 90%);
  margin: 0 auto;
}

/* ==========================================================================
   1. 固定悬浮控制项 (Fixed Corner Floating Anchors)
   ========================================================================== */

/* 左上角独立固定 Logo 锚点 (滑动后飞向此处) */
.fixed-corner-logo {
  position: fixed;
  top: 24px;
  left: 28px;
  width: 38px;
  height: 42px;
  z-index: 95;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
}

/* 右上角独立控制按钮组 (Theme / Sound / Version) */
/* 右上角独立控制按钮组 (jib.design 极简位置与月牙太阳形变按钮) */
.fixed-top-controls {
  position: fixed;
  top: 24px;
  right: 28px;
  z-index: 95;
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 9999px;
  background: transparent;
  border: none;
  color: var(--ink);
  cursor: pointer;
  outline: none;
  transition: background-color var(--duration-fast) ease, transform var(--duration-fast) ease, color var(--duration-normal) ease;
}

.theme-toggle-btn:hover {
  background-color: var(--border-subtle);
}

.theme-toggle-btn:active {
  transform: scale(0.9);
}

.theme-toggle-svg {
  width: 18px;
  height: 18px;
  overflow: visible;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.theme-sun-center {
  transform-origin: 12px 12px;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), fill var(--duration-normal) ease;
}

.theme-crescent-mask {
  transform: translate(8px, -8px);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.theme-ray {
  transform-origin: 12px 12px;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}

/* 深色模式下的形变与动效 (对标 jib.design) */
[data-theme="dark"] .theme-toggle-svg {
  transform: rotate(-15deg);
}

[data-theme="dark"] .theme-sun-center {
  transform: scale(1.6);
}

[data-theme="dark"] .theme-crescent-mask {
  transform: translate(0px, 0px);
}

[data-theme="dark"] .theme-ray {
  transform: scale(0) rotate(45deg);
  opacity: 0;
}

.version-chip {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--bg-card-subtle);
  color: var(--ink-tertiary);
}

/* ==========================================================================
   2. 英雄区 (Hero Section — Rows.gg 1:1 Layout)
   ========================================================================== */

.hero-section {
  padding-top: 130px;
  padding-bottom: 64px;
}

/* 开篇 Logo 触发区 */
.hero-logo-wrapper {
  margin-bottom: 28px;
  display: inline-block;
}

.hero-logo-anchor {
  width: 48px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  cursor: pointer;
}

.hero-logo-anchor img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0; /* Canvas 完全接管渲染 */
  pointer-events: none;
}

.hero-headline {
  font-size: clamp(22px, 3.6vw, 38px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.03em;
  color: var(--ink);
  max-width: 100%;
  margin-bottom: 18px;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .hero-headline {
    white-space: normal;
    font-size: 26px;
    line-height: 1.35;
  }
}

.hero-copy {
  font-size: 16px;
  line-height: 1.62;
  color: var(--ink-secondary);
  max-width: 580px;
  margin-bottom: 32px;
  text-wrap: pretty;
}

/* Rows.gg 经典按钮组 */
.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-pill-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 22px;
  background: var(--ink);
  color: var(--bg-canvas);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--ink);
  cursor: pointer;
  transition: transform var(--duration-fast) var(--ease-spring), opacity var(--duration-fast);
}

.btn-pill-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-pill-primary:active {
  transform: translateY(0);
}

.btn-text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  padding: 8px 4px;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  transition: gap var(--duration-fast) ease, color var(--duration-fast);
}

.btn-text-link:hover {
  gap: 10px;
  color: var(--accent);
}

.btn-shoot-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--duration-fast);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.btn-shoot-pill:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-1px);
}

/* ==========================================================================
   3. 双列分割版块 (Split Sections — Rows.gg 经典左右布局)
   ========================================================================== */

.split-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  padding: 0;
  margin-bottom: 72px;
  border-top: none;
}

.split-section.reverse {
  grid-template-columns: 1fr 1fr;
}

/* 左侧交互展示卡片 (Tracker Card) */
.media-col {
  width: 100%;
}

.interactive-card {
  background: var(--bg-card-subtle);
  border: none;
  border-radius: 12px;
  padding: 28px 30px;
  box-shadow: none;
}

.card-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.card-title-text {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

/* 1:1 对标 rows.gg 的纯白无描边药丸卡片 (Pill Items) */
.tracker-rows-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tracker-pill-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px;
  background: transparent; /* 未选中状态去掉白底 */
  border: none;
  border-radius: 99px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-secondary);
  cursor: pointer;
  box-shadow: none;
  transition: all 0.18s var(--ease-spring);
}

.tracker-pill-item:hover {
  background: rgba(0, 0, 0, 0.03);
  color: var(--ink);
  transform: translateY(-1px);
}

.tracker-pill-item.active {
  background: #ffffff; /* 仅选中状态保留纯白底色 */
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 3px 8px rgba(0, 0, 0, 0.03);
}

[data-theme="dark"] .tracker-pill-item {
  background: transparent;
  color: var(--ink-secondary);
  box-shadow: none;
}

[data-theme="dark"] .tracker-pill-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
}

[data-theme="dark"] .tracker-pill-item.active {
  background: #242424;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 3px 8px rgba(0, 0, 0, 0.2);
}

.pill-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pill-badge-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  flex-shrink: 0;
}

.pill-badge-num.red {
  background: #e11d48;
}

.pill-badge-num.dark {
  background: #171717;
}

[data-theme="dark"] .pill-badge-num.dark {
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.pill-badge-num.amber {
  background: #d97706;
}

.pill-badge-num.accent {
  background: #ff5722;
}

.pill-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-tertiary);
  margin-left: 8px;
  flex-shrink: 0;
}

.pill-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-card-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}

/* 右侧纯粹大字排版 (Pure Editorial Typography — No Heavy Boxes) */
.copy-col {
  display: flex;
  flex-direction: column;
}

.copy-heading {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: 16px;
  transition: opacity 0.18s ease, transform 0.18s var(--ease-spring);
}

.copy-desc {
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-secondary);
  text-wrap: pretty;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: opacity 0.18s ease, transform 0.18s var(--ease-spring);
}

.copy-fade-out {
  opacity: 0;
  transform: translateY(4px);
}

/* ==========================================================================
   4. JIB.DESIGN 样式：精选项目横向突破版心画廊 (Shot-Well Gallery)
   ========================================================================== */

.shotwell-section {
  padding: 0;
  margin-bottom: 16px;
  border-top: none;
}

.section-caption-label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink-tertiary);
  text-transform: lowercase;
  margin-bottom: 16px;
}

.shotwell-viewport {
  position: relative;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  overflow-x: auto;
  overscroll-behavior-x: none;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 72px;
  padding-bottom: 4px;
}

.shotwell-track {
  display: flex;
  width: max-content;
  gap: 12px;
  padding-left: max(24px, calc((100vw - min(880px, 90%)) / 2));
  padding-right: max(24px, calc((100vw - min(880px, 90%)) / 2));
}

.shotwell-card {
  width: min(calc(100vw - 32px), 540px);
  aspect-ratio: 1440 / 1024;
  background-color: var(--bg-card-subtle);
  background-image: radial-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px);
  background-size: 14px 14px;
  border: none; /* 彻底去除外围描边 */
  border-radius: var(--radius-lg); /* 统一大容器圆角 */
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 28px;
  box-shadow: none;
  transition: transform 0.2s var(--ease-spring), opacity 0.2s ease;
  cursor: pointer;
  flex-shrink: 0;
}

[data-theme="dark"] .shotwell-card {
  background-color: #1c1c1c;
  background-image: radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
}

@media (min-width: 640px) {
  .shotwell-card {
    padding: 32px 36px;
  }
}

.shotwell-card:hover {
  transform: translateY(-2px);
}

/* 中心悬浮高保真 UI 画板 */
.shotwell-artboard {
  width: 100%;
  height: 100%;
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.04);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
}

[data-theme="dark"] .shotwell-artboard {
  background: #15171e;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.6), 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* 画板顶部微导航 */
.artboard-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 9px;
  color: var(--ink-tertiary);
  font-family: var(--font-mono);
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 8px;
}

.artboard-brand {
  font-weight: 700;
  color: var(--ink);
  font-size: 10px;
}

/* 画板中央标语区 */
.artboard-hero-title {
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
  max-width: 320px;
  margin: 10px 0;
  letter-spacing: -0.015em;
}

/* 画板底部图片与清单双列 */
.artboard-bottom-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
}

.artboard-thumbs-grid {
  display: flex;
  gap: 6px;
}

.artboard-thumb {
  width: 44px;
  height: 48px;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.artboard-step-list {
  font-family: var(--font-mono);
  font-size: 8.5px;
  line-height: 1.5;
  color: var(--ink-secondary);
  display: flex;
  flex-direction: column;
  gap: 1px;
}

/* 移动端三联屏样式 (Mobile Tri-Screen) */
.mobile-tri-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 100%;
  padding: 4px 0;
}

.mobile-mockup-frame {
  flex: 1;
  max-width: 120px;
  height: 100%;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  position: relative;
  overflow: hidden;
}

[data-theme="dark"] .mobile-mockup-frame {
  background: #181b24;
}

.mobile-mockup-frame.dark-modal {
  background: #111318;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.1);
}

.mobile-time-bar {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 7.5px;
  color: var(--ink-tertiary);
  margin-bottom: 4px;
}

.mobile-filter-pills {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin: auto 0;
}

.mobile-pill {
  font-size: 8px;
  font-family: var(--font-sans);
  padding: 2px 8px;
  border-radius: 99px;
  color: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-pill.active {
  background: #ffffff;
  color: #000000;
  font-weight: 600;
  border-color: #ffffff;
}

.card-ui-mockup-1 {
  background: linear-gradient(135deg, rgba(255, 87, 34, 0.05) 0%, rgba(0, 0, 0, 0) 100%), var(--bg-card);
}
.card-ui-mockup-2 {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.06) 0%, rgba(0, 0, 0, 0) 100%), var(--bg-card);
}
.card-ui-mockup-3 {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.06) 0%, rgba(0, 0, 0, 0) 100%), var(--bg-card);
}
.card-ui-mockup-4 {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.06) 0%, rgba(0, 0, 0, 0) 100%), var(--bg-card);
}

/* ==========================================================================
   5. JIB.DESIGN 样式：工作经历发丝线列表 (Experiences Hairline List)
   ========================================================================== */

.jib-experiences-section {
  padding: 0;
  margin-bottom: 72px;
  border-top: none;
}

.jib-exp-list {
  list-style: none;
  margin-top: 14px;
}

.jib-exp-item {
  display: flex;
  gap: 32px;
  border-bottom: 1px solid var(--border-subtle);
  padding: 13px 0;
  font-size: 14px;
  align-items: baseline;
}

.jib-exp-item:first-child {
  padding-top: 0;
}

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

.jib-exp-date {
  width: 110px;
  flex-shrink: 0;
  white-space: nowrap;
  color: var(--ink-secondary);
  font-size: 14px;
}

.jib-exp-role-wrap {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}

.jib-exp-role {
  color: var(--ink);
  font-weight: 600;
}

.jib-exp-org {
  color: var(--ink-tertiary);
  font-size: 13px;
}

.jib-sub-list {
  list-style: none;
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.jib-sub-item {
  font-size: 14px;
  color: var(--ink-secondary);
}

.timeline-title {
  font-weight: 600;
  color: var(--ink);
}

.timeline-org {
  font-size: 12px;
  color: var(--ink-secondary);
}

/* 底部联系区 */
.footer-section {
  padding: 0 0 64px 0;
  border-top: none;
}

.footer-box {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.footer-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-meta-bar {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ink-tertiary);
}

/* ==========================================================================
   5. 响应式布局 (Responsive Breakpoints)
   ========================================================================== */

@media (max-width: 768px) {
  .split-section {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 56px 0;
  }
  .hero-section {
    padding-top: 100px;
    padding-bottom: 64px;
  }
  .fixed-corner-logo {
    top: 18px;
    left: 18px;
  }
  .fixed-top-controls {
    top: 18px;
    right: 18px;
  }
}
