/* ============================================================
   QIAN BINZHOU · PORTFOLIO
   深色现代风 · 单页滚动 · 响应式
   ============================================================ */

:root {
  --bg: #0b0d10;
  --bg-soft: #111418;
  --card: #161a20;
  --line: rgba(255, 255, 255, 0.08);
  --text: #eef1f5;
  --muted: #9aa3ad;
  --accent: #ff5c38;
  --accent-soft: rgba(255, 92, 56, 0.12);
  --radius: 18px;
  --maxw: 1120px;
  --font: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", -apple-system,
    BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-en: "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

::selection {
  background: var(--accent);
  color: #fff;
}

/* ---------- 导航 ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px max(24px, calc((100vw - var(--maxw)) / 2));
  background: rgba(11, 13, 16, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.nav-logo {
  font-family: var(--font-en);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.08em;
}

.nav-logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 28px;
}

.nav-links a {
  font-size: 14px;
  color: var(--muted);
  transition: color 0.25s;
}

.nav-links a:hover {
  color: var(--text);
}

.nav--solid {
  background: rgba(11, 13, 16, 0.94);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px max(24px, calc((100vw - var(--maxw)) / 2)) 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: auto -20% -40% auto;
  width: 70%;
  height: 70%;
  background: radial-gradient(
    circle at center,
    rgba(255, 92, 56, 0.16),
    transparent 65%
  );
  pointer-events: none;
}

.hero-eyebrow {
  font-family: var(--font-en);
  font-size: 12px;
  letter-spacing: 0.28em;
  color: var(--accent);
  margin-bottom: 28px;
}

.hero-title {
  font-size: clamp(48px, 9vw, 104px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: 0.02em;
}

.hero-sub {
  margin-top: 18px;
  font-family: var(--font-en);
  font-size: clamp(15px, 2vw, 20px);
  color: var(--muted);
  letter-spacing: 0.04em;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 34px;
}

.hero-chip {
  font-size: 13px;
  color: var(--muted);
  border: 1px solid var(--line);
  background: var(--bg-soft);
  padding: 6px 14px;
  border-radius: 999px;
  transition: border-color 0.25s, color 0.25s;
}

.hero-chip:hover {
  border-color: var(--accent);
  color: var(--text);
}

.hero-scroll {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.1em;
  animation: floaty 2.2s ease-in-out infinite;
}

@keyframes floaty {
  0%, 100% { transform: translate(-50%, 0); }
  50%      { transform: translate(-50%, 8px); }
}

/* ---------- 通用 section ---------- */
.work,
.about {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 96px max(24px, 0);
}

.section-head {
  margin-bottom: 56px;
}

.section-kicker {
  font-family: var(--font-en);
  font-size: 12px;
  letter-spacing: 0.3em;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.section-note {
  margin-top: 12px;
  color: var(--muted);
  max-width: 520px;
}

/* ---------- 作品卡片网格 ---------- */
.project-year {
  display: inline-block;
  font-family: var(--font-en);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--accent);
  border: 1px solid rgba(255, 92, 56, 0.35);
  background: var(--accent-soft);
  padding: 3px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.card {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.35s, box-shadow 0.45s;
}

.card:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 92, 56, 0.45);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.card-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--bg-soft);
}

.card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(11, 13, 16, 0.35), transparent 45%);
  pointer-events: none;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.card:hover .card-media img {
  transform: scale(1.05);
}

.card-count {
  position: absolute;
  right: 14px;
  bottom: 12px;
  z-index: 2;
  font-size: 12px;
  color: #fff;
  background: rgba(11, 13, 16, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 4px 12px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
}

.card-body {
  padding: 24px 24px 26px;
}

.card-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.02em;
  margin-bottom: 4px;
}

.card-role {
  font-size: 13.5px;
  color: var(--accent);
  opacity: 0.92;
  margin-bottom: 12px;
}

.card-desc {
  font-size: 14.5px;
  color: var(--muted);
  margin-bottom: 18px;
}

.card-more {
  font-size: 13px;
  color: var(--text);
  border-bottom: 1px solid rgba(255, 92, 56, 0.6);
  padding-bottom: 3px;
  transition: color 0.25s, border-color 0.25s;
}

.card:hover .card-more {
  color: var(--accent);
  border-color: var(--accent);
}

@media (max-width: 860px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- 关于 ---------- */
.about {
  padding-top: 40px;
  padding-bottom: 120px;
}

.about-wrap {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
  align-items: start;
  max-width: 860px;
}

.about-photo {
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
  aspect-ratio: 3 / 4;
}

.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.15) contrast(1.03);
}

.about-info {
  padding-top: 6px;
}

.about-name {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.about-role {
  font-size: 16px;
  color: var(--text);
  margin-bottom: 26px;
}

.about-line {
  display: flex;
  gap: 18px;
  align-items: baseline;
  font-size: 15.5px;
  color: var(--text);
  margin-bottom: 12px;
}

.about-label {
  flex: 0 0 48px;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.about-qr {
  display: flex;
  gap: 22px;
  margin-top: 30px;
}

.qr-item {
  text-align: center;
}

.qr-item img {
  width: 108px;
  height: 108px;
  border-radius: 14px;
  background: #fff;
  padding: 8px;
  border: 1px solid var(--line);
}

.qr-item figcaption {
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--muted);
  letter-spacing: 0.06em;
}

/* ---------- 技能掌握 ---------- */
.skills {
  margin-top: 88px;
}

.skills-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
  margin-bottom: 26px;
}

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.skill-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-width: 96px;
  padding: 18px 20px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.3s;
}

.skill-item:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 92, 56, 0.45);
}

.skill-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 13px;
  padding: 9px;
}

.skill-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.skill-name {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

@media (max-width: 860px) {
  .about-wrap {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .about-photo {
    max-width: 280px;
    aspect-ratio: 3 / 4;
  }

  .skills-grid {
    gap: 12px;
  }

  .skill-item {
    min-width: 84px;
    padding: 14px 14px 12px;
  }
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 40px max(24px, calc((100vw - var(--maxw)) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-top {
  font-size: 13px;
  color: var(--muted);
  transition: color 0.25s;
}

.footer-top:hover {
  color: var(--accent);
}

.footer-note {
  font-size: 13px;
  color: var(--muted);
}

/* ---------- 详情页 ---------- */
.detail-hero {
  min-height: 64vh;
  display: flex;
  align-items: flex-end;
  padding: 140px max(24px, calc((100vw - var(--maxw)) / 2)) 48px;
  position: relative;
  overflow: hidden;
}

.detail-hero img.detail-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.45);
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg) 0%, transparent 55%);
  pointer-events: none;
}

.detail-hero .detail-hero-content {
  position: relative;
  z-index: 2;
}

.detail-hero .project-year {
  margin-bottom: 14px;
}

.detail-hero h1.detail-title {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.1;
}

.detail-hero .detail-category {
  margin-top: 10px;
  font-size: 15px;
  color: var(--accent);
  opacity: 0.95;
}

.detail-hero .detail-statement {
  margin-top: 18px;
  max-width: 640px;
  font-size: 16px;
  color: var(--muted);
}

.back-link {
  display: inline-block;
  margin: 28px max(24px, calc((100vw - var(--maxw)) / 2)) 0;
  font-size: 14px;
  color: var(--muted);
  transition: color 0.25s;
}

.back-link:hover {
  color: var(--accent);
}

.detail-gallery {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px max(24px, 0) 96px;
}

.gallery-block {
  margin-bottom: 48px;
}

.gallery-block:last-child {
  margin-bottom: 0;
}

.gallery-label {
  font-family: var(--font-en);
  font-size: 12px;
  letter-spacing: 0.3em;
  color: var(--accent);
  margin-bottom: 18px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.gallery-grid img {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--card);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.3s;
}

.gallery-grid img:hover {
  transform: scale(1.015);
  border-color: rgba(255, 92, 56, 0.45);
}

/* 全宽图片（详情页大图） */
.gallery-stack img {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--card);
  margin-bottom: 20px;
}

.gallery-stack img:hover {
  border-color: rgba(255, 92, 56, 0.45);
}

@media (max-width: 860px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- 滚动渐入动画 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .project,
  .project:nth-child(even) .project-media,
  .project:nth-child(even) .project-info {
    grid-template-columns: 1fr;
    order: unset;
    display: block;
  }

  .project {
    display: block;
    margin-bottom: 72px;
  }

  .project-info {
    margin-top: 20px;
  }

  .hero {
    min-height: 92vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-scroll { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .project-media:hover { transform: none; }
  .project-media:hover img { transform: none; }
}
