/* ==========================================================================
   宋和 · 个人简历站
   纯黑主题 · 纯白无衬线 · 白底短片首屏 · 渐进毛玻璃压黑衔接 · 红方块点缀
   ========================================================================== */

:root {
  --bg: #000;
  --fg: #fff;
  --fg-2: rgba(255, 255, 255, .62);
  --fg-3: rgba(255, 255, 255, .4);
  --line: rgba(255, 255, 255, .12);
  --card: #111;
  --red: #EC3013;
  --ink: #1F1E1D;
  --max: 1280px;
  --gutter: clamp(16px, 4vw, 48px);
  --nav-h: 64px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro SC",
          "PingFang SC", "Helvetica Neue", Inter, "Noto Sans SC",
          "Microsoft YaHei", sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
h1, h2, h3, p, dl, dd, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  padding: 8px 14px; background: #fff; color: #000; border-radius: 6px; font-size: 14px;
}
.skip-link:focus { top: 16px; }

/* 红方块：品牌手势 */
.mark {
  display: inline-block; width: 9px; height: 9px; background: var(--red);
  vertical-align: 1px; margin-right: 10px; flex: none;
}

/* ---------- 导航：顶部压在白底视频上用深色字，滚动后变黑色毛玻璃条 ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--nav-h);
  color: var(--ink);
  border-bottom: 1px solid transparent;
  transition: background .4s, border-color .4s, color .4s;
}
.nav.is-scrolled {
  color: var(--fg);
  background: rgba(0, 0, 0, .6);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-color: var(--line);
}
/* 导航内容和首屏名字、各版块共用同一个容器，左边缘严格对齐 */
.nav__inner {
  height: 100%;
  display: flex; align-items: center; justify-content: space-between;
}
.nav__brand { display: flex; align-items: center; font-weight: 600; font-size: 16px; letter-spacing: -.01em; }
.nav__links { display: flex; gap: 28px; font-size: 13px; }
.nav__links a { opacity: .62; transition: opacity .2s; }
.nav__links a:hover, .nav__links a.is-active { opacity: 1; }

/* ---------- 首屏：16:9 的视频盒子，底部一段毛玻璃，名字压在视频上（结构按参考稿） ---------- */
/* 想调整手感只需改这三个变量：毛玻璃带高度 / 模糊强度倍数 / 压黑曲线 */
:root {
  --frost-h: 56%;
  --frost-scale: 1;
  --frost-tint: linear-gradient(180deg,
    rgba(0, 0, 0, 0)   0%,
    rgba(0, 0, 0, .08) 20%,
    rgba(0, 0, 0, .30) 40%,
    rgba(0, 0, 0, .55) 50%,
    rgba(0, 0, 0, .78) 60%,
    rgba(0, 0, 0, .90) 70%,
    rgba(0, 0, 0, .97) 84%,
    #000               100%);
}
.hero {
  position: relative;
  height: clamp(640px, 56.25vw, 100svh);
  overflow: hidden;
  background: #fff;
}
.hero__media {
  position: absolute; inset: 0;
  background: #fff;
  will-change: transform;
}
.hero__video {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  background: #fff;
}

/* 没有视频时的兜底 */
.hero--no-video { background: #000; }
.hero--no-video .hero__media {
  background:
    radial-gradient(60% 50% at 30% 72%, rgba(236, 48, 19, .22), transparent 62%),
    radial-gradient(50% 42% at 76% 56%, rgba(120, 140, 190, .18), transparent 62%),
    linear-gradient(180deg, #0b0b0c 0%, #1a1a1c 48%, #0a0a0a 100%);
}
.hero--no-video .hero__video { display: none; }
.hero--no-video .nav { color: var(--fg); }

/* 渐进毛玻璃：七层 backdrop-filter，模糊 1→48px 逐层加深，用八分之一为步长的 mask 控制每层覆盖区间 */
.hero__glass {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: var(--frost-h);
  z-index: 1;
  pointer-events: none;
}
.hero__glass span { position: absolute; inset: 0; }
.hero__glass span:nth-child(1) {
  -webkit-backdrop-filter: blur(calc(1px * var(--frost-scale))); backdrop-filter: blur(calc(1px * var(--frost-scale)));
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 12.5%, #000 25%, transparent 37.5%);
          mask-image: linear-gradient(180deg, transparent 0%, #000 12.5%, #000 25%, transparent 37.5%);
}
.hero__glass span:nth-child(2) {
  -webkit-backdrop-filter: blur(calc(2px * var(--frost-scale))); backdrop-filter: blur(calc(2px * var(--frost-scale)));
  -webkit-mask-image: linear-gradient(180deg, transparent 12.5%, #000 25%, #000 37.5%, transparent 50%);
          mask-image: linear-gradient(180deg, transparent 12.5%, #000 25%, #000 37.5%, transparent 50%);
}
.hero__glass span:nth-child(3) {
  -webkit-backdrop-filter: blur(calc(4px * var(--frost-scale))); backdrop-filter: blur(calc(4px * var(--frost-scale)));
  -webkit-mask-image: linear-gradient(180deg, transparent 25%, #000 37.5%, #000 50%, transparent 62.5%);
          mask-image: linear-gradient(180deg, transparent 25%, #000 37.5%, #000 50%, transparent 62.5%);
}
.hero__glass span:nth-child(4) {
  -webkit-backdrop-filter: blur(calc(8px * var(--frost-scale))); backdrop-filter: blur(calc(8px * var(--frost-scale)));
  -webkit-mask-image: linear-gradient(180deg, transparent 37.5%, #000 50%, #000 62.5%, transparent 75%);
          mask-image: linear-gradient(180deg, transparent 37.5%, #000 50%, #000 62.5%, transparent 75%);
}
.hero__glass span:nth-child(5) {
  -webkit-backdrop-filter: blur(calc(16px * var(--frost-scale))); backdrop-filter: blur(calc(16px * var(--frost-scale)));
  -webkit-mask-image: linear-gradient(180deg, transparent 50%, #000 62.5%, #000 75%, transparent 87.5%);
          mask-image: linear-gradient(180deg, transparent 50%, #000 62.5%, #000 75%, transparent 87.5%);
}
.hero__glass span:nth-child(6) {
  -webkit-backdrop-filter: blur(calc(32px * var(--frost-scale))); backdrop-filter: blur(calc(32px * var(--frost-scale)));
  -webkit-mask-image: linear-gradient(180deg, transparent 62.5%, #000 75%, #000 100%);
          mask-image: linear-gradient(180deg, transparent 62.5%, #000 75%, #000 100%);
}
.hero__glass span:nth-child(7) {
  -webkit-backdrop-filter: blur(calc(48px * var(--frost-scale))); backdrop-filter: blur(calc(48px * var(--frost-scale)));
  -webkit-mask-image: linear-gradient(180deg, transparent 75%, #000 87.5%, #000 100%);
          mask-image: linear-gradient(180deg, transparent 75%, #000 87.5%, #000 100%);
}

/* 压黑：与毛玻璃带同高，曲线在 --frost-tint 里 */
.hero__fade {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: var(--frost-h);
  z-index: 2;
  pointer-events: none;
  background: var(--frost-tint);
}

/* 名字压在视频上，贴底 */
.hero__content {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 32px;
  padding-bottom: clamp(40px, 6vw, 80px);
  will-change: transform, opacity;
}
.eyebrow {
  display: flex; align-items: center;
  font-size: 15px; font-weight: 500; color: #fff; letter-spacing: .02em;
}
.hero__title {
  margin-top: 12px;
  font-size: clamp(48px, 7vw, 112px);
  line-height: 1.02;
  font-weight: 600;
  letter-spacing: -.025em;
  color: #fff;
}
.hero__sub {
  margin-top: 16px;
  font-size: clamp(17px, 1.8vw, 24px);
  line-height: 1.4;
  color: #fff;
}
.hero__actions { display: flex; align-items: center; gap: 12px 20px; flex-shrink: 0; }

/* 首屏文字入场 */
.hero__text > * {
  opacity: 0; transform: translateY(14px);
  animation: rise 1s var(--ease) forwards;
}
.hero__text > :nth-child(1) { animation-delay: .25s; }
.hero__text > :nth-child(2) { animation-delay: .36s; }
.hero__text > :nth-child(3) { animation-delay: .48s; }
.hero__actions { opacity: 0; animation: fade 1s var(--ease) .7s forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes fade { to { opacity: 1; } }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 48px; padding: 0 26px;
  border-radius: 999px;
  font-size: 16px; font-weight: 500;
  border: 1px solid transparent;
  background: none; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn:active { transform: scale(.97); }
.btn .icon { width: 14px; height: 14px; }
.btn--solid { background: #fff; color: #000; }
.btn--solid:hover { background: rgba(255, 255, 255, .86); }
.btn--text { color: #fff; padding: 0 12px; }
.btn--text:hover { color: rgba(255, 255, 255, .7); }
.btn--icon {
  width: 48px; padding: 0;
  border-color: rgba(255, 255, 255, .5);
  background: rgba(255, 255, 255, .08);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: #fff;
}
.btn--icon:hover { border-color: #fff; }
.btn--icon .icon { width: 16px; height: 16px; }
.btn--icon .icon--sound { display: none; }
.btn--icon.is-on .icon--sound { display: block; }
.btn--icon.is-on .icon--muted { display: none; }

/* ---------- 通用版块 ---------- */
.section { padding-block: clamp(72px, 9vw, 128px); }
.section + .section { padding-top: 0; }
.section + .section .section__grid {
  border-top: 1px solid var(--line);
  padding-top: clamp(72px, 9vw, 128px);
}
.section__grid {
  display: grid;
  grid-template-columns: 164px minmax(0, 1fr);
  gap: 40px;
}
.section__label {
  display: flex; align-items: center;
  align-self: start;            /* 标签贴版块顶部，不随内容高度居中 */
  font-size: 13px; font-weight: 400; color: var(--fg-2);
  padding-top: 8px;
}

/* 关于 */
.lead {
  font-size: clamp(22px, 2.6vw, 32px);
  line-height: 1.45;
  font-weight: 500;
  letter-spacing: -.01em;
  max-width: 24em;
}
.meta { display: grid; gap: 24px; margin-top: 56px; }
.meta--4 { grid-template-columns: repeat(4, 1fr); }
.meta--3 { grid-template-columns: repeat(3, 1fr); }
.meta dt { font-size: 12px; color: var(--fg-3); margin-bottom: 6px; }
.meta dd { font-size: 15px; }
.link { border-bottom: 1px solid rgba(255, 255, 255, .3); transition: border-color .2s; }
.link:hover { border-color: #fff; }

/* 经历 */
.timeline__row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.timeline__row:first-child { padding-top: 0; }
.timeline__date { color: var(--fg-2); font-variant-numeric: tabular-nums; }
.timeline__main strong { display: block; font-weight: 600; font-size: 15px; line-height: 1.4; }
.timeline__main span { display: block; color: var(--fg-2); font-size: 13px; margin-top: 4px; }
.timeline__note { color: rgba(255, 255, 255, .78); }
.sublabel {
  margin: 56px 0 10px;
  font-size: 12px; font-weight: 400; color: var(--fg-3);
}

/* 作品 */
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 16px; row-gap: 40px;
}
.work { display: block; }
.work__cover {
  aspect-ratio: 16 / 10;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, .05);
  overflow: hidden;
  display: grid; place-items: center;
  color: var(--fg-3); font-size: 12px;
  transition: background .3s, border-color .3s;
}
.work__cover img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .7s var(--ease);
}
.work:hover .work__cover { background: #161616; border-color: rgba(255, 255, 255, .12); }
.work:hover .work__cover img { transform: scale(1.04); }
.work h3 { font-size: 15px; font-weight: 600; margin-top: 14px; }
.work p { font-size: 13px; color: var(--fg-2); margin-top: 4px; }
.work-more {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: grid; grid-template-columns: 164px minmax(0, 1fr); gap: 24px;
  font-size: 14px;
}
.work-more dt { font-size: 12px; color: var(--fg-3); padding-top: 3px; }
.work-more dd { color: rgba(255, 255, 255, .78); }
.work-more dd span { display: block; padding: 4px 0; }
.work-more dd span b { font-weight: 600; color: var(--fg); margin-right: 8px; }

/* 代表作品 */
.cases { display: grid; gap: clamp(48px, 6vw, 88px); }
.case {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}
.case__cover {
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, .06);
}
.case__cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.case__cover:hover img { transform: scale(1.03); }
.case__kicker { display: flex; align-items: center; font-size: 12px; letter-spacing: .08em; color: var(--fg-3); }
.case__title { margin-top: 10px; font-size: clamp(22px, 2.2vw, 28px); font-weight: 600; letter-spacing: -.01em; }
.case__desc { margin-top: 14px; font-size: 15px; line-height: 1.75; color: rgba(255, 255, 255, .78); }
.case__metrics {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line);
}
.case__metrics dt { font-size: 22px; font-weight: 600; letter-spacing: -.01em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.case__metrics dd { margin-top: 4px; font-size: 12px; line-height: 1.4; color: var(--fg-3); }
.case__facts { margin-top: 22px; display: grid; gap: 12px; }
.case__facts div { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; font-size: 13.5px; line-height: 1.65; }
.case__facts dt { color: var(--fg-3); }
.case__facts dd { color: rgba(255, 255, 255, .72); }
.case__links { margin-top: 18px; display: flex; gap: 20px; font-size: 14px; }
.work-grid .work p { line-height: 1.5; }

/* 联系 */
.contact__title {
  font-size: clamp(44px, 6vw, 80px);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.1;
}
.contact__email {
  display: inline-block;
  margin-top: 22px;
  font-size: clamp(18px, 2vw, 24px);
  text-decoration: underline;
  text-underline-offset: 7px;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(255, 255, 255, .5);
  transition: text-decoration-color .2s;
}
.contact__email:hover { text-decoration-color: #fff; }

/* 页脚 */
.footer__inner {
  display: flex; justify-content: space-between; align-items: center;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  font-size: 12px; color: var(--fg-3);
}
.footer__inner a:hover { color: var(--fg); }

/* ---------- 滚动入场 ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .work-grid { grid-template-columns: repeat(2, 1fr); }
  .case { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nav__links { gap: 18px; }
  .hero { height: clamp(640px, 100svh, 820px); }
  .hero__media { padding-top: var(--nav-h); }
  .hero__video { object-fit: contain; object-position: 50% 0; height: 60%; }
  .hero__content { flex-direction: column; align-items: flex-start; gap: 22px; padding-bottom: 36px; }
  .hero__title { font-size: clamp(40px, 12vw, 60px); }
  .section__grid { grid-template-columns: 1fr; gap: 20px; }
  .meta--4, .meta--3 { grid-template-columns: repeat(2, 1fr); }
  .timeline__row { grid-template-columns: 1fr; gap: 6px; }
  .work-more { grid-template-columns: 1fr; gap: 10px; }
}
@media (max-width: 560px) {
  .work-grid { grid-template-columns: 1fr; }
}

/* ---------- 减弱动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__text > *, .hero__actions { animation: none; opacity: 1; transform: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
