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

:root {
  /* --- 颜色变量：想改主题色只需改这里 --- */
  --color-bg:       #f5f5f0;
  --color-text:     #1a1a1a;
  --color-muted:    #888;
  --color-accent:   #1a1a1a;
  --color-nav-bg:  none;
  --color-border:   #e0e0d8;

  /* --- 尺寸 --- */
  --nav-height:     60px;
  --max-width:      1100px;
  --section-gap:    120px;
}

html {
  scroll-behavior: smooth;           /* 平滑滚动 */
  scrollbar-width: none;             /* 隐藏滚动条 Firefox */
  overscroll-behavior-y: none;       /* 关掉 Mac 上页面顶部/底部的橡皮筋回弹（滚到 About 底后不再"拉过头再弹回"） */
}

body {
  overscroll-behavior-y: none;
}

html::-webkit-scrollbar {
  display: none;                     /* 隐藏滚动条 Chrome/Safari */
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}


/* ============================================================
   NAVBAR — 固定顶部导航
============================================================ */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  background: var(--color-nav-bg);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  z-index: 200;
}

.nav-inner {
  max-width: 100%;
  margin: 0;
  padding: 0 60px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: 0.04em;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 32px;
}

.nav-links a {
  color: var(--color-muted);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.03em;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {          /* active 类由 JS 控制 */
  color: var(--color-text);
}


/* ============================================================
   MAIN — 整体内容区
============================================================ */
main {
  padding-top: var(--nav-height);    /* 避免内容被 navbar 遮住 */
}


/* ============================================================
   SECTION — 通用 section 样式
============================================================ */
.section {
  padding: var(--section-gap) 0;
  border-bottom: 1px solid var(--color-border);
}

.section:last-child {
  border-bottom: none;
}

.section-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section-title {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 48px;
}


/* ============================================================
   SECTION 1 / 2 — Archive & Explorations（主要样式在 index.html <style> 里）
============================================================ */
#projects {
  border-bottom: none;
}

#explorations {
  padding: 0;
  border-bottom: none;
}

/* 3D 组件初始不可见，由 JS scroll 动画控制淡入 */
#scene {
  opacity: 0;
  will-change: opacity, transform;   /* 提前单独成层，出现时不用重新绘制 */
}

/* ============================================================
   SECTION 3 — About
============================================================ */

/* About 占满一屏（高度由 main.js 设为"屏幕高 − 页脚高"），内容垂直居中；
   顶部留出导航栏高度，避免 "ABOUT" 标题被导航栏盖住 */
#about {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: var(--nav-height);
}

/* 左边距与 archive 左侧文字条对齐（60px），取消居中约束 */
#about .section-container {
  max-width: 100%;
  margin: 0;
  padding: 0 60px;
}

.about-content {
  max-width: 600px;
}

.about-bio {
  font-size: 17px;
  line-height: 1.75;
  color: var(--color-text);
  /* margin-bottom 由 config.js STYLE_CONFIG.aboutBioGap 控制 */
}

/* kineticText() 动效：词单元需要 inline-block 才能使用 transform */
.kt-word {
  display: inline-block;
  will-change: transform, opacity;
}

.about-contact-bar {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 160px;
  height: 44px;
}

.contact-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.contact-item {
  font-family: 'Inter', Helvetica, Arial, sans-serif;
  font-style: normal;
  font-weight: 400;
  font-size: 16px;
  line-height: 19px;
  color: #000000;
  text-decoration: none;
}


/* ============================================================
   FOOTER
============================================================ */
#footer {
  padding: 40px 24px;
  text-align: center;
  font-size: 13px;
  color: var(--color-muted);
}


/* ============================================================
   RESPONSIVE — .bp-* 类驱动（断点由 config.js BREAKPOINTS 控制）
============================================================ */

/* ── 1. padding 60px → 20px ─────────────────────────────── */
.bp-mobile .nav-inner {
  padding: 0 20px;
}

.bp-about #about .section-container {
  padding: 0 20px;
}

.bp-archive .archive-side-text--left  { left:  20px; }
.bp-archive .archive-side-text--right { right: 20px; }

/* ── 2. Exploration — 桌面放大 1.25x；移动端旋转覆盖此值 ── */
.explorations-scene-wrapper {
  transform: scale(1.25);
  transform-origin: center center;
}

.bp-exploration .explorations-sticky {
  overflow: hidden;
}

.bp-exploration .explorations-scene-wrapper {
  transform: rotate(-40deg);
  transform-origin: center center;
}

/* ── 3. Archive — 图片水平居中，缩放从中心展开 ─────────── */
/* transform-origin 改为 center top：水平居中，垂直方向仍从顶部向下展开 */
/* 配合 JS 的 item.style.left = -w/2，确保任意缩放比下视觉始终居中 */
.bp-archive .scroll-image {
  transform-origin: center top;
}

/* ── 4. Archive sidetext 隐藏（移动端）─────────────────── */
.bp-archive #archiveTextCenter { display: none; }
/* archiveTextLeft 在移动端仅 detail 面板打开时隐藏，由 JS 控制 */

/* ── About bio — 最大宽度限制 ────────────────────────────── */
.bp-about .about-bio {
  max-width: 75vw;
}

/* ── About contact bar — 竖向排列 ───────────────────────── */
.bp-about .about-contact-bar {
  flex-direction: column;
  align-items: flex-start;
  gap: 30px;
  height: auto;
}

/* ── section-gap 小屏缩减（保留原有行为）────────────────── */
@media (max-width: 600px) {
  :root {
    --section-gap: 72px;
  }

  .nav-links {
    gap: 20px;
  }
}
