/* ============================================================
   zhouchenlei.css — 周晨磊个人网页全局样式表
   视觉方向：瑞士国际主义网格排版 / 纸面质感 / CMYK 印刷签名
   ============================================================ */

/* ---------- 设计令牌 ---------- */
:root {
  --paper: #F7F5F1;        /* 纸白基底 */
  --paper-2: #EFECE6;      /* 略深纸面 */
  --ink: #1C1B19;          /* 墨色文字 */
  --ink-soft: #4A4742;     /* 次级文字 */
  --gray: #8A867E;         /* 辅助文字 */
  --line: #DDD8CF;         /* 分隔线 */
  --cyan: #009FE3;         /* 强调：印刷青 */
  --magenta: #E6007E;      /* 签名：印刷品红 */
  --yellow: #FFD100;       /* 签名：印刷黄 */
  --maxw: 1120px;
  --pad-x: clamp(20px, 5vw, 48px);
  --nav-h: 72px;
  --serif: "Noto Serif SC", "Songti SC", "SimSun", serif;
  --sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
}

/* ---------- 基础 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

ul { list-style: none; }

::selection { background: var(--cyan); color: #fff; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

/* 焦点可见 */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

/* ---------- 顶部导航 ---------- */
.site-nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  background: rgba(247, 245, 241, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  z-index: 100;
}

.nav-inner {
  max-width: var(--maxw);
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* logo：CMYK 四色圆点签名 */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
}

.logo-dots { display: flex; gap: 3px; }

.logo-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.logo-dots .c { background: var(--cyan); }
.logo-dots .m { background: var(--magenta); }
.logo-dots .y { background: var(--yellow); }
.logo-dots .k { background: var(--ink); }

.logo small {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  color: var(--gray);
  margin-left: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a {
  position: relative;
  display: inline-block;
  padding: 12px 16px;
  font-size: 0.95rem;
  color: var(--ink-soft);
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active { color: var(--ink); }

.nav-links a::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 8px;
  height: 2px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after { transform: scaleX(1); }

/* 移动端导航 */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  width: 44px;
  height: 44px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.nav-toggle svg { width: 20px; height: 20px; stroke: var(--ink); }

/* ---------- 章节通用 ---------- */
.section { padding: 96px 0; }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 48px;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 14px;
}

.section-no {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: 0.1em;
}

.section-title {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3.4vw, 2.2rem);
  font-weight: 900;
  letter-spacing: 0.06em;
}

.section-en {
  margin-left: auto;
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  color: var(--gray);
  text-transform: uppercase;
}

/* 套准十字装饰（印刷签名） */
.cross {
  position: relative;
  width: 14px;
  height: 14px;
}

.cross::before,
.cross::after {
  content: "";
  position: absolute;
  background: var(--cyan);
}

.cross::before { left: 0; top: 6px; width: 14px; height: 2px; }
.cross::after { left: 6px; top: 0; width: 2px; height: 14px; }

/* ---------- Hero（首页） ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 40px) 0 72px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  right: -70px;
  top: -70px;
  background: radial-gradient(circle, rgba(0, 159, 227, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
  width: 100%;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  color: var(--gray);
  margin-bottom: 22px;
}

.hero-name {
  font-family: var(--serif);
  font-size: clamp(3rem, 7.5vw, 5.2rem);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: 0.04em;
}

.hero-name .accent { color: var(--cyan); }

.hero-sub {
  margin-top: 18px;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 300;
  color: var(--ink-soft);
  letter-spacing: 0.08em;
}

.hero-desc {
  margin-top: 22px;
  max-width: 30em;
  color: var(--gray);
  font-size: 0.98rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 26px;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  border-radius: 2px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-primary {
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
}

.btn-primary:hover { background: var(--cyan); border-color: var(--cyan); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}

.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); }

.hero-figure {
  position: relative;
}

.hero-figure img {
  width: 100%;
  border-radius: 3px;
  box-shadow: 0 24px 60px -24px rgba(28, 27, 25, 0.35);
}

.hero-figure::after {
  content: "";
  position: absolute;
  left: -14px;
  bottom: -14px;
  width: 64px;
  height: 64px;
  border-left: 3px solid var(--magenta);
  border-bottom: 3px solid var(--magenta);
  pointer-events: none;
}

.hero-caption {
  position: absolute;
  right: -10px;
  bottom: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 8px 14px;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  color: var(--gray);
}

/* 滚动提示 */
.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  color: var(--gray);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.scroll-hint::after {
  content: "";
  width: 1px;
  height: 36px;
  background: var(--line);
}

/* ---------- 关于 ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: start;
}

.about-text p + p { margin-top: 18px; }

.about-text strong { font-weight: 700; color: var(--ink); }

.about-card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  padding: 30px 30px 26px;
}

.card-title {
  font-size: 0.75rem;
  letter-spacing: 0.28em;
  color: var(--gray);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cyan);
  flex: none;
}

.info-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 0.92rem;
}

.info-list li:last-child { border-bottom: none; }

.info-list .k { color: var(--gray); flex: none; }

.info-list .v { text-align: right; font-weight: 500; }

/* ---------- 技能 ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.skill-item {
  border: 1px solid var(--line);
  background: #fff;
  padding: 22px 24px;
  transition: border-color 0.25s, transform 0.25s;
}

.skill-item:hover {
  border-color: var(--cyan);
  transform: translateY(-3px);
}

.skill-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
}

.skill-name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.05rem;
}

.skill-level {
  font-size: 0.78rem;
  color: var(--gray);
  letter-spacing: 0.08em;
}

.skill-bar {
  height: 4px;
  background: var(--line);
  overflow: hidden;
  border-radius: 2px;
}

.skill-bar i {
  display: block;
  height: 100%;
  background: var(--cyan);
  width: 0;
  transition: width 1s ease 0.2s;
}

/* ---------- 作品 ---------- */
.works-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.work-card {
  display: block;
  background: #fff;
  border: 1px solid var(--line);
  transition: transform 0.28s, box-shadow 0.28s;
}

.work-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 44px -22px rgba(28, 27, 25, 0.4);
}

.work-thumb {
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.work-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.work-card:hover .work-thumb img { transform: scale(1.04); }

.work-meta {
  padding: 18px 22px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.work-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.06rem;
}

.work-tag {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--cyan);
  border: 1px solid rgba(0, 159, 227, 0.4);
  padding: 3px 10px;
  border-radius: 999px;
  flex: none;
}

.work-arrow {
  font-size: 0.9rem;
  color: var(--gray);
  transition: color 0.2s, transform 0.2s;
}

.work-card:hover .work-arrow { color: var(--cyan); transform: translateX(4px); }

/* ---------- 页眉小页（share / contact 共用） ---------- */
.page-head {
  padding: calc(var(--nav-h) + 72px) 0 8px;
}

.page-title {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 900;
  letter-spacing: 0.05em;
  line-height: 1.2;
}

.page-title .accent { color: var(--cyan); }

.page-lead {
  margin-top: 14px;
  max-width: 34em;
  color: var(--gray);
}

.page-meta {
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 28px;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  color: var(--gray);
}

.page-meta b { color: var(--ink); font-weight: 500; }

/* ---------- 分享页 ---------- */
.share-block { margin-top: 20px; }

.share-block + .share-block { margin-top: 56px; }

.block-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.block-head h2 {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.block-head .count {
  font-size: 0.75rem;
  color: var(--gray);
  letter-spacing: 0.14em;
}

.share-list {
  border-top: 1px solid var(--line);
}

.share-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 4px;
  border-bottom: 1px solid var(--line);
  transition: background 0.2s;
}

.share-item:hover { background: var(--paper-2); }

.share-index {
  font-family: var(--serif);
  font-size: 0.85rem;
  color: var(--cyan);
  font-weight: 700;
  width: 2.2em;
  flex: none;
}

.share-main { flex: 1; min-width: 0; }

.share-main h3 {
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.share-main p {
  font-size: 0.88rem;
  color: var(--gray);
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-tag {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  padding: 3px 10px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  border-radius: 999px;
  flex: none;
}

.share-arrow {
  color: var(--gray);
  font-size: 0.95rem;
  flex: none;
  transition: color 0.2s, transform 0.2s;
}

.share-item:hover .share-arrow { color: var(--magenta); transform: translateX(4px); }

/* ---------- 联系页 ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  align-items: start;
}

.contact-info-card {
  background: var(--ink);
  color: var(--paper);
  padding: 34px 30px;
}

.contact-info-card .card-title { color: var(--gray); }

.contact-info-card .card-title::before { background: var(--yellow); }

.contact-lines li {
  padding: 16px 0;
  border-bottom: 1px solid rgba(247, 245, 241, 0.16);
}

.contact-lines li:last-child { border-bottom: none; }

.contact-lines .k {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  color: var(--gray);
  margin-bottom: 4px;
}

.contact-lines .v {
  font-size: 1.02rem;
  font-weight: 500;
}

.contact-form {
  background: #fff;
  border: 1px solid var(--line);
  padding: 34px 30px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.form-field { margin-bottom: 20px; }

.form-field label {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--gray);
  margin-bottom: 8px;
}

.form-field input,
.form-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--paper);
  padding: 12px 14px;
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--ink);
  transition: border-color 0.2s;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--cyan);
}

.form-field textarea { min-height: 140px; resize: vertical; }

.form-note {
  font-size: 0.78rem;
  color: var(--gray);
  margin-top: 12px;
}

/* 表单成功提示 */
.form-toast {
  display: none;
  margin-top: 16px;
  border-left: 3px solid var(--cyan);
  background: var(--paper-2);
  padding: 12px 16px;
  font-size: 0.9rem;
}

.form-toast.show { display: block; animation: fadeIn 0.3s ease; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* ---------- 页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 48px;
}

.footer-cmyk {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 6px;
}

.footer-cmyk i:nth-child(1) { background: var(--cyan); }
.footer-cmyk i:nth-child(2) { background: var(--magenta); }
.footer-cmyk i:nth-child(3) { background: var(--yellow); }
.footer-cmyk i:nth-child(4) { background: var(--ink); }

.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 36px var(--pad-x) 44px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 0.98rem;
}

.footer-copy {
  font-size: 0.82rem;
  color: var(--gray);
  letter-spacing: 0.08em;
}

.footer-links {
  display: flex;
  gap: 22px;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.footer-links a:hover { color: var(--cyan); }

/* ---------- 关于头像 ---------- */
.about-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 3px;
  margin-bottom: 24px;
}

/* ---------- 生活掠影 ---------- */
.life-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.life-item {
  background: #fff;
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform 0.28s, box-shadow 0.28s;
}

.life-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px -20px rgba(28, 27, 25, 0.35);
}

.life-thumb {
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.life-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.life-item:hover .life-thumb img { transform: scale(1.05); }

.life-cap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  font-size: 0.85rem;
}

.life-cap b { font-weight: 600; }

.life-cap span {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: var(--gray);
}

@media (max-width: 920px) {
  .life-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .life-grid { grid-template-columns: 1fr; }
}

/* ---------- 滚动显现动画 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.in { opacity: 1; transform: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 920px) {
  .hero-inner,
  .about-grid,
  .contact-grid { grid-template-columns: 1fr; }

  .hero { padding-top: calc(var(--nav-h) + 56px); }

  .hero-figure { order: -1; max-width: 560px; }

  .scroll-hint { display: none; }
}

@media (max-width: 720px) {
  .section { padding: 68px 0; }

  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 10px 20px 18px;
    gap: 2px;
    transform: translateY(-120%);
    transition: transform 0.3s ease;
  }

  .nav-links.open { transform: none; }

  .nav-links a { padding: 14px 8px; font-size: 1.02rem; }

  .nav-toggle { display: inline-flex; }

  .skills-grid,
  .works-grid { grid-template-columns: 1fr; }

  .form-row { grid-template-columns: 1fr; }

  .page-meta { flex-direction: column; gap: 8px; }

  .share-item { flex-wrap: wrap; gap: 8px 14px; }

  .share-main p { white-space: normal; }
}

/* ---------- 减少动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .reveal { opacity: 1; transform: none; }
}
