/* ═══════════════════════════════════════════════════════
   范元斌网站 v6 — Lusion风格 · 杂志感作品集
   设计参考：Lusion · frau-im-mond
═══════════════════════════════════════════════════════ */

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

:root {
  --bg: #0a0908;
  --bg-2: #111009;
  --bg-3: #181610;
  --text: #f2ece0;
  --text-2: rgba(242,236,224,0.55);
  --muted: #7a7468;
  --accent: #c0392b;
  --accent-dim: rgba(192,57,43,0.15);
  --border: rgba(242,236,224,0.06);
  --border-2: rgba(242,236,224,0.12);
  --ease: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-in-out: cubic-bezier(0.645, 0.045, 0.355, 1);
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Noto Sans SC', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  cursor: none;
}

a { color: inherit; text-decoration: none; cursor: none; }
img { max-width: 100%; display: block; }
button { cursor: none; border: none; background: none; font: inherit; }

/* ─── 自定义光标 ─── */
.cursor-dot {
  position: fixed;
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  transition: transform 0.15s var(--ease-out), width 0.3s var(--ease), height 0.3s var(--ease);
}
.cursor-ring {
  position: fixed;
  width: 36px; height: 36px;
  border: 1px solid rgba(242,236,224,0.25);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.5s var(--ease), height 0.5s var(--ease), border-color 0.3s;
}
body:has(a:hover) .cursor-ring,
body:has(button:hover) .cursor-ring {
  width: 56px; height: 56px;
  border-color: var(--accent);
}

/* ─── 加载动画 ─── */
.loader {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: #f5f0e8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: all;
}
.loader.done {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

.loader-counter {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(48px, 10vw, 96px);
  font-weight: 400;
  letter-spacing: 0.05em;
  color: #1a1814;
  line-height: 1;
}

.loader-line {
  margin-top: 20px;
  width: 0;
  height: 1px;
  background: #1a1814;
  animation: loadLine 2s ease-out 0.1s forwards;
}
@keyframes loadLine { to { width: 160px; } }

/* ─── 滚动进度条 ─── */
.progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  background: var(--accent);
  z-index: 999;
  width: 0;
  transition: width 0.1s linear;
}

/* ════════════════════════════════════════════════════════
   导航
═══════════════════════════════════════════════════════ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  padding: 32px 56px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: padding 0.5s var(--ease), background 0.5s;
}
.nav.scrolled {
  padding: 20px 56px;
  background: rgba(10,9,8,0.88);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  font-family: 'Noto Serif SC', serif;
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 0.18em;
}
.nav-links { display: flex; gap: 48px; align-items: center; }
.nav-links a {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.28em;
  color: rgba(242,236,224,0.4);
  transition: color 0.3s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.4s var(--ease);
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }

/* ════════════════════════════════════════════════════════
   HERO
═══════════════════════════════════════════════════════ */
.hero {
  position: relative;
  height: 100vh;
  min-height: 680px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-video {
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.08);
  animation: heroZoom 12s linear infinite alternate;
}
@keyframes heroZoom {
  from { transform: scale(1.08); }
  to { transform: scale(1.15); }
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(10,9,8,0.95) 0%,
    rgba(10,9,8,0.5) 40%,
    rgba(10,9,8,0.2) 70%,
    rgba(10,9,8,0.55) 100%
  );
}

/* Hero 内容 */
.hero-content {
  position: relative;
  z-index: 1;
  padding: 0 56px 80px;
  max-width: 900px;
}

.hero-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.45em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 20px;
  overflow: hidden;
}
.hero-eyebrow span {
  display: inline-block;
  animation: revealUp 0.8s var(--ease-out) 0.2s both;
}

.hero-title {
  font-family: 'Noto Serif SC', serif;
  font-size: clamp(44px, 7.5vw, 108px);
  font-weight: 300;
  line-height: 1.02;
  margin-bottom: 28px;
  overflow: hidden;
}
.hero-title .line {
  display: block;
  overflow: hidden;
}
.hero-title .line-inner {
  display: block;
  transform: translateY(110%);
  animation: titleReveal 1s var(--ease-out) forwards;
}
.hero-title .line:nth-child(1) .line-inner { animation-delay: 0.3s; }
.hero-title .line:nth-child(2) .line-inner { animation-delay: 0.45s; }
.hero-title .line.accent .line-inner { color: var(--accent); }

@keyframes titleReveal {
  to { transform: translateY(0); }
}

.hero-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--muted);
  margin-bottom: 22px;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 0.7s forwards;
}

.hero-desc {
  font-size: clamp(14px, 1.4vw, 16px);
  line-height: 1.9;
  color: var(--text-2);
  max-width: 540px;
  margin-bottom: 16px;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 0.85s forwards;
}

.hero-btns {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 1s forwards;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes revealUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 按钮 */
.btn-primary {
  display: inline-block;
  padding: 14px 40px;
  background: var(--text);
  color: var(--bg);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.22em;
  transition: background 0.35s var(--ease), color 0.35s var(--ease), transform 0.35s var(--ease);
}
.btn-primary:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-3px);
}

.btn-ghost {
  display: inline-block;
  padding: 13px 40px;
  border: 1px solid rgba(242,236,224,0.2);
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.22em;
  transition: border-color 0.35s, transform 0.35s var(--ease), background 0.35s;
}
.btn-ghost:hover {
  border-color: var(--text);
  transform: translateY(-3px);
  background: rgba(242,236,224,0.05);
}

/* 滚动提示 */
.scroll-cue {
  position: absolute;
  bottom: 40px;
  right: 56px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  opacity: 0;
  animation: fadeIn 0.8s var(--ease-out) 1.4s forwards;
}
.scroll-cue span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 8px;
  letter-spacing: 0.35em;
  color: var(--muted);
  writing-mode: vertical-rl;
}
.scroll-line {
  width: 1px;
  height: 56px;
  background: linear-gradient(to bottom, var(--muted), transparent);
  animation: scrollDrop 2s ease-in-out infinite;
}
@keyframes scrollDrop {
  0% { transform: scaleY(0); transform-origin: top; opacity: 1; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0.5; }
}

/* ════════════════════════════════════════════════════════
   核心项目
═══════════════════════════════════════════════════════ */
.projects-section {
  padding: 160px 56px;
  border-top: 1px solid var(--border);
}

.section-hd {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 72px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}
.section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.45em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.section-title {
  font-family: 'Noto Serif SC', serif;
  font-size: clamp(52px, 7vw, 96px);
  font-weight: 300;
  line-height: 1.0;
}
.section-desc {
  font-size: 13px;
  color: var(--muted);
  max-width: 340px;
  line-height: 1.85;
  text-align: right;
  padding-bottom: 6px;
}

/* 项目网格 - 杂志感两列 */
.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
}

/* 项目卡片 */
.proj-card {
  display: block;
  background: var(--bg-2);
  overflow: hidden;
  position: relative;
}

/* 卡片媒体 - 视觉占60%+ */
.card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #080806;
}
.card-media img,
.card-media video {
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.1);
  transition: transform 1.2s var(--ease-out), opacity 0.6s;
}
.card-media video { opacity: 0; }
.proj-card:hover .card-media img { transform: scale(1); }
.proj-card:hover .card-media video { opacity: 1; transform: scale(1.05); }

/* 悬停遮罩 */
.card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,9,8,0.85) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.5s;
}
.proj-card:hover .card-overlay { opacity: 1; }

/* 播放指示 */
.card-play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.7);
  width: 64px; height: 64px;
  border: 1.5px solid rgba(242,236,224,0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text);
  opacity: 0;
  transition: opacity 0.4s, transform 0.6s var(--ease);
  background: rgba(10,9,8,0.25);
  backdrop-filter: blur(6px);
}
.proj-card:hover .card-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* 卡片编号 */
.card-num {
  position: absolute;
  top: 24px; left: 28px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.3em;
  color: var(--accent);
  z-index: 2;
}

/* 卡片内容 */
.card-body {
  padding: 28px 36px 40px;
}
.card-type {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.28em;
  color: var(--muted);
  margin-bottom: 10px;
}
.card-title {
  font-family: 'Noto Serif SC', serif;
  font-size: clamp(20px, 2.2vw, 28px);
  font-weight: 300;
  line-height: 1.2;
  margin-bottom: 12px;
  transition: color 0.3s;
}
.proj-card:hover .card-title { color: var(--accent); }

.card-brief {
  font-size: 13px;
  line-height: 1.85;
  color: var(--text-2);
  margin-bottom: 18px;
}

.card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.card-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--muted);
  padding: 5px 12px;
  border: 1px solid var(--border);
  transition: border-color 0.3s, color 0.3s;
}
.proj-card:hover .card-tag { border-color: var(--border-2); }

/* 进入项目链接 */
.card-cta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.22em;
  color: rgba(242,236,224,0.3);
  transition: color 0.3s;
}
.proj-card:hover .card-cta { color: var(--accent); }

/* ════════════════════════════════════════════════════════
   研究入口
═══════════════════════════════════════════════════════ */
.research-strip {
  padding: 140px 56px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.research-strip::before {
  content: '';
  position: absolute;
  right: -0.05em;
  top: 50%;
  transform: translateY(-50%);
  font-family: 'Noto Serif SC', serif;
  font-size: clamp(120px, 18vw, 280px);
  font-weight: 300;
  color: rgba(242,236,224,0.03);
  pointer-events: none;
  user-select: none;
  line-height: 1;
}

.research-strip-inner { position: relative; z-index: 1; max-width: 680px; }

.research-title {
  font-family: 'Noto Serif SC', serif;
  font-size: clamp(56px, 8vw, 112px);
  font-weight: 300;
  line-height: 0.95;
  margin-bottom: 24px;
}
.research-desc {
  font-size: 14px;
  line-height: 2.0;
  color: var(--muted);
  margin-bottom: 40px;
}
.btn-text {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.28em;
  color: var(--text);
  transition: color 0.3s, gap 0.4s var(--ease);
}
.btn-text:hover { color: var(--accent); gap: 22px; }
.btn-text .arrow { font-size: 14px; transition: transform 0.4s var(--ease); }
.btn-text:hover .arrow { transform: translateX(6px); }

/* ════════════════════════════════════════════════════════
   关于
═══════════════════════════════════════════════════════ */
.about-section {
  padding: 160px 56px;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 100px;
  align-items: start;
}

.about-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.45em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 16px;
}
.about-name {
  font-family: 'Noto Serif SC', serif;
  font-size: clamp(48px, 6.5vw, 88px);
  font-weight: 300;
  line-height: 1.0;
  margin-bottom: 8px;
}
.about-role {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--muted);
  margin-bottom: 40px;
}
.about-bio {
  font-size: 15px;
  line-height: 2.0;
  color: var(--text-2);
  margin-bottom: 16px;
  max-width: 540px;
}

/* 工具链分组 */
.about-tools {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 44px;
  padding-top: 36px;
  border-top: 1px solid var(--border);
}
.tool-group {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
}
.tool-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.3em;
  color: var(--accent);
  text-transform: uppercase;
  min-width: 88px;
}
.tool-item {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: rgba(242,236,224,0.35);
  padding: 0 14px;
  border-right: 1px solid var(--border);
  transition: color 0.3s;
}
.tool-item:first-of-type { padding-left: 0; }
.tool-item:last-of-type { border-right: none; }
.tool-item:hover { color: var(--text); }

/* 关于照片 */
.about-photo {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--bg-3);
  position: relative;
}
.about-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 60%, rgba(10,9,8,0.4));
}
.about-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(20%) contrast(1.08);
  transition: transform 1.2s var(--ease-out), filter 0.8s;
}
.about-photo:hover img {
  transform: scale(1.06);
  filter: grayscale(0%) contrast(1);
}

/* ════════════════════════════════════════════════════════
   联系
═══════════════════════════════════════════════════════ */
.contact-section {
  padding: 160px 56px 100px;
  border-top: 1px solid var(--border);
}

.contact-inner { max-width: 900px; }

.contact-title {
  font-family: 'Noto Serif SC', serif;
  font-size: clamp(52px, 7vw, 96px);
  font-weight: 300;
  margin-bottom: 20px;
}
.contact-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.9;
  max-width: 480px;
  margin-bottom: 64px;
}

.contact-list { display: flex; flex-direction: column; gap: 0; margin-bottom: 100px; }
.contact-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
  font-size: clamp(18px, 2.2vw, 28px);
  color: var(--text);
  transition: color 0.3s, padding-left 0.5s var(--ease);
  position: relative;
  overflow: hidden;
}
.contact-item .contact-l {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.3em;
  color: var(--muted);
  text-transform: uppercase;
  min-width: 80px;
}
.contact-item .contact-v {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: clamp(16px, 1.8vw, 24px);
}
.contact-item:hover { color: var(--accent); }
.contact-item:hover .contact-l { color: var(--accent); }

/* ════════════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════════ */
footer {
  border-top: 1px solid var(--border);
  padding: 28px 56px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
footer p {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  color: rgba(242,236,224,0.2);
}

/* ════════════════════════════════════════════════════════
   滚动触发动画
═══════════════════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
}
.reveal.in { opacity: 1; transform: translateY(0); }

.reveal-clip {
  opacity: 0;
  transition: opacity 0.8s var(--ease-out);
}
.reveal-clip.in { opacity: 1; }

.text-split { overflow: hidden; display: block; }
.text-split .word {
  display: inline-block;
  transform: translateY(120%);
  transition: transform 0.9s var(--ease-out);
}
.text-split.in .word { transform: translateY(0); }

/* ════════════════════════════════════════════════════════
   响应式
═══════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .project-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 60px; }
  .about-photo { max-width: 420px; aspect-ratio: 4/3; }
  .about-photo img { object-position: top; }
}

@media (max-width: 768px) {
  .nav { padding: 24px 24px; }
  .nav.scrolled { padding: 16px 24px; }
  .nav-links { gap: 28px; }
  .hero-content { padding: 0 24px 64px; }
  .projects-section { padding: 100px 24px; }
  .section-hd { flex-direction: column; align-items: flex-start; gap: 16px; }
  .section-desc { text-align: left; }
  .card-body { padding: 24px 24px 32px; }
  .research-strip { padding: 100px 24px; }
  .about-section { padding: 100px 24px; }
  .contact-section { padding: 100px 24px 80px; }
  footer { flex-direction: column; gap: 12px; text-align: center; padding: 24px; }
  .cursor-dot, .cursor-ring { display: none; }
  body { cursor: auto; }
  a, button { cursor: pointer; }
}

@media (max-width: 480px) {
  .nav-links { gap: 18px; font-size: 9px; }
  .hero-btns { flex-direction: column; }
  .btn-primary, .btn-ghost { text-align: center; }
  .contact-item { font-size: 16px; }
}
